content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from collections import List
[ 6738, 17268, 1330, 7343 ]
7
4
import numpy as np # core functions totalreturn = lambda x: (x[-1]/x[0])-1 finalreturn = lambda x: x[-1] sharpe = lambda x: np.sqrt(12) * (np.mean(x) / np.std(x)) ann_vol = lambda x: np.sqrt(12) * np.std(x) cagr = lambda x: ((((x[-1]) / x[0])) ** (12.0/(x.count()-1))) - 1 cagr2 = lambda x: ((np.mean(x)+1) ** 12) -1
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 4755, 5499, 198, 23350, 7783, 796, 37456, 2124, 25, 357, 87, 58, 12, 16, 60, 14, 87, 58, 15, 12962, 12, 16, 198, 20311, 7783, 796, 37456, 2124, 25, 2124, 58, 12, 16, 60, 198, 1477, 283, 431, 796, 37456, 2124, 25, 45941, 13, 31166, 17034, 7, 1065, 8, 1635, 357, 37659, 13, 32604, 7, 87, 8, 1220, 45941, 13, 19282, 7, 87, 4008, 198, 1236, 62, 10396, 796, 37456, 2124, 25, 45941, 13, 31166, 17034, 7, 1065, 8, 1635, 45941, 13, 19282, 7, 87, 8, 198, 66, 363, 81, 796, 37456, 2124, 25, 14808, 19510, 87, 58, 12, 16, 12962, 1220, 2124, 58, 15, 60, 4008, 12429, 357, 1065, 13, 15, 29006, 87, 13, 9127, 3419, 12, 16, 22305, 532, 352, 198, 66, 363, 81, 17, 796, 37456, 2124, 25, 14808, 37659, 13, 32604, 7, 87, 47762, 16, 8, 12429, 1105, 8, 532, 16, 198, 220, 220, 220, 220 ]
2.037975
158
import sys # NOTE: for exiting import requests import datetime import pprint import ujson as json # NOTE: faster json API_KEY = '' # TODO: input api key here!!! if not API_KEY: sys.exit('Please insert your Decisive API key') print print 'Creating session to always add API key...' # NOTE: you can also use decisive.DecisiveApiClient session = requests.Session() session.auth = (API_KEY,'') API_HOST = 'https://ads.decisive.is' print print 'Selecting ads...' ads = get('ads', offset=1, limit=5, approved='true') ad_ids = [a['ad_id'] for a in ads] print 'selected', ad_ids print print 'Creating retargeting campaign...' to_retargeting_id = lambda a: 'clicks_{}'.format(ad['ad_id']) # TODO: fill in your own campaign details new_ad = {'url':'http://google.com', 'name':'example ad name', 'budget':1984, 'bidmode':'Manual', 'cpm_bid':3.1415, 'creative_urls':['https://www.google.com.au/images/srpr/logo11w.png'], 'start_date':datetime.datetime.now().isoformat(), 'end_date':datetime.datetime.now().isoformat(), 'blacklist':{'country':['Canada','France'],'site': ['tmz.com', 'dogecoin.com']} } ad['targeting'] = {'device_groups':map(to_retargeting_id, ad_ids)} # NOTE: retargeting print post(ad, 'ads')
[ 11748, 25064, 1303, 24550, 25, 329, 33895, 198, 198, 11748, 7007, 198, 11748, 4818, 8079, 198, 11748, 279, 4798, 198, 11748, 334, 17752, 355, 33918, 1303, 24550, 25, 5443, 33918, 198, 198, 17614, 62, 20373, 796, 10148, 1303, 16926, 46, 25, 5128, 40391, 1994, 994, 10185, 198, 361, 407, 7824, 62, 20373, 25, 198, 220, 220, 220, 25064, 13, 37023, 10786, 5492, 7550, 534, 4280, 13911, 7824, 1994, 11537, 628, 198, 4798, 198, 4798, 705, 32071, 6246, 284, 1464, 751, 7824, 1994, 986, 6, 198, 2, 24550, 25, 345, 460, 635, 779, 21112, 13, 10707, 13911, 32, 14415, 11792, 198, 29891, 796, 7007, 13, 36044, 3419, 198, 29891, 13, 18439, 796, 357, 17614, 62, 20373, 4032, 11537, 198, 198, 17614, 62, 39, 10892, 796, 705, 5450, 1378, 5643, 13, 12501, 13911, 13, 271, 6, 628, 198, 4798, 198, 4798, 705, 17563, 278, 9011, 986, 6, 198, 5643, 796, 651, 10786, 5643, 3256, 11677, 28, 16, 11, 4179, 28, 20, 11, 6325, 11639, 7942, 11537, 198, 324, 62, 2340, 796, 685, 64, 17816, 324, 62, 312, 20520, 329, 257, 287, 9011, 60, 198, 4798, 705, 34213, 3256, 512, 62, 2340, 628, 198, 4798, 198, 4798, 705, 32071, 1005, 7641, 278, 1923, 986, 6, 198, 1462, 62, 1186, 7641, 278, 62, 312, 796, 37456, 257, 25, 705, 565, 3378, 23330, 92, 4458, 18982, 7, 324, 17816, 324, 62, 312, 6, 12962, 198, 2, 16926, 46, 25, 6070, 287, 534, 898, 1923, 3307, 198, 3605, 62, 324, 796, 1391, 6, 6371, 10354, 6, 4023, 1378, 13297, 13, 785, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3672, 10354, 6, 20688, 512, 1438, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 37315, 10354, 28296, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 14065, 14171, 10354, 6, 5124, 723, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 4426, 62, 14065, 10354, 18, 13, 1415, 1314, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 20123, 425, 62, 6371, 82, 10354, 17816, 5450, 1378, 2503, 13, 13297, 13, 785, 13, 559, 14, 17566, 14, 27891, 1050, 14, 6404, 78, 1157, 86, 13, 11134, 6, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 9688, 62, 4475, 10354, 19608, 8079, 13, 19608, 8079, 13, 2197, 22446, 26786, 18982, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 437, 62, 4475, 10354, 19608, 8079, 13, 19608, 8079, 13, 2197, 22446, 26786, 18982, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 13424, 4868, 10354, 90, 6, 19315, 10354, 17816, 17940, 41707, 28572, 20520, 4032, 15654, 10354, 37250, 17209, 89, 13, 785, 3256, 705, 4598, 469, 3630, 13, 785, 20520, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 324, 17816, 16793, 278, 20520, 796, 1391, 6, 25202, 62, 24432, 10354, 8899, 7, 1462, 62, 1186, 7641, 278, 62, 312, 11, 512, 62, 2340, 38165, 1303, 24550, 25, 1005, 7641, 278, 198, 4798, 1281, 7, 324, 11, 705, 5643, 11537, 198 ]
2.526214
515
commands = CommandsRegistry()
[ 198, 198, 9503, 1746, 796, 49505, 8081, 4592, 3419, 198 ]
3.2
10
from typing import Tuple, List import numpy as np import tensorflow as tf from webdnn.frontend.tensorflow.converter import TensorFlowConverter from webdnn.frontend.tensorflow.util import unary_op_handler, check_data_format, convert_odd_padding_to_concat, parse_padding from webdnn.graph.axis import Axis from webdnn.graph.operators.average_pooling_2d import AveragePooling2D from webdnn.graph.operators.clipped_relu import ClippedRelu from webdnn.graph.operators.concat import Concat from webdnn.graph.operators.convolution2d import Convolution2D from webdnn.graph.operators.deconvolution2d import Deconvolution2D from webdnn.graph.operators.elu import Elu from webdnn.graph.operators.max_pooling_2d import MaxPooling2D from webdnn.graph.operators.relu import Relu from webdnn.graph.operators.softmax import Softmax from webdnn.graph.operators.softplus import Softplus from webdnn.graph.operators.softsign import Softsign from webdnn.graph.order import Order from webdnn.graph.variables.constant_variable import ConstantVariable from webdnn.util import console @TensorFlowConverter.register_handler("AvgPool") @TensorFlowConverter.register_handler("AvgPool3D") @TensorFlowConverter.register_handler("AvgPool3DGrad") @TensorFlowConverter.register_handler("AvgPoolGrad") @TensorFlowConverter.register_handler("BatchNormWithGlobalNormalization") @TensorFlowConverter.register_handler("BatchNormWithGlobalNormalizationGrad") @TensorFlowConverter.register_handler("BiasAdd") @TensorFlowConverter.register_handler("BiasAddGrad") @TensorFlowConverter.register_handler("BiasAddV1") @TensorFlowConverter.register_handler("Conv2D") @TensorFlowConverter.register_handler("Conv2DBackpropFilter") @TensorFlowConverter.register_handler("Conv2DBackpropInput") @TensorFlowConverter.register_handler("Conv3D") @TensorFlowConverter.register_handler("Conv3DBackpropFilter") @TensorFlowConverter.register_handler("Conv3DBackpropFilterV2") @TensorFlowConverter.register_handler("Conv3DBackpropInput") @TensorFlowConverter.register_handler("Conv3DBackpropInputV2") @TensorFlowConverter.register_handler("DepthwiseConv2dNative") @TensorFlowConverter.register_handler("DepthwiseConv2dNativeBackpropFilter") @TensorFlowConverter.register_handler("DepthwiseConv2dNativeBackpropInput") @TensorFlowConverter.register_handler("Dilation2D") @TensorFlowConverter.register_handler("Dilation2DBackpropFilter") @TensorFlowConverter.register_handler("Dilation2DBackpropInput") TensorFlowConverter.register_handler("Elu")(unary_op_handler(Elu)) @TensorFlowConverter.register_handler("EluGrad") @TensorFlowConverter.register_handler("FractionalAvgPoolGrad") @TensorFlowConverter.register_handler("FractionalMaxPoolGrad") @TensorFlowConverter.register_handler("FusedBatchNorm") @TensorFlowConverter.register_handler("FusedPadConv2D") @TensorFlowConverter.register_handler("FusedResizeAndPadConv2D") @TensorFlowConverter.register_handler("InTopK") @TensorFlowConverter.register_handler("InTopKV2") @TensorFlowConverter.register_handler("L2Loss") @TensorFlowConverter.register_handler("LRN") @TensorFlowConverter.register_handler("LRNGrad") @TensorFlowConverter.register_handler("LogSoftmax") @TensorFlowConverter.register_handler("MaxPool") @TensorFlowConverter.register_handler("MaxPool3D") @TensorFlowConverter.register_handler("MaxPool3DGrad") @TensorFlowConverter.register_handler("MaxPool3DGradGrad") @TensorFlowConverter.register_handler("MaxPoolGrad") @TensorFlowConverter.register_handler("MaxPoolGradGrad") @TensorFlowConverter.register_handler("MaxPoolGradGradWithArgmax") @TensorFlowConverter.register_handler("MaxPoolGradWithArgmax") @TensorFlowConverter.register_handler("MaxPoolWithArgmax") @TensorFlowConverter.register_handler("QuantizedAvgPool") @TensorFlowConverter.register_handler("QuantizedBatchNormWithGlobalNormalization") @TensorFlowConverter.register_handler("QuantizedBiasAdd") @TensorFlowConverter.register_handler("QuantizedConv2D") @TensorFlowConverter.register_handler("QuantizedMaxPool") @TensorFlowConverter.register_handler("QuantizedRelu") @TensorFlowConverter.register_handler("QuantizedRelu6") @TensorFlowConverter.register_handler("QuantizedReluX") TensorFlowConverter.register_handler("Relu")(unary_op_handler(Relu)) @TensorFlowConverter.register_handler("Relu6") @TensorFlowConverter.register_handler("Relu6Grad") @TensorFlowConverter.register_handler("ReluGrad") @TensorFlowConverter.register_handler("Softmax") @TensorFlowConverter.register_handler("SoftmaxCrossEntropyWithLogits") @TensorFlowConverter.register_handler("Softplus") @TensorFlowConverter.register_handler("SoftplusGrad") TensorFlowConverter.register_handler("Softsign")(unary_op_handler(Softsign)) @TensorFlowConverter.register_handler("SoftsignGrad") @TensorFlowConverter.register_handler("SparseSoftmaxCrossEntropyWithLogits") @TensorFlowConverter.register_handler("TopK") @TensorFlowConverter.register_handler("TopKV2")
[ 6738, 19720, 1330, 309, 29291, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 3992, 67, 20471, 13, 8534, 437, 13, 83, 22854, 11125, 13, 1102, 332, 353, 1330, 309, 22854, 37535, 3103, 332, 353, 198, 6738, 3992, 67, 20471, 13, 8534, 437, 13, 83, 22854, 11125, 13, 22602, 1330, 555, 560, 62, 404, 62, 30281, 11, 2198, 62, 7890, 62, 18982, 11, 10385, 62, 5088, 62, 39231, 62, 1462, 62, 1102, 9246, 11, 21136, 62, 39231, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 22704, 1330, 38349, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 23913, 62, 7742, 278, 62, 17, 67, 1330, 13475, 27201, 278, 17, 35, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 565, 3949, 62, 260, 2290, 1330, 1012, 3949, 6892, 84, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 1102, 9246, 1330, 1482, 9246, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 42946, 2122, 17, 67, 1330, 34872, 2122, 17, 35, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 12501, 261, 85, 2122, 17, 67, 1330, 4280, 261, 85, 2122, 17, 35, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 417, 84, 1330, 412, 2290, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 9806, 62, 7742, 278, 62, 17, 67, 1330, 5436, 27201, 278, 17, 35, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 260, 2290, 1330, 4718, 84, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 4215, 9806, 1330, 8297, 9806, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 4215, 9541, 1330, 8297, 9541, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 3575, 2024, 13, 4215, 12683, 1330, 8297, 12683, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 2875, 1330, 8284, 198, 6738, 3992, 67, 20471, 13, 34960, 13, 25641, 2977, 13, 9979, 415, 62, 45286, 1330, 20217, 43015, 198, 6738, 3992, 67, 20471, 13, 22602, 1330, 8624, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48997, 27201, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48997, 27201, 18, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48997, 27201, 18, 35, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48997, 27201, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 33, 963, 35393, 3152, 22289, 26447, 1634, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 33, 963, 35393, 3152, 22289, 26447, 1634, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 33, 4448, 4550, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 33, 4448, 4550, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 33, 4448, 4550, 53, 16, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 17, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 17, 35, 7282, 22930, 22417, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 17, 35, 7282, 22930, 20560, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 18, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 18, 35, 7282, 22930, 22417, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 18, 35, 7282, 22930, 22417, 53, 17, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 18, 35, 7282, 22930, 20560, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 3103, 85, 18, 35, 7282, 22930, 20560, 53, 17, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48791, 3083, 3103, 85, 17, 67, 31272, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48791, 3083, 3103, 85, 17, 67, 31272, 7282, 22930, 22417, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 48791, 3083, 3103, 85, 17, 67, 31272, 7282, 22930, 20560, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 35, 10520, 17, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 35, 10520, 17, 35, 7282, 22930, 22417, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 35, 10520, 17, 35, 7282, 22930, 20560, 4943, 628, 198, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 36, 2290, 4943, 7, 403, 560, 62, 404, 62, 30281, 7, 36, 2290, 4008, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 36, 2290, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 37, 7861, 282, 48997, 27201, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 37, 7861, 282, 11518, 27201, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 37, 1484, 33, 963, 35393, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 37, 1484, 26114, 3103, 85, 17, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 37, 1484, 4965, 1096, 1870, 26114, 3103, 85, 17, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 818, 9126, 42, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 818, 9126, 42, 53, 17, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 43, 17, 43, 793, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 35972, 45, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 35972, 10503, 6335, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11187, 18380, 9806, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 18, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 18, 35, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 18, 35, 42731, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 42731, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 42731, 42731, 3152, 28100, 9806, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 42731, 3152, 28100, 9806, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 11518, 27201, 3152, 28100, 9806, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 48997, 27201, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 33, 963, 35393, 3152, 22289, 26447, 1634, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 33, 4448, 4550, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 3103, 85, 17, 35, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 11518, 27201, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 6892, 84, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 6892, 84, 21, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 24915, 1143, 6892, 84, 55, 4943, 628, 198, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 6892, 84, 4943, 7, 403, 560, 62, 404, 62, 30281, 7, 6892, 84, 4008, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 6892, 84, 21, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 6892, 84, 21, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 6892, 84, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 9806, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 9806, 21544, 14539, 28338, 3152, 11187, 896, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 9541, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 9541, 42731, 4943, 628, 198, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 12683, 4943, 7, 403, 560, 62, 404, 62, 30281, 7, 18380, 12683, 4008, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 18380, 12683, 42731, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 50, 29572, 18380, 9806, 21544, 14539, 28338, 3152, 11187, 896, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 9126, 42, 4943, 628, 198, 31, 51, 22854, 37535, 3103, 332, 353, 13, 30238, 62, 30281, 7203, 9126, 42, 53, 17, 4943, 198 ]
2.960519
1,697
from numbers import Number one = One() zero = 0
[ 6738, 3146, 1330, 7913, 198, 198, 505, 796, 1881, 3419, 198, 22570, 796, 657, 198 ]
3.266667
15
from creevey.ops.image import centercrop import numpy as np from PIL import Image import torch.nn as nn def center_crop_pil_image(img): """ Helper function to crop the center out of images. Utilizes the centercrop function from `creevey` Parameters ---------- img: array PIL image array Returns ------- PIL.Image: Slice of input image corresponding to a cropped area around the center """ img = np.array(img) cropped_img = centercrop(img, reduction_factor=.4) return Image.fromarray(cropped_img) class _Identity(nn.Module): """ Used to pass penultimate layer features to the the ensemble Motivation for this is that the features from the penultimate layer are likely more informative than the 1000 way softmax that was used in the multi_output_model_v2. """
[ 6738, 269, 631, 3304, 13, 2840, 13, 9060, 1330, 1247, 2798, 1773, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198, 4299, 3641, 62, 31476, 62, 79, 346, 62, 9060, 7, 9600, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5053, 525, 2163, 284, 13833, 262, 3641, 503, 286, 4263, 13, 628, 220, 220, 220, 7273, 346, 4340, 262, 1247, 2798, 1773, 2163, 422, 4600, 66, 631, 3304, 63, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 33705, 25, 7177, 198, 220, 220, 220, 220, 220, 220, 220, 350, 4146, 2939, 7177, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 350, 4146, 13, 5159, 25, 3454, 501, 286, 5128, 2939, 11188, 284, 257, 48998, 1989, 1088, 262, 3641, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 33705, 796, 45941, 13, 18747, 7, 9600, 8, 198, 220, 220, 220, 48998, 62, 9600, 796, 1247, 2798, 1773, 7, 9600, 11, 7741, 62, 31412, 28, 13, 19, 8, 198, 220, 220, 220, 1441, 7412, 13, 6738, 18747, 7, 19915, 1496, 62, 9600, 8, 628, 198, 4871, 4808, 7390, 26858, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16718, 284, 1208, 3112, 44818, 7679, 3033, 284, 262, 262, 34549, 628, 220, 220, 220, 6543, 26939, 329, 428, 318, 326, 262, 3033, 422, 262, 3112, 44818, 7679, 198, 220, 220, 220, 389, 1884, 517, 30304, 621, 262, 8576, 835, 2705, 9806, 326, 373, 973, 198, 220, 220, 220, 287, 262, 5021, 62, 22915, 62, 19849, 62, 85, 17, 13, 198, 220, 220, 220, 37227, 628 ]
2.985965
285
""" Class to help create and manage data schema and to validate json files. """ from jsonschema import Draft7Validator from copy import deepcopy from genson import SchemaBuilder from .dictSchema import DictSchema from cornflow_client.core.tools import load_json, save_json class SchemaManager: """ A schema manager between json-schema, dict-schema and marshmallow """ def __init__(self, schema, validator=Draft7Validator): """ Class to help create and manage data schema. Once a schema is loaded, allow the validation of data. :param schema: a json schema """ self.validator = validator self.jsonschema = schema @classmethod def from_filepath(cls, path): """ Load a json schema from a json file. :param path the file path return The SchemaManager instance """ schema = cls.load_json(path) return cls(schema) def get_jsonschema(self): """ Return a copy of the stored jsonschema. """ return deepcopy(self.jsonschema) def get_validation_errors(self, data): """ Validate json data according to the loaded jsonschema and return a list of errors. Return an empty list if data is valid. :param dict data: data to validate. :return: A list of validation errors. For more details about the error format, see: https://python-jsonschema.readthedocs.io/en/latest/errors/#jsonschema.exceptions.ValidationError """ v = self.validator(self.get_jsonschema()) if not v.is_valid(data): error_list = [e for e in v.iter_errors(data)] return error_list return [] def validate_data(self, data, print_errors=False): """ Validate json data according to the loaded jsonschema. :param dict data: the data to validate. :param bool print_errors: If true, will print the errors. :return: True if data format is valid, else False. """ errors_list = self.get_validation_errors(data) if print_errors: for e in errors_list: print(e) return len(errors_list) == 0 def get_file_errors(self, path): """ Get json file errors according to the loaded jsonschema. :param path the file path :return: A list of validation errors. For more details about the error format, see: https://python-jsonschema.readthedocs.io/en/latest/errors/#jsonschema.exceptions.ValidationError """ data = self.load_json(path) return self.get_validation_errors(data) def validate_file(self, path, print_errors=False): """ Validate a json file according to the loaded jsonschema. :param path the file path :param print_errors: If true, will print the errors. :return: True if the data is valid and False if it is not. """ data = self.load_json(path) return self.validate_data(data, print_errors=print_errors) def to_dict_schema(self): """ Transform a jsonschema into a dictionary format :return: The schema dictionary """ return self.to_schema_dict_obj().get_schema() def to_schema_dict_obj(self): """ Returns an DictSchema object equivalent of the jsonschema """ return DictSchema(self.get_jsonschema()) @property def to_marshmallow(self): """ Create marshmallow schemas :return: a dict containing the flask marshmallow schemas :rtype: Schema() """ return self.to_schema_dict_obj().to_marshmallow() def export_schema_dict(self, path): """ Print the schema_dict in a json file. :param path: the path where to save the dict.format :return: nothing """ self.save_json(self.to_dict_schema(), path) def draft_schema_from(self, path, save_path=None): """ Create a draft jsonschema from a json file of data. :param path: path to the json file. :param save_path: path where to save the generated schema. :return: the generated schema. """ file = self.load_json(path) builder = SchemaBuilder() builder.add_schema({"type": "object", "properties": {}}) builder.add_object(file) draft_schema = builder.to_json() if save_path is not None: with open(save_path, "w") as outfile: outfile.write(draft_schema) return draft_schema def to_template(self): """ This function assumes certain structure for the jsonschema. For now, three types of tables exist: array of objects, arrays and objects. { table1: [{col1: a, col2: b}, {col1: aa, col2: bb}, ...], table2: [1, 2, 3, ], table3: {config1: a, config2: b}, } """ master_table_name = "_README" type_table_name = "_TYPES" tables = {master_table_name: [], type_table_name: []} # we update the master table of tables: real_props = [ (k, v) for (k, v) in self.jsonschema["properties"].items() if not k.startswith("$") ] for key, value in real_props: tables[master_table_name].append( dict(table=key, description=value.get("description", "")) ) # then we get each table for key, value in real_props: tables[key] = self._get_table(value) # then we get column types example_inv = {1: "integer", "string": "string"} for key, value in real_props: rows = [] if len(tables[key]) > 1: rows = [ dict(table=key, column=v, type="string") for v in ["key", "value"] ] if len(tables[key]) == 1: row1 = tables[key][0] rows = [ dict(table=key, column=k, type=example_inv[v]) for k, v in row1.items() ] tables[type_table_name].extend(rows) return tables @staticmethod @staticmethod def load_json(path): """ Load a json file :param path: the path of the json file.json return the json content. """ return load_json(path) @staticmethod """ Aliases: """ dict_to_flask = to_marshmallow load_schema = from_filepath jsonschema_to_flask = to_marshmallow jsonschema_to_dict = to_dict_schema
[ 37811, 198, 9487, 284, 1037, 2251, 290, 6687, 1366, 32815, 290, 284, 26571, 33918, 3696, 13, 198, 37811, 198, 198, 6738, 44804, 684, 2395, 2611, 1330, 13650, 22, 47139, 1352, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 308, 19069, 1330, 10011, 2611, 32875, 198, 6738, 764, 11600, 27054, 2611, 1330, 360, 713, 27054, 2611, 198, 6738, 11676, 11125, 62, 16366, 13, 7295, 13, 31391, 1330, 3440, 62, 17752, 11, 3613, 62, 17752, 628, 198, 4871, 10011, 2611, 13511, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 32815, 4706, 1022, 33918, 12, 15952, 2611, 11, 8633, 12, 15952, 2611, 290, 22397, 42725, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 32815, 11, 4938, 1352, 28, 37741, 22, 47139, 1352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5016, 284, 1037, 2251, 290, 6687, 1366, 32815, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4874, 257, 32815, 318, 9639, 11, 1249, 262, 21201, 286, 1366, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 32815, 25, 257, 33918, 32815, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 12102, 1352, 796, 4938, 1352, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8457, 684, 2395, 2611, 796, 32815, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 422, 62, 7753, 6978, 7, 565, 82, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8778, 257, 33918, 32815, 422, 257, 33918, 2393, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 262, 2393, 3108, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 383, 10011, 2611, 13511, 4554, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 32815, 796, 537, 82, 13, 2220, 62, 17752, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 537, 82, 7, 15952, 2611, 8, 628, 220, 220, 220, 825, 651, 62, 8457, 684, 2395, 2611, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 257, 4866, 286, 262, 8574, 44804, 684, 2395, 2611, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2769, 30073, 7, 944, 13, 8457, 684, 2395, 2611, 8, 628, 220, 220, 220, 825, 651, 62, 12102, 341, 62, 48277, 7, 944, 11, 1366, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3254, 20540, 33918, 1366, 1864, 284, 262, 9639, 44804, 684, 2395, 2611, 290, 1441, 257, 1351, 286, 8563, 13, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 281, 6565, 1351, 611, 1366, 318, 4938, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 8633, 1366, 25, 1366, 284, 26571, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 317, 1351, 286, 21201, 8563, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1114, 517, 3307, 546, 262, 4049, 5794, 11, 766, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3740, 1378, 29412, 12, 8457, 684, 2395, 2611, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 42861, 14, 48277, 31113, 8457, 684, 2395, 2611, 13, 1069, 11755, 13, 7762, 24765, 12331, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 2116, 13, 12102, 1352, 7, 944, 13, 1136, 62, 8457, 684, 2395, 2611, 28955, 628, 220, 220, 220, 220, 220, 220, 220, 611, 407, 410, 13, 271, 62, 12102, 7, 7890, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4049, 62, 4868, 796, 685, 68, 329, 304, 287, 410, 13, 2676, 62, 48277, 7, 7890, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 4049, 62, 4868, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 17635, 628, 220, 220, 220, 825, 26571, 62, 7890, 7, 944, 11, 1366, 11, 3601, 62, 48277, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3254, 20540, 33918, 1366, 1864, 284, 262, 9639, 44804, 684, 2395, 2611, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 8633, 1366, 25, 262, 1366, 284, 26571, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20512, 3601, 62, 48277, 25, 1002, 2081, 11, 481, 3601, 262, 8563, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 6407, 611, 1366, 5794, 318, 4938, 11, 2073, 10352, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 62, 4868, 796, 2116, 13, 1136, 62, 12102, 341, 62, 48277, 7, 7890, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 3601, 62, 48277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 304, 287, 8563, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 68, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 18896, 7, 48277, 62, 4868, 8, 6624, 657, 628, 220, 220, 220, 825, 651, 62, 7753, 62, 48277, 7, 944, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 33918, 2393, 8563, 1864, 284, 262, 9639, 44804, 684, 2395, 2611, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 262, 2393, 3108, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 317, 1351, 286, 21201, 8563, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1114, 517, 3307, 546, 262, 4049, 5794, 11, 766, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3740, 1378, 29412, 12, 8457, 684, 2395, 2611, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 42861, 14, 48277, 31113, 8457, 684, 2395, 2611, 13, 1069, 11755, 13, 7762, 24765, 12331, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 2116, 13, 2220, 62, 17752, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 1136, 62, 12102, 341, 62, 48277, 7, 7890, 8, 628, 220, 220, 220, 825, 26571, 62, 7753, 7, 944, 11, 3108, 11, 3601, 62, 48277, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3254, 20540, 257, 33918, 2393, 1864, 284, 262, 9639, 44804, 684, 2395, 2611, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 262, 2393, 3108, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3601, 62, 48277, 25, 1002, 2081, 11, 481, 3601, 262, 8563, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 6407, 611, 262, 1366, 318, 4938, 290, 10352, 611, 340, 318, 407, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 2116, 13, 2220, 62, 17752, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 12102, 378, 62, 7890, 7, 7890, 11, 3601, 62, 48277, 28, 4798, 62, 48277, 8, 628, 220, 220, 220, 825, 284, 62, 11600, 62, 15952, 2611, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 26981, 257, 44804, 684, 2395, 2611, 656, 257, 22155, 5794, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 383, 32815, 22155, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 1462, 62, 15952, 2611, 62, 11600, 62, 26801, 22446, 1136, 62, 15952, 2611, 3419, 628, 220, 220, 220, 825, 284, 62, 15952, 2611, 62, 11600, 62, 26801, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 281, 360, 713, 27054, 2611, 2134, 7548, 286, 262, 44804, 684, 2395, 2611, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 360, 713, 27054, 2611, 7, 944, 13, 1136, 62, 8457, 684, 2395, 2611, 28955, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 825, 284, 62, 76, 5406, 42725, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13610, 22397, 42725, 3897, 5356, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 257, 8633, 7268, 262, 42903, 22397, 42725, 3897, 5356, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 10011, 2611, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 1462, 62, 15952, 2611, 62, 11600, 62, 26801, 22446, 1462, 62, 76, 5406, 42725, 3419, 628, 220, 220, 220, 825, 10784, 62, 15952, 2611, 62, 11600, 7, 944, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 12578, 262, 32815, 62, 11600, 287, 257, 33918, 2393, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 25, 262, 3108, 810, 284, 3613, 262, 8633, 13, 18982, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21928, 62, 17752, 7, 944, 13, 1462, 62, 11600, 62, 15952, 2611, 22784, 3108, 8, 628, 220, 220, 220, 825, 4538, 62, 15952, 2611, 62, 6738, 7, 944, 11, 3108, 11, 3613, 62, 6978, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13610, 257, 4538, 44804, 684, 2395, 2611, 422, 257, 33918, 2393, 286, 1366, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 25, 3108, 284, 262, 33918, 2393, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3613, 62, 6978, 25, 3108, 810, 284, 3613, 262, 7560, 32815, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 262, 7560, 32815, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 796, 2116, 13, 2220, 62, 17752, 7, 6978, 8, 628, 220, 220, 220, 220, 220, 220, 220, 27098, 796, 10011, 2611, 32875, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 27098, 13, 2860, 62, 15952, 2611, 7, 4895, 4906, 1298, 366, 15252, 1600, 366, 48310, 1298, 1391, 11709, 8, 198, 220, 220, 220, 220, 220, 220, 220, 27098, 13, 2860, 62, 15252, 7, 7753, 8, 628, 220, 220, 220, 220, 220, 220, 220, 4538, 62, 15952, 2611, 796, 27098, 13, 1462, 62, 17752, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3613, 62, 6978, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 21928, 62, 6978, 11, 366, 86, 4943, 355, 503, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 7753, 13, 13564, 7, 35679, 62, 15952, 2611, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4538, 62, 15952, 2611, 628, 220, 220, 220, 825, 284, 62, 28243, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 770, 2163, 18533, 1728, 4645, 329, 262, 44804, 684, 2395, 2611, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1114, 783, 11, 1115, 3858, 286, 8893, 2152, 25, 7177, 286, 5563, 11, 26515, 290, 5563, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 3084, 16, 25, 685, 90, 4033, 16, 25, 257, 11, 951, 17, 25, 275, 5512, 1391, 4033, 16, 25, 257, 64, 11, 951, 17, 25, 275, 65, 5512, 2644, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 3084, 17, 25, 685, 16, 11, 362, 11, 513, 11, 16589, 198, 220, 220, 220, 220, 220, 220, 220, 3084, 18, 25, 1391, 11250, 16, 25, 257, 11, 4566, 17, 25, 275, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4958, 62, 11487, 62, 3672, 796, 45434, 15675, 11682, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 11487, 62, 3672, 796, 45434, 9936, 47, 1546, 1, 198, 220, 220, 220, 220, 220, 220, 220, 8893, 796, 1391, 9866, 62, 11487, 62, 3672, 25, 685, 4357, 2099, 62, 11487, 62, 3672, 25, 17635, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 356, 4296, 262, 4958, 3084, 286, 8893, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1103, 62, 1676, 862, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 74, 11, 410, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 357, 74, 11, 410, 8, 287, 2116, 13, 8457, 684, 2395, 2611, 14692, 48310, 1, 4083, 23814, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 479, 13, 9688, 2032, 342, 7203, 3, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 11, 1988, 287, 1103, 62, 1676, 862, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8893, 58, 9866, 62, 11487, 62, 3672, 4083, 33295, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 7, 11487, 28, 2539, 11, 6764, 28, 8367, 13, 1136, 7203, 11213, 1600, 13538, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 788, 356, 651, 1123, 3084, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 11, 1988, 287, 1103, 62, 1676, 862, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8893, 58, 2539, 60, 796, 2116, 13557, 1136, 62, 11487, 7, 8367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 788, 356, 651, 5721, 3858, 198, 220, 220, 220, 220, 220, 220, 220, 1672, 62, 16340, 796, 1391, 16, 25, 366, 41433, 1600, 366, 8841, 1298, 366, 8841, 20662, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 11, 1988, 287, 1103, 62, 1676, 862, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15274, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 83, 2977, 58, 2539, 12962, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15274, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 7, 11487, 28, 2539, 11, 5721, 28, 85, 11, 2099, 2625, 8841, 4943, 329, 410, 287, 14631, 2539, 1600, 366, 8367, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 83, 2977, 58, 2539, 12962, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 16, 796, 8893, 58, 2539, 7131, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15274, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 7, 11487, 28, 2539, 11, 5721, 28, 74, 11, 2099, 28, 20688, 62, 16340, 58, 85, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 11, 410, 287, 5752, 16, 13, 23814, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8893, 58, 4906, 62, 11487, 62, 3672, 4083, 2302, 437, 7, 8516, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8893, 628, 220, 220, 220, 2488, 12708, 24396, 628, 220, 220, 220, 2488, 12708, 24396, 198, 220, 220, 220, 825, 3440, 62, 17752, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8778, 257, 33918, 2393, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3108, 25, 262, 3108, 286, 262, 33918, 2393, 13, 17752, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 262, 33918, 2695, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3440, 62, 17752, 7, 6978, 8, 628, 220, 220, 220, 2488, 12708, 24396, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 12104, 1386, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8633, 62, 1462, 62, 2704, 2093, 796, 284, 62, 76, 5406, 42725, 198, 220, 220, 220, 3440, 62, 15952, 2611, 796, 422, 62, 7753, 6978, 198, 220, 220, 220, 44804, 684, 2395, 2611, 62, 1462, 62, 2704, 2093, 796, 284, 62, 76, 5406, 42725, 198, 220, 220, 220, 44804, 684, 2395, 2611, 62, 1462, 62, 11600, 796, 284, 62, 11600, 62, 15952, 2611, 198 ]
2.247398
2,979
from src import log from src.summary.base import BaseSummary if __name__ == "__main__": import json with open('json/C_TemplateMatchingSummary.json') as f: _dict = json.load(f) dicts = _dict['metadata'][0]['value'] summary = TriggerSummary() should_be_reset = summary.should_be_reset(dicts) log.print(should_be_reset) if should_be_reset: summary.reset() summary.set(dicts) trigger = summary.get_trigger() log.print(trigger) end = summary.get_end() log.print(end) metadata = summary.get_metadata() log.print(metadata) summary.stack()
[ 6738, 12351, 1330, 2604, 198, 6738, 12351, 13, 49736, 13, 8692, 1330, 7308, 22093, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 33918, 198, 220, 220, 220, 351, 1280, 10786, 17752, 14, 34, 62, 30800, 44, 19775, 22093, 13, 17752, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 11600, 796, 33918, 13, 2220, 7, 69, 8, 198, 220, 220, 220, 8633, 82, 796, 4808, 11600, 17816, 38993, 6, 7131, 15, 7131, 6, 8367, 20520, 628, 220, 220, 220, 10638, 796, 24593, 22093, 3419, 198, 220, 220, 220, 815, 62, 1350, 62, 42503, 796, 10638, 13, 21754, 62, 1350, 62, 42503, 7, 11600, 82, 8, 198, 220, 220, 220, 2604, 13, 4798, 7, 21754, 62, 1350, 62, 42503, 8, 198, 220, 220, 220, 611, 815, 62, 1350, 62, 42503, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10638, 13, 42503, 3419, 628, 220, 220, 220, 10638, 13, 2617, 7, 11600, 82, 8, 628, 220, 220, 220, 7616, 796, 10638, 13, 1136, 62, 46284, 3419, 198, 220, 220, 220, 2604, 13, 4798, 7, 46284, 8, 628, 220, 220, 220, 886, 796, 10638, 13, 1136, 62, 437, 3419, 198, 220, 220, 220, 2604, 13, 4798, 7, 437, 8, 628, 220, 220, 220, 20150, 796, 10638, 13, 1136, 62, 38993, 3419, 198, 220, 220, 220, 2604, 13, 4798, 7, 38993, 8, 628, 220, 220, 220, 10638, 13, 25558, 3419, 198 ]
2.549587
242
#LICENCE : http://www.apache.org/licenses/LICENSE-2.0 #CREATOR BY : PRANKBOT #MOD BY ACIL __all__ = ['fastbinary', 'TBase', 'TBinaryProtocol', 'TCompactProtocol', 'TJSONProtocol', 'TProtocol']
[ 2, 43, 2149, 18310, 1058, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 43387, 25633, 11050, 1058, 4810, 15154, 33, 2394, 198, 2, 33365, 11050, 7125, 4146, 198, 834, 439, 834, 796, 37250, 7217, 39491, 3256, 705, 51, 14881, 3256, 705, 22737, 3219, 19703, 4668, 3256, 705, 4825, 3361, 529, 19703, 4668, 3256, 705, 51, 40386, 19703, 4668, 3256, 705, 51, 19703, 4668, 20520, 198 ]
2.468354
79
#!/usr/bin/env python # md5: a2cb6a826f222fa843ab488ae8a2de22 # coding: utf-8 import json
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 45243, 20, 25, 257, 17, 21101, 21, 64, 23, 2075, 69, 23148, 13331, 23, 3559, 397, 33646, 3609, 23, 64, 17, 2934, 1828, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 33918, 628 ]
2
46
import turtle from turtle import Turtle, Screen a = turtle.Turtle() screen = Screen() a.shape('turtle') print('Welcome to sketch n draw') print('select your color 1 and 2') color_1 = (input('color 1: ')) color_2 = (input('color 2: ')) print('ok! your colors are ' + color_1 + (' and ') + color_2) print("changed pad's color according to the requirments") a.color(color_1, color_2) print('So now you can proceed to draw') while 1 == 1: x = (input('enter command: ')) if x == ('For()'): y = int(input('enter the distance: ')) a.forward(y) if x == ('size-pen()'): z = int(input('enter new pensize: ')) a.pensize(z) if x == ('Bac()'): o = int(input('select distance: ')) a.backward(o) if x == ('dir;dig()'): ol = int(input('enter degrees: ')) olv = input('enter direction: ') if olv == ('right'): a.right(ol) if olv == ('left'): a.left(ol) if x == ('set-cor()'): color_1 = (input('color 1: ')) color_2 = (input('color 2: ')) a.color(color_1, color_2) if x == ('"'): import sys sys.exit() if x == ('on-mouse'): print('sketch with mouse enabled, now you can not use any other function') main()
[ 11748, 28699, 201, 198, 6738, 28699, 1330, 33137, 11, 15216, 201, 198, 64, 796, 28699, 13, 51, 17964, 3419, 201, 198, 9612, 796, 15216, 3419, 201, 198, 64, 13, 43358, 10786, 83, 17964, 11537, 201, 198, 4798, 10786, 14618, 284, 17548, 299, 3197, 11537, 201, 198, 4798, 10786, 19738, 534, 3124, 352, 290, 362, 11537, 201, 198, 8043, 62, 16, 796, 357, 15414, 10786, 8043, 352, 25, 705, 4008, 201, 198, 8043, 62, 17, 796, 357, 15414, 10786, 8043, 362, 25, 705, 4008, 201, 198, 4798, 10786, 482, 0, 534, 7577, 389, 705, 1343, 3124, 62, 16, 1343, 19203, 290, 705, 8, 1343, 3124, 62, 17, 8, 201, 198, 4798, 7203, 40985, 14841, 338, 3124, 1864, 284, 262, 1038, 343, 902, 4943, 201, 198, 64, 13, 8043, 7, 8043, 62, 16, 11, 3124, 62, 17, 8, 201, 198, 4798, 10786, 2396, 783, 345, 460, 5120, 284, 3197, 11537, 201, 198, 4514, 352, 6624, 352, 25, 201, 198, 220, 220, 220, 2124, 796, 357, 15414, 10786, 9255, 3141, 25, 705, 4008, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 1890, 3419, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 493, 7, 15414, 10786, 9255, 262, 5253, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 257, 13, 11813, 7, 88, 8, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 7857, 12, 3617, 3419, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 796, 493, 7, 15414, 10786, 9255, 649, 29707, 1096, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 257, 13, 79, 641, 1096, 7, 89, 8, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 33, 330, 3419, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 267, 796, 493, 7, 15414, 10786, 19738, 5253, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 257, 13, 1891, 904, 7, 78, 8, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 15908, 26, 12894, 3419, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 25776, 796, 493, 7, 15414, 10786, 9255, 7370, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 267, 6780, 796, 5128, 10786, 9255, 4571, 25, 705, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 267, 6780, 6624, 19203, 3506, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 13, 3506, 7, 349, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 267, 6780, 6624, 19203, 9464, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 13, 9464, 7, 349, 8, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 2617, 12, 10215, 3419, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3124, 62, 16, 796, 357, 15414, 10786, 8043, 352, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3124, 62, 17, 796, 357, 15414, 10786, 8043, 362, 25, 705, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 257, 13, 8043, 7, 8043, 62, 16, 11, 3124, 62, 17, 8, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 30543, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 25064, 201, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 3419, 201, 198, 220, 220, 220, 611, 2124, 6624, 19203, 261, 12, 35888, 6, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 82, 7126, 354, 351, 10211, 9343, 11, 783, 345, 460, 407, 779, 597, 584, 2163, 11537, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1388, 3419, 201, 198 ]
2.144481
616
import torch.distributed as dist from torch.utils.data import DataLoader from .data.transforms import make_albumentations from .factory import make_model from .hooks import DistSamplerSeedHook, IterTimerHook, LogBufferHook
[ 11748, 28034, 13, 17080, 6169, 355, 1233, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 764, 7890, 13, 7645, 23914, 1330, 787, 62, 282, 65, 1713, 602, 198, 6738, 764, 69, 9548, 1330, 787, 62, 19849, 198, 6738, 764, 25480, 82, 1330, 4307, 16305, 20053, 50, 2308, 39, 566, 11, 40806, 48801, 39, 566, 11, 5972, 28632, 39, 566, 628 ]
3.461538
65
import pytest import pybackend.urilib as U
[ 11748, 12972, 9288, 198, 198, 11748, 12972, 1891, 437, 13, 333, 22282, 355, 471, 628, 628 ]
2.9375
16
#! /usr/bin/env python # coding=utf-8 """ Example from the paper Rüde/Waluga/Wohlmuth 2013 """ __author__ = "Christian Waluga (waluga@ma.tum.de)" __copyright__ = "Copyright (c) 2013 %s" % __author__ from dolfin import * from energy_correction.correction import * from energy_correction.meshtools import * from energy_correction.singular import * from energy_correction.extrapolate import * import math set_log_level(ERROR) # convergence rates # boundary definition for error if __name__ == '__main__': # main program parameters["allow_extrapolation"] = True maxlevel = 7 # maximum level (this is where 'exact' solution is computed) compute = False # does the 'exact' solution need to be computed? gzip = True # gzip the 'exact' solution once computed and saved? correct = False # do we want energy-correction mesh_filename = 'meshes/slit-channel-crossed.xml.gz' cachedgamma = False # use cached values of gamma or recompute with method specified below? method = 'one-level-inexact' #method = 'two-level-inexact' # beyond the L-shape, we have to symmetrize if we want to use only one correction per corner. # (set to 2pi if the mesh is already symmetric at the corners) symmetrization_threshold = 2.0*pi output_weight = False # output the weighting function to VTK? # find reentrant corners mesh, corners, angles, corner_meshes \ = generate_corner_info(Mesh(mesh_filename), symmetrization_threshold) weight = WeightingFunction(corners, angles, 4.0) #plot(mesh); interactive() gammas_cached = [0.27914627419934601, 0.27914440403310525, 0.27916755164797358, 0.27912214602624991, 0.27908848023107002, 0.27915828177500074, 0.2791861111329178] if correct: if cachedgamma: print 'using cached gammas' gammas = gammas_cached else: print 'computing gammas' funcs = [ math.cos for c in corners ] # all Neumann gammas = extrapolate_gammas(corners, angles, corner_meshes, method = method, \ start_at = maxlevel, extrapolation = 'richardson', \ maxlevel = maxlevel+2, funcs = funcs)[0] else: gammas = [0.0 for i in range(len(corners))] print 'gammas =', gammas # generate series of refined meshes print 'generating meshes' meshes = [ mesh ] for i in xrange(maxlevel): meshes.append(refine(meshes[-1])) if output_weight: File('output/weight.pvd') << interpolate(weight, FunctionSpace(meshes[3], 'Lagrange', 1)) filename = 'output/uh_fine_{0}'.format(maxlevel) if compute: print 'computing fine solution' if not correct: print 'warning: computing fine solution without correction' uh_fine = solve_problem(meshes[-1], corners, gammas) File(filename + '.xml') << uh_fine File(filename + '.pvd') << uh_fine if gzip: from subprocess import call call(['gzip', '-f', filename + '.xml']) else: print 'loading fine solution' V_fine = FunctionSpace(meshes[-1], 'Lagrange', 1) uh_fine = Function(V_fine, filename + '.xml.gz' if gzip else '') errors = [] print 'solving' # perform a convergence study for i, mesh in enumerate(meshes[:-2]): uh = solve_problem(mesh, corners, gammas) intorder, intmesh = 1, meshes[i+2] U = project(uh_fine, FunctionSpace(intmesh, 'Lagrange', intorder)) File('output/uh-{0}.pvd'.format(i)) << uh right_boundary = RightBoundary() boundaries = FacetFunction("size_t", intmesh) boundaries.set_all(0) right_boundary.mark(boundaries, 1) dG = Measure("ds")[boundaries] #h = CellSize(mesh) h = Constant(mesh.hmin()) # compute errors between current level and highest level solutions err1 = sqrt(assemble((uh - U)**2*dx, mesh = intmesh)) err2 = sqrt(assemble(weight*(uh - U)**2*dx, mesh = intmesh)) #err2 = sqrt(assemble(h*(Dn(uh) - Dn(U))**2*dG(1), mesh = intmesh)) errors.append((err1, err2)) print_rates(errors)
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 16281, 422, 262, 3348, 371, 9116, 2934, 14, 21902, 30302, 14, 54, 48988, 76, 1071, 2211, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 20298, 6445, 30302, 357, 16783, 30302, 31, 2611, 13, 83, 388, 13, 2934, 16725, 198, 834, 22163, 4766, 834, 796, 366, 15269, 357, 66, 8, 2211, 4064, 82, 1, 4064, 11593, 9800, 834, 628, 198, 6738, 288, 4024, 259, 1330, 1635, 198, 6738, 2568, 62, 10215, 8243, 13, 10215, 8243, 1330, 1635, 198, 6738, 2568, 62, 10215, 8243, 13, 6880, 4352, 10141, 1330, 1635, 198, 6738, 2568, 62, 10215, 8243, 13, 12215, 934, 1330, 1635, 198, 6738, 2568, 62, 10215, 8243, 13, 2302, 2416, 27976, 1330, 1635, 198, 11748, 10688, 198, 198, 2617, 62, 6404, 62, 5715, 7, 24908, 8, 628, 198, 198, 2, 40826, 3965, 628, 198, 2, 18645, 6770, 329, 4049, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 1303, 1388, 1430, 198, 220, 10007, 14692, 12154, 62, 2302, 2416, 21417, 8973, 796, 6407, 628, 220, 3509, 5715, 796, 767, 220, 220, 220, 1303, 5415, 1241, 357, 5661, 318, 810, 705, 1069, 529, 6, 4610, 318, 29231, 8, 198, 220, 24061, 796, 10352, 220, 1303, 857, 262, 705, 1069, 529, 6, 4610, 761, 284, 307, 29231, 30, 198, 220, 308, 13344, 796, 6407, 220, 220, 220, 220, 1303, 308, 13344, 262, 705, 1069, 529, 6, 4610, 1752, 29231, 290, 7448, 30, 198, 220, 3376, 796, 10352, 220, 1303, 466, 356, 765, 2568, 12, 10215, 8243, 198, 220, 220, 198, 220, 19609, 62, 34345, 796, 705, 6880, 956, 14, 6649, 270, 12, 17620, 12, 19692, 276, 13, 19875, 13, 34586, 6, 198, 220, 220, 198, 220, 39986, 28483, 2611, 796, 10352, 1303, 779, 39986, 3815, 286, 34236, 393, 48765, 1133, 351, 2446, 7368, 2174, 30, 198, 220, 2446, 796, 705, 505, 12, 5715, 12, 500, 87, 529, 6, 198, 220, 1303, 24396, 796, 705, 11545, 12, 5715, 12, 500, 87, 529, 6, 628, 220, 1303, 3675, 262, 406, 12, 43358, 11, 356, 423, 284, 23606, 316, 380, 2736, 611, 356, 765, 284, 779, 691, 530, 17137, 583, 5228, 13, 198, 220, 1303, 357, 2617, 284, 362, 14415, 611, 262, 19609, 318, 1541, 23606, 19482, 379, 262, 14371, 8, 198, 220, 23606, 316, 47847, 341, 62, 400, 10126, 796, 362, 13, 15, 9, 14415, 198, 220, 220, 198, 220, 5072, 62, 6551, 796, 10352, 1303, 5072, 262, 3463, 278, 2163, 284, 32751, 42, 30, 628, 220, 1303, 1064, 302, 298, 5250, 14371, 198, 220, 19609, 11, 14371, 11, 18333, 11, 5228, 62, 6880, 956, 3467, 198, 220, 220, 220, 796, 7716, 62, 10215, 1008, 62, 10951, 7, 37031, 7, 76, 5069, 62, 34345, 828, 23606, 316, 47847, 341, 62, 400, 10126, 8, 628, 220, 3463, 796, 14331, 278, 22203, 7, 20772, 364, 11, 18333, 11, 604, 13, 15, 8, 628, 220, 1303, 29487, 7, 76, 5069, 1776, 14333, 3419, 198, 220, 220, 198, 220, 9106, 5356, 62, 66, 2317, 796, 685, 15, 13, 26050, 20964, 28857, 19104, 30557, 486, 11, 657, 13, 26050, 18444, 1821, 1821, 2091, 13348, 1495, 11, 657, 13, 26050, 1433, 38172, 1433, 2857, 5607, 31128, 11, 657, 13, 26050, 18376, 1415, 1899, 2075, 1731, 2079, 16, 11, 657, 13, 26050, 2919, 5705, 1795, 1954, 940, 9879, 17, 11, 657, 13, 26050, 21273, 2078, 1558, 2425, 830, 4524, 11, 657, 13, 26050, 25096, 1157, 16616, 1959, 23188, 60, 628, 220, 611, 3376, 25, 198, 220, 220, 220, 611, 39986, 28483, 2611, 25, 198, 220, 220, 220, 220, 220, 3601, 705, 3500, 39986, 9106, 5356, 6, 198, 220, 220, 220, 220, 220, 9106, 5356, 796, 9106, 5356, 62, 66, 2317, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 3601, 705, 785, 48074, 9106, 5356, 6, 198, 220, 220, 220, 220, 220, 1257, 6359, 796, 685, 10688, 13, 6966, 329, 269, 287, 14371, 2361, 1303, 477, 3169, 40062, 198, 220, 220, 220, 220, 220, 9106, 5356, 796, 36804, 27976, 62, 28483, 5356, 7, 20772, 364, 11, 18333, 11, 5228, 62, 6880, 956, 11, 2446, 796, 2446, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 265, 796, 3509, 5715, 11, 36804, 21417, 796, 705, 7527, 1371, 261, 3256, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 5715, 796, 3509, 5715, 10, 17, 11, 1257, 6359, 796, 1257, 6359, 38381, 15, 60, 198, 220, 2073, 25, 198, 220, 220, 220, 9106, 5356, 796, 685, 15, 13, 15, 329, 1312, 287, 2837, 7, 11925, 7, 20772, 364, 4008, 60, 198, 220, 3601, 705, 28483, 5356, 796, 3256, 9106, 5356, 628, 220, 1303, 7716, 2168, 286, 20449, 48754, 198, 220, 3601, 705, 8612, 803, 48754, 6, 198, 220, 48754, 796, 685, 19609, 2361, 198, 220, 329, 1312, 287, 2124, 9521, 7, 9806, 5715, 2599, 198, 220, 220, 220, 48754, 13, 33295, 7, 5420, 500, 7, 6880, 956, 58, 12, 16, 60, 4008, 628, 220, 611, 5072, 62, 6551, 25, 198, 220, 220, 220, 9220, 10786, 22915, 14, 6551, 13, 79, 20306, 11537, 9959, 39555, 378, 7, 6551, 11, 15553, 14106, 7, 6880, 956, 58, 18, 4357, 705, 43, 363, 9521, 3256, 352, 4008, 628, 220, 29472, 796, 705, 22915, 14, 7456, 62, 38125, 23330, 15, 92, 4458, 18982, 7, 9806, 5715, 8, 198, 220, 611, 24061, 25, 198, 220, 220, 220, 3601, 705, 785, 48074, 3734, 4610, 6, 198, 220, 220, 220, 611, 407, 3376, 25, 3601, 705, 43917, 25, 14492, 3734, 4610, 1231, 17137, 6, 198, 220, 220, 220, 21480, 62, 38125, 796, 8494, 62, 45573, 7, 6880, 956, 58, 12, 16, 4357, 14371, 11, 9106, 5356, 8, 198, 220, 220, 220, 9220, 7, 34345, 1343, 45302, 19875, 11537, 9959, 21480, 62, 38125, 198, 220, 220, 220, 9220, 7, 34345, 1343, 45302, 79, 20306, 11537, 9959, 21480, 62, 38125, 198, 220, 220, 220, 611, 308, 13344, 25, 198, 220, 220, 220, 220, 220, 422, 850, 14681, 1330, 869, 198, 220, 220, 220, 220, 220, 869, 7, 17816, 70, 13344, 3256, 705, 12, 69, 3256, 29472, 1343, 45302, 19875, 6, 12962, 198, 220, 2073, 25, 198, 220, 220, 220, 3601, 705, 25138, 3734, 4610, 6, 198, 220, 220, 220, 569, 62, 38125, 796, 15553, 14106, 7, 6880, 956, 58, 12, 16, 4357, 705, 43, 363, 9521, 3256, 352, 8, 198, 220, 220, 220, 21480, 62, 38125, 796, 15553, 7, 53, 62, 38125, 11, 29472, 1343, 45302, 19875, 13, 34586, 6, 611, 308, 13344, 2073, 10148, 8, 628, 220, 8563, 796, 17635, 628, 220, 3601, 705, 82, 10890, 6, 628, 220, 1303, 1620, 257, 40826, 2050, 198, 220, 329, 1312, 11, 19609, 287, 27056, 378, 7, 6880, 956, 58, 21912, 17, 60, 2599, 628, 220, 220, 220, 21480, 796, 8494, 62, 45573, 7, 76, 5069, 11, 14371, 11, 9106, 5356, 8, 198, 220, 220, 220, 493, 2875, 11, 493, 76, 5069, 796, 352, 11, 48754, 58, 72, 10, 17, 60, 198, 220, 220, 220, 471, 796, 1628, 7, 7456, 62, 38125, 11, 15553, 14106, 7, 600, 76, 5069, 11, 705, 43, 363, 9521, 3256, 493, 2875, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 9220, 10786, 22915, 14, 7456, 12, 90, 15, 27422, 79, 20306, 4458, 18982, 7, 72, 4008, 9959, 21480, 198, 220, 220, 220, 220, 198, 220, 220, 220, 826, 62, 7784, 560, 796, 6498, 49646, 560, 3419, 198, 220, 220, 220, 13215, 796, 13585, 316, 22203, 7203, 7857, 62, 83, 1600, 493, 76, 5069, 8, 198, 220, 220, 220, 13215, 13, 2617, 62, 439, 7, 15, 8, 198, 220, 220, 220, 826, 62, 7784, 560, 13, 4102, 7, 7784, 3166, 11, 352, 8, 198, 220, 220, 220, 288, 38, 796, 24291, 7203, 9310, 4943, 58, 7784, 3166, 60, 628, 220, 220, 220, 1303, 71, 796, 12440, 10699, 7, 76, 5069, 8, 198, 220, 220, 220, 289, 796, 20217, 7, 76, 5069, 13, 71, 1084, 28955, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 24061, 8563, 1022, 1459, 1241, 290, 4511, 1241, 8136, 198, 220, 220, 220, 11454, 16, 796, 19862, 17034, 7, 292, 15140, 19510, 7456, 532, 471, 8, 1174, 17, 9, 34350, 11, 19609, 796, 493, 76, 5069, 4008, 198, 220, 220, 220, 11454, 17, 796, 19862, 17034, 7, 292, 15140, 7, 6551, 9, 7, 7456, 532, 471, 8, 1174, 17, 9, 34350, 11, 19609, 796, 493, 76, 5069, 4008, 198, 220, 220, 220, 1303, 8056, 17, 796, 19862, 17034, 7, 292, 15140, 7, 71, 9, 7, 35, 77, 7, 7456, 8, 532, 360, 77, 7, 52, 4008, 1174, 17, 9, 67, 38, 7, 16, 828, 19609, 796, 493, 76, 5069, 4008, 198, 220, 220, 220, 8563, 13, 33295, 19510, 8056, 16, 11, 11454, 17, 4008, 198, 220, 220, 220, 3601, 62, 9700, 7, 48277, 8, 628 ]
2.629458
1,514
from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'http://www.wellesley.ca/council/councillors/?q=council/councillors'
[ 6738, 3384, 4487, 1330, 5398, 3351, 38545, 11, 5398, 15439, 355, 7755, 198, 11748, 302, 198, 198, 34, 2606, 7792, 4146, 62, 4537, 8264, 796, 705, 4023, 1378, 2503, 13, 4053, 49048, 13, 6888, 14, 66, 977, 2856, 14, 66, 977, 20346, 669, 20924, 80, 28, 66, 977, 2856, 14, 66, 977, 20346, 669, 6, 628, 198 ]
2.754386
57
""" ParallelCluster ParallelCluster API # noqa: E501 The version of the OpenAPI document: 3.0.0 Generated by: https://openapi-generator.tech """ import sys import unittest import pcluster.client from pcluster.client.model.change import Change from pcluster.client.model.config_validation_message import ConfigValidationMessage from pcluster.client.model.update_error import UpdateError globals()['Change'] = Change globals()['ConfigValidationMessage'] = ConfigValidationMessage globals()['UpdateError'] = UpdateError from pcluster.client.model.update_cluster_bad_request_exception_response_content import UpdateClusterBadRequestExceptionResponseContent class TestUpdateClusterBadRequestExceptionResponseContent(unittest.TestCase): """UpdateClusterBadRequestExceptionResponseContent unit test stubs""" def testUpdateClusterBadRequestExceptionResponseContent(self): """Test UpdateClusterBadRequestExceptionResponseContent""" # FIXME: construct object with mandatory attributes with example values # model = UpdateClusterBadRequestExceptionResponseContent() # noqa: E501 pass if __name__ == '__main__': unittest.main()
[ 37811, 198, 220, 220, 220, 42945, 2601, 5819, 628, 220, 220, 220, 42945, 2601, 5819, 7824, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 3188, 25, 513, 13, 15, 13, 15, 198, 220, 220, 220, 2980, 515, 416, 25, 3740, 1378, 9654, 15042, 12, 8612, 1352, 13, 13670, 198, 37811, 628, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 11748, 279, 565, 5819, 13, 16366, 198, 6738, 279, 565, 5819, 13, 16366, 13, 19849, 13, 3803, 1330, 9794, 198, 6738, 279, 565, 5819, 13, 16366, 13, 19849, 13, 11250, 62, 12102, 341, 62, 20500, 1330, 17056, 7762, 24765, 12837, 198, 6738, 279, 565, 5819, 13, 16366, 13, 19849, 13, 19119, 62, 18224, 1330, 10133, 12331, 198, 4743, 672, 874, 3419, 17816, 19400, 20520, 796, 9794, 198, 4743, 672, 874, 3419, 17816, 16934, 7762, 24765, 12837, 20520, 796, 17056, 7762, 24765, 12837, 198, 4743, 672, 874, 3419, 17816, 10260, 12331, 20520, 796, 10133, 12331, 198, 6738, 279, 565, 5819, 13, 16366, 13, 19849, 13, 19119, 62, 565, 5819, 62, 14774, 62, 25927, 62, 1069, 4516, 62, 26209, 62, 11299, 1330, 10133, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 628, 198, 4871, 6208, 10260, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 10260, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 4326, 1332, 17071, 82, 37811, 628, 220, 220, 220, 825, 1332, 10260, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 10133, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 44855, 11682, 25, 5678, 2134, 351, 13677, 12608, 351, 1672, 3815, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2746, 796, 10133, 2601, 5819, 22069, 18453, 16922, 31077, 19746, 3419, 220, 1303, 645, 20402, 25, 412, 33548, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3.384615
351
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative works of this code must retain this # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. # This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # pylint: disable=no-value-for-parameter, invalid-name, import-error """Pulse DE solver for problems in qutip format.""" import numpy as np from scipy.integrate import ode from scipy.integrate._ode import zvode # pylint: disable=no-name-in-module from .pulse_utils import td_ode_rhs_static def construct_pulse_zvode_solver(exp, op_system): """ Constructs a scipy ODE solver for a given exp and op_system Parameters: exp (dict): dict containing experimental op_system (PulseSimDescription): container for simulation information Returns: ode: scipy ode """ # extract relevant data from op_system global_data = op_system.global_data ode_options = op_system.ode_options channels = dict(op_system.channels) # Init register register = np.ones(global_data['n_registers'], dtype=np.uint8) ODE = ode(td_ode_rhs_static) ODE.set_f_params(global_data, exp, op_system.system, channels, register) ODE._integrator = qiskit_zvode(method=ode_options.method, order=ode_options.order, atol=ode_options.atol, rtol=ode_options.rtol, nsteps=ode_options.nsteps, first_step=ode_options.first_step, min_step=ode_options.min_step, max_step=ode_options.max_step ) # Forces complex ODE solving if not ODE._y: ODE.t = 0.0 ODE._y = np.array([0.0], complex) ODE._integrator.reset(len(ODE._y), ODE.jac is not None) # Since all experiments are defined to start at zero time. ODE.set_initial_value(global_data['initial_state'], 0) return ODE class qiskit_zvode(zvode): """Modifies the stepper for ZVODE so that it always stops at a given time in tlist; by default, it over shoots the time. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2864, 11, 13130, 11, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 4866, 286, 428, 5964, 287, 262, 38559, 24290, 13, 14116, 2393, 287, 262, 6808, 8619, 198, 2, 286, 428, 2723, 5509, 393, 379, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 13, 198, 2, 198, 2, 4377, 19008, 393, 27255, 2499, 286, 428, 2438, 1276, 12377, 428, 198, 2, 6634, 4003, 11, 290, 9518, 3696, 761, 284, 3283, 257, 4003, 12739, 198, 2, 326, 484, 423, 587, 14294, 422, 262, 47324, 13, 198, 198, 2, 770, 2393, 318, 636, 286, 2264, 40533, 47, 25, 29082, 16984, 3524, 287, 11361, 13, 198, 2, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 2813, 290, 1568, 11, 3362, 360, 13, 8741, 290, 5199, 449, 13, 16053, 44038, 13, 198, 2, 220, 220, 220, 1439, 2489, 10395, 13, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 8367, 12, 1640, 12, 17143, 2357, 11, 12515, 12, 3672, 11, 1330, 12, 18224, 198, 198, 37811, 47, 9615, 5550, 1540, 332, 329, 2761, 287, 10662, 315, 541, 5794, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 267, 2934, 198, 6738, 629, 541, 88, 13, 18908, 4873, 13557, 1098, 1330, 1976, 85, 1098, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 3672, 12, 259, 12, 21412, 198, 6738, 764, 79, 9615, 62, 26791, 1330, 41560, 62, 1098, 62, 81, 11994, 62, 12708, 628, 198, 4299, 5678, 62, 79, 9615, 62, 89, 85, 1098, 62, 82, 14375, 7, 11201, 11, 1034, 62, 10057, 2599, 198, 220, 220, 220, 37227, 28407, 82, 257, 629, 541, 88, 440, 7206, 1540, 332, 329, 257, 1813, 1033, 290, 1034, 62, 10057, 628, 220, 220, 220, 40117, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 357, 11600, 2599, 8633, 7268, 11992, 198, 220, 220, 220, 220, 220, 220, 220, 1034, 62, 10057, 357, 47, 9615, 8890, 11828, 2599, 9290, 329, 18640, 1321, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 267, 2934, 25, 629, 541, 88, 267, 2934, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 7925, 5981, 1366, 422, 1034, 62, 10057, 198, 220, 220, 220, 3298, 62, 7890, 796, 1034, 62, 10057, 13, 20541, 62, 7890, 198, 220, 220, 220, 267, 2934, 62, 25811, 796, 1034, 62, 10057, 13, 1098, 62, 25811, 198, 220, 220, 220, 9619, 796, 8633, 7, 404, 62, 10057, 13, 354, 8961, 8, 628, 220, 220, 220, 1303, 44707, 7881, 198, 220, 220, 220, 7881, 796, 45941, 13, 1952, 7, 20541, 62, 7890, 17816, 77, 62, 2301, 6223, 6, 4357, 288, 4906, 28, 37659, 13, 28611, 23, 8, 628, 220, 220, 220, 440, 7206, 796, 267, 2934, 7, 8671, 62, 1098, 62, 81, 11994, 62, 12708, 8, 628, 220, 220, 220, 440, 7206, 13, 2617, 62, 69, 62, 37266, 7, 20541, 62, 7890, 11, 1033, 11, 1034, 62, 10057, 13, 10057, 11, 9619, 11, 7881, 8, 628, 220, 220, 220, 440, 7206, 13557, 18908, 12392, 796, 10662, 1984, 270, 62, 89, 85, 1098, 7, 24396, 28, 1098, 62, 25811, 13, 24396, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1502, 28, 1098, 62, 25811, 13, 2875, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 1098, 62, 25811, 13, 265, 349, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 83, 349, 28, 1098, 62, 25811, 13, 17034, 349, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 28, 1098, 62, 25811, 13, 77, 20214, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 717, 62, 9662, 28, 1098, 62, 25811, 13, 11085, 62, 9662, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 62, 9662, 28, 1098, 62, 25811, 13, 1084, 62, 9662, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 9662, 28, 1098, 62, 25811, 13, 9806, 62, 9662, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 1303, 12700, 3716, 440, 7206, 18120, 198, 220, 220, 220, 611, 407, 440, 7206, 13557, 88, 25, 198, 220, 220, 220, 220, 220, 220, 220, 440, 7206, 13, 83, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 440, 7206, 13557, 88, 796, 45941, 13, 18747, 26933, 15, 13, 15, 4357, 3716, 8, 198, 220, 220, 220, 440, 7206, 13557, 18908, 12392, 13, 42503, 7, 11925, 7, 16820, 13557, 88, 828, 440, 7206, 13, 30482, 318, 407, 6045, 8, 628, 220, 220, 220, 1303, 4619, 477, 10256, 389, 5447, 284, 923, 379, 6632, 640, 13, 198, 220, 220, 220, 440, 7206, 13, 2617, 62, 36733, 62, 8367, 7, 20541, 62, 7890, 17816, 36733, 62, 5219, 6, 4357, 657, 8, 628, 220, 220, 220, 1441, 440, 7206, 628, 198, 4871, 10662, 1984, 270, 62, 89, 85, 1098, 7, 89, 85, 1098, 2599, 198, 220, 220, 220, 37227, 5841, 6945, 262, 2876, 2848, 329, 1168, 53, 16820, 523, 326, 198, 220, 220, 220, 340, 1464, 9911, 379, 257, 1813, 640, 287, 256, 4868, 26, 198, 220, 220, 220, 416, 4277, 11, 340, 625, 20611, 262, 640, 13, 198, 220, 220, 220, 37227, 198 ]
2.34331
1,136
from RPLCD import CharLCD import RPi.GPIO as GPIO lcd = CharLCD(numbering_mode=GPIO.BOARD, cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23]) lcd.write_string(u'Hello World')
[ 6738, 25812, 5639, 35, 1330, 3178, 5639, 35, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 75, 10210, 796, 3178, 5639, 35, 7, 17618, 278, 62, 14171, 28, 16960, 9399, 13, 8202, 9795, 11, 951, 82, 28, 1433, 11, 15274, 28, 17, 11, 6757, 62, 3808, 28, 2718, 11, 6757, 62, 68, 28, 2327, 11, 20567, 62, 7890, 41888, 2091, 11, 3261, 11, 2808, 11, 2242, 12962, 198, 75, 10210, 13, 13564, 62, 8841, 7, 84, 6, 15496, 2159, 11537, 198 ]
2.289157
83
"""Tests for the IPTT Report Data Indicators (TP/TVA) to ensure their query counts stay O(n) and not O(n^2) - api_report_data takes program_pk and frequency, calls IPTT<TVA/TP>ReportIndicatorSerializer.load_report - IPTT<TVA/TP>ReportIndicatorSerializer.load_report takes program_pk and frequency - queries for program data (start/end dates) - queries for disaggregations data ?? - calls IPTTIndicator.tva/timperiods - IPTTIndicator - get queryset adds prefetch - with_annotations adds lop_target lop_actual, lop_percent_met, and old_level if necessary - with_disaggaggregation_annotations takes disaggregation_category_pks and adds lop_actual for each - with_frequency_annotations takes freq, start, end, and disaggregation_category_pks and adds frequency_disaggregation_actual for each disaggregation and overall frequency actual (if TVA also adds overall frequency target and percent met) """ from django import test from indicators.models import Indicator, PeriodicTarget from indicators.queries.iptt_queries import IPTTIndicator from factories import ( indicators_models as i_factories, workflow_models as w_factories ) QUERIES_PREFETCH = 8 QUERIES_FREQUENCIES = QUERIES_PREFETCH + 0 QUERIES_DISAGG_FREQUENCIES = QUERIES_FREQUENCIES + 0 TP_QUERYSET = IPTTIndicator.timeperiods TVA_QUERYSET = IPTTIndicator.tva
[ 37811, 51, 3558, 329, 262, 6101, 15751, 6358, 6060, 1423, 44549, 357, 7250, 14, 6849, 32, 8, 284, 4155, 511, 12405, 9853, 2652, 440, 7, 77, 8, 290, 407, 440, 7, 77, 61, 17, 8, 628, 220, 220, 220, 532, 40391, 62, 13116, 62, 7890, 2753, 1430, 62, 79, 74, 290, 8373, 11, 3848, 6101, 15751, 27, 6849, 32, 14, 7250, 29, 19100, 5497, 26407, 32634, 7509, 13, 2220, 62, 13116, 198, 220, 220, 220, 532, 6101, 15751, 27, 6849, 32, 14, 7250, 29, 19100, 5497, 26407, 32634, 7509, 13, 2220, 62, 13116, 2753, 1430, 62, 79, 74, 290, 8373, 198, 220, 220, 220, 220, 220, 220, 220, 532, 20743, 329, 1430, 1366, 357, 9688, 14, 437, 9667, 8, 198, 220, 220, 220, 220, 220, 220, 220, 532, 20743, 329, 7969, 9903, 602, 1366, 19153, 198, 220, 220, 220, 220, 220, 220, 220, 532, 3848, 6101, 15751, 5497, 26407, 13, 83, 6862, 14, 16514, 41007, 82, 198, 220, 220, 220, 532, 6101, 15751, 5497, 26407, 198, 220, 220, 220, 220, 220, 220, 220, 532, 651, 42517, 893, 316, 6673, 7694, 7569, 198, 220, 220, 220, 220, 220, 220, 220, 532, 351, 62, 34574, 602, 6673, 300, 404, 62, 16793, 300, 404, 62, 50039, 11, 300, 404, 62, 25067, 62, 4164, 11, 290, 1468, 62, 5715, 611, 3306, 198, 220, 220, 220, 220, 220, 220, 220, 532, 351, 62, 6381, 9460, 9460, 43068, 62, 34574, 602, 2753, 7969, 17097, 62, 22872, 62, 79, 591, 290, 6673, 300, 404, 62, 50039, 329, 1123, 198, 220, 220, 220, 220, 220, 220, 220, 532, 351, 62, 35324, 62, 34574, 602, 2753, 2030, 80, 11, 923, 11, 886, 11, 290, 7969, 17097, 62, 22872, 62, 79, 591, 290, 6673, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8373, 62, 6381, 9460, 43068, 62, 50039, 329, 1123, 7969, 17097, 290, 4045, 8373, 4036, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 361, 3195, 32, 635, 6673, 4045, 8373, 2496, 290, 1411, 1138, 8, 198, 198, 37811, 198, 198, 6738, 42625, 14208, 1330, 1332, 198, 198, 6738, 21337, 13, 27530, 1330, 1423, 26407, 11, 18581, 291, 21745, 198, 6738, 21337, 13, 421, 10640, 13, 10257, 83, 62, 421, 10640, 1330, 6101, 15751, 5497, 26407, 198, 6738, 17590, 1330, 357, 198, 220, 220, 220, 21337, 62, 27530, 355, 1312, 62, 22584, 1749, 11, 198, 220, 220, 220, 30798, 62, 27530, 355, 266, 62, 22584, 1749, 198, 8, 198, 198, 10917, 1137, 11015, 62, 47, 31688, 2767, 3398, 796, 807, 198, 198, 10917, 1137, 11015, 62, 37, 2200, 10917, 24181, 11015, 796, 19604, 1137, 11015, 62, 47, 31688, 2767, 3398, 1343, 657, 198, 198, 10917, 1137, 11015, 62, 26288, 4760, 38, 62, 37, 2200, 10917, 24181, 11015, 796, 19604, 1137, 11015, 62, 37, 2200, 10917, 24181, 11015, 1343, 657, 628, 198, 7250, 62, 10917, 1137, 16309, 2767, 796, 6101, 15751, 5497, 26407, 13, 2435, 41007, 82, 198, 6849, 32, 62, 10917, 1137, 16309, 2767, 796, 6101, 15751, 5497, 26407, 13, 83, 6862, 628 ]
2.833002
503
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.core.validators import MaxValueValidator from imagekit.models import ProcessedImageField from imagekit.processors import ResizeToFill from home.models import ModelAbstract, Song class Profile(ModelAbstract): """ A user's profile. Data like profile picture/banner is stored here, but also anything else that should probably be extending the default User model. It takes hard work to set a custom User model once you've already started a project, and most of the things I want would fit nicely in a model like this anyways. """ user = models.OneToOneField(User, on_delete=models.CASCADE) avatar = ProcessedImageField( upload_to='avatars', default='avatars/placeholder.png', processors=[ResizeToFill(256, 256)], format="PNG" ) banner = ProcessedImageField( upload_to='banners', default='banners/placeholder.png', processors=[ResizeToFill(1300, 400)], format="PNG" ) # def get_recent_ratings(self, limit=20): # """ # Get the user's recently rated songs. # @limit: How many songs to get # """ # ratings = self.user.songlist.songrating_set.all() # songs = Song.objects.filter(songrating__in=ratings).values('video_link', 'anime__cover', 'pk').order_by( # '-songrating__last_modified')[:limit] # return songs def get_top_ratings(self, limit=20): """ Get the user's recently rated songs. Gets very little details, mainly just used for carousels. @limit: How many songs to get (default 20) """ # Grab all the user's ratings ratings = self.user.songlist.songrating_set.all() # Filter through the highest rated, and then most recently rated songs rated by the user. songs = Song.objects.filter(songrating__in=ratings).values('video_link', 'anime__cover', 'pk').order_by( '-songrating__rating', 'songrating__last_modified')[:limit] return songs def get_rated_songs(self, limit=None): """ Grab all songs that a User has rated. Used for the user's list. @limit: How many songs to get """ # Grab all the user's SongRatings, along with details about the song. ratings = SongRating.objects.filter(parent_list=self.user.songlist).values( 'song__anime__cover', 'song__anime__english_name', 'song__song_type', 'song__number', 'rating', 'song__video_link', 'song__pk').order_by( '-rating', '-last_modified' ) return ratings # On User creation, make a profile as well post_save.connect(create_profile, sender=User) class SongList(ModelAbstract): """ A user's list of songs """ user = models.OneToOneField(User, on_delete=models.CASCADE) # On User creation, make a profile as well post_save.connect(create_songlist, sender=User) class SongRating(ModelAbstract): """ How a user has rated a song in their list """ song = models.ForeignKey('home.Song', on_delete=models.CASCADE) parent_list = models.ForeignKey(SongList, on_delete=models.CASCADE) rating = models.PositiveIntegerField(null=True, blank=True, validators=[MaxValueValidator(10)])
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 198, 198, 6738, 2939, 15813, 13, 27530, 1330, 10854, 276, 5159, 15878, 198, 6738, 2939, 15813, 13, 14681, 669, 1330, 1874, 1096, 2514, 33762, 198, 198, 6738, 1363, 13, 27530, 1330, 9104, 23839, 11, 10940, 628, 198, 4871, 13118, 7, 17633, 23839, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 2836, 338, 7034, 13, 6060, 588, 7034, 4286, 14, 3820, 1008, 318, 8574, 994, 11, 198, 220, 220, 220, 475, 635, 1997, 2073, 326, 815, 2192, 307, 16610, 262, 198, 220, 220, 220, 4277, 11787, 2746, 13, 628, 220, 220, 220, 632, 2753, 1327, 670, 284, 900, 257, 2183, 11787, 2746, 1752, 345, 1053, 1541, 198, 220, 220, 220, 2067, 257, 1628, 11, 290, 749, 286, 262, 1243, 314, 765, 561, 198, 220, 220, 220, 4197, 16576, 287, 257, 2746, 588, 428, 32845, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2836, 796, 4981, 13, 3198, 2514, 3198, 15878, 7, 12982, 11, 319, 62, 33678, 28, 27530, 13, 34, 42643, 19266, 8, 198, 220, 220, 220, 30919, 796, 10854, 276, 5159, 15878, 7, 198, 220, 220, 220, 220, 220, 220, 220, 9516, 62, 1462, 11639, 615, 40193, 3256, 4277, 11639, 615, 40193, 14, 5372, 13829, 13, 11134, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 20399, 41888, 4965, 1096, 2514, 33762, 7, 11645, 11, 17759, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 5794, 2625, 47, 10503, 1, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 17625, 796, 10854, 276, 5159, 15878, 7, 198, 220, 220, 220, 220, 220, 220, 220, 9516, 62, 1462, 11639, 65, 15672, 3256, 4277, 11639, 65, 15672, 14, 5372, 13829, 13, 11134, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 20399, 41888, 4965, 1096, 2514, 33762, 7, 1485, 405, 11, 7337, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 5794, 2625, 47, 10503, 1, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1303, 825, 651, 62, 49921, 62, 10366, 654, 7, 944, 11, 4179, 28, 1238, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 3497, 262, 2836, 338, 2904, 13178, 7259, 13, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 2488, 32374, 25, 1374, 867, 7259, 284, 651, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 10109, 796, 2116, 13, 7220, 13, 34050, 4868, 13, 34050, 8821, 62, 2617, 13, 439, 3419, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 7259, 796, 10940, 13, 48205, 13, 24455, 7, 34050, 8821, 834, 259, 28, 10366, 654, 737, 27160, 10786, 15588, 62, 8726, 3256, 705, 272, 524, 834, 9631, 3256, 705, 79, 74, 27691, 2875, 62, 1525, 7, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 705, 12, 34050, 8821, 834, 12957, 62, 41771, 11537, 58, 25, 32374, 60, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 1441, 7259, 628, 220, 220, 220, 825, 651, 62, 4852, 62, 10366, 654, 7, 944, 11, 4179, 28, 1238, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 262, 2836, 338, 2904, 13178, 7259, 13, 628, 220, 220, 220, 220, 220, 220, 220, 29620, 845, 1310, 3307, 11, 8384, 655, 973, 329, 1097, 280, 14002, 13, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 32374, 25, 1374, 867, 7259, 284, 651, 357, 12286, 1160, 8, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 25339, 477, 262, 2836, 338, 10109, 198, 220, 220, 220, 220, 220, 220, 220, 10109, 796, 2116, 13, 7220, 13, 34050, 4868, 13, 34050, 8821, 62, 2617, 13, 439, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 25853, 832, 262, 4511, 13178, 11, 290, 788, 749, 2904, 13178, 7259, 13178, 416, 262, 2836, 13, 198, 220, 220, 220, 220, 220, 220, 220, 7259, 796, 10940, 13, 48205, 13, 24455, 7, 34050, 8821, 834, 259, 28, 10366, 654, 737, 27160, 10786, 15588, 62, 8726, 3256, 705, 272, 524, 834, 9631, 3256, 705, 79, 74, 27691, 2875, 62, 1525, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 12, 34050, 8821, 834, 8821, 3256, 705, 34050, 8821, 834, 12957, 62, 41771, 11537, 58, 25, 32374, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 7259, 628, 220, 220, 220, 825, 651, 62, 4111, 62, 82, 28079, 7, 944, 11, 4179, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 25339, 477, 7259, 326, 257, 11787, 468, 13178, 13, 198, 220, 220, 220, 220, 220, 220, 220, 16718, 329, 262, 2836, 338, 1351, 13, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 32374, 25, 1374, 867, 7259, 284, 651, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 25339, 477, 262, 2836, 338, 10940, 29665, 654, 11, 1863, 351, 3307, 546, 262, 3496, 13, 198, 220, 220, 220, 220, 220, 220, 220, 10109, 796, 10940, 29321, 13, 48205, 13, 24455, 7, 8000, 62, 4868, 28, 944, 13, 7220, 13, 34050, 4868, 737, 27160, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 34050, 834, 272, 524, 834, 9631, 3256, 705, 34050, 834, 272, 524, 834, 39126, 62, 3672, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 34050, 834, 34050, 62, 4906, 3256, 705, 34050, 834, 17618, 3256, 705, 8821, 3256, 705, 34050, 834, 15588, 62, 8726, 3256, 705, 34050, 834, 79, 74, 27691, 2875, 62, 1525, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 12, 8821, 3256, 705, 12, 12957, 62, 41771, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 10109, 628, 198, 2, 1550, 11787, 6282, 11, 787, 257, 7034, 355, 880, 628, 198, 7353, 62, 21928, 13, 8443, 7, 17953, 62, 13317, 11, 29788, 28, 12982, 8, 628, 198, 4871, 10940, 8053, 7, 17633, 23839, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 2836, 338, 1351, 286, 7259, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2836, 796, 4981, 13, 3198, 2514, 3198, 15878, 7, 12982, 11, 319, 62, 33678, 28, 27530, 13, 34, 42643, 19266, 8, 628, 198, 2, 1550, 11787, 6282, 11, 787, 257, 7034, 355, 880, 628, 198, 7353, 62, 21928, 13, 8443, 7, 17953, 62, 34050, 4868, 11, 29788, 28, 12982, 8, 628, 198, 4871, 10940, 29321, 7, 17633, 23839, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1374, 257, 2836, 468, 13178, 257, 3496, 287, 511, 1351, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 3496, 796, 4981, 13, 33616, 9218, 10786, 11195, 13, 44241, 3256, 319, 62, 33678, 28, 27530, 13, 34, 42643, 19266, 8, 198, 220, 220, 220, 2560, 62, 4868, 796, 4981, 13, 33616, 9218, 7, 44241, 8053, 11, 319, 62, 33678, 28, 27530, 13, 34, 42643, 19266, 8, 198, 220, 220, 220, 7955, 796, 4981, 13, 21604, 1800, 46541, 15878, 7, 8423, 28, 17821, 11, 9178, 28, 17821, 11, 4938, 2024, 41888, 11518, 11395, 47139, 1352, 7, 940, 8, 12962, 198 ]
2.669014
1,278
from motor.motor_asyncio import AsyncIOMotorClient db = Database()
[ 6738, 5584, 13, 76, 20965, 62, 292, 13361, 952, 1330, 1081, 13361, 40, 2662, 20965, 11792, 198, 198, 9945, 796, 24047, 3419 ]
3.045455
22
from shrinky.glsl_block import GlslBlock from shrinky.glsl_block import extract_tokens from shrinky.glsl_block_member import glsl_parse_member_list ######################################## # GlslBlockStruct ###################### ######################################## class GlslBlockStruct(GlslBlock): """Struct declaration.""" def __init__(self, type_name, members, name=None, size=0): """Constructor.""" GlslBlock.__init__(self) self.__type_name = type_name self.__members = members self.__name = name self.__size = size self.__member_accesses = [] # Hierarchy. name.setType(type_name) self.addNamesDeclared(name) self.addNamesUsed(name) def format(self, force): """Return formatted output.""" lst = "".join([x.format(force) for x in self.__members]) ret = ("struct %s{%s}" % (self.__type_name.format(force), lst, self.__name.format(force))) if self.__name: ret += self.__name.format(force) if self.__size: ret += "[%s]" % (self.__size.format(force)) return ret + ";" def getMembers(self): """Accessor.""" return self.__members def getMemberAccesses(self): """Accessor.""" return self.__member_accesses def getName(self): """Accessor.""" return self.__name def getTypeName(self): """Accessor.""" return self.__type_name def setMemberAccesses(self, lst): """Set collected member accesses.""" self.__member_accesses = lst def __str__(self): """String representation.""" return "Struct(%i)" % (len(self.__content)) ######################################## # Functions ############################ ######################################## def glsl_parse_struct(source): """Parse struct block.""" (type_name, scope, content) = extract_tokens(source, ("struct", "?n", "?{")) if not type_name: return (None, source) # Get potential name and size. (name, size, remaining) = extract_tokens(content, ("?n", "[", "?i", "]", ";")) if not name: size = None (name, remaining) = extract_tokens(content, ("?n", ";")) if not name: name = None (terminator, remaining) = extract_tokens(content, ("?;",)) if not terminator: return (None, source) # Parse members members = glsl_parse_member_list(scope) if not members: raise RuntimeError("empty member list for struct") return (GlslBlockStruct(type_name, members, name, size), remaining) def is_glsl_block_struct(op): """Tell if given object is GlslBlockInout.""" return isinstance(op, GlslBlockStruct)
[ 6738, 22085, 88, 13, 4743, 6649, 62, 9967, 1330, 2671, 6649, 12235, 198, 6738, 22085, 88, 13, 4743, 6649, 62, 9967, 1330, 7925, 62, 83, 482, 641, 198, 6738, 22085, 88, 13, 4743, 6649, 62, 9967, 62, 19522, 1330, 1278, 6649, 62, 29572, 62, 19522, 62, 4868, 198, 198, 29113, 7804, 198, 2, 2671, 6649, 12235, 44909, 1303, 14468, 4242, 2, 198, 29113, 7804, 628, 198, 4871, 2671, 6649, 12235, 44909, 7, 9861, 6649, 12235, 2599, 198, 220, 220, 220, 37227, 44909, 14305, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2099, 62, 3672, 11, 1866, 11, 1438, 28, 14202, 11, 2546, 28, 15, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 42316, 273, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2671, 6649, 12235, 13, 834, 15003, 834, 7, 944, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 4906, 62, 3672, 796, 2099, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 30814, 796, 1866, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 3672, 796, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 7857, 796, 2546, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 19522, 62, 15526, 274, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 36496, 9282, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 13, 2617, 6030, 7, 4906, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2860, 36690, 37835, 1144, 7, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2860, 36690, 38052, 7, 3672, 8, 628, 220, 220, 220, 825, 5794, 7, 944, 11, 2700, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 13615, 39559, 5072, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 300, 301, 796, 366, 1911, 22179, 26933, 87, 13, 18982, 7, 3174, 8, 329, 2124, 287, 2116, 13, 834, 30814, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 796, 5855, 7249, 4064, 82, 90, 4, 82, 36786, 4064, 357, 944, 13, 834, 4906, 62, 3672, 13, 18982, 7, 3174, 828, 300, 301, 11, 2116, 13, 834, 3672, 13, 18982, 7, 3174, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 834, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 15853, 2116, 13, 834, 3672, 13, 18982, 7, 3174, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 834, 7857, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 15853, 12878, 4, 82, 30866, 4064, 357, 944, 13, 834, 7857, 13, 18982, 7, 3174, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1005, 1343, 366, 26033, 628, 220, 220, 220, 825, 651, 25341, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15457, 273, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 834, 30814, 628, 220, 220, 220, 825, 651, 27608, 15457, 274, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15457, 273, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 834, 19522, 62, 15526, 274, 628, 220, 220, 220, 825, 651, 5376, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15457, 273, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 834, 3672, 628, 220, 220, 220, 825, 651, 6030, 5376, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15457, 273, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 834, 4906, 62, 3672, 628, 220, 220, 220, 825, 900, 27608, 15457, 274, 7, 944, 11, 300, 301, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7248, 7723, 2888, 1895, 274, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 19522, 62, 15526, 274, 796, 300, 301, 628, 220, 220, 220, 825, 11593, 2536, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10100, 10552, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 44909, 7, 4, 72, 16725, 4064, 357, 11925, 7, 944, 13, 834, 11299, 4008, 198, 198, 29113, 7804, 198, 2, 40480, 1303, 14468, 7804, 21017, 198, 29113, 7804, 628, 198, 4299, 1278, 6649, 62, 29572, 62, 7249, 7, 10459, 2599, 198, 220, 220, 220, 37227, 10044, 325, 2878, 2512, 526, 15931, 198, 220, 220, 220, 357, 4906, 62, 3672, 11, 8354, 11, 2695, 8, 796, 7925, 62, 83, 482, 641, 7, 10459, 11, 5855, 7249, 1600, 366, 30, 77, 1600, 366, 30, 4895, 4008, 198, 220, 220, 220, 611, 407, 2099, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 14202, 11, 2723, 8, 198, 220, 220, 220, 1303, 3497, 2785, 1438, 290, 2546, 13, 198, 220, 220, 220, 357, 3672, 11, 2546, 11, 5637, 8, 796, 7925, 62, 83, 482, 641, 7, 11299, 11, 5855, 30, 77, 1600, 12878, 1600, 366, 30, 72, 1600, 366, 60, 1600, 366, 26033, 4008, 198, 220, 220, 220, 611, 407, 1438, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 357, 3672, 11, 5637, 8, 796, 7925, 62, 83, 482, 641, 7, 11299, 11, 5855, 30, 77, 1600, 366, 26033, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1438, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 23705, 1352, 11, 5637, 8, 796, 7925, 62, 83, 482, 641, 7, 11299, 11, 5855, 30, 26, 1600, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 5651, 1352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 14202, 11, 2723, 8, 198, 220, 220, 220, 1303, 2547, 325, 1866, 198, 220, 220, 220, 1866, 796, 1278, 6649, 62, 29572, 62, 19522, 62, 4868, 7, 29982, 8, 198, 220, 220, 220, 611, 407, 1866, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 43160, 12331, 7203, 28920, 2888, 1351, 329, 2878, 4943, 198, 220, 220, 220, 1441, 357, 9861, 6649, 12235, 44909, 7, 4906, 62, 3672, 11, 1866, 11, 1438, 11, 2546, 828, 5637, 8, 628, 198, 4299, 318, 62, 4743, 6649, 62, 9967, 62, 7249, 7, 404, 2599, 198, 220, 220, 220, 37227, 24446, 611, 1813, 2134, 318, 2671, 6649, 12235, 818, 448, 526, 15931, 198, 220, 220, 220, 1441, 318, 39098, 7, 404, 11, 2671, 6649, 12235, 44909, 8, 198 ]
2.471162
1,127
import pandas as pd import numpy as np from typing import List user_ID = 78 query = 'userID == ' + str(user_ID) # head = my_join() head = ['Action', 'Adventure', 'Animation', 'Children', 'Comedy', 'Crime', 'Documentary', 'Drama', 'Fantasy', 'Film-Noir', 'Horror', 'IMAX', 'Musical', 'Mystery', 'Romance', 'Sci-Fi', 'Short', 'Thriller', 'War', 'Western'] joined = pd.read_csv('/home/kwitnoncy/Documents/politechnika/wti/wtiproj03/data/joined.dat', sep='\t') joined = joined.query(query).to_numpy() print([np.nanmean([(row[2] * row[genre + 9]) if row[genre + 9] != 0 else np.nan for row in joined]) for genre in range(len(head))])
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 7343, 628, 198, 7220, 62, 2389, 796, 8699, 198, 22766, 796, 705, 7220, 2389, 6624, 705, 1343, 965, 7, 7220, 62, 2389, 8, 198, 2, 1182, 796, 616, 62, 22179, 3419, 198, 2256, 796, 37250, 12502, 3256, 705, 48289, 3256, 705, 39520, 3256, 705, 26829, 3256, 705, 5377, 4716, 3256, 705, 45580, 3256, 705, 24941, 560, 3256, 705, 35, 20058, 3256, 705, 37, 34921, 3256, 705, 39750, 12, 2949, 343, 3256, 705, 27991, 1472, 3256, 705, 3955, 25922, 3256, 705, 10694, 605, 3256, 705, 3666, 41991, 3256, 705, 22834, 590, 3256, 705, 50, 979, 12, 10547, 3256, 705, 16438, 3256, 705, 817, 81, 4665, 3256, 705, 13195, 3256, 705, 24227, 20520, 198, 198, 46416, 796, 279, 67, 13, 961, 62, 40664, 10786, 14, 11195, 14, 74, 39289, 13159, 948, 14, 38354, 14, 16104, 578, 1349, 9232, 14, 86, 20259, 14, 86, 22504, 305, 73, 3070, 14, 7890, 14, 46416, 13, 19608, 3256, 41767, 11639, 59, 83, 11537, 220, 220, 220, 220, 198, 46416, 796, 5399, 13, 22766, 7, 22766, 737, 1462, 62, 77, 32152, 3419, 198, 198, 4798, 26933, 37659, 13, 12647, 32604, 26933, 7, 808, 58, 17, 60, 1635, 5752, 58, 35850, 1343, 860, 12962, 611, 5752, 58, 35850, 1343, 860, 60, 14512, 657, 2073, 45941, 13, 12647, 329, 5752, 287, 5399, 12962, 329, 12121, 287, 2837, 7, 11925, 7, 2256, 4008, 12962, 628 ]
2.647303
241
from machine import Pin, RTC from time import sleep, sleep_ms, sleep_us from json import load as jload from ntptime import settime ADDR_DELAY_US = 100 GOTO_DELAY_MS = 20 HOUR_LUT = jload(open("hour_lut.json")) MINUTE_LUT = jload(open("minute_lut.json")) TIME_ZONE = +2 encoder_pins = [Pin(i, Pin.IN, Pin.PULL_UP) for i in [0, 2, 4, 5, 12, 13]] run = Pin(16, Pin.OUT) run.off() adc_hour = Pin(14, Pin.OUT) adc_hour.off() adc_minute = Pin(15, Pin.OUT) adc_minute.off() try: settime() except: pass rtc = RTC() while True: update_time() sleep(5)
[ 6738, 4572, 1330, 13727, 11, 371, 4825, 198, 6738, 640, 1330, 3993, 11, 3993, 62, 907, 11, 3993, 62, 385, 198, 6738, 33918, 1330, 3440, 355, 474, 2220, 198, 6738, 299, 83, 457, 524, 1330, 900, 2435, 198, 198, 2885, 7707, 62, 35, 3698, 4792, 62, 2937, 796, 1802, 198, 38, 26631, 62, 35, 3698, 4792, 62, 5653, 796, 1160, 198, 39, 11698, 62, 43, 3843, 796, 474, 2220, 7, 9654, 7203, 9769, 62, 75, 315, 13, 17752, 48774, 198, 23678, 37780, 62, 43, 3843, 796, 474, 2220, 7, 9654, 7203, 11374, 62, 75, 315, 13, 17752, 48774, 198, 34694, 62, 57, 11651, 796, 1343, 17, 198, 198, 12685, 12342, 62, 49556, 796, 685, 28348, 7, 72, 11, 13727, 13, 1268, 11, 13727, 13, 5105, 3069, 62, 8577, 8, 329, 1312, 287, 685, 15, 11, 362, 11, 604, 11, 642, 11, 1105, 11, 1511, 11907, 198, 198, 5143, 796, 13727, 7, 1433, 11, 13727, 13, 12425, 8, 198, 5143, 13, 2364, 3419, 198, 324, 66, 62, 9769, 796, 13727, 7, 1415, 11, 13727, 13, 12425, 8, 198, 324, 66, 62, 9769, 13, 2364, 3419, 198, 324, 66, 62, 11374, 796, 13727, 7, 1314, 11, 13727, 13, 12425, 8, 198, 324, 66, 62, 11374, 13, 2364, 3419, 198, 198, 28311, 25, 198, 220, 220, 220, 900, 2435, 3419, 198, 16341, 25, 198, 220, 220, 220, 1208, 198, 17034, 66, 796, 371, 4825, 3419, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 4296, 62, 2435, 3419, 198, 220, 220, 220, 3993, 7, 20, 8, 198 ]
2.216535
254
import pytest import retro.data inttypes = { 'exp': retro.data.Integrations.EXPERIMENTAL_ONLY, 'contrib': retro.data.Integrations.CONTRIB_ONLY, }
[ 11748, 12972, 9288, 198, 11748, 12175, 13, 7890, 198, 198, 600, 19199, 796, 1391, 198, 220, 220, 220, 705, 11201, 10354, 12175, 13, 7890, 13, 34500, 9143, 13, 6369, 18973, 3955, 3525, 1847, 62, 1340, 11319, 11, 198, 220, 220, 220, 705, 3642, 822, 10354, 12175, 13, 7890, 13, 34500, 9143, 13, 10943, 5446, 9865, 62, 1340, 11319, 11, 198, 92, 628 ]
2.516129
62
#!/usr/bin/env python from binance.futures import Futures as Client import logging from binance.lib.utils import config_logging config_logging(logging, logging.DEBUG) futures_client = Client() logging.info(futures_client.funding_rate("BTCUSDT",**{'limit':100}))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 9874, 590, 13, 69, 315, 942, 1330, 24002, 942, 355, 20985, 198, 11748, 18931, 198, 6738, 9874, 590, 13, 8019, 13, 26791, 1330, 4566, 62, 6404, 2667, 198, 198, 11250, 62, 6404, 2667, 7, 6404, 2667, 11, 18931, 13, 30531, 8, 198, 198, 69, 315, 942, 62, 16366, 796, 20985, 3419, 198, 6404, 2667, 13, 10951, 7, 69, 315, 942, 62, 16366, 13, 25032, 62, 4873, 7203, 35964, 2937, 24544, 1600, 1174, 90, 6, 32374, 10354, 3064, 92, 4008, 628, 198 ]
2.923077
91
# Copyright 2019 PerfKitBenchmarker 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. """CapacityReservation for AWS virtual machines. AWS EC2 has the concept of capacity reservations which allow the user to request a reservation for a given number of VMs of a specified shape (machine type and os type) in a given zone, for an optionally-supplied duration. This module implements this functionaly. A useful feature of using AwsCapacityReservation is that it allows the user to specify a region instead of a zone, and this module will automatically pick a zone that has capacity, and the VM(s) will then be launched in that zone. AwsCapacityReservation modifies all the VMs in a given vm_group in the following way: 1. The capacity_reservation_id attribute on the VM is set after the reservation is created. The VM needs to reference this id during creation. 2. If the user supplied a region instead of zone, then this module will update the zone attribute on the VM, as well as the zone attribute on the VM's network instance. A run of PKB may have several capacity reservations; there is a 1:1 mapping from AWS vm_groups to AwsCapacityReservation instances. This is because all VMs in a VM group share the same shape and zone. """ import datetime import json import logging from absl import flags from perfkitbenchmarker import capacity_reservation from perfkitbenchmarker import errors from perfkitbenchmarker import os_types from perfkitbenchmarker import vm_util from perfkitbenchmarker.providers import aws from perfkitbenchmarker.providers.aws import util FLAGS = flags.FLAGS _INSUFFICIENT_CAPACITY = 'InsufficientInstanceCapacity' class AwsCapacityReservation(capacity_reservation.BaseCapacityReservation): """An object representing an AWS EC2 CapacityReservation.""" CLOUD = aws.CLOUD def _Create(self): """Creates the AWS CapacaityReservation. A reservation will be created given the VM shape in self.vm_groups. Count is determined by the number of VMs in said group. The reservation will have a lifetime determined by the general PKB concept of timeout_minutes. If the reservation exceeds this timeout, AWS will cancel it automatically. The VMs in the reservation will not be deleted. Note that an empty capacity reservation will encur costs for the VM shape / count, even if no VMs are using it. After the reservation is created, this method updates all the VMs in self.vm_groups by setting the capacity_reservation_id, as well as the zone attributes on the VM, and the VM's network instance. Raises: UnsupportedOsTypeError: If creating a capacity reservation for the given os type is not supported. CreationError: If a capacity reservation cannot be created in the region (typically indicates a stockout). """ if self.os_type in os_types.LINUX_OS_TYPES: instance_platform = 'Linux/UNIX' elif self.os_type in os_types.WINDOWS_OS_TYPES: instance_platform = 'Windows' else: raise UnsupportedOsTypeError( 'Unsupported os_type for AWS CapacityReservation: %s.' % self.os_type) # If the user did not specify an AZ, we need to try to create the # CapacityReservation in a specifc AZ until it succeeds. # Then update the zone attribute on all the VMs in the group, # as well as the zone attribute on the VMs' network instance. if util.IsRegion(self.zone_or_region): zones_to_try = util.GetZonesInRegion(self.region) else: zones_to_try = [self.zone_or_region] end_date = ( datetime.datetime.utcnow() + datetime.timedelta(minutes=FLAGS.timeout_minutes)) for zone in zones_to_try: cmd = util.AWS_PREFIX + [ 'ec2', 'create-capacity-reservation', '--instance-type=%s' % self.machine_type, '--instance-platform=%s' % instance_platform, '--availability-zone=%s' % zone, '--instance-count=%s' % self.vm_count, '--instance-match-criteria=targeted', '--region=%s' % self.region, '--end-date-type=limited', '--end-date=%s' % end_date.isoformat(), ] stdout, stderr, retcode = vm_util.IssueCommand(cmd, raise_on_failure=False) if retcode: logging.info('Unable to create CapacityReservation in %s. ' 'This may be retried. Details: %s', zone, stderr) if _INSUFFICIENT_CAPACITY in stderr: logging.error(util.STOCKOUT_MESSAGE) raise errors.Benchmarks.InsufficientCapacityCloudFailure( util.STOCKOUT_MESSAGE + ' CapacityReservation in ' + zone) continue json_output = json.loads(stdout) self.capacity_reservation_id = ( json_output['CapacityReservation']['CapacityReservationId']) self._UpdateVmsInGroup(self.capacity_reservation_id, zone) return raise CreationError('Unable to create CapacityReservation in any of the ' 'following zones: %s.' % zones_to_try) def _Delete(self): """Deletes the capacity reservation.""" cmd = util.AWS_PREFIX + [ 'ec2', 'cancel-capacity-reservation', '--capacity-reservation-id=%s' % self.capacity_reservation_id, '--region=%s' % self.region, ] vm_util.IssueCommand(cmd, raise_on_failure=False) def _Exists(self): """Returns true if the underlying reservation exists and is active.""" cmd = util.AWS_PREFIX + [ 'ec2', 'describe-capacity-reservations', '--capacity-reservation-id=%s' % self.capacity_reservation_id, '--region=%s' % self.region, ] stdout, _, retcode = vm_util.IssueCommand(cmd, raise_on_failure=False) if retcode != 0: return False json_output = json.loads(stdout) return json_output['CapacityReservations'][0]['State'] == 'active' def _UpdateVmsInGroup(self, capacity_reservation_id, zone): """Updates the VMs in a group with necessary reservation details. AWS virtual machines need to reference the capacity reservation id during creation, so it is set on all VMs in the group. Additionally, this class may determine which zone to run in, so that needs to be updated too (on the VM, and the VM's network instance). Args: capacity_reservation_id: ID of the reservation created by this instance. zone: Zone chosen by this class, or if it was supplied, the zone provided by the user. In the latter case, setting the zone is equivalent to a no-op. """ for vm in self.vm_group: vm.capacity_reservation_id = capacity_reservation_id vm.zone = zone vm.network.zone = zone
[ 2, 15069, 13130, 2448, 69, 20827, 44199, 4102, 263, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 37811, 15610, 4355, 4965, 13208, 329, 30865, 7166, 8217, 13, 198, 198, 12298, 50, 13182, 17, 468, 262, 3721, 286, 5339, 24722, 543, 1249, 262, 198, 7220, 284, 2581, 257, 24048, 329, 257, 1813, 1271, 286, 569, 10128, 286, 257, 198, 23599, 5485, 357, 30243, 2099, 290, 28686, 2099, 8, 287, 257, 1813, 6516, 11, 329, 198, 272, 42976, 12, 18608, 18511, 9478, 13, 770, 8265, 23986, 428, 2163, 3400, 13, 198, 198, 32, 4465, 3895, 286, 1262, 5851, 82, 15610, 4355, 4965, 13208, 318, 326, 340, 3578, 262, 198, 7220, 284, 11986, 257, 3814, 2427, 286, 257, 6516, 11, 290, 428, 8265, 481, 6338, 198, 27729, 257, 6516, 326, 468, 5339, 11, 290, 262, 16990, 7, 82, 8, 481, 788, 307, 5611, 287, 326, 6516, 13, 198, 198, 32, 18504, 15610, 4355, 4965, 13208, 953, 6945, 477, 262, 569, 10128, 287, 257, 1813, 45887, 62, 8094, 287, 262, 198, 27780, 278, 835, 25, 198, 220, 352, 13, 383, 5339, 62, 411, 13208, 62, 312, 11688, 319, 262, 16990, 318, 900, 706, 262, 198, 220, 220, 220, 220, 24048, 318, 2727, 13, 383, 16990, 2476, 284, 4941, 428, 4686, 1141, 198, 220, 220, 220, 220, 6282, 13, 198, 220, 362, 13, 1002, 262, 2836, 14275, 257, 3814, 2427, 286, 6516, 11, 788, 428, 8265, 198, 220, 220, 220, 220, 481, 4296, 262, 6516, 11688, 319, 262, 16990, 11, 355, 880, 355, 262, 6516, 198, 220, 220, 220, 220, 11688, 319, 262, 16990, 338, 3127, 4554, 13, 198, 198, 32, 1057, 286, 350, 22764, 743, 423, 1811, 5339, 24722, 26, 612, 318, 257, 352, 25, 16, 16855, 198, 6738, 30865, 45887, 62, 24432, 284, 5851, 82, 15610, 4355, 4965, 13208, 10245, 13, 770, 318, 780, 477, 198, 53, 10128, 287, 257, 16990, 1448, 2648, 262, 976, 5485, 290, 6516, 13, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 18931, 198, 6738, 2352, 75, 1330, 9701, 198, 6738, 23035, 15813, 26968, 4102, 263, 1330, 5339, 62, 411, 13208, 198, 6738, 23035, 15813, 26968, 4102, 263, 1330, 8563, 198, 6738, 23035, 15813, 26968, 4102, 263, 1330, 28686, 62, 19199, 198, 6738, 23035, 15813, 26968, 4102, 263, 1330, 45887, 62, 22602, 198, 6738, 23035, 15813, 26968, 4102, 263, 13, 15234, 4157, 1330, 3253, 82, 198, 6738, 23035, 15813, 26968, 4102, 263, 13, 15234, 4157, 13, 8356, 1330, 7736, 198, 198, 38948, 50, 796, 9701, 13, 38948, 50, 198, 62, 1268, 12564, 5777, 2149, 28495, 62, 33177, 2246, 9050, 796, 705, 20376, 15267, 33384, 15610, 4355, 6, 628, 628, 198, 198, 4871, 5851, 82, 15610, 4355, 4965, 13208, 7, 42404, 62, 411, 13208, 13, 14881, 15610, 4355, 4965, 13208, 2599, 198, 220, 37227, 2025, 2134, 10200, 281, 30865, 13182, 17, 29765, 4965, 13208, 526, 15931, 198, 220, 7852, 2606, 35, 796, 3253, 82, 13, 5097, 2606, 35, 628, 220, 825, 4808, 16447, 7, 944, 2599, 198, 220, 220, 220, 37227, 16719, 274, 262, 30865, 4476, 22260, 414, 4965, 13208, 13, 628, 220, 220, 220, 317, 24048, 481, 307, 2727, 1813, 262, 16990, 5485, 287, 2116, 13, 14761, 62, 24432, 13, 198, 220, 220, 220, 2764, 318, 5295, 416, 262, 1271, 286, 569, 10128, 287, 531, 1448, 13, 383, 24048, 198, 220, 220, 220, 481, 423, 257, 10869, 5295, 416, 262, 2276, 350, 22764, 3721, 286, 198, 220, 220, 220, 26827, 62, 1084, 1769, 13, 1002, 262, 24048, 21695, 428, 26827, 11, 30865, 481, 198, 220, 220, 220, 14241, 340, 6338, 13, 383, 569, 10128, 287, 262, 24048, 481, 407, 307, 13140, 13, 198, 220, 220, 220, 5740, 326, 281, 6565, 5339, 24048, 481, 2207, 333, 3484, 329, 262, 198, 220, 220, 220, 16990, 5485, 1220, 954, 11, 772, 611, 645, 569, 10128, 389, 1262, 340, 13, 628, 220, 220, 220, 2293, 262, 24048, 318, 2727, 11, 428, 2446, 5992, 477, 262, 569, 10128, 198, 220, 220, 220, 287, 2116, 13, 14761, 62, 24432, 416, 4634, 262, 5339, 62, 411, 13208, 62, 312, 11, 355, 880, 198, 220, 220, 220, 355, 262, 6516, 12608, 319, 262, 16990, 11, 290, 262, 16990, 338, 3127, 4554, 13, 628, 220, 220, 220, 7567, 2696, 25, 198, 220, 220, 220, 220, 220, 791, 15999, 16748, 6030, 12331, 25, 1002, 4441, 257, 5339, 24048, 329, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1813, 28686, 2099, 318, 407, 4855, 13, 198, 220, 220, 220, 220, 220, 21582, 12331, 25, 1002, 257, 5339, 24048, 2314, 307, 2727, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 3814, 357, 48126, 9217, 257, 4283, 448, 737, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 2116, 13, 418, 62, 4906, 287, 28686, 62, 19199, 13, 34509, 31235, 62, 2640, 62, 9936, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 4554, 62, 24254, 796, 705, 19314, 14, 4944, 10426, 6, 198, 220, 220, 220, 1288, 361, 2116, 13, 418, 62, 4906, 287, 28686, 62, 19199, 13, 33207, 62, 2640, 62, 9936, 47, 1546, 25, 198, 220, 220, 220, 220, 220, 4554, 62, 24254, 796, 705, 11209, 6, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 5298, 791, 15999, 16748, 6030, 12331, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3118, 15999, 28686, 62, 4906, 329, 30865, 29765, 4965, 13208, 25, 4064, 82, 2637, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4064, 2116, 13, 418, 62, 4906, 8, 628, 220, 220, 220, 1303, 1002, 262, 2836, 750, 407, 11986, 281, 26253, 11, 356, 761, 284, 1949, 284, 2251, 262, 198, 220, 220, 220, 1303, 29765, 4965, 13208, 287, 257, 1020, 361, 66, 26253, 1566, 340, 31137, 13, 198, 220, 220, 220, 1303, 3244, 4296, 262, 6516, 11688, 319, 477, 262, 569, 10128, 287, 262, 1448, 11, 198, 220, 220, 220, 1303, 355, 880, 355, 262, 6516, 11688, 319, 262, 569, 10128, 6, 3127, 4554, 13, 198, 220, 220, 220, 611, 7736, 13, 3792, 47371, 7, 944, 13, 11340, 62, 273, 62, 36996, 2599, 198, 220, 220, 220, 220, 220, 14123, 62, 1462, 62, 28311, 796, 7736, 13, 3855, 57, 1952, 818, 47371, 7, 944, 13, 36996, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 14123, 62, 1462, 62, 28311, 796, 685, 944, 13, 11340, 62, 273, 62, 36996, 60, 628, 220, 220, 220, 886, 62, 4475, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 4818, 8079, 13, 19608, 8079, 13, 315, 66, 2197, 3419, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 4818, 8079, 13, 16514, 276, 12514, 7, 1084, 1769, 28, 38948, 50, 13, 48678, 62, 1084, 1769, 4008, 198, 220, 220, 220, 329, 6516, 287, 14123, 62, 1462, 62, 28311, 25, 198, 220, 220, 220, 220, 220, 23991, 796, 7736, 13, 12298, 50, 62, 47, 31688, 10426, 1343, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 721, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17953, 12, 42404, 12, 411, 13208, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 39098, 12, 4906, 28, 4, 82, 6, 4064, 2116, 13, 30243, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 39098, 12, 24254, 28, 4, 82, 6, 4064, 4554, 62, 24254, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 47274, 12, 11340, 28, 4, 82, 6, 4064, 6516, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 39098, 12, 9127, 28, 4, 82, 6, 4064, 2116, 13, 14761, 62, 9127, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 39098, 12, 15699, 12, 22213, 5142, 28, 16793, 276, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 36996, 28, 4, 82, 6, 4064, 2116, 13, 36996, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 437, 12, 4475, 12, 4906, 28, 10698, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 437, 12, 4475, 28, 4, 82, 6, 4064, 886, 62, 4475, 13, 26786, 18982, 22784, 198, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 14367, 448, 11, 336, 1082, 81, 11, 1005, 8189, 796, 45887, 62, 22602, 13, 45147, 21575, 7, 28758, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 62, 261, 62, 32165, 495, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 611, 1005, 8189, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 10951, 10786, 3118, 540, 284, 2251, 29765, 4965, 13208, 287, 4064, 82, 13, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1212, 743, 307, 1005, 2228, 13, 14890, 25, 4064, 82, 3256, 6516, 11, 336, 1082, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4808, 1268, 12564, 5777, 2149, 28495, 62, 33177, 2246, 9050, 287, 336, 1082, 81, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 18224, 7, 22602, 13, 2257, 11290, 12425, 62, 44, 1546, 4090, 8264, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 8563, 13, 44199, 14306, 13, 20376, 15267, 15610, 4355, 18839, 50015, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7736, 13, 2257, 11290, 12425, 62, 44, 1546, 4090, 8264, 1343, 705, 29765, 4965, 13208, 287, 705, 1343, 6516, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 33918, 62, 22915, 796, 33918, 13, 46030, 7, 19282, 448, 8, 198, 220, 220, 220, 220, 220, 2116, 13, 42404, 62, 411, 13208, 62, 312, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 62, 22915, 17816, 15610, 4355, 4965, 13208, 6, 7131, 6, 15610, 4355, 4965, 13208, 7390, 6, 12962, 198, 220, 220, 220, 220, 220, 2116, 13557, 10260, 53, 907, 818, 13247, 7, 944, 13, 42404, 62, 411, 13208, 62, 312, 11, 6516, 8, 198, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 5298, 21582, 12331, 10786, 3118, 540, 284, 2251, 29765, 4965, 13208, 287, 597, 286, 262, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 27780, 278, 14123, 25, 4064, 82, 2637, 4064, 14123, 62, 1462, 62, 28311, 8, 628, 220, 825, 4808, 38727, 7, 944, 2599, 198, 220, 220, 220, 37227, 5005, 40676, 262, 5339, 24048, 526, 15931, 198, 220, 220, 220, 23991, 796, 7736, 13, 12298, 50, 62, 47, 31688, 10426, 1343, 685, 198, 220, 220, 220, 220, 220, 220, 220, 705, 721, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 66, 21130, 12, 42404, 12, 411, 13208, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 438, 42404, 12, 411, 13208, 12, 312, 28, 4, 82, 6, 4064, 2116, 13, 42404, 62, 411, 13208, 62, 312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 438, 36996, 28, 4, 82, 6, 4064, 2116, 13, 36996, 11, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 45887, 62, 22602, 13, 45147, 21575, 7, 28758, 11, 5298, 62, 261, 62, 32165, 495, 28, 25101, 8, 628, 220, 825, 4808, 3109, 1023, 7, 944, 2599, 198, 220, 220, 220, 37227, 35561, 2081, 611, 262, 10238, 24048, 7160, 290, 318, 4075, 526, 15931, 198, 220, 220, 220, 23991, 796, 7736, 13, 12298, 50, 62, 47, 31688, 10426, 1343, 685, 198, 220, 220, 220, 220, 220, 220, 220, 705, 721, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 20147, 4892, 12, 42404, 12, 411, 712, 602, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 438, 42404, 12, 411, 13208, 12, 312, 28, 4, 82, 6, 4064, 2116, 13, 42404, 62, 411, 13208, 62, 312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 438, 36996, 28, 4, 82, 6, 4064, 2116, 13, 36996, 11, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 14367, 448, 11, 4808, 11, 1005, 8189, 796, 45887, 62, 22602, 13, 45147, 21575, 7, 28758, 11, 5298, 62, 261, 62, 32165, 495, 28, 25101, 8, 198, 220, 220, 220, 611, 1005, 8189, 14512, 657, 25, 198, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 33918, 62, 22915, 796, 33918, 13, 46030, 7, 19282, 448, 8, 198, 220, 220, 220, 1441, 33918, 62, 22915, 17816, 15610, 4355, 4965, 712, 602, 6, 7131, 15, 7131, 6, 9012, 20520, 6624, 705, 5275, 6, 628, 220, 825, 4808, 10260, 53, 907, 818, 13247, 7, 944, 11, 5339, 62, 411, 13208, 62, 312, 11, 6516, 2599, 198, 220, 220, 220, 37227, 4933, 19581, 262, 569, 10128, 287, 257, 1448, 351, 3306, 24048, 3307, 13, 628, 220, 220, 220, 30865, 7166, 8217, 761, 284, 4941, 262, 5339, 24048, 4686, 198, 220, 220, 220, 1141, 6282, 11, 523, 340, 318, 900, 319, 477, 569, 10128, 287, 262, 1448, 13, 12032, 11, 198, 220, 220, 220, 428, 1398, 743, 5004, 543, 6516, 284, 1057, 287, 11, 523, 326, 2476, 284, 307, 198, 220, 220, 220, 6153, 1165, 357, 261, 262, 16990, 11, 290, 262, 16990, 338, 3127, 4554, 737, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 5339, 62, 411, 13208, 62, 312, 25, 4522, 286, 262, 24048, 2727, 416, 428, 4554, 13, 198, 220, 220, 220, 220, 220, 6516, 25, 13035, 7147, 416, 428, 1398, 11, 393, 611, 340, 373, 14275, 11, 262, 6516, 198, 220, 220, 220, 220, 220, 2810, 416, 262, 2836, 13, 554, 262, 6846, 1339, 11, 4634, 262, 6516, 318, 7548, 198, 220, 220, 220, 220, 220, 284, 257, 645, 12, 404, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 329, 45887, 287, 2116, 13, 14761, 62, 8094, 25, 198, 220, 220, 220, 220, 220, 45887, 13, 42404, 62, 411, 13208, 62, 312, 796, 5339, 62, 411, 13208, 62, 312, 198, 220, 220, 220, 220, 220, 45887, 13, 11340, 796, 6516, 198, 220, 220, 220, 220, 220, 45887, 13, 27349, 13, 11340, 796, 6516, 198 ]
2.854902
2,550
from __future__ import absolute_import from .tfidf import TFIDF from .textrank import TextRank try: from .analyzer import ChineseAnalyzer except ImportError: pass default_tfidf = TFIDF() default_textrank = TextRank() extract_tags = tfidf = default_tfidf.extract_tags set_idf_path = default_tfidf.set_idf_path textrank = default_textrank.extract_tags
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 201, 198, 6738, 764, 27110, 312, 69, 1330, 24958, 2389, 37, 201, 198, 6738, 764, 5239, 43027, 1330, 8255, 27520, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 422, 764, 38200, 9107, 1330, 3999, 37702, 9107, 201, 198, 16341, 17267, 12331, 25, 201, 198, 220, 220, 220, 1208, 201, 198, 201, 198, 12286, 62, 27110, 312, 69, 796, 24958, 2389, 37, 3419, 201, 198, 12286, 62, 5239, 43027, 796, 8255, 27520, 3419, 201, 198, 201, 198, 2302, 974, 62, 31499, 796, 48700, 312, 69, 796, 4277, 62, 27110, 312, 69, 13, 2302, 974, 62, 31499, 201, 198, 2617, 62, 312, 69, 62, 6978, 796, 4277, 62, 27110, 312, 69, 13, 2617, 62, 312, 69, 62, 6978, 201, 198, 5239, 43027, 796, 4277, 62, 5239, 43027, 13, 2302, 974, 62, 31499, 201, 198 ]
2.652482
141
__doc__ = """ Factory function to allocate variables for Cosserat Rod""" __all__ = ["allocate"] import typing from typing import Optional, Tuple import warnings import logging import numpy as np from numpy.testing import assert_allclose from elastica.utils import MaxDimension, Tolerance from elastica._linalg import _batch_cross, _batch_norm, _batch_dot def _position_validity_checker(position, start, n_elements): """Checker on user-defined position validity""" _assert_shape(position, (MaxDimension.value(), n_elements + 1), "position") # Check if the start position of the rod and first entry of position array are the same assert_allclose( position[..., 0], start, atol=Tolerance.atol(), err_msg=str( "First entry of position" + " (" + str(position[..., 0]) + " ) " " is different than start " + " (" + str(start) + " ) " ), ) def _directors_validity_checker(directors, tangents, n_elements): """Checker on user-defined directors validity""" _assert_shape( directors, (MaxDimension.value(), MaxDimension.value(), n_elements), "directors" ) # Check if d1, d2, d3 are unit vectors d1 = directors[0, ...] d2 = directors[1, ...] d3 = directors[2, ...] assert_allclose( _batch_norm(d1), np.ones((n_elements)), atol=Tolerance.atol(), err_msg=(" d1 vector of input director matrix is not unit vector "), ) assert_allclose( _batch_norm(d2), np.ones((n_elements)), atol=Tolerance.atol(), err_msg=(" d2 vector of input director matrix is not unit vector "), ) assert_allclose( _batch_norm(d3), np.ones((n_elements)), atol=Tolerance.atol(), err_msg=(" d3 vector of input director matrix is not unit vector "), ) # Check if d3xd1 = d2 assert_allclose( _batch_cross(d3, d1), d2, atol=Tolerance.atol(), err_msg=(" d3 x d1 != d2 of input director matrix"), ) # Check if computed tangents from position is the same with d3 assert_allclose( tangents, d3, atol=Tolerance.atol(), err_msg=" Tangent vector computed using node positions is different than d3 vector of input directors", )
[ 834, 15390, 834, 796, 37227, 19239, 2163, 284, 31935, 9633, 329, 327, 793, 263, 265, 6882, 37811, 198, 834, 439, 834, 796, 14631, 439, 13369, 8973, 198, 11748, 19720, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 11748, 14601, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 6738, 27468, 64, 13, 26791, 1330, 5436, 29271, 3004, 11, 309, 37668, 198, 6738, 27468, 64, 13557, 75, 1292, 70, 1330, 4808, 43501, 62, 19692, 11, 4808, 43501, 62, 27237, 11, 4808, 43501, 62, 26518, 628, 628, 198, 198, 4299, 4808, 9150, 62, 12102, 414, 62, 9122, 263, 7, 9150, 11, 923, 11, 299, 62, 68, 3639, 2599, 198, 220, 220, 220, 37227, 9787, 263, 319, 2836, 12, 23211, 2292, 19648, 37811, 198, 220, 220, 220, 4808, 30493, 62, 43358, 7, 9150, 11, 357, 11518, 29271, 3004, 13, 8367, 22784, 299, 62, 68, 3639, 1343, 352, 828, 366, 9150, 4943, 628, 220, 220, 220, 1303, 6822, 611, 262, 923, 2292, 286, 262, 15299, 290, 717, 5726, 286, 2292, 7177, 389, 262, 976, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2292, 58, 986, 11, 657, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 923, 11, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 28, 2536, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 5962, 5726, 286, 2292, 1, 1343, 366, 5855, 1343, 965, 7, 9150, 58, 986, 11, 657, 12962, 1343, 366, 1267, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 318, 1180, 621, 923, 366, 1343, 366, 5855, 1343, 965, 7, 9688, 8, 1343, 366, 1267, 366, 198, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 1267, 628, 198, 4299, 4808, 12942, 669, 62, 12102, 414, 62, 9122, 263, 7, 12942, 669, 11, 13875, 658, 11, 299, 62, 68, 3639, 2599, 198, 220, 220, 220, 37227, 9787, 263, 319, 2836, 12, 23211, 13445, 19648, 37811, 198, 220, 220, 220, 4808, 30493, 62, 43358, 7, 198, 220, 220, 220, 220, 220, 220, 220, 13445, 11, 357, 11518, 29271, 3004, 13, 8367, 22784, 5436, 29271, 3004, 13, 8367, 22784, 299, 62, 68, 3639, 828, 366, 12942, 669, 1, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1303, 6822, 611, 288, 16, 11, 288, 17, 11, 288, 18, 389, 4326, 30104, 198, 220, 220, 220, 288, 16, 796, 13445, 58, 15, 11, 2644, 60, 198, 220, 220, 220, 288, 17, 796, 13445, 58, 16, 11, 2644, 60, 198, 220, 220, 220, 288, 18, 796, 13445, 58, 17, 11, 2644, 60, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 43501, 62, 27237, 7, 67, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 1952, 19510, 77, 62, 68, 3639, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 28, 7203, 288, 16, 15879, 286, 5128, 3437, 17593, 318, 407, 4326, 15879, 366, 828, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 43501, 62, 27237, 7, 67, 17, 828, 198, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 1952, 19510, 77, 62, 68, 3639, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 28, 7203, 288, 17, 15879, 286, 5128, 3437, 17593, 318, 407, 4326, 15879, 366, 828, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 43501, 62, 27237, 7, 67, 18, 828, 198, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 1952, 19510, 77, 62, 68, 3639, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 28, 7203, 288, 18, 15879, 286, 5128, 3437, 17593, 318, 407, 4326, 15879, 366, 828, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1303, 6822, 611, 288, 18, 24954, 16, 796, 288, 17, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 43501, 62, 19692, 7, 67, 18, 11, 288, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 288, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 28, 7203, 288, 18, 2124, 288, 16, 14512, 288, 17, 286, 5128, 3437, 17593, 12340, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1303, 6822, 611, 29231, 13875, 658, 422, 2292, 318, 262, 976, 351, 288, 18, 198, 220, 220, 220, 6818, 62, 439, 19836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 13875, 658, 11, 198, 220, 220, 220, 220, 220, 220, 220, 288, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 379, 349, 28, 51, 37668, 13, 265, 349, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 11454, 62, 19662, 2625, 18816, 298, 15879, 29231, 1262, 10139, 6116, 318, 1180, 621, 288, 18, 15879, 286, 5128, 13445, 1600, 198, 220, 220, 220, 1267, 198 ]
2.463753
938
from env_wrapper import wzq_env from policy.rand_policy import rand_agent from policy.algo.ppo import PPO from policy.net.net_v0 import policy_net from policy.net.net_v0 import value_net from policy.rl_policy import ppo_agent import time import numpy as np agent0 = ppo_agent(size=15) agent1 = rand_agent(size=15) env = wzq_env([agent0, agent1]) env.run()
[ 6738, 17365, 62, 48553, 1330, 266, 89, 80, 62, 24330, 198, 6738, 2450, 13, 25192, 62, 30586, 1330, 43720, 62, 25781, 198, 6738, 2450, 13, 282, 2188, 13, 16634, 1330, 350, 16402, 198, 6738, 2450, 13, 3262, 13, 3262, 62, 85, 15, 1330, 2450, 62, 3262, 198, 6738, 2450, 13, 3262, 13, 3262, 62, 85, 15, 1330, 1988, 62, 3262, 198, 6738, 2450, 13, 45895, 62, 30586, 1330, 279, 7501, 62, 25781, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 25781, 15, 796, 279, 7501, 62, 25781, 7, 7857, 28, 1314, 8, 198, 25781, 16, 796, 43720, 62, 25781, 7, 7857, 28, 1314, 8, 198, 24330, 796, 266, 89, 80, 62, 24330, 26933, 25781, 15, 11, 5797, 16, 12962, 198, 24330, 13, 5143, 3419 ]
2.80315
127
from dataclasses import dataclass, field from typing import Optional from bindings.gmd.abstract_object_type import AbstractObjectType from bindings.gmd.binary_property_type import BinaryPropertyType from bindings.gmd.character_string_property_type import CharacterStringPropertyType from bindings.gmd.ci_citation_type import CiCitationPropertyType __NAMESPACE__ = "http://www.isotc211.org/2005/gmd" @dataclass class MdApplicationSchemaInformationType(AbstractObjectType): """ Information about the application schema used to build the dataset. """ name: Optional[CiCitationPropertyType] = field( default=None, metadata={ "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", "required": True, }, ) schema_language: Optional[CharacterStringPropertyType] = field( default=None, metadata={ "name": "schemaLanguage", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", "required": True, }, ) constraint_language: Optional[CharacterStringPropertyType] = field( default=None, metadata={ "name": "constraintLanguage", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", "required": True, }, ) schema_ascii: Optional[CharacterStringPropertyType] = field( default=None, metadata={ "name": "schemaAscii", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", }, ) graphics_file: Optional[BinaryPropertyType] = field( default=None, metadata={ "name": "graphicsFile", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", }, ) software_development_file: Optional[BinaryPropertyType] = field( default=None, metadata={ "name": "softwareDevelopmentFile", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", }, ) software_development_file_format: Optional[CharacterStringPropertyType] = field( default=None, metadata={ "name": "softwareDevelopmentFileFormat", "type": "Element", "namespace": "http://www.isotc211.org/2005/gmd", }, )
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 198, 6738, 34111, 13, 70, 9132, 13, 397, 8709, 62, 15252, 62, 4906, 1330, 27741, 10267, 6030, 198, 6738, 34111, 13, 70, 9132, 13, 39491, 62, 26745, 62, 4906, 1330, 45755, 21746, 6030, 198, 6738, 34111, 13, 70, 9132, 13, 22769, 62, 8841, 62, 26745, 62, 4906, 1330, 15684, 10100, 21746, 6030, 198, 6738, 34111, 13, 70, 9132, 13, 979, 62, 66, 3780, 62, 4906, 1330, 37685, 34, 3780, 21746, 6030, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1, 628, 198, 31, 19608, 330, 31172, 198, 4871, 39762, 23416, 27054, 2611, 21918, 6030, 7, 23839, 10267, 6030, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6188, 546, 262, 3586, 32815, 973, 284, 1382, 262, 27039, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1438, 25, 32233, 58, 34, 72, 34, 3780, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 35827, 1298, 6407, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 32815, 62, 16129, 25, 32233, 58, 27275, 10100, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 15952, 2611, 32065, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 35827, 1298, 6407, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 32315, 62, 16129, 25, 32233, 58, 27275, 10100, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 1102, 2536, 2913, 32065, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 35827, 1298, 6407, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 32815, 62, 292, 979, 72, 25, 32233, 58, 27275, 10100, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 15952, 2611, 1722, 979, 72, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 9382, 62, 7753, 25, 32233, 58, 33, 3219, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 70, 11549, 8979, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3788, 62, 31267, 62, 7753, 25, 32233, 58, 33, 3219, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 43776, 41206, 8979, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3788, 62, 31267, 62, 7753, 62, 18982, 25, 32233, 58, 27275, 10100, 21746, 6030, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 43776, 41206, 8979, 26227, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 20180, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14933, 10223, 1298, 366, 4023, 1378, 2503, 13, 271, 313, 66, 21895, 13, 2398, 14, 14315, 14, 70, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198 ]
2.253953
1,075
import pickle import matplotlib.pyplot as plt import matplotlib.patches import matplotlib as mpl import numpy as np import sys, argparse sys.path.append("../") import Plotting Names = { 'mini_gb2': 'VC-GB2', 'mini_gb5': 'VC-GB5', 'mini_lin': 'VC-Lin', 'epsall_gb2': '$\epsilon$-GB2', 'epsall_gb5': '$\epsilon$-GB5', 'epsall_lin': '$\epsilon$-Lin', 'lin': 'LinUCB' } Styles = { 'mini_gb2': ['k', 'solid'], 'mini_gb5': ['r', 'solid'], 'mini_lin': ['g', 'solid'], 'epsall_gb2': ['k', 'dashed'], 'epsall_gb5': ['r', 'dashed'], 'epsall_lin': ['g', 'dashed'], 'lin': ['b', 'solid'] } parser = argparse.ArgumentParser() parser.add_argument('--save', dest='save', action='store_true') Args = parser.parse_args(sys.argv[1:]) D1 = Plotting.read_dir("../results/mslr30k_T=36000_L=3_e=0.1/") D2 = Plotting.read_dir("../results/yahoo_T=40000_L=2_e=0.5/") print(mpl.rcParams['figure.figsize']) fig = plt.figure(figsize=(mpl.rcParams['figure.figsize'][0]*2, mpl.rcParams['figure.figsize'][1]-1)) ax = fig.add_subplot(111,frameon=False) ax1 = fig.add_subplot(121) ax2 = fig.add_subplot(122) ax.spines['top'].set_color('none') ax.spines['bottom'].set_color('none') ax.spines['left'].set_color('none') ax.spines['right'].set_color('none') ax.tick_params(labelcolor='none', top='off', bottom='off', left='off', right='off') std = True legendHandles = [] keys = ['epsall_lin', 'mini_lin', 'epsall_gb2', 'mini_gb2', 'epsall_gb5', 'mini_gb5', 'lin'] for k in keys: params = [] mus = [] stds = [] for (k1,v1) in D1[0].items(): if k1.find(k) == 0 and len(D1[0][k1]) != 0: x = np.arange(100, 10*len(D1[0][k1][0])+1, 100) mus.append(np.mean(D1[0][k1],axis=0)[9::10]/x) stds.append(2/np.sqrt(len(D1[0][k1]))*(np.std(D1[0][k1],axis=0)[9::10]/x)) params.append(k1.split("_")[-1]) if len(mus) == 0: continue A = np.vstack(mus) B = np.vstack(stds) ids = np.argmax(A, axis=0) mu = np.array([A[ids[i], i] for i in range(len(ids))]) stdev = np.array([B[ids[i], i] for i in range(len(ids))]) if k == 'mini_gb5': mu = np.mean(D1[0]['mini_gb5_0.008'], axis=0)[9::10]/x stdev = 2/np.sqrt(len(D1[0]['mini_gb5_0.008']))*(np.std(D1[0]['mini_gb5_0.008'], axis=0)[9::10]/x) l1 = ax1.plot(x,mu,rasterized=True, linewidth=2.0, label=Names[k], color=Styles[k][0], linestyle=Styles[k][1]) legendHandles.append((matplotlib.patches.Patch(color=l1[0].get_color(), label=Names[k]), Names[k])) if std and k=='mini_gb5' or k=='lin': ax1.fill_between(x, mu - stdev, mu + stdev, color = l1[0].get_color(), alpha=0.2, rasterized = True) for k in keys: params = [] mus = [] stds = [] for (k1,v1) in D2[0].items(): if k1.find(k) == 0 and len(D2[0][k1]) != 0: x = np.arange(100, 10*len(D2[0][k1][0])+1, 100) mus.append(np.mean(D2[0][k1],axis=0)[9::10]/x) stds.append(2/np.sqrt(len(D2[0][k1]))*(np.std(D2[0][k1],axis=0)[9::10]/x)) params.append(k1.split("_")[-1]) if len(mus) == 0: continue A = np.vstack(mus) B = np.vstack(stds) ids = np.argmax(A, axis=0) mu = np.array([A[ids[i], i] for i in range(len(ids))]) stdev = np.array([B[ids[i], i] for i in range(len(ids))]) if k == 'mini_gb5': mu = np.mean(D2[0]['mini_gb5_0.008'], axis=0)[9::10]/x stdev = 2/np.sqrt(len(D2[0]['mini_gb5_0.008']))*(np.std(D2[0]['mini_gb5_0.008'], axis=0)[9::10]/x) l1 = ax2.plot(x,mu,rasterized=True, linewidth=2.0, label=Names[k], color=Styles[k][0], linestyle=Styles[k][1]) if std and k=='mini_gb5' or k=='lin': ax2.fill_between(x, mu - stdev, mu + stdev, color = l1[0].get_color(), alpha=0.2, rasterized = True) plt.rc('font', size=18) plt.rcParams['text.usetex'] = True plt.rc('font', family='sans-serif') ## Ax1 is MSLR ticks=ax1.get_yticks() print(ticks) ax1.set_ylim(2.15, 2.35) print("Setting ylim to %0.2f, %0.2f" % (ticks[3], ticks[len(ticks)-2])) ticks = ax1.get_yticks() print(ticks) ticks = ["", "", "2.2", "", "2.3", ""] ax1.set_yticklabels(ticks,size=20) ticks = ['', '', '10000', '', '20000', '', '30000'] ax1.set_xlim(1000, 31000) ax1.set_xticklabels(ticks,size=20) # Ax2 is Yahoo! ticks=ax2.get_yticks() print(ticks) ax2.set_ylim(2.90,3.12) print("Setting ylim to %0.2f, %0.2f" % (ticks[3], 3.15)) ticks=ax2.get_yticks() print(ticks) ticks = ["", "2.9", "", "3.0", "", "3.1"] ax2.set_yticklabels(ticks,size=20) ticks = ['', '', '10000', '', '20000', '', '30000'] ax2.set_xlim(1000, 32000) ax2.set_xticklabels(ticks,size=20) plt.sca(ax) plt.ylabel('Average reward') plt.xlabel('Number of interactions (T)') leg = ax2.legend([x[1] for x in legendHandles], loc='upper center', bbox_to_anchor=(-0.1, -0.15), fancybox=False, shadow=False, ncol=7, frameon=False,fontsize=18) for legobj in leg.legendHandles: legobj.set_linewidth(4.0) plt.sca(ax1) tt1 = plt.title('Dataset: MSLR',fontsize=18) tt1.set_position([0.5, 1.02]) plt.sca(ax2) tt2 = plt.title('Dataset: Yahoo!',fontsize=18) tt2.set_position([0.5, 1.02]) plt.gcf().subplots_adjust(bottom=0.25) if Args.save: plt.savefig("../figs/plots_grouped.png", format='png', dpi=100, bbox_inches='tight') plt.savefig("../figs/plots_grouped.pdf", format='pdf', dpi=100, bbox_inches='tight') else: plt.show() ## (DONE) No band ## (DONE) markers + update legend ## (DONE) No legend frame ## (DONE) font is too big ## space between title and plot ## space between ylabel and yticks ## Get P-values (paired ttest and regular ttest)
[ 11748, 2298, 293, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 8071, 2052, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 11, 1822, 29572, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 11748, 28114, 889, 198, 198, 36690, 796, 1391, 198, 220, 220, 220, 705, 45313, 62, 22296, 17, 10354, 705, 15922, 12, 4579, 17, 3256, 198, 220, 220, 220, 705, 45313, 62, 22296, 20, 10354, 705, 15922, 12, 4579, 20, 3256, 220, 220, 220, 198, 220, 220, 220, 705, 45313, 62, 2815, 10354, 705, 15922, 12, 14993, 3256, 198, 220, 220, 220, 705, 25386, 439, 62, 22296, 17, 10354, 705, 3, 59, 538, 18217, 261, 3, 12, 4579, 17, 3256, 198, 220, 220, 220, 705, 25386, 439, 62, 22296, 20, 10354, 705, 3, 59, 538, 18217, 261, 3, 12, 4579, 20, 3256, 198, 220, 220, 220, 705, 25386, 439, 62, 2815, 10354, 705, 3, 59, 538, 18217, 261, 3, 12, 14993, 3256, 198, 220, 220, 220, 705, 2815, 10354, 705, 14993, 9598, 33, 6, 198, 92, 198, 198, 18716, 829, 796, 1391, 198, 220, 220, 220, 705, 45313, 62, 22296, 17, 10354, 37250, 74, 3256, 705, 39390, 6, 4357, 198, 220, 220, 220, 705, 45313, 62, 22296, 20, 10354, 37250, 81, 3256, 705, 39390, 6, 4357, 220, 220, 220, 198, 220, 220, 220, 705, 45313, 62, 2815, 10354, 37250, 70, 3256, 705, 39390, 6, 4357, 198, 220, 220, 220, 705, 25386, 439, 62, 22296, 17, 10354, 37250, 74, 3256, 705, 67, 5263, 6, 4357, 198, 220, 220, 220, 705, 25386, 439, 62, 22296, 20, 10354, 37250, 81, 3256, 705, 67, 5263, 6, 4357, 198, 220, 220, 220, 705, 25386, 439, 62, 2815, 10354, 37250, 70, 3256, 705, 67, 5263, 6, 4357, 198, 220, 220, 220, 705, 2815, 10354, 37250, 65, 3256, 705, 39390, 20520, 198, 220, 220, 220, 1782, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 21928, 3256, 2244, 11639, 21928, 3256, 2223, 11639, 8095, 62, 7942, 11537, 198, 42035, 796, 30751, 13, 29572, 62, 22046, 7, 17597, 13, 853, 85, 58, 16, 25, 12962, 198, 198, 35, 16, 796, 28114, 889, 13, 961, 62, 15908, 7203, 40720, 43420, 14, 907, 14050, 1270, 74, 62, 51, 28, 2623, 830, 62, 43, 28, 18, 62, 68, 28, 15, 13, 16, 14, 4943, 198, 35, 17, 796, 28114, 889, 13, 961, 62, 15908, 7203, 40720, 43420, 14, 40774, 62, 51, 28, 19, 2388, 62, 43, 28, 17, 62, 68, 28, 15, 13, 20, 14, 4943, 628, 198, 4798, 7, 76, 489, 13, 6015, 10044, 4105, 17816, 26875, 13, 5647, 7857, 6, 12962, 198, 5647, 796, 458, 83, 13, 26875, 7, 5647, 7857, 16193, 76, 489, 13, 6015, 10044, 4105, 17816, 26875, 13, 5647, 7857, 6, 7131, 15, 60, 9, 17, 11, 285, 489, 13, 6015, 10044, 4105, 17816, 26875, 13, 5647, 7857, 6, 7131, 16, 45297, 16, 4008, 198, 897, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16243, 11, 14535, 261, 28, 25101, 8, 198, 897, 16, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 19244, 8, 198, 897, 17, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 18376, 8, 628, 198, 897, 13, 2777, 1127, 17816, 4852, 6, 4083, 2617, 62, 8043, 10786, 23108, 11537, 198, 897, 13, 2777, 1127, 17816, 22487, 6, 4083, 2617, 62, 8043, 10786, 23108, 11537, 198, 897, 13, 2777, 1127, 17816, 9464, 6, 4083, 2617, 62, 8043, 10786, 23108, 11537, 198, 897, 13, 2777, 1127, 17816, 3506, 6, 4083, 2617, 62, 8043, 10786, 23108, 11537, 198, 897, 13, 42298, 62, 37266, 7, 18242, 8043, 11639, 23108, 3256, 1353, 11639, 2364, 3256, 4220, 11639, 2364, 3256, 1364, 11639, 2364, 3256, 826, 11639, 2364, 11537, 198, 198, 19282, 796, 6407, 198, 1455, 437, 12885, 829, 796, 17635, 198, 13083, 796, 37250, 25386, 439, 62, 2815, 3256, 705, 45313, 62, 2815, 3256, 705, 25386, 439, 62, 22296, 17, 3256, 705, 45313, 62, 22296, 17, 3256, 705, 25386, 439, 62, 22296, 20, 3256, 705, 45313, 62, 22296, 20, 3256, 705, 2815, 20520, 198, 1640, 479, 287, 8251, 25, 198, 220, 220, 220, 42287, 796, 17635, 198, 220, 220, 220, 1928, 796, 17635, 198, 220, 220, 220, 336, 9310, 796, 17635, 198, 220, 220, 220, 329, 357, 74, 16, 11, 85, 16, 8, 287, 360, 16, 58, 15, 4083, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 611, 479, 16, 13, 19796, 7, 74, 8, 6624, 657, 290, 18896, 7, 35, 16, 58, 15, 7131, 74, 16, 12962, 14512, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 45941, 13, 283, 858, 7, 3064, 11, 838, 9, 11925, 7, 35, 16, 58, 15, 7131, 74, 16, 7131, 15, 12962, 10, 16, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1928, 13, 33295, 7, 37659, 13, 32604, 7, 35, 16, 58, 15, 7131, 74, 16, 4357, 22704, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 9310, 13, 33295, 7, 17, 14, 37659, 13, 31166, 17034, 7, 11925, 7, 35, 16, 58, 15, 7131, 74, 16, 60, 4008, 9, 7, 37659, 13, 19282, 7, 35, 16, 58, 15, 7131, 74, 16, 4357, 22704, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 33295, 7, 74, 16, 13, 35312, 7203, 62, 4943, 58, 12, 16, 12962, 198, 220, 220, 220, 611, 18896, 7, 14664, 8, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 317, 796, 45941, 13, 85, 25558, 7, 14664, 8, 198, 220, 220, 220, 347, 796, 45941, 13, 85, 25558, 7, 301, 9310, 8, 198, 220, 220, 220, 220, 2340, 796, 45941, 13, 853, 9806, 7, 32, 11, 16488, 28, 15, 8, 198, 220, 220, 220, 38779, 796, 45941, 13, 18747, 26933, 32, 58, 2340, 58, 72, 4357, 1312, 60, 329, 1312, 287, 2837, 7, 11925, 7, 2340, 4008, 12962, 198, 220, 220, 220, 336, 7959, 796, 45941, 13, 18747, 26933, 33, 58, 2340, 58, 72, 4357, 1312, 60, 329, 1312, 287, 2837, 7, 11925, 7, 2340, 4008, 12962, 628, 220, 220, 220, 611, 479, 6624, 705, 45313, 62, 22296, 20, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 38779, 796, 45941, 13, 32604, 7, 35, 16, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 6, 4357, 16488, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 198, 220, 220, 220, 220, 220, 220, 220, 336, 7959, 796, 362, 14, 37659, 13, 31166, 17034, 7, 11925, 7, 35, 16, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 20520, 4008, 9, 7, 37659, 13, 19282, 7, 35, 16, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 6, 4357, 16488, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 8, 198, 220, 220, 220, 300, 16, 796, 7877, 16, 13, 29487, 7, 87, 11, 30300, 11, 81, 1603, 1143, 28, 17821, 11, 9493, 413, 5649, 28, 17, 13, 15, 11, 6167, 28, 36690, 58, 74, 4357, 3124, 28, 18716, 829, 58, 74, 7131, 15, 4357, 9493, 10992, 28, 18716, 829, 58, 74, 7131, 16, 12962, 198, 220, 220, 220, 8177, 12885, 829, 13, 33295, 19510, 6759, 29487, 8019, 13, 8071, 2052, 13, 33952, 7, 8043, 28, 75, 16, 58, 15, 4083, 1136, 62, 8043, 22784, 6167, 28, 36690, 58, 74, 46570, 28531, 58, 74, 60, 4008, 198, 220, 220, 220, 611, 14367, 290, 479, 855, 6, 45313, 62, 22296, 20, 6, 393, 479, 855, 6, 2815, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 16, 13, 20797, 62, 23395, 7, 87, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 532, 336, 7959, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 1343, 336, 7959, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3124, 796, 300, 16, 58, 15, 4083, 1136, 62, 8043, 22784, 17130, 28, 15, 13, 17, 11, 374, 1603, 1143, 796, 6407, 8, 198, 198, 1640, 479, 287, 8251, 25, 198, 220, 220, 220, 42287, 796, 17635, 198, 220, 220, 220, 1928, 796, 17635, 198, 220, 220, 220, 336, 9310, 796, 17635, 198, 220, 220, 220, 329, 357, 74, 16, 11, 85, 16, 8, 287, 360, 17, 58, 15, 4083, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 611, 479, 16, 13, 19796, 7, 74, 8, 6624, 657, 290, 18896, 7, 35, 17, 58, 15, 7131, 74, 16, 12962, 14512, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 45941, 13, 283, 858, 7, 3064, 11, 838, 9, 11925, 7, 35, 17, 58, 15, 7131, 74, 16, 7131, 15, 12962, 10, 16, 11, 1802, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1928, 13, 33295, 7, 37659, 13, 32604, 7, 35, 17, 58, 15, 7131, 74, 16, 4357, 22704, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 9310, 13, 33295, 7, 17, 14, 37659, 13, 31166, 17034, 7, 11925, 7, 35, 17, 58, 15, 7131, 74, 16, 60, 4008, 9, 7, 37659, 13, 19282, 7, 35, 17, 58, 15, 7131, 74, 16, 4357, 22704, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 33295, 7, 74, 16, 13, 35312, 7203, 62, 4943, 58, 12, 16, 12962, 198, 220, 220, 220, 611, 18896, 7, 14664, 8, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 317, 796, 45941, 13, 85, 25558, 7, 14664, 8, 198, 220, 220, 220, 347, 796, 45941, 13, 85, 25558, 7, 301, 9310, 8, 198, 220, 220, 220, 220, 2340, 796, 45941, 13, 853, 9806, 7, 32, 11, 16488, 28, 15, 8, 198, 220, 220, 220, 38779, 796, 45941, 13, 18747, 26933, 32, 58, 2340, 58, 72, 4357, 1312, 60, 329, 1312, 287, 2837, 7, 11925, 7, 2340, 4008, 12962, 198, 220, 220, 220, 336, 7959, 796, 45941, 13, 18747, 26933, 33, 58, 2340, 58, 72, 4357, 1312, 60, 329, 1312, 287, 2837, 7, 11925, 7, 2340, 4008, 12962, 628, 220, 220, 220, 611, 479, 6624, 705, 45313, 62, 22296, 20, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 38779, 796, 45941, 13, 32604, 7, 35, 17, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 6, 4357, 16488, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 198, 220, 220, 220, 220, 220, 220, 220, 336, 7959, 796, 362, 14, 37659, 13, 31166, 17034, 7, 11925, 7, 35, 17, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 20520, 4008, 9, 7, 37659, 13, 19282, 7, 35, 17, 58, 15, 7131, 6, 45313, 62, 22296, 20, 62, 15, 13, 25257, 6, 4357, 16488, 28, 15, 38381, 24, 3712, 940, 60, 14, 87, 8, 628, 220, 220, 220, 300, 16, 796, 7877, 17, 13, 29487, 7, 87, 11, 30300, 11, 81, 1603, 1143, 28, 17821, 11, 9493, 413, 5649, 28, 17, 13, 15, 11, 6167, 28, 36690, 58, 74, 4357, 3124, 28, 18716, 829, 58, 74, 7131, 15, 4357, 9493, 10992, 28, 18716, 829, 58, 74, 7131, 16, 12962, 198, 220, 220, 220, 611, 14367, 290, 479, 855, 6, 45313, 62, 22296, 20, 6, 393, 479, 855, 6, 2815, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 17, 13, 20797, 62, 23395, 7, 87, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 532, 336, 7959, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 38779, 1343, 336, 7959, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3124, 796, 300, 16, 58, 15, 4083, 1136, 62, 8043, 22784, 17130, 28, 15, 13, 17, 11, 374, 1603, 1143, 796, 6407, 8, 198, 198, 489, 83, 13, 6015, 10786, 10331, 3256, 2546, 28, 1507, 8, 198, 489, 83, 13, 6015, 10044, 4105, 17816, 5239, 13, 385, 316, 1069, 20520, 796, 6407, 198, 489, 83, 13, 6015, 10786, 10331, 3256, 1641, 11639, 82, 504, 12, 2655, 361, 11537, 198, 198, 2235, 12176, 16, 318, 6579, 35972, 198, 83, 3378, 28, 897, 16, 13, 1136, 62, 20760, 3378, 3419, 198, 4798, 7, 83, 3378, 8, 198, 897, 16, 13, 2617, 62, 88, 2475, 7, 17, 13, 1314, 11, 362, 13, 2327, 8, 198, 4798, 7203, 34149, 331, 2475, 284, 4064, 15, 13, 17, 69, 11, 4064, 15, 13, 17, 69, 1, 4064, 357, 83, 3378, 58, 18, 4357, 36066, 58, 11925, 7, 83, 3378, 13219, 17, 60, 4008, 198, 83, 3378, 796, 7877, 16, 13, 1136, 62, 20760, 3378, 3419, 198, 4798, 7, 83, 3378, 8, 198, 83, 3378, 796, 14631, 1600, 366, 1600, 366, 17, 13, 17, 1600, 366, 1600, 366, 17, 13, 18, 1600, 366, 8973, 198, 897, 16, 13, 2617, 62, 20760, 624, 23912, 1424, 7, 83, 3378, 11, 7857, 28, 1238, 8, 198, 83, 3378, 796, 37250, 3256, 705, 3256, 705, 49388, 3256, 705, 3256, 705, 2167, 405, 3256, 705, 3256, 705, 18, 2388, 20520, 198, 897, 16, 13, 2617, 62, 87, 2475, 7, 12825, 11, 3261, 830, 8, 198, 897, 16, 13, 2617, 62, 742, 624, 23912, 1424, 7, 83, 3378, 11, 7857, 28, 1238, 8, 198, 198, 2, 12176, 17, 318, 16551, 0, 198, 83, 3378, 28, 897, 17, 13, 1136, 62, 20760, 3378, 3419, 198, 4798, 7, 83, 3378, 8, 198, 897, 17, 13, 2617, 62, 88, 2475, 7, 17, 13, 3829, 11, 18, 13, 1065, 8, 198, 4798, 7203, 34149, 331, 2475, 284, 4064, 15, 13, 17, 69, 11, 4064, 15, 13, 17, 69, 1, 4064, 357, 83, 3378, 58, 18, 4357, 513, 13, 1314, 4008, 198, 83, 3378, 28, 897, 17, 13, 1136, 62, 20760, 3378, 3419, 198, 4798, 7, 83, 3378, 8, 198, 83, 3378, 796, 14631, 1600, 366, 17, 13, 24, 1600, 366, 1600, 366, 18, 13, 15, 1600, 366, 1600, 366, 18, 13, 16, 8973, 198, 897, 17, 13, 2617, 62, 20760, 624, 23912, 1424, 7, 83, 3378, 11, 7857, 28, 1238, 8, 198, 83, 3378, 796, 37250, 3256, 705, 3256, 705, 49388, 3256, 705, 3256, 705, 2167, 405, 3256, 705, 3256, 705, 18, 2388, 20520, 198, 897, 17, 13, 2617, 62, 87, 2475, 7, 12825, 11, 3933, 830, 8, 198, 897, 17, 13, 2617, 62, 742, 624, 23912, 1424, 7, 83, 3378, 11, 7857, 28, 1238, 8, 198, 198, 489, 83, 13, 1416, 64, 7, 897, 8, 198, 489, 83, 13, 2645, 9608, 10786, 26287, 6721, 11537, 198, 198, 489, 83, 13, 87, 18242, 10786, 15057, 286, 12213, 357, 51, 8, 11537, 198, 1455, 796, 7877, 17, 13, 1455, 437, 26933, 87, 58, 16, 60, 329, 2124, 287, 8177, 12885, 829, 4357, 1179, 11639, 45828, 3641, 3256, 275, 3524, 62, 1462, 62, 3702, 273, 16193, 12, 15, 13, 16, 11, 532, 15, 13, 1314, 828, 14996, 3524, 28, 25101, 11, 9082, 28, 25101, 11, 299, 4033, 28, 22, 11, 5739, 261, 28, 25101, 11, 10331, 7857, 28, 1507, 8, 198, 1640, 1232, 26801, 287, 1232, 13, 1455, 437, 12885, 829, 25, 198, 220, 220, 220, 1232, 26801, 13, 2617, 62, 2815, 413, 5649, 7, 19, 13, 15, 8, 198, 198, 489, 83, 13, 1416, 64, 7, 897, 16, 8, 198, 926, 16, 796, 458, 83, 13, 7839, 10786, 27354, 292, 316, 25, 6579, 35972, 3256, 10331, 7857, 28, 1507, 8, 198, 926, 16, 13, 2617, 62, 9150, 26933, 15, 13, 20, 11, 352, 13, 2999, 12962, 198, 489, 83, 13, 1416, 64, 7, 897, 17, 8, 198, 926, 17, 796, 458, 83, 13, 7839, 10786, 27354, 292, 316, 25, 16551, 0, 3256, 10331, 7857, 28, 1507, 8, 198, 926, 17, 13, 2617, 62, 9150, 26933, 15, 13, 20, 11, 352, 13, 2999, 12962, 198, 489, 83, 13, 70, 12993, 22446, 7266, 489, 1747, 62, 23032, 7, 22487, 28, 15, 13, 1495, 8, 198, 361, 943, 14542, 13, 21928, 25, 198, 220, 220, 220, 458, 83, 13, 21928, 5647, 7203, 40720, 5647, 82, 14, 489, 1747, 62, 8094, 276, 13, 11134, 1600, 5794, 11639, 11134, 3256, 288, 14415, 28, 3064, 11, 275, 3524, 62, 45457, 11639, 33464, 11537, 198, 220, 220, 220, 458, 83, 13, 21928, 5647, 7203, 40720, 5647, 82, 14, 489, 1747, 62, 8094, 276, 13, 12315, 1600, 5794, 11639, 12315, 3256, 288, 14415, 28, 3064, 11, 275, 3524, 62, 45457, 11639, 33464, 11537, 198, 17772, 25, 198, 220, 220, 220, 458, 83, 13, 12860, 3419, 628, 198, 2235, 357, 35, 11651, 8, 1400, 4097, 198, 2235, 357, 35, 11651, 8, 19736, 1343, 4296, 8177, 198, 2235, 357, 35, 11651, 8, 1400, 8177, 5739, 198, 2235, 357, 35, 11651, 8, 10369, 318, 1165, 1263, 198, 2235, 2272, 1022, 3670, 290, 7110, 198, 2235, 2272, 1022, 331, 18242, 290, 331, 83, 3378, 198, 198, 2235, 3497, 350, 12, 27160, 357, 8957, 1202, 256, 9288, 290, 3218, 256, 9288, 8, 198 ]
1.948012
2,943
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # import os # First party modules # from fasta import FASTQ from plumbing.check_cmd_found import check_cmd from plumbing.cache import property_cached from autopaths.tmp_path import new_temp_dir, new_temp_path # Third party modules # import sh ############################################################################### class MothurUchime: """ Takes care of detecting and removing chimeric reads, by calling `mothur.uchime` as seen in: https://github.com/novigit/broCode/blob/master/pbamp/readCurationPipeline.sh#L103 mothur "#chimera.uchime(fasta=roi.$sample.rhq.trim.fwdrev.pol.fasta, reference=self, chunks=16, abskew=1, chimealns=T)" mothur "#remove.seqs(fasta=roi.$sample.rhq.trim.fwdrev.pol.fasta, accnos=roi.$sample.rhq.trim.fwdrev.pol.denovo.uchime.accnos)" In case of missing output see: https://forum.mothur.org/t/chimera-uchime-does-not-produce-any-output/20621 """ #------------------------------ Running ----------------------------------# #------------------------------- Results ---------------------------------# def __bool__(self): """ Return True if the chimeras software was run already and the results are stored on the filesystem. Return False if it was not yet run. """ return self.dest.exists @property_cached ############################################################################### class ChimerasResults(FASTQ): """A file with the results from chimeras.""" pass
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 25354, 416, 15257, 34927, 13, 198, 36393, 49962, 13, 198, 17829, 379, 7324, 13, 31369, 27659, 13, 65, 952, 198, 37811, 198, 198, 2, 28477, 12, 259, 13103, 1303, 198, 11748, 28686, 198, 198, 2, 3274, 2151, 13103, 1303, 198, 6738, 3049, 64, 1330, 376, 11262, 48, 198, 6738, 40199, 13, 9122, 62, 28758, 62, 9275, 1330, 2198, 62, 28758, 198, 6738, 40199, 13, 23870, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 3119, 62, 66, 2317, 198, 6738, 1960, 18569, 82, 13, 22065, 62, 6978, 220, 220, 220, 220, 220, 220, 1330, 649, 62, 29510, 62, 15908, 11, 649, 62, 29510, 62, 6978, 198, 198, 2, 10467, 2151, 13103, 1303, 198, 11748, 427, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 4871, 337, 849, 333, 52, 354, 524, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 33687, 1337, 286, 31521, 290, 10829, 18205, 35626, 9743, 11, 416, 4585, 198, 220, 220, 220, 4600, 76, 849, 333, 13, 794, 524, 63, 355, 1775, 287, 25, 628, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 37302, 328, 270, 14, 7957, 10669, 14, 2436, 672, 14, 9866, 14, 40842, 696, 14, 961, 34, 3924, 47, 541, 4470, 13, 1477, 2, 43, 15197, 628, 220, 220, 220, 44400, 333, 25113, 354, 320, 8607, 13, 794, 524, 7, 7217, 64, 28, 305, 72, 48082, 39873, 13, 17179, 80, 13, 2213, 320, 13, 69, 16993, 18218, 13, 16104, 13, 7217, 64, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4941, 28, 944, 11, 22716, 28, 1433, 11, 2352, 365, 86, 28, 16, 11, 442, 524, 282, 5907, 28, 51, 16725, 198, 220, 220, 220, 44400, 333, 25113, 28956, 13, 41068, 82, 7, 7217, 64, 28, 305, 72, 48082, 39873, 13, 17179, 80, 13, 2213, 320, 13, 69, 16993, 18218, 13, 16104, 13, 7217, 64, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 697, 39369, 28, 305, 72, 48082, 39873, 13, 17179, 80, 13, 2213, 320, 13, 69, 16993, 18218, 13, 16104, 13, 6559, 18768, 13, 794, 524, 13, 4134, 39369, 16725, 628, 220, 220, 220, 554, 1339, 286, 4814, 5072, 766, 25, 628, 220, 220, 220, 3740, 1378, 27302, 13, 76, 849, 333, 13, 2398, 14, 83, 14, 354, 320, 8607, 12, 794, 524, 12, 22437, 12, 1662, 12, 18230, 344, 12, 1092, 12, 22915, 14, 22136, 2481, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 1783, 26171, 18162, 20368, 438, 2, 628, 220, 220, 220, 1303, 1783, 24305, 15691, 20368, 12, 2, 198, 220, 220, 220, 825, 11593, 30388, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 6407, 611, 262, 18205, 263, 292, 3788, 373, 1057, 1541, 290, 262, 2482, 389, 198, 220, 220, 220, 220, 220, 220, 220, 8574, 319, 262, 29905, 13, 8229, 10352, 611, 340, 373, 407, 1865, 1057, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 16520, 13, 1069, 1023, 628, 220, 220, 220, 2488, 26745, 62, 66, 2317, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 4871, 609, 22723, 292, 25468, 7, 37, 11262, 48, 2599, 198, 220, 220, 220, 37227, 32, 2393, 351, 262, 2482, 422, 18205, 263, 292, 526, 15931, 198, 220, 220, 220, 1208 ]
2.778675
619
''' Read and write Olympia state files. ''' import os import os.path import sys from contextlib import redirect_stdout from .oid import to_oid from .formatters import print_one_thing, read_oly_file def fixup_ms(data): ''' For whatever reason, the value in IM/ms needs to have a trailing space ''' for box in data: if 'IM' in data[box]: if 'ms' in data[box]['IM']: value = data[box]['IM']['ms'] value[0] = value[0].strip() + ' ' data[box]['IM']['ms'] = value def write_oly_file(data, kind=False, verbose=False): ''' The main function that drives outputting a file ''' fixup_ms(data) order = sorted([int(box) for box in data.keys()]) count = 0 for box in order: box = str(box) if kind: if ' '+kind+' ' not in data[box].get('firstline', '')[0]: continue print_one_thing(data[box]) del data[box] count += 1 if verbose: print('wrote', count, verbose, 'boxes.', file=sys.stderr) def read_players(dir, verbose=False): ''' read every fie in dir whose name is an integer ''' ret = {} files = os.listdir(dir) for name in files: if name.isdigit(): data = read_oly_file(os.path.join(dir, name), verbose='player ' + name) ret.update(data) return ret
[ 7061, 6, 198, 5569, 290, 3551, 45760, 1181, 3696, 13, 198, 7061, 6, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 6738, 4732, 8019, 1330, 18941, 62, 19282, 448, 198, 198, 6738, 764, 1868, 1330, 284, 62, 1868, 198, 6738, 764, 18982, 1010, 1330, 3601, 62, 505, 62, 1197, 11, 1100, 62, 3366, 62, 7753, 628, 198, 4299, 4259, 929, 62, 907, 7, 7890, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1114, 4232, 1738, 11, 262, 1988, 287, 8959, 14, 907, 2476, 284, 423, 257, 25462, 2272, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 329, 3091, 287, 1366, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 705, 3955, 6, 287, 1366, 58, 3524, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 705, 907, 6, 287, 1366, 58, 3524, 7131, 6, 3955, 6, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 796, 1366, 58, 3524, 7131, 6, 3955, 6, 7131, 6, 907, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 58, 15, 60, 796, 1988, 58, 15, 4083, 36311, 3419, 1343, 705, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 3524, 7131, 6, 3955, 6, 7131, 6, 907, 20520, 796, 1988, 628, 198, 4299, 3551, 62, 3366, 62, 7753, 7, 7890, 11, 1611, 28, 25101, 11, 15942, 577, 28, 25101, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 383, 1388, 2163, 326, 10182, 5072, 889, 257, 2393, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, 4259, 929, 62, 907, 7, 7890, 8, 628, 220, 220, 220, 1502, 796, 23243, 26933, 600, 7, 3524, 8, 329, 3091, 287, 1366, 13, 13083, 3419, 12962, 628, 220, 220, 220, 954, 796, 657, 198, 220, 220, 220, 329, 3091, 287, 1502, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3091, 796, 965, 7, 3524, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1611, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 705, 705, 10, 11031, 10, 6, 705, 407, 287, 1366, 58, 3524, 4083, 1136, 10786, 11085, 1370, 3256, 10148, 38381, 15, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 505, 62, 1197, 7, 7890, 58, 3524, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 1366, 58, 3524, 60, 198, 220, 220, 220, 220, 220, 220, 220, 954, 15853, 352, 628, 220, 220, 220, 611, 15942, 577, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 42910, 3256, 954, 11, 15942, 577, 11, 705, 29305, 2637, 11, 2393, 28, 17597, 13, 301, 1082, 81, 8, 628, 198, 198, 4299, 1100, 62, 32399, 7, 15908, 11, 15942, 577, 28, 25101, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1100, 790, 277, 494, 287, 26672, 3025, 1438, 318, 281, 18253, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1005, 796, 23884, 198, 220, 220, 220, 3696, 796, 28686, 13, 4868, 15908, 7, 15908, 8, 198, 220, 220, 220, 329, 1438, 287, 3696, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1438, 13, 9409, 328, 270, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1100, 62, 3366, 62, 7753, 7, 418, 13, 6978, 13, 22179, 7, 15908, 11, 1438, 828, 15942, 577, 11639, 7829, 705, 1343, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1005, 13, 19119, 7, 7890, 8, 198, 220, 220, 220, 1441, 1005, 628, 628, 198 ]
2.196875
640
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
from L1TriggerConfig.CSCTFConfigProducers.CSCTFConfigOnline_cfi import * #from L1TriggerConfig.CSCTFConfigProducers.CSCTFAlignmentOnline_cfi import * from L1TriggerConfig.CSCTFConfigProducers.L1MuCSCPtLutConfigOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTEtaPatternLutOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTExtLutOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTPhiLutOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTPtaLutOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTQualPatternLutOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTTFParametersOnline_cfi import * from L1TriggerConfig.RPCTriggerConfig.L1RPCConfigOnline_cfi import * from L1TriggerConfig.RPCTriggerConfig.L1RPCConeDefinitionOnline_cfi import * from L1TriggerConfig.RPCTriggerConfig.L1RPCBxOrConfigOnline_cfi import * from L1TriggerConfig.RPCTriggerConfig.L1RPCHsbConfigOnline_cfi import * from L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersOnlineProducer_cfi import * from L1TriggerConfig.L1ScalesProducers.L1MuTriggerPtScaleOnlineProducer_cfi import * from L1TriggerConfig.L1ScalesProducers.L1MuTriggerScalesOnlineProducer_cfi import * L1MuGMTParametersOnlineProducer.ignoreVersionMismatch = True from L1TriggerConfig.RCTConfigProducers.L1RCTParametersOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1EmEtScaleConfigOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1CaloEcalScaleConfigOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1CaloHcalScaleConfigOnline_cfi import * from L1TriggerConfig.GctConfigProducers.L1GctJetFinderParamsOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1HtMissScaleOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1HfRingEtScaleOnline_cfi import * from L1TriggerConfig.L1ScalesProducers.L1JetEtScaleOnline_cfi import * from L1TriggerConfig.L1GtConfigProducers.l1GtParametersOnline_cfi import * from L1TriggerConfig.L1GtConfigProducers.l1GtPsbSetupOnline_cfi import * from L1TriggerConfig.L1GtConfigProducers.l1GtTriggerMenuOnline_cfi import *
[ 6738, 406, 16, 48344, 16934, 13, 7902, 4177, 37, 16934, 11547, 7999, 13, 7902, 4177, 37, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 2, 6738, 406, 16, 48344, 16934, 13, 7902, 4177, 37, 16934, 11547, 7999, 13, 7902, 4177, 37, 2348, 16747, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 7902, 4177, 37, 16934, 11547, 7999, 13, 43, 16, 33239, 34, 48956, 83, 43, 315, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 35, 9328, 8326, 47546, 43, 315, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 35, 9328, 742, 43, 315, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 24544, 2725, 72, 43, 315, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 35, 7250, 8326, 43, 315, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 24544, 46181, 47546, 43, 315, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 24544, 24802, 37, 5540, 13, 43, 16, 33239, 35, 15751, 5837, 41158, 7307, 14439, 62, 66, 12463, 1330, 1635, 198, 198, 6738, 406, 16, 48344, 16934, 13, 49, 5662, 48344, 16934, 13, 43, 16, 49, 5662, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 49, 5662, 48344, 16934, 13, 43, 16, 20031, 4093, 505, 36621, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 49, 5662, 48344, 16934, 13, 43, 16, 49, 5662, 33, 87, 5574, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 49, 5662, 48344, 16934, 13, 43, 16, 20031, 3398, 36299, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 198, 6738, 406, 16, 48344, 16934, 13, 49424, 16934, 11547, 7999, 13, 43, 16, 33239, 15548, 7250, 41158, 7307, 14439, 11547, 2189, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 33239, 48344, 47, 83, 29990, 14439, 11547, 2189, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 33239, 48344, 3351, 2040, 14439, 11547, 2189, 62, 66, 12463, 1330, 1635, 198, 43, 16, 33239, 15548, 7250, 41158, 7307, 14439, 11547, 2189, 13, 46430, 14815, 44, 1042, 963, 796, 6407, 198, 198, 6738, 406, 16, 48344, 16934, 13, 49, 4177, 16934, 11547, 7999, 13, 43, 16, 49, 4177, 48944, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 10161, 36, 83, 29990, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 34, 7335, 36, 9948, 29990, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 34, 7335, 39, 9948, 29990, 16934, 14439, 62, 66, 12463, 1330, 1635, 198, 198, 6738, 406, 16, 48344, 16934, 13, 38, 310, 16934, 11547, 7999, 13, 43, 16, 38, 310, 42273, 37, 5540, 10044, 4105, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 39, 83, 17140, 29990, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 39, 69, 39687, 36, 83, 29990, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 3351, 2040, 11547, 7999, 13, 43, 16, 42273, 36, 83, 29990, 14439, 62, 66, 12463, 1330, 1635, 198, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 38, 83, 16934, 11547, 7999, 13, 75, 16, 38, 83, 48944, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 38, 83, 16934, 11547, 7999, 13, 75, 16, 38, 83, 12016, 65, 40786, 14439, 62, 66, 12463, 1330, 1635, 198, 6738, 406, 16, 48344, 16934, 13, 43, 16, 38, 83, 16934, 11547, 7999, 13, 75, 16, 38, 83, 48344, 23381, 14439, 62, 66, 12463, 1330, 1635, 198 ]
2.841463
738
from .base import db
[ 6738, 764, 8692, 1330, 20613, 628 ]
3.666667
6
import pulsar as psr
[ 11748, 22271, 283, 355, 26692, 81, 198 ]
3
7
# -*- coding: utf-8 -*- """ This package includes the Flask blueprint and all related functionality for displaying system information. """ from .blueprint import blueprint from .status_item import StatusItem from .status_group import StatusGroup import orchard.system_status.views # NOQA __all__ = ['blueprint', 'StatusGroup', 'StatusItem']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 770, 5301, 3407, 262, 46947, 30881, 290, 477, 3519, 11244, 329, 19407, 1080, 198, 220, 220, 220, 1321, 13, 198, 37811, 198, 198, 6738, 764, 17585, 4798, 1330, 30881, 198, 6738, 764, 13376, 62, 9186, 1330, 12678, 7449, 198, 6738, 764, 13376, 62, 8094, 1330, 12678, 13247, 198, 198, 11748, 393, 30215, 13, 10057, 62, 13376, 13, 33571, 220, 1303, 8005, 48, 32, 198, 198, 834, 439, 834, 796, 37250, 17585, 4798, 3256, 705, 19580, 13247, 3256, 705, 19580, 7449, 20520, 198 ]
3.470588
102
# embedded validation code, run from C # input vars: PRODUCT, QUANTITY, BUYER # output vars: ERRORS, WARNINGS import string # all python tools are available to embedded code import inventory # plus C extensions, Python modules, classes,.. msgs, errs = [], [] # warning, error message lists first, last = BUYER[0], BUYER[1:] # code is changeable on-site: if first not in string.uppercase: # this file is run as one long errs.append('buyer-name:' + first) # code-string, with input and if BUYER not in inventory.buyers(): # output vars used by the C app msgs.append('new-buyer-added') inventory.add_buyer(BUYER) validate_order() ERRORS = ' '.join(errs) # add a space between messages WARNINGS = ' '.join(msgs) # pass out as strings: "" == none
[ 2, 14553, 21201, 2438, 11, 1057, 422, 327, 201, 198, 2, 5128, 410, 945, 25, 220, 41458, 11, 19604, 8643, 9050, 11, 20571, 56, 1137, 201, 198, 2, 5072, 410, 945, 25, 33854, 50, 11, 39410, 50, 201, 198, 201, 198, 11748, 4731, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 477, 21015, 4899, 389, 1695, 284, 14553, 2438, 201, 198, 11748, 13184, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5556, 327, 18366, 11, 11361, 13103, 11, 6097, 11, 492, 201, 198, 907, 14542, 11, 1931, 3808, 796, 685, 4357, 17635, 220, 220, 220, 220, 220, 220, 220, 1303, 6509, 11, 4049, 3275, 8341, 201, 198, 201, 198, 11085, 11, 938, 796, 20571, 56, 1137, 58, 15, 4357, 20571, 56, 1137, 58, 16, 47715, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2438, 318, 1487, 540, 319, 12, 15654, 25, 201, 198, 361, 717, 407, 287, 4731, 13, 7211, 2798, 589, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 428, 2393, 318, 1057, 355, 530, 890, 201, 198, 220, 220, 220, 1931, 3808, 13, 33295, 10786, 17846, 263, 12, 3672, 32105, 1343, 717, 8, 220, 220, 220, 220, 220, 220, 1303, 2438, 12, 8841, 11, 351, 5128, 290, 201, 198, 361, 20571, 56, 1137, 407, 287, 13184, 13, 17846, 364, 33529, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5072, 410, 945, 973, 416, 262, 327, 598, 201, 198, 220, 220, 220, 13845, 14542, 13, 33295, 10786, 3605, 12, 17846, 263, 12, 29373, 11537, 201, 198, 220, 220, 220, 13184, 13, 2860, 62, 17846, 263, 7, 19499, 56, 1137, 8, 201, 198, 12102, 378, 62, 2875, 3419, 201, 198, 201, 198, 24908, 50, 220, 220, 796, 705, 45302, 22179, 7, 263, 3808, 8, 220, 220, 220, 220, 220, 1303, 751, 257, 2272, 1022, 6218, 201, 198, 31502, 50, 796, 705, 45302, 22179, 7, 907, 14542, 8, 220, 220, 220, 220, 220, 1303, 1208, 503, 355, 13042, 25, 13538, 6624, 4844, 201, 198, 201, 198 ]
2.484058
345
from typing import Any, Dict, Iterable, List, Text from ..common import FeatureSet class SessionFeatureSet(FeatureSet): """ This class represents a session's set of features. """ def __init__(self, features: Dict[Text, Any], aura_id_name="AURA_ID", aura_id_global_name="AURA_ID_GLOBAL", session_id_name="SESSION_ID"): """ :param features: dictionary of features. :param aura_id_name: the name of the aura_id feature. :param aura_id_global_name: the name of the aura_id_global feature. :param session_id_name: the name of the session_id feature. """ super().__init__(features) self.aura_id_name = aura_id_name self.aura_id_global_name = aura_id_global_name self.session_id_name = session_id_name @property @property @property @classmethod def build_from_row(cls, values: List[Any], names: List[Text], aura_id_name="AURA_ID", aura_id_global_name="AURA_ID_GLOBAL"): """ Build a SessionFeaturesSet from the contents of a row (composed of a list of values and corresponding names). :param values: list of feature values. :param names: list of the corresponding names. :param aura_id_name: the name of the aura_id feature. :param aura_id_global_name: the name of the aura_id_global feature. :param session_id_name: the name of the session_id feature. """ return SessionFeatureSet(cls.build_features(values, names), aura_id_name=aura_id_name, aura_id_global_name=aura_id_global_name, session_id_name=aura_id_global_name) class SessionClusterModel(object): """ This class represents a clustering model for sessions. """ def predict(self, X: Iterable[SessionFeatureSet], **kwargs) -> List[int]: """ Predict the fittest cluster for a list of sessions. :param X: List of sessions to cluster. :return: List with the ids of the fittest clusters. """ raise NotImplementedError("{} is an abstract class and cannot be directly instantiated. " "The method predict must be implemented!".format(self.__class__)) def fit(self, X: Iterable[SessionFeatureSet], **kwargs): """ :param X: List of sessions to cluster. :param kwargs: """ raise NotImplementedError("{} is an abstract class and cannot be directly instantiated. " "The method fit must be implemented!".format(self.__class__))
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 7343, 11, 8255, 198, 198, 6738, 11485, 11321, 1330, 27018, 7248, 628, 198, 4871, 23575, 38816, 7248, 7, 38816, 7248, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 6870, 257, 6246, 338, 900, 286, 3033, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3033, 25, 360, 713, 58, 8206, 11, 4377, 4357, 22491, 62, 312, 62, 3672, 2625, 26830, 3861, 62, 2389, 1600, 22491, 62, 312, 62, 20541, 62, 3672, 2625, 26830, 3861, 62, 2389, 62, 8763, 9864, 1847, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6246, 62, 312, 62, 3672, 2625, 50, 47621, 62, 2389, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3033, 25, 22155, 286, 3033, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 22491, 62, 312, 62, 3672, 25, 262, 1438, 286, 262, 22491, 62, 312, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 22491, 62, 312, 62, 20541, 62, 3672, 25, 262, 1438, 286, 262, 22491, 62, 312, 62, 20541, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6246, 62, 312, 62, 3672, 25, 262, 1438, 286, 262, 6246, 62, 312, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 22446, 834, 15003, 834, 7, 40890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 33830, 62, 312, 62, 3672, 796, 22491, 62, 312, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 33830, 62, 312, 62, 20541, 62, 3672, 796, 22491, 62, 312, 62, 20541, 62, 3672, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 29891, 62, 312, 62, 3672, 796, 6246, 62, 312, 62, 3672, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 1382, 62, 6738, 62, 808, 7, 565, 82, 11, 3815, 25, 7343, 58, 7149, 4357, 3891, 25, 7343, 58, 8206, 4357, 22491, 62, 312, 62, 3672, 2625, 26830, 3861, 62, 2389, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22491, 62, 312, 62, 20541, 62, 3672, 2625, 26830, 3861, 62, 2389, 62, 8763, 9864, 1847, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10934, 257, 23575, 23595, 7248, 422, 262, 10154, 286, 257, 5752, 357, 5589, 1335, 286, 257, 1351, 286, 3815, 290, 11188, 3891, 737, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3815, 25, 1351, 286, 3895, 3815, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 3891, 25, 1351, 286, 262, 11188, 3891, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 22491, 62, 312, 62, 3672, 25, 262, 1438, 286, 262, 22491, 62, 312, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 22491, 62, 312, 62, 20541, 62, 3672, 25, 262, 1438, 286, 262, 22491, 62, 312, 62, 20541, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6246, 62, 312, 62, 3672, 25, 262, 1438, 286, 262, 6246, 62, 312, 3895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 23575, 38816, 7248, 7, 565, 82, 13, 11249, 62, 40890, 7, 27160, 11, 3891, 828, 22491, 62, 312, 62, 3672, 28, 33830, 62, 312, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22491, 62, 312, 62, 20541, 62, 3672, 28, 33830, 62, 312, 62, 20541, 62, 3672, 11, 6246, 62, 312, 62, 3672, 28, 33830, 62, 312, 62, 20541, 62, 3672, 8, 628, 198, 4871, 23575, 2601, 5819, 17633, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 6870, 257, 32966, 1586, 2746, 329, 10991, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 4331, 7, 944, 11, 1395, 25, 40806, 540, 58, 36044, 38816, 7248, 4357, 12429, 46265, 22046, 8, 4613, 7343, 58, 600, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 49461, 262, 43500, 395, 13946, 329, 257, 1351, 286, 10991, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1395, 25, 7343, 286, 10991, 284, 13946, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 7343, 351, 262, 220, 2340, 286, 262, 43500, 395, 23163, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 90, 92, 318, 281, 12531, 1398, 290, 2314, 307, 3264, 9113, 12931, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 464, 2446, 4331, 1276, 307, 9177, 48220, 18982, 7, 944, 13, 834, 4871, 834, 4008, 628, 220, 220, 220, 825, 4197, 7, 944, 11, 220, 1395, 25, 40806, 540, 58, 36044, 38816, 7248, 4357, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1395, 25, 7343, 286, 10991, 284, 13946, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 479, 86, 22046, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 90, 92, 318, 281, 12531, 1398, 290, 2314, 307, 3264, 9113, 12931, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 464, 2446, 4197, 1276, 307, 9177, 48220, 18982, 7, 944, 13, 834, 4871, 834, 4008, 198 ]
2.46736
1,057
# -*- coding: utf-8 -*- # This file is part of bw. # Distributed under the terms of the last AGPL License. __author__ = 'Jean Chassoul' import arrow import ujson as json import logging import uuid from tornado import gen def validate_uuid4(uuid_string): ''' Validate that a UUID string is in fact a valid uuid4. Happily, the uuid module does the actual checking for us. ''' try: val = uuid.UUID(uuid_string, version=4) except ValueError: # If it's a value error, then the string # is not a valid hex code for a UUID. return False return str(val) == uuid_string def get_average(total, marks): ''' Get average from signals ''' return float(total) / len(marks) def get_percentage(part, whole): ''' Get percentage of part and whole. ''' return "{0:.0f}%".format(float(part)/whole * 100) @gen.coroutine def check_json(struct): ''' Check for malformed JSON ''' try: message = json.loads(struct) except Exception as error: message = json.dumps({'error': 400}) raise error return message @gen.coroutine def check_times(start, end): ''' Check times ''' try: start = (arrow.get(start) if start else arrow.get(arrow.utcnow().date())) end = (arrow.get(end) if end else start.replace(days=+1)) message = {'start': start.timestamp, 'end': end.timestamp} except Exception as error: logging.exception(error) raise error return message @gen.coroutine def check_times_get_timestamp(start, end): ''' Check times get timestamp ''' try: start = (arrow.get(start) if start else arrow.get(arrow.utcnow().date())) end = (arrow.get(end) if end else start.replace(days=+1)) message = {'start': start.timestamp, 'end': end.timestamp} except Exception as error: logging.exception(error) raise error return message @gen.coroutine def check_times_get_datetime(start, end): ''' Check times get datetime ''' try: start = (arrow.get(start) if start else arrow.get(arrow.utcnow().date())) end = (arrow.get(end) if end else start.replace(days=+1)) message = {'start': start.naive, 'end': end.naive} except Exception as error: logging.exception(error) raise error return message def clean_message(struct): ''' clean message ''' struct = struct.to_native() struct = { key: struct[key] for key in struct if struct[key] is not None } return struct def clean_structure(struct): ''' clean structure ''' struct = struct.to_primitive() struct = { key: struct[key] for key in struct if struct[key] is not None } return struct def clean_results(results): ''' clean results ''' results = results.to_primitive() results = results.get('results') results = [ { key: dic[key] for key in dic if dic[key] is not None } for dic in results ] return {'results': results} def str2bool(boo): ''' String to boolean ''' return boo.lower() in ('yes', 'true', 't', '1')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 318, 636, 286, 275, 86, 13, 198, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 938, 13077, 6489, 13789, 13, 628, 198, 834, 9800, 834, 796, 705, 38248, 609, 562, 2852, 6, 628, 198, 11748, 15452, 198, 11748, 334, 17752, 355, 33918, 198, 11748, 18931, 198, 11748, 334, 27112, 198, 6738, 33718, 1330, 2429, 628, 198, 4299, 26571, 62, 12303, 312, 19, 7, 12303, 312, 62, 8841, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3254, 20540, 326, 257, 471, 27586, 4731, 318, 287, 198, 220, 220, 220, 220, 220, 220, 220, 1109, 257, 4938, 334, 27112, 19, 13, 628, 220, 220, 220, 220, 220, 220, 220, 18321, 813, 11, 262, 334, 27112, 8265, 857, 262, 4036, 198, 220, 220, 220, 220, 220, 220, 220, 10627, 329, 514, 13, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 334, 27112, 13, 52, 27586, 7, 12303, 312, 62, 8841, 11, 2196, 28, 19, 8, 198, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 340, 338, 257, 1988, 4049, 11, 788, 262, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 318, 407, 257, 4938, 17910, 2438, 329, 257, 471, 27586, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 1441, 965, 7, 2100, 8, 6624, 334, 27112, 62, 8841, 628, 198, 4299, 651, 62, 23913, 7, 23350, 11, 8849, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 2811, 422, 10425, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1441, 12178, 7, 23350, 8, 1220, 18896, 7, 14306, 8, 628, 198, 4299, 651, 62, 25067, 496, 7, 3911, 11, 2187, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 5873, 286, 636, 290, 2187, 13, 628, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1441, 45144, 15, 25, 13, 15, 69, 92, 4, 1911, 18982, 7, 22468, 7, 3911, 20679, 1929, 2305, 1635, 1802, 8, 628, 198, 31, 5235, 13, 10215, 28399, 198, 4299, 2198, 62, 17752, 7, 7249, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 6822, 329, 6428, 12214, 19449, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 33918, 13, 46030, 7, 7249, 8, 198, 220, 220, 220, 2845, 35528, 355, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 33918, 13, 67, 8142, 15090, 6, 18224, 10354, 7337, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 4049, 198, 220, 220, 220, 1441, 3275, 628, 198, 31, 5235, 13, 10215, 28399, 198, 4299, 2198, 62, 22355, 7, 9688, 11, 886, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 6822, 1661, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 923, 796, 357, 6018, 13, 1136, 7, 9688, 8, 611, 923, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 15452, 13, 1136, 7, 6018, 13, 315, 66, 2197, 22446, 4475, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 796, 357, 6018, 13, 1136, 7, 437, 8, 611, 886, 2073, 923, 13, 33491, 7, 12545, 28, 10, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 6, 9688, 10354, 923, 13, 16514, 27823, 11, 705, 437, 10354, 886, 13, 16514, 27823, 92, 198, 220, 220, 220, 2845, 35528, 355, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 1069, 4516, 7, 18224, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 4049, 198, 220, 220, 220, 1441, 3275, 628, 198, 31, 5235, 13, 10215, 28399, 198, 4299, 2198, 62, 22355, 62, 1136, 62, 16514, 27823, 7, 9688, 11, 886, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 6822, 1661, 651, 41033, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 923, 796, 357, 6018, 13, 1136, 7, 9688, 8, 611, 923, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 15452, 13, 1136, 7, 6018, 13, 315, 66, 2197, 22446, 4475, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 796, 357, 6018, 13, 1136, 7, 437, 8, 611, 886, 2073, 923, 13, 33491, 7, 12545, 28, 10, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 6, 9688, 10354, 923, 13, 16514, 27823, 11, 705, 437, 10354, 886, 13, 16514, 27823, 92, 198, 220, 220, 220, 2845, 35528, 355, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 1069, 4516, 7, 18224, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 4049, 198, 220, 220, 220, 1441, 3275, 628, 198, 31, 5235, 13, 10215, 28399, 198, 4299, 2198, 62, 22355, 62, 1136, 62, 19608, 8079, 7, 9688, 11, 886, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 6822, 1661, 651, 4818, 8079, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 923, 796, 357, 6018, 13, 1136, 7, 9688, 8, 611, 923, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 15452, 13, 1136, 7, 6018, 13, 315, 66, 2197, 22446, 4475, 3419, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 796, 357, 6018, 13, 1136, 7, 437, 8, 611, 886, 2073, 923, 13, 33491, 7, 12545, 28, 10, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 6, 9688, 10354, 923, 13, 2616, 425, 11, 705, 437, 10354, 886, 13, 2616, 425, 92, 198, 220, 220, 220, 2845, 35528, 355, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 1069, 4516, 7, 18224, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 4049, 198, 220, 220, 220, 1441, 3275, 628, 198, 4299, 3424, 62, 20500, 7, 7249, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3424, 3275, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2878, 796, 2878, 13, 1462, 62, 30191, 3419, 198, 220, 220, 220, 2878, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 1994, 25, 2878, 58, 2539, 60, 329, 1994, 287, 2878, 611, 2878, 58, 2539, 60, 318, 407, 6045, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 1441, 2878, 628, 198, 4299, 3424, 62, 301, 5620, 7, 7249, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3424, 4645, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2878, 796, 2878, 13, 1462, 62, 19795, 1800, 3419, 198, 220, 220, 220, 2878, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 1994, 25, 2878, 58, 2539, 60, 329, 1994, 287, 2878, 611, 2878, 58, 2539, 60, 318, 407, 6045, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 1441, 2878, 628, 198, 4299, 3424, 62, 43420, 7, 43420, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 3424, 2482, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2482, 796, 2482, 13, 1462, 62, 19795, 1800, 3419, 198, 220, 220, 220, 2482, 796, 2482, 13, 1136, 10786, 43420, 11537, 198, 220, 220, 220, 2482, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1994, 25, 288, 291, 58, 2539, 60, 329, 1994, 287, 288, 291, 611, 288, 291, 58, 2539, 60, 318, 407, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 329, 288, 291, 287, 2482, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 1441, 1391, 6, 43420, 10354, 2482, 92, 628, 198, 4299, 965, 17, 30388, 7, 2127, 78, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 10903, 284, 25131, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1441, 22513, 13, 21037, 3419, 287, 19203, 8505, 3256, 705, 7942, 3256, 705, 83, 3256, 705, 16, 11537, 198 ]
2.318498
1,438
from pyox.client import Client, ServiceError
[ 198, 6738, 12972, 1140, 13, 16366, 1330, 20985, 11, 4809, 12331, 198 ]
3.833333
12
from os import system # 重启电脑
[ 6738, 28686, 1330, 1080, 628, 198, 2, 16268, 229, 235, 28938, 107, 18796, 113, 164, 226, 239, 628 ]
1.777778
18
from flask import Flask, request, render_template, jsonify, make_response, redirect, flash, url_for from functools import wraps import re import pyctrl from pyctrl.block import Logger import warnings import importlib import traceback, sys, io from pyctrl.flask import JSONEncoder, JSONDecoder encoder = JSONEncoder(sort_keys = True, indent = 4) decoder = JSONDecoder() # decorators # decode # decode_kwargs_aux # decode_kwargs # json_response # Server class if __name__ == "__main__": try: import os os.environ['RCPY_NO_HANDLERS'] = 't' from pyctrl.rc import Controller debug = False RCPY = True except: from pyctrl.timer import Controller debug = True RCPY = False try: app = Server(__name__) app.config['SECRET_KEY'] = 'secret!' # initialize controller app.set_controller(controller = Controller(period = .01)) # run app app.run(host='0.0.0.0', debug = debug) except: pass finally: sys.exit(0)
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 8543, 62, 28243, 11, 33918, 1958, 11, 787, 62, 26209, 11, 18941, 11, 7644, 11, 19016, 62, 1640, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 302, 198, 198, 11748, 12972, 44755, 198, 6738, 12972, 44755, 13, 9967, 1330, 5972, 1362, 198, 11748, 14601, 198, 11748, 1330, 8019, 198, 11748, 12854, 1891, 11, 25064, 11, 33245, 198, 198, 6738, 12972, 44755, 13, 2704, 2093, 1330, 19449, 27195, 12342, 11, 19449, 10707, 12342, 198, 198, 12685, 12342, 796, 19449, 27195, 12342, 7, 30619, 62, 13083, 796, 6407, 11, 33793, 796, 604, 8, 198, 12501, 12342, 796, 19449, 10707, 12342, 3419, 198, 198, 2, 11705, 2024, 198, 198, 2, 36899, 198, 198, 2, 36899, 62, 46265, 22046, 62, 14644, 198, 220, 220, 220, 220, 198, 2, 36899, 62, 46265, 22046, 198, 198, 2, 33918, 62, 26209, 198, 198, 2, 9652, 1398, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 28686, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 268, 2268, 17816, 7397, 47, 56, 62, 15285, 62, 39, 6981, 43, 4877, 20520, 796, 705, 83, 6, 628, 220, 220, 220, 220, 220, 220, 220, 422, 12972, 44755, 13, 6015, 1330, 22741, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 371, 8697, 56, 796, 6407, 628, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 422, 12972, 44755, 13, 45016, 1330, 22741, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 371, 8697, 56, 796, 10352, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 598, 796, 9652, 7, 834, 3672, 834, 8, 198, 220, 220, 220, 220, 220, 220, 220, 598, 13, 11250, 17816, 23683, 26087, 62, 20373, 20520, 796, 705, 21078, 13679, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 41216, 10444, 198, 220, 220, 220, 220, 220, 220, 220, 598, 13, 2617, 62, 36500, 7, 36500, 796, 22741, 7, 41007, 796, 764, 486, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1057, 598, 198, 220, 220, 220, 220, 220, 220, 220, 598, 13, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14257, 796, 14257, 8, 628, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 3443, 25, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 198 ]
2.30625
480
from django.db.models import Q from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.generics import ListAPIView, CreateAPIView, RetrieveAPIView, RetrieveUpdateAPIView, DestroyAPIView from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from posts.models import Post from .pagination import PostPageNumberPagination from .permissions import IsOwnerOrReadOnly from .serializers import PostCreateUpdateSerializer, PostDetailSerializer, PostListSerializer
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 1334, 62, 30604, 13, 10379, 1010, 1330, 11140, 22417, 11, 8284, 278, 22417, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 7343, 2969, 3824, 769, 11, 13610, 2969, 3824, 769, 11, 4990, 30227, 2969, 3824, 769, 11, 4990, 30227, 10260, 2969, 3824, 769, 11, 19448, 2969, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47649, 3474, 11, 1148, 47649, 3474, 5574, 5569, 10049, 198, 198, 6738, 6851, 13, 27530, 1330, 2947, 198, 6738, 764, 79, 363, 1883, 1330, 2947, 9876, 15057, 47, 363, 1883, 198, 6738, 764, 525, 8481, 1330, 1148, 42419, 5574, 5569, 10049, 198, 6738, 764, 46911, 11341, 1330, 2947, 16447, 10260, 32634, 7509, 11, 2947, 11242, 603, 32634, 7509, 11, 2947, 8053, 32634, 7509 ]
3.849624
133
# by ARTRoyale (A. Lebedev) for ZapRoyale import socket import threading import struct import os import uuid import random # начинаем дебаг global debugmode debugmode = True global gl_server_address gl_server_address = ('***.***.*.**', 9339) if __name__ == "__main__": port_num = 9339 print('[INFO] Proksi podkluchaetsa k portu', port_num) ThreadedServer('0.0.0.0',port_num).listen()
[ 2, 416, 5923, 5446, 726, 1000, 357, 32, 13, 1004, 3077, 1990, 8, 329, 36079, 32027, 1000, 198, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 11748, 2878, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 4738, 198, 198, 2, 12466, 121, 16142, 141, 229, 18849, 22177, 16142, 16843, 43108, 12466, 112, 16843, 140, 109, 16142, 140, 111, 198, 20541, 14257, 14171, 198, 24442, 14171, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 20541, 1278, 62, 15388, 62, 21975, 198, 4743, 62, 15388, 62, 21975, 796, 19203, 8162, 13, 8162, 15885, 13, 1174, 3256, 860, 29626, 8, 220, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2493, 62, 22510, 796, 860, 29626, 198, 220, 220, 220, 3601, 10786, 58, 10778, 60, 1041, 591, 72, 24573, 41582, 48022, 1039, 64, 479, 2493, 84, 3256, 2493, 62, 22510, 8, 198, 220, 220, 220, 14122, 276, 10697, 10786, 15, 13, 15, 13, 15, 13, 15, 3256, 634, 62, 22510, 737, 4868, 268, 3419, 198 ]
2.320225
178
from pydantic import BaseModel # class MetricsOutput(BaseModel): # name: str # metrics: dict
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198, 198, 2, 1398, 3395, 10466, 26410, 7, 14881, 17633, 2599, 198, 2, 220, 220, 220, 220, 1438, 25, 965, 198, 2, 220, 220, 220, 220, 20731, 25, 8633, 628 ]
2.763158
38
from quart import request, jsonify import time from api.models import User from .. import bp import utils request: utils.Request @bp.route("/<int:user_id>/roles", methods=["GET"]) @utils.auth_required async def fetch_user_roles(user_id: int): """Fetch the specific users roles""" query = """ SELECT json_agg(json_build_object( 'name', r.name, 'base', r.base, 'id', r.id::TEXT, 'color', r.color, 'position', r.position, 'permissions', r.permissions::TEXT )) FROM roles r WHERE r.id IN ( SELECT ur.role_id FROM userroles WHERE ur.user_id = $1 ) """ record = await User.pool.fetchval(query, user_id) return jsonify(roles=record)
[ 6738, 28176, 1330, 2581, 11, 33918, 1958, 198, 11748, 640, 198, 198, 6738, 40391, 13, 27530, 1330, 11787, 198, 6738, 11485, 1330, 275, 79, 198, 11748, 3384, 4487, 198, 198, 25927, 25, 3384, 4487, 13, 18453, 628, 198, 31, 46583, 13, 38629, 7203, 14, 27, 600, 25, 7220, 62, 312, 29, 14, 305, 829, 1600, 5050, 28, 14692, 18851, 8973, 8, 198, 31, 26791, 13, 18439, 62, 35827, 198, 292, 13361, 825, 21207, 62, 7220, 62, 305, 829, 7, 7220, 62, 312, 25, 493, 2599, 198, 220, 220, 220, 37227, 37, 7569, 262, 2176, 2985, 9176, 37811, 198, 220, 220, 220, 12405, 796, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 33493, 33918, 62, 9460, 7, 17752, 62, 11249, 62, 15252, 7, 198, 220, 220, 220, 220, 220, 220, 220, 705, 3672, 3256, 374, 13, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8692, 3256, 374, 13, 8692, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 312, 3256, 374, 13, 312, 3712, 32541, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8043, 3256, 374, 13, 8043, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 9150, 3256, 374, 13, 9150, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 8481, 3256, 374, 13, 525, 8481, 3712, 32541, 198, 220, 220, 220, 220, 220, 220, 220, 15306, 198, 220, 220, 220, 220, 220, 220, 220, 16034, 9176, 374, 33411, 374, 13, 312, 3268, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33493, 2956, 13, 18090, 62, 312, 16034, 2836, 305, 829, 33411, 2956, 13, 7220, 62, 312, 796, 720, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1700, 796, 25507, 11787, 13, 7742, 13, 69, 7569, 2100, 7, 22766, 11, 2836, 62, 312, 8, 198, 220, 220, 220, 1441, 33918, 1958, 7, 305, 829, 28, 22105, 8, 198 ]
2.290123
324
import os import torch import argparse import numpy as np import matplotlib.pylab as plt from text import text_to_sequence from model.model import Tacotron2 from hparams import hparams as hps from utils.util import mode, to_var, to_arr from utils.audio import load_wav, save_wav, melspectrogram if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-c', '--ckpt_pth', type = str, default = '', required = True, help = 'path to load checkpoints') parser.add_argument('-n', '--npy_pth', type = str, default = 'dump', help = 'path to save mels') args = parser.parse_args() torch.backends.cudnn.enabled = True torch.backends.cudnn.benchmark = False model = load_model(args.ckpt_pth) flist = files_to_list() for x in flist: ret = infer(x[0], x[1], model) name = x[0].split('/')[-1].split('.wav')[0] if args.npy_pth != '': save_mel(ret, args.npy_pth, name)
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198, 6738, 2420, 1330, 2420, 62, 1462, 62, 43167, 198, 6738, 2746, 13, 19849, 1330, 26075, 313, 1313, 17, 198, 6738, 289, 37266, 1330, 289, 37266, 355, 289, 862, 198, 6738, 3384, 4487, 13, 22602, 1330, 4235, 11, 284, 62, 7785, 11, 284, 62, 3258, 198, 6738, 3384, 4487, 13, 24051, 1330, 3440, 62, 45137, 11, 3613, 62, 45137, 11, 285, 1424, 806, 39529, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 66, 3256, 705, 438, 694, 457, 62, 79, 400, 3256, 2099, 796, 965, 11, 4277, 796, 705, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2672, 796, 6407, 11, 1037, 796, 705, 6978, 284, 3440, 36628, 11537, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 77, 3256, 705, 438, 77, 9078, 62, 79, 400, 3256, 2099, 796, 965, 11, 4277, 796, 705, 39455, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 796, 705, 6978, 284, 3613, 285, 1424, 11537, 628, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 13, 25616, 796, 6407, 198, 220, 220, 220, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 13, 26968, 4102, 796, 10352, 198, 220, 220, 220, 2746, 796, 3440, 62, 19849, 7, 22046, 13, 694, 457, 62, 79, 400, 8, 198, 220, 220, 220, 781, 396, 796, 3696, 62, 1462, 62, 4868, 3419, 198, 220, 220, 220, 329, 2124, 287, 781, 396, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 796, 13249, 7, 87, 58, 15, 4357, 2124, 58, 16, 4357, 2746, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 2124, 58, 15, 4083, 35312, 10786, 14, 11537, 58, 12, 16, 4083, 35312, 7, 4458, 45137, 11537, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 26498, 13, 77, 9078, 62, 79, 400, 14512, 10148, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 62, 17694, 7, 1186, 11, 26498, 13, 77, 9078, 62, 79, 400, 11, 1438, 8, 198 ]
2.315789
437
from typing import Union, Tuple import pandas as pd from sklearn.utils import shuffle from doors_detector.dataset.torch_dataset import TRAIN_SET, TEST_SET, SET from generic_dataset.dataset_manager import DatasetManager from doors_detector.dataset.dataset_doors_final.door_sample import DoorSample, DOOR_LABELS from sklearn.model_selection import train_test_split from doors_detector.dataset.dataset_doors_final.final_doors_dataset import DatasetDoorsFinal
[ 6738, 19720, 1330, 4479, 11, 309, 29291, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 26791, 1330, 36273, 198, 198, 6738, 8215, 62, 15255, 9250, 13, 19608, 292, 316, 13, 13165, 354, 62, 19608, 292, 316, 1330, 29125, 1268, 62, 28480, 11, 43001, 62, 28480, 11, 25823, 198, 6738, 14276, 62, 19608, 292, 316, 13, 19608, 292, 316, 62, 37153, 1330, 16092, 292, 316, 13511, 198, 6738, 8215, 62, 15255, 9250, 13, 19608, 292, 316, 13, 19608, 292, 316, 62, 19559, 62, 20311, 13, 9424, 62, 39873, 1330, 19821, 36674, 11, 8410, 1581, 62, 48780, 37142, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 6738, 8215, 62, 15255, 9250, 13, 19608, 292, 316, 13, 19608, 292, 316, 62, 19559, 62, 20311, 13, 20311, 62, 19559, 62, 19608, 292, 316, 1330, 16092, 292, 316, 5211, 669, 19006, 198 ]
3.06
150
from collections import defaultdict from bisect import bisect # Your TimeMap object will be instantiated and called as such: # obj = TimeMap() # obj.set(key,value,timestamp) # param_2 = obj.get(key,timestamp)
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 47457, 478, 1330, 47457, 478, 628, 198, 198, 2, 3406, 3862, 13912, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 3862, 13912, 3419, 198, 2, 26181, 13, 2617, 7, 2539, 11, 8367, 11, 16514, 27823, 8, 198, 2, 5772, 62, 17, 796, 26181, 13, 1136, 7, 2539, 11, 16514, 27823, 8, 198 ]
3.261538
65
import fileinput import sys import math import time import os import click # prevent pygame from printing their welcome message os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import pygame # Define some basic colors for easy use white = (255, 255, 255) red = (255, 0, 0) black = (0, 0, 0) green = (0, 255, 0) blue = (0, 0, 255) # Screen resolution to use window_dimensions = (1200, 800) # Higher frequency is less updates, lower frequency is more updates (it's a x % frequency == 0) UPDATE_FREQUENCY = 1000 # Only updates every nth triangle, increases clarity in high density datasets # Can also put this to 1 and make the scaling factor larger THINNING_FACTOR = 1 pygame.init() screen = pygame.display.set_mode(window_dimensions) screen.fill(white) font = pygame.font.SysFont("Arial", 12) # TODO: Split label and value for each statistics field time_taken = font.render("time:", True, white, blue) tt_rect = time_taken.get_rect(bottomright=(80, window_dimensions[1] - 65)) screen.blit(time_taken, tt_rect) time_taken_val = font.render(" ", True, white, blue) tt_rect2 = time_taken_val.get_rect(bottomleft=(80, window_dimensions[1] - 65)) screen.blit(time_taken_val, tt_rect2) points_per_second = font.render("avg #pts/s:", True, white, blue) pps_rect = points_per_second.get_rect(bottomright=(80, window_dimensions[1] - 45)) screen.blit(points_per_second, pps_rect) points_per_second_val = font.render(" ", True, white, blue) pps_rect2 = points_per_second_val.get_rect(bottomleft=(80, window_dimensions[1] - 45)) screen.blit(points_per_second_val, pps_rect2) # points_last_minute = font.render(" # pts last minute:", True, white, blue) # plm_rect = points_last_minute.get_rect(bottomright=(80, window_dimensions[1] - 95)) # screen.blit(points_last_minute, plm_rect) # points_last_minute_val = font.render(" ", True, white, blue) # plm_rect2 = points_last_minute_val.get_rect(bottomleft=(80, window_dimensions[1] - 95)) # screen.blit(points_last_minute_val, plm_rect2) total_points = font.render("# pts:", True, white, blue) tp_rect = total_points.get_rect(bottomright=(80, window_dimensions[1] - 25)) screen.blit(total_points, tp_rect) total_points_val = font.render(" ", True, white, blue) tp_rect2 = total_points_val.get_rect(bottomleft=(80, window_dimensions[1] - 25)) screen.blit(total_points_val, tp_rect2) total_triangles = font.render("# triangles:", True, white, blue) ttr_rect = total_triangles.get_rect(bottomright=(80, window_dimensions[1] - 5)) screen.blit(total_triangles, ttr_rect) total_triangles_val = font.render(" ", True, white, blue) ttr_rect2 = total_triangles_val.get_rect(bottomleft=(80, window_dimensions[1] - 5)) screen.blit(total_triangles_val, ttr_rect2) pygame.display.set_caption('sstvis') pygame.display.flip() @click.command() @click.option('--thinning', default=THINNING_FACTOR, help='thinning factor (1 = no thinning)') @click.option('--frequency', default=UPDATE_FREQUENCY, help='Higher frequency is less updates, lower frequency is more updates') if __name__ == "__main__": main()
[ 11748, 2393, 15414, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 3904, 198, 198, 2, 2948, 12972, 6057, 422, 13570, 511, 7062, 3275, 198, 418, 13, 268, 2268, 17816, 47, 56, 47109, 62, 39, 14114, 62, 40331, 15490, 62, 4805, 2662, 11571, 20520, 796, 366, 24717, 1, 198, 11748, 12972, 6057, 198, 198, 2, 2896, 500, 617, 4096, 7577, 329, 2562, 779, 198, 11186, 796, 357, 13381, 11, 14280, 11, 14280, 8, 198, 445, 796, 357, 13381, 11, 657, 11, 657, 8, 198, 13424, 796, 357, 15, 11, 657, 11, 657, 8, 198, 14809, 796, 357, 15, 11, 14280, 11, 657, 8, 198, 17585, 796, 357, 15, 11, 657, 11, 14280, 8, 628, 198, 2, 15216, 6323, 284, 779, 198, 17497, 62, 27740, 5736, 796, 357, 27550, 11, 10460, 8, 198, 198, 2, 16038, 8373, 318, 1342, 5992, 11, 2793, 8373, 318, 517, 5992, 357, 270, 338, 257, 2124, 4064, 8373, 6624, 657, 8, 198, 16977, 62, 37, 2200, 10917, 45155, 796, 8576, 198, 198, 2, 5514, 5992, 790, 299, 400, 22950, 11, 5732, 16287, 287, 1029, 12109, 40522, 198, 2, 1680, 635, 1234, 428, 284, 352, 290, 787, 262, 20796, 5766, 4025, 198, 4221, 1268, 15871, 62, 37, 10659, 1581, 796, 352, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 9612, 796, 12972, 6057, 13, 13812, 13, 2617, 62, 14171, 7, 17497, 62, 27740, 5736, 8, 198, 9612, 13, 20797, 7, 11186, 8, 198, 198, 10331, 796, 12972, 6057, 13, 10331, 13, 44387, 23252, 7203, 32, 4454, 1600, 1105, 8, 198, 198, 2, 16926, 46, 25, 27758, 6167, 290, 1988, 329, 1123, 7869, 2214, 198, 198, 2435, 62, 83, 1685, 796, 10369, 13, 13287, 7203, 2435, 25, 1600, 6407, 11, 2330, 11, 4171, 8, 198, 926, 62, 2554, 796, 640, 62, 83, 1685, 13, 1136, 62, 2554, 7, 22487, 3506, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 6135, 4008, 198, 9612, 13, 2436, 270, 7, 2435, 62, 83, 1685, 11, 256, 83, 62, 2554, 8, 198, 198, 2435, 62, 83, 1685, 62, 2100, 796, 10369, 13, 13287, 7203, 220, 33172, 6407, 11, 2330, 11, 4171, 8, 198, 926, 62, 2554, 17, 796, 640, 62, 83, 1685, 62, 2100, 13, 1136, 62, 2554, 7, 22487, 9464, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 6135, 4008, 198, 9612, 13, 2436, 270, 7, 2435, 62, 83, 1685, 62, 2100, 11, 256, 83, 62, 2554, 17, 8, 198, 198, 13033, 62, 525, 62, 12227, 796, 10369, 13, 13287, 7203, 615, 70, 1303, 457, 82, 14, 82, 25, 1600, 6407, 11, 2330, 11, 4171, 8, 198, 41799, 62, 2554, 796, 2173, 62, 525, 62, 12227, 13, 1136, 62, 2554, 7, 22487, 3506, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 4153, 4008, 198, 9612, 13, 2436, 270, 7, 13033, 62, 525, 62, 12227, 11, 279, 862, 62, 2554, 8, 198, 198, 13033, 62, 525, 62, 12227, 62, 2100, 796, 10369, 13, 13287, 7203, 220, 33172, 6407, 11, 2330, 11, 4171, 8, 198, 41799, 62, 2554, 17, 796, 2173, 62, 525, 62, 12227, 62, 2100, 13, 1136, 62, 2554, 7, 22487, 9464, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 4153, 4008, 198, 9612, 13, 2436, 270, 7, 13033, 62, 525, 62, 12227, 62, 2100, 11, 279, 862, 62, 2554, 17, 8, 198, 198, 2, 2173, 62, 12957, 62, 11374, 796, 10369, 13, 13287, 7203, 1303, 43344, 938, 5664, 25, 1600, 6407, 11, 2330, 11, 4171, 8, 198, 2, 458, 76, 62, 2554, 796, 2173, 62, 12957, 62, 11374, 13, 1136, 62, 2554, 7, 22487, 3506, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 6957, 4008, 198, 2, 3159, 13, 2436, 270, 7, 13033, 62, 12957, 62, 11374, 11, 458, 76, 62, 2554, 8, 198, 198, 2, 2173, 62, 12957, 62, 11374, 62, 2100, 796, 10369, 13, 13287, 7203, 220, 33172, 6407, 11, 2330, 11, 4171, 8, 198, 2, 458, 76, 62, 2554, 17, 796, 2173, 62, 12957, 62, 11374, 62, 2100, 13, 1136, 62, 2554, 7, 22487, 9464, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 6957, 4008, 198, 2, 3159, 13, 2436, 270, 7, 13033, 62, 12957, 62, 11374, 62, 2100, 11, 458, 76, 62, 2554, 17, 8, 198, 198, 23350, 62, 13033, 796, 10369, 13, 13287, 7203, 2, 43344, 25, 1600, 6407, 11, 2330, 11, 4171, 8, 198, 34788, 62, 2554, 796, 2472, 62, 13033, 13, 1136, 62, 2554, 7, 22487, 3506, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 1679, 4008, 198, 9612, 13, 2436, 270, 7, 23350, 62, 13033, 11, 256, 79, 62, 2554, 8, 198, 198, 23350, 62, 13033, 62, 2100, 796, 10369, 13, 13287, 7203, 220, 33172, 6407, 11, 2330, 11, 4171, 8, 198, 34788, 62, 2554, 17, 796, 2472, 62, 13033, 62, 2100, 13, 1136, 62, 2554, 7, 22487, 9464, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 1679, 4008, 198, 9612, 13, 2436, 270, 7, 23350, 62, 13033, 62, 2100, 11, 256, 79, 62, 2554, 17, 8, 198, 198, 23350, 62, 28461, 27787, 796, 10369, 13, 13287, 7203, 2, 44360, 25, 1600, 6407, 11, 2330, 11, 4171, 8, 198, 926, 81, 62, 2554, 796, 2472, 62, 28461, 27787, 13, 1136, 62, 2554, 7, 22487, 3506, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 642, 4008, 198, 9612, 13, 2436, 270, 7, 23350, 62, 28461, 27787, 11, 256, 2213, 62, 2554, 8, 198, 198, 23350, 62, 28461, 27787, 62, 2100, 796, 10369, 13, 13287, 7203, 220, 33172, 6407, 11, 2330, 11, 4171, 8, 198, 926, 81, 62, 2554, 17, 796, 2472, 62, 28461, 27787, 62, 2100, 13, 1136, 62, 2554, 7, 22487, 9464, 16193, 1795, 11, 4324, 62, 27740, 5736, 58, 16, 60, 532, 642, 4008, 198, 9612, 13, 2436, 270, 7, 23350, 62, 28461, 27787, 62, 2100, 11, 256, 2213, 62, 2554, 17, 8, 628, 198, 198, 9078, 6057, 13, 13812, 13, 2617, 62, 6888, 1159, 10786, 82, 301, 4703, 11537, 198, 9078, 6057, 13, 13812, 13, 2704, 541, 3419, 628, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 18076, 10786, 438, 400, 23062, 3256, 4277, 28, 4221, 1268, 15871, 62, 37, 10659, 1581, 11, 1037, 11639, 400, 23062, 5766, 357, 16, 796, 645, 7888, 768, 8, 11537, 198, 31, 12976, 13, 18076, 10786, 438, 35324, 3256, 4277, 28, 16977, 62, 37, 2200, 10917, 45155, 11, 1037, 11639, 48708, 8373, 318, 1342, 5992, 11, 2793, 8373, 318, 517, 5992, 11537, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.775658
1,101
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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. import abc import asyncio from collections import deque from logging import getLogger from time import perf_counter from ..._async_compat.network import AsyncBoltSocket from ..._async_compat.util import AsyncUtil from ..._exceptions import ( BoltError, BoltHandshakeError, SocketDeadlineExceeded, ) from ...addressing import Address from ...api import ( ServerInfo, Version, ) from ...conf import PoolConfig from ...exceptions import ( AuthError, DriverError, IncompleteCommit, ServiceUnavailable, SessionExpired, ) from ...meta import get_user_agent from ...packstream import ( Packer, Unpacker, ) from ._common import ( AsyncInbox, CommitResponse, Outbox, ) # Set up logger log = getLogger("neo4j") class AsyncBolt: """ Server connection for Bolt protocol. A :class:`.Bolt` should be constructed following a successful .open() Bolt handshake and takes the socket over which the handshake was carried out. """ MAGIC_PREAMBLE = b"\x60\x60\xB0\x17" PROTOCOL_VERSION = None # flag if connection needs RESET to go back to READY state is_reset = False # The socket in_use = False # When the connection was last put back into the pool idle_since = float("-inf") # The socket _closing = False _closed = False # The socket _defunct = False #: The pool of which this connection is a member pool = None # Store the id of the most recent ran query to be able to reduce sent bits by # using the default (-1) to refer to the most recent query when pulling # results for it. most_recent_qid = None @property @abc.abstractmethod def supports_multiple_results(self): """ Boolean flag to indicate if the connection version supports multiple queries to be buffered on the server side (True) or if all results need to be eagerly pulled before sending the next RUN (False). """ pass @property @abc.abstractmethod def supports_multiple_databases(self): """ Boolean flag to indicate if the connection version supports multiple databases. """ pass @classmethod def protocol_handlers(cls, protocol_version=None): """ Return a dictionary of available Bolt protocol handlers, keyed by version tuple. If an explicit protocol version is provided, the dictionary will contain either zero or one items, depending on whether that version is supported. If no protocol version is provided, all available versions will be returned. :param protocol_version: tuple identifying a specific protocol version (e.g. (3, 5)) or None :return: dictionary of version tuple to handler class for all relevant and supported protocol versions :raise TypeError: if protocol version is not passed in a tuple """ # Carry out Bolt subclass imports locally to avoid circular dependency issues. from ._bolt3 import AsyncBolt3 from ._bolt4 import ( AsyncBolt4x1, AsyncBolt4x2, AsyncBolt4x3, AsyncBolt4x4, ) from ._bolt5 import AsyncBolt5x0 handlers = { AsyncBolt3.PROTOCOL_VERSION: AsyncBolt3, # 4.0 unsupported because no space left in the handshake AsyncBolt4x1.PROTOCOL_VERSION: AsyncBolt4x1, AsyncBolt4x2.PROTOCOL_VERSION: AsyncBolt4x2, AsyncBolt4x3.PROTOCOL_VERSION: AsyncBolt4x3, AsyncBolt4x4.PROTOCOL_VERSION: AsyncBolt4x4, AsyncBolt5x0.PROTOCOL_VERSION: AsyncBolt5x0, } if protocol_version is None: return handlers if not isinstance(protocol_version, tuple): raise TypeError("Protocol version must be specified as a tuple") if protocol_version in handlers: return {protocol_version: handlers[protocol_version]} return {} @classmethod def version_list(cls, versions, limit=4): """ Return a list of supported protocol versions in order of preference. The number of protocol versions (or ranges) returned is limited to four. """ # In fact, 4.3 is the fist version to support ranges. However, the # range support got backported to 4.2. But even if the server is too # old to have the backport, negotiating BOLT 4.1 is no problem as it's # equivalent to 4.2 first_with_range_support = Version(4, 2) result = [] for version in versions: if (result and version >= first_with_range_support and result[-1][0] == version[0] and result[-1][1][1] == version[1] + 1): # can use range to encompass this version result[-1][1][1] = version[1] continue result.append(Version(version[0], [version[1], version[1]])) if len(result) == 4: break return result @classmethod def get_handshake(cls): """ Return the supported Bolt versions as bytes. The length is 16 bytes as specified in the Bolt version negotiation. :return: bytes """ supported_versions = sorted(cls.protocol_handlers().keys(), reverse=True) offered_versions = cls.version_list(supported_versions) return b"".join(version.to_bytes() for version in offered_versions).ljust(16, b"\x00") @classmethod async def ping(cls, address, *, timeout=None, **config): """ Attempt to establish a Bolt connection, returning the agreed Bolt protocol version if successful. """ config = PoolConfig.consume(config) try: s, protocol_version, handshake, data = \ await AsyncBoltSocket.connect( address, timeout=timeout, custom_resolver=config.resolver, ssl_context=config.get_ssl_context(), keep_alive=config.keep_alive, ) except (ServiceUnavailable, SessionExpired, BoltHandshakeError): return None else: AsyncBoltSocket.close_socket(s) return protocol_version @classmethod async def open( cls, address, *, auth=None, timeout=None, routing_context=None, **pool_config ): """Open a new Bolt connection to a given server address. :param address: :param auth: :param timeout: the connection timeout in seconds :param routing_context: dict containing routing context :param pool_config: :return: connected AsyncBolt instance :raise BoltHandshakeError: raised if the Bolt Protocol can not negotiate a protocol version. :raise ServiceUnavailable: raised if there was a connection issue. """ t0 = perf_counter() pool_config = PoolConfig.consume(pool_config) socket_connection_timeout = pool_config.connection_timeout if socket_connection_timeout is None: socket_connection_timeout = time_remaining() elif timeout is not None: socket_connection_timeout = min(pool_config.connection_timeout, time_remaining()) s, pool_config.protocol_version, handshake, data = \ await AsyncBoltSocket.connect( address, timeout=socket_connection_timeout, custom_resolver=pool_config.resolver, ssl_context=pool_config.get_ssl_context(), keep_alive=pool_config.keep_alive, ) # Carry out Bolt subclass imports locally to avoid circular dependency # issues. if pool_config.protocol_version == (3, 0): from ._bolt3 import AsyncBolt3 bolt_cls = AsyncBolt3 # Implementation for 4.0 exists, but there was no space left in the # handshake to offer this version to the server. Hence, the server # should never request us to speak bolt 4.0. # elif pool_config.protocol_version == (4, 0): # from ._bolt4 import AsyncBolt4x0 # bolt_cls = AsyncBolt4x0 elif pool_config.protocol_version == (4, 1): from ._bolt4 import AsyncBolt4x1 bolt_cls = AsyncBolt4x1 elif pool_config.protocol_version == (4, 2): from ._bolt4 import AsyncBolt4x2 bolt_cls = AsyncBolt4x2 elif pool_config.protocol_version == (4, 3): from ._bolt4 import AsyncBolt4x3 bolt_cls = AsyncBolt4x3 elif pool_config.protocol_version == (4, 4): from ._bolt4 import AsyncBolt4x4 bolt_cls = AsyncBolt4x4 elif pool_config.protocol_version == (5, 0): from ._bolt5 import AsyncBolt5x0 bolt_cls = AsyncBolt5x0 else: log.debug("[#%04X] S: <CLOSE>", s.getsockname()[1]) AsyncBoltSocket.close_socket(s) supported_versions = cls.protocol_handlers().keys() raise BoltHandshakeError( "The Neo4J server does not support communication with this " "driver. This driver has support for Bolt protocols " "{}".format(tuple(map(str, supported_versions))), address=address, request_data=handshake, response_data=data ) connection = bolt_cls( address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context ) try: connection.socket.set_deadline(time_remaining()) try: await connection.hello() except SocketDeadlineExceeded as e: # connection._defunct = True raise ServiceUnavailable( "Timeout during initial handshake occurred" ) from e finally: connection.socket.set_deadline(None) except Exception: await connection.close_non_blocking() raise return connection @property @abc.abstractmethod @property @abc.abstractmethod @property @abc.abstractmethod @abc.abstractmethod async def hello(self): """ Appends a HELLO message to the outgoing queue, sends it and consumes all remaining messages. """ pass @abc.abstractmethod async def route(self, database=None, imp_user=None, bookmarks=None): """ Fetch a routing table from the server for the given `database`. For Bolt 4.3 and above, this appends a ROUTE message; for earlier versions, a procedure call is made via the regular Cypher execution mechanism. In all cases, this is sent to the network, and a response is fetched. :param database: database for which to fetch a routing table Requires Bolt 4.0+. :param imp_user: the user to impersonate Requires Bolt 4.4+. :param bookmarks: iterable of bookmark values after which this transaction should begin :return: dictionary of raw routing data """ pass @abc.abstractmethod def run(self, query, parameters=None, mode=None, bookmarks=None, metadata=None, timeout=None, db=None, imp_user=None, **handlers): """ Appends a RUN message to the output queue. :param query: Cypher query string :param parameters: dictionary of Cypher parameters :param mode: access mode for routing - "READ" or "WRITE" (default) :param bookmarks: iterable of bookmark values after which this transaction should begin :param metadata: custom metadata dictionary to attach to the transaction :param timeout: timeout for transaction execution (seconds) :param db: name of the database against which to begin the transaction Requires Bolt 4.0+. :param imp_user: the user to impersonate Requires Bolt 4.4+. :param handlers: handler functions passed into the returned Response object :return: Response object """ pass @abc.abstractmethod def discard(self, n=-1, qid=-1, **handlers): """ Appends a DISCARD message to the output queue. :param n: number of records to discard, default = -1 (ALL) :param qid: query ID to discard for, default = -1 (last query) :param handlers: handler functions passed into the returned Response object :return: Response object """ pass @abc.abstractmethod def pull(self, n=-1, qid=-1, **handlers): """ Appends a PULL message to the output queue. :param n: number of records to pull, default = -1 (ALL) :param qid: query ID to pull for, default = -1 (last query) :param handlers: handler functions passed into the returned Response object :return: Response object """ pass @abc.abstractmethod def begin(self, mode=None, bookmarks=None, metadata=None, timeout=None, db=None, imp_user=None, **handlers): """ Appends a BEGIN message to the output queue. :param mode: access mode for routing - "READ" or "WRITE" (default) :param bookmarks: iterable of bookmark values after which this transaction should begin :param metadata: custom metadata dictionary to attach to the transaction :param timeout: timeout for transaction execution (seconds) :param db: name of the database against which to begin the transaction Requires Bolt 4.0+. :param imp_user: the user to impersonate Requires Bolt 4.4+ :param handlers: handler functions passed into the returned Response object :return: Response object """ pass @abc.abstractmethod def commit(self, **handlers): """ Appends a COMMIT message to the output queue.""" pass @abc.abstractmethod def rollback(self, **handlers): """ Appends a ROLLBACK message to the output queue.""" pass @abc.abstractmethod async def reset(self): """ Appends a RESET message to the outgoing queue, sends it and consumes all remaining messages. """ pass @abc.abstractmethod def goodbye(self): """Append a GOODBYE message to the outgoing queued.""" pass def _append(self, signature, fields=(), response=None): """ Appends a message to the outgoing queue. :param signature: the signature of the message :param fields: the fields of the message as a tuple :param response: a response object to handle callbacks """ with self.outbox.tmp_buffer(): self.packer.pack_struct(signature, fields) self.outbox.wrap_message() self.responses.append(response) async def send_all(self): """ Send all queued messages to the server. """ if self.closed(): raise ServiceUnavailable( "Failed to write to closed connection {!r} ({!r})".format( self.unresolved_address, self.server_info.address ) ) if self.defunct(): raise ServiceUnavailable( "Failed to write to defunct connection {!r} ({!r})".format( self.unresolved_address, self.server_info.address ) ) await self._send_all() @abc.abstractmethod async def _process_message(self, details, summary_signature, summary_metadata): """ Receive at most one message from the server, if available. :return: 2-tuple of number of detail messages and number of summary messages fetched """ pass async def fetch_all(self): """ Fetch all outstanding messages. :return: 2-tuple of number of detail messages and number of summary messages fetched """ detail_count = summary_count = 0 while self.responses: response = self.responses[0] while not response.complete: detail_delta, summary_delta = await self.fetch_message() detail_count += detail_delta summary_count += summary_delta return detail_count, summary_count _stale = False async def close(self): """Close the connection.""" if self._closed or self._closing: return self._closing = True if not self._defunct: self.goodbye() try: await self._send_all() except (OSError, BoltError, DriverError): pass log.debug("[#%04X] C: <CLOSE>", self.local_port) try: self.socket.close() except OSError: pass finally: self._closed = True async def close_non_blocking(self): """Set the socket to non-blocking and close it. This will try to send the `GOODBYE` message (given the socket is not marked as defunct). However, should the write operation require blocking (e.g., a full network buffer), then the socket will be closed immediately (without `GOODBYE` message). """ if self._closed or self._closing: return self.socket.settimeout(0) await self.close() def is_idle_for(self, timeout): """Check if connection has been idle for at least the given timeout. :param timeout: timeout in seconds :type timeout: float :rtype: bool """ return perf_counter() - self.idle_since > timeout AsyncBoltSocket.Bolt = AsyncBolt
[ 2, 15069, 357, 66, 8, 366, 8199, 78, 19, 73, 1, 198, 2, 21227, 19, 73, 10710, 9564, 685, 4023, 1378, 710, 78, 19, 73, 13, 785, 60, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 21227, 19, 73, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 628, 198, 11748, 450, 66, 198, 11748, 30351, 952, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 640, 1330, 23035, 62, 24588, 198, 198, 6738, 2644, 62, 292, 13361, 62, 5589, 265, 13, 27349, 1330, 1081, 13361, 33, 5978, 39105, 198, 6738, 2644, 62, 292, 13361, 62, 5589, 265, 13, 22602, 1330, 1081, 13361, 18274, 346, 198, 6738, 2644, 62, 1069, 11755, 1330, 357, 198, 220, 220, 220, 21764, 12331, 11, 198, 220, 220, 220, 21764, 12885, 32431, 12331, 11, 198, 220, 220, 220, 47068, 20489, 1370, 3109, 2707, 276, 11, 198, 8, 198, 6738, 2644, 2860, 11697, 1330, 17917, 198, 6738, 2644, 15042, 1330, 357, 198, 220, 220, 220, 9652, 12360, 11, 198, 220, 220, 220, 10628, 11, 198, 8, 198, 6738, 2644, 10414, 1330, 19850, 16934, 198, 6738, 2644, 1069, 11755, 1330, 357, 198, 220, 220, 220, 26828, 12331, 11, 198, 220, 220, 220, 12434, 12331, 11, 198, 220, 220, 220, 554, 20751, 6935, 270, 11, 198, 220, 220, 220, 4809, 3118, 15182, 11, 198, 220, 220, 220, 23575, 3109, 6474, 11, 198, 8, 198, 6738, 2644, 28961, 1330, 651, 62, 7220, 62, 25781, 198, 6738, 2644, 8002, 5532, 1330, 357, 198, 220, 220, 220, 6400, 263, 11, 198, 220, 220, 220, 791, 8002, 263, 11, 198, 8, 198, 6738, 47540, 11321, 1330, 357, 198, 220, 220, 220, 1081, 13361, 818, 3524, 11, 198, 220, 220, 220, 35910, 31077, 11, 198, 220, 220, 220, 3806, 3524, 11, 198, 8, 628, 198, 2, 5345, 510, 49706, 198, 6404, 796, 651, 11187, 1362, 7203, 710, 78, 19, 73, 4943, 628, 198, 4871, 1081, 13361, 33, 5978, 25, 198, 220, 220, 220, 37227, 9652, 4637, 329, 21764, 8435, 13, 628, 220, 220, 220, 317, 1058, 4871, 25, 44646, 33, 5978, 63, 815, 307, 12006, 1708, 257, 198, 220, 220, 220, 4388, 764, 9654, 3419, 628, 220, 220, 220, 21764, 42231, 290, 2753, 262, 17802, 625, 543, 198, 220, 220, 220, 262, 42231, 373, 5281, 503, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 28263, 2149, 62, 47, 32235, 19146, 796, 275, 1, 59, 87, 1899, 59, 87, 1899, 59, 87, 33, 15, 59, 87, 1558, 1, 628, 220, 220, 220, 48006, 4503, 3535, 62, 43717, 796, 6045, 628, 220, 220, 220, 1303, 6056, 611, 4637, 2476, 15731, 2767, 284, 467, 736, 284, 20832, 56, 1181, 198, 220, 220, 220, 318, 62, 42503, 796, 10352, 628, 220, 220, 220, 1303, 383, 17802, 198, 220, 220, 220, 287, 62, 1904, 796, 10352, 628, 220, 220, 220, 1303, 1649, 262, 4637, 373, 938, 1234, 736, 656, 262, 5933, 198, 220, 220, 220, 21696, 62, 20777, 796, 12178, 7203, 12, 10745, 4943, 628, 220, 220, 220, 1303, 383, 17802, 198, 220, 220, 220, 4808, 565, 2752, 796, 10352, 198, 220, 220, 220, 4808, 20225, 796, 10352, 628, 220, 220, 220, 1303, 383, 17802, 198, 220, 220, 220, 4808, 4299, 16260, 796, 10352, 628, 220, 220, 220, 1303, 25, 383, 5933, 286, 543, 428, 4637, 318, 257, 2888, 198, 220, 220, 220, 5933, 796, 6045, 628, 220, 220, 220, 1303, 9363, 262, 4686, 286, 262, 749, 2274, 4966, 12405, 284, 307, 1498, 284, 4646, 1908, 10340, 416, 198, 220, 220, 220, 1303, 1262, 262, 4277, 13841, 16, 8, 284, 3522, 284, 262, 749, 2274, 12405, 618, 10427, 198, 220, 220, 220, 1303, 2482, 329, 340, 13, 198, 220, 220, 220, 749, 62, 49921, 62, 80, 312, 796, 6045, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 6971, 62, 48101, 62, 43420, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 41146, 6056, 284, 7603, 611, 262, 4637, 2196, 6971, 3294, 198, 220, 220, 220, 220, 220, 220, 220, 20743, 284, 307, 6940, 1068, 319, 262, 4382, 1735, 357, 17821, 8, 393, 611, 477, 2482, 761, 198, 220, 220, 220, 220, 220, 220, 220, 284, 307, 30130, 5954, 878, 7216, 262, 1306, 32494, 357, 25101, 737, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 6971, 62, 48101, 62, 19608, 18826, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 41146, 6056, 284, 7603, 611, 262, 4637, 2196, 6971, 3294, 198, 220, 220, 220, 220, 220, 220, 220, 20083, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 8435, 62, 4993, 8116, 7, 565, 82, 11, 8435, 62, 9641, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8229, 257, 22155, 286, 1695, 21764, 8435, 32847, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1994, 276, 416, 2196, 46545, 13, 1002, 281, 7952, 8435, 2196, 318, 198, 220, 220, 220, 220, 220, 220, 220, 2810, 11, 262, 22155, 481, 3994, 2035, 6632, 393, 530, 3709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6906, 319, 1771, 326, 2196, 318, 4855, 13, 1002, 645, 8435, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 318, 2810, 11, 477, 1695, 6300, 481, 307, 4504, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 8435, 62, 9641, 25, 46545, 13720, 257, 2176, 8435, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2196, 357, 68, 13, 70, 13, 357, 18, 11, 642, 4008, 393, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 22155, 286, 2196, 46545, 284, 21360, 1398, 329, 477, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5981, 290, 4855, 8435, 6300, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 40225, 5994, 12331, 25, 611, 8435, 2196, 318, 407, 3804, 287, 257, 46545, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 36366, 503, 21764, 47611, 17944, 15726, 284, 3368, 18620, 20203, 2428, 13, 198, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 18, 1330, 1081, 13361, 33, 5978, 18, 198, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 19, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 20, 1330, 1081, 13361, 33, 5978, 20, 87, 15, 628, 220, 220, 220, 220, 220, 220, 220, 32847, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 18, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 604, 13, 15, 24222, 780, 645, 2272, 1364, 287, 262, 42231, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 16, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 19, 87, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 17, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 19, 87, 17, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 18, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 19, 87, 18, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 19, 87, 19, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 19, 87, 19, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 20, 87, 15, 13, 4805, 2394, 4503, 3535, 62, 43717, 25, 1081, 13361, 33, 5978, 20, 87, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 628, 220, 220, 220, 220, 220, 220, 220, 611, 8435, 62, 9641, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 32847, 628, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 11235, 4668, 62, 9641, 11, 46545, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 19703, 4668, 2196, 1276, 307, 7368, 355, 257, 46545, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 611, 8435, 62, 9641, 287, 32847, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1391, 11235, 4668, 62, 9641, 25, 32847, 58, 11235, 4668, 62, 9641, 48999, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 23884, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 2196, 62, 4868, 7, 565, 82, 11, 6300, 11, 4179, 28, 19, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8229, 257, 1351, 286, 4855, 8435, 6300, 287, 1502, 286, 198, 220, 220, 220, 220, 220, 220, 220, 12741, 13, 383, 1271, 286, 8435, 6300, 357, 273, 16069, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4504, 318, 3614, 284, 1440, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 554, 1109, 11, 604, 13, 18, 318, 262, 18606, 2196, 284, 1104, 16069, 13, 2102, 11, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2837, 1104, 1392, 736, 9213, 284, 604, 13, 17, 13, 887, 772, 611, 262, 4382, 318, 1165, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1468, 284, 423, 262, 736, 634, 11, 19025, 347, 3535, 51, 604, 13, 16, 318, 645, 1917, 355, 340, 338, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7548, 284, 604, 13, 17, 198, 220, 220, 220, 220, 220, 220, 220, 717, 62, 4480, 62, 9521, 62, 11284, 796, 10628, 7, 19, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2196, 287, 6300, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 20274, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 2196, 18189, 717, 62, 4480, 62, 9521, 62, 11284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 1255, 58, 12, 16, 7131, 15, 60, 6624, 2196, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 1255, 58, 12, 16, 7131, 16, 7131, 16, 60, 6624, 2196, 58, 16, 60, 1343, 352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 460, 779, 2837, 284, 44006, 428, 2196, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 58, 12, 16, 7131, 16, 7131, 16, 60, 796, 2196, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 33295, 7, 14815, 7, 9641, 58, 15, 4357, 685, 9641, 58, 16, 4357, 2196, 58, 16, 11907, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 20274, 8, 6624, 604, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1255, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 651, 62, 4993, 32431, 7, 565, 82, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8229, 262, 4855, 21764, 6300, 355, 9881, 13, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4129, 318, 1467, 9881, 355, 7368, 287, 262, 21764, 2196, 24462, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 9881, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4855, 62, 47178, 796, 23243, 7, 565, 82, 13, 11235, 4668, 62, 4993, 8116, 22446, 13083, 22784, 9575, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4438, 62, 47178, 796, 537, 82, 13, 9641, 62, 4868, 7, 15999, 62, 47178, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 275, 1, 1911, 22179, 7, 9641, 13, 1462, 62, 33661, 3419, 329, 2196, 287, 4438, 62, 47178, 737, 75, 3137, 7, 1433, 11, 275, 1, 59, 87, 405, 4943, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 30351, 825, 29400, 7, 565, 82, 11, 2209, 11, 1635, 11, 26827, 28, 14202, 11, 12429, 11250, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 25770, 284, 4474, 257, 21764, 4637, 11, 8024, 262, 198, 220, 220, 220, 220, 220, 220, 220, 4987, 21764, 8435, 2196, 611, 4388, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 796, 19850, 16934, 13, 5936, 2454, 7, 11250, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 11, 8435, 62, 9641, 11, 42231, 11, 1366, 796, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 1081, 13361, 33, 5978, 39105, 13, 8443, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2209, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 48678, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2183, 62, 411, 14375, 28, 11250, 13, 411, 14375, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 6649, 62, 22866, 28, 11250, 13, 1136, 62, 45163, 62, 22866, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1394, 62, 282, 425, 28, 11250, 13, 14894, 62, 282, 425, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 357, 16177, 3118, 15182, 11, 23575, 3109, 6474, 11, 21764, 12885, 32431, 12331, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 39105, 13, 19836, 62, 44971, 7, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 8435, 62, 9641, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 30351, 825, 1280, 7, 198, 220, 220, 220, 220, 220, 220, 220, 537, 82, 11, 2209, 11, 1635, 11, 6284, 28, 14202, 11, 26827, 28, 14202, 11, 28166, 62, 22866, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 12429, 7742, 62, 11250, 198, 220, 220, 220, 15179, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 11505, 257, 649, 21764, 4637, 284, 257, 1813, 4382, 2209, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2209, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6284, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 26827, 25, 262, 4637, 26827, 287, 4201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 28166, 62, 22866, 25, 8633, 7268, 28166, 4732, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 5933, 62, 11250, 25, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 5884, 1081, 13361, 33, 5978, 4554, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 40225, 21764, 12885, 32431, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4376, 611, 262, 21764, 20497, 460, 407, 16674, 257, 8435, 2196, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 40225, 4809, 3118, 15182, 25, 4376, 611, 612, 373, 257, 4637, 2071, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 256, 15, 796, 23035, 62, 24588, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5933, 62, 11250, 796, 19850, 16934, 13, 5936, 2454, 7, 7742, 62, 11250, 8, 628, 220, 220, 220, 220, 220, 220, 220, 17802, 62, 38659, 62, 48678, 796, 5933, 62, 11250, 13, 38659, 62, 48678, 198, 220, 220, 220, 220, 220, 220, 220, 611, 17802, 62, 38659, 62, 48678, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17802, 62, 38659, 62, 48678, 796, 640, 62, 2787, 1397, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 26827, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17802, 62, 38659, 62, 48678, 796, 949, 7, 7742, 62, 11250, 13, 38659, 62, 48678, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 62, 2787, 1397, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 264, 11, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 11, 42231, 11, 1366, 796, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 1081, 13361, 33, 5978, 39105, 13, 8443, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2209, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 44971, 62, 38659, 62, 48678, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2183, 62, 411, 14375, 28, 7742, 62, 11250, 13, 411, 14375, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 6649, 62, 22866, 28, 7742, 62, 11250, 13, 1136, 62, 45163, 62, 22866, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1394, 62, 282, 425, 28, 7742, 62, 11250, 13, 14894, 62, 282, 425, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 36366, 503, 21764, 47611, 17944, 15726, 284, 3368, 18620, 20203, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2428, 13, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 18, 11, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 18, 1330, 1081, 13361, 33, 5978, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 18, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 46333, 329, 604, 13, 15, 7160, 11, 475, 612, 373, 645, 2272, 1364, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 42231, 284, 2897, 428, 2196, 284, 262, 4382, 13, 16227, 11, 262, 4382, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 815, 1239, 2581, 514, 284, 2740, 18100, 604, 13, 15, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 19, 11, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 1081, 13361, 33, 5978, 19, 87, 15, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 19, 87, 15, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 19, 11, 352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 1081, 13361, 33, 5978, 19, 87, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 19, 87, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 19, 11, 362, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 1081, 13361, 33, 5978, 19, 87, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 19, 87, 17, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 19, 11, 513, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 1081, 13361, 33, 5978, 19, 87, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 19, 87, 18, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 19, 11, 604, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 19, 1330, 1081, 13361, 33, 5978, 19, 87, 19, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 19, 87, 19, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 5933, 62, 11250, 13, 11235, 4668, 62, 9641, 6624, 357, 20, 11, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 47540, 25593, 20, 1330, 1081, 13361, 33, 5978, 20, 87, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18100, 62, 565, 82, 796, 1081, 13361, 33, 5978, 20, 87, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 7203, 58, 2, 4, 3023, 55, 60, 220, 311, 25, 1279, 32737, 29, 1600, 264, 13, 11407, 735, 3672, 3419, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1081, 13361, 33, 5978, 39105, 13, 19836, 62, 44971, 7, 82, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4855, 62, 47178, 796, 537, 82, 13, 11235, 4668, 62, 4993, 8116, 22446, 13083, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 21764, 12885, 32431, 12331, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 464, 21227, 19, 41, 4382, 857, 407, 1104, 6946, 351, 428, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 26230, 13, 770, 4639, 468, 1104, 329, 21764, 19565, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45144, 92, 1911, 18982, 7, 83, 29291, 7, 8899, 7, 2536, 11, 4855, 62, 47178, 4008, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2209, 28, 21975, 11, 2581, 62, 7890, 28, 4993, 32431, 11, 2882, 62, 7890, 28, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 4637, 796, 18100, 62, 565, 82, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2209, 11, 264, 11, 5933, 62, 11250, 13, 9806, 62, 38659, 62, 36195, 8079, 11, 6284, 28, 18439, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 25781, 28, 7742, 62, 11250, 13, 7220, 62, 25781, 11, 28166, 62, 22866, 28, 81, 13660, 62, 22866, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4637, 13, 44971, 13, 2617, 62, 25124, 1370, 7, 2435, 62, 2787, 1397, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 4637, 13, 31373, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 47068, 20489, 1370, 3109, 2707, 276, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4637, 13557, 4299, 16260, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 4809, 3118, 15182, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 48031, 1141, 4238, 42231, 5091, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 422, 304, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3443, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4637, 13, 44971, 13, 2617, 62, 25124, 1370, 7, 14202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 4637, 13, 19836, 62, 13159, 62, 41938, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 4637, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 30351, 825, 23748, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 47899, 46, 3275, 284, 262, 28181, 16834, 11, 12800, 340, 290, 37225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 477, 5637, 6218, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 30351, 825, 6339, 7, 944, 11, 6831, 28, 14202, 11, 848, 62, 7220, 28, 14202, 11, 1492, 14306, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 376, 7569, 257, 28166, 3084, 422, 262, 4382, 329, 262, 1813, 198, 220, 220, 220, 220, 220, 220, 220, 4600, 48806, 44646, 1114, 21764, 604, 13, 18, 290, 2029, 11, 428, 598, 2412, 257, 371, 2606, 9328, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 26, 329, 2961, 6300, 11, 257, 8771, 869, 318, 925, 2884, 198, 220, 220, 220, 220, 220, 220, 220, 262, 3218, 48881, 372, 9706, 9030, 13, 554, 477, 2663, 11, 428, 318, 198, 220, 220, 220, 220, 220, 220, 220, 1908, 284, 262, 3127, 11, 290, 257, 2882, 318, 11351, 1740, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 6831, 25, 6831, 329, 543, 284, 21207, 257, 28166, 3084, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 15, 27613, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 848, 62, 7220, 25, 262, 2836, 284, 28671, 378, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 19, 27613, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1492, 14306, 25, 11629, 540, 286, 44007, 3815, 706, 543, 428, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8611, 815, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 22155, 286, 8246, 28166, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 1057, 7, 944, 11, 12405, 11, 10007, 28, 14202, 11, 4235, 28, 14202, 11, 1492, 14306, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20150, 28, 14202, 11, 26827, 28, 14202, 11, 20613, 28, 14202, 11, 848, 62, 7220, 28, 14202, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 32494, 3275, 284, 262, 5072, 16834, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 12405, 25, 48881, 372, 12405, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 10007, 25, 22155, 286, 48881, 372, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 4235, 25, 1895, 4235, 329, 28166, 532, 366, 15675, 1, 393, 366, 18564, 12709, 1, 357, 12286, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1492, 14306, 25, 11629, 540, 286, 44007, 3815, 706, 543, 428, 8611, 815, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20150, 25, 2183, 20150, 22155, 284, 10199, 284, 262, 8611, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 26827, 25, 26827, 329, 8611, 9706, 357, 43012, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20613, 25, 1438, 286, 262, 6831, 1028, 543, 284, 2221, 262, 8611, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 15, 27613, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 848, 62, 7220, 25, 262, 2836, 284, 28671, 378, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 19, 27613, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 32847, 25, 21360, 5499, 3804, 656, 262, 4504, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 27537, 7, 944, 11, 299, 10779, 16, 11, 10662, 312, 10779, 16, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 13954, 34, 9795, 3275, 284, 262, 5072, 16834, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 299, 25, 1271, 286, 4406, 284, 27537, 11, 4277, 796, 532, 16, 357, 7036, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 10662, 312, 25, 12405, 4522, 284, 27537, 329, 11, 4277, 796, 532, 16, 357, 12957, 12405, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 32847, 25, 21360, 5499, 3804, 656, 262, 4504, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 2834, 7, 944, 11, 299, 10779, 16, 11, 10662, 312, 10779, 16, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 350, 9994, 3275, 284, 262, 5072, 16834, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 299, 25, 1271, 286, 4406, 284, 2834, 11, 4277, 796, 532, 16, 357, 7036, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 10662, 312, 25, 12405, 4522, 284, 2834, 329, 11, 4277, 796, 532, 16, 357, 12957, 12405, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 32847, 25, 21360, 5499, 3804, 656, 262, 4504, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 2221, 7, 944, 11, 4235, 28, 14202, 11, 1492, 14306, 28, 14202, 11, 20150, 28, 14202, 11, 26827, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20613, 28, 14202, 11, 848, 62, 7220, 28, 14202, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 347, 43312, 3275, 284, 262, 5072, 16834, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 4235, 25, 1895, 4235, 329, 28166, 532, 366, 15675, 1, 393, 366, 18564, 12709, 1, 357, 12286, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1492, 14306, 25, 11629, 540, 286, 44007, 3815, 706, 543, 428, 8611, 815, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20150, 25, 2183, 20150, 22155, 284, 10199, 284, 262, 8611, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 26827, 25, 26827, 329, 8611, 9706, 357, 43012, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 20613, 25, 1438, 286, 262, 6831, 1028, 543, 284, 2221, 262, 8611, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 15, 27613, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 848, 62, 7220, 25, 262, 2836, 284, 28671, 378, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26848, 21764, 604, 13, 19, 10, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 32847, 25, 21360, 5499, 3804, 656, 262, 4504, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 18261, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 4589, 7, 944, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 22240, 2043, 3275, 284, 262, 5072, 16834, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 4836, 1891, 7, 944, 11, 12429, 4993, 8116, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 15107, 3069, 31098, 3275, 284, 262, 5072, 16834, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 30351, 825, 13259, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 15731, 2767, 3275, 284, 262, 28181, 16834, 11, 12800, 340, 290, 37225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 477, 5637, 6218, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 825, 24829, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4677, 437, 257, 21090, 17513, 36, 3275, 284, 262, 28181, 8358, 1739, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 825, 4808, 33295, 7, 944, 11, 9877, 11, 7032, 16193, 828, 2882, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 2034, 2412, 257, 3275, 284, 262, 28181, 16834, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 9877, 25, 262, 9877, 286, 262, 3275, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 7032, 25, 262, 7032, 286, 262, 3275, 355, 257, 46545, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2882, 25, 257, 2882, 2134, 284, 5412, 869, 10146, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 351, 2116, 13, 448, 3524, 13, 22065, 62, 22252, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8002, 263, 13, 8002, 62, 7249, 7, 12683, 1300, 11, 7032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 448, 3524, 13, 37150, 62, 20500, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16733, 274, 13, 33295, 7, 26209, 8, 628, 220, 220, 220, 30351, 825, 3758, 62, 439, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 16290, 477, 8358, 1739, 6218, 284, 262, 4382, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 20225, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 4809, 3118, 15182, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 37, 6255, 284, 3551, 284, 4838, 4637, 1391, 0, 81, 92, 37913, 0, 81, 30072, 1911, 18982, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 403, 411, 5634, 62, 21975, 11, 2116, 13, 15388, 62, 10951, 13, 21975, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 4299, 16260, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 4809, 3118, 15182, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 37, 6255, 284, 3551, 284, 49119, 4637, 1391, 0, 81, 92, 37913, 0, 81, 30072, 1911, 18982, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 403, 411, 5634, 62, 21975, 11, 2116, 13, 15388, 62, 10951, 13, 21975, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 25507, 2116, 13557, 21280, 62, 439, 3419, 628, 220, 220, 220, 2488, 39305, 13, 397, 8709, 24396, 198, 220, 220, 220, 30351, 825, 4808, 14681, 62, 20500, 7, 944, 11, 3307, 11, 10638, 62, 12683, 1300, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10638, 62, 38993, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 797, 15164, 379, 749, 530, 3275, 422, 262, 4382, 11, 611, 1695, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 362, 12, 83, 29291, 286, 1271, 286, 3703, 6218, 290, 1271, 286, 10638, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6218, 11351, 1740, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 30351, 825, 21207, 62, 439, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 376, 7569, 477, 11660, 6218, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 362, 12, 83, 29291, 286, 1271, 286, 3703, 6218, 290, 1271, 286, 10638, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6218, 11351, 1740, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3703, 62, 9127, 796, 10638, 62, 9127, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 981, 2116, 13, 16733, 274, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 2116, 13, 16733, 274, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 407, 2882, 13, 20751, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3703, 62, 67, 12514, 11, 10638, 62, 67, 12514, 796, 25507, 2116, 13, 69, 7569, 62, 20500, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3703, 62, 9127, 15853, 3703, 62, 67, 12514, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10638, 62, 9127, 15853, 10638, 62, 67, 12514, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3703, 62, 9127, 11, 10638, 62, 9127, 628, 220, 220, 220, 4808, 301, 1000, 796, 10352, 628, 220, 220, 220, 30351, 825, 1969, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 26125, 262, 4637, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13557, 20225, 393, 2116, 13557, 565, 2752, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 565, 2752, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2116, 13557, 4299, 16260, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11274, 16390, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 2116, 13557, 21280, 62, 439, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 357, 2640, 12331, 11, 21764, 12331, 11, 12434, 12331, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 7203, 58, 2, 4, 3023, 55, 60, 220, 327, 25, 1279, 32737, 29, 1600, 2116, 13, 12001, 62, 634, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44971, 13, 19836, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 440, 5188, 81, 1472, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 3443, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 20225, 796, 6407, 628, 220, 220, 220, 30351, 825, 1969, 62, 13159, 62, 41938, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7248, 262, 17802, 284, 1729, 12, 41938, 290, 1969, 340, 13, 628, 220, 220, 220, 220, 220, 220, 220, 770, 481, 1949, 284, 3758, 262, 4600, 11230, 3727, 17513, 36, 63, 3275, 357, 35569, 262, 17802, 318, 407, 198, 220, 220, 220, 220, 220, 220, 220, 7498, 355, 49119, 737, 2102, 11, 815, 262, 3551, 4905, 2421, 198, 220, 220, 220, 220, 220, 220, 220, 12013, 357, 68, 13, 70, 1539, 257, 1336, 3127, 11876, 828, 788, 262, 17802, 481, 307, 4838, 198, 220, 220, 220, 220, 220, 220, 220, 3393, 357, 19419, 4600, 11230, 3727, 17513, 36, 63, 3275, 737, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13557, 20225, 393, 2116, 13557, 565, 2752, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44971, 13, 2617, 48678, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 2116, 13, 19836, 3419, 628, 220, 220, 220, 825, 318, 62, 312, 293, 62, 1640, 7, 944, 11, 26827, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9787, 611, 4637, 468, 587, 21696, 329, 379, 1551, 262, 1813, 26827, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 26827, 25, 26827, 287, 4201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 26827, 25, 12178, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 23035, 62, 24588, 3419, 532, 2116, 13, 312, 293, 62, 20777, 1875, 26827, 628, 198, 42367, 33, 5978, 39105, 13, 33, 5978, 796, 1081, 13361, 33, 5978, 198 ]
2.41644
7,725
#!/usr/bin/env python3 """ process data generated by PageBuilder """ import json INFN = "document.json" OUTFN = "_DATA.json" print ("PROCESSING ===========================================================") ######################################################################## ## READING THE INPUT FILE print ("reading", INFN) with open(INFN, "r") as f: document_json = f.read() print ("parsing", INFN) document_data = json.loads(document_json) print ("analysing {} ({} records)".format(INFN, len(document_data))) data = [] FIELDS = ["_filename", "data"] for r in document_data: data.append({ k: r.get(k, None) for k in FIELDS}) print ("extracted {} records".format(len(data))) print ("EXTRACTED DATA:", data) ######################################################################## ## PROCESSING out_sums = {} for i in range(len(data)): d = data[i] sdata = d['data'].split(",") sdata = map(int, sdata) out_sums[d["_filename"]] = {"sum": sum(sdata)} ######################################################################## ## WRITING THE OUTPUT FILE out = { "_select": out_sums, # the key `_select` is special; it MUST contain a dict where the # dict keys are the filename (from the `_filename` field); when # a specific file `filename` is processed, the content of # out["_select"][filename] (which must be a dict) is added to # the environment, and can be added in the template #"sums": 1, } with open(OUTFN, "w") as f: f.write(json.dumps(out)) print("OUT:", out) print ("END PROCESSING =======================================================")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 14681, 1366, 7560, 416, 7873, 32875, 198, 37811, 198, 198, 11748, 33918, 198, 198, 1268, 43221, 220, 796, 366, 22897, 13, 17752, 1, 198, 2606, 10234, 45, 796, 45434, 26947, 13, 17752, 1, 628, 198, 198, 4798, 5855, 4805, 4503, 7597, 2751, 46111, 4770, 2559, 855, 4943, 198, 198, 29113, 29113, 7804, 198, 2235, 20832, 2751, 3336, 3268, 30076, 45811, 198, 4798, 5855, 25782, 1600, 3268, 43221, 8, 198, 4480, 1280, 7, 1268, 43221, 11, 366, 81, 4943, 355, 277, 25, 3188, 62, 17752, 796, 277, 13, 961, 3419, 198, 4798, 5855, 79, 945, 278, 1600, 3268, 43221, 8, 198, 22897, 62, 7890, 796, 33918, 13, 46030, 7, 22897, 62, 17752, 8, 198, 4798, 5855, 272, 26266, 278, 23884, 37913, 92, 4406, 8, 1911, 18982, 7, 1268, 43221, 11, 18896, 7, 22897, 62, 7890, 22305, 198, 198, 7890, 796, 17635, 198, 11674, 3698, 5258, 796, 14631, 62, 34345, 1600, 366, 7890, 8973, 198, 1640, 374, 287, 3188, 62, 7890, 25, 198, 220, 220, 220, 1366, 13, 33295, 15090, 479, 25, 374, 13, 1136, 7, 74, 11, 6045, 8, 329, 479, 287, 18930, 3698, 5258, 30072, 198, 198, 4798, 5855, 2302, 20216, 23884, 4406, 1911, 18982, 7, 11925, 7, 7890, 22305, 198, 4798, 5855, 6369, 5446, 38542, 42865, 25, 1600, 1366, 8, 628, 198, 29113, 29113, 7804, 198, 2235, 41755, 7597, 2751, 198, 448, 62, 82, 5700, 796, 23884, 198, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 7890, 8, 2599, 198, 220, 220, 220, 288, 796, 1366, 58, 72, 60, 198, 220, 220, 220, 264, 7890, 796, 288, 17816, 7890, 6, 4083, 35312, 7, 2430, 8, 198, 220, 220, 220, 264, 7890, 796, 3975, 7, 600, 11, 264, 7890, 8, 198, 220, 220, 220, 503, 62, 82, 5700, 58, 67, 14692, 62, 34345, 8973, 60, 796, 19779, 16345, 1298, 2160, 7, 82, 7890, 38165, 628, 198, 29113, 29113, 7804, 198, 2235, 11342, 2043, 2751, 3336, 16289, 30076, 45811, 198, 448, 796, 1391, 198, 220, 220, 220, 45434, 19738, 1298, 503, 62, 82, 5700, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 262, 1994, 4600, 62, 19738, 63, 318, 2041, 26, 340, 17191, 3994, 257, 8633, 810, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 8633, 8251, 389, 262, 29472, 357, 6738, 262, 4600, 62, 34345, 63, 2214, 1776, 618, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 257, 2176, 2393, 4600, 34345, 63, 318, 13686, 11, 262, 2695, 286, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 503, 14692, 62, 19738, 1, 7131, 34345, 60, 357, 4758, 1276, 307, 257, 8633, 8, 318, 2087, 284, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 262, 2858, 11, 290, 460, 307, 2087, 287, 262, 11055, 198, 220, 220, 220, 1303, 1, 82, 5700, 1298, 352, 11, 198, 92, 198, 4480, 1280, 7, 2606, 10234, 45, 11, 366, 86, 4943, 355, 277, 25, 277, 13, 13564, 7, 17752, 13, 67, 8142, 7, 448, 4008, 198, 4798, 7203, 12425, 25, 1600, 503, 8, 628, 198, 4798, 5855, 10619, 41755, 7597, 2751, 46111, 4770, 50155, 4943, 198 ]
3.134357
521
from cyder.api.v1.endpoints.dhcp.vrf import api
[ 6738, 3075, 1082, 13, 15042, 13, 85, 16, 13, 437, 13033, 13, 34985, 13155, 13, 37020, 69, 1330, 40391, 198 ]
2.4
20
#!/usr/bin/env python # -*- coding: utf-8 -*-
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628 ]
2.043478
23
import os from sys import intern from typing import Iterable, FrozenSet, Optional from pyramids.categorization import Category from pyramids.rules.leaf import LeafRule from pyramids.word_sets import WordSetUtils
[ 11748, 28686, 198, 6738, 25064, 1330, 1788, 198, 6738, 19720, 1330, 40806, 540, 11, 23673, 7248, 11, 32233, 198, 198, 6738, 12972, 43591, 13, 66, 47467, 1634, 1330, 21743, 198, 6738, 12972, 43591, 13, 38785, 13, 33201, 1330, 14697, 31929, 198, 6738, 12972, 43591, 13, 4775, 62, 28709, 1330, 9678, 7248, 18274, 4487, 628 ]
3.962963
54
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # 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. """ Routines for configuring Neutron """ import os from oslo.config import cfg from paste import deploy from neutron.api.v2 import attributes from neutron.common import utils from neutron.openstack.common.db.sqlalchemy import session as db_session from neutron.openstack.common import log as logging from neutron.openstack.common import rpc from neutron.version import version_info as neutron_version LOG = logging.getLogger(__name__) core_opts = [ cfg.StrOpt('bind_host', default='0.0.0.0', help=_("The host IP to bind to")), cfg.IntOpt('bind_port', default=9696, help=_("The port to bind to")), cfg.StrOpt('api_paste_config', default="api-paste.ini", help=_("The API paste config file to use")), cfg.StrOpt('api_extensions_path', default="", help=_("The path for API extensions")), cfg.StrOpt('policy_file', default="policy.json", help=_("The policy file to use")), cfg.StrOpt('auth_strategy', default='keystone', help=_("The type of authentication to use")), cfg.StrOpt('core_plugin', help=_("The core plugin Neutron will use")), cfg.ListOpt('service_plugins', default=[], help=_("The service plugins Neutron will use")), cfg.StrOpt('base_mac', default="fa:16:3e:00:00:00", help=_("The base MAC address Neutron will use for VIFs")), cfg.IntOpt('mac_generation_retries', default=16, help=_("How many times Neutron will retry MAC generation")), cfg.BoolOpt('allow_bulk', default=True, help=_("Allow the usage of the bulk API")), cfg.BoolOpt('allow_pagination', default=False, help=_("Allow the usage of the pagination")), cfg.BoolOpt('allow_sorting', default=False, help=_("Allow the usage of the sorting")), cfg.StrOpt('pagination_max_limit', default="-1", help=_("The maximum number of items returned in a single " "response, value was 'infinite' or negative integer " "means no limit")), cfg.IntOpt('max_dns_nameservers', default=5, help=_("Maximum number of DNS nameservers")), cfg.IntOpt('max_subnet_host_routes', default=20, help=_("Maximum number of host routes per subnet")), cfg.IntOpt('max_fixed_ips_per_port', default=5, help=_("Maximum number of fixed ips per port")), cfg.IntOpt('dhcp_lease_duration', default=86400, deprecated_name='dhcp_lease_time', help=_("DHCP lease duration")), cfg.BoolOpt('dhcp_agent_notification', default=True, help=_("Allow sending resource operation" " notification to DHCP agent")), cfg.BoolOpt('allow_overlapping_ips', default=False, help=_("Allow overlapping IP support in Neutron")), cfg.StrOpt('host', default=utils.get_hostname(), help=_("The hostname Neutron is running on")), cfg.BoolOpt('force_gateway_on_subnet', default=False, help=_("Ensure that configured gateway is on subnet")), ] core_cli_opts = [ cfg.StrOpt('state_path', default='/var/lib/neutron', help=_("Where to store Neutron state files. " "This directory must be writable by the agent.")), ] # Register the configuration options cfg.CONF.register_opts(core_opts) cfg.CONF.register_cli_opts(core_cli_opts) # Ensure that the control exchange is set correctly rpc.set_defaults(control_exchange='neutron') _SQL_CONNECTION_DEFAULT = 'sqlite://' # Update the default QueuePool parameters. These can be tweaked by the # configuration variables - max_pool_size, max_overflow and pool_timeout db_session.set_defaults(sql_connection=_SQL_CONNECTION_DEFAULT, sqlite_db='', max_pool_size=10, max_overflow=20, pool_timeout=10) def setup_logging(conf): """Sets up the logging options for a log with supplied name. :param conf: a cfg.ConfOpts object """ product_name = "neutron" logging.setup(product_name) LOG.info(_("Logging enabled!")) def load_paste_app(app_name): """Builds and returns a WSGI app from a paste config file. :param app_name: Name of the application to load :raises ConfigFilesNotFoundError when config file cannot be located :raises RuntimeError when application cannot be loaded from config file """ config_path = cfg.CONF.find_file(cfg.CONF.api_paste_config) if not config_path: raise cfg.ConfigFilesNotFoundError( config_files=[cfg.CONF.api_paste_config]) config_path = os.path.abspath(config_path) LOG.info(_("Config paste file: %s"), config_path) try: app = deploy.loadapp("config:%s" % config_path, name=app_name) except (LookupError, ImportError): msg = (_("Unable to load %(app_name)s from " "configuration file %(config_path)s.") % {'app_name': app_name, 'config_path': config_path}) LOG.exception(msg) raise RuntimeError(msg) return app
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 15069, 2813, 8377, 8704, 27862, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, 220, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 220, 220, 220, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 220, 220, 220, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 198, 2, 220, 220, 220, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 198, 2, 220, 220, 220, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 11247, 198, 2, 220, 220, 220, 739, 262, 13789, 13, 198, 198, 37811, 198, 49, 448, 1127, 329, 4566, 870, 3169, 315, 1313, 198, 37811, 198, 198, 11748, 28686, 198, 198, 6738, 28686, 5439, 13, 11250, 1330, 30218, 70, 198, 6738, 17008, 1330, 6061, 198, 198, 6738, 49810, 13, 15042, 13, 85, 17, 1330, 12608, 198, 6738, 49810, 13, 11321, 1330, 3384, 4487, 198, 6738, 49810, 13, 9654, 25558, 13, 11321, 13, 9945, 13, 25410, 282, 26599, 1330, 6246, 355, 20613, 62, 29891, 198, 6738, 49810, 13, 9654, 25558, 13, 11321, 1330, 2604, 355, 18931, 198, 6738, 49810, 13, 9654, 25558, 13, 11321, 1330, 374, 14751, 198, 6738, 49810, 13, 9641, 1330, 2196, 62, 10951, 355, 49810, 62, 9641, 628, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 7295, 62, 404, 912, 796, 685, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 21653, 62, 4774, 3256, 4277, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2583, 6101, 284, 11007, 284, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 21653, 62, 634, 3256, 4277, 28, 24, 38205, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2493, 284, 11007, 284, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 15042, 62, 34274, 62, 11250, 3256, 4277, 2625, 15042, 12, 34274, 13, 5362, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 7824, 17008, 4566, 2393, 284, 779, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 15042, 62, 2302, 5736, 62, 6978, 3256, 4277, 2625, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 3108, 329, 7824, 18366, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 30586, 62, 7753, 3256, 4277, 2625, 30586, 13, 17752, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2450, 2393, 284, 779, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 18439, 62, 2536, 4338, 3256, 4277, 11639, 2539, 6440, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2099, 286, 18239, 284, 779, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 7295, 62, 33803, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 4755, 13877, 3169, 315, 1313, 481, 779, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 8053, 27871, 10786, 15271, 62, 37390, 3256, 4277, 41888, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2139, 20652, 3169, 315, 1313, 481, 779, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 8692, 62, 20285, 3256, 4277, 2625, 13331, 25, 1433, 25, 18, 68, 25, 405, 25, 405, 25, 405, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2779, 20582, 2209, 3169, 315, 1313, 481, 779, 329, 569, 5064, 82, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 20285, 62, 20158, 62, 1186, 1678, 3256, 4277, 28, 1433, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 2437, 867, 1661, 3169, 315, 1313, 481, 1005, 563, 20582, 5270, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 12154, 62, 65, 12171, 3256, 4277, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 35265, 262, 8748, 286, 262, 11963, 7824, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 12154, 62, 79, 363, 1883, 3256, 4277, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 35265, 262, 8748, 286, 262, 42208, 1883, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 12154, 62, 82, 24707, 3256, 4277, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 35265, 262, 8748, 286, 262, 29407, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 79, 363, 1883, 62, 9806, 62, 32374, 3256, 4277, 2625, 12, 16, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 5415, 1271, 286, 3709, 4504, 287, 257, 2060, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 26209, 11, 1988, 373, 705, 10745, 9504, 6, 393, 4633, 18253, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1326, 504, 645, 4179, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 9806, 62, 67, 5907, 62, 14933, 263, 690, 3256, 4277, 28, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 40541, 1271, 286, 18538, 3891, 263, 690, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 9806, 62, 7266, 3262, 62, 4774, 62, 81, 448, 274, 3256, 4277, 28, 1238, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 40541, 1271, 286, 2583, 11926, 583, 850, 3262, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 9806, 62, 34021, 62, 2419, 62, 525, 62, 634, 3256, 4277, 28, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 40541, 1271, 286, 5969, 220, 2419, 583, 2493, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 5317, 27871, 10786, 34985, 13155, 62, 1274, 62, 32257, 3256, 4277, 28, 39570, 405, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39224, 62, 3672, 11639, 34985, 13155, 62, 1274, 62, 2435, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 41473, 8697, 15278, 9478, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 34985, 13155, 62, 25781, 62, 1662, 2649, 3256, 4277, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 35265, 7216, 8271, 4905, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14483, 284, 43729, 5797, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 12154, 62, 2502, 75, 5912, 62, 2419, 3256, 4277, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 35265, 32997, 6101, 1104, 287, 3169, 315, 1313, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 4774, 3256, 4277, 28, 26791, 13, 1136, 62, 4774, 3672, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 464, 2583, 3672, 3169, 315, 1313, 318, 2491, 319, 4943, 828, 198, 220, 220, 220, 30218, 70, 13, 33, 970, 27871, 10786, 3174, 62, 10494, 1014, 62, 261, 62, 7266, 3262, 3256, 4277, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 4834, 19532, 326, 17839, 24308, 318, 319, 850, 3262, 4943, 828, 198, 60, 198, 198, 7295, 62, 44506, 62, 404, 912, 796, 685, 198, 220, 220, 220, 30218, 70, 13, 13290, 27871, 10786, 5219, 62, 6978, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4277, 11639, 14, 7785, 14, 8019, 14, 710, 315, 1313, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1037, 28, 62, 7203, 8496, 284, 3650, 3169, 315, 1313, 1181, 3696, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1212, 8619, 1276, 307, 1991, 540, 416, 262, 5797, 19570, 828, 198, 60, 198, 198, 2, 17296, 262, 8398, 3689, 198, 37581, 13, 10943, 37, 13, 30238, 62, 404, 912, 7, 7295, 62, 404, 912, 8, 198, 37581, 13, 10943, 37, 13, 30238, 62, 44506, 62, 404, 912, 7, 7295, 62, 44506, 62, 404, 912, 8, 198, 198, 2, 48987, 326, 262, 1630, 5163, 318, 900, 9380, 198, 81, 14751, 13, 2617, 62, 12286, 82, 7, 13716, 62, 1069, 3803, 11639, 710, 315, 1313, 11537, 198, 62, 17861, 62, 10943, 45, 24565, 62, 7206, 38865, 796, 705, 25410, 578, 1378, 6, 198, 2, 10133, 262, 4277, 4670, 518, 27201, 10007, 13, 2312, 460, 307, 38304, 416, 262, 198, 2, 8398, 9633, 532, 3509, 62, 7742, 62, 7857, 11, 3509, 62, 2502, 11125, 290, 5933, 62, 48678, 198, 9945, 62, 29891, 13, 2617, 62, 12286, 82, 7, 25410, 62, 38659, 28, 62, 17861, 62, 10943, 45, 24565, 62, 7206, 38865, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44161, 578, 62, 9945, 11639, 3256, 3509, 62, 7742, 62, 7857, 28, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 2502, 11125, 28, 1238, 11, 5933, 62, 48678, 28, 940, 8, 628, 198, 198, 4299, 9058, 62, 6404, 2667, 7, 10414, 2599, 198, 220, 220, 220, 37227, 50, 1039, 510, 262, 18931, 3689, 329, 257, 2604, 351, 14275, 1438, 13, 628, 220, 220, 220, 1058, 17143, 1013, 25, 257, 30218, 70, 13, 18546, 27871, 82, 2134, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1720, 62, 3672, 796, 366, 710, 315, 1313, 1, 198, 220, 220, 220, 18931, 13, 40406, 7, 11167, 62, 3672, 8, 198, 220, 220, 220, 41605, 13, 10951, 28264, 7203, 11187, 2667, 9343, 2474, 4008, 628, 198, 4299, 3440, 62, 34274, 62, 1324, 7, 1324, 62, 3672, 2599, 198, 220, 220, 220, 37227, 15580, 82, 290, 5860, 257, 25290, 18878, 598, 422, 257, 17008, 4566, 2393, 13, 628, 220, 220, 220, 1058, 17143, 598, 62, 3672, 25, 6530, 286, 262, 3586, 284, 3440, 198, 220, 220, 220, 1058, 430, 2696, 17056, 25876, 3673, 21077, 12331, 618, 4566, 2393, 2314, 307, 5140, 198, 220, 220, 220, 1058, 430, 2696, 43160, 12331, 618, 3586, 2314, 307, 9639, 422, 4566, 2393, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 4566, 62, 6978, 796, 30218, 70, 13, 10943, 37, 13, 19796, 62, 7753, 7, 37581, 13, 10943, 37, 13, 15042, 62, 34274, 62, 11250, 8, 198, 220, 220, 220, 611, 407, 4566, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 30218, 70, 13, 16934, 25876, 3673, 21077, 12331, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 62, 16624, 41888, 37581, 13, 10943, 37, 13, 15042, 62, 34274, 62, 11250, 12962, 198, 220, 220, 220, 4566, 62, 6978, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 11250, 62, 6978, 8, 198, 220, 220, 220, 41605, 13, 10951, 28264, 7203, 16934, 17008, 2393, 25, 4064, 82, 12340, 4566, 62, 6978, 8, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 598, 796, 6061, 13, 2220, 1324, 7203, 11250, 25, 4, 82, 1, 4064, 4566, 62, 6978, 11, 1438, 28, 1324, 62, 3672, 8, 198, 220, 220, 220, 2845, 357, 8567, 929, 12331, 11, 17267, 12331, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 44104, 7203, 3118, 540, 284, 3440, 4064, 7, 1324, 62, 3672, 8, 82, 422, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11250, 3924, 2393, 4064, 7, 11250, 62, 6978, 8, 82, 19570, 4064, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 1324, 62, 3672, 10354, 598, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11250, 62, 6978, 10354, 4566, 62, 6978, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 13, 1069, 4516, 7, 19662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 43160, 12331, 7, 19662, 8, 198, 220, 220, 220, 1441, 598, 198 ]
2.448117
2,390
import unittest from test import support support.import_module('_testcapi') from _testcapi import _test_structmembersType, CHAR_MAX, CHAR_MIN, UCHAR_MAX, SHRT_MAX, SHRT_MIN, USHRT_MAX, INT_MAX, INT_MIN, UINT_MAX, LONG_MAX, LONG_MIN, ULONG_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PY_SSIZE_T_MAX, PY_SSIZE_T_MIN ts = _test_structmembersType(False, 1, 2, 3, 4, 5, 6, 7, 8, 23, 9.99999, 10.101010101, 'hi') if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 1332, 1330, 1104, 198, 11284, 13, 11748, 62, 21412, 10786, 62, 9288, 11128, 72, 11537, 198, 6738, 4808, 9288, 11128, 72, 1330, 4808, 9288, 62, 7249, 30814, 6030, 11, 28521, 62, 22921, 11, 28521, 62, 23678, 11, 34340, 1503, 62, 22921, 11, 6006, 14181, 62, 22921, 11, 6006, 14181, 62, 23678, 11, 1294, 39, 14181, 62, 22921, 11, 17828, 62, 22921, 11, 17828, 62, 23678, 11, 471, 12394, 62, 22921, 11, 44533, 62, 22921, 11, 44533, 62, 23678, 11, 44475, 18494, 62, 22921, 11, 27140, 18494, 62, 22921, 11, 27140, 18494, 62, 23678, 11, 471, 3069, 18494, 62, 22921, 11, 350, 56, 62, 5432, 35400, 62, 51, 62, 22921, 11, 350, 56, 62, 5432, 35400, 62, 51, 62, 23678, 198, 912, 796, 4808, 9288, 62, 7249, 30814, 6030, 7, 25101, 11, 352, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 767, 11, 807, 11, 2242, 11, 860, 13, 2079, 17032, 11, 220, 198, 220, 220, 220, 838, 13, 8784, 486, 486, 486, 11, 705, 5303, 11537, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.301508
199
#!/usr/bin/env python3 import argparse import copy import logging import sys import warnings import numpy as np import rasterio as rio import torch import torch.hub import tqdm from rasterio.windows import Window BACKBONES = [ 'vgg16', 'densenet161', 'shufflenet_v2_x1_0', 'mobilenet_v2', 'mobilenet_v3_large', 'mobilenet_v3_small', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'efficientnet_b0', 'efficientnet_b1', 'efficientnet_b2', 'efficientnet_b3', 'efficientnet_b4', 'efficientnet_b5', 'efficientnet_b6', 'efficientnet_b7', 'fpn_resnet18', 'fpn_resnet34', 'fpn_resnet50' ] if __name__ == '__main__': warnings.filterwarnings('ignore') args = cli_parser().parse_args() logging.basicConfig(stream=sys.stderr, level=logging.INFO, format='%(asctime)-15s %(message)s') log = logging.getLogger() n = args.window_size device = torch.device(args.device) model = torch.hub.load('jamesmcclain/algae-classifier:730726f5bccc679fa334da91fe4dc4cb71a35208', 'make_algae_model', in_channels=[4, 12, 224], prescale=args.prescale, backbone_str=args.backbone, pretrained=False) model.load_state_dict(torch.load(args.pth_load)) model.to(device) model.eval() if args.outfile is None: model_name = args.pth_load.split('/')[-1].split('.')[0] args.outfile = [transmute(f) for f in args.infile] for (infile, outfile) in zip(args.infile, args.outfile): log.info(outfile) with rio.open(infile, 'r') as infile_ds, torch.no_grad(): out_raw_profile = copy.deepcopy(infile_ds.profile) out_raw_profile.update({ 'compress': 'lzw', 'dtype': np.float32, 'count': 1, 'bigtiff': 'yes', 'sparse_ok': 'yes', 'tiled': 'yes', }) width = infile_ds.width height = infile_ds.height bandcount = infile_ds.count ar_out = torch.zeros((1, height, width), dtype=torch.float32).to(device) pixel_hits = torch.zeros((1, height, width), dtype=torch.uint8).to(device) if bandcount == 224: indexes = list(range(1, 224 + 1)) elif bandcount in {12, 13}: indexes = list(range(1, 12 + 1)) # NOTE: 13 bands does not indicate L1C support, this is # for Franklin COGs that have an extra band. bandcount = 12 elif bandcount == 4: indexes = list(range(1, 4 + 1)) elif bandcount == 5: indexes = [1, 2, 3, 5] bandcount = 4 else: raise Exception(f'bands={bandcount}') # gather up batches batches = [] for i in range(0, width - n, args.stride): for j in range(0, height - n, args.stride): batches.append((i, j)) batches = [batches[i:i + args.chunksize] for i in range(0, len(batches), args.chunksize)] for batch in tqdm.tqdm(batches): windows = [infile_ds.read(indexes, window=Window(i, j, n, n)) for (i, j) in batch] windows = [w.astype(np.float32) for w in windows] if args.ndwi_mask: windows = [w * (((w[2] - w[7]) / (w[2] + w[7])) > 0.0) for w in windows] try: windows = np.stack(windows, axis=0) except: continue windows = torch.from_numpy(windows).to(dtype=torch.float32, device=device) prob = model(windows) for k, (i, j) in enumerate(batch): if 'seg' in prob: _prob = torch.sigmoid(prob.get('seg')[k, 1]) - torch.sigmoid(prob.get('seg')[k, 0]) ar_out[0, j:(j + n), i:(i + n)] += _prob else: ar_out[0, j:(j + n), i:(i + n)] += torch.sigmoid(prob.get('class')[k, 0]) pixel_hits[0, j:(j + n), i:(i + n)] += 1 # Bring results back to CPU ar_out /= pixel_hits ar_out = ar_out.cpu().numpy() # Write results to file with rio.open(outfile, 'w', **out_raw_profile) as outfile_raw_ds: outfile_raw_ds.write(ar_out[0], indexes=1)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 4866, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 374, 1603, 952, 355, 374, 952, 198, 11748, 28034, 198, 11748, 28034, 13, 40140, 198, 11748, 256, 80, 36020, 198, 6738, 374, 1603, 952, 13, 28457, 1330, 26580, 198, 198, 31098, 33, 39677, 796, 685, 198, 220, 220, 220, 705, 85, 1130, 1433, 3256, 705, 67, 18756, 316, 25948, 3256, 705, 1477, 1648, 11925, 316, 62, 85, 17, 62, 87, 16, 62, 15, 3256, 705, 76, 25898, 268, 316, 62, 85, 17, 3256, 198, 220, 220, 220, 705, 76, 25898, 268, 316, 62, 85, 18, 62, 11664, 3256, 705, 76, 25898, 268, 316, 62, 85, 18, 62, 17470, 3256, 705, 411, 3262, 1507, 3256, 705, 411, 3262, 2682, 3256, 198, 220, 220, 220, 705, 411, 3262, 1120, 3256, 705, 411, 3262, 8784, 3256, 705, 411, 3262, 17827, 3256, 705, 16814, 3262, 62, 65, 15, 3256, 705, 16814, 3262, 62, 65, 16, 3256, 198, 220, 220, 220, 705, 16814, 3262, 62, 65, 17, 3256, 705, 16814, 3262, 62, 65, 18, 3256, 705, 16814, 3262, 62, 65, 19, 3256, 705, 16814, 3262, 62, 65, 20, 3256, 198, 220, 220, 220, 705, 16814, 3262, 62, 65, 21, 3256, 705, 16814, 3262, 62, 65, 22, 3256, 705, 69, 21999, 62, 411, 3262, 1507, 3256, 705, 69, 21999, 62, 411, 3262, 2682, 3256, 198, 220, 220, 220, 705, 69, 21999, 62, 411, 3262, 1120, 6, 198, 60, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 14601, 13, 24455, 40539, 654, 10786, 46430, 11537, 628, 220, 220, 220, 26498, 796, 537, 72, 62, 48610, 22446, 29572, 62, 22046, 3419, 198, 220, 220, 220, 18931, 13, 35487, 16934, 7, 5532, 28, 17597, 13, 301, 1082, 81, 11, 1241, 28, 6404, 2667, 13, 10778, 11, 5794, 11639, 4, 7, 292, 310, 524, 13219, 1314, 82, 4064, 7, 20500, 8, 82, 11537, 198, 220, 220, 220, 2604, 796, 18931, 13, 1136, 11187, 1362, 3419, 628, 220, 220, 220, 299, 796, 26498, 13, 17497, 62, 7857, 628, 220, 220, 220, 3335, 796, 28034, 13, 25202, 7, 22046, 13, 25202, 8, 198, 220, 220, 220, 2746, 796, 28034, 13, 40140, 13, 2220, 10786, 73, 1047, 76, 535, 34277, 14, 14016, 3609, 12, 4871, 7483, 25, 22, 22996, 2075, 69, 20, 65, 535, 66, 37601, 13331, 31380, 6814, 6420, 5036, 19, 17896, 19, 21101, 4869, 64, 2327, 21315, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 15883, 62, 14016, 3609, 62, 19849, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 287, 62, 354, 8961, 41888, 19, 11, 1105, 11, 26063, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10859, 1000, 28, 22046, 13, 18302, 38765, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 32774, 62, 2536, 28, 22046, 13, 1891, 15992, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2181, 13363, 28, 25101, 8, 198, 220, 220, 220, 2746, 13, 2220, 62, 5219, 62, 11600, 7, 13165, 354, 13, 2220, 7, 22046, 13, 79, 400, 62, 2220, 4008, 198, 220, 220, 220, 2746, 13, 1462, 7, 25202, 8, 198, 220, 220, 220, 2746, 13, 18206, 3419, 628, 220, 220, 220, 611, 26498, 13, 448, 7753, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 3672, 796, 26498, 13, 79, 400, 62, 2220, 13, 35312, 10786, 14, 11537, 58, 12, 16, 4083, 35312, 10786, 2637, 38381, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 26498, 13, 448, 7753, 796, 685, 7645, 76, 1133, 7, 69, 8, 329, 277, 287, 26498, 13, 259, 7753, 60, 628, 220, 220, 220, 329, 357, 259, 7753, 11, 503, 7753, 8, 287, 19974, 7, 22046, 13, 259, 7753, 11, 26498, 13, 448, 7753, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 10951, 7, 448, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 351, 374, 952, 13, 9654, 7, 259, 7753, 11, 705, 81, 11537, 355, 1167, 576, 62, 9310, 11, 28034, 13, 3919, 62, 9744, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 62, 1831, 62, 13317, 796, 4866, 13, 22089, 30073, 7, 259, 7753, 62, 9310, 13, 13317, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 62, 1831, 62, 13317, 13, 19119, 15090, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5589, 601, 10354, 705, 75, 89, 86, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 67, 4906, 10354, 45941, 13, 22468, 2624, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 9127, 10354, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 14261, 83, 733, 10354, 705, 8505, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 82, 29572, 62, 482, 10354, 705, 8505, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 83, 3902, 10354, 705, 8505, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 32092, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9647, 796, 1167, 576, 62, 9310, 13, 10394, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6001, 796, 1167, 576, 62, 9310, 13, 17015, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4097, 9127, 796, 1167, 576, 62, 9310, 13, 9127, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 610, 62, 448, 796, 28034, 13, 9107, 418, 19510, 16, 11, 6001, 11, 9647, 828, 288, 4906, 28, 13165, 354, 13, 22468, 2624, 737, 1462, 7, 25202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17465, 62, 71, 896, 796, 28034, 13, 9107, 418, 19510, 16, 11, 6001, 11, 9647, 828, 288, 4906, 28, 13165, 354, 13, 28611, 23, 737, 1462, 7, 25202, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4097, 9127, 6624, 26063, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39199, 796, 1351, 7, 9521, 7, 16, 11, 26063, 1343, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 4097, 9127, 287, 1391, 1065, 11, 1511, 38362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39199, 796, 1351, 7, 9521, 7, 16, 11, 1105, 1343, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 24550, 25, 1511, 11760, 857, 407, 7603, 406, 16, 34, 1104, 11, 428, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 329, 14021, 7375, 33884, 326, 423, 281, 3131, 4097, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4097, 9127, 796, 1105, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 4097, 9127, 6624, 604, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39199, 796, 1351, 7, 9521, 7, 16, 11, 604, 1343, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 4097, 9127, 6624, 642, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39199, 796, 685, 16, 11, 362, 11, 513, 11, 642, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4097, 9127, 796, 604, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 35528, 7, 69, 6, 21397, 34758, 3903, 9127, 92, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6431, 510, 37830, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37830, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 15, 11, 9647, 532, 299, 11, 26498, 13, 2536, 485, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 2837, 7, 15, 11, 6001, 532, 299, 11, 26498, 13, 2536, 485, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37830, 13, 33295, 19510, 72, 11, 474, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37830, 796, 685, 8664, 2052, 58, 72, 25, 72, 1343, 26498, 13, 354, 14125, 1096, 60, 329, 1312, 287, 2837, 7, 15, 11, 18896, 7, 8664, 2052, 828, 26498, 13, 354, 14125, 1096, 15437, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 15458, 287, 256, 80, 36020, 13, 83, 80, 36020, 7, 8664, 2052, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9168, 796, 685, 259, 7753, 62, 9310, 13, 961, 7, 9630, 274, 11, 4324, 28, 27703, 7, 72, 11, 474, 11, 299, 11, 299, 4008, 329, 357, 72, 11, 474, 8, 287, 15458, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9168, 796, 685, 86, 13, 459, 2981, 7, 37659, 13, 22468, 2624, 8, 329, 266, 287, 9168, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 26498, 13, 358, 37686, 62, 27932, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9168, 796, 685, 86, 1635, 14808, 7, 86, 58, 17, 60, 532, 266, 58, 22, 12962, 1220, 357, 86, 58, 17, 60, 1343, 266, 58, 22, 60, 4008, 1875, 657, 13, 15, 8, 329, 266, 287, 9168, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9168, 796, 45941, 13, 25558, 7, 28457, 11, 16488, 28, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9168, 796, 28034, 13, 6738, 62, 77, 32152, 7, 28457, 737, 1462, 7, 67, 4906, 28, 13165, 354, 13, 22468, 2624, 11, 3335, 28, 25202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1861, 796, 2746, 7, 28457, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 11, 357, 72, 11, 474, 8, 287, 27056, 378, 7, 43501, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 705, 325, 70, 6, 287, 1861, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 1676, 65, 796, 28034, 13, 82, 17225, 1868, 7, 1676, 65, 13, 1136, 10786, 325, 70, 11537, 58, 74, 11, 352, 12962, 532, 28034, 13, 82, 17225, 1868, 7, 1676, 65, 13, 1136, 10786, 325, 70, 11537, 58, 74, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 610, 62, 448, 58, 15, 11, 474, 37498, 73, 1343, 299, 828, 1312, 37498, 72, 1343, 299, 15437, 15853, 4808, 1676, 65, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 610, 62, 448, 58, 15, 11, 474, 37498, 73, 1343, 299, 828, 1312, 37498, 72, 1343, 299, 15437, 15853, 28034, 13, 82, 17225, 1868, 7, 1676, 65, 13, 1136, 10786, 4871, 11537, 58, 74, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17465, 62, 71, 896, 58, 15, 11, 474, 37498, 73, 1343, 299, 828, 1312, 37498, 72, 1343, 299, 15437, 15853, 352, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 24347, 2482, 736, 284, 9135, 198, 220, 220, 220, 220, 220, 220, 220, 610, 62, 448, 1220, 28, 17465, 62, 71, 896, 198, 220, 220, 220, 220, 220, 220, 220, 610, 62, 448, 796, 610, 62, 448, 13, 36166, 22446, 77, 32152, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 19430, 2482, 284, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 351, 374, 952, 13, 9654, 7, 448, 7753, 11, 705, 86, 3256, 12429, 448, 62, 1831, 62, 13317, 8, 355, 503, 7753, 62, 1831, 62, 9310, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 7753, 62, 1831, 62, 9310, 13, 13564, 7, 283, 62, 448, 58, 15, 4357, 39199, 28, 16, 8, 198 ]
1.878181
2,397
# -*- coding: utf-8 -*- from django.conf import settings # How often to check TZ_DETECT_PERIOD = getattr(settings, 'TZ_DETECT_PERIOD', 3*3600) # Version of moment and moment-timezone to load TZ_DETECT_SCRIPTS = getattr(settings, 'TZ_DETECT_SCRIPTS', [ '<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js" integrity="sha256-4iQZ6BVL4qNKlQ27TExEhBN1HFPvAvAMbFavKKosSWQ=" crossorigin="anonymous"></script>', '<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.28/moment-timezone-with-data-10-year-range.min.js" integrity="sha256-HS6OzSyhM0rDG0PhZGwf/FvptBzIJnv4MgL2pe87xgg=" crossorigin="anonymous"></script>' ])
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 2, 1374, 1690, 284, 2198, 198, 51, 57, 62, 35, 2767, 9782, 62, 18973, 40, 3727, 796, 651, 35226, 7, 33692, 11, 705, 51, 57, 62, 35, 2767, 9782, 62, 18973, 40, 3727, 3256, 513, 9, 2623, 405, 8, 198, 198, 2, 10628, 286, 2589, 290, 2589, 12, 2435, 11340, 284, 3440, 198, 51, 57, 62, 35, 2767, 9782, 62, 6173, 32618, 4694, 796, 651, 35226, 7, 33692, 11, 705, 51, 57, 62, 35, 2767, 9782, 62, 6173, 32618, 4694, 3256, 685, 198, 220, 705, 27, 12048, 12351, 2625, 5450, 1378, 32341, 8457, 13, 17721, 2704, 533, 13, 785, 14, 1228, 897, 14, 8019, 82, 14, 32542, 298, 13, 8457, 14, 17, 13, 1731, 13, 15, 14, 32542, 298, 13, 1084, 13, 8457, 1, 11540, 2625, 26270, 11645, 12, 19, 72, 48, 57, 21, 33, 47468, 19, 80, 46888, 75, 48, 1983, 51, 3109, 43894, 15766, 16, 39, 5837, 85, 7355, 2390, 65, 37, 615, 16601, 418, 17887, 48, 2625, 3272, 47103, 2625, 272, 6704, 23984, 12048, 29, 3256, 198, 220, 705, 27, 12048, 12351, 2625, 5450, 1378, 32341, 8457, 13, 17721, 2704, 533, 13, 785, 14, 1228, 897, 14, 8019, 82, 14, 32542, 298, 12, 2435, 11340, 14, 15, 13, 20, 13, 2078, 14, 32542, 298, 12, 2435, 11340, 12, 4480, 12, 7890, 12, 940, 12, 1941, 12, 9521, 13, 1084, 13, 8457, 1, 11540, 2625, 26270, 11645, 12, 7998, 21, 46, 89, 13940, 71, 44, 15, 81, 35, 38, 15, 2725, 57, 38, 86, 69, 14, 37, 85, 457, 33, 89, 23852, 48005, 19, 44, 70, 43, 17, 431, 5774, 87, 1130, 2625, 3272, 47103, 2625, 272, 6704, 23984, 12048, 29, 6, 198, 12962 ]
2.23
300
import random from cs.structures import Edge, Graph, Node, V def kargers_min_cut(orig_graph: Graph[V]) -> set[Edge[V]]: """ Partitions a graph using Karger's Algorithm. Works on directed and undirected graphs, but involves random choices, so it does not give consistent outputs. Args: graph: A dictionary containing adacency lists for the graph. Nodes must be strings. Returns: The cutset of the cut found by Karger's Algorithm. """ graph: Graph[Node[tuple[V, ...]]] = Graph.from_graph( orig_graph, node_fn=lambda x: Node((x,)) ) while len(graph) > 2: edge = random.choice(tuple(graph.edges)) # Contract edge (u, v) to new node uv uv = Node(edge.start.data + edge.end.data) uv_neighbors = graph[edge.start] | graph[edge.end] del uv_neighbors[edge.start] del uv_neighbors[edge.end] graph.add_node(uv) for neighbor in uv_neighbors: graph.add_edge(uv, neighbor) if graph.is_directed: graph.add_edge(neighbor, uv) # Remove nodes u and v. graph.remove_node(edge.start) graph.remove_node(edge.end) # Find cutset. group1, group2 = graph.nodes result_set = set() for subnode in group1.data: for subneighbor in group2.data: if subneighbor in orig_graph[subnode] or subnode in orig_graph[subneighbor]: result_set.add(orig_graph[subnode][subneighbor]) return result_set
[ 11748, 4738, 198, 198, 6738, 50115, 13, 7249, 942, 1330, 13113, 11, 29681, 11, 19081, 11, 569, 628, 198, 4299, 479, 853, 364, 62, 1084, 62, 8968, 7, 11612, 62, 34960, 25, 29681, 58, 53, 12962, 4613, 900, 58, 37021, 58, 53, 60, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2142, 1756, 257, 4823, 1262, 509, 32270, 338, 978, 42289, 13, 10933, 319, 7924, 290, 3318, 1060, 276, 198, 220, 220, 220, 28770, 11, 475, 9018, 4738, 7747, 11, 523, 340, 857, 407, 1577, 6414, 23862, 13, 198, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4823, 25, 317, 22155, 7268, 512, 330, 1387, 8341, 329, 262, 4823, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 4147, 1276, 307, 13042, 13, 198, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 383, 2005, 2617, 286, 262, 2005, 1043, 416, 509, 32270, 338, 978, 42289, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4823, 25, 29681, 58, 19667, 58, 83, 29291, 58, 53, 11, 2644, 11907, 60, 796, 29681, 13, 6738, 62, 34960, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1796, 62, 34960, 11, 10139, 62, 22184, 28, 50033, 2124, 25, 19081, 19510, 87, 11, 4008, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 981, 18896, 7, 34960, 8, 1875, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5743, 796, 4738, 13, 25541, 7, 83, 29291, 7, 34960, 13, 276, 3212, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 17453, 5743, 357, 84, 11, 410, 8, 284, 649, 10139, 334, 85, 198, 220, 220, 220, 220, 220, 220, 220, 334, 85, 796, 19081, 7, 14907, 13, 9688, 13, 7890, 1343, 5743, 13, 437, 13, 7890, 8, 628, 220, 220, 220, 220, 220, 220, 220, 334, 85, 62, 710, 394, 32289, 796, 4823, 58, 14907, 13, 9688, 60, 930, 4823, 58, 14907, 13, 437, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 334, 85, 62, 710, 394, 32289, 58, 14907, 13, 9688, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 334, 85, 62, 710, 394, 32289, 58, 14907, 13, 437, 60, 628, 220, 220, 220, 220, 220, 220, 220, 4823, 13, 2860, 62, 17440, 7, 14795, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4780, 287, 334, 85, 62, 710, 394, 32289, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4823, 13, 2860, 62, 14907, 7, 14795, 11, 4780, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4823, 13, 271, 62, 34762, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4823, 13, 2860, 62, 14907, 7, 710, 394, 2865, 11, 334, 85, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 17220, 13760, 334, 290, 410, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4823, 13, 28956, 62, 17440, 7, 14907, 13, 9688, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4823, 13, 28956, 62, 17440, 7, 14907, 13, 437, 8, 628, 220, 220, 220, 1303, 9938, 2005, 2617, 13, 198, 220, 220, 220, 1448, 16, 11, 1448, 17, 796, 4823, 13, 77, 4147, 198, 220, 220, 220, 1255, 62, 2617, 796, 900, 3419, 198, 220, 220, 220, 329, 850, 17440, 287, 1448, 16, 13, 7890, 25, 198, 220, 220, 220, 220, 220, 220, 220, 329, 850, 710, 394, 2865, 287, 1448, 17, 13, 7890, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 850, 710, 394, 2865, 287, 1796, 62, 34960, 58, 7266, 17440, 60, 393, 850, 17440, 287, 1796, 62, 34960, 58, 7266, 710, 394, 2865, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 2617, 13, 2860, 7, 11612, 62, 34960, 58, 7266, 17440, 7131, 7266, 710, 394, 2865, 12962, 628, 220, 220, 220, 1441, 1255, 62, 2617, 198 ]
2.269345
672
#!/bin/python3 import os # Complete the findDigits function below. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') t = int(input()) for t_itr in range(t): n = int(input()) result = findDigits(n) fptr.write(str(result) + '\n') fptr.close()
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 198, 2, 13248, 262, 1064, 19511, 896, 2163, 2174, 13, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 277, 20692, 796, 1280, 7, 418, 13, 268, 2268, 17816, 2606, 7250, 3843, 62, 34219, 6, 4357, 705, 86, 11537, 628, 220, 220, 220, 256, 796, 493, 7, 15414, 28955, 628, 220, 220, 220, 329, 256, 62, 270, 81, 287, 2837, 7, 83, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 493, 7, 15414, 28955, 628, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 1064, 19511, 896, 7, 77, 8, 628, 220, 220, 220, 220, 220, 220, 220, 277, 20692, 13, 13564, 7, 2536, 7, 20274, 8, 1343, 705, 59, 77, 11537, 628, 220, 220, 220, 277, 20692, 13, 19836, 3419, 198 ]
2.166667
144
from django.urls import path from dfirtrack_artifacts.creator import artifact_creator from dfirtrack_artifacts.exporter.spreadsheet import xls from dfirtrack_artifacts.views import ( artifact_view, artifactpriority_view, artifactstatus_view, artifacttype_view, ) urlpatterns = ( # urls for Artifact path( r'artifact/', artifact_view.ArtifactListView.as_view(), name='artifacts_artifact_list', ), path( r'artifact/closed/', artifact_view.ArtifactClosedView.as_view(), name='artifacts_artifact_closed', ), path( r'artifact/all/', artifact_view.ArtifactAllView.as_view(), name='artifacts_artifact_all', ), path( r'artifact/create/', artifact_view.ArtifactCreateView.as_view(), name='artifacts_artifact_create', ), path( r'artifact/detail/<int:pk>/', artifact_view.ArtifactDetailView.as_view(), name='artifacts_artifact_detail', ), path( r'artifact/update/<int:pk>/', artifact_view.ArtifactUpdateView.as_view(), name='artifacts_artifact_update', ), path( r'artifact/<int:pk>/set_user/', artifact_view.ArtifactSetUser.as_view(), name='artifact_set_user', ), path( r'artifact/<int:pk>/unset_user/', artifact_view.ArtifactUnsetUser.as_view(), name='artifact_unset_user', ), path( r'artifact/creator/', artifact_creator.artifact_creator, name='artifact_creator' ), path( r'artifact/exporter/spreadsheet/xls/artifact/', xls.artifact, name='artifact_exporter_spreadsheet_xls', ), path( r'artifact/exporter/spreadsheet/xls/artifact/cron/', xls.artifact_create_cron, name='artifact_exporter_spreadsheet_xls_cron', ), ) urlpatterns += ( # urls for Artifactpriority path( r'artifactpriority/', artifactpriority_view.ArtifactpriorityListView.as_view(), name='artifacts_artifactpriority_list', ), path( r'artifactpriority/detail/<int:pk>/', artifactpriority_view.ArtifactpriorityDetailView.as_view(), name='artifacts_artifactpriority_detail', ), ) urlpatterns += ( # urls for Artifactstatus path( r'artifactstatus/', artifactstatus_view.ArtifactstatusListView.as_view(), name='artifacts_artifactstatus_list', ), path( r'artifactstatus/detail/<int:pk>/', artifactstatus_view.ArtifactstatusDetailView.as_view(), name='artifacts_artifactstatus_detail', ), ) urlpatterns += ( # urls for Artifacttype path( r'artifacttype/', artifacttype_view.ArtifacttypeListView.as_view(), name='artifacts_artifacttype_list', ), path( r'artifacttype/create/', artifacttype_view.ArtifacttypeCreateView.as_view(), name='artifacts_artifacttype_create', ), path( r'artifacttype/add_popup/', artifacttype_view.ArtifacttypeCreatePopup.as_view(), name='artifacttype_add_popup', ), path( r'artifacttype/detail/<int:pk>/', artifacttype_view.ArtifacttypeDetailView.as_view(), name='artifacts_artifacttype_detail', ), path( r'artifacttype/update/<int:pk>/', artifacttype_view.ArtifacttypeUpdateView.as_view(), name='artifacts_artifacttype_update', ), )
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 47764, 343, 11659, 62, 50179, 13, 45382, 1330, 24127, 62, 45382, 198, 6738, 47764, 343, 11659, 62, 50179, 13, 1069, 26634, 13, 43639, 21760, 1330, 2124, 7278, 198, 6738, 47764, 343, 11659, 62, 50179, 13, 33571, 1330, 357, 198, 220, 220, 220, 24127, 62, 1177, 11, 198, 220, 220, 220, 24127, 49336, 62, 1177, 11, 198, 220, 220, 220, 24127, 13376, 62, 1177, 11, 198, 220, 220, 220, 24127, 4906, 62, 1177, 11, 198, 8, 198, 198, 6371, 33279, 82, 796, 357, 198, 220, 220, 220, 1303, 2956, 7278, 329, 45908, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 8053, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 4868, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 20225, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 2601, 1335, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 20225, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 439, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 3237, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 439, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 17953, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 16447, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 17953, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 49170, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 11242, 603, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 49170, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 19119, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 10260, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 62, 19119, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 27, 600, 25, 79, 74, 29, 14, 2617, 62, 7220, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 7248, 12982, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 433, 29660, 62, 2617, 62, 7220, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 27, 600, 25, 79, 74, 29, 14, 403, 2617, 62, 7220, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 62, 1177, 13, 8001, 29660, 3118, 2617, 12982, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 433, 29660, 62, 403, 2617, 62, 7220, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 45382, 14, 3256, 24127, 62, 45382, 13, 433, 29660, 62, 45382, 11, 1438, 11639, 433, 29660, 62, 45382, 6, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 1069, 26634, 14, 43639, 21760, 14, 87, 7278, 14, 433, 29660, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 7278, 13, 433, 29660, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 433, 29660, 62, 1069, 26634, 62, 43639, 21760, 62, 87, 7278, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 14, 1069, 26634, 14, 43639, 21760, 14, 87, 7278, 14, 433, 29660, 14, 66, 1313, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 7278, 13, 433, 29660, 62, 17953, 62, 66, 1313, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 433, 29660, 62, 1069, 26634, 62, 43639, 21760, 62, 87, 7278, 62, 66, 1313, 3256, 198, 220, 220, 220, 10612, 198, 8, 198, 198, 6371, 33279, 82, 15853, 357, 198, 220, 220, 220, 1303, 2956, 7278, 329, 45908, 49336, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 49336, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 49336, 62, 1177, 13, 8001, 29660, 49336, 8053, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 49336, 62, 4868, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 49336, 14, 49170, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 49336, 62, 1177, 13, 8001, 29660, 49336, 11242, 603, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 49336, 62, 49170, 3256, 198, 220, 220, 220, 10612, 198, 8, 198, 198, 6371, 33279, 82, 15853, 357, 198, 220, 220, 220, 1303, 2956, 7278, 329, 45908, 13376, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 13376, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 13376, 62, 1177, 13, 8001, 29660, 13376, 8053, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 13376, 62, 4868, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 13376, 14, 49170, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 13376, 62, 1177, 13, 8001, 29660, 13376, 11242, 603, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 13376, 62, 49170, 3256, 198, 220, 220, 220, 10612, 198, 8, 198, 198, 6371, 33279, 82, 15853, 357, 198, 220, 220, 220, 1303, 2956, 7278, 329, 45908, 4906, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 4906, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 4906, 62, 1177, 13, 8001, 29660, 4906, 8053, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 4906, 62, 4868, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 4906, 14, 17953, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 4906, 62, 1177, 13, 8001, 29660, 4906, 16447, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 4906, 62, 17953, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 4906, 14, 2860, 62, 12924, 929, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 4906, 62, 1177, 13, 8001, 29660, 4906, 16447, 16979, 929, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 433, 29660, 4906, 62, 2860, 62, 12924, 929, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 4906, 14, 49170, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 4906, 62, 1177, 13, 8001, 29660, 4906, 11242, 603, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 4906, 62, 49170, 3256, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 3108, 7, 198, 220, 220, 220, 220, 220, 220, 220, 374, 6, 433, 29660, 4906, 14, 19119, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 24127, 4906, 62, 1177, 13, 8001, 29660, 4906, 10260, 7680, 13, 292, 62, 1177, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 50179, 62, 433, 29660, 4906, 62, 19119, 3256, 198, 220, 220, 220, 10612, 198, 8, 198 ]
2.211097
1,568
from mayan.apps.appearance.classes import Icon icon_user_locale_profile_detail = Icon( driver_name='fontawesome', symbol='globe' ) icon_user_locale_profile_edit = Icon( driver_name='fontawesome-dual', primary_symbol='globe', secondary_symbol='pencil-alt' )
[ 6738, 743, 272, 13, 18211, 13, 1324, 23435, 13, 37724, 1330, 26544, 198, 198, 4749, 62, 7220, 62, 17946, 1000, 62, 13317, 62, 49170, 796, 26544, 7, 198, 220, 220, 220, 4639, 62, 3672, 11639, 10331, 707, 5927, 3256, 6194, 11639, 4743, 5910, 6, 198, 8, 198, 4749, 62, 7220, 62, 17946, 1000, 62, 13317, 62, 19312, 796, 26544, 7, 198, 220, 220, 220, 4639, 62, 3672, 11639, 10331, 707, 5927, 12, 646, 282, 3256, 4165, 62, 1837, 23650, 11639, 4743, 5910, 3256, 198, 220, 220, 220, 9233, 62, 1837, 23650, 11639, 3617, 2856, 12, 2501, 6, 198, 8, 198 ]
2.7
100
import os import sys import pdb import re from copy import deepcopy from operator import itemgetter import json import pandas as pd dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, dir_path + '/../..') from plastering.metadata_interface import * from plastering.evaluator import * target_building = 'sdh' currfile = __file__ base_dir = os.path.dirname(currfile) target_dir = base_dir + '/' + target_building orig_cluster_sizes = {} total_names = [] for filename in os.listdir(target_dir): if not re.match('{0}-ORIGINAL-METADATA-\\d+$'.format(target_building.upper()), filename): continue cid = get_number(filename) with open(target_dir + '/' + filename, 'r') as fp: names = fp.readlines() orig_cluster_sizes[cid] = len(names) total_names += names total_names = list(set(total_names)) total_srcids = [get_srcid(name) for name in total_names] curr_cluster_sizes = deepcopy(orig_cluster_sizes) true_tagsets = {srcid: LabeledMetadata.objects(srcid=srcid).first().tagsets for srcid in total_srcids} true_points = {srcid: LabeledMetadata.objects(srcid=srcid).first().point_tagset for srcid in total_srcids} qualified_examples_nums = {} for filename in os.listdir(target_dir): if not re.match('l-ex-\\d+-out$', filename): continue cid = get_number(filename) df = pd.read_csv(target_dir + '/' + filename) df.columns = df.columns.str.strip() coverages = df['Num Examples Thought to be fully qualified'].tolist() qualified_examples_nums[cid] = coverages inferred_points_dict = {i: {} for i in curr_cluster_sizes.keys()} for filename in os.listdir(target_dir): if not re.match('l-ex-\\d+-out-points-qualified$', filename): continue cid = get_number(filename) with open(target_dir + '/' + filename, 'r') as fp: lines = fp.readlines() for line in lines: ex_id = int(line.split(' ')[0]) if "'" not in line: items = [] else: items = line.split('[')[-1].split(']')[0][1:-1].split("', '") inferred_points_dict[cid][ex_id] = items pred = {} curr_eids = {i: 0 for i in curr_cluster_sizes.keys()} total_num = sum(orig_cluster_sizes.values()) pred_names = set() cnt = 0 accs = [] f1s = [] mf1s = [] anymf1s = [] srcids = [] pred = {srcid: [] for srcid in total_srcids} point_pred = {srcid: [] for srcid in total_srcids} res = [] while not is_finished(): # select cluster #max_cid = max(curr_cluster_sizes.items(), key=itemgetter(1))[0] cnt += 1 max_cid = select_next_cid() curr_eids[max_cid] += 1 curr_eid = curr_eids[max_cid] found_names = set(inferred_points_dict[max_cid][curr_eid]) new_names = found_names - pred_names new_srcids = [get_srcid(name) for name in new_names] pred_names = pred_names.union(new_names) curr_cluster_sizes[max_cid] = orig_cluster_sizes[max_cid] - len(found_names) acc = len(pred_names) / total_num print('{0}\tacc: {1}'.format(cnt, acc)) pred.update({srcid: LabeledMetadata.objects(srcid=srcid).first().tagsets for srcid in new_srcids}) point_pred.update({ srcid: LabeledMetadata.objects(srcid=srcid).first().point_tagset for srcid in new_srcids}) anymf1 = get_macro_f1(true_tagsets, pred) mf1 = get_macro_f1(true_points, point_pred) f1 = get_micro_f1(true_points, point_pred) #mf1s.append(mf1) #f1s.append(f1) #anymf1s.append(anymf1) #accs.append(acc) #srcids.append(len(pred_names)) row = { 'metrics': { 'f1': f1, 'macrof1': mf1, 'accuracy': acc, 'macrof1-all': anymf1 }, 'learning_srcids': cnt } res.append(row) with open('result/pointonly_notransfer_arka_{0}_0.json'.format(target_building), 'w') as fp: json.dump(res, fp)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 279, 9945, 198, 11748, 302, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 11748, 33918, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 15908, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 26672, 62, 6978, 1343, 31051, 40720, 492, 11537, 198, 6738, 46376, 278, 13, 38993, 62, 39994, 1330, 1635, 198, 6738, 46376, 278, 13, 18206, 84, 1352, 1330, 1635, 198, 198, 16793, 62, 16894, 796, 705, 21282, 71, 6, 198, 22019, 81, 7753, 796, 11593, 7753, 834, 198, 8692, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 22019, 81, 7753, 8, 198, 16793, 62, 15908, 796, 2779, 62, 15908, 1343, 31051, 6, 1343, 2496, 62, 16894, 628, 198, 11612, 62, 565, 5819, 62, 82, 4340, 796, 23884, 198, 23350, 62, 14933, 796, 17635, 198, 1640, 29472, 287, 28686, 13, 4868, 15908, 7, 16793, 62, 15908, 2599, 198, 220, 220, 220, 611, 407, 302, 13, 15699, 10786, 90, 15, 92, 12, 1581, 3528, 17961, 12, 47123, 2885, 13563, 12, 6852, 67, 10, 3, 4458, 18982, 7, 16793, 62, 16894, 13, 45828, 3419, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29472, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 269, 312, 796, 651, 62, 17618, 7, 34345, 8, 198, 220, 220, 220, 351, 1280, 7, 16793, 62, 15908, 1343, 31051, 6, 1343, 29472, 11, 705, 81, 11537, 355, 277, 79, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3891, 796, 277, 79, 13, 961, 6615, 3419, 198, 220, 220, 220, 1796, 62, 565, 5819, 62, 82, 4340, 58, 66, 312, 60, 796, 18896, 7, 14933, 8, 198, 220, 220, 220, 2472, 62, 14933, 15853, 3891, 198, 23350, 62, 14933, 796, 1351, 7, 2617, 7, 23350, 62, 14933, 4008, 198, 23350, 62, 10677, 2340, 796, 685, 1136, 62, 10677, 312, 7, 3672, 8, 329, 1438, 287, 2472, 62, 14933, 60, 198, 22019, 81, 62, 565, 5819, 62, 82, 4340, 796, 2769, 30073, 7, 11612, 62, 565, 5819, 62, 82, 4340, 8, 198, 198, 7942, 62, 31499, 1039, 796, 1391, 10677, 312, 25, 3498, 18449, 9171, 14706, 13, 48205, 7, 10677, 312, 28, 10677, 312, 737, 11085, 22446, 31499, 1039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 12351, 312, 287, 2472, 62, 10677, 2340, 92, 198, 7942, 62, 13033, 796, 1391, 10677, 312, 25, 3498, 18449, 9171, 14706, 13, 48205, 7, 10677, 312, 28, 10677, 312, 737, 11085, 22446, 4122, 62, 12985, 2617, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 12351, 312, 287, 2472, 62, 10677, 2340, 92, 198, 198, 22557, 62, 1069, 12629, 62, 77, 5700, 796, 23884, 198, 1640, 29472, 287, 28686, 13, 4868, 15908, 7, 16793, 62, 15908, 2599, 198, 220, 220, 220, 611, 407, 302, 13, 15699, 10786, 75, 12, 1069, 12, 6852, 67, 10, 12, 448, 3, 3256, 29472, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 269, 312, 796, 651, 62, 17618, 7, 34345, 8, 198, 220, 220, 220, 47764, 796, 279, 67, 13, 961, 62, 40664, 7, 16793, 62, 15908, 1343, 31051, 6, 1343, 29472, 8, 198, 220, 220, 220, 47764, 13, 28665, 82, 796, 47764, 13, 28665, 82, 13, 2536, 13, 36311, 3419, 198, 220, 220, 220, 3002, 1095, 796, 47764, 17816, 33111, 21066, 27522, 284, 307, 3938, 10617, 6, 4083, 83, 349, 396, 3419, 198, 220, 220, 220, 10617, 62, 1069, 12629, 62, 77, 5700, 58, 66, 312, 60, 796, 3002, 1095, 628, 198, 259, 18186, 62, 13033, 62, 11600, 796, 1391, 72, 25, 23884, 329, 1312, 287, 1090, 81, 62, 565, 5819, 62, 82, 4340, 13, 13083, 3419, 92, 198, 1640, 29472, 287, 28686, 13, 4868, 15908, 7, 16793, 62, 15908, 2599, 198, 220, 220, 220, 611, 407, 302, 13, 15699, 10786, 75, 12, 1069, 12, 6852, 67, 10, 12, 448, 12, 13033, 12, 22557, 3, 3256, 29472, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 269, 312, 796, 651, 62, 17618, 7, 34345, 8, 198, 220, 220, 220, 351, 1280, 7, 16793, 62, 15908, 1343, 31051, 6, 1343, 29472, 11, 705, 81, 11537, 355, 277, 79, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3951, 796, 277, 79, 13, 961, 6615, 3419, 198, 220, 220, 220, 329, 1627, 287, 3951, 25, 198, 220, 220, 220, 220, 220, 220, 220, 409, 62, 312, 796, 493, 7, 1370, 13, 35312, 10786, 705, 38381, 15, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 611, 24018, 1, 407, 287, 1627, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3709, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3709, 796, 1627, 13, 35312, 10786, 58, 11537, 58, 12, 16, 4083, 35312, 10786, 60, 11537, 58, 15, 7131, 16, 21912, 16, 4083, 35312, 7203, 3256, 705, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 41240, 62, 13033, 62, 11600, 58, 66, 312, 7131, 1069, 62, 312, 60, 796, 3709, 198, 198, 28764, 796, 23884, 198, 198, 22019, 81, 62, 68, 2340, 796, 1391, 72, 25, 657, 329, 1312, 287, 1090, 81, 62, 565, 5819, 62, 82, 4340, 13, 13083, 3419, 92, 628, 198, 23350, 62, 22510, 796, 2160, 7, 11612, 62, 565, 5819, 62, 82, 4340, 13, 27160, 28955, 198, 198, 28764, 62, 14933, 796, 900, 3419, 198, 66, 429, 796, 657, 198, 4134, 82, 796, 17635, 198, 69, 16, 82, 796, 17635, 198, 76, 69, 16, 82, 796, 17635, 198, 1092, 76, 69, 16, 82, 796, 17635, 198, 10677, 2340, 796, 17635, 198, 28764, 796, 1391, 10677, 312, 25, 17635, 329, 12351, 312, 287, 2472, 62, 10677, 2340, 92, 198, 4122, 62, 28764, 796, 1391, 10677, 312, 25, 17635, 329, 12351, 312, 287, 2472, 62, 10677, 2340, 92, 198, 411, 796, 17635, 198, 198, 4514, 407, 318, 62, 43952, 33529, 198, 220, 220, 220, 1303, 2922, 13946, 198, 220, 220, 220, 1303, 9806, 62, 66, 312, 796, 3509, 7, 22019, 81, 62, 565, 5819, 62, 82, 4340, 13, 23814, 22784, 1994, 28, 9186, 1136, 353, 7, 16, 4008, 58, 15, 60, 198, 220, 220, 220, 269, 429, 15853, 352, 198, 220, 220, 220, 3509, 62, 66, 312, 796, 2922, 62, 19545, 62, 66, 312, 3419, 198, 220, 220, 220, 1090, 81, 62, 68, 2340, 58, 9806, 62, 66, 312, 60, 15853, 352, 198, 220, 220, 220, 1090, 81, 62, 68, 312, 796, 1090, 81, 62, 68, 2340, 58, 9806, 62, 66, 312, 60, 198, 220, 220, 220, 1043, 62, 14933, 796, 900, 7, 259, 18186, 62, 13033, 62, 11600, 58, 9806, 62, 66, 312, 7131, 22019, 81, 62, 68, 312, 12962, 198, 220, 220, 220, 649, 62, 14933, 796, 1043, 62, 14933, 532, 2747, 62, 14933, 198, 220, 220, 220, 649, 62, 10677, 2340, 796, 685, 1136, 62, 10677, 312, 7, 3672, 8, 329, 1438, 287, 649, 62, 14933, 60, 198, 220, 220, 220, 2747, 62, 14933, 796, 2747, 62, 14933, 13, 24592, 7, 3605, 62, 14933, 8, 198, 220, 220, 220, 1090, 81, 62, 565, 5819, 62, 82, 4340, 58, 9806, 62, 66, 312, 60, 796, 1796, 62, 565, 5819, 62, 82, 4340, 58, 9806, 62, 66, 312, 60, 532, 18896, 7, 9275, 62, 14933, 8, 198, 220, 220, 220, 697, 796, 18896, 7, 28764, 62, 14933, 8, 1220, 2472, 62, 22510, 198, 220, 220, 220, 3601, 10786, 90, 15, 32239, 83, 4134, 25, 1391, 16, 92, 4458, 18982, 7, 66, 429, 11, 697, 4008, 198, 220, 220, 220, 2747, 13, 19119, 15090, 10677, 312, 25, 3498, 18449, 9171, 14706, 13, 48205, 7, 10677, 312, 28, 10677, 312, 737, 11085, 22446, 31499, 1039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 12351, 312, 287, 649, 62, 10677, 2340, 30072, 198, 220, 220, 220, 966, 62, 28764, 13, 19119, 15090, 198, 220, 220, 220, 220, 220, 220, 220, 12351, 312, 25, 3498, 18449, 9171, 14706, 13, 48205, 7, 10677, 312, 28, 10677, 312, 737, 11085, 22446, 4122, 62, 12985, 2617, 198, 220, 220, 220, 220, 220, 220, 220, 329, 12351, 312, 287, 649, 62, 10677, 2340, 30072, 198, 220, 220, 220, 597, 76, 69, 16, 796, 651, 62, 20285, 305, 62, 69, 16, 7, 7942, 62, 31499, 1039, 11, 2747, 8, 198, 220, 220, 220, 285, 69, 16, 796, 651, 62, 20285, 305, 62, 69, 16, 7, 7942, 62, 13033, 11, 966, 62, 28764, 8, 198, 220, 220, 220, 277, 16, 796, 651, 62, 24055, 62, 69, 16, 7, 7942, 62, 13033, 11, 966, 62, 28764, 8, 198, 220, 220, 220, 1303, 76, 69, 16, 82, 13, 33295, 7, 76, 69, 16, 8, 198, 220, 220, 220, 1303, 69, 16, 82, 13, 33295, 7, 69, 16, 8, 198, 220, 220, 220, 1303, 1092, 76, 69, 16, 82, 13, 33295, 7, 1092, 76, 69, 16, 8, 198, 220, 220, 220, 1303, 4134, 82, 13, 33295, 7, 4134, 8, 198, 220, 220, 220, 1303, 10677, 2340, 13, 33295, 7, 11925, 7, 28764, 62, 14933, 4008, 198, 220, 220, 220, 5752, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4164, 10466, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 69, 16, 10354, 277, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 20285, 305, 69, 16, 10354, 285, 69, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 4134, 23843, 10354, 697, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 20285, 305, 69, 16, 12, 439, 10354, 597, 76, 69, 16, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 40684, 62, 10677, 2340, 10354, 269, 429, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 581, 13, 33295, 7, 808, 8, 628, 198, 4480, 1280, 10786, 20274, 14, 4122, 8807, 62, 1662, 26084, 2232, 62, 668, 64, 23330, 15, 92, 62, 15, 13, 17752, 4458, 18982, 7, 16793, 62, 16894, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 86, 11537, 355, 277, 79, 25, 198, 220, 220, 220, 33918, 13, 39455, 7, 411, 11, 277, 79, 8, 198 ]
2.213477
1,766
import pandas as pd import warnings from learntools.core import * Label = MultipartProblem(LabelA, LabelB) Cardinality = MultipartProblem(CardinalityA, CardinalityB) qvars = bind_exercises(globals(), [ Drop, Label, Cardinality, OneHot ], var_format='step_{n}', ) __all__ = list(qvars)
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 14601, 198, 198, 6738, 26338, 10141, 13, 7295, 1330, 1635, 198, 198, 33986, 796, 7854, 541, 433, 40781, 7, 33986, 32, 11, 36052, 33, 8, 198, 198, 16962, 1292, 414, 796, 7854, 541, 433, 40781, 7, 16962, 1292, 414, 32, 11, 25564, 414, 33, 8, 628, 198, 44179, 945, 796, 11007, 62, 1069, 2798, 2696, 7, 4743, 672, 874, 22784, 685, 198, 220, 220, 220, 14258, 11, 198, 220, 220, 220, 36052, 11, 198, 220, 220, 220, 25564, 414, 11, 198, 220, 220, 220, 1881, 21352, 198, 220, 220, 220, 16589, 198, 220, 220, 220, 1401, 62, 18982, 11639, 9662, 23330, 77, 92, 3256, 198, 220, 220, 220, 1267, 198, 834, 439, 834, 796, 1351, 7, 44179, 945, 8, 198 ]
2.484375
128
# _*_ coding: utf-8 _*_ # Copyright (c) Nikita Kovaliov, maizy.ru, 2013 # See LICENSE.txt for details. from tornado.web import asynchronous from vnc_me.controllers import HttpHandler from vnc_me.vnc_client import VncClient
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 2, 15069, 357, 66, 8, 11271, 5350, 43326, 7344, 709, 11, 17266, 528, 88, 13, 622, 11, 2211, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 3307, 13, 198, 198, 6738, 33718, 13, 12384, 1330, 39354, 198, 198, 6738, 410, 10782, 62, 1326, 13, 3642, 36667, 1330, 367, 29281, 25060, 198, 6738, 410, 10782, 62, 1326, 13, 85, 10782, 62, 16366, 1330, 569, 10782, 11792, 628 ]
2.825
80
import pyknotid.spacecurves.spacecurve as sp import pyknotid.make as mk from functools import wraps import os from os import path import numpy as np import pytest @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil
[ 198, 198, 11748, 12972, 74, 1662, 312, 13, 13200, 22019, 1158, 13, 13200, 22019, 303, 355, 599, 198, 11748, 12972, 74, 1662, 312, 13, 15883, 355, 33480, 198, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 12972, 9288, 628, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 628, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 628, 198, 31, 6603, 62, 83, 5420, 9437, 628, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198, 198, 31, 6603, 62, 83, 5420, 9437, 198 ]
2.23913
184
#Author: Miguel Molero <miguel.molero@gmail.com> from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from pcloudpy.gui.graphics.QVTKWidget import QVTKWidget if __name__ == "__main__": from vtk import vtkConeSource from vtk import vtkPolyDataMapper, vtkActor app = QApplication(['QVTKWindow']) win = QVTKMainWindow() cone = vtkConeSource() cone.SetResolution(8) coneMapper = vtkPolyDataMapper() coneMapper.SetInput(cone.GetOutput()) coneActor = vtkActor() coneActor.SetMapper(coneMapper) win.vtkWidget.renderer.AddActor(coneActor) # show the widget win.show() # start event processing app.exec_()
[ 2, 13838, 25, 29825, 17958, 3529, 1279, 76, 328, 2731, 13, 43132, 3529, 31, 14816, 13, 785, 29, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 220, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 198, 6738, 279, 17721, 9078, 13, 48317, 13, 70, 11549, 13, 48, 36392, 42, 38300, 1330, 1195, 36392, 42, 38300, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 422, 410, 30488, 1330, 410, 30488, 34, 505, 7416, 198, 220, 220, 220, 422, 410, 30488, 1330, 410, 30488, 34220, 6601, 44, 11463, 11, 410, 30488, 40277, 628, 220, 220, 220, 598, 796, 1195, 23416, 7, 17816, 48, 36392, 42, 27703, 6, 12962, 628, 220, 220, 220, 1592, 796, 1195, 36392, 42, 13383, 27703, 3419, 628, 220, 220, 220, 27763, 796, 410, 30488, 34, 505, 7416, 3419, 198, 220, 220, 220, 27763, 13, 7248, 4965, 2122, 7, 23, 8, 198, 220, 220, 220, 27763, 44, 11463, 796, 410, 30488, 34220, 6601, 44, 11463, 3419, 198, 220, 220, 220, 27763, 44, 11463, 13, 7248, 20560, 7, 49180, 13, 3855, 26410, 28955, 198, 220, 220, 220, 27763, 40277, 796, 410, 30488, 40277, 3419, 198, 220, 220, 220, 27763, 40277, 13, 7248, 44, 11463, 7, 49180, 44, 11463, 8, 628, 220, 220, 220, 1592, 13, 85, 30488, 38300, 13, 10920, 11882, 13, 4550, 40277, 7, 49180, 40277, 8, 198, 220, 220, 220, 1303, 905, 262, 26295, 198, 220, 220, 220, 1592, 13, 12860, 3419, 198, 220, 220, 220, 1303, 923, 1785, 7587, 198, 220, 220, 220, 598, 13, 18558, 62, 3419 ]
2.45583
283
# Copyright (c) 2015 - 2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # * Neither the name of Intel Corporation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys import sphinx_rtd_theme sys.path.insert(0, os.path.abspath('../..')) # -- Project information ----------------------------------------------------- project = 'GEOPM Service' copyright = '2021, Intel (R) Corporation' author = 'Intel (R) Corporation' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.napoleon', 'sphinx_rtd_theme', ] napoleon_google_docstring = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_logo = 'https://geopm.github.io/images/geopm-logo-clear.png' logo_only = True
[ 2, 220, 15069, 357, 66, 8, 1853, 532, 33448, 11, 8180, 10501, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 220, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 198, 2, 220, 389, 1138, 25, 198, 2, 198, 2, 220, 220, 220, 220, 220, 1635, 2297, 396, 2455, 507, 286, 2723, 2438, 1276, 12377, 262, 2029, 6634, 198, 2, 220, 220, 220, 220, 220, 220, 220, 4003, 11, 428, 1351, 286, 3403, 290, 262, 1708, 37592, 13, 198, 2, 198, 2, 220, 220, 220, 220, 220, 1635, 2297, 396, 2455, 507, 287, 13934, 1296, 1276, 22919, 262, 2029, 6634, 198, 2, 220, 220, 220, 220, 220, 220, 220, 4003, 11, 428, 1351, 286, 3403, 290, 262, 1708, 37592, 287, 198, 2, 220, 220, 220, 220, 220, 220, 220, 262, 10314, 290, 14, 273, 584, 5696, 2810, 351, 262, 198, 2, 220, 220, 220, 220, 220, 220, 220, 6082, 13, 198, 2, 198, 2, 220, 220, 220, 220, 220, 1635, 16126, 262, 1438, 286, 8180, 10501, 4249, 262, 3891, 286, 663, 198, 2, 220, 220, 220, 220, 220, 220, 220, 20420, 743, 307, 973, 284, 11438, 393, 7719, 3186, 10944, 198, 2, 220, 220, 220, 220, 220, 220, 220, 422, 428, 3788, 1231, 2176, 3161, 3194, 7170, 13, 198, 2, 198, 2, 220, 12680, 47466, 3180, 36592, 2389, 1961, 11050, 3336, 27975, 38162, 9947, 367, 15173, 4877, 5357, 27342, 9865, 3843, 20673, 198, 2, 220, 366, 1921, 3180, 1, 5357, 15529, 7788, 32761, 6375, 8959, 49094, 34764, 11015, 11, 47783, 2751, 11, 21728, 5626, 198, 2, 220, 40880, 5390, 11, 3336, 8959, 49094, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 5357, 376, 46144, 7473, 198, 2, 220, 317, 16652, 2149, 37232, 33079, 48933, 15986, 13954, 48778, 1961, 13, 3268, 8005, 49261, 50163, 3336, 27975, 38162, 9947, 198, 2, 220, 47210, 21479, 6375, 27342, 9865, 3843, 20673, 9348, 43031, 19146, 7473, 15529, 42242, 11, 3268, 17931, 23988, 11, 19387, 25256, 1847, 11, 198, 2, 220, 38846, 11, 7788, 3620, 6489, 13153, 11, 6375, 7102, 5188, 10917, 3525, 12576, 29506, 25552, 357, 1268, 39149, 2751, 11, 21728, 5626, 198, 2, 220, 40880, 5390, 11, 41755, 11335, 10979, 3963, 28932, 2257, 2043, 37780, 21090, 50, 6375, 49254, 26, 406, 18420, 3963, 23210, 11, 198, 2, 220, 42865, 11, 6375, 4810, 19238, 29722, 26, 6375, 43949, 44180, 23255, 49, 8577, 24131, 8, 29630, 36, 5959, 7257, 2937, 1961, 5357, 6177, 15529, 198, 2, 220, 3336, 15513, 3963, 43031, 25382, 11, 7655, 2767, 16879, 3268, 27342, 10659, 11, 19269, 18379, 43031, 25382, 11, 6375, 309, 9863, 198, 2, 220, 357, 1268, 39149, 2751, 399, 7156, 43, 3528, 18310, 6375, 25401, 54, 24352, 8, 5923, 1797, 2751, 3268, 15529, 34882, 41605, 3963, 3336, 23210, 198, 2, 220, 3963, 12680, 47466, 11, 45886, 16876, 5984, 29817, 1961, 3963, 3336, 28069, 11584, 25382, 3963, 13558, 3398, 29506, 11879, 13, 198, 2, 198, 198, 2, 1377, 10644, 9058, 20368, 1783, 26171, 198, 198, 2, 1002, 18366, 357, 273, 13103, 284, 3188, 351, 1960, 375, 420, 8, 389, 287, 1194, 8619, 11, 198, 2, 751, 777, 29196, 284, 25064, 13, 6978, 994, 13, 1002, 262, 8619, 318, 3585, 284, 262, 198, 2, 10314, 6808, 11, 779, 28686, 13, 6978, 13, 397, 2777, 776, 284, 787, 340, 4112, 11, 588, 3402, 994, 13, 198, 2, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 599, 20079, 87, 62, 81, 8671, 62, 43810, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 492, 6, 4008, 628, 198, 2, 1377, 4935, 1321, 20368, 19351, 12, 198, 198, 16302, 796, 705, 8264, 3185, 44, 4809, 6, 198, 22163, 4766, 796, 705, 1238, 2481, 11, 8180, 357, 49, 8, 10501, 6, 198, 9800, 796, 705, 24123, 357, 49, 8, 10501, 6, 628, 198, 2, 1377, 3611, 8398, 20368, 1783, 6329, 198, 198, 2, 3060, 597, 45368, 28413, 7552, 8265, 3891, 994, 11, 355, 13042, 13, 1119, 460, 307, 198, 2, 18366, 2406, 351, 45368, 28413, 357, 13190, 705, 82, 746, 28413, 13, 2302, 15885, 11537, 393, 534, 2183, 198, 2, 3392, 13, 198, 2302, 5736, 796, 685, 198, 220, 220, 220, 705, 82, 746, 28413, 13, 2302, 13, 77, 499, 25637, 3256, 198, 220, 220, 220, 705, 82, 746, 28413, 62, 81, 8671, 62, 43810, 3256, 198, 60, 198, 198, 77, 499, 25637, 62, 13297, 62, 15390, 8841, 796, 6407, 198, 198, 2, 3060, 597, 13532, 326, 3994, 24019, 994, 11, 3585, 284, 428, 8619, 13, 198, 11498, 17041, 62, 6978, 796, 37250, 62, 11498, 17041, 20520, 198, 198, 2, 7343, 286, 7572, 11, 3585, 284, 2723, 8619, 11, 326, 2872, 3696, 290, 198, 2, 29196, 284, 8856, 618, 2045, 329, 2723, 3696, 13, 198, 2, 770, 3912, 635, 10975, 27711, 62, 12708, 62, 6978, 290, 27711, 62, 26086, 62, 6978, 13, 198, 1069, 9152, 62, 33279, 82, 796, 17635, 628, 198, 2, 1377, 18634, 329, 11532, 5072, 20368, 1783, 12, 198, 198, 2, 383, 7505, 284, 779, 329, 11532, 290, 11532, 10478, 5468, 13, 220, 4091, 262, 10314, 329, 198, 2, 257, 1351, 286, 3170, 259, 13460, 13, 198, 2, 198, 198, 6494, 62, 43810, 796, 705, 82, 746, 28413, 62, 81, 8671, 62, 43810, 6, 198, 198, 2, 3060, 597, 13532, 326, 3994, 2183, 9037, 3696, 357, 10508, 355, 3918, 15747, 8, 994, 11, 198, 2, 3585, 284, 428, 8619, 13, 1119, 389, 18984, 706, 262, 3170, 259, 9037, 3696, 11, 198, 2, 523, 257, 2393, 3706, 366, 12286, 13, 25471, 1, 481, 49312, 262, 3170, 259, 366, 12286, 13, 25471, 1911, 198, 6494, 62, 6404, 78, 796, 705, 5450, 1378, 469, 404, 76, 13, 12567, 13, 952, 14, 17566, 14, 469, 404, 76, 12, 6404, 78, 12, 20063, 13, 11134, 6, 198, 6404, 78, 62, 8807, 796, 6407, 198 ]
3.481443
970
import functools import logging from flask_restful import Resource from flask import request import json
[ 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 1330, 2581, 198, 11748, 33918, 628, 198 ]
4.28
25
from ._tabular import fetch_crime_data, fetch_traffic_data from ._vector import (fetch_beach_access_data, fetch_crime_shp_data, fetch_family_resource_centers_data, fetch_shipping_lanes_data)
[ 6738, 47540, 8658, 934, 1330, 21207, 62, 28126, 62, 7890, 11, 21207, 62, 9535, 2108, 62, 7890, 198, 6738, 47540, 31364, 1330, 357, 69, 7569, 62, 1350, 620, 62, 15526, 62, 7890, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21207, 62, 28126, 62, 1477, 79, 62, 7890, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21207, 62, 17989, 62, 31092, 62, 1087, 364, 62, 7890, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21207, 62, 1477, 4501, 62, 75, 7305, 62, 7890, 8 ]
1.962121
132
#!/usr/bin/python3 import cv2 import numpy as np import os import process_img import pickle from shutil import copyfile # model = cv2.ml.KNearest_create() # model.load('model.xml') model = cv2.ml.KNearest_load('model.xml') img_area = 40 * 40 # 将序列化的内容加载到内存中 f = open('id_label_map.txt', 'rb') try: id_label_map = pickle.load(f) except EOFError: pass f.close() filenames = os.listdir('img') for filename in filenames: filelist = [ f for f in os.listdir('predict')] for f in filelist: os.remove(os.path.join('predict', f)) copyfile(os.path.join('img', filename), os.path.join('predict', filename)) img_captcha = cv2.imread(os.path.join('predict', filename)) process_img.run('predict', 'result', 1) predict = sorted(os.listdir('result')) r = [] for p in predict: img = cv2.imread(os.path.join('result', p), cv2.IMREAD_GRAYSCALE) sample = img.reshape((1, img_area)).astype(np.float32) ret, results, neighbours, distances = model.findNearest(sample, k = 3) label_id = int(results[0, 0]) label = id_label_map[label_id] r.append(label) print(' '.join(r)) cv2.imshow('image', img_captcha) key = cv2.waitKey(0) if key == 27: exit() else : cv2.destroyAllWindows()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 1429, 62, 9600, 198, 11748, 2298, 293, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 2, 2746, 796, 269, 85, 17, 13, 4029, 13, 42, 8199, 12423, 62, 17953, 3419, 198, 2, 2746, 13, 2220, 10786, 19849, 13, 19875, 11537, 198, 19849, 796, 269, 85, 17, 13, 4029, 13, 42, 8199, 12423, 62, 2220, 10786, 19849, 13, 19875, 11537, 198, 198, 9600, 62, 20337, 796, 2319, 1635, 2319, 198, 198, 2, 10263, 108, 228, 41753, 237, 26344, 245, 44293, 244, 21410, 37863, 227, 22522, 117, 27950, 254, 164, 121, 121, 26344, 108, 37863, 227, 27764, 246, 40792, 198, 69, 796, 1280, 10786, 312, 62, 18242, 62, 8899, 13, 14116, 3256, 705, 26145, 11537, 198, 28311, 25, 198, 220, 220, 220, 4686, 62, 18242, 62, 8899, 796, 2298, 293, 13, 2220, 7, 69, 8, 198, 16341, 412, 19238, 12331, 25, 198, 220, 220, 220, 1208, 198, 69, 13, 19836, 3419, 198, 198, 10379, 268, 1047, 796, 28686, 13, 4868, 15908, 10786, 9600, 11537, 198, 1640, 29472, 287, 1226, 268, 1047, 25, 198, 220, 220, 220, 2393, 4868, 796, 685, 277, 329, 277, 287, 28686, 13, 4868, 15908, 10786, 79, 17407, 11537, 60, 198, 220, 220, 220, 329, 277, 287, 2393, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 28956, 7, 418, 13, 6978, 13, 22179, 10786, 79, 17407, 3256, 277, 4008, 628, 220, 220, 220, 4866, 7753, 7, 418, 13, 6978, 13, 22179, 10786, 9600, 3256, 29472, 828, 28686, 13, 6978, 13, 22179, 10786, 79, 17407, 3256, 29472, 4008, 198, 220, 220, 220, 33705, 62, 27144, 11693, 796, 269, 85, 17, 13, 320, 961, 7, 418, 13, 6978, 13, 22179, 10786, 79, 17407, 3256, 29472, 4008, 628, 220, 220, 220, 1429, 62, 9600, 13, 5143, 10786, 79, 17407, 3256, 705, 20274, 3256, 352, 8, 198, 220, 220, 220, 4331, 796, 23243, 7, 418, 13, 4868, 15908, 10786, 20274, 6, 4008, 628, 220, 220, 220, 374, 796, 17635, 198, 220, 220, 220, 329, 279, 287, 4331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 796, 269, 85, 17, 13, 320, 961, 7, 418, 13, 6978, 13, 22179, 10786, 20274, 3256, 279, 828, 269, 85, 17, 13, 3955, 15675, 62, 38, 30631, 6173, 21358, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6291, 796, 33705, 13, 3447, 1758, 19510, 16, 11, 33705, 62, 20337, 29720, 459, 2981, 7, 37659, 13, 22468, 2624, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 11, 2482, 11, 23788, 11, 18868, 796, 2746, 13, 19796, 8199, 12423, 7, 39873, 11, 479, 796, 513, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 62, 312, 796, 493, 7, 43420, 58, 15, 11, 657, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 796, 4686, 62, 18242, 62, 8899, 58, 18242, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 374, 13, 33295, 7, 18242, 8, 198, 220, 220, 220, 3601, 10786, 45302, 22179, 7, 81, 4008, 628, 220, 220, 220, 269, 85, 17, 13, 320, 12860, 10786, 9060, 3256, 33705, 62, 27144, 11693, 8, 198, 220, 220, 220, 1994, 796, 269, 85, 17, 13, 17077, 9218, 7, 15, 8, 198, 220, 220, 220, 611, 1994, 6624, 2681, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8420, 3419, 198, 220, 220, 220, 2073, 1058, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 269, 85, 17, 13, 41659, 3237, 11209, 3419 ]
2.191201
591
#https://programmers.co.kr/learn/courses/30/lessons/12934
[ 2, 5450, 1378, 23065, 11056, 13, 1073, 13, 38584, 14, 35720, 14, 66, 39975, 14, 1270, 14, 1203, 684, 14, 18741, 2682 ]
2.590909
22
import csv import logging import neo4j import os import uuid from concurrent.futures import ThreadPoolExecutor from pyopenie import OpenIE5 from queue import Empty, Queue from spacy.lang.en import English from time import sleep from typing import List ENCODING = "utf-8" DATA_DIRECTORY = "./data" CACHE_DIRECTORY = "cache/" CACHED_CONNECTIONS_FILE = "entity_connections.cache" CACHED_FILTERED_CONNECTIONS_FILE = "entity_connections_filtered.cache" QUEUE_WAIT_TIMEOUT = 5 CONNECTION_BUILDER_THREADS = 5 RELATIONSHIP_EXTRACTION_SERVICE_RETRIES = 5 RELATIONSHIP_EXTRACTION_SERVICE_TIMEOUT = 3 RELATIONSHIP_EXTRACTION_SERVICE_URL = 'http://localhost:8000' NEO4J_URL = "bolt://localhost:7687" NEO4J_CREDENTIALS_FILE = ".credentials" GRAPH_LOADER_THREADS = 1 nlp:English = None extractor:OpenIE5 = None sentence_queue:Queue = None connection_list:List[EntityConnection] = None query_queue:Queue = None loader:Loader = None connection_cache_source:int = 0 if __name__ == "__main__": main()
[ 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 19102, 19, 73, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 12972, 9654, 494, 1330, 4946, 10008, 20, 198, 6738, 16834, 1330, 33523, 11, 4670, 518, 198, 6738, 599, 1590, 13, 17204, 13, 268, 1330, 3594, 198, 6738, 640, 1330, 3993, 198, 6738, 19720, 1330, 7343, 198, 198, 24181, 3727, 2751, 796, 366, 40477, 12, 23, 1, 198, 26947, 62, 17931, 23988, 15513, 796, 366, 19571, 7890, 1, 198, 34, 2246, 13909, 62, 17931, 23988, 15513, 796, 366, 23870, 30487, 198, 34, 16219, 1961, 62, 10943, 48842, 11053, 62, 25664, 796, 366, 26858, 62, 8443, 507, 13, 23870, 1, 198, 34, 16219, 1961, 62, 46700, 5781, 1961, 62, 10943, 48842, 11053, 62, 25664, 796, 366, 26858, 62, 8443, 507, 62, 10379, 4400, 13, 23870, 1, 198, 48, 8924, 8924, 62, 15543, 2043, 62, 34694, 12425, 796, 642, 198, 10943, 45, 24565, 62, 19499, 4146, 14418, 62, 4221, 15675, 50, 796, 642, 198, 16448, 6234, 49423, 62, 6369, 5446, 44710, 62, 35009, 27389, 62, 2200, 5446, 11015, 796, 642, 198, 16448, 6234, 49423, 62, 6369, 5446, 44710, 62, 35009, 27389, 62, 34694, 12425, 796, 513, 198, 16448, 6234, 49423, 62, 6369, 5446, 44710, 62, 35009, 27389, 62, 21886, 796, 705, 4023, 1378, 36750, 25, 33942, 6, 198, 45, 4720, 19, 41, 62, 21886, 796, 366, 25593, 1378, 36750, 25, 30610, 22, 1, 198, 45, 4720, 19, 41, 62, 9419, 1961, 3525, 12576, 50, 62, 25664, 796, 27071, 66, 445, 14817, 1, 198, 10761, 31300, 62, 35613, 1137, 62, 4221, 15675, 50, 796, 352, 198, 198, 21283, 79, 25, 15823, 796, 6045, 198, 2302, 40450, 25, 11505, 10008, 20, 796, 6045, 198, 34086, 594, 62, 36560, 25, 34991, 796, 6045, 198, 38659, 62, 4868, 25, 8053, 58, 32398, 32048, 60, 796, 6045, 198, 22766, 62, 36560, 25, 34991, 796, 6045, 198, 29356, 25, 17401, 796, 6045, 198, 38659, 62, 23870, 62, 10459, 25, 600, 796, 657, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.8017
353
import pandas as pd df = pd.read_excel('C:/Users/gkdud/PycharmProjects/TeamProject/Scraping/files/fashion_scraping.xlsx') import sqlite3 connect = sqlite3.connect('./wadizdb.sqlite3') df.to_sql('table_fashion', connect, if_exists='append', index=False) connect.close()
[ 11748, 19798, 292, 355, 279, 67, 198, 7568, 796, 279, 67, 13, 961, 62, 1069, 5276, 10786, 34, 14079, 14490, 14, 70, 74, 67, 463, 14, 20519, 354, 1670, 16775, 82, 14, 15592, 16775, 14, 3351, 2416, 278, 14, 16624, 14, 25265, 62, 1416, 2416, 278, 13, 87, 7278, 87, 11537, 198, 198, 11748, 44161, 578, 18, 198, 8443, 796, 44161, 578, 18, 13, 8443, 7, 4458, 14, 86, 324, 528, 9945, 13, 25410, 578, 18, 11537, 198, 7568, 13, 1462, 62, 25410, 10786, 11487, 62, 25265, 3256, 2018, 11, 611, 62, 1069, 1023, 11639, 33295, 3256, 6376, 28, 25101, 8, 198, 198, 8443, 13, 19836, 3419 ]
2.523364
107
import os from os.path import getatime, getctime, getmtime import errno from django.core.exceptions import ImproperlyConfigured from . import compressors __all__ = ["CompressMixin"] DEFAULT_METHODS = ["gz", "br"] METHOD_MAPPING = { "gz": compressors.ZopfliCompressor, "br": compressors.BrotliCompressor, "gz+zlib": compressors.ZlibCompressor, # gz+zlib and gz cannot be used at the same time, because they produce the same file extension. }
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 651, 265, 524, 11, 651, 310, 524, 11, 651, 76, 2435, 198, 11748, 11454, 3919, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, 6738, 764, 1330, 27413, 669, 198, 198, 834, 439, 834, 796, 14631, 7293, 601, 35608, 259, 8973, 628, 198, 7206, 38865, 62, 49273, 50, 796, 14631, 34586, 1600, 366, 1671, 8973, 198, 49273, 62, 44, 24805, 2751, 796, 1391, 198, 220, 220, 220, 366, 34586, 1298, 27413, 669, 13, 57, 404, 2704, 72, 7293, 44292, 11, 198, 220, 220, 220, 366, 1671, 1298, 27413, 669, 13, 33, 10599, 4528, 7293, 44292, 11, 198, 220, 220, 220, 366, 34586, 10, 89, 8019, 1298, 27413, 669, 13, 57, 8019, 7293, 44292, 11, 198, 220, 220, 220, 1303, 308, 89, 10, 89, 8019, 290, 308, 89, 2314, 307, 973, 379, 262, 976, 640, 11, 780, 484, 4439, 262, 976, 2393, 7552, 13, 198, 92, 628 ]
2.840491
163
from ..models import RunwayPoint, Runway
[ 6738, 11485, 27530, 1330, 5660, 1014, 12727, 11, 5660, 1014, 628, 628, 628, 198 ]
3.357143
14
########################### # Project Euler Problem 9 # Special Pythagorean triplet # # Code by Kevin Marciniak ########################### total = 1000 product = 0 for c in range(1, 1000): for b in range(1, c): for a in range(1, b): if (a + b + c) == 1000: if ((a * a) + (b * b)) == (c * c): product = a * b * c print(product)
[ 14468, 7804, 21017, 198, 2, 4935, 412, 18173, 20647, 860, 198, 2, 6093, 48657, 363, 29456, 15055, 83, 198, 2, 198, 2, 6127, 416, 7939, 13067, 5362, 461, 198, 14468, 7804, 21017, 198, 198, 23350, 796, 8576, 198, 11167, 796, 657, 198, 198, 1640, 269, 287, 2837, 7, 16, 11, 8576, 2599, 198, 197, 1640, 275, 287, 2837, 7, 16, 11, 269, 2599, 198, 197, 197, 1640, 257, 287, 2837, 7, 16, 11, 275, 2599, 198, 197, 197, 197, 361, 357, 64, 1343, 275, 1343, 269, 8, 6624, 8576, 25, 198, 197, 197, 197, 197, 361, 14808, 64, 1635, 257, 8, 1343, 357, 65, 1635, 275, 4008, 6624, 357, 66, 1635, 269, 2599, 198, 197, 197, 197, 197, 197, 11167, 796, 257, 1635, 275, 1635, 269, 198, 198, 4798, 7, 11167, 8, 198 ]
2.601504
133
import logging from six import int2byte from binascii import unhexlify from twisted.internet import defer from .resolve import Resolver from lbryschema.error import URIParseError from lbryschema.uri import parse_lbry_uri from torba.baseledger import BaseLedger from .account import Account from .network import Network from .database import WalletDatabase from .transaction import Transaction from .header import Headers, UnvalidatedHeaders log = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 2237, 1330, 493, 17, 26327, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 198, 198, 6738, 19074, 13, 37675, 1330, 29135, 198, 198, 6738, 764, 411, 6442, 1330, 1874, 14375, 198, 6738, 18360, 563, 15952, 2611, 13, 18224, 1330, 471, 32618, 17208, 12331, 198, 6738, 18360, 563, 15952, 2611, 13, 9900, 1330, 21136, 62, 23160, 563, 62, 9900, 198, 6738, 7332, 7012, 13, 12093, 18449, 1362, 1330, 7308, 42416, 1362, 198, 198, 6738, 764, 23317, 1330, 10781, 198, 6738, 764, 27349, 1330, 7311, 198, 6738, 764, 48806, 1330, 37249, 38105, 198, 6738, 764, 7645, 2673, 1330, 45389, 198, 6738, 764, 25677, 1330, 7123, 364, 11, 791, 12102, 515, 13847, 364, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628 ]
3.61194
134
''' Created on 01.05.2017 @author: mario Emontranslator Receive messages from serial/uart Generate JSON Emon Input Messages Insert via EMON API / APIKEY to emoncms on locahost (running on pi) ''' import serial import httplib import time domain = "localhost" emoncmspath = "emoncms" apikey = "2eba96e51f6b41534f52110ad063b0c8" nodeid = 10 conn = httplib.HTTPConnection(domain) # Set this to the serial port of your emontx and baud rate, 9600 is standard emontx baud rate ser = serial.Serial('/dev/ttyS0', 9600) while 1: try: # Read in line of readings from serial / uart linestr = ser.readline() linestr = linestr.rstrip() #print linestr nodeid,temp,humid,voltage=parseLine(linestr) if nodeid: params = ("{temp:%.2f,humid:%.2f,voltage:%.2f}"%(temp,humid,voltage)) print params print "nodeid:"+str(nodeid) # Send to emoncms conn.connect() conn.request("GET", "/"+emoncmspath+"/input/post.json?&node="+str(nodeid)+"&json="+params+"&apikey="+apikey) response = conn.getresponse() print response.read() except KeyboardInterrupt: raise except Exception as e: print e.__doc__ print e.message pass time.sleep(1)
[ 7061, 6, 198, 41972, 319, 5534, 13, 2713, 13, 5539, 198, 198, 31, 9800, 25, 1667, 952, 198, 198, 36, 8691, 26084, 41880, 198, 198, 3041, 15164, 6218, 422, 11389, 14, 19986, 198, 8645, 378, 19449, 412, 2144, 23412, 43534, 198, 44402, 2884, 17228, 1340, 7824, 1220, 7824, 20373, 284, 795, 261, 46406, 319, 1179, 993, 455, 357, 20270, 319, 31028, 8, 198, 7061, 6, 198, 198, 11748, 11389, 198, 11748, 1841, 489, 571, 198, 11748, 640, 198, 198, 27830, 796, 366, 36750, 1, 198, 7966, 46406, 6978, 796, 366, 7966, 46406, 1, 198, 499, 522, 88, 796, 366, 17, 1765, 64, 4846, 68, 4349, 69, 21, 65, 35038, 2682, 69, 20, 2481, 940, 324, 3312, 18, 65, 15, 66, 23, 1, 198, 198, 17440, 312, 796, 838, 198, 37043, 796, 1841, 489, 571, 13, 40717, 32048, 7, 27830, 8, 198, 198, 2, 5345, 428, 284, 262, 11389, 2493, 286, 534, 795, 756, 87, 290, 275, 3885, 2494, 11, 860, 8054, 318, 3210, 795, 756, 87, 275, 3885, 2494, 198, 2655, 796, 11389, 13, 32634, 10786, 14, 7959, 14, 42852, 50, 15, 3256, 860, 8054, 8, 198, 198, 4514, 352, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4149, 287, 1627, 286, 24654, 422, 11389, 1220, 334, 433, 198, 220, 220, 220, 220, 220, 220, 220, 9493, 395, 81, 796, 1055, 13, 961, 1370, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 9493, 395, 81, 796, 9493, 395, 81, 13, 81, 36311, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4798, 9493, 395, 81, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 10139, 312, 11, 29510, 11, 17047, 312, 11, 37764, 496, 28, 29572, 13949, 7, 2815, 395, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 10139, 312, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 5855, 90, 29510, 25, 7225, 17, 69, 11, 17047, 312, 25, 7225, 17, 69, 11, 37764, 496, 25, 7225, 17, 69, 36786, 4, 7, 29510, 11, 17047, 312, 11, 37764, 496, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 42287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 366, 17440, 312, 11097, 10, 2536, 7, 17440, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16290, 284, 795, 261, 46406, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 48260, 13, 8443, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 48260, 13, 25927, 7203, 18851, 1600, 12813, 1, 10, 7966, 46406, 6978, 10, 1, 14, 15414, 14, 7353, 13, 17752, 30, 5, 17440, 2625, 10, 2536, 7, 17440, 312, 47762, 1, 5, 17752, 2625, 10, 37266, 10, 1, 5, 499, 522, 88, 2625, 10, 499, 522, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 48260, 13, 1136, 26209, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 2882, 13, 961, 3419, 198, 220, 220, 220, 2845, 31973, 9492, 3622, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 198, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 304, 13, 834, 15390, 834, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 304, 13, 20500, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 640, 13, 42832, 7, 16, 8, 198 ]
2.185738
603
import logging import asyncio import binascii import time import struct from ipaddress import ip_network, ip_address import protocol import const PUFFIN_SUB = ["107.178.32.0/20", "45.33.128.0/20", "101.127.206.0/23", "101.127.208.0/23"]
[ 11748, 18931, 198, 11748, 30351, 952, 198, 11748, 9874, 292, 979, 72, 198, 11748, 640, 198, 11748, 2878, 198, 6738, 20966, 21975, 1330, 20966, 62, 27349, 11, 20966, 62, 21975, 198, 11748, 8435, 198, 11748, 1500, 198, 198, 5105, 5777, 1268, 62, 50, 10526, 796, 14631, 15982, 13, 23188, 13, 2624, 13, 15, 14, 1238, 1600, 366, 2231, 13, 2091, 13, 12762, 13, 15, 14, 1238, 1600, 366, 8784, 13, 16799, 13, 22136, 13, 15, 14, 1954, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8784, 13, 16799, 13, 21315, 13, 15, 14, 1954, 8973, 628, 198 ]
2.419048
105
from django.utils.translation import ugettext_lazy as _ from mapentity.filters import MapEntityFilterSet from geotrek.core.filters import TopologyFilter from .models import Trek, POI, Service
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 3975, 26858, 13, 10379, 1010, 1330, 9347, 32398, 22417, 7248, 198, 6738, 4903, 313, 37818, 13, 7295, 13, 10379, 1010, 1330, 5849, 1435, 22417, 198, 198, 6738, 764, 27530, 1330, 12338, 11, 19922, 40, 11, 4809, 628, 628, 198 ]
3.45614
57
# 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. import copy import re import sys import mock import netaddr import webob.exc from apic_ml2.neutron.db import port_ha_ipaddress_binding as ha_ip_db from apic_ml2.neutron.tests.unit.ml2.drivers.cisco.apic import ( test_cisco_apic_common as mocked) from apicapi import apic_mapper from neutron.agent import securitygroups_rpc as sg_cfg from neutron.common import rpc as n_rpc from neutron import context from neutron.db import api as db_api from neutron.db import db_base_plugin_v2 as n_db from neutron.db import model_base from neutron.extensions import portbindings from neutron import manager from opflexagent import constants as ocst from oslo_config import cfg from oslo_serialization import jsonutils from gbpservice.neutron.plugins.ml2.drivers.grouppolicy.apic import driver from gbpservice.neutron.services.grouppolicy import ( group_policy_context as p_context) from gbpservice.neutron.services.grouppolicy import config from gbpservice.neutron.services.grouppolicy.drivers.cisco.apic import ( apic_mapping as amap) from gbpservice.neutron.services.l3_router import l3_apic from gbpservice.neutron.tests.unit.services.grouppolicy import ( test_resource_mapping as test_rmd) APIC_L2_POLICY = 'l2_policy' APIC_L3_POLICY = 'l3_policy' APIC_POLICY_RULE_SET = 'policy_rule_set' APIC_POLICY_TARGET_GROUP = 'policy_target_group' APIC_POLICY_RULE = 'policy_rule' APIC_EXTERNAL_RID = '1.0.0.1' APIC_EXTERNAL_EPG = 'ext-epg' APIC_PRE_L3OUT_TENANT = 'common' APIC_PRE_VRF_TENANT = APIC_PRE_L3OUT_TENANT APIC_PRE_VRF = 'pre-vrf' AGENT_TYPE = ocst.AGENT_TYPE_OPFLEX_OVS AGENT_CONF = {'alive': True, 'binary': 'somebinary', 'topic': 'sometopic', 'agent_type': AGENT_TYPE, 'configurations': {'opflex_networks': None, 'bridge_mappings': {'physnet1': 'br-eth1'}}} AGENT_TYPE_DVS = driver.AGENT_TYPE_DVS AGENT_CONF_DVS = {'alive': True, 'binary': 'somebinary', 'topic': 'sometopic', 'agent_type': AGENT_TYPE_DVS, 'configurations': {'opflex_networks': None}} BOOKED_PORT_VALUE = 'myBookedPort' class FakeNetworkContext(object): """To generate network context for testing purposes only.""" @property @property class FakePortContext(object): """To generate port context for testing purposes only.""" # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # TODO(ivar): verify rule intersection with hierarchical PRS happens # on APIC # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set. # Although the naming convention used here has been chosen poorly, # I'm separating the tests in order to get the mock re-set.
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 198, 2, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 11748, 4866, 198, 11748, 302, 198, 11748, 25064, 198, 198, 11748, 15290, 198, 11748, 2010, 29851, 198, 11748, 3992, 672, 13, 41194, 198, 198, 6738, 2471, 291, 62, 4029, 17, 13, 710, 315, 1313, 13, 9945, 1330, 2493, 62, 3099, 62, 541, 21975, 62, 30786, 355, 387, 62, 541, 62, 9945, 198, 6738, 2471, 291, 62, 4029, 17, 13, 710, 315, 1313, 13, 41989, 13, 20850, 13, 4029, 17, 13, 36702, 13, 66, 4861, 13, 499, 291, 1330, 357, 198, 220, 220, 220, 1332, 62, 66, 4861, 62, 499, 291, 62, 11321, 355, 29180, 8, 198, 6738, 2471, 291, 15042, 1330, 2471, 291, 62, 76, 11463, 198, 6738, 49810, 13, 25781, 1330, 2324, 24432, 62, 81, 14751, 355, 264, 70, 62, 37581, 198, 6738, 49810, 13, 11321, 1330, 374, 14751, 355, 299, 62, 81, 14751, 198, 6738, 49810, 1330, 4732, 198, 6738, 49810, 13, 9945, 1330, 40391, 355, 20613, 62, 15042, 198, 6738, 49810, 13, 9945, 1330, 20613, 62, 8692, 62, 33803, 62, 85, 17, 355, 299, 62, 9945, 198, 6738, 49810, 13, 9945, 1330, 2746, 62, 8692, 198, 6738, 49810, 13, 2302, 5736, 1330, 2493, 21653, 654, 198, 6738, 49810, 1330, 4706, 198, 6738, 1034, 32880, 25781, 1330, 38491, 355, 267, 66, 301, 198, 6738, 28686, 5439, 62, 11250, 1330, 30218, 70, 198, 6738, 28686, 5439, 62, 46911, 1634, 1330, 33918, 26791, 198, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 37390, 13, 4029, 17, 13, 36702, 13, 70, 472, 381, 21424, 13, 499, 291, 1330, 4639, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 30416, 13, 70, 472, 381, 21424, 1330, 357, 198, 220, 220, 220, 1448, 62, 30586, 62, 22866, 355, 279, 62, 22866, 8, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 30416, 13, 70, 472, 381, 21424, 1330, 4566, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 30416, 13, 70, 472, 381, 21424, 13, 36702, 13, 66, 4861, 13, 499, 291, 1330, 357, 198, 220, 220, 220, 2471, 291, 62, 76, 5912, 355, 716, 499, 8, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 30416, 13, 75, 18, 62, 472, 353, 1330, 300, 18, 62, 499, 291, 198, 6738, 308, 18799, 712, 501, 13, 710, 315, 1313, 13, 41989, 13, 20850, 13, 30416, 13, 70, 472, 381, 21424, 1330, 357, 198, 220, 220, 220, 1332, 62, 31092, 62, 76, 5912, 355, 1332, 62, 81, 9132, 8, 198, 198, 2969, 2149, 62, 43, 17, 62, 45472, 2149, 56, 796, 705, 75, 17, 62, 30586, 6, 198, 2969, 2149, 62, 43, 18, 62, 45472, 2149, 56, 796, 705, 75, 18, 62, 30586, 6, 198, 2969, 2149, 62, 45472, 2149, 56, 62, 49, 24212, 62, 28480, 796, 705, 30586, 62, 25135, 62, 2617, 6, 198, 2969, 2149, 62, 45472, 2149, 56, 62, 51, 46095, 62, 46846, 796, 705, 30586, 62, 16793, 62, 8094, 6, 198, 2969, 2149, 62, 45472, 2149, 56, 62, 49, 24212, 796, 705, 30586, 62, 25135, 6, 198, 198, 2969, 2149, 62, 6369, 31800, 1847, 62, 49, 2389, 796, 705, 16, 13, 15, 13, 15, 13, 16, 6, 198, 2969, 2149, 62, 6369, 31800, 1847, 62, 36, 6968, 796, 705, 2302, 12, 538, 70, 6, 198, 2969, 2149, 62, 46437, 62, 43, 18, 12425, 62, 51, 1677, 8643, 796, 705, 11321, 6, 198, 2969, 2149, 62, 46437, 62, 13024, 37, 62, 51, 1677, 8643, 796, 3486, 2149, 62, 46437, 62, 43, 18, 12425, 62, 51, 1677, 8643, 198, 2969, 2149, 62, 46437, 62, 13024, 37, 796, 705, 3866, 12, 37020, 69, 6, 198, 198, 4760, 3525, 62, 25216, 796, 267, 66, 301, 13, 4760, 3525, 62, 25216, 62, 3185, 37, 2538, 55, 62, 8874, 50, 198, 4760, 3525, 62, 10943, 37, 796, 1391, 6, 282, 425, 10354, 6407, 11, 705, 39491, 10354, 705, 11246, 39491, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 26652, 10354, 705, 82, 908, 16603, 3256, 705, 25781, 62, 4906, 10354, 13077, 3525, 62, 25216, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11250, 20074, 10354, 1391, 6, 404, 32880, 62, 3262, 5225, 10354, 6045, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 9458, 62, 76, 39242, 10354, 1391, 6, 34411, 3262, 16, 10354, 705, 1671, 12, 2788, 16, 6, 42535, 198, 4760, 3525, 62, 25216, 62, 35, 20304, 796, 4639, 13, 4760, 3525, 62, 25216, 62, 35, 20304, 198, 4760, 3525, 62, 10943, 37, 62, 35, 20304, 796, 1391, 6, 282, 425, 10354, 6407, 11, 705, 39491, 10354, 705, 11246, 39491, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 26652, 10354, 705, 82, 908, 16603, 3256, 705, 25781, 62, 4906, 10354, 13077, 3525, 62, 25216, 62, 35, 20304, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11250, 20074, 10354, 1391, 6, 404, 32880, 62, 3262, 5225, 10354, 6045, 11709, 198, 198, 39453, 1961, 62, 15490, 62, 39488, 796, 705, 1820, 10482, 276, 13924, 6, 628, 628, 628, 628, 198, 4871, 33482, 26245, 21947, 7, 15252, 2599, 198, 220, 220, 220, 37227, 2514, 7716, 3127, 4732, 329, 4856, 4959, 691, 526, 15931, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 198, 4871, 33482, 13924, 21947, 7, 15252, 2599, 198, 220, 220, 220, 37227, 2514, 7716, 2493, 4732, 329, 4856, 4959, 691, 526, 15931, 628, 628, 628, 198, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 628, 628, 220, 220, 220, 1303, 16926, 46, 7, 452, 283, 2599, 11767, 3896, 16246, 351, 38958, 4810, 50, 4325, 198, 220, 220, 220, 1303, 319, 3486, 2149, 628, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 628, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 220, 220, 220, 1303, 4900, 262, 19264, 9831, 973, 994, 468, 587, 7147, 13455, 11, 198, 220, 220, 220, 1303, 314, 1101, 27259, 262, 5254, 287, 1502, 284, 651, 262, 15290, 302, 12, 2617, 13, 628, 628, 628 ]
2.939148
1,479
import psutil import pandas as pd from datetime import datetime from termcolor import colored import GetInfo import Notify import time import os if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-c", "--columns", default="name,cpu_usage,memory_usage,read_bytes,write_bytes,status,create_time,n_threads") parser.add_argument("-s", "--sort-by", dest="sort_by",default="memory_usage") parser.add_argument("--ascending", action="store_true") parser.add_argument("-n", default=20) parser.add_argument("-u", "--live-update", action="store_true") parser.add_argument("--kill", dest="process_to_close") parser.add_argument("--after", dest="duration", default=0) args = parser.parse_args() columns = args.columns sort_by = args.sort_by descending = args.ascending n = int(args.n) live_update = args.live_update kill = args.process_to_close duration = int(args.duration) # Fix terminal size if 'nt' in os.name: while(1): (width, height) = os.get_terminal_size() if(int(height) < 33 or int(width)<120): print(colored("Terminal size too small. Resize the terminal", 'red', attrs=['bold'])) else: break time.sleep(0.5) os.system("cls") else: while(1): height, width = os.popen('stty size', 'r').read().split() if(int(height) < 33 or int(width)<120): print(colored("Terminal size too small. Resize the terminal", 'red', attrs=['bold'])) else: break time.sleep(0.5) os.system("clear") processes = GetInfo.get_processes_info() df = construct_dataframe(processes) print_header() if n == 0: print(df.to_string()) elif n > 0: print(df.head(n).to_string()) draw_graph() while live_update: processes = GetInfo.get_processes_info() df = construct_dataframe(processes) os.system("cls") if "nt" in os.name else os.system("clear") print_header() if n == 0: print(colored(df.to_string(), 'red','on_white')) elif n > 0: print(colored(df.head(n).to_string(), 'red','on_white')) draw_graph() time.sleep(1) if(kill): kill_process(df.head(n).to_string(), kill, duration*60)
[ 11748, 26692, 22602, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 3381, 8043, 1330, 16396, 201, 198, 11748, 3497, 12360, 201, 198, 11748, 1892, 1958, 201, 198, 11748, 640, 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1330, 1822, 29572, 201, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 66, 1600, 366, 438, 28665, 82, 1600, 4277, 2625, 3672, 11, 36166, 62, 26060, 11, 31673, 62, 26060, 11, 961, 62, 33661, 11, 13564, 62, 33661, 11, 13376, 11, 17953, 62, 2435, 11, 77, 62, 16663, 82, 4943, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 82, 1600, 366, 438, 30619, 12, 1525, 1600, 2244, 2625, 30619, 62, 1525, 1600, 12286, 2625, 31673, 62, 26060, 4943, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 438, 3372, 1571, 1600, 2223, 2625, 8095, 62, 7942, 4943, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 77, 1600, 4277, 28, 1238, 8, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 12, 84, 1600, 366, 438, 12583, 12, 19119, 1600, 2223, 2625, 8095, 62, 7942, 4943, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 438, 12728, 1600, 2244, 2625, 14681, 62, 1462, 62, 19836, 4943, 201, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7203, 438, 8499, 1600, 2244, 2625, 32257, 1600, 4277, 28, 15, 8, 201, 198, 201, 198, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 201, 198, 220, 220, 220, 15180, 796, 26498, 13, 28665, 82, 201, 198, 220, 220, 220, 3297, 62, 1525, 796, 26498, 13, 30619, 62, 1525, 201, 198, 220, 220, 220, 31491, 796, 26498, 13, 3372, 1571, 201, 198, 220, 220, 220, 299, 796, 493, 7, 22046, 13, 77, 8, 201, 198, 220, 220, 220, 2107, 62, 19119, 796, 26498, 13, 12583, 62, 19119, 201, 198, 220, 220, 220, 1494, 796, 26498, 13, 14681, 62, 1462, 62, 19836, 201, 198, 220, 220, 220, 9478, 796, 493, 7, 22046, 13, 32257, 8, 201, 198, 201, 198, 220, 220, 220, 1303, 13268, 12094, 2546, 201, 198, 220, 220, 220, 611, 705, 429, 6, 287, 28686, 13, 3672, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 981, 7, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 10394, 11, 6001, 8, 796, 28686, 13, 1136, 62, 23705, 282, 62, 7857, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7, 600, 7, 17015, 8, 1279, 4747, 393, 493, 7, 10394, 8, 27, 10232, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 25717, 7203, 44798, 282, 2546, 1165, 1402, 13, 1874, 1096, 262, 12094, 1600, 705, 445, 3256, 708, 3808, 28, 17816, 36575, 20520, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 15, 13, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 10057, 7203, 565, 82, 4943, 201, 198, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 981, 7, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6001, 11, 9647, 796, 28686, 13, 79, 9654, 10786, 301, 774, 2546, 3256, 705, 81, 27691, 961, 22446, 35312, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 7, 600, 7, 17015, 8, 1279, 4747, 393, 493, 7, 10394, 8, 27, 10232, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 25717, 7203, 44798, 282, 2546, 1165, 1402, 13, 1874, 1096, 262, 12094, 1600, 705, 445, 3256, 708, 3808, 28, 17816, 36575, 20520, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 15, 13, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 10057, 7203, 20063, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 7767, 796, 3497, 12360, 13, 1136, 62, 14681, 274, 62, 10951, 3419, 201, 198, 220, 220, 220, 47764, 796, 5678, 62, 7890, 14535, 7, 14681, 274, 8, 201, 198, 201, 198, 220, 220, 220, 3601, 62, 25677, 3419, 201, 198, 220, 220, 220, 611, 299, 6624, 657, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 7568, 13, 1462, 62, 8841, 28955, 201, 198, 220, 220, 220, 1288, 361, 299, 1875, 657, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 7568, 13, 2256, 7, 77, 737, 1462, 62, 8841, 28955, 201, 198, 220, 220, 220, 3197, 62, 34960, 3419, 201, 198, 201, 198, 220, 220, 220, 981, 2107, 62, 19119, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 7767, 796, 3497, 12360, 13, 1136, 62, 14681, 274, 62, 10951, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 796, 5678, 62, 7890, 14535, 7, 14681, 274, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 10057, 7203, 565, 82, 4943, 611, 366, 429, 1, 287, 28686, 13, 3672, 2073, 28686, 13, 10057, 7203, 20063, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 25677, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 299, 6624, 657, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 25717, 7, 7568, 13, 1462, 62, 8841, 22784, 705, 445, 41707, 261, 62, 11186, 6, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 299, 1875, 657, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 25717, 7, 7568, 13, 2256, 7, 77, 737, 1462, 62, 8841, 22784, 705, 445, 41707, 261, 62, 11186, 6, 4008, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3197, 62, 34960, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 16, 8, 201, 198, 201, 198, 220, 220, 220, 611, 7, 12728, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1494, 62, 14681, 7, 7568, 13, 2256, 7, 77, 737, 1462, 62, 8841, 22784, 1494, 11, 9478, 9, 1899, 8, 201, 198 ]
2.141638
1,172
# encoding=utf8 import os import socket from sync_binlog.output_log import logger as loging import time import sys from sync_binlog.update_post import update_datetime try: import psutil except ImportError: print("psutil 模块不存在,请使用 pip install psutil 安装") sys.exit(0) # Shutdown complete if __name__ == "__main__": print("%sStarting shutdown..." % update_datetime()) shutdown_program() time.sleep(3) process_id = judgeprocess('startup.py') if process_id is not False: psutil.Process(process_id).kill() print("%sShutdown complete" % update_datetime()) loging.info("Shutdown complete") else: print("%s程序自动关闭,请手工检查" % update_datetime()) loging.info("程序自动关闭,请手工检查")
[ 2, 21004, 28, 40477, 23, 198, 198, 11748, 28686, 198, 11748, 17802, 198, 6738, 17510, 62, 8800, 6404, 13, 22915, 62, 6404, 1330, 49706, 355, 2604, 278, 198, 11748, 640, 198, 11748, 25064, 198, 6738, 17510, 62, 8800, 6404, 13, 19119, 62, 7353, 1330, 4296, 62, 19608, 8079, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 26692, 22602, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 3601, 7203, 862, 22602, 10545, 101, 94, 161, 251, 245, 38834, 27764, 246, 28839, 101, 11, 46237, 115, 45635, 18796, 101, 7347, 2721, 26692, 22602, 10263, 106, 231, 35318, 4943, 198, 220, 220, 220, 25064, 13, 37023, 7, 15, 8, 628, 198, 2, 40411, 1844, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7203, 4, 82, 22851, 18325, 9313, 4064, 4296, 62, 19608, 8079, 28955, 198, 220, 220, 220, 18325, 62, 23065, 3419, 198, 220, 220, 220, 640, 13, 42832, 7, 18, 8, 198, 220, 220, 220, 1429, 62, 312, 796, 5052, 14681, 10786, 9688, 929, 13, 9078, 11537, 198, 220, 220, 220, 611, 1429, 62, 312, 318, 407, 10352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26692, 22602, 13, 18709, 7, 14681, 62, 312, 737, 12728, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 4, 82, 39079, 2902, 1844, 1, 4064, 4296, 62, 19608, 8079, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 278, 13, 10951, 7203, 39079, 2902, 1844, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 4, 82, 163, 101, 233, 41753, 237, 164, 229, 103, 27950, 101, 17739, 111, 29785, 255, 171, 120, 234, 46237, 115, 33699, 233, 32432, 98, 162, 96, 222, 162, 253, 98, 1, 4064, 4296, 62, 19608, 8079, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 278, 13, 10951, 7203, 163, 101, 233, 41753, 237, 164, 229, 103, 27950, 101, 17739, 111, 29785, 255, 171, 120, 234, 46237, 115, 33699, 233, 32432, 98, 162, 96, 222, 162, 253, 98, 4943, 198 ]
2.156977
344
import turtle turtle.mode("logo") turtle.shape("turtle") turtle.bgcolor("black") turtle.hideturtle() turtle.pensize(12) turtle.colormode(255) s = 50 a = 0 for i in range(10): turtle.pencolor(200-a, a, 100) turtle.pu() turtle.goto(25*i, 0) turtle.pd() turtle.forward(s) a = a + 20 s = s + 10 turtle.done()
[ 11748, 28699, 198, 198, 83, 17964, 13, 14171, 7203, 6404, 78, 4943, 198, 83, 17964, 13, 43358, 7203, 83, 17964, 4943, 198, 83, 17964, 13, 35904, 8043, 7203, 13424, 4943, 198, 83, 17964, 13, 49675, 316, 17964, 3419, 198, 83, 17964, 13, 79, 641, 1096, 7, 1065, 8, 198, 83, 17964, 13, 4033, 579, 1098, 7, 13381, 8, 198, 198, 82, 796, 2026, 198, 64, 796, 657, 198, 1640, 1312, 287, 2837, 7, 940, 2599, 198, 220, 220, 220, 28699, 13, 3617, 8043, 7, 2167, 12, 64, 11, 257, 11, 1802, 8, 198, 220, 220, 220, 28699, 13, 19944, 3419, 198, 220, 220, 220, 28699, 13, 70, 2069, 7, 1495, 9, 72, 11, 657, 8, 198, 220, 220, 220, 28699, 13, 30094, 3419, 198, 220, 220, 220, 28699, 13, 11813, 7, 82, 8, 198, 220, 220, 220, 257, 796, 257, 1343, 1160, 198, 220, 220, 220, 264, 796, 264, 1343, 838, 628, 198, 83, 17964, 13, 28060, 3419, 198 ]
2.119497
159
#!/usr/bin/env python3 from hpecp import ContainerPlatformClient, APIException from hpecp.k8s_cluster import K8sClusterHostConfig import textwrap client = ContainerPlatformClient(username='admin', password='admin123', api_host='127.0.0.1', api_port=8080, use_ssl=True, verify_ssl='/certs/hpecp-ca-cert.pem') client.create_session() print( client.k8s_worker.get_k8shosts().tabulate() ) try: k8shosts_config=[ K8sClusterHostConfig(4, 'worker'), K8sClusterHostConfig(5, 'master') ] k8s_cluster_id = client.k8s_cluster.create(name='def', description='my cluster', k8s_version='1.17.0', k8shosts_config=k8shosts_config) print('creating cluster id: ' + k8s_cluster_id) except APIException as e: text = """APIException( Backend API Response -> {} HTTP Method -> {} Request URL -> {} Request Data -> [{}] )""" print( textwrap.dedent(text).format(e.message, e.request_method, e.request_url, e.request_data) )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 289, 431, 13155, 1330, 43101, 37148, 11792, 11, 7824, 16922, 198, 6738, 289, 431, 13155, 13, 74, 23, 82, 62, 565, 5819, 1330, 509, 23, 82, 2601, 5819, 17932, 16934, 198, 11748, 2420, 37150, 198, 198, 16366, 796, 43101, 37148, 11792, 7, 29460, 11639, 28482, 3256, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9206, 11639, 28482, 10163, 3256, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40391, 62, 4774, 11639, 16799, 13, 15, 13, 15, 13, 16, 3256, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40391, 62, 634, 28, 1795, 1795, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 779, 62, 45163, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11767, 62, 45163, 11639, 14, 22583, 82, 14, 71, 431, 13155, 12, 6888, 12, 22583, 13, 79, 368, 11537, 198, 198, 16366, 13, 17953, 62, 29891, 3419, 198, 198, 4798, 7, 5456, 13, 74, 23, 82, 62, 28816, 13, 1136, 62, 74, 23, 1477, 455, 82, 22446, 8658, 5039, 3419, 1267, 198, 198, 28311, 25, 198, 220, 220, 220, 479, 23, 1477, 455, 82, 62, 11250, 41888, 220, 198, 220, 220, 220, 220, 220, 220, 220, 509, 23, 82, 2601, 5819, 17932, 16934, 7, 19, 11, 705, 28816, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 509, 23, 82, 2601, 5819, 17932, 16934, 7, 20, 11, 705, 9866, 11537, 198, 220, 220, 220, 2361, 198, 220, 220, 220, 479, 23, 82, 62, 565, 5819, 62, 312, 796, 5456, 13, 74, 23, 82, 62, 565, 5819, 13, 17953, 7, 3672, 11639, 4299, 3256, 6764, 11639, 1820, 13946, 3256, 479, 23, 82, 62, 9641, 11639, 16, 13, 1558, 13, 15, 3256, 479, 23, 1477, 455, 82, 62, 11250, 28, 74, 23, 1477, 455, 82, 62, 11250, 8, 198, 220, 220, 220, 3601, 10786, 20123, 278, 13946, 4686, 25, 705, 1343, 479, 23, 82, 62, 565, 5819, 62, 312, 8, 198, 16341, 7824, 16922, 355, 304, 25, 198, 220, 220, 220, 2420, 796, 37227, 17614, 16922, 7, 198, 220, 220, 220, 220, 220, 220, 220, 5157, 437, 7824, 18261, 4613, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 14626, 11789, 4613, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 10289, 4613, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 6060, 4613, 685, 90, 92, 60, 198, 220, 220, 220, 1267, 37811, 198, 220, 220, 220, 3601, 7, 2420, 37150, 13, 9395, 298, 7, 5239, 737, 18982, 7, 68, 13, 20500, 11, 304, 13, 25927, 62, 24396, 11, 304, 13, 25927, 62, 6371, 11, 304, 13, 25927, 62, 7890, 8, 1267 ]
2.028369
564
import os import shutil # wbg_pth='/datadrive/Reflection/training_data/wbg' # img_pth='/datadrive/Reflection/training_data/images' # dst_pth='/datadrive/Reflection/training_data/valB' # move_data(wbg_pth,img_pth,dst_pth) wbg_pth='/datadrive/Reflection/training_data/wbg' trainA_pth='/datadrive/pytorch-CycleGAN-and-pix2pix/datasets/cars/trainA' imgs_pth='/datadrive/Reflection/training_data/images' trainB_pth='/datadrive/pytorch-CycleGAN-and-pix2pix/datasets/cars/trainB' move_data(wbg_pth,trainA_pth,imgs_pth,trainB_pth)
[ 11748, 28686, 220, 198, 11748, 4423, 346, 220, 628, 628, 198, 2, 266, 35904, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 8134, 1564, 14, 34409, 62, 7890, 14, 86, 35904, 6, 198, 2, 33705, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 8134, 1564, 14, 34409, 62, 7890, 14, 17566, 6, 198, 2, 29636, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 8134, 1564, 14, 34409, 62, 7890, 14, 2100, 33, 6, 198, 2, 1445, 62, 7890, 7, 86, 35904, 62, 79, 400, 11, 9600, 62, 79, 400, 11, 67, 301, 62, 79, 400, 8, 198, 198, 86, 35904, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 8134, 1564, 14, 34409, 62, 7890, 14, 86, 35904, 6, 198, 27432, 32, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 9078, 13165, 354, 12, 20418, 2375, 45028, 12, 392, 12, 79, 844, 17, 79, 844, 14, 19608, 292, 1039, 14, 37993, 14, 27432, 32, 6, 198, 9600, 82, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 8134, 1564, 14, 34409, 62, 7890, 14, 17566, 6, 198, 27432, 33, 62, 79, 400, 11639, 14, 19608, 324, 11590, 14, 9078, 13165, 354, 12, 20418, 2375, 45028, 12, 392, 12, 79, 844, 17, 79, 844, 14, 19608, 292, 1039, 14, 37993, 14, 27432, 33, 6, 198, 21084, 62, 7890, 7, 86, 35904, 62, 79, 400, 11, 27432, 32, 62, 79, 400, 11, 9600, 82, 62, 79, 400, 11, 27432, 33, 62, 79, 400, 8 ]
2.150407
246
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """A class for storing the field information.""" class _FieldInfo(object): """A class for storing the field information.""" def __init__(self, field_type, documentation, list_element_type=None, user_keys=False, serialized_name=None, exclude_if_none=False): """Class FieldInfo constructor. :param field_type: The data type of field. :type field_type: object :param documentation: The field information :type documentation: str :param list_element_type: The type of list element. :type list_element_type: object :param user_keys: user_keys=True, if keys in the value of the field are user keys. user keys are not case normalized. :type user_keys: bool :param serialized_name: :type serialized_name: str :param exclude_if_none: Exclude from serialized output if value is None. :type exclude_if_none: bool """ self._field_type = field_type self._documentation = documentation self._list_element_type = list_element_type self._user_keys = user_keys self._serialized_name = serialized_name self._exclude_if_none = exclude_if_none @property def field_type(self): """Get field type. :return: Returns the field type. :rtype: object """ return self._field_type @property def documentation(self): """Return documentation. :return: Returns the documentation. :rtype: str """ return self._documentation @property def list_element_type(self): """Get list element type. :return: Returns the list element type. :rtype: object """ return self._list_element_type @property def user_keys(self): """Get user keys setting. :return: Returns the user keys setting. :rtype: bool """ return self._user_keys @property def serialized_name(self): """Get serialized name. :return: Returns the serialized name. :rtype: str """ return self._serialized_name @property def exclude_if_none(self): """Get whether to exclude None from serialized output. :return: Returns whether to exclude None form serialized output. :rtype: bool """ return self._exclude_if_none
[ 2, 20368, 22369, 12, 201, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 201, 198, 2, 20368, 22369, 12, 201, 198, 37811, 32, 1398, 329, 23069, 262, 2214, 1321, 526, 15931, 201, 198, 201, 198, 201, 198, 4871, 4808, 15878, 12360, 7, 15252, 2599, 201, 198, 220, 220, 220, 37227, 32, 1398, 329, 23069, 262, 2214, 1321, 526, 15931, 201, 198, 201, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2214, 62, 4906, 11, 10314, 11, 1351, 62, 30854, 62, 4906, 28, 14202, 11, 2836, 62, 13083, 28, 25101, 11, 11389, 1143, 62, 3672, 28, 14202, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 361, 62, 23108, 28, 25101, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9487, 7663, 12360, 23772, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2214, 62, 4906, 25, 383, 1366, 2099, 286, 2214, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 2214, 62, 4906, 25, 2134, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 10314, 25, 383, 2214, 1321, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 10314, 25, 965, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1351, 62, 30854, 62, 4906, 25, 383, 2099, 286, 1351, 5002, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 1351, 62, 30854, 62, 4906, 25, 2134, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 2836, 62, 13083, 25, 2836, 62, 13083, 28, 17821, 11, 611, 8251, 287, 262, 1988, 286, 262, 2214, 389, 2836, 8251, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 8251, 389, 407, 1339, 39279, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 2836, 62, 13083, 25, 20512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 11389, 1143, 62, 3672, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 11389, 1143, 62, 3672, 25, 965, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 19607, 62, 361, 62, 23108, 25, 1475, 9152, 422, 11389, 1143, 5072, 611, 1988, 318, 6045, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4906, 19607, 62, 361, 62, 23108, 25, 20512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 3245, 62, 4906, 796, 2214, 62, 4906, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 22897, 341, 796, 10314, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 4868, 62, 30854, 62, 4906, 796, 1351, 62, 30854, 62, 4906, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 7220, 62, 13083, 796, 2836, 62, 13083, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 46911, 1143, 62, 3672, 796, 11389, 1143, 62, 3672, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 1069, 9152, 62, 361, 62, 23108, 796, 19607, 62, 361, 62, 23108, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 2214, 62, 4906, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 2214, 2099, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 262, 2214, 2099, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 2134, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 3245, 62, 4906, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 10314, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 13615, 10314, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 262, 10314, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 965, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 22897, 341, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 1351, 62, 30854, 62, 4906, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 1351, 5002, 2099, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 262, 1351, 5002, 2099, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 2134, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 4868, 62, 30854, 62, 4906, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 2836, 62, 13083, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 2836, 8251, 4634, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 262, 2836, 8251, 4634, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 20512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 7220, 62, 13083, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 11389, 1143, 62, 3672, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 11389, 1143, 1438, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 262, 11389, 1143, 1438, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 965, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 46911, 1143, 62, 3672, 201, 198, 201, 198, 220, 220, 220, 2488, 26745, 201, 198, 220, 220, 220, 825, 19607, 62, 361, 62, 23108, 7, 944, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3855, 1771, 284, 19607, 6045, 422, 11389, 1143, 5072, 13, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 16409, 1771, 284, 19607, 6045, 1296, 11389, 1143, 5072, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 81, 4906, 25, 20512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 1069, 9152, 62, 361, 62, 23108, 201, 198 ]
2.405501
1,127
# Copyright 2016 Google LLC # # 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. """Cryptography helpers for verifying and signing messages. The simplest way to verify signatures is using :func:`verify_signature`:: cert = open('certs.pem').read() valid = crypt.verify_signature(message, signature, cert) If you're going to verify many messages with the same certificate, you can use :class:`RSAVerifier`:: cert = open('certs.pem').read() verifier = crypt.RSAVerifier.from_string(cert) valid = verifier.verify(message, signature) To sign messages use :class:`RSASigner` with a private key:: private_key = open('private_key.pem').read() signer = crypt.RSASigner.from_string(private_key) signature = signer.sign(message) The code above also works for :class:`ES256Signer` and :class:`ES256Verifier`. Note that these two classes are only available if your `cryptography` dependency version is at least 1.4.0. """ import six from google.auth.crypt import base from google.auth.crypt import rsa try: from google.auth.crypt import es256 except ImportError: # pragma: NO COVER es256 = None if es256 is not None: # pragma: NO COVER __all__ = [ "ES256Signer", "ES256Verifier", "RSASigner", "RSAVerifier", "Signer", "Verifier", ] else: # pragma: NO COVER __all__ = ["RSASigner", "RSAVerifier", "Signer", "Verifier"] # Aliases to maintain the v1.0.0 interface, as the crypt module was split # into submodules. Signer = base.Signer Verifier = base.Verifier RSASigner = rsa.RSASigner RSAVerifier = rsa.RSAVerifier if es256 is not None: # pragma: NO COVER ES256Signer = es256.ES256Signer ES256Verifier = es256.ES256Verifier def verify_signature(message, signature, certs, verifier_cls=rsa.RSAVerifier): """Verify an RSA or ECDSA cryptographic signature. Checks that the provided ``signature`` was generated from ``bytes`` using the private key associated with the ``cert``. Args: message (Union[str, bytes]): The plaintext message. signature (Union[str, bytes]): The cryptographic signature to check. certs (Union[Sequence, str, bytes]): The certificate or certificates to use to check the signature. verifier_cls (Optional[~google.auth.crypt.base.Signer]): Which verifier class to use for verification. This can be used to select different algorithms, such as RSA or ECDSA. Default value is :class:`RSAVerifier`. Returns: bool: True if the signature is valid, otherwise False. """ if isinstance(certs, (six.text_type, six.binary_type)): certs = [certs] for cert in certs: verifier = verifier_cls.from_string(cert) if verifier.verify(message, signature): return True return False
[ 2, 15069, 1584, 3012, 11419, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 201, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 201, 198, 2, 201, 198, 2, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 201, 198, 2, 201, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 201, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 201, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 201, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 201, 198, 2, 11247, 739, 262, 13789, 13, 201, 198, 201, 198, 37811, 23919, 4867, 49385, 329, 45505, 290, 8415, 6218, 13, 201, 198, 201, 198, 464, 24043, 835, 284, 11767, 17239, 318, 1262, 1058, 20786, 25, 63, 332, 1958, 62, 12683, 1300, 63, 3712, 201, 198, 201, 198, 220, 220, 220, 5051, 796, 1280, 10786, 22583, 82, 13, 79, 368, 27691, 961, 3419, 201, 198, 220, 220, 220, 4938, 796, 8194, 13, 332, 1958, 62, 12683, 1300, 7, 20500, 11, 9877, 11, 5051, 8, 201, 198, 201, 198, 1532, 345, 821, 1016, 284, 11767, 867, 6218, 351, 262, 976, 10703, 11, 345, 460, 779, 201, 198, 25, 4871, 25, 63, 49, 4090, 13414, 7483, 63, 3712, 201, 198, 201, 198, 220, 220, 220, 5051, 796, 1280, 10786, 22583, 82, 13, 79, 368, 27691, 961, 3419, 201, 198, 220, 220, 220, 3326, 7483, 796, 8194, 13, 49, 4090, 13414, 7483, 13, 6738, 62, 8841, 7, 22583, 8, 201, 198, 220, 220, 220, 4938, 796, 3326, 7483, 13, 332, 1958, 7, 20500, 11, 9877, 8, 201, 198, 201, 198, 2514, 1051, 6218, 779, 1058, 4871, 25, 63, 6998, 1921, 570, 263, 63, 351, 257, 2839, 1994, 3712, 201, 198, 201, 198, 220, 220, 220, 2839, 62, 2539, 796, 1280, 10786, 19734, 62, 2539, 13, 79, 368, 27691, 961, 3419, 201, 198, 220, 220, 220, 1051, 263, 796, 8194, 13, 6998, 1921, 570, 263, 13, 6738, 62, 8841, 7, 19734, 62, 2539, 8, 201, 198, 220, 220, 220, 9877, 796, 1051, 263, 13, 12683, 7, 20500, 8, 201, 198, 201, 198, 464, 2438, 2029, 635, 2499, 329, 1058, 4871, 25, 63, 1546, 11645, 11712, 263, 63, 290, 1058, 4871, 25, 63, 1546, 11645, 13414, 7483, 44646, 201, 198, 6425, 326, 777, 734, 6097, 389, 691, 1695, 611, 534, 4600, 29609, 4867, 63, 20203, 201, 198, 9641, 318, 379, 1551, 352, 13, 19, 13, 15, 13, 201, 198, 37811, 201, 198, 201, 198, 11748, 2237, 201, 198, 201, 198, 6738, 23645, 13, 18439, 13, 29609, 1330, 2779, 201, 198, 6738, 23645, 13, 18439, 13, 29609, 1330, 374, 11400, 201, 198, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 422, 23645, 13, 18439, 13, 29609, 1330, 1658, 11645, 201, 198, 16341, 17267, 12331, 25, 220, 1303, 23864, 2611, 25, 8005, 47902, 201, 198, 220, 220, 220, 1658, 11645, 796, 6045, 201, 198, 201, 198, 361, 1658, 11645, 318, 407, 6045, 25, 220, 1303, 23864, 2611, 25, 8005, 47902, 201, 198, 220, 220, 220, 11593, 439, 834, 796, 685, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 1546, 11645, 11712, 263, 1600, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 1546, 11645, 13414, 7483, 1600, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 6998, 1921, 570, 263, 1600, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 49, 4090, 13414, 7483, 1600, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11712, 263, 1600, 201, 198, 220, 220, 220, 220, 220, 220, 220, 366, 13414, 7483, 1600, 201, 198, 220, 220, 220, 2361, 201, 198, 17772, 25, 220, 1303, 23864, 2611, 25, 8005, 47902, 201, 198, 220, 220, 220, 11593, 439, 834, 796, 14631, 6998, 1921, 570, 263, 1600, 366, 49, 4090, 13414, 7483, 1600, 366, 11712, 263, 1600, 366, 13414, 7483, 8973, 201, 198, 201, 198, 201, 198, 2, 12104, 1386, 284, 5529, 262, 410, 16, 13, 15, 13, 15, 7071, 11, 355, 262, 8194, 8265, 373, 6626, 201, 198, 2, 656, 850, 18170, 13, 201, 198, 11712, 263, 796, 2779, 13, 11712, 263, 201, 198, 13414, 7483, 796, 2779, 13, 13414, 7483, 201, 198, 6998, 1921, 570, 263, 796, 374, 11400, 13, 6998, 1921, 570, 263, 201, 198, 49, 4090, 13414, 7483, 796, 374, 11400, 13, 49, 4090, 13414, 7483, 201, 198, 201, 198, 361, 1658, 11645, 318, 407, 6045, 25, 220, 1303, 23864, 2611, 25, 8005, 47902, 201, 198, 220, 220, 220, 13380, 11645, 11712, 263, 796, 1658, 11645, 13, 1546, 11645, 11712, 263, 201, 198, 220, 220, 220, 13380, 11645, 13414, 7483, 796, 1658, 11645, 13, 1546, 11645, 13414, 7483, 201, 198, 201, 198, 201, 198, 4299, 11767, 62, 12683, 1300, 7, 20500, 11, 9877, 11, 27802, 11, 3326, 7483, 62, 565, 82, 28, 3808, 64, 13, 49, 4090, 13414, 7483, 2599, 201, 198, 220, 220, 220, 37227, 13414, 1958, 281, 42319, 393, 412, 8610, 4090, 40705, 9877, 13, 201, 198, 201, 198, 220, 220, 220, 47719, 326, 262, 2810, 7559, 12683, 1300, 15506, 373, 7560, 422, 7559, 33661, 15506, 1262, 201, 198, 220, 220, 220, 262, 2839, 1994, 3917, 351, 262, 7559, 22583, 15506, 13, 201, 198, 201, 198, 220, 220, 220, 943, 14542, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 357, 38176, 58, 2536, 11, 9881, 60, 2599, 383, 8631, 5239, 3275, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 9877, 357, 38176, 58, 2536, 11, 9881, 60, 2599, 383, 40705, 9877, 284, 2198, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 27802, 357, 38176, 58, 44015, 594, 11, 965, 11, 9881, 60, 2599, 383, 10703, 393, 20835, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 779, 284, 2198, 262, 9877, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3326, 7483, 62, 565, 82, 357, 30719, 58, 93, 13297, 13, 18439, 13, 29609, 13, 8692, 13, 11712, 263, 60, 2599, 9022, 3326, 7483, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1398, 284, 779, 329, 19637, 13, 770, 460, 307, 973, 284, 2922, 1180, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16113, 11, 884, 355, 42319, 393, 412, 8610, 4090, 13, 15161, 1988, 318, 1058, 4871, 25, 63, 49, 4090, 13414, 7483, 44646, 201, 198, 201, 198, 220, 220, 220, 16409, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 20512, 25, 6407, 611, 262, 9877, 318, 4938, 11, 4306, 10352, 13, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 611, 318, 39098, 7, 22583, 82, 11, 357, 19412, 13, 5239, 62, 4906, 11, 2237, 13, 39491, 62, 4906, 8, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 27802, 796, 685, 22583, 82, 60, 201, 198, 201, 198, 220, 220, 220, 329, 5051, 287, 27802, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3326, 7483, 796, 3326, 7483, 62, 565, 82, 13, 6738, 62, 8841, 7, 22583, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3326, 7483, 13, 332, 1958, 7, 20500, 11, 9877, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 201, 198, 220, 220, 220, 1441, 10352, 201, 198 ]
2.710796
1,269
eggs = 'global' spam()
[ 198, 33856, 82, 796, 705, 20541, 6, 198, 2777, 321, 3419 ]
2.090909
11
from github.Issue import Issue from github.Repository import Repository import logging from typing import List REQUEST_REPO = 'Azure/sdk-release-request' REST_REPO = 'Azure/azure-rest-api-specs' AUTO_ASSIGN_LABEL = 'assigned' AUTO_PARSE_LABEL = 'auto-link' _LOG = logging.getLogger(__name__)
[ 6738, 33084, 13, 45147, 1330, 18232, 198, 6738, 33084, 13, 6207, 13264, 1330, 1432, 13264, 198, 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 198, 2200, 35780, 62, 2200, 16402, 796, 705, 26903, 495, 14, 21282, 74, 12, 20979, 12, 25927, 6, 198, 49, 6465, 62, 2200, 16402, 796, 705, 26903, 495, 14, 1031, 495, 12, 2118, 12, 15042, 12, 4125, 6359, 6, 198, 39371, 46, 62, 10705, 16284, 62, 48780, 3698, 796, 705, 562, 3916, 6, 198, 39371, 46, 62, 27082, 5188, 62, 48780, 3698, 796, 705, 23736, 12, 8726, 6, 198, 198, 62, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
2.715596
109
import argparse import os import random import sys import time import requests parser = argparse.ArgumentParser() parser.add_argument('--path', type=str, help='Path to text files with bills', required=True) parser.add_argument('--count', type=int, help='How much files process', required=False, default=20) args = parser.parse_args() url = 'http://ws.clarin-pl.eu/nlprest2' parsed = {} id2file = {} already_parsed = os.listdir(args.path + 'ner/') count = min(args.count, 100 - len(already_parsed)) directory_contents = random.sample(list(filter(lambda entry: os.path.isfile(args.path + entry) and entry not in already_parsed, os.listdir(args.path))), k=count) for filename in directory_contents: with open(args.path + filename, encoding='utf-8') as file: response = requests.post(url=url + '/base/startTask', json={'text': file.read(), 'lpmn': 'any2txt|wcrft2|liner2({"model":"n82"})', 'user': ''}) response_string = str(response.content).replace("b\'", "").replace("\'", "") id2file[response_string] = filename parsed[response_string] = {"value": None, "status": None} print("{} read and sent".format(filename)) id_list = list(parsed.keys()) print("Finished reading files") counter = 0 while len(id_list) > 0: for id in id_list: parsed[id] = requests.get(url=url + '/base/getStatus/' + str(id)).json() if parsed[id]['status'] == 'DONE': counter += 1 with open(args.path + 'ner/' + id2file[id], 'wb') as file: for element in parsed[id]['value']: # print(requests.get(url=url + '/base/download' + element['fileID']).content) # file.write(str(requests.get(url=url + '/base/download' + element['fileID']).content)[2:-1]) file.write(requests.get(url=url + '/base/download' + element['fileID']).content) id_list.remove(id) print("{} finished".format(counter)) elif parsed[id]['status'] == 'ERROR': print(parsed[id]['value'], file=sys.stderr) exit(-1) time.sleep(2) print('{} docs left'.format(len(id_list)))
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 7007, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 6978, 3256, 2099, 28, 2536, 11, 1037, 11639, 15235, 284, 2420, 3696, 351, 9024, 3256, 2672, 28, 17821, 8, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 9127, 3256, 2099, 28, 600, 11, 1037, 11639, 2437, 881, 3696, 1429, 3256, 2672, 28, 25101, 11, 4277, 28, 1238, 8, 198, 198, 22046, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 198, 6371, 796, 705, 4023, 1378, 18504, 13, 565, 17714, 12, 489, 13, 12496, 14, 21283, 79, 2118, 17, 6, 198, 198, 79, 945, 276, 796, 23884, 198, 312, 17, 7753, 796, 23884, 198, 198, 282, 1493, 62, 79, 945, 276, 796, 28686, 13, 4868, 15908, 7, 22046, 13, 6978, 1343, 705, 1008, 14, 11537, 198, 9127, 796, 949, 7, 22046, 13, 9127, 11, 1802, 532, 18896, 7, 282, 1493, 62, 79, 945, 276, 4008, 198, 34945, 62, 3642, 658, 796, 4738, 13, 39873, 7, 4868, 7, 24455, 7, 50033, 5726, 25, 28686, 13, 6978, 13, 4468, 576, 7, 22046, 13, 6978, 1343, 5726, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 5726, 407, 287, 1541, 62, 79, 945, 276, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 4868, 15908, 7, 22046, 13, 6978, 4008, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 28, 9127, 8, 198, 1640, 29472, 287, 8619, 62, 3642, 658, 25, 198, 220, 220, 220, 351, 1280, 7, 22046, 13, 6978, 1343, 29472, 11, 21004, 11639, 40477, 12, 23, 11537, 355, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 7007, 13, 7353, 7, 6371, 28, 6371, 1343, 31051, 8692, 14, 9688, 25714, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 34758, 6, 5239, 10354, 2393, 13, 961, 22784, 705, 75, 4426, 77, 10354, 705, 1092, 17, 14116, 91, 86, 6098, 701, 17, 91, 24683, 17, 7, 4895, 19849, 2404, 77, 6469, 20662, 8, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7220, 10354, 10148, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 62, 8841, 796, 965, 7, 26209, 13, 11299, 737, 33491, 7203, 65, 43054, 1600, 366, 11074, 33491, 7203, 43054, 1600, 366, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 17, 7753, 58, 26209, 62, 8841, 60, 796, 29472, 198, 220, 220, 220, 220, 220, 220, 220, 44267, 58, 26209, 62, 8841, 60, 796, 19779, 8367, 1298, 6045, 11, 366, 13376, 1298, 6045, 92, 198, 220, 220, 220, 3601, 7203, 90, 92, 1100, 290, 1908, 1911, 18982, 7, 34345, 4008, 198, 198, 312, 62, 4868, 796, 1351, 7, 79, 945, 276, 13, 13083, 28955, 198, 4798, 7203, 18467, 1348, 3555, 3696, 4943, 198, 198, 24588, 796, 657, 198, 4514, 18896, 7, 312, 62, 4868, 8, 1875, 657, 25, 198, 220, 220, 220, 329, 4686, 287, 4686, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 44267, 58, 312, 60, 796, 7007, 13, 1136, 7, 6371, 28, 6371, 1343, 31051, 8692, 14, 1136, 19580, 14, 6, 1343, 965, 7, 312, 29720, 17752, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 44267, 58, 312, 7131, 6, 13376, 20520, 6624, 705, 35, 11651, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3753, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 22046, 13, 6978, 1343, 705, 1008, 14, 6, 1343, 4686, 17, 7753, 58, 312, 4357, 705, 39346, 11537, 355, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 5002, 287, 44267, 58, 312, 7131, 6, 8367, 6, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 7, 8897, 3558, 13, 1136, 7, 6371, 28, 6371, 1343, 31051, 8692, 14, 15002, 6, 1343, 5002, 17816, 7753, 2389, 20520, 737, 11299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2393, 13, 13564, 7, 2536, 7, 8897, 3558, 13, 1136, 7, 6371, 28, 6371, 1343, 31051, 8692, 14, 15002, 6, 1343, 5002, 17816, 7753, 2389, 20520, 737, 11299, 38381, 17, 21912, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 13, 13564, 7, 8897, 3558, 13, 1136, 7, 6371, 28, 6371, 1343, 31051, 8692, 14, 15002, 6, 1343, 5002, 17816, 7753, 2389, 20520, 737, 11299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 62, 4868, 13, 28956, 7, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 90, 92, 5201, 1911, 18982, 7, 24588, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 44267, 58, 312, 7131, 6, 13376, 20520, 6624, 705, 24908, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 79, 945, 276, 58, 312, 7131, 6, 8367, 6, 4357, 2393, 28, 17597, 13, 301, 1082, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8420, 32590, 16, 8, 198, 220, 220, 220, 640, 13, 42832, 7, 17, 8, 198, 220, 220, 220, 3601, 10786, 90, 92, 34165, 1364, 4458, 18982, 7, 11925, 7, 312, 62, 4868, 22305, 198 ]
2.142206
1,097
from fastapi import APIRouter from src.utils.events import Events from src.schemas.schema import x_schedule_header from src.controllers.faculties_controller import get_all_faculties, is_faculty_exists from src.utils.tracking import track tag = "Faculties" router = APIRouter() @router.get("", tags=[tag]) @track(fmt="", event=Events.GET_ALL_FACULTIES) @router.get("/exists", tags=[tag]) @track(fmt="query={query}", event=Events.IS_FACULTY_EXISTS)
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 6738, 12351, 13, 26791, 13, 31534, 1330, 18715, 198, 6738, 12351, 13, 1416, 4411, 292, 13, 15952, 2611, 1330, 2124, 62, 15952, 5950, 62, 25677, 198, 6738, 12351, 13, 3642, 36667, 13, 38942, 586, 444, 62, 36500, 1330, 651, 62, 439, 62, 38942, 586, 444, 11, 318, 62, 38942, 10672, 62, 1069, 1023, 198, 6738, 12351, 13, 26791, 13, 36280, 1330, 2610, 198, 198, 12985, 796, 366, 47522, 586, 444, 1, 198, 472, 353, 796, 3486, 4663, 39605, 3419, 628, 198, 31, 472, 353, 13, 1136, 7203, 1600, 15940, 41888, 12985, 12962, 198, 31, 11659, 7, 69, 16762, 2625, 1600, 1785, 28, 37103, 13, 18851, 62, 7036, 62, 37, 2246, 16724, 11015, 8, 628, 198, 31, 472, 353, 13, 1136, 7203, 14, 1069, 1023, 1600, 15940, 41888, 12985, 12962, 198, 31, 11659, 7, 69, 16762, 2625, 22766, 34758, 22766, 92, 1600, 1785, 28, 37103, 13, 1797, 62, 37, 2246, 6239, 9936, 62, 6369, 1797, 4694, 8, 198 ]
2.739394
165
# -*- coding: utf-8 -*- import ckan.plugins as p #from ckan.lib.base import BaseController, config import ckan.lib.base as base import ckan.lib.helpers as h import ckan.model as model import ckan.logic as logic import ckan.logic.schema as schema import ckan.new_authz as new_authz import ckan.lib.captcha as captcha import ckan.lib.navl.dictization_functions as dictization_functions import functools import requests from sqlalchemy import text import logging from pylons import config from ckan.common import _, c, g, request, response c = base.c request = base.request log = logging.getLogger(__name__)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 269, 27541, 13, 37390, 355, 279, 198, 2, 6738, 269, 27541, 13, 8019, 13, 8692, 1330, 7308, 22130, 11, 4566, 198, 11748, 269, 27541, 13, 8019, 13, 8692, 355, 2779, 198, 11748, 269, 27541, 13, 8019, 13, 16794, 364, 355, 289, 198, 11748, 269, 27541, 13, 19849, 355, 2746, 198, 11748, 269, 27541, 13, 6404, 291, 355, 9156, 198, 11748, 269, 27541, 13, 6404, 291, 13, 15952, 2611, 355, 32815, 198, 11748, 269, 27541, 13, 3605, 62, 18439, 89, 355, 649, 62, 18439, 89, 198, 11748, 269, 27541, 13, 8019, 13, 27144, 11693, 355, 48972, 198, 11748, 269, 27541, 13, 8019, 13, 28341, 75, 13, 11600, 1634, 62, 12543, 2733, 355, 8633, 1634, 62, 12543, 2733, 198, 11748, 1257, 310, 10141, 198, 11748, 7007, 198, 6738, 44161, 282, 26599, 1330, 2420, 198, 198, 11748, 18931, 198, 6738, 279, 2645, 684, 1330, 4566, 198, 6738, 269, 27541, 13, 11321, 1330, 4808, 11, 269, 11, 308, 11, 2581, 11, 2882, 198, 66, 796, 2779, 13, 66, 198, 25927, 796, 2779, 13, 25927, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
3.029851
201
""" Module for loading PypeIt files """ import os import warnings import numpy as np from astropy import units from astropy.time import Time from astropy.io import fits from astropy.table import Table from linetools.spectra.xspectrum1d import XSpectrum1D from linetools.spectra.utils import collate import linetools.utils from pypeit import msgs from IPython import embed from pypeit.core import parse # TODO I don't think we need this routine def load_ext_to_array(hdulist, ext_id, ex_value='OPT', flux_value=True, nmaskedge=None): ''' It will be called by load_1dspec_to_array. Load one-d spectra from ext_id in the hdulist Args: hdulist: FITS HDU list ext_id: extension name, i.e., 'SPAT1073-SLIT0001-DET03', 'OBJID0001-ORDER0003', 'OBJID0001-ORDER0002-DET01' ex_value: 'OPT' or 'BOX' flux_value: if True load fluxed data, else load unfluxed data Returns: tuple: Returns wave, flux, ivar, mask ''' if (ex_value != 'OPT') and (ex_value != 'BOX'): msgs.error('{:} is not recognized. Please change to either BOX or OPT.'.format(ex_value)) # get the order/slit information ntrace0 = np.size(hdulist)-1 idx_names = [] for ii in range(ntrace0): idx_names.append(hdulist[ii+1].name) # idx name # Initialize ext ext = None for indx in (idx_names): if ext_id in indx: ext = indx if ext is None: msgs.error('Can not find extension {:}.'.format(ext_id)) else: hdu_iexp = hdulist[ext] wave = hdu_iexp.data['{:}_WAVE'.format(ex_value)] mask = hdu_iexp.data['{:}_MASK'.format(ex_value)] # Mask Edges if nmaskedge is not None: mask[:int(nmaskedge)] = False mask[-int(nmaskedge):] = False if flux_value: flux = hdu_iexp.data['{:}_FLAM'.format(ex_value)] ivar = hdu_iexp.data['{:}_FLAM_IVAR'.format(ex_value)] else: msgs.warn('Loading unfluxed spectra') flux = hdu_iexp.data['{:}_COUNTS'.format(ex_value)] ivar = hdu_iexp.data['{:}_COUNTS_IVAR'.format(ex_value)] return wave, flux, ivar, mask # TODO merge this with unpack orders def load_1dspec_to_array(fnames, gdobj=None, order=None, ex_value='OPT', flux_value=True, nmaskedge=None): ''' Load the spectra from the 1d fits file into arrays. If Echelle, you need to specify which order you want to load. It can NOT load all orders for Echelle data. Args: fnames (list): 1D spectra fits file(s) gdobj (list): extension name (longslit/multislit) or objID (Echelle) order (None or int): order number ex_value (str): 'OPT' or 'BOX' flux_value (bool): if True it will load fluxed spectra, otherwise load counts Returns: tuple: Returns the following: - waves (ndarray): wavelength array of your spectra, see below for the shape information of this array. - fluxes (ndarray): flux array of your spectra - ivars (ndarray): ivars of your spectra - masks (ndarray, bool): mask array of your spectra The shapes of all returns are exactly the same. - Case 1: np.size(fnames)=np.size(gdobj)=1, order=None for Longslit or order=N (an int number) for Echelle Longslit/single order for a single fits file, they are 1D arrays with the size equal to Nspec - Case 2: np.size(fnames)=np.size(gdobj)>1, order=None for Longslit or order=N (an int number) for Echelle Longslit/single order for a list of fits files, 2D array, the shapes are Nspec by Nexp - Case 3: np.size(fnames)=np.size(gdobj)=1, order=None All Echelle orders for a single fits file, 2D array, the shapes are Nspec by Norders - Case 4: np.size(fnames)=np.size(gdobj)>1, order=None All Echelle orders for a list of fits files, 3D array, the shapres are Nspec by Norders by Nexp ''' # read in the first fits file if isinstance(fnames, (list, np.ndarray)): nexp = np.size(fnames) fname0 = fnames[0] elif isinstance(fnames, str): nexp = 1 fname0 = fnames hdulist = fits.open(fname0) header = hdulist[0].header npix = header['NPIX'] pypeline = header['PYPELINE'] # get the order/slit information ntrace0 = np.size(hdulist)-1 idx_orders = [] for ii in range(ntrace0): idx_orders.append(int(hdulist[ii+1].name.split('-')[1][5:])) # slit ID or order ID if pypeline == "Echelle": ## np.unique automatically sort the returned array which is not what I want!!! ## order_vec = np.unique(idx_orders) dum, order_vec_idx = np.unique(idx_orders, return_index=True) order_vec = np.array(idx_orders)[np.sort(order_vec_idx)] norder = np.size(order_vec) else: norder = 1 #TODO This is unneccessarily complicated. The nexp=1 case does the same operations as the nexp > 1 case. Refactor # this so that it just does the same set of operations once and then reshapes the array at the end to give you what # you want. Let's merge this with unpack orders ## Loading data from a single fits file if nexp == 1: # initialize arrays if (order is None) and (pypeline == "Echelle"): waves = np.zeros((npix, norder,nexp)) fluxes = np.zeros_like(waves) ivars = np.zeros_like(waves) masks = np.zeros_like(waves, dtype=bool) for ii, iord in enumerate(order_vec): ext_id = gdobj[0]+'-ORDER{:04d}'.format(iord) wave_iord, flux_iord, ivar_iord, mask_iord = load_ext_to_array(hdulist, ext_id, ex_value=ex_value, flux_value=flux_value, nmaskedge=nmaskedge) waves[:,ii,0] = wave_iord fluxes[:,ii,0] = flux_iord ivars[:,ii,0] = ivar_iord masks[:,ii,0] = mask_iord else: if pypeline == "Echelle": ext_id = gdobj[0]+'-ORDER{:04d}'.format(order) else: ext_id = gdobj[0] waves, fluxes, ivars, masks = load_ext_to_array(hdulist, ext_id, ex_value=ex_value, flux_value=flux_value, nmaskedge=nmaskedge) ## Loading data from a list of fits files else: # initialize arrays if (order is None) and (pypeline == "Echelle"): # store all orders into one single array waves = np.zeros((npix, norder, nexp)) else: # store a specific order or longslit waves = np.zeros((npix, nexp)) fluxes = np.zeros_like(waves) ivars = np.zeros_like(waves) masks = np.zeros_like(waves,dtype=bool) for iexp in range(nexp): hdulist_iexp = fits.open(fnames[iexp]) # ToDo: The following part can be removed if all data are reduced using the leatest pipeline if pypeline == "Echelle": ntrace = np.size(hdulist_iexp) - 1 idx_orders = [] for ii in range(ntrace): idx_orders.append(int(hdulist_iexp[ii + 1].name.split('-')[1][5:])) # slit ID or order ID dum, order_vec_idx = np.unique(idx_orders, return_index=True) order_vec = np.array(idx_orders)[np.sort(order_vec_idx)] # ToDo: The above part can be removed if all data are reduced using the leatest pipeline if (order is None) and (pypeline == "Echelle"): for ii, iord in enumerate(order_vec): ext_id = gdobj[iexp]+'-ORDER{:04d}'.format(iord) wave_iord, flux_iord, ivar_iord, mask_iord = load_ext_to_array(hdulist_iexp, ext_id, ex_value=ex_value, nmaskedge = nmaskedge, flux_value=flux_value) waves[:,ii,iexp] = wave_iord fluxes[:,ii,iexp] = flux_iord ivars[:,ii,iexp] = ivar_iord masks[:,ii,iexp] = mask_iord else: if pypeline == "Echelle": ext_id = gdobj[iexp]+'-ORDER{:04d}'.format(order) else: ext_id = gdobj[iexp] wave, flux, ivar, mask = load_ext_to_array(hdulist_iexp, ext_id, ex_value=ex_value, flux_value=flux_value, nmaskedge=nmaskedge) waves[:, iexp] = wave fluxes[:, iexp] = flux ivars[:, iexp] = ivar masks[:, iexp] = mask return waves, fluxes, ivars, masks, header def load_spec_order(fname,norder, objid=None, order=None, extract='OPT', flux=True): """ Loading single order spectrum from a PypeIt 1D specctrum fits file. it will be called by ech_load_spec Args: fname (str) : The file name of your spec1d file objid (str) : The id of the object you want to load. (default is the first object) order (int) : which order you want to load (default is None, loading all orders) extract (str) : 'OPT' or 'BOX' flux (bool) : default is True, loading fluxed spectra Returns: XSpectrum1D: spectrum_out """ if objid is None: objid = 0 if order is None: msgs.error('Please specify which order you want to load') # read extension name into a list primary_header = fits.getheader(fname, 0) nspec = primary_header['NSPEC'] extnames = [primary_header['EXT0001']] * nspec for kk in range(nspec): extnames[kk] = primary_header['EXT' + '{0:04}'.format(kk + 1)] # Figure out which extension is the required data extnames_array = np.reshape(np.array(extnames),(norder,int(nspec/norder))) extnames_good = extnames_array[:,int(objid[3:])-1] extname = extnames_good[order] try: exten = extnames.index(extname) + 1 msgs.info("Loading extension {:s} of spectrum {:s}".format(extname, fname)) except: msgs.error("Spectrum {:s} does not contain {:s} extension".format(fname, extname)) spectrum = load_1dspec(fname, exten=exten, extract=extract, flux=flux) # Polish a bit -- Deal with NAN, inf, and *very* large values that will exceed # the floating point precision of float32 for var which is sig**2 (i.e. 1e38) bad_flux = np.any([np.isnan(spectrum.flux), np.isinf(spectrum.flux), np.abs(spectrum.flux) > 1e30, spectrum.sig ** 2 > 1e10, ], axis=0) # Sometimes Echelle spectra have zero wavelength bad_wave = spectrum.wavelength < 1000.0*units.AA bad_all = bad_flux + bad_wave ## trim bad part wave_out,flux_out,sig_out = spectrum.wavelength[~bad_all],spectrum.flux[~bad_all],spectrum.sig[~bad_all] spectrum_out = XSpectrum1D.from_tuple((wave_out,flux_out,sig_out), verbose=False) #if np.sum(bad_flux): # msgs.warn("There are some bad flux values in this spectrum. Will zero them out and mask them (not ideal)") # spectrum.data['flux'][spectrum.select][bad_flux] = 0. # spectrum.data['sig'][spectrum.select][bad_flux] = 0. return spectrum_out def ech_load_spec(files,objid=None,order=None,extract='OPT',flux=True): """ Loading Echelle spectra from a list of PypeIt 1D spectrum fits files Args: files (str) : The list of file names of your spec1d file objid (str) : The id (one per fits file) of the object you want to load. (default is the first object) order (int) : which order you want to load (default is None, loading all orders) extract (str) : 'OPT' or 'BOX' flux (bool) : default is True, loading fluxed spectra Returns: XSpectrum1D: spectrum_out """ nfiles = len(files) if objid is None: objid = ['OBJ0000'] * nfiles elif len(objid) == 1: objid = objid * nfiles elif len(objid) != nfiles: msgs.error('The length of objid should be either 1 or equal to the number of spectra files.') fname = files[0] ext_first = fits.getheader(fname, 1) ext_final = fits.getheader(fname, -1) norder = abs(ext_final['ECHORDER'] - ext_first['ECHORDER']) + 1 msgs.info('spectrum {:s} has {:d} orders'.format(fname, norder)) if norder <= 1: msgs.error('The number of orders have to be greater than one for echelle. Longslit data?') # Load spectra spectra_list = [] for ii, fname in enumerate(files): if order is None: msgs.info('Loading all orders into a gaint spectra') for iord in range(norder): spectrum = load_spec_order(fname, norder, objid=objid[ii],order=iord,extract=extract,flux=flux) # Append spectra_list.append(spectrum) elif order >= norder: msgs.error('order number cannot greater than the total number of orders') else: spectrum = load_spec_order(fname,norder, objid=objid[ii], order=order, extract=extract, flux=flux) # Append spectra_list.append(spectrum) # Join into one XSpectrum1D object spectra = collate(spectra_list) # Return return spectra def load_sens_dict(filename): """ Load a full (all slit) wv_calib dict Includes converting the JSON lists of particular items into ndarray Fills self.wv_calib and self.par Args: filename (str): Master file Returns: dict or None: self.wv_calib """ # Does the master file exist? if not os.path.isfile(filename): msgs.warn("No sensfunc file found with filename {:s}".format(filename)) return None else: msgs.info("Loading sensfunc from file {:s}".format(filename)) sens_dict = linetools.utils.loadjson(filename) # Recast a few items as arrays for key in sens_dict.keys(): try: int(key) except ValueError: continue else: for tkey in sens_dict[key].keys(): if isinstance(sens_dict[key][tkey], list): sens_dict[key][tkey] = np.array(sens_dict[key][tkey]) return sens_dict def load_multiext_fits(filename, ext): """ Load data and primary header from a multi-extension FITS file Args: filename (:obj:`str`): Name of the file. ext (:obj:`str`, :obj:`int`, :obj:`list`): One or more file extensions with data to return. The extension can be designated by its 0-indexed integer number or its name. Returns: tuple: Returns the image data from each provided extension. If return_header is true, the primary header is also returned. """ # Format the input and set the tuple for an empty return _ext = ext if isinstance(ext, list) else [ext] n_ext = len(_ext) # Open the file hdu = fits.open(filename) head0 = hdu[0].header # Only one extension if n_ext == 1: data = hdu[_ext[0]].data.astype(np.float) return data, head0 # Multiple extensions data = tuple([None if hdu[k].data is None else hdu[k].data.astype(np.float) for k in _ext]) # Return return data+(head0,)
[ 37811, 19937, 329, 11046, 350, 2981, 1026, 3696, 198, 37811, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6468, 28338, 1330, 4991, 198, 6738, 6468, 28338, 13, 2435, 1330, 3862, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 198, 6738, 6468, 28338, 13, 11487, 1330, 8655, 198, 198, 6738, 9493, 316, 10141, 13, 4443, 430, 13, 87, 4443, 6582, 16, 67, 1330, 1395, 49738, 6582, 16, 35, 198, 6738, 9493, 316, 10141, 13, 4443, 430, 13, 26791, 1330, 2927, 378, 198, 11748, 9493, 316, 10141, 13, 26791, 198, 198, 6738, 279, 2981, 270, 1330, 13845, 14542, 198, 6738, 6101, 7535, 1330, 11525, 198, 6738, 279, 2981, 270, 13, 7295, 1330, 21136, 628, 198, 198, 2, 16926, 46, 314, 836, 470, 892, 356, 761, 428, 8027, 198, 4299, 3440, 62, 2302, 62, 1462, 62, 18747, 7, 31298, 377, 396, 11, 1070, 62, 312, 11, 409, 62, 8367, 11639, 3185, 51, 3256, 28462, 62, 8367, 28, 17821, 11, 299, 27932, 14907, 28, 14202, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 632, 481, 307, 1444, 416, 3440, 62, 16, 67, 16684, 62, 1462, 62, 18747, 13, 198, 220, 220, 220, 8778, 530, 12, 67, 5444, 430, 422, 1070, 62, 312, 287, 262, 289, 67, 377, 396, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 289, 67, 377, 396, 25, 376, 29722, 5572, 52, 1351, 198, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 25, 7552, 1438, 11, 1312, 13, 68, 1539, 705, 4303, 1404, 940, 4790, 12, 8634, 2043, 18005, 12, 35, 2767, 3070, 3256, 705, 9864, 41, 2389, 18005, 12, 12532, 1137, 830, 18, 3256, 705, 9864, 41, 2389, 18005, 12, 12532, 1137, 34215, 12, 35, 2767, 486, 6, 198, 220, 220, 220, 220, 220, 220, 220, 409, 62, 8367, 25, 705, 3185, 51, 6, 393, 705, 39758, 6, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 62, 8367, 25, 611, 6407, 3440, 28462, 276, 1366, 11, 2073, 3440, 3684, 22564, 276, 1366, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 46545, 25, 16409, 6769, 11, 28462, 11, 21628, 283, 11, 9335, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, 611, 357, 1069, 62, 8367, 14512, 705, 3185, 51, 11537, 290, 357, 1069, 62, 8367, 14512, 705, 39758, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 90, 25, 92, 318, 407, 8018, 13, 4222, 1487, 284, 2035, 45216, 393, 39852, 2637, 13, 18982, 7, 1069, 62, 8367, 4008, 628, 220, 220, 220, 1303, 651, 262, 1502, 14, 6649, 270, 1321, 198, 220, 220, 220, 299, 40546, 15, 796, 45941, 13, 7857, 7, 31298, 377, 396, 13219, 16, 198, 220, 220, 220, 4686, 87, 62, 14933, 796, 17635, 198, 220, 220, 220, 329, 21065, 287, 2837, 7, 429, 16740, 15, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 14933, 13, 33295, 7, 31298, 377, 396, 58, 4178, 10, 16, 4083, 3672, 8, 1303, 4686, 87, 1438, 628, 220, 220, 220, 1303, 20768, 1096, 1070, 198, 220, 220, 220, 1070, 796, 6045, 198, 220, 220, 220, 329, 773, 87, 287, 357, 312, 87, 62, 14933, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1070, 62, 312, 287, 773, 87, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 796, 773, 87, 198, 220, 220, 220, 611, 1070, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 6090, 407, 1064, 7552, 46110, 92, 2637, 13, 18982, 7, 2302, 62, 312, 4008, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 289, 646, 62, 494, 42372, 796, 289, 67, 377, 396, 58, 2302, 60, 628, 220, 220, 220, 6769, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 15543, 6089, 4458, 18982, 7, 1069, 62, 8367, 15437, 198, 220, 220, 220, 9335, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 31180, 42, 4458, 18982, 7, 1069, 62, 8367, 15437, 628, 220, 220, 220, 1303, 18007, 1717, 3212, 198, 220, 220, 220, 611, 299, 27932, 14907, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 58, 25, 600, 7, 21533, 2093, 14907, 15437, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 58, 12, 600, 7, 21533, 2093, 14907, 2599, 60, 796, 10352, 628, 220, 220, 220, 611, 28462, 62, 8367, 25, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 3697, 2390, 4458, 18982, 7, 1069, 62, 8367, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 3697, 2390, 62, 3824, 1503, 4458, 18982, 7, 1069, 62, 8367, 15437, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 40539, 10786, 19031, 3684, 22564, 276, 5444, 430, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 34, 19385, 4694, 4458, 18982, 7, 1069, 62, 8367, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 796, 289, 646, 62, 494, 42372, 13, 7890, 17816, 90, 25, 92, 62, 34, 19385, 4694, 62, 3824, 1503, 4458, 18982, 7, 1069, 62, 8367, 15437, 628, 220, 220, 220, 1441, 6769, 11, 28462, 11, 21628, 283, 11, 9335, 198, 198, 2, 16926, 46, 20121, 428, 351, 555, 8002, 6266, 198, 4299, 3440, 62, 16, 67, 16684, 62, 1462, 62, 18747, 7, 69, 14933, 11, 308, 67, 26801, 28, 14202, 11, 1502, 28, 14202, 11, 409, 62, 8367, 11639, 3185, 51, 3256, 28462, 62, 8367, 28, 17821, 11, 299, 27932, 14907, 28, 14202, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 8778, 262, 5444, 430, 422, 262, 352, 67, 11414, 2393, 656, 26515, 13, 198, 220, 220, 220, 1002, 412, 29232, 293, 11, 345, 761, 284, 11986, 543, 1502, 345, 765, 284, 3440, 13, 198, 220, 220, 220, 632, 460, 5626, 3440, 477, 6266, 329, 412, 29232, 293, 1366, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 277, 14933, 357, 4868, 2599, 352, 35, 5444, 430, 11414, 2393, 7, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 308, 67, 26801, 357, 4868, 2599, 7552, 1438, 357, 6511, 6649, 270, 14, 16680, 3044, 270, 8, 393, 26181, 2389, 357, 36, 29232, 293, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1502, 357, 14202, 393, 493, 2599, 1502, 1271, 198, 220, 220, 220, 220, 220, 220, 220, 409, 62, 8367, 357, 2536, 2599, 705, 3185, 51, 6, 393, 705, 39758, 6, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 62, 8367, 357, 30388, 2599, 611, 6407, 340, 481, 3440, 28462, 276, 5444, 430, 11, 4306, 3440, 9853, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 46545, 25, 16409, 262, 1708, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 9813, 357, 358, 18747, 2599, 28400, 7177, 286, 534, 5444, 430, 11, 766, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2174, 329, 262, 5485, 1321, 286, 428, 7177, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 28462, 274, 357, 358, 18747, 2599, 28462, 7177, 286, 534, 5444, 430, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 21628, 945, 357, 358, 18747, 2599, 21628, 945, 286, 534, 5444, 430, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 20680, 357, 358, 18747, 11, 20512, 2599, 9335, 7177, 286, 534, 5444, 430, 628, 220, 220, 220, 220, 220, 220, 220, 383, 15268, 286, 477, 5860, 389, 3446, 262, 976, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 8913, 352, 25, 45941, 13, 7857, 7, 69, 14933, 47505, 37659, 13, 7857, 7, 21287, 26801, 47505, 16, 11, 1502, 28, 14202, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5882, 6649, 270, 393, 1502, 28, 45, 357, 272, 493, 1271, 8, 329, 412, 29232, 293, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5882, 6649, 270, 14, 29762, 1502, 329, 257, 2060, 11414, 2393, 11, 484, 389, 352, 35, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26515, 351, 262, 2546, 4961, 284, 399, 16684, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 8913, 362, 25, 45941, 13, 7857, 7, 69, 14933, 47505, 37659, 13, 7857, 7, 21287, 26801, 8, 29, 16, 11, 1502, 28, 14202, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5882, 6649, 270, 393, 1502, 28, 45, 357, 272, 493, 1271, 8, 329, 412, 29232, 293, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5882, 6649, 270, 14, 29762, 1502, 329, 257, 1351, 286, 11414, 3696, 11, 362, 35, 7177, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 15268, 389, 399, 16684, 416, 399, 11201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 8913, 513, 25, 45941, 13, 7857, 7, 69, 14933, 47505, 37659, 13, 7857, 7, 21287, 26801, 47505, 16, 11, 1502, 28, 14202, 1439, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 29232, 293, 6266, 329, 257, 2060, 11414, 2393, 11, 362, 35, 7177, 11, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15268, 389, 399, 16684, 416, 399, 6361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 8913, 604, 25, 45941, 13, 7857, 7, 69, 14933, 47505, 37659, 13, 7857, 7, 21287, 26801, 8, 29, 16, 11, 1502, 28, 14202, 1439, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 29232, 293, 6266, 329, 257, 1351, 286, 11414, 3696, 11, 513, 35, 7177, 11, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 427, 499, 411, 389, 399, 16684, 416, 399, 6361, 416, 399, 11201, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, 1303, 1100, 287, 262, 717, 11414, 2393, 198, 220, 220, 220, 611, 318, 39098, 7, 69, 14933, 11, 357, 4868, 11, 45941, 13, 358, 18747, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 497, 42372, 796, 45941, 13, 7857, 7, 69, 14933, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 15, 796, 277, 14933, 58, 15, 60, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 69, 14933, 11, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 497, 42372, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 15, 796, 277, 14933, 628, 220, 220, 220, 289, 67, 377, 396, 796, 11414, 13, 9654, 7, 69, 3672, 15, 8, 198, 220, 220, 220, 13639, 796, 289, 67, 377, 396, 58, 15, 4083, 25677, 198, 220, 220, 220, 45941, 844, 796, 13639, 17816, 22182, 10426, 20520, 198, 220, 220, 220, 279, 4464, 4470, 796, 13639, 17816, 47, 48232, 3698, 8881, 20520, 628, 220, 220, 220, 1303, 651, 262, 1502, 14, 6649, 270, 1321, 198, 220, 220, 220, 299, 40546, 15, 796, 45941, 13, 7857, 7, 31298, 377, 396, 13219, 16, 198, 220, 220, 220, 4686, 87, 62, 6361, 796, 17635, 198, 220, 220, 220, 329, 21065, 287, 2837, 7, 429, 16740, 15, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 6361, 13, 33295, 7, 600, 7, 31298, 377, 396, 58, 4178, 10, 16, 4083, 3672, 13, 35312, 10786, 12, 11537, 58, 16, 7131, 20, 47715, 4008, 1303, 40724, 4522, 393, 1502, 4522, 628, 198, 220, 220, 220, 611, 279, 4464, 4470, 6624, 366, 36, 29232, 293, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 22492, 45941, 13, 34642, 6338, 3297, 262, 4504, 7177, 543, 318, 407, 644, 314, 765, 10185, 198, 220, 220, 220, 220, 220, 220, 220, 22492, 1502, 62, 35138, 796, 45941, 13, 34642, 7, 312, 87, 62, 6361, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 388, 11, 1502, 62, 35138, 62, 312, 87, 796, 45941, 13, 34642, 7, 312, 87, 62, 6361, 11, 1441, 62, 9630, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1502, 62, 35138, 796, 45941, 13, 18747, 7, 312, 87, 62, 6361, 38381, 37659, 13, 30619, 7, 2875, 62, 35138, 62, 312, 87, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 299, 2875, 796, 45941, 13, 7857, 7, 2875, 62, 35138, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 299, 2875, 796, 352, 628, 220, 220, 220, 1303, 51, 3727, 46, 770, 318, 555, 710, 1591, 3093, 8253, 13, 383, 497, 42372, 28, 16, 1339, 857, 262, 976, 4560, 355, 262, 497, 42372, 1875, 352, 1339, 13, 6524, 11218, 198, 220, 220, 220, 1303, 428, 523, 326, 340, 655, 857, 262, 976, 900, 286, 4560, 1752, 290, 788, 27179, 7916, 262, 7177, 379, 262, 886, 284, 1577, 345, 644, 198, 220, 220, 220, 1303, 345, 765, 13, 3914, 338, 20121, 428, 351, 555, 8002, 6266, 628, 220, 220, 220, 22492, 12320, 1366, 422, 257, 2060, 11414, 2393, 198, 220, 220, 220, 611, 497, 42372, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 41216, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 2875, 318, 6045, 8, 290, 357, 79, 4464, 4470, 6624, 366, 36, 29232, 293, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 796, 45941, 13, 9107, 418, 19510, 37659, 844, 11, 299, 2875, 11, 12413, 79, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 274, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 945, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20680, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 11, 288, 4906, 28, 30388, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 21065, 11, 1312, 585, 287, 27056, 378, 7, 2875, 62, 35138, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 15, 48688, 29001, 12532, 1137, 90, 25, 3023, 67, 92, 4458, 18982, 7, 72, 585, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6769, 62, 72, 585, 11, 28462, 62, 72, 585, 11, 21628, 283, 62, 72, 585, 11, 9335, 62, 72, 585, 796, 3440, 62, 2302, 62, 1462, 62, 18747, 7, 31298, 377, 396, 11, 1070, 62, 312, 11, 409, 62, 8367, 28, 1069, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 62, 8367, 28, 69, 22564, 62, 8367, 11, 299, 27932, 14907, 28, 21533, 2093, 14907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 58, 45299, 4178, 11, 15, 60, 796, 6769, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 274, 58, 45299, 4178, 11, 15, 60, 796, 28462, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 945, 58, 45299, 4178, 11, 15, 60, 796, 21628, 283, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20680, 58, 45299, 4178, 11, 15, 60, 796, 9335, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 4464, 4470, 6624, 366, 36, 29232, 293, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 15, 48688, 29001, 12532, 1137, 90, 25, 3023, 67, 92, 4458, 18982, 7, 2875, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 11, 28462, 274, 11, 21628, 945, 11, 20680, 796, 3440, 62, 2302, 62, 1462, 62, 18747, 7, 31298, 377, 396, 11, 1070, 62, 312, 11, 409, 62, 8367, 28, 1069, 62, 8367, 11, 28462, 62, 8367, 28, 69, 22564, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 27932, 14907, 28, 21533, 2093, 14907, 8, 628, 220, 220, 220, 22492, 12320, 1366, 422, 257, 1351, 286, 11414, 3696, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 41216, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 2875, 318, 6045, 8, 290, 357, 79, 4464, 4470, 6624, 366, 36, 29232, 293, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3650, 477, 6266, 656, 530, 2060, 7177, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 796, 45941, 13, 9107, 418, 19510, 37659, 844, 11, 299, 2875, 11, 497, 42372, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3650, 257, 2176, 1502, 393, 890, 6649, 270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 796, 45941, 13, 9107, 418, 19510, 37659, 844, 11, 497, 42372, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 274, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 8, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 945, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20680, 796, 45941, 13, 9107, 418, 62, 2339, 7, 32569, 11, 67, 4906, 28, 30388, 8, 628, 220, 220, 220, 220, 220, 220, 220, 329, 37941, 42372, 287, 2837, 7, 12413, 79, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 289, 67, 377, 396, 62, 494, 42372, 796, 11414, 13, 9654, 7, 69, 14933, 58, 494, 42372, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1675, 5211, 25, 383, 1708, 636, 460, 307, 4615, 611, 477, 1366, 389, 5322, 1262, 262, 443, 265, 395, 11523, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 4464, 4470, 6624, 366, 36, 29232, 293, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 40546, 796, 45941, 13, 7857, 7, 31298, 377, 396, 62, 494, 42372, 8, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 6361, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 21065, 287, 2837, 7, 429, 16740, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 62, 6361, 13, 33295, 7, 600, 7, 31298, 377, 396, 62, 494, 42372, 58, 4178, 1343, 352, 4083, 3672, 13, 35312, 10786, 12, 11537, 58, 16, 7131, 20, 47715, 4008, 220, 1303, 40724, 4522, 393, 1502, 4522, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 388, 11, 1502, 62, 35138, 62, 312, 87, 796, 45941, 13, 34642, 7, 312, 87, 62, 6361, 11, 1441, 62, 9630, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1502, 62, 35138, 796, 45941, 13, 18747, 7, 312, 87, 62, 6361, 38381, 37659, 13, 30619, 7, 2875, 62, 35138, 62, 312, 87, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1675, 5211, 25, 383, 2029, 636, 460, 307, 4615, 611, 477, 1366, 389, 5322, 1262, 262, 443, 265, 395, 11523, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 2875, 318, 6045, 8, 290, 357, 79, 4464, 4470, 6624, 366, 36, 29232, 293, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 21065, 11, 1312, 585, 287, 27056, 378, 7, 2875, 62, 35138, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 494, 42372, 48688, 29001, 12532, 1137, 90, 25, 3023, 67, 92, 4458, 18982, 7, 72, 585, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6769, 62, 72, 585, 11, 28462, 62, 72, 585, 11, 21628, 283, 62, 72, 585, 11, 9335, 62, 72, 585, 796, 3440, 62, 2302, 62, 1462, 62, 18747, 7, 31298, 377, 396, 62, 494, 42372, 11, 1070, 62, 312, 11, 409, 62, 8367, 28, 1069, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 27932, 14907, 796, 299, 27932, 14907, 11, 28462, 62, 8367, 28, 69, 22564, 62, 8367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 58, 45299, 4178, 11, 494, 42372, 60, 796, 6769, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 274, 58, 45299, 4178, 11, 494, 42372, 60, 796, 28462, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 945, 58, 45299, 4178, 11, 494, 42372, 60, 796, 21628, 283, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20680, 58, 45299, 4178, 11, 494, 42372, 60, 796, 9335, 62, 72, 585, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 4464, 4470, 6624, 366, 36, 29232, 293, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 494, 42372, 48688, 29001, 12532, 1137, 90, 25, 3023, 67, 92, 4458, 18982, 7, 2875, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 62, 312, 796, 308, 67, 26801, 58, 494, 42372, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6769, 11, 28462, 11, 21628, 283, 11, 9335, 796, 3440, 62, 2302, 62, 1462, 62, 18747, 7, 31298, 377, 396, 62, 494, 42372, 11, 1070, 62, 312, 11, 409, 62, 8367, 28, 1069, 62, 8367, 11, 28462, 62, 8367, 28, 69, 22564, 62, 8367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 27932, 14907, 28, 21533, 2093, 14907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9813, 58, 45299, 37941, 42372, 60, 796, 6769, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28462, 274, 58, 45299, 37941, 42372, 60, 796, 28462, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21628, 945, 58, 45299, 37941, 42372, 60, 796, 21628, 283, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20680, 58, 45299, 37941, 42372, 60, 796, 9335, 628, 220, 220, 220, 1441, 9813, 11, 28462, 274, 11, 21628, 945, 11, 20680, 11, 13639, 198, 198, 4299, 3440, 62, 16684, 62, 2875, 7, 69, 3672, 11, 77, 2875, 11, 26181, 312, 28, 14202, 11, 1502, 28, 14202, 11, 7925, 11639, 3185, 51, 3256, 28462, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12320, 2060, 1502, 10958, 422, 257, 350, 2981, 1026, 352, 35, 1020, 310, 6582, 11414, 2393, 13, 198, 220, 220, 220, 340, 481, 307, 1444, 416, 304, 354, 62, 2220, 62, 16684, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 357, 2536, 8, 1058, 383, 2393, 1438, 286, 534, 1020, 16, 67, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 312, 357, 2536, 8, 1058, 383, 4686, 286, 262, 2134, 345, 765, 284, 3440, 13, 357, 12286, 318, 262, 717, 2134, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1502, 357, 600, 8, 1058, 543, 1502, 345, 765, 284, 3440, 357, 12286, 318, 6045, 11, 11046, 477, 6266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7925, 357, 2536, 8, 1058, 705, 3185, 51, 6, 393, 705, 39758, 6, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 357, 30388, 8, 1058, 4277, 318, 6407, 11, 11046, 28462, 276, 5444, 430, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 49738, 6582, 16, 35, 25, 10958, 62, 448, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 26181, 312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 312, 796, 657, 198, 220, 220, 220, 611, 1502, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 5492, 11986, 543, 1502, 345, 765, 284, 3440, 11537, 628, 220, 220, 220, 1303, 1100, 7552, 1438, 656, 257, 1351, 198, 220, 220, 220, 4165, 62, 25677, 796, 11414, 13, 1136, 25677, 7, 69, 3672, 11, 657, 8, 198, 220, 220, 220, 299, 16684, 796, 4165, 62, 25677, 17816, 45, 48451, 20520, 198, 220, 220, 220, 1070, 14933, 796, 685, 39754, 62, 25677, 17816, 13918, 18005, 6, 11907, 1635, 299, 16684, 198, 220, 220, 220, 329, 479, 74, 287, 2837, 7, 77, 16684, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1070, 14933, 58, 28747, 60, 796, 4165, 62, 25677, 17816, 13918, 6, 1343, 705, 90, 15, 25, 3023, 92, 4458, 18982, 7, 28747, 1343, 352, 15437, 628, 220, 220, 220, 1303, 11291, 503, 543, 7552, 318, 262, 2672, 1366, 198, 220, 220, 220, 1070, 14933, 62, 18747, 796, 45941, 13, 3447, 1758, 7, 37659, 13, 18747, 7, 2302, 14933, 828, 7, 77, 2875, 11, 600, 7, 77, 16684, 14, 77, 2875, 22305, 198, 220, 220, 220, 1070, 14933, 62, 11274, 796, 1070, 14933, 62, 18747, 58, 45299, 600, 7, 26801, 312, 58, 18, 25, 12962, 12, 16, 60, 198, 220, 220, 220, 1070, 3672, 796, 1070, 14933, 62, 11274, 58, 2875, 60, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1070, 268, 796, 1070, 14933, 13, 9630, 7, 2302, 3672, 8, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 10951, 7203, 19031, 7552, 46110, 82, 92, 286, 10958, 46110, 82, 92, 1911, 18982, 7, 2302, 3672, 11, 277, 3672, 4008, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 7203, 49738, 6582, 46110, 82, 92, 857, 407, 3994, 46110, 82, 92, 7552, 1911, 18982, 7, 69, 3672, 11, 1070, 3672, 4008, 628, 220, 220, 220, 10958, 796, 3440, 62, 16, 67, 16684, 7, 69, 3672, 11, 1070, 268, 28, 2302, 268, 11, 7925, 28, 2302, 974, 11, 28462, 28, 69, 22564, 8, 198, 220, 220, 220, 1303, 15945, 257, 1643, 1377, 15138, 351, 399, 1565, 11, 1167, 11, 290, 1635, 548, 9, 1588, 3815, 326, 481, 7074, 198, 220, 220, 220, 1303, 220, 220, 262, 12462, 966, 15440, 286, 12178, 2624, 329, 1401, 543, 318, 43237, 1174, 17, 357, 72, 13, 68, 13, 352, 68, 2548, 8, 198, 220, 220, 220, 2089, 62, 69, 22564, 796, 45941, 13, 1092, 26933, 37659, 13, 271, 12647, 7, 4443, 6582, 13, 69, 22564, 828, 45941, 13, 271, 10745, 7, 4443, 6582, 13, 69, 22564, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 8937, 7, 4443, 6582, 13, 69, 22564, 8, 1875, 352, 68, 1270, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10958, 13, 82, 328, 12429, 362, 1875, 352, 68, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16589, 16488, 28, 15, 8, 198, 220, 220, 220, 1303, 8975, 412, 29232, 293, 5444, 430, 423, 6632, 28400, 198, 220, 220, 220, 2089, 62, 19204, 796, 10958, 13, 10247, 26623, 1279, 8576, 13, 15, 9, 41667, 13, 3838, 198, 220, 220, 220, 2089, 62, 439, 796, 2089, 62, 69, 22564, 1343, 2089, 62, 19204, 198, 220, 220, 220, 22492, 15797, 2089, 636, 198, 220, 220, 220, 6769, 62, 448, 11, 69, 22564, 62, 448, 11, 82, 328, 62, 448, 796, 10958, 13, 10247, 26623, 58, 93, 14774, 62, 439, 4357, 4443, 6582, 13, 69, 22564, 58, 93, 14774, 62, 439, 4357, 4443, 6582, 13, 82, 328, 58, 93, 14774, 62, 439, 60, 198, 220, 220, 220, 10958, 62, 448, 796, 1395, 49738, 6582, 16, 35, 13, 6738, 62, 83, 29291, 19510, 19204, 62, 448, 11, 69, 22564, 62, 448, 11, 82, 328, 62, 448, 828, 15942, 577, 28, 25101, 8, 198, 220, 220, 220, 1303, 361, 45941, 13, 16345, 7, 14774, 62, 69, 22564, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 13845, 14542, 13, 40539, 7203, 1858, 389, 617, 2089, 28462, 3815, 287, 428, 10958, 13, 220, 2561, 6632, 606, 503, 290, 9335, 606, 357, 1662, 7306, 8, 4943, 198, 220, 220, 220, 1303, 220, 220, 220, 10958, 13, 7890, 17816, 69, 22564, 6, 7131, 4443, 6582, 13, 19738, 7131, 14774, 62, 69, 22564, 60, 796, 657, 13, 198, 220, 220, 220, 1303, 220, 220, 220, 10958, 13, 7890, 17816, 82, 328, 6, 7131, 4443, 6582, 13, 19738, 7131, 14774, 62, 69, 22564, 60, 796, 657, 13, 628, 220, 220, 220, 1441, 10958, 62, 448, 198, 198, 4299, 304, 354, 62, 2220, 62, 16684, 7, 16624, 11, 26801, 312, 28, 14202, 11, 2875, 28, 14202, 11, 2302, 974, 11639, 3185, 51, 3256, 69, 22564, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12320, 412, 29232, 293, 5444, 430, 422, 257, 1351, 286, 350, 2981, 1026, 352, 35, 10958, 11414, 3696, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3696, 357, 2536, 8, 1058, 383, 1351, 286, 2393, 3891, 286, 534, 1020, 16, 67, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 312, 357, 2536, 8, 1058, 383, 4686, 357, 505, 583, 11414, 2393, 8, 286, 262, 2134, 345, 765, 284, 3440, 13, 357, 12286, 318, 262, 717, 2134, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1502, 357, 600, 8, 1058, 543, 1502, 345, 765, 284, 3440, 357, 12286, 318, 6045, 11, 11046, 477, 6266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7925, 357, 2536, 8, 1058, 705, 3185, 51, 6, 393, 705, 39758, 6, 198, 220, 220, 220, 220, 220, 220, 220, 28462, 357, 30388, 8, 1058, 4277, 318, 6407, 11, 11046, 28462, 276, 5444, 430, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 49738, 6582, 16, 35, 25, 10958, 62, 448, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 299, 16624, 796, 18896, 7, 16624, 8, 198, 220, 220, 220, 611, 26181, 312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 312, 796, 37250, 9864, 41, 2388, 20520, 1635, 299, 16624, 198, 220, 220, 220, 1288, 361, 18896, 7, 26801, 312, 8, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 312, 796, 26181, 312, 1635, 299, 16624, 198, 220, 220, 220, 1288, 361, 18896, 7, 26801, 312, 8, 14512, 299, 16624, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 464, 4129, 286, 26181, 312, 815, 307, 2035, 352, 393, 4961, 284, 262, 1271, 286, 5444, 430, 3696, 2637, 8, 628, 220, 220, 220, 277, 3672, 796, 3696, 58, 15, 60, 198, 220, 220, 220, 1070, 62, 11085, 796, 11414, 13, 1136, 25677, 7, 69, 3672, 11, 352, 8, 198, 220, 220, 220, 1070, 62, 20311, 796, 11414, 13, 1136, 25677, 7, 69, 3672, 11, 532, 16, 8, 198, 220, 220, 220, 299, 2875, 796, 2352, 7, 2302, 62, 20311, 17816, 25994, 12532, 1137, 20520, 532, 1070, 62, 11085, 17816, 25994, 12532, 1137, 6, 12962, 1343, 352, 198, 220, 220, 220, 13845, 14542, 13, 10951, 10786, 4443, 6582, 46110, 82, 92, 468, 46110, 67, 92, 6266, 4458, 18982, 7, 69, 3672, 11, 299, 2875, 4008, 198, 220, 220, 220, 611, 299, 2875, 19841, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 464, 1271, 286, 6266, 423, 284, 307, 3744, 621, 530, 329, 304, 29232, 293, 13, 5882, 6649, 270, 1366, 8348, 8, 628, 220, 220, 220, 1303, 8778, 5444, 430, 198, 220, 220, 220, 5444, 430, 62, 4868, 796, 17635, 198, 220, 220, 220, 329, 21065, 11, 277, 3672, 287, 27056, 378, 7, 16624, 2599, 628, 220, 220, 220, 220, 220, 220, 220, 611, 1502, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 10951, 10786, 19031, 477, 6266, 656, 257, 308, 2913, 5444, 430, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 585, 287, 2837, 7, 77, 2875, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10958, 796, 3440, 62, 16684, 62, 2875, 7, 69, 3672, 11, 299, 2875, 11, 26181, 312, 28, 26801, 312, 58, 4178, 4357, 2875, 28, 72, 585, 11, 2302, 974, 28, 2302, 974, 11, 69, 22564, 28, 69, 22564, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2034, 437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5444, 430, 62, 4868, 13, 33295, 7, 4443, 6582, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 1502, 18189, 299, 2875, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 18224, 10786, 2875, 1271, 2314, 3744, 621, 262, 2472, 1271, 286, 6266, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10958, 796, 3440, 62, 16684, 62, 2875, 7, 69, 3672, 11, 77, 2875, 11, 26181, 312, 28, 26801, 312, 58, 4178, 4357, 1502, 28, 2875, 11, 7925, 28, 2302, 974, 11, 28462, 28, 69, 22564, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2034, 437, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5444, 430, 62, 4868, 13, 33295, 7, 4443, 6582, 8, 198, 220, 220, 220, 1303, 15251, 656, 530, 1395, 49738, 6582, 16, 35, 2134, 198, 220, 220, 220, 5444, 430, 796, 2927, 378, 7, 4443, 430, 62, 4868, 8, 198, 220, 220, 220, 1303, 8229, 198, 220, 220, 220, 1441, 5444, 430, 198, 198, 4299, 3440, 62, 82, 641, 62, 11600, 7, 34345, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8778, 257, 1336, 357, 439, 40724, 8, 266, 85, 62, 9948, 571, 8633, 628, 220, 220, 220, 29581, 23202, 262, 19449, 8341, 286, 1948, 3709, 656, 299, 67, 18747, 628, 220, 220, 220, 376, 2171, 2116, 13, 86, 85, 62, 9948, 571, 290, 2116, 13, 1845, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 357, 2536, 2599, 5599, 2393, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8633, 393, 6045, 25, 2116, 13, 86, 85, 62, 9948, 571, 628, 220, 220, 220, 37227, 628, 198, 220, 220, 220, 1303, 8314, 262, 4958, 2393, 2152, 30, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 4468, 576, 7, 34345, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 40539, 7203, 2949, 3054, 20786, 2393, 1043, 351, 29472, 46110, 82, 92, 1911, 18982, 7, 34345, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13845, 14542, 13, 10951, 7203, 19031, 3054, 20786, 422, 2393, 46110, 82, 92, 1911, 18982, 7, 34345, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3054, 62, 11600, 796, 9493, 316, 10141, 13, 26791, 13, 2220, 17752, 7, 34345, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3311, 459, 257, 1178, 3709, 355, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 287, 3054, 62, 11600, 13, 13083, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 493, 7, 2539, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 256, 2539, 287, 3054, 62, 11600, 58, 2539, 4083, 13083, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 82, 641, 62, 11600, 58, 2539, 7131, 83, 2539, 4357, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3054, 62, 11600, 58, 2539, 7131, 83, 2539, 60, 796, 45941, 13, 18747, 7, 82, 641, 62, 11600, 58, 2539, 7131, 83, 2539, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 3054, 62, 11600, 628, 628, 198, 4299, 3440, 62, 16680, 494, 742, 62, 21013, 7, 34345, 11, 1070, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8778, 1366, 290, 4165, 13639, 422, 257, 5021, 12, 2302, 3004, 376, 29722, 2393, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 357, 25, 26801, 25, 63, 2536, 63, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6530, 286, 262, 2393, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1070, 357, 25, 26801, 25, 63, 2536, 47671, 1058, 26801, 25, 63, 600, 47671, 1058, 26801, 25, 63, 4868, 63, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1881, 393, 517, 2393, 18366, 351, 1366, 284, 1441, 13, 220, 383, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7552, 460, 307, 11032, 416, 663, 657, 12, 9630, 276, 18253, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1271, 393, 663, 1438, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 46545, 25, 16409, 262, 2939, 1366, 422, 1123, 2810, 7552, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 1441, 62, 25677, 318, 2081, 11, 262, 4165, 13639, 318, 635, 198, 220, 220, 220, 220, 220, 220, 220, 4504, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 18980, 262, 5128, 290, 900, 262, 46545, 329, 281, 6565, 1441, 198, 220, 220, 220, 4808, 2302, 796, 1070, 611, 318, 39098, 7, 2302, 11, 1351, 8, 2073, 685, 2302, 60, 198, 220, 220, 220, 299, 62, 2302, 796, 18896, 28264, 2302, 8, 198, 220, 220, 220, 1303, 4946, 262, 2393, 198, 220, 220, 220, 289, 646, 796, 11414, 13, 9654, 7, 34345, 8, 198, 220, 220, 220, 1182, 15, 796, 289, 646, 58, 15, 4083, 25677, 198, 220, 220, 220, 1303, 5514, 530, 7552, 198, 220, 220, 220, 611, 299, 62, 2302, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 289, 646, 29795, 2302, 58, 15, 60, 4083, 7890, 13, 459, 2981, 7, 37659, 13, 22468, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1366, 11, 1182, 15, 198, 220, 220, 220, 1303, 20401, 18366, 198, 220, 220, 220, 1366, 796, 46545, 26933, 14202, 611, 289, 646, 58, 74, 4083, 7890, 318, 6045, 2073, 289, 646, 58, 74, 4083, 7890, 13, 459, 2981, 7, 37659, 13, 22468, 8, 329, 479, 287, 4808, 2302, 12962, 198, 220, 220, 220, 1303, 8229, 198, 220, 220, 220, 1441, 1366, 33747, 2256, 15, 35751, 628 ]
2.162529
7,211