content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
s = "a)))KkFmQ*wFz)TixK*||" flag = '' for i in s: flag += chr(ord(i) ^ 25) print flag
[ 82, 796, 366, 64, 22305, 42, 74, 37, 76, 48, 9, 86, 37, 89, 8, 51, 844, 42, 9, 15886, 1, 198, 198, 32109, 796, 10148, 198, 1640, 1312, 287, 264, 25, 198, 220, 220, 220, 6056, 15853, 442, 81, 7, 585, 7, 72, 8, 10563, 1679, 8, 198, 198, 4798, 6056, 198 ]
1.735849
53
# -*- coding: utf-8 -*- """Tests for Signals""" from ELDAmwl.bases.factory import BaseOperation from ELDAmwl.bases.factory import BaseOperationFactory from ELDAmwl.component.registry import Registry from unittest.mock import patch import unittest DB_DATA = [ ('TestA', OperationA), ('TestB', OperationB), ]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 5865, 874, 37811, 198, 6738, 17852, 5631, 76, 40989, 13, 65, 1386, 13, 69, 9548, 1330, 7308, 32180, 198, 6738, 17852, 5631, 76, 40989, 13, 65, 1386, 13, 69, 9548, 1330, 7308, 32180, 22810, 198, 6738, 17852, 5631, 76, 40989, 13, 42895, 13, 2301, 4592, 1330, 33432, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 555, 715, 395, 628, 628, 198, 198, 11012, 62, 26947, 796, 685, 198, 220, 220, 220, 19203, 14402, 32, 3256, 14680, 32, 828, 198, 220, 220, 220, 19203, 14402, 33, 3256, 14680, 33, 828, 198, 60, 628, 198 ]
2.784483
116
#!/usr/bin/env python # example label.py import pygtk pygtk.require('2.0') import gtk if __name__ == "__main__": Labels() main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1672, 6167, 13, 9078, 198, 198, 11748, 12972, 13655, 74, 198, 9078, 13655, 74, 13, 46115, 10786, 17, 13, 15, 11537, 198, 11748, 308, 30488, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3498, 1424, 3419, 198, 220, 220, 220, 1388, 3419, 198 ]
2.258065
62
# for10.py # [์ž…๋ ฅ๋ณ€์ˆ˜ for ์ถ”์ถœ๋ณ€์ˆ˜ in ๋Œ€์ƒ if ์กฐ๊ฑด ] # a ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž a = [ i for i in range(1,11) ] print(a) # b ์— 1 ~ 10 ๊นŒ์ง€ ์ˆซ์ž b = [ i+1 for i in range(10) ] print(b) print(id(a) == id(b))
[ 2, 329, 940, 13, 9078, 198, 198, 2, 685, 168, 252, 227, 167, 254, 98, 167, 111, 222, 168, 230, 246, 329, 23821, 114, 242, 168, 114, 250, 167, 111, 222, 168, 230, 246, 287, 31619, 234, 222, 168, 225, 223, 611, 23821, 94, 108, 166, 109, 112, 2361, 198, 198, 2, 257, 23821, 245, 238, 352, 5299, 838, 220, 166, 117, 234, 168, 100, 222, 23821, 230, 104, 168, 252, 238, 198, 64, 796, 685, 1312, 329, 1312, 287, 2837, 7, 16, 11, 1157, 8, 2361, 198, 4798, 7, 64, 8, 198, 2, 275, 23821, 245, 238, 352, 5299, 838, 220, 166, 117, 234, 168, 100, 222, 23821, 230, 104, 168, 252, 238, 220, 198, 65, 796, 685, 1312, 10, 16, 329, 1312, 287, 2837, 7, 940, 8, 220, 2361, 198, 4798, 7, 65, 8, 198, 198, 4798, 7, 312, 7, 64, 8, 6624, 4686, 7, 65, 4008, 628 ]
1.253333
150
__author__ = 'BorisMirage' # --- coding:utf-8 --- ''' Create by BorisMirage File Name: plot Create Time: 2018-12-02 14:45 ''' from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import TSNE if __name__ == '__main__': pass
[ 834, 9800, 834, 796, 705, 33, 37279, 27453, 496, 6, 198, 2, 11420, 19617, 25, 40477, 12, 23, 11420, 198, 198, 7061, 6, 198, 16447, 416, 25026, 27453, 496, 198, 8979, 6530, 25, 7110, 198, 16447, 3862, 25, 2864, 12, 1065, 12, 2999, 1478, 25, 2231, 198, 7061, 6, 198, 198, 6738, 640, 1330, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 1341, 35720, 13, 805, 361, 727, 1330, 26136, 12161, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208, 198 ]
2.669903
103
import subprocess, os print("Building Rust component...") # "cargo build" the bridge project root_dir = os.path.dirname(os.path.realpath(__file__)) bridge_dir = os.path.join(root_dir, "rust") subprocess.check_output(["cargo", "build", "--release"], cwd=bridge_dir) print("Done!")
[ 11748, 850, 14681, 11, 28686, 198, 198, 4798, 7203, 25954, 17103, 7515, 9313, 8, 198, 198, 2, 366, 66, 9448, 1382, 1, 262, 7696, 1628, 198, 15763, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 9458, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 15763, 62, 15908, 11, 366, 11469, 4943, 198, 7266, 14681, 13, 9122, 62, 22915, 7, 14692, 66, 9448, 1600, 366, 11249, 1600, 366, 438, 20979, 33116, 269, 16993, 28, 9458, 62, 15908, 8, 198, 198, 4798, 7203, 45677, 2474, 8, 198 ]
2.83
100
#!/usr/bin/env python3 # coding: utf-8 """ @author: Ping Qiu [email protected] @last modified by: Ping Qiu @file:__init__.py.py @time:2021/03/05 """ from .filter import filter_cells, filter_genes, filter_coordinates from .normalize import Normalizer, normalize_total, normalize_zscore_disksmooth, quantile_norm from .qc import cal_qc
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 31, 9800, 25, 34263, 1195, 16115, 220, 10662, 72, 929, 278, 16, 31, 5235, 31994, 13, 31522, 198, 31, 12957, 9518, 416, 25, 34263, 1195, 16115, 198, 31, 7753, 25, 834, 15003, 834, 13, 9078, 13, 9078, 198, 31, 2435, 25, 1238, 2481, 14, 3070, 14, 2713, 198, 37811, 198, 6738, 764, 24455, 1330, 8106, 62, 46342, 11, 8106, 62, 5235, 274, 11, 8106, 62, 37652, 17540, 198, 6738, 764, 11265, 1096, 1330, 14435, 7509, 11, 3487, 1096, 62, 23350, 11, 3487, 1096, 62, 89, 26675, 62, 6381, 591, 76, 5226, 11, 5554, 576, 62, 27237, 198, 6738, 764, 80, 66, 1330, 2386, 62, 80, 66, 198 ]
2.661417
127
# Copyright 2021-2022 Huawei Technologies Co., Ltd # # 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. # ============================================================================== """ Test USPS dataset operators """ import os from typing import cast import matplotlib.pyplot as plt import numpy as np import pytest import mindspore.dataset as ds import mindspore.dataset.vision.transforms as vision from mindspore import log as logger DATA_DIR = "../data/dataset/testUSPSDataset" WRONG_DIR = "../data/dataset/testMnistData" def load_usps(path, usage): """ load USPS data """ assert usage in ["train", "test"] if usage == "train": data_path = os.path.realpath(os.path.join(path, "usps")) elif usage == "test": data_path = os.path.realpath(os.path.join(path, "usps.t")) with open(data_path, 'r') as f: raw_data = [line.split() for line in f.readlines()] tmp_list = [[x.split(':')[-1] for x in data[1:]] for data in raw_data] images = np.asarray(tmp_list, dtype=np.float32).reshape((-1, 16, 16, 1)) images = ((cast(np.ndarray, images) + 1) / 2 * 255).astype(dtype=np.uint8) labels = [int(d[0]) - 1 for d in raw_data] return images, labels def visualize_dataset(images, labels): """ Helper function to visualize the dataset samples """ num_samples = len(images) for i in range(num_samples): plt.subplot(1, num_samples, i + 1) plt.imshow(images[i].squeeze(), cmap=plt.cm.gray) plt.title(labels[i]) plt.show() def test_usps_content_check(): """ Validate USPSDataset image readings """ logger.info("Test USPSDataset Op with content check") train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=10, shuffle=False) images, labels = load_usps(DATA_DIR, "train") num_iter = 0 # in this example, each dictionary has keys "image" and "label" for i, data in enumerate(train_data.create_dict_iterator(num_epochs=1, output_numpy=True)): for m in range(16): for n in range(16): assert (data["image"][m, n, 0] != 0 or images[i][m, n, 0] != 255) and \ (data["image"][m, n, 0] != 255 or images[i][m, n, 0] != 0) assert (data["image"][m, n, 0] == images[i][m, n, 0]) or\ (data["image"][m, n, 0] == images[i][m, n, 0] + 1) or\ (data["image"][m, n, 0] + 1 == images[i][m, n, 0]) np.testing.assert_array_equal(data["label"], labels[i]) num_iter += 1 assert num_iter == 3 test_data = ds.USPSDataset(DATA_DIR, "test", num_samples=3, shuffle=False) images, labels = load_usps(DATA_DIR, "test") num_iter = 0 # in this example, each dictionary has keys "image" and "label" for i, data in enumerate(test_data.create_dict_iterator(num_epochs=1, output_numpy=True)): for m in range(16): for n in range(16): if (data["image"][m, n, 0] == 0 and images[i][m, n, 0] == 255) or\ (data["image"][m, n, 0] == 255 and images[i][m, n, 0] == 0): assert False if (data["image"][m, n, 0] != images[i][m, n, 0]) and\ (data["image"][m, n, 0] != images[i][m, n, 0] + 1) and\ (data["image"][m, n, 0] + 1 != images[i][m, n, 0]): assert False np.testing.assert_array_equal(data["label"], labels[i]) num_iter += 1 assert num_iter == 3 def test_usps_basic(): """ Validate USPSDataset """ logger.info("Test USPSDataset Op") # case 1: test loading whole dataset train_data = ds.USPSDataset(DATA_DIR, "train") num_iter = 0 for _ in train_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 3 test_data = ds.USPSDataset(DATA_DIR, "test") num_iter = 0 for _ in test_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 3 # case 2: test num_samples train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=2) num_iter = 0 for _ in train_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 2 # case 3: test repeat train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=2) train_data = train_data.repeat(5) num_iter = 0 for _ in train_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 10 # case 4: test batch with drop_remainder=False train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=3) assert train_data.get_dataset_size() == 3 assert train_data.get_batch_size() == 1 train_data = train_data.batch(batch_size=2) # drop_remainder is default to be False assert train_data.get_batch_size() == 2 assert train_data.get_dataset_size() == 2 num_iter = 0 for _ in train_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 2 # case 5: test batch with drop_remainder=True train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=3) assert train_data.get_dataset_size() == 3 assert train_data.get_batch_size() == 1 train_data = train_data.batch(batch_size=2, drop_remainder=True) # the rest of incomplete batch will be dropped assert train_data.get_dataset_size() == 1 assert train_data.get_batch_size() == 2 num_iter = 0 for _ in train_data.create_dict_iterator(num_epochs=1): num_iter += 1 assert num_iter == 1 def test_usps_exception(): """ Test error cases for USPSDataset """ error_msg_3 = "num_shards is specified and currently requires shard_id as well" with pytest.raises(RuntimeError, match=error_msg_3): ds.USPSDataset(DATA_DIR, "train", num_shards=10) ds.USPSDataset(DATA_DIR, "test", num_shards=10) error_msg_4 = "shard_id is specified but num_shards is not" with pytest.raises(RuntimeError, match=error_msg_4): ds.USPSDataset(DATA_DIR, "train", shard_id=0) ds.USPSDataset(DATA_DIR, "test", shard_id=0) error_msg_5 = "Input shard_id is not within the required interval" with pytest.raises(ValueError, match=error_msg_5): ds.USPSDataset(DATA_DIR, "train", num_shards=5, shard_id=-1) ds.USPSDataset(DATA_DIR, "test", num_shards=5, shard_id=-1) with pytest.raises(ValueError, match=error_msg_5): ds.USPSDataset(DATA_DIR, "train", num_shards=5, shard_id=5) ds.USPSDataset(DATA_DIR, "test", num_shards=5, shard_id=5) with pytest.raises(ValueError, match=error_msg_5): ds.USPSDataset(DATA_DIR, "train", num_shards=2, shard_id=5) ds.USPSDataset(DATA_DIR, "test", num_shards=2, shard_id=5) error_msg_6 = "num_parallel_workers exceeds" with pytest.raises(ValueError, match=error_msg_6): ds.USPSDataset(DATA_DIR, "train", shuffle=False, num_parallel_workers=0) ds.USPSDataset(DATA_DIR, "test", shuffle=False, num_parallel_workers=0) with pytest.raises(ValueError, match=error_msg_6): ds.USPSDataset(DATA_DIR, "train", shuffle=False, num_parallel_workers=256) ds.USPSDataset(DATA_DIR, "test", shuffle=False, num_parallel_workers=256) with pytest.raises(ValueError, match=error_msg_6): ds.USPSDataset(DATA_DIR, "train", shuffle=False, num_parallel_workers=-2) ds.USPSDataset(DATA_DIR, "test", shuffle=False, num_parallel_workers=-2) error_msg_7 = "Argument shard_id" with pytest.raises(TypeError, match=error_msg_7): ds.USPSDataset(DATA_DIR, "train", num_shards=2, shard_id="0") ds.USPSDataset(DATA_DIR, "test", num_shards=2, shard_id="0") error_msg_8 = "invalid input shape" with pytest.raises(RuntimeError, match=error_msg_8): train_data = ds.USPSDataset(DATA_DIR, "train") train_data = train_data.map(operations=vision.Decode(), input_columns=["image"], num_parallel_workers=1) for _ in train_data.__iter__(): pass test_data = ds.USPSDataset(DATA_DIR, "test") test_data = test_data.map(operations=vision.Decode(), input_columns=["image"], num_parallel_workers=1) for _ in test_data.__iter__(): pass error_msg_9 = "usps does not exist or is a directory" with pytest.raises(RuntimeError, match=error_msg_9): train_data = ds.USPSDataset(WRONG_DIR, "train") for _ in train_data.__iter__(): pass error_msg_10 = "usps.t does not exist or is a directory" with pytest.raises(RuntimeError, match=error_msg_10): test_data = ds.USPSDataset(WRONG_DIR, "test") for _ in test_data.__iter__(): pass def test_usps_visualize(plot=False): """ Visualize USPSDataset results """ logger.info("Test USPSDataset visualization") train_data = ds.USPSDataset(DATA_DIR, "train", num_samples=3, shuffle=False) num_iter = 0 image_list, label_list = [], [] for item in train_data.create_dict_iterator(num_epochs=1, output_numpy=True): image = item["image"] label = item["label"] image_list.append(image) label_list.append("label {}".format(label)) assert isinstance(image, np.ndarray) assert image.shape == (16, 16, 1) assert image.dtype == np.uint8 assert label.dtype == np.uint32 num_iter += 1 assert num_iter == 3 if plot: visualize_dataset(image_list, label_list) test_data = ds.USPSDataset(DATA_DIR, "test", num_samples=3, shuffle=False) num_iter = 0 image_list, label_list = [], [] for item in test_data.create_dict_iterator(num_epochs=1, output_numpy=True): image = item["image"] label = item["label"] image_list.append(image) label_list.append("label {}".format(label)) assert isinstance(image, np.ndarray) assert image.shape == (16, 16, 1) assert image.dtype == np.uint8 assert label.dtype == np.uint32 num_iter += 1 assert num_iter == 3 if plot: visualize_dataset(image_list, label_list) def test_usps_usage(): """ Validate USPSDataset image readings """ logger.info("Test USPSDataset usage flag") assert test_config("train") == 3 assert test_config("test") == 3 assert "usage is not within the valid set of ['train', 'test', 'all']" in test_config("invalid") assert "Argument usage with value ['list'] is not of type [<class 'str'>]" in test_config(["list"]) # change this directory to the folder that contains all USPS files all_files_path = None # the following tests on the entire datasets if all_files_path is not None: assert test_config("train", all_files_path) == 3 assert test_config("test", all_files_path) == 3 assert ds.USPSDataset(all_files_path, usage="train").get_dataset_size() == 3 assert ds.USPSDataset(all_files_path, usage="test").get_dataset_size() == 3 if __name__ == '__main__': test_usps_content_check() test_usps_basic() test_usps_exception() test_usps_visualize(plot=True) test_usps_usage()
[ 2, 15069, 33448, 12, 1238, 1828, 43208, 21852, 1766, 1539, 12052, 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, 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, 2, 38093, 25609, 28, 201, 198, 37811, 201, 198, 14402, 44640, 27039, 12879, 201, 198, 37811, 201, 198, 11748, 28686, 201, 198, 6738, 19720, 1330, 3350, 201, 198, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 12972, 9288, 201, 198, 201, 198, 11748, 2000, 2777, 382, 13, 19608, 292, 316, 355, 288, 82, 201, 198, 11748, 2000, 2777, 382, 13, 19608, 292, 316, 13, 10178, 13, 7645, 23914, 355, 5761, 201, 198, 6738, 2000, 2777, 382, 1330, 2604, 355, 49706, 201, 198, 201, 198, 26947, 62, 34720, 796, 366, 40720, 7890, 14, 19608, 292, 316, 14, 9288, 2937, 3705, 27354, 292, 316, 1, 201, 198, 18564, 18494, 62, 34720, 796, 366, 40720, 7890, 14, 19608, 292, 316, 14, 9288, 44, 77, 396, 6601, 1, 201, 198, 201, 198, 201, 198, 4299, 3440, 62, 385, 862, 7, 6978, 11, 8748, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 3440, 44640, 1366, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 6818, 8748, 287, 14631, 27432, 1600, 366, 9288, 8973, 201, 198, 220, 220, 220, 611, 8748, 6624, 366, 27432, 1298, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 6978, 796, 28686, 13, 6978, 13, 5305, 6978, 7, 418, 13, 6978, 13, 22179, 7, 6978, 11, 366, 385, 862, 48774, 201, 198, 220, 220, 220, 1288, 361, 8748, 6624, 366, 9288, 1298, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 6978, 796, 28686, 13, 6978, 13, 5305, 6978, 7, 418, 13, 6978, 13, 22179, 7, 6978, 11, 366, 385, 862, 13, 83, 48774, 201, 198, 201, 198, 220, 220, 220, 351, 1280, 7, 7890, 62, 6978, 11, 705, 81, 11537, 355, 277, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 62, 7890, 796, 685, 1370, 13, 35312, 3419, 329, 1627, 287, 277, 13, 961, 6615, 3419, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 45218, 62, 4868, 796, 16410, 87, 13, 35312, 7, 10354, 11537, 58, 12, 16, 60, 329, 2124, 287, 1366, 58, 16, 25, 11907, 329, 1366, 287, 8246, 62, 7890, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4263, 796, 45941, 13, 292, 18747, 7, 22065, 62, 4868, 11, 288, 4906, 28, 37659, 13, 22468, 2624, 737, 3447, 1758, 19510, 12, 16, 11, 1467, 11, 1467, 11, 352, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4263, 796, 14808, 2701, 7, 37659, 13, 358, 18747, 11, 4263, 8, 1343, 352, 8, 1220, 362, 1635, 14280, 737, 459, 2981, 7, 67, 4906, 28, 37659, 13, 28611, 23, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 14722, 796, 685, 600, 7, 67, 58, 15, 12962, 532, 352, 329, 288, 287, 8246, 62, 7890, 60, 201, 198, 220, 220, 220, 1441, 4263, 11, 14722, 201, 198, 201, 198, 201, 198, 4299, 38350, 62, 19608, 292, 316, 7, 17566, 11, 14722, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 5053, 525, 2163, 284, 38350, 262, 27039, 8405, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 997, 62, 82, 12629, 796, 18896, 7, 17566, 8, 201, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 22510, 62, 82, 12629, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 7266, 29487, 7, 16, 11, 997, 62, 82, 12629, 11, 1312, 1343, 352, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 320, 12860, 7, 17566, 58, 72, 4083, 16485, 1453, 2736, 22784, 269, 8899, 28, 489, 83, 13, 11215, 13, 44605, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 7839, 7, 23912, 1424, 58, 72, 12962, 201, 198, 220, 220, 220, 458, 83, 13, 12860, 3419, 201, 198, 201, 198, 201, 198, 4299, 1332, 62, 385, 862, 62, 11299, 62, 9122, 33529, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 3254, 20540, 44640, 27354, 292, 316, 2939, 24654, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 49706, 13, 10951, 7203, 14402, 44640, 27354, 292, 316, 8670, 351, 2695, 2198, 4943, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 940, 11, 36273, 28, 25101, 8, 201, 198, 220, 220, 220, 4263, 11, 14722, 796, 3440, 62, 385, 862, 7, 26947, 62, 34720, 11, 366, 27432, 4943, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 1303, 287, 428, 1672, 11, 1123, 22155, 468, 8251, 366, 9060, 1, 290, 366, 18242, 1, 201, 198, 220, 220, 220, 329, 1312, 11, 1366, 287, 27056, 378, 7, 27432, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 11, 5072, 62, 77, 32152, 28, 17821, 8, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 285, 287, 2837, 7, 1433, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 299, 287, 2837, 7, 1433, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6818, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 14512, 657, 393, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 14512, 14280, 8, 290, 3467, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 14512, 14280, 393, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 14512, 657, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6818, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 6624, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 12962, 393, 59, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 6624, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 1343, 352, 8, 393, 59, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 1343, 352, 6624, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 33407, 13, 30493, 62, 18747, 62, 40496, 7, 7890, 14692, 18242, 33116, 14722, 58, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 201, 198, 220, 220, 220, 1332, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 82, 12629, 28, 18, 11, 36273, 28, 25101, 8, 201, 198, 220, 220, 220, 4263, 11, 14722, 796, 3440, 62, 385, 862, 7, 26947, 62, 34720, 11, 366, 9288, 4943, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 1303, 287, 428, 1672, 11, 1123, 22155, 468, 8251, 366, 9060, 1, 290, 366, 18242, 1, 201, 198, 220, 220, 220, 329, 1312, 11, 1366, 287, 27056, 378, 7, 9288, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 11, 5072, 62, 77, 32152, 28, 17821, 8, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 285, 287, 2837, 7, 1433, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 299, 287, 2837, 7, 1433, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 6624, 657, 290, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 6624, 14280, 8, 393, 59, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 6624, 14280, 290, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 6624, 657, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6818, 10352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 14512, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 12962, 290, 59, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 14512, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 1343, 352, 8, 290, 59, 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, 357, 7890, 14692, 9060, 1, 7131, 76, 11, 299, 11, 657, 60, 1343, 352, 14512, 4263, 58, 72, 7131, 76, 11, 299, 11, 657, 60, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6818, 10352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 33407, 13, 30493, 62, 18747, 62, 40496, 7, 7890, 14692, 18242, 33116, 14722, 58, 72, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 201, 198, 201, 198, 4299, 1332, 62, 385, 862, 62, 35487, 33529, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 3254, 20540, 44640, 27354, 292, 316, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 49706, 13, 10951, 7203, 14402, 44640, 27354, 292, 316, 8670, 4943, 201, 198, 201, 198, 220, 220, 220, 1303, 1339, 352, 25, 1332, 11046, 2187, 27039, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 4943, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 201, 198, 220, 220, 220, 1332, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 4943, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 1332, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 201, 198, 220, 220, 220, 1303, 1339, 362, 25, 1332, 997, 62, 82, 12629, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 17, 8, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 362, 201, 198, 201, 198, 220, 220, 220, 1303, 1339, 513, 25, 1332, 9585, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 17, 8, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 4512, 62, 7890, 13, 44754, 7, 20, 8, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 838, 201, 198, 201, 198, 220, 220, 220, 1303, 1339, 604, 25, 1332, 15458, 351, 4268, 62, 2787, 391, 1082, 28, 25101, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 18, 8, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 513, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 43501, 62, 7857, 3419, 6624, 352, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 4512, 62, 7890, 13, 43501, 7, 43501, 62, 7857, 28, 17, 8, 220, 1303, 4268, 62, 2787, 391, 1082, 318, 4277, 284, 307, 10352, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 43501, 62, 7857, 3419, 6624, 362, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 362, 201, 198, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 362, 201, 198, 201, 198, 220, 220, 220, 1303, 1339, 642, 25, 1332, 15458, 351, 4268, 62, 2787, 391, 1082, 28, 17821, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 18, 8, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 513, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 43501, 62, 7857, 3419, 6624, 352, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 4512, 62, 7890, 13, 43501, 7, 43501, 62, 7857, 28, 17, 11, 4268, 62, 2787, 391, 1082, 28, 17821, 8, 220, 1303, 262, 1334, 286, 17503, 15458, 481, 307, 5710, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 352, 201, 198, 220, 220, 220, 6818, 4512, 62, 7890, 13, 1136, 62, 43501, 62, 7857, 3419, 6624, 362, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 352, 201, 198, 201, 198, 201, 198, 4299, 1332, 62, 385, 862, 62, 1069, 4516, 33529, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 6208, 4049, 2663, 329, 44640, 27354, 292, 316, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 18, 796, 366, 22510, 62, 1477, 1371, 318, 7368, 290, 3058, 4433, 427, 446, 62, 312, 355, 880, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 41006, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 18, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 1477, 1371, 28, 940, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 1477, 1371, 28, 940, 8, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 19, 796, 366, 1477, 446, 62, 312, 318, 7368, 475, 997, 62, 1477, 1371, 318, 407, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 41006, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 19, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 427, 446, 62, 312, 28, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 427, 446, 62, 312, 28, 15, 8, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 20, 796, 366, 20560, 427, 446, 62, 312, 318, 407, 1626, 262, 2672, 16654, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 20, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 1477, 1371, 28, 20, 11, 427, 446, 62, 312, 10779, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 1477, 1371, 28, 20, 11, 427, 446, 62, 312, 10779, 16, 8, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 20, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 1477, 1371, 28, 20, 11, 427, 446, 62, 312, 28, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 1477, 1371, 28, 20, 11, 427, 446, 62, 312, 28, 20, 8, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 20, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 1477, 1371, 28, 17, 11, 427, 446, 62, 312, 28, 20, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 1477, 1371, 28, 17, 11, 427, 446, 62, 312, 28, 20, 8, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 21, 796, 366, 22510, 62, 1845, 29363, 62, 22896, 21695, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 21, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 28, 15, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 28, 15, 8, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 21, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 28, 11645, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 28, 11645, 8, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11395, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 21, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 10779, 17, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 36273, 28, 25101, 11, 997, 62, 1845, 29363, 62, 22896, 10779, 17, 8, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 22, 796, 366, 28100, 1713, 427, 446, 62, 312, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 6030, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 22, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 1477, 1371, 28, 17, 11, 427, 446, 62, 312, 2625, 15, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 1477, 1371, 28, 17, 11, 427, 446, 62, 312, 2625, 15, 4943, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 23, 796, 366, 259, 12102, 5128, 5485, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 41006, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 23, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 7890, 796, 4512, 62, 7890, 13, 8899, 7, 3575, 602, 28, 10178, 13, 10707, 1098, 22784, 5128, 62, 28665, 82, 28, 14692, 9060, 33116, 997, 62, 1845, 29363, 62, 22896, 28, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 834, 2676, 834, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 7890, 796, 1332, 62, 7890, 13, 8899, 7, 3575, 602, 28, 10178, 13, 10707, 1098, 22784, 5128, 62, 28665, 82, 28, 14692, 9060, 33116, 997, 62, 1845, 29363, 62, 22896, 28, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4808, 287, 1332, 62, 7890, 13, 834, 2676, 834, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 201, 198, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 24, 796, 366, 385, 862, 857, 407, 2152, 393, 318, 257, 8619, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 41006, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 24, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 18564, 18494, 62, 34720, 11, 366, 27432, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4808, 287, 4512, 62, 7890, 13, 834, 2676, 834, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 201, 198, 220, 220, 220, 4049, 62, 19662, 62, 940, 796, 366, 385, 862, 13, 83, 857, 407, 2152, 393, 318, 257, 8619, 1, 201, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 41006, 12331, 11, 2872, 28, 18224, 62, 19662, 62, 940, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1332, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 18564, 18494, 62, 34720, 11, 366, 9288, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 4808, 287, 1332, 62, 7890, 13, 834, 2676, 834, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 201, 198, 201, 198, 201, 198, 4299, 1332, 62, 385, 862, 62, 41464, 1096, 7, 29487, 28, 25101, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 15612, 1096, 44640, 27354, 292, 316, 2482, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 49706, 13, 10951, 7203, 14402, 44640, 27354, 292, 316, 32704, 4943, 201, 198, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 27432, 1600, 997, 62, 82, 12629, 28, 18, 11, 36273, 28, 25101, 8, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 2939, 62, 4868, 11, 6167, 62, 4868, 796, 685, 4357, 17635, 201, 198, 220, 220, 220, 329, 2378, 287, 4512, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 11, 5072, 62, 77, 32152, 28, 17821, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 796, 2378, 14692, 9060, 8973, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 796, 2378, 14692, 18242, 8973, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 62, 4868, 13, 33295, 7, 9060, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 62, 4868, 13, 33295, 7203, 18242, 23884, 1911, 18982, 7, 18242, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 318, 39098, 7, 9060, 11, 45941, 13, 358, 18747, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 2939, 13, 43358, 6624, 357, 1433, 11, 1467, 11, 352, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 2939, 13, 67, 4906, 6624, 45941, 13, 28611, 23, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 6167, 13, 67, 4906, 6624, 45941, 13, 28611, 2624, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 220, 220, 220, 611, 7110, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 38350, 62, 19608, 292, 316, 7, 9060, 62, 4868, 11, 6167, 62, 4868, 8, 201, 198, 201, 198, 220, 220, 220, 1332, 62, 7890, 796, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 26947, 62, 34720, 11, 366, 9288, 1600, 997, 62, 82, 12629, 28, 18, 11, 36273, 28, 25101, 8, 201, 198, 220, 220, 220, 997, 62, 2676, 796, 657, 201, 198, 220, 220, 220, 2939, 62, 4868, 11, 6167, 62, 4868, 796, 685, 4357, 17635, 201, 198, 220, 220, 220, 329, 2378, 287, 1332, 62, 7890, 13, 17953, 62, 11600, 62, 48727, 7, 22510, 62, 538, 5374, 82, 28, 16, 11, 5072, 62, 77, 32152, 28, 17821, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 796, 2378, 14692, 9060, 8973, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 796, 2378, 14692, 18242, 8973, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 62, 4868, 13, 33295, 7, 9060, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 62, 4868, 13, 33295, 7203, 18242, 23884, 1911, 18982, 7, 18242, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 318, 39098, 7, 9060, 11, 45941, 13, 358, 18747, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 2939, 13, 43358, 6624, 357, 1433, 11, 1467, 11, 352, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 2939, 13, 67, 4906, 6624, 45941, 13, 28611, 23, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 6167, 13, 67, 4906, 6624, 45941, 13, 28611, 2624, 201, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 2676, 15853, 352, 201, 198, 220, 220, 220, 6818, 997, 62, 2676, 6624, 513, 201, 198, 220, 220, 220, 611, 7110, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 38350, 62, 19608, 292, 316, 7, 9060, 62, 4868, 11, 6167, 62, 4868, 8, 201, 198, 201, 198, 201, 198, 4299, 1332, 62, 385, 862, 62, 26060, 33529, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 3254, 20540, 44640, 27354, 292, 316, 2939, 24654, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 49706, 13, 10951, 7203, 14402, 44640, 27354, 292, 316, 8748, 6056, 4943, 201, 198, 201, 198, 220, 220, 220, 6818, 1332, 62, 11250, 7203, 27432, 4943, 6624, 513, 201, 198, 220, 220, 220, 6818, 1332, 62, 11250, 7203, 9288, 4943, 6624, 513, 201, 198, 201, 198, 220, 220, 220, 6818, 366, 26060, 318, 407, 1626, 262, 4938, 900, 286, 37250, 27432, 3256, 705, 9288, 3256, 705, 439, 20520, 1, 287, 1332, 62, 11250, 7203, 259, 12102, 4943, 201, 198, 220, 220, 220, 6818, 366, 28100, 1713, 8748, 351, 1988, 37250, 4868, 20520, 318, 407, 286, 2099, 685, 27, 4871, 705, 2536, 44167, 30866, 287, 1332, 62, 11250, 7, 14692, 4868, 8973, 8, 201, 198, 201, 198, 220, 220, 220, 1303, 1487, 428, 8619, 284, 262, 9483, 326, 4909, 477, 44640, 3696, 201, 198, 220, 220, 220, 477, 62, 16624, 62, 6978, 796, 6045, 201, 198, 220, 220, 220, 1303, 262, 1708, 5254, 319, 262, 2104, 40522, 201, 198, 220, 220, 220, 611, 477, 62, 16624, 62, 6978, 318, 407, 6045, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 1332, 62, 11250, 7203, 27432, 1600, 477, 62, 16624, 62, 6978, 8, 6624, 513, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 1332, 62, 11250, 7203, 9288, 1600, 477, 62, 16624, 62, 6978, 8, 6624, 513, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 439, 62, 16624, 62, 6978, 11, 8748, 2625, 27432, 11074, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 513, 201, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 288, 82, 13, 2937, 3705, 27354, 292, 316, 7, 439, 62, 16624, 62, 6978, 11, 8748, 2625, 9288, 11074, 1136, 62, 19608, 292, 316, 62, 7857, 3419, 6624, 513, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1332, 62, 385, 862, 62, 11299, 62, 9122, 3419, 201, 198, 220, 220, 220, 1332, 62, 385, 862, 62, 35487, 3419, 201, 198, 220, 220, 220, 1332, 62, 385, 862, 62, 1069, 4516, 3419, 201, 198, 220, 220, 220, 1332, 62, 385, 862, 62, 41464, 1096, 7, 29487, 28, 17821, 8, 201, 198, 220, 220, 220, 1332, 62, 385, 862, 62, 26060, 3419, 201, 198 ]
2.221229
5,370
import tkinter as tk from pandas import DataFrame import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg data = {'Raman Shift': [-464, -460, -455, -450, -445], 'Intensity1': [745, 752, 746, 740, 750], 'Intensity2': [734, 745, 768, 763, 755] } # ๋ฐ์ดํ„ฐ ์งค๋ผ์˜จ๊ฒƒ ๋ฐ›์•„์˜ค๊ธฐ df = DataFrame(data) # data ๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ ํ”„๋ ˆ์ž„ ๋งŒ๋“ฆ df.set_index('Raman Shift', inplace=True) # ๋งŒ๋“ค์–ด์ง„ ๋ฐ์ดํ„ฐ ํ”„๋ ˆ์ž„ ์ค‘, Raman_Shift ํ•ญ๋ชฉ์„ x ์ถ•์œผ๋กœ ์ง€์ • root= tk.Tk() # tkinter ๋กœ ์ฐฝ ๋„์šฐ๊ธฐ figure = plt.Figure(figsize=(5,4), dpi=100) # ๊ทธ๋ž˜ํ”„ ๋„์šธ ์ฐฝ ์‚ฌ์ด์ฆˆ ax = figure.add_subplot(111) # ๊ทธ๋ž˜ํ”„ plot ๋ฐ x,y์ถ• ๋ฒ”์œ„ ์กฐ์ ˆ (๋ฒ”์œ„ ์ง€์ • ์ƒ๋žตํ•˜๋ฉด auto) ax.set_title('Raman spectrum at selected point') line = FigureCanvasTkAgg(figure, root) # Figure ๊ทธ๋ ค์„œ root์— ํ‘œ์‹œ line.get_tk_widget().pack() # pack ์—์„œ ๊ทธ๋ž˜ํ”„๋ฅผ ์ขŒ์ธก์ •๋ ฌ/์ฑ„์šฐ๊ธฐ ๋“ฑ ์„ค์ • #df.plot(~~~) # df.ํ–‰์ด๋ฆ„ ์œผ๋กœ ํŠน์ • ํ–‰ ์„ ํƒ ๊ฐ€๋Šฅ df.Intensity2.plot(kind='line', ax=ax, color='r', marker='o', fontsize=10) root.mainloop() #์ƒˆ๋กœ๊ณ ์นจ
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, 30488, 9460, 1330, 11291, 6090, 11017, 51, 74, 46384, 198, 198, 7890, 796, 1391, 6, 49, 10546, 15576, 10354, 25915, 44578, 11, 532, 34716, 11, 532, 30505, 11, 532, 17885, 11, 532, 43489, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5317, 6377, 16, 10354, 685, 50150, 11, 767, 4309, 11, 767, 3510, 11, 767, 1821, 11, 19683, 4357, 705, 5317, 6377, 17, 10354, 685, 22, 2682, 11, 767, 2231, 11, 46720, 11, 767, 5066, 11, 767, 2816, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 1303, 31619, 235, 108, 35975, 112, 169, 226, 108, 23821, 100, 97, 167, 251, 120, 168, 246, 101, 166, 110, 225, 31619, 108, 249, 168, 243, 226, 168, 246, 97, 166, 116, 108, 198, 198, 7568, 796, 6060, 19778, 7, 7890, 8, 1303, 1366, 31619, 94, 250, 167, 114, 222, 169, 226, 108, 31619, 235, 108, 35975, 112, 169, 226, 108, 220, 169, 242, 226, 167, 254, 230, 168, 252, 226, 31619, 100, 234, 167, 241, 99, 198, 7568, 13, 2617, 62, 9630, 10786, 49, 10546, 15576, 3256, 287, 5372, 28, 17821, 8, 1303, 31619, 100, 234, 167, 241, 97, 168, 244, 112, 168, 100, 226, 31619, 235, 108, 35975, 112, 169, 226, 108, 220, 169, 242, 226, 167, 254, 230, 168, 252, 226, 23821, 97, 239, 11, 7431, 272, 62, 33377, 220, 47991, 255, 167, 103, 102, 35975, 226, 2124, 23821, 114, 243, 168, 250, 120, 167, 94, 250, 23821, 100, 222, 168, 254, 243, 198, 198, 15763, 28, 256, 74, 13, 51, 74, 3419, 1303, 256, 74, 3849, 31619, 94, 250, 23821, 108, 121, 31619, 251, 226, 168, 248, 108, 166, 116, 108, 198, 198, 26875, 796, 458, 83, 13, 11337, 7, 5647, 7857, 16193, 20, 11, 19, 828, 288, 14415, 28, 3064, 8, 1303, 220, 166, 115, 116, 167, 252, 246, 169, 242, 226, 31619, 251, 226, 168, 248, 116, 23821, 108, 121, 23821, 8955, 35975, 112, 168, 99, 230, 198, 897, 796, 3785, 13, 2860, 62, 7266, 29487, 7, 16243, 8, 1303, 220, 166, 115, 116, 167, 252, 246, 169, 242, 226, 7110, 31619, 108, 237, 2124, 11, 88, 168, 114, 243, 31619, 110, 242, 168, 250, 226, 23821, 94, 108, 168, 254, 230, 357, 167, 110, 242, 168, 250, 226, 23821, 100, 222, 168, 254, 243, 23821, 225, 251, 167, 252, 113, 47991, 246, 167, 102, 112, 8295, 8, 198, 897, 13, 2617, 62, 7839, 10786, 49, 10546, 10958, 379, 6163, 966, 11537, 198, 198, 1370, 796, 11291, 6090, 11017, 51, 74, 46384, 7, 26875, 11, 6808, 8, 1303, 11291, 220, 166, 115, 116, 167, 254, 97, 168, 226, 250, 6808, 168, 245, 238, 220, 169, 239, 250, 168, 233, 250, 220, 198, 1370, 13, 1136, 62, 30488, 62, 42655, 22446, 8002, 3419, 1303, 2353, 23821, 245, 238, 168, 226, 250, 220, 166, 115, 116, 167, 252, 246, 169, 242, 226, 167, 98, 120, 23821, 95, 234, 168, 116, 94, 168, 254, 243, 167, 254, 105, 14, 168, 109, 226, 168, 248, 108, 166, 116, 108, 31619, 241, 109, 23821, 226, 97, 168, 254, 243, 198, 198, 2, 7568, 13, 29487, 7, 4907, 93, 8, 1303, 47764, 13, 169, 244, 231, 35975, 112, 167, 99, 226, 23821, 250, 120, 167, 94, 250, 220, 169, 232, 117, 168, 254, 243, 220, 169, 244, 231, 23821, 226, 254, 169, 225, 251, 220, 166, 108, 222, 167, 232, 98, 198, 7568, 13, 5317, 6377, 17, 13, 29487, 7, 11031, 11639, 1370, 3256, 7877, 28, 897, 11, 3124, 11639, 81, 3256, 18364, 11639, 78, 3256, 10369, 7857, 28, 940, 8, 198, 198, 15763, 13, 12417, 26268, 3419, 1303, 168, 225, 230, 167, 94, 250, 166, 111, 254, 168, 117, 101, 220, 628 ]
1.409509
652
# encoding: utf-8 import json import numpy as np import matplotlib.pyplot as plt import os import queue import _thread import traceback point_name = [ "Nose", "Neck", "RShoulder", "RElbow", "RWrist", "LShoulder", "LElbow", "LWrist", "MidHip", "RHip", "RKnee", "RAnkle", "LHip", "LKnee", "LAnkle", "REye", "LEye", "REar", "LEar", "LBigToe", "LSmallToe", "LHeel", "RBigToe", "RSmallToe", "RHeel", "Background" ] if __name__ == '__main__': while 1: for i in OpenposeJsonParser().stream_update_point_change_data_in_the_dir("G:\openpose\output",sum=True): print(i)
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 4808, 16663, 198, 11748, 12854, 1891, 628, 198, 198, 4122, 62, 3672, 796, 685, 198, 366, 45, 577, 1600, 198, 220, 366, 8199, 694, 1600, 198, 220, 366, 49, 2484, 17601, 1600, 198, 220, 366, 2200, 75, 8176, 1600, 198, 220, 366, 46747, 1585, 1600, 198, 220, 366, 43, 2484, 17601, 1600, 198, 220, 366, 2538, 75, 8176, 1600, 198, 220, 366, 43, 54, 1585, 1600, 198, 220, 366, 22622, 39, 541, 1600, 198, 220, 366, 48587, 541, 1600, 198, 1, 49, 42, 21381, 1600, 198, 1, 49, 2025, 74, 293, 1600, 198, 1, 43, 39, 541, 1600, 198, 1, 43, 42, 21381, 1600, 198, 1, 43, 2025, 74, 293, 1600, 198, 1, 2200, 5948, 1600, 198, 1, 2538, 5948, 1600, 198, 1, 2200, 283, 1600, 198, 1, 2538, 283, 1600, 198, 1, 43, 12804, 2514, 68, 1600, 198, 1, 6561, 76, 439, 2514, 68, 1600, 198, 1, 43, 1544, 417, 1600, 198, 1, 49, 12804, 2514, 68, 1600, 198, 1, 6998, 76, 439, 2514, 68, 1600, 198, 1, 49, 1544, 417, 1600, 198, 1, 21756, 1, 198, 60, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 628, 220, 220, 220, 981, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 220, 4946, 3455, 41, 1559, 46677, 22446, 5532, 62, 19119, 62, 4122, 62, 3803, 62, 7890, 62, 259, 62, 1169, 62, 15908, 7203, 38, 7479, 9654, 3455, 59, 22915, 1600, 16345, 28, 17821, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 72, 8, 628, 628 ]
2.066225
302
# # This script develops the script 'variabledNLsimulation_v1.py' (Yury Eidelman) # # Started at June 28, 2019 # # The three laws to change the strengths 't' of all nonlinear lens are implemented. # From initial value t_i to final value t_f during N stepsthese laws are follows. # 1) Linear: for step number n # t(n) = t_0 + (t_f-t_0)*n/(N-1) for n = 0,1,...,N-1 . # 2) Parabolic: for step number n # t(n) = t_0 + (t_f-t_0)*n^2/(N-1)^2 for n = 0,1,...,N-1 . # 3) Smooth sign-function: for step number n # t(n) = .5*(t_0+t_f) + .5*(t_f-t_0)*tanh(x(n)), where # x(n) = (6*n-3*(N-1))/(N-1) for n=0,1,...,N-1 . # In this approach x(0) = -3., x(N-1) = 3.; so, tanh(3.) = - tanh(-3.) = .9951 # import synergia import os, sys import inspect import math import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib import gridspec import rssynergia from rssynergia.base_diagnostics import lfplot from rssynergia.base_diagnostics import plotbeam from rssynergia.base_diagnostics import pltbunch # # Output attributes of 'generate_lens' method: # # same as output of 'NonlinearInsertion'class and as well: # s_vals (ndArray): coordinates of the center of each nonlinear lens (float ndArray, m); # knll (ndArray): "strength" of each nonlinear lens (float ndArray, m); # cnll (ndArray): aperture parameters for each nonlinear lens (float ndArray, m^1/2). # # Pickle helper is not necessary but is retained for this example # # Definition of class to ramp nonlinear lens # # Args of 'Ramp_actions' method are: # 'type' - type of magnification (1 - relative, 2 - absolute), # 'stepNumber' - current step of magnification, # 'strengthLens' - set of strengthes 't' of central lens of the nonlinear insertion for all steps of # magnification (relative magnification) or set of strengthes 't' of all lenses for # current step (absolute magnification), # 'updateOutputFlag' - flag to output the strength of one of nonlinear lens after it's magnification # for current step, # controlName - name of lens with maximal strength to use in output for checking of process # of magnification. # # # The arguments to __init__ are what the Ramp_actions instance is initialized with: # # Main method 'simulation' # # # End of main method 'simulation' # #======================================================== fileIOTA = ".../ioptics/ioptics/lattices/Iota8-2/lattice_1IO_nll_center.madx" # fileIOTA = ".../ioptics/ioptics/lattices/Iota8-4/lattice_8-4_1IO_nll_forTest.madx" print "\nIOTA Nonlinear lattice: {} \n".format(fileIOTA) lattice = synergia.lattice.MadX_reader().get_lattice("iota", \ "../ioptics/ioptics/lattices/Iota8-2/lattice_1IO_nll_center.madx") # --------- Games ----------------------------- # indices = np.argsort(knllLenses) # print "indices = ",indices # for n in range(nLenses+1): # print n,") name after sorting is ",nameLenses[indices[n]] # for n in range(nLenses+1): # print n,") knll after sorting is ",knllLenses[indices[n]] # for n in range(nLenses+1): # print n,") place after sorting is ",placeLenses[indices[n]] # ----------- End of games -------------------- stepperCrrnt = synergia.simulation.Independent_stepper_elements(lattice,2,3) lattice_simulator_Crrnt = stepperCrrnt.get_lattice_simulator() # To recognize attributes of 'bunchParticles': # printAttributes(lattice_simulator_Crrnt,'lattice_simulator_Crrnt','stepperCrrnt.get_lattice_simulator()') # slicesHelp = lattice_simulator_Crrnt.get_slices() # To recognize attributes of 'slicesHelp': # printAttributes(slicesHelp,'slicesHelp','lattice_simulator_Crrnt.get_slices()') # Bunch: bunch_origin = synergia.optics.generate_matched_bunch_transverse(lattice_simulator_Crrnt, 1e-6, \ 1e-6, 1e-3, 1e-4, 1e9, 1000, seed=1234) # # To compare two methods for drawing of the particles distributions: # loclTitle = "\nThese distributions were constructed using \ 'synergia.optics.generated_matched_bunch_transverse' method" loclTitle += "\nand plotted using two methods - 'pltbunch.plot_bunch' from the code synergia" loclTitle += "\nand 'plotcoordDistr' from this script (to verify method 'plotcoordDistr'):" print loclTitle pltbunch.plot_bunch(bunch_origin) # Distributions X-Y, X-X', Y-Y' using method 'plotcoordDistr': bunchParticles = bunch_origin.get_local_particles() # To recognize attributes of 'bunchParticles': # printAttributes(bunchParticles,'bunchParticles', 'bunch.get_local_particles()') plotcoordDistr(bunchParticles) selection = 'loop' while selection == 'loop': simulation() selection = raw_input("\nTo continue the simulation ('yes' or 'no'):") print'Your selection is ',selection if selection == 'yes': selection = 'loop' # if selection == 'no': # exit(0)
[ 2, 220, 198, 2, 770, 4226, 21126, 262, 4226, 705, 25641, 4510, 32572, 14323, 1741, 62, 85, 16, 13, 9078, 6, 357, 56, 1601, 412, 5943, 805, 8, 198, 2, 198, 2, 220, 220, 220, 31026, 379, 2795, 2579, 11, 13130, 198, 2, 198, 2, 383, 1115, 3657, 284, 1487, 262, 18929, 705, 83, 6, 286, 477, 1729, 29127, 10317, 389, 9177, 13, 198, 2, 3574, 4238, 1988, 256, 62, 72, 284, 2457, 1988, 256, 62, 69, 1141, 399, 2239, 301, 258, 325, 3657, 389, 5679, 13, 198, 2, 352, 8, 44800, 25, 329, 2239, 1271, 299, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 7, 77, 8, 796, 256, 62, 15, 1343, 357, 83, 62, 69, 12, 83, 62, 15, 27493, 77, 29006, 45, 12, 16, 8, 329, 299, 796, 657, 11, 16, 42303, 11, 45, 12, 16, 764, 198, 2, 362, 8, 2547, 29304, 25, 329, 2239, 1271, 299, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 7, 77, 8, 796, 256, 62, 15, 1343, 357, 83, 62, 69, 12, 83, 62, 15, 27493, 77, 61, 17, 29006, 45, 12, 16, 8, 61, 17, 329, 299, 796, 657, 11, 16, 42303, 11, 45, 12, 16, 764, 198, 2, 513, 8, 37002, 1051, 12, 8818, 25, 329, 2239, 1271, 299, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 7, 77, 8, 796, 764, 20, 9, 7, 83, 62, 15, 10, 83, 62, 69, 8, 1343, 764, 20, 9, 7, 83, 62, 69, 12, 83, 62, 15, 27493, 38006, 71, 7, 87, 7, 77, 36911, 810, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 7, 77, 8, 796, 357, 21, 9, 77, 12, 18, 9, 7, 45, 12, 16, 4008, 29006, 45, 12, 16, 8, 329, 299, 28, 15, 11, 16, 42303, 11, 45, 12, 16, 764, 198, 2, 554, 428, 3164, 2124, 7, 15, 8, 796, 532, 18, 1539, 2124, 7, 45, 12, 16, 8, 796, 513, 15089, 523, 11, 25706, 71, 7, 18, 2014, 796, 532, 25706, 71, 32590, 18, 2014, 796, 764, 2079, 4349, 198, 2, 198, 198, 11748, 39209, 544, 198, 11748, 28686, 11, 25064, 198, 11748, 10104, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 6738, 2603, 29487, 8019, 1330, 50000, 43106, 198, 198, 11748, 374, 824, 88, 25649, 544, 220, 198, 6738, 374, 824, 88, 25649, 544, 13, 8692, 62, 47356, 34558, 1330, 300, 69, 29487, 198, 6738, 374, 824, 88, 25649, 544, 13, 8692, 62, 47356, 34558, 1330, 7110, 40045, 198, 6738, 374, 824, 88, 25649, 544, 13, 8692, 62, 47356, 34558, 1330, 458, 83, 65, 3316, 198, 2, 198, 2, 25235, 12608, 286, 705, 8612, 378, 62, 75, 641, 6, 2446, 25, 198, 2, 198, 2, 220, 220, 976, 355, 5072, 286, 705, 15419, 29127, 44402, 295, 6, 4871, 290, 355, 880, 25, 198, 2, 220, 220, 264, 62, 12786, 357, 358, 19182, 2599, 22715, 286, 262, 3641, 286, 1123, 1729, 29127, 10317, 357, 22468, 299, 67, 19182, 11, 285, 1776, 198, 2, 220, 220, 638, 297, 357, 358, 19182, 2599, 220, 220, 366, 41402, 1, 286, 1123, 1729, 29127, 10317, 357, 22468, 299, 67, 19182, 11, 285, 1776, 198, 2, 220, 220, 269, 77, 297, 357, 358, 19182, 2599, 220, 220, 32729, 10007, 329, 1123, 1729, 29127, 10317, 357, 22468, 299, 67, 19182, 11, 285, 61, 16, 14, 17, 737, 198, 2, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 12346, 293, 31904, 318, 407, 3306, 475, 318, 17383, 329, 428, 1672, 198, 2, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 30396, 286, 1398, 284, 10454, 1729, 29127, 10317, 198, 2, 198, 2, 943, 14542, 286, 705, 49, 696, 62, 4658, 6, 2446, 389, 25, 220, 198, 2, 705, 4906, 6, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 2099, 286, 44120, 357, 16, 532, 3585, 11, 362, 532, 4112, 828, 198, 2, 705, 9662, 15057, 6, 220, 220, 220, 220, 220, 220, 532, 1459, 2239, 286, 44120, 11, 198, 2, 705, 41402, 49479, 6, 220, 220, 220, 220, 532, 900, 286, 3472, 83, 956, 705, 83, 6, 286, 4318, 10317, 286, 262, 1729, 29127, 36075, 329, 477, 4831, 286, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44120, 357, 43762, 44120, 8, 393, 900, 286, 3472, 83, 956, 705, 83, 6, 286, 477, 18405, 329, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1459, 2239, 357, 48546, 44120, 828, 198, 2, 705, 19119, 26410, 34227, 6, 532, 6056, 284, 5072, 262, 4202, 286, 530, 286, 1729, 29127, 10317, 706, 340, 338, 44120, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1459, 2239, 11, 198, 2, 1630, 5376, 220, 220, 220, 220, 220, 220, 220, 532, 1438, 286, 10317, 351, 40708, 4202, 284, 779, 287, 5072, 329, 10627, 286, 1429, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 286, 44120, 13, 220, 220, 220, 220, 198, 2, 198, 198, 2, 198, 2, 383, 7159, 284, 11593, 15003, 834, 389, 644, 262, 26882, 62, 4658, 4554, 318, 23224, 351, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 198, 2, 8774, 2446, 705, 14323, 1741, 6, 198, 2, 198, 2, 198, 2, 5268, 286, 1388, 2446, 705, 14323, 1741, 6, 198, 2, 198, 198, 2, 10052, 4770, 2559, 198, 198, 7753, 40, 29009, 796, 27896, 14, 72, 8738, 873, 14, 72, 8738, 873, 14, 75, 1078, 1063, 14, 40, 4265, 23, 12, 17, 14, 75, 1078, 501, 62, 16, 9399, 62, 77, 297, 62, 16159, 13, 9937, 87, 1, 198, 2, 2393, 40, 29009, 796, 27896, 14, 72, 8738, 873, 14, 72, 8738, 873, 14, 75, 1078, 1063, 14, 40, 4265, 23, 12, 19, 14, 75, 1078, 501, 62, 23, 12, 19, 62, 16, 9399, 62, 77, 297, 62, 1640, 14402, 13, 9937, 87, 1, 198, 4798, 37082, 77, 40, 29009, 8504, 29127, 47240, 501, 25, 23884, 3467, 77, 1911, 18982, 7, 7753, 40, 29009, 8, 198, 75, 1078, 501, 796, 39209, 544, 13, 75, 1078, 501, 13, 18454, 55, 62, 46862, 22446, 1136, 62, 75, 1078, 501, 7203, 72, 4265, 1600, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 40720, 72, 8738, 873, 14, 72, 8738, 873, 14, 75, 1078, 1063, 14, 40, 4265, 23, 12, 17, 14, 75, 1078, 501, 62, 16, 9399, 62, 77, 297, 62, 16159, 13, 9937, 87, 4943, 198, 198, 2, 45337, 5776, 34400, 32501, 198, 2, 36525, 796, 45941, 13, 22046, 419, 7, 15418, 297, 43, 4541, 8, 220, 198, 2, 3601, 366, 521, 1063, 796, 33172, 521, 1063, 220, 198, 2, 329, 299, 287, 2837, 7, 77, 43, 4541, 10, 16, 2599, 198, 2, 220, 220, 220, 220, 3601, 299, 553, 8, 1438, 706, 29407, 318, 33172, 3672, 43, 4541, 58, 521, 1063, 58, 77, 11907, 198, 2, 329, 299, 287, 2837, 7, 77, 43, 4541, 10, 16, 2599, 198, 2, 220, 220, 220, 220, 3601, 299, 553, 8, 638, 297, 706, 29407, 318, 33172, 15418, 297, 43, 4541, 58, 521, 1063, 58, 77, 11907, 198, 2, 329, 299, 287, 2837, 7, 77, 43, 4541, 10, 16, 2599, 198, 2, 220, 220, 220, 220, 3601, 299, 553, 8, 1295, 706, 29407, 318, 33172, 5372, 43, 4541, 58, 521, 1063, 58, 77, 11907, 198, 2, 24200, 6329, 5268, 286, 1830, 41436, 198, 198, 4169, 2848, 13916, 81, 429, 796, 39209, 544, 13, 14323, 1741, 13, 40566, 62, 4169, 2848, 62, 68, 3639, 7, 75, 1078, 501, 11, 17, 11, 18, 8, 198, 75, 1078, 501, 62, 14323, 8927, 62, 13916, 81, 429, 796, 2876, 2848, 13916, 81, 429, 13, 1136, 62, 75, 1078, 501, 62, 14323, 8927, 3419, 198, 2, 1675, 7564, 12608, 286, 705, 65, 3316, 7841, 2983, 10354, 198, 2, 3601, 29021, 7, 75, 1078, 501, 62, 14323, 8927, 62, 13916, 81, 429, 4032, 75, 1078, 501, 62, 14323, 8927, 62, 13916, 81, 429, 41707, 4169, 2848, 13916, 81, 429, 13, 1136, 62, 75, 1078, 501, 62, 14323, 8927, 3419, 11537, 198, 2, 24314, 22087, 796, 47240, 501, 62, 14323, 8927, 62, 13916, 81, 429, 13, 1136, 62, 82, 677, 274, 3419, 198, 2, 1675, 7564, 12608, 286, 705, 82, 677, 274, 22087, 10354, 198, 2, 3601, 29021, 7, 82, 677, 274, 22087, 4032, 82, 677, 274, 22087, 41707, 75, 1078, 501, 62, 14323, 8927, 62, 13916, 81, 429, 13, 1136, 62, 82, 677, 274, 3419, 11537, 198, 198, 2, 347, 3316, 25, 198, 65, 3316, 62, 47103, 796, 39209, 544, 13, 8738, 873, 13, 8612, 378, 62, 31409, 62, 65, 3316, 62, 7645, 4399, 7, 75, 1078, 501, 62, 14323, 8927, 62, 13916, 81, 429, 11, 352, 68, 12, 21, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 68, 12, 21, 11, 352, 68, 12, 18, 11, 352, 68, 12, 19, 11, 352, 68, 24, 11, 8576, 11, 9403, 28, 1065, 2682, 8, 198, 2, 198, 2, 1675, 8996, 734, 5050, 329, 8263, 286, 262, 13166, 24570, 25, 198, 2, 198, 17946, 75, 19160, 796, 37082, 77, 4711, 24570, 547, 12006, 1262, 3467, 198, 338, 88, 25649, 544, 13, 8738, 873, 13, 27568, 62, 31409, 62, 65, 3316, 62, 7645, 4399, 6, 2446, 1, 198, 17946, 75, 19160, 15853, 37082, 77, 392, 37515, 1262, 734, 5050, 532, 705, 489, 83, 65, 3316, 13, 29487, 62, 65, 3316, 6, 422, 262, 2438, 39209, 544, 1, 220, 198, 17946, 75, 19160, 15853, 37082, 77, 392, 705, 29487, 37652, 20344, 81, 6, 422, 428, 4226, 357, 1462, 11767, 2446, 705, 29487, 37652, 20344, 81, 6, 2599, 1, 198, 4798, 1179, 75, 19160, 198, 489, 83, 65, 3316, 13, 29487, 62, 65, 3316, 7, 65, 3316, 62, 47103, 8, 220, 220, 220, 220, 220, 198, 2, 46567, 507, 1395, 12, 56, 11, 1395, 12, 55, 3256, 575, 12, 56, 6, 1262, 2446, 705, 29487, 37652, 20344, 81, 10354, 198, 65, 3316, 7841, 2983, 796, 7684, 62, 47103, 13, 1136, 62, 12001, 62, 3911, 2983, 3419, 198, 2, 1675, 7564, 12608, 286, 705, 65, 3316, 7841, 2983, 10354, 198, 2, 220, 220, 220, 220, 3601, 29021, 7, 65, 3316, 7841, 2983, 4032, 65, 3316, 7841, 2983, 3256, 705, 65, 3316, 13, 1136, 62, 12001, 62, 3911, 2983, 3419, 11537, 198, 29487, 37652, 20344, 81, 7, 65, 3316, 7841, 2983, 8, 198, 198, 49283, 796, 705, 26268, 6, 198, 4514, 6356, 6624, 705, 26268, 10354, 198, 220, 220, 220, 18640, 3419, 220, 198, 220, 220, 220, 6356, 796, 8246, 62, 15414, 7203, 59, 77, 2514, 2555, 262, 18640, 19203, 8505, 6, 393, 705, 3919, 6, 2599, 4943, 198, 220, 220, 220, 3601, 6, 7120, 6356, 318, 46083, 49283, 198, 220, 220, 220, 611, 6356, 6624, 705, 8505, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 6356, 796, 705, 26268, 6, 198, 2, 220, 220, 220, 611, 6356, 6624, 705, 3919, 10354, 198, 2, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 15, 8, 628 ]
2.547256
1,968
import time connect("127.0.0.1", "10039", "weblab") #test_me("hello") start_experiment() send_file("script.py", "A script file") response = send_command("Test Command") print "The response is: %s" % response msg_box("Test Message", "test") time.sleep(2) dispose() disconnect()
[ 201, 198, 11748, 640, 201, 198, 201, 198, 8443, 7203, 16799, 13, 15, 13, 15, 13, 16, 1600, 366, 3064, 2670, 1600, 366, 732, 2436, 397, 4943, 201, 198, 201, 198, 2, 9288, 62, 1326, 7203, 31373, 4943, 201, 198, 201, 198, 9688, 62, 23100, 3681, 3419, 201, 198, 201, 198, 21280, 62, 7753, 7203, 12048, 13, 9078, 1600, 366, 32, 4226, 2393, 4943, 201, 198, 201, 198, 26209, 796, 3758, 62, 21812, 7203, 14402, 9455, 4943, 201, 198, 201, 198, 4798, 366, 464, 2882, 318, 25, 4064, 82, 1, 4064, 2882, 220, 201, 198, 201, 198, 19662, 62, 3524, 7203, 14402, 16000, 1600, 366, 9288, 4943, 201, 198, 201, 198, 2435, 13, 42832, 7, 17, 8, 201, 198, 201, 198, 6381, 3455, 3419, 201, 198, 201, 198, 6381, 8443, 3419, 201, 198 ]
2.338346
133
# Copyright 2014 Intel Corporation, 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. from django.core import validators from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import messages from horizon.utils.validators import validate_port_range # from horizon.utils import fields import logging from vsm_dashboard.api import vsm as vsm_api from vsm_dashboard.utils.validators import validate_pool_name LOG = logging.getLogger(__name__)
[ 198, 2, 15069, 1946, 8180, 10501, 11, 1439, 6923, 33876, 13, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 1, 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, 198, 2, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 198, 2, 3788, 9387, 739, 262, 13789, 318, 9387, 319, 281, 198, 2, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 198, 2, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 13789, 329, 262, 198, 2, 2176, 3303, 15030, 21627, 290, 11247, 198, 2, 739, 262, 13789, 13, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 4938, 2024, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 17810, 1330, 13269, 198, 6738, 17810, 1330, 5107, 198, 6738, 17810, 1330, 6218, 198, 6738, 17810, 13, 26791, 13, 12102, 2024, 1330, 26571, 62, 634, 62, 9521, 198, 2, 422, 17810, 13, 26791, 1330, 7032, 198, 11748, 18931, 198, 198, 6738, 3691, 76, 62, 42460, 3526, 13, 15042, 1330, 3691, 76, 355, 3691, 76, 62, 15042, 198, 6738, 3691, 76, 62, 42460, 3526, 13, 26791, 13, 12102, 2024, 1330, 26571, 62, 7742, 62, 3672, 198, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628 ]
3.728522
291
import arrow import requests from arrow import Arrow from bs4 import BeautifulSoup from collections import defaultdict from icalendar import Calendar, Event, vText, vCalAddress from hashlib import md5 import json
[ 11748, 15452, 198, 11748, 7007, 198, 6738, 15452, 1330, 19408, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 220, 605, 9239, 1330, 26506, 11, 8558, 11, 410, 8206, 11, 410, 9771, 20231, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, 11748, 33918, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.683333
60
import os import sys import pyproj from pyproj import Proj Proj(init="epsg:4269") # Test pyproj_datadir. if not os.path.isdir(pyproj.datadir.get_data_dir()): sys.exit(1)
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 12972, 1676, 73, 198, 6738, 12972, 1676, 73, 1330, 1041, 73, 198, 198, 2964, 73, 7, 15003, 2625, 25386, 70, 25, 19, 26276, 4943, 628, 198, 2, 6208, 12972, 1676, 73, 62, 19608, 324, 343, 13, 198, 361, 407, 28686, 13, 6978, 13, 9409, 343, 7, 9078, 1676, 73, 13, 19608, 324, 343, 13, 1136, 62, 7890, 62, 15908, 3419, 2599, 198, 220, 220, 220, 25064, 13, 37023, 7, 16, 8, 198 ]
2.225
80
"""Completers for pip.""" import contextlib import os import subprocess from xonsh.built_ins import XSH from xonsh.completers.tools import RichCompletion, contextual_command_completer from xonsh.parsers.completion_context import CommandContext def generate_completions_from_string(output: str): """Rich completion from multi-line string, each line representing a completion.""" if output: lines = output.strip().splitlines(keepends=False) # if there is a single completion candidate then maybe it is over append_space = len(lines) == 1 for line in lines: comp = create_rich_completion(line, append_space) yield comp @contextual_command_completer def xonsh_complete(ctx: CommandContext): """Completes python's package manager pip.""" if not ctx.completing_command("kitty"): return None # like fish's # commandline --tokenize --cut-at-cursor --current-process tokens = [arg.raw_value for arg in ctx.args[: ctx.arg_index]] # it already filters by prefix, just return it return get_completions(*tokens, ctx.prefix) if __name__ == "__main__": # small testing won't hurt from xonsh.main import setup setup() print(list(get_completions("kitty", "-"))) print(list(get_completions("kitty", "--"))) print(list(get_completions("kitty", "--d")))
[ 37811, 5377, 1154, 1010, 329, 7347, 526, 15931, 198, 11748, 4732, 8019, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 6738, 2124, 684, 71, 13, 18780, 62, 1040, 1330, 1395, 9693, 198, 6738, 2124, 684, 71, 13, 785, 1154, 1010, 13, 31391, 1330, 3998, 5377, 24547, 11, 38356, 62, 21812, 62, 785, 1154, 353, 198, 6738, 2124, 684, 71, 13, 79, 945, 364, 13, 785, 24547, 62, 22866, 1330, 9455, 21947, 628, 198, 198, 4299, 7716, 62, 785, 37069, 507, 62, 6738, 62, 8841, 7, 22915, 25, 965, 2599, 198, 220, 220, 220, 37227, 14868, 11939, 422, 5021, 12, 1370, 4731, 11, 1123, 1627, 10200, 257, 11939, 526, 15931, 198, 220, 220, 220, 611, 5072, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3951, 796, 5072, 13, 36311, 22446, 35312, 6615, 7, 14894, 2412, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 612, 318, 257, 2060, 11939, 4540, 788, 3863, 340, 318, 625, 198, 220, 220, 220, 220, 220, 220, 220, 24443, 62, 13200, 796, 18896, 7, 6615, 8, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1627, 287, 3951, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 552, 796, 2251, 62, 7527, 62, 785, 24547, 7, 1370, 11, 24443, 62, 13200, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7800, 552, 628, 628, 198, 31, 22866, 723, 62, 21812, 62, 785, 1154, 353, 198, 4299, 2124, 684, 71, 62, 20751, 7, 49464, 25, 9455, 21947, 2599, 198, 220, 220, 220, 37227, 5377, 1154, 4879, 21015, 338, 5301, 4706, 7347, 526, 15931, 198, 220, 220, 220, 611, 407, 269, 17602, 13, 785, 47130, 62, 21812, 7203, 74, 9760, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 628, 220, 220, 220, 1303, 588, 5916, 338, 198, 220, 220, 220, 1303, 3141, 1370, 1377, 30001, 1096, 1377, 8968, 12, 265, 12, 66, 21471, 1377, 14421, 12, 14681, 198, 220, 220, 220, 16326, 796, 685, 853, 13, 1831, 62, 8367, 329, 1822, 287, 269, 17602, 13, 22046, 58, 25, 269, 17602, 13, 853, 62, 9630, 11907, 628, 220, 220, 220, 1303, 340, 1541, 16628, 416, 21231, 11, 655, 1441, 340, 198, 220, 220, 220, 1441, 651, 62, 785, 37069, 507, 46491, 83, 482, 641, 11, 269, 17602, 13, 40290, 8, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 1402, 4856, 1839, 470, 5938, 198, 220, 220, 220, 422, 2124, 684, 71, 13, 12417, 1330, 9058, 628, 220, 220, 220, 9058, 3419, 198, 220, 220, 220, 3601, 7, 4868, 7, 1136, 62, 785, 37069, 507, 7203, 74, 9760, 1600, 366, 21215, 22305, 198, 220, 220, 220, 3601, 7, 4868, 7, 1136, 62, 785, 37069, 507, 7203, 74, 9760, 1600, 366, 438, 1, 22305, 198, 220, 220, 220, 3601, 7, 4868, 7, 1136, 62, 785, 37069, 507, 7203, 74, 9760, 1600, 366, 438, 67, 1, 22305, 198 ]
2.769697
495
# -*- coding: utf-8 -*- """ Contains the definition of the ArgParser class. """ import logging from argparse import ArgumentParser, ArgumentError, Namespace import shlex from enhterm.command import Command from enhterm.command.error import ErrorCommand from enhterm.command.noop import NoOpCommand from enhterm.command.text import TextCommand from enhterm.impl.p2p.p2p_provider import RemoteProvider from enhterm.provider import Provider from enhterm.provider.parser import Parser from enhterm.provider.queue_provider import QueueProvider from enhterm.provider.text_provider import TextProvider logger = logging.getLogger('et.argparser') class ArgParseCommand(Command): """ A command returned by our parser. """ def __init__(self, parsed=None, *args, **kwargs): """ Constructor. """ super().__init__(*args, **kwargs) self.parsed = parsed if parsed is not None: self.call_me = parsed.func del parsed.__dict__['func'] if hasattr(parsed, 'command'): # Because we set the dest parameter to 'command' a # command attribute is set, with the value of the # name of the subparser. self.command_name = parsed.command del parsed.__dict__['command'] else: # When a subparser was not set or was set but without # dest argument. self.command_name = None else: self.command_name = None self.call_me = None def __str__(self): """ Represent this object as a human-readable string. """ return 'ArgParseCommand()' def __repr__(self): """ Represent this object as a python constructor. """ return 'ArgParseCommand()' def execute(self): """ Called by the command loop to do some work. The return value will be deposited by the command loop it into the `result` member. """ return self.call_me(command=self, **self.parsed.__dict__) def encode(self): """ Called when a class instance needs to be serialized. .. note: The `result` and `uuid` members should not be serialized in case of :class:`~Command`. """ return self.command_name, self.parsed.__dict__ def decode(self, raw_data): """ Apply raw data to this instance. It is asserted that correct class has already been constructed and that it has `result` and `uuid` members set in case of :class:`~Command`.. Raises: DecodeError: The implementation should raise this class or a subclass of it. Arguments: raw_data (bytes): The data to apply. """ assert len(raw_data) == 2 self.command_name, self.parsed = raw_data self.parsed = Namespace(**self.parsed) @classmethod def class_id(cls): """ A unique identifier of the class. This value is used as a key when a constructor needs to be associated with a string (see :class:`enhterm.ser_deser.dsds.DictSerDeSer`). """ return "argparse" class ParserError(Exception): """ Hops the exceptions back to :meth:`~parse`.""" pass class NoOpError(Exception): """ :meth:`~parse` should return a :class:`~NoOpCommand`.""" pass class ArgParser(ArgumentParser, Parser): """ Parser that uses argparse library to interpret the text. Note the two functions of this class: an `enhterm` parser and :class:`argparse.ArgumentParser`. The usual use of this parser is through subparsers that implement commands. >>> from enhterm.provider.parser.argparser import ArgParser >>> testee = ArgParser() >>> subparsers = testee.add_subparsers( >>> title="commands", dest="command", help="commands") >>> def do_add(command, arguments): >>> return sum(arguments.integers) >>> parser_add = subparsers.add_parser('add') >>> parser_add.add_argument( >>> 'integers', metavar='int', nargs='+', type=int, >>> help='an integer to be summed') >>> parser_add.set_defaults(func=do_add) >>> testee.parse('add -h') >>> result = testee.parse('add 1 2 3') >>> exec_result = result.execute() A simpler variant is: >>> from enhterm.provider.parser.argparser import ArgParser >>> testee = ArgParser() Attributes: """ def __init__(self, *args, **kwargs): """ Constructor. Arguments: """ provider = kwargs.pop('provider', None) super().__init__(*args, **kwargs) assert provider is not None, "The provider must be set and kept " \ "the same for the lifetime of the parser" self.provider = provider self.prog = '' self._subparser_action = None self.prefix = '' self.suffix = '' def add_subparsers(self, **kwargs): """ Monkey-patch add_parser method. Parsers created by the sub-parser have same class as the main parser (in our case the class:`~ArgParser` class). Because we want messages printed by the argparse library to go through our watchers, we want to set the parser so it is available in :meth:`~_print_message`. This is because we don't want to ask the user to place this argument themselves each time they create the parser. """ result = super().add_subparsers(**kwargs) previous_method = result.add_parser result.add_parser = monkey_patch return result def __str__(self): """ Represent this object as a human-readable string. """ return 'ArgParser()' def __repr__(self): """ Represent this object as a python constructor. """ return 'ArgParser()' @property def parse(self, text): """ Convert a text into a command. Arguments: text (str): The text to parse. This should be a full command. Returns: Command The command that resulted from parsing the text. If the parsing was unsuccessful the method may return either :class:`~NoOpCommand' to keep using the provider or `None` to uninstall it. """ try: if text.startswith('wrap-commands') or text.startswith('wcs ') or text == 'wcs': args = self.parse_args(shlex.split(text)) else: args = self.parse_args(shlex.split(f'{self.prefix}{text}{self.suffix}')) return ArgParseCommand(parsed=args) except ParserError as exc: message = str(exc) self.provider.term.error(message) return ErrorCommand(message=message) except NoOpError: return NoOpCommand() def error(self, message): """ The parser has encountered an error while interpreting the input. This method, according to argparse specs, should not return. We raise a custom exception that is caught in :meth:`~parse` and we pass along the error message. """ raise ParserError(message) def exit(self, status=0, message=None): """ Trap any exits left out by other code (help, version). """ raise NoOpError class ArgparseRemoteProvider(RemoteProvider): """ A provider that simply takes the text and creates a text command for it. """ def __init__(self, parser=None, *args, **kwargs): """ Constructor. """ super().__init__(*args, **kwargs) if parser: self.parser = parser parser.provider = self else: self.parser = ArgParser(provider=self) def __str__(self): """ Represent this object as a human-readable string. """ return 'ArgparseRemoteProvider()' def __repr__(self): """ Represent this object as a python constructor. """ return 'ArgparseRemoteProvider()' def enqueue_command(self, command): """ Adds a command to the internal list. """ assert isinstance(command, TextCommand) new_command = self.parser.parse(command.content) new_command.provider = self new_command.uuid = command.uuid self.queue.put(new_command) return new_command
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4264, 1299, 262, 6770, 286, 262, 20559, 46677, 1398, 13, 198, 37811, 198, 11748, 18931, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 45751, 12331, 11, 28531, 10223, 198, 11748, 427, 2588, 198, 198, 6738, 5881, 4354, 13, 21812, 1330, 9455, 198, 6738, 5881, 4354, 13, 21812, 13, 18224, 1330, 13047, 21575, 198, 6738, 5881, 4354, 13, 21812, 13, 3919, 404, 1330, 1400, 18257, 21575, 198, 6738, 5881, 4354, 13, 21812, 13, 5239, 1330, 8255, 21575, 198, 6738, 5881, 4354, 13, 23928, 13, 79, 17, 79, 13, 79, 17, 79, 62, 15234, 1304, 1330, 21520, 29495, 198, 6738, 5881, 4354, 13, 15234, 1304, 1330, 32549, 198, 6738, 5881, 4354, 13, 15234, 1304, 13, 48610, 1330, 23042, 263, 198, 6738, 5881, 4354, 13, 15234, 1304, 13, 36560, 62, 15234, 1304, 1330, 4670, 518, 29495, 198, 6738, 5881, 4354, 13, 15234, 1304, 13, 5239, 62, 15234, 1304, 1330, 8255, 29495, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 316, 13, 853, 48610, 11537, 628, 198, 4871, 20559, 10044, 325, 21575, 7, 21575, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 3141, 4504, 416, 674, 30751, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 44267, 28, 14202, 11, 1635, 22046, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 28407, 273, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 22446, 834, 15003, 834, 46491, 22046, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 945, 276, 796, 44267, 198, 220, 220, 220, 220, 220, 220, 220, 611, 44267, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13345, 62, 1326, 796, 44267, 13, 20786, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 44267, 13, 834, 11600, 834, 17816, 20786, 20520, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 468, 35226, 7, 79, 945, 276, 11, 705, 21812, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4362, 356, 900, 262, 2244, 11507, 284, 705, 21812, 6, 257, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3141, 11688, 318, 900, 11, 351, 262, 1988, 286, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1438, 286, 262, 22718, 28198, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21812, 62, 3672, 796, 44267, 13, 21812, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 44267, 13, 834, 11600, 834, 17816, 21812, 20520, 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, 1303, 1649, 257, 22718, 28198, 373, 407, 900, 393, 373, 900, 475, 1231, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2244, 4578, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21812, 62, 3672, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21812, 62, 3672, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13345, 62, 1326, 796, 6045, 628, 220, 220, 220, 825, 11593, 2536, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 1692, 12, 46155, 4731, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 10044, 325, 21575, 3419, 6, 628, 220, 220, 220, 825, 11593, 260, 1050, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 21015, 23772, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 10044, 325, 21575, 3419, 6, 628, 220, 220, 220, 825, 12260, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 34099, 416, 262, 3141, 9052, 284, 466, 617, 670, 13, 628, 220, 220, 220, 220, 220, 220, 220, 383, 1441, 1988, 481, 307, 27163, 416, 262, 3141, 9052, 340, 656, 198, 220, 220, 220, 220, 220, 220, 220, 262, 4600, 20274, 63, 2888, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 13345, 62, 1326, 7, 21812, 28, 944, 11, 12429, 944, 13, 79, 945, 276, 13, 834, 11600, 834, 8, 628, 220, 220, 220, 825, 37773, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 34099, 618, 257, 1398, 4554, 2476, 284, 307, 11389, 1143, 13, 628, 220, 220, 220, 220, 220, 220, 220, 11485, 3465, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 4600, 20274, 63, 290, 4600, 12303, 312, 63, 1866, 815, 407, 307, 11389, 1143, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 287, 1339, 286, 1058, 4871, 25, 63, 93, 21575, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 21812, 62, 3672, 11, 2116, 13, 79, 945, 276, 13, 834, 11600, 834, 628, 220, 220, 220, 825, 36899, 7, 944, 11, 8246, 62, 7890, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 27967, 8246, 1366, 284, 428, 4554, 13, 628, 220, 220, 220, 220, 220, 220, 220, 632, 318, 21635, 326, 3376, 1398, 468, 1541, 587, 12006, 198, 220, 220, 220, 220, 220, 220, 220, 290, 326, 340, 468, 4600, 20274, 63, 290, 4600, 12303, 312, 63, 1866, 900, 287, 1339, 286, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 4871, 25, 63, 93, 21575, 63, 492, 628, 220, 220, 220, 220, 220, 220, 220, 7567, 2696, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4280, 1098, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 7822, 815, 5298, 428, 1398, 393, 257, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47611, 286, 340, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8246, 62, 7890, 357, 33661, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1366, 284, 4174, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 18896, 7, 1831, 62, 7890, 8, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 21812, 62, 3672, 11, 2116, 13, 79, 945, 276, 796, 8246, 62, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 945, 276, 796, 28531, 10223, 7, 1174, 944, 13, 79, 945, 276, 8, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 1398, 62, 312, 7, 565, 82, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 317, 3748, 27421, 286, 262, 1398, 13, 628, 220, 220, 220, 220, 220, 220, 220, 770, 1988, 318, 973, 355, 257, 1994, 618, 257, 23772, 2476, 284, 198, 220, 220, 220, 220, 220, 220, 220, 307, 3917, 351, 257, 4731, 198, 220, 220, 220, 220, 220, 220, 220, 357, 3826, 1058, 4871, 25, 63, 16550, 4354, 13, 2655, 62, 8906, 263, 13, 9310, 9310, 13, 35, 713, 7089, 5005, 7089, 63, 737, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 853, 29572, 1, 628, 198, 4871, 23042, 263, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 367, 2840, 262, 13269, 736, 284, 1058, 76, 2788, 25, 63, 93, 29572, 63, 526, 15931, 198, 220, 220, 220, 1208, 628, 198, 4871, 1400, 18257, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 1058, 76, 2788, 25, 63, 93, 29572, 63, 815, 1441, 257, 1058, 4871, 25, 63, 93, 2949, 18257, 21575, 63, 526, 15931, 198, 220, 220, 220, 1208, 628, 198, 4871, 20559, 46677, 7, 28100, 1713, 46677, 11, 23042, 263, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 23042, 263, 326, 3544, 1822, 29572, 5888, 284, 6179, 262, 2420, 13, 628, 220, 220, 220, 5740, 262, 734, 5499, 286, 428, 1398, 25, 281, 4600, 16550, 4354, 63, 30751, 198, 220, 220, 220, 290, 1058, 4871, 25, 63, 853, 29572, 13, 28100, 1713, 46677, 44646, 628, 220, 220, 220, 383, 6678, 779, 286, 428, 30751, 318, 832, 22718, 945, 364, 326, 3494, 9729, 13, 628, 220, 220, 220, 13163, 422, 5881, 4354, 13, 15234, 1304, 13, 48610, 13, 853, 48610, 1330, 20559, 46677, 198, 220, 220, 220, 13163, 1332, 1453, 796, 20559, 46677, 3419, 198, 220, 220, 220, 13163, 22718, 945, 364, 796, 1332, 1453, 13, 2860, 62, 7266, 79, 945, 364, 7, 198, 220, 220, 220, 13163, 220, 220, 220, 220, 3670, 2625, 9503, 1746, 1600, 2244, 2625, 21812, 1600, 1037, 2625, 9503, 1746, 4943, 198, 220, 220, 220, 13163, 825, 466, 62, 2860, 7, 21812, 11, 7159, 2599, 198, 220, 220, 220, 13163, 220, 220, 220, 220, 1441, 2160, 7, 853, 2886, 13, 18908, 364, 8, 198, 220, 220, 220, 13163, 30751, 62, 2860, 796, 22718, 945, 364, 13, 2860, 62, 48610, 10786, 2860, 11537, 198, 220, 220, 220, 13163, 30751, 62, 2860, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 13163, 220, 220, 220, 220, 705, 18908, 364, 3256, 1138, 615, 283, 11639, 600, 3256, 299, 22046, 11639, 10, 3256, 2099, 28, 600, 11, 198, 220, 220, 220, 13163, 220, 220, 220, 220, 1037, 11639, 272, 18253, 284, 307, 32794, 11537, 198, 220, 220, 220, 13163, 30751, 62, 2860, 13, 2617, 62, 12286, 82, 7, 20786, 28, 4598, 62, 2860, 8, 198, 220, 220, 220, 13163, 1332, 1453, 13, 29572, 10786, 2860, 532, 71, 11537, 198, 220, 220, 220, 13163, 1255, 796, 1332, 1453, 13, 29572, 10786, 2860, 352, 362, 513, 11537, 198, 220, 220, 220, 13163, 2452, 62, 20274, 796, 1255, 13, 41049, 3419, 628, 220, 220, 220, 317, 18599, 15304, 318, 25, 198, 220, 220, 220, 13163, 422, 5881, 4354, 13, 15234, 1304, 13, 48610, 13, 853, 48610, 1330, 20559, 46677, 198, 220, 220, 220, 13163, 1332, 1453, 796, 20559, 46677, 3419, 628, 198, 220, 220, 220, 49213, 25, 628, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1635, 22046, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 28407, 273, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10131, 796, 479, 86, 22046, 13, 12924, 10786, 15234, 1304, 3256, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 22446, 834, 15003, 834, 46491, 22046, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 10131, 318, 407, 6045, 11, 366, 464, 10131, 1276, 307, 900, 290, 4030, 366, 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, 220, 220, 220, 366, 1169, 976, 329, 262, 10869, 286, 262, 30751, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15234, 1304, 796, 10131, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1676, 70, 796, 10148, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 7266, 48610, 62, 2673, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 40290, 796, 10148, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 37333, 844, 796, 10148, 628, 220, 220, 220, 825, 751, 62, 7266, 79, 945, 364, 7, 944, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 26997, 12, 17147, 751, 62, 48610, 2446, 13, 628, 220, 220, 220, 220, 220, 220, 220, 23042, 364, 2727, 416, 262, 850, 12, 48610, 423, 976, 1398, 355, 198, 220, 220, 220, 220, 220, 220, 220, 262, 1388, 30751, 357, 259, 674, 1339, 262, 1398, 25, 63, 93, 28100, 46677, 63, 1398, 737, 198, 220, 220, 220, 220, 220, 220, 220, 4362, 356, 765, 6218, 10398, 416, 262, 1822, 29572, 5888, 198, 220, 220, 220, 220, 220, 220, 220, 284, 467, 832, 674, 4383, 3533, 11, 356, 765, 284, 900, 262, 30751, 198, 220, 220, 220, 220, 220, 220, 220, 523, 340, 318, 1695, 287, 1058, 76, 2788, 25, 63, 93, 62, 4798, 62, 20500, 44646, 628, 220, 220, 220, 220, 220, 220, 220, 770, 318, 780, 356, 836, 470, 765, 284, 1265, 262, 2836, 284, 1295, 198, 220, 220, 220, 220, 220, 220, 220, 428, 4578, 2405, 1123, 640, 484, 2251, 262, 30751, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 2208, 22446, 2860, 62, 7266, 79, 945, 364, 7, 1174, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2180, 62, 24396, 796, 1255, 13, 2860, 62, 48610, 628, 220, 220, 220, 220, 220, 220, 220, 1255, 13, 2860, 62, 48610, 796, 21657, 62, 17147, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1255, 628, 220, 220, 220, 825, 11593, 2536, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 1692, 12, 46155, 4731, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 46677, 3419, 6, 628, 220, 220, 220, 825, 11593, 260, 1050, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 21015, 23772, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 46677, 3419, 6, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 825, 21136, 7, 944, 11, 2420, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 38240, 257, 2420, 656, 257, 3141, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 357, 2536, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 2420, 284, 21136, 13, 770, 815, 307, 257, 1336, 3141, 13, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9455, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 3141, 326, 8724, 422, 32096, 262, 2420, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1002, 262, 32096, 373, 23993, 262, 2446, 743, 1441, 2035, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 4871, 25, 63, 93, 2949, 18257, 21575, 6, 284, 1394, 1262, 262, 10131, 393, 4600, 14202, 63, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43194, 340, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2420, 13, 9688, 2032, 342, 10786, 37150, 12, 9503, 1746, 11537, 393, 2420, 13, 9688, 2032, 342, 10786, 12712, 705, 8, 393, 2420, 6624, 705, 12712, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26498, 796, 2116, 13, 29572, 62, 22046, 7, 1477, 2588, 13, 35312, 7, 5239, 4008, 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, 26498, 796, 2116, 13, 29572, 62, 22046, 7, 1477, 2588, 13, 35312, 7, 69, 6, 90, 944, 13, 40290, 18477, 5239, 18477, 944, 13, 37333, 844, 92, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 20559, 10044, 325, 21575, 7, 79, 945, 276, 28, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 23042, 263, 12331, 355, 2859, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 965, 7, 41194, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15234, 1304, 13, 4354, 13, 18224, 7, 20500, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 13047, 21575, 7, 20500, 28, 20500, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 1400, 18257, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 1400, 18257, 21575, 3419, 628, 220, 220, 220, 825, 4049, 7, 944, 11, 3275, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 383, 30751, 468, 12956, 281, 4049, 981, 35391, 262, 5128, 13, 628, 220, 220, 220, 220, 220, 220, 220, 770, 2446, 11, 1864, 284, 1822, 29572, 25274, 11, 815, 407, 1441, 13, 198, 220, 220, 220, 220, 220, 220, 220, 775, 5298, 257, 2183, 6631, 326, 318, 4978, 287, 1058, 76, 2788, 25, 63, 93, 29572, 63, 198, 220, 220, 220, 220, 220, 220, 220, 290, 356, 1208, 1863, 262, 4049, 3275, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 23042, 263, 12331, 7, 20500, 8, 628, 220, 220, 220, 825, 8420, 7, 944, 11, 3722, 28, 15, 11, 3275, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 21914, 597, 30151, 1364, 503, 416, 584, 2438, 357, 16794, 11, 2196, 737, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1400, 18257, 12331, 628, 198, 4871, 20559, 29572, 36510, 29495, 7, 36510, 29495, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 10131, 326, 2391, 2753, 262, 2420, 290, 8075, 257, 2420, 3141, 329, 340, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 30751, 28, 14202, 11, 1635, 22046, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 28407, 273, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 22446, 834, 15003, 834, 46491, 22046, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 30751, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 48610, 796, 30751, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30751, 13, 15234, 1304, 796, 2116, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 48610, 796, 20559, 46677, 7, 15234, 1304, 28, 944, 8, 628, 220, 220, 220, 825, 11593, 2536, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 1692, 12, 46155, 4731, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 29572, 36510, 29495, 3419, 6, 628, 220, 220, 220, 825, 11593, 260, 1050, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10858, 428, 2134, 355, 257, 21015, 23772, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 28100, 29572, 36510, 29495, 3419, 6, 628, 220, 220, 220, 825, 551, 36560, 62, 21812, 7, 944, 11, 3141, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 34333, 257, 3141, 284, 262, 5387, 1351, 13, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 318, 39098, 7, 21812, 11, 8255, 21575, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 21812, 796, 2116, 13, 48610, 13, 29572, 7, 21812, 13, 11299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 21812, 13, 15234, 1304, 796, 2116, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 21812, 13, 12303, 312, 796, 3141, 13, 12303, 312, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 36560, 13, 1996, 7, 3605, 62, 21812, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 62, 21812, 198 ]
2.422499
3,529
"""LinkNet Paper: https://arxiv.org/pdf/1707.03718 Adapted from: https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/linknet/model.py Copyright 2021 | farabio """ from typing import List, Optional, Union, Any import torch import torch.nn as nn import torch.nn.functional as F from farabio.models.segmentation.base import SegModel, SegmentationHead from farabio.models.segmentation.backbones._backbones import get_backbone from farabio.models.segmentation.blocks import Conv2dReLU from farabio.utils.helpers import get_num_parameters __all__ = [ 'Linknet', 'linknet_vgg11', 'linknet_vgg11_bn', 'linknet_vgg13', 'linknet_vgg13_bn', 'linknet_vgg16', 'linknet_vgg16_bn', 'linknet_vgg19', 'linknet_vgg19_bn', 'linknet_mobilenetv2', 'linknet_resnet18', 'linknet_resnet34', 'linknet_resnet50', 'linknet_resnet101', 'linknet_resnet152' ] # test()
[ 37811, 11280, 7934, 198, 198, 42950, 25, 3740, 1378, 283, 87, 452, 13, 2398, 14, 12315, 14, 1558, 2998, 13, 15, 2718, 1507, 198, 48003, 276, 422, 25, 3740, 1378, 12567, 13, 785, 14, 421, 65, 626, 14, 325, 5154, 341, 62, 27530, 13, 9078, 13165, 354, 14, 2436, 672, 14, 9866, 14, 325, 5154, 341, 62, 27530, 62, 9078, 13165, 354, 14, 8726, 3262, 14, 19849, 13, 9078, 198, 198, 15269, 33448, 930, 1290, 397, 952, 198, 37811, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 11, 4377, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 1290, 397, 952, 13, 27530, 13, 325, 5154, 341, 13, 8692, 1330, 31220, 17633, 11, 1001, 5154, 341, 13847, 198, 6738, 1290, 397, 952, 13, 27530, 13, 325, 5154, 341, 13, 1891, 35095, 13557, 1891, 35095, 1330, 651, 62, 1891, 15992, 198, 6738, 1290, 397, 952, 13, 27530, 13, 325, 5154, 341, 13, 27372, 1330, 34872, 17, 67, 3041, 41596, 198, 6738, 1290, 397, 952, 13, 26791, 13, 16794, 364, 1330, 651, 62, 22510, 62, 17143, 7307, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 11280, 3262, 3256, 705, 8726, 3262, 62, 85, 1130, 1157, 3256, 705, 8726, 3262, 62, 85, 1130, 1157, 62, 9374, 3256, 705, 8726, 3262, 62, 85, 1130, 1485, 3256, 705, 8726, 3262, 62, 85, 1130, 1485, 62, 9374, 3256, 198, 220, 220, 220, 705, 8726, 3262, 62, 85, 1130, 1433, 3256, 705, 8726, 3262, 62, 85, 1130, 1433, 62, 9374, 3256, 705, 8726, 3262, 62, 85, 1130, 1129, 3256, 705, 8726, 3262, 62, 85, 1130, 1129, 62, 9374, 3256, 705, 8726, 3262, 62, 76, 25898, 268, 316, 85, 17, 3256, 198, 220, 220, 220, 705, 8726, 3262, 62, 411, 3262, 1507, 3256, 705, 8726, 3262, 62, 411, 3262, 2682, 3256, 705, 8726, 3262, 62, 411, 3262, 1120, 3256, 705, 8726, 3262, 62, 411, 3262, 8784, 3256, 705, 8726, 3262, 62, 411, 3262, 17827, 6, 198, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 198, 2, 1332, 3419 ]
2.545205
365
# Generated by Django 3.0.5 on 2020-06-13 19:56 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3312, 12, 1485, 678, 25, 3980, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201, 198, 201, 198 ]
2.567568
37
#!/usr/bin/env python3 # coding: utf-8 # Import built-in packages # Import external packages
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 17267, 3170, 12, 259, 10392, 198, 198, 2, 17267, 7097, 10392 ]
3.032258
31
import os import glob from chwall.utils import get_logger import gettext # Uncomment the following line during development. # Please, be cautious to NOT commit the following line uncommented. # gettext.bindtextdomain("chwall", "./locale") gettext.textdomain("chwall") _ = gettext.gettext logger = get_logger(__name__)
[ 11748, 28686, 198, 11748, 15095, 198, 198, 6738, 442, 11930, 13, 26791, 1330, 651, 62, 6404, 1362, 198, 198, 11748, 651, 5239, 198, 2, 791, 23893, 262, 1708, 1627, 1141, 2478, 13, 198, 2, 4222, 11, 307, 21205, 284, 5626, 4589, 262, 1708, 1627, 8820, 12061, 13, 198, 2, 651, 5239, 13, 21653, 5239, 27830, 7203, 354, 11930, 1600, 366, 19571, 17946, 1000, 4943, 198, 1136, 5239, 13, 5239, 27830, 7203, 354, 11930, 4943, 198, 62, 796, 651, 5239, 13, 1136, 5239, 198, 198, 6404, 1362, 796, 651, 62, 6404, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
3.295918
98
#!/usr/bin/env python3 TOKEN = "" TIMER = 30 __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import http.server import urllib.request, urllib.parse, urllib.error import cgi import shutil import mimetypes import re from io import BytesIO import time from AWSRekognition import AWSRekognition import re import np import cv2 if __name__ == '__main__': run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 220, 198, 198, 10468, 43959, 796, 13538, 198, 51, 3955, 1137, 796, 1542, 198, 198, 834, 439, 834, 796, 14631, 26437, 40717, 18453, 25060, 8973, 198, 220, 198, 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 11748, 2638, 13, 15388, 198, 11748, 2956, 297, 571, 13, 25927, 11, 2956, 297, 571, 13, 29572, 11, 2956, 297, 571, 13, 18224, 198, 11748, 269, 12397, 198, 11748, 4423, 346, 198, 11748, 17007, 2963, 12272, 198, 11748, 302, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 640, 220, 198, 6738, 14356, 12562, 988, 2360, 653, 1330, 14356, 12562, 988, 2360, 653, 220, 198, 11748, 302, 198, 11748, 45941, 198, 11748, 269, 85, 17, 198, 220, 198, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 5143, 3419, 198 ]
2.737589
141
import os import numpy as np from skmultiflow.data.generator.sea_generator import SEAGenerator
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 16680, 361, 9319, 13, 7890, 13, 8612, 1352, 13, 8583, 62, 8612, 1352, 1330, 7946, 4760, 877, 1352, 628 ]
3.2
30
import json import flask import os app = flask.Flask(__name__) @app.route("/") if __name__ == "__main__": begin()
[ 11748, 33918, 198, 11748, 42903, 198, 11748, 28686, 198, 198, 1324, 796, 42903, 13, 7414, 2093, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 7203, 14, 4943, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 197, 27471, 3419, 198 ]
2.469388
49
from flask import Flask import os basedir = os.path.abspath(os.path.dirname(__file__)) # `flask run` - runs application on local server app = Flask(__name__, static_url_path='', static_folder='static', instance_relative_config=True) DATABASE_URL = os.environ.get('DATABASE_URL') if os.environ.get('TESTING') == 'True': DATABASE_URL = os.environ.get('TEST_DATABASE_URL') app.config.from_mapping( SECRET_KEY=os.environ.get('SECRET_KEY'), SQLALCHEMY_DATABASE_URI=DATABASE_URL, SQLALCHEMY_TRACK_MODIFICATIONS=False, ) from . import routes, models, exceptions, auth
[ 6738, 42903, 1330, 46947, 198, 11748, 28686, 628, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 628, 198, 2, 4600, 2704, 2093, 1057, 63, 532, 4539, 3586, 319, 1957, 4382, 198, 1324, 796, 46947, 7, 834, 3672, 834, 11, 9037, 62, 6371, 62, 6978, 11639, 3256, 9037, 62, 43551, 11639, 12708, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4554, 62, 43762, 62, 11250, 28, 17821, 8, 198, 198, 35, 1404, 6242, 11159, 62, 21886, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 35, 1404, 6242, 11159, 62, 21886, 11537, 198, 198, 361, 28686, 13, 268, 2268, 13, 1136, 10786, 51, 6465, 2751, 11537, 6624, 705, 17821, 10354, 198, 220, 220, 220, 360, 1404, 6242, 11159, 62, 21886, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 51, 6465, 62, 35, 1404, 6242, 11159, 62, 21886, 11537, 198, 198, 1324, 13, 11250, 13, 6738, 62, 76, 5912, 7, 198, 220, 220, 220, 10729, 26087, 62, 20373, 28, 418, 13, 268, 2268, 13, 1136, 10786, 23683, 26087, 62, 20373, 33809, 198, 220, 220, 220, 16363, 1847, 3398, 3620, 56, 62, 35, 1404, 6242, 11159, 62, 47269, 28, 35, 1404, 6242, 11159, 62, 21886, 11, 198, 220, 220, 220, 16363, 1847, 3398, 3620, 56, 62, 5446, 8120, 62, 33365, 30643, 18421, 28, 25101, 11, 198, 8, 198, 198, 6738, 764, 1330, 11926, 11, 4981, 11, 13269, 11, 6284, 198 ]
2.426829
246
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: gexiao # Created on 2018-05-07 22:04 import logging import requests import base64 SERVER_HOST = 'https://v2-api.jsdama.com/upload' SOFTWARE_ID = 9487 SOFTWARE_SECRET = 'nb4GHmdsPxzbcB7iIrU36JPI73HOjUyUEnq3pkob'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 308, 1069, 13481, 198, 2, 15622, 319, 2864, 12, 2713, 12, 2998, 2534, 25, 3023, 198, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 2779, 2414, 198, 198, 35009, 5959, 62, 39, 10892, 796, 705, 5450, 1378, 85, 17, 12, 15042, 13, 8457, 67, 1689, 13, 785, 14, 25850, 6, 198, 15821, 37485, 62, 2389, 796, 860, 35133, 198, 15821, 37485, 62, 23683, 26087, 796, 705, 46803, 19, 17511, 9132, 82, 47, 87, 14969, 66, 33, 22, 72, 23820, 52, 2623, 41, 11901, 4790, 32298, 73, 52, 88, 52, 4834, 80, 18, 79, 74, 672, 6, 628 ]
2.195122
123
from __future__ import print_function PLEVEL = 0 def parity4(data): ''' Thanks to http://www.dalkescientific.com/writings/diary/archive/2016/08/15/fragment_parity_calculation.html ''' if data[0] < data[1]: if data[2] < data[3]: if data[0] < data[2]: if data[1] < data[2]: return 0 # (0, 1, 2, 3) else: if data[1] < data[3]: return 1 # (0, 2, 1, 3) else: return 0 # (0, 3, 1, 2) else: if data[0] < data[3]: if data[1] < data[3]: return 0 # (1, 2, 0, 3) else: return 1 # (1, 3, 0, 2) else: return 0 # (2, 3, 0, 1) else: if data[0] < data[3]: if data[1] < data[2]: if data[1] < data[3]: return 1 # (0, 1, 3, 2) else: return 0 # (0, 2, 3, 1) else: return 1 # (0, 3, 2, 1) else: if data[0] < data[2]: if data[1] < data[2]: return 1 # (1, 2, 3, 0) else: return 0 # (1, 3, 2, 0) else: return 1 # (2, 3, 1, 0) else: if data[2] < data[3]: if data[0] < data[3]: if data[0] < data[2]: return 1 # (1, 0, 2, 3) else: if data[1] < data[2]: return 0 # (2, 0, 1, 3) else: return 1 # (2, 1, 0, 3) else: if data[1] < data[2]: return 1 # (3, 0, 1, 2) else: if data[1] < data[3]: return 0 # (3, 1, 0, 2) else: return 1 # (3, 2, 0, 1) else: if data[0] < data[2]: if data[0] < data[3]: return 0 # (1, 0, 3, 2) else: if data[1] < data[3]: return 1 # (2, 0, 3, 1) else: return 0 # (2, 1, 3, 0) else: if data[1] < data[2]: if data[1] < data[3]: return 0 # (3, 0, 2, 1) else: return 1 # (3, 1, 2, 0) else: return 0 # (3, 2, 1, 0)
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 16437, 18697, 796, 657, 198, 198, 4299, 34383, 19, 7, 7890, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 6930, 284, 2638, 1378, 2503, 13, 67, 971, 274, 3456, 811, 13, 785, 14, 8933, 654, 14, 67, 8042, 14, 17474, 14, 5304, 14, 2919, 14, 1314, 14, 8310, 363, 434, 62, 1845, 414, 62, 9948, 14902, 13, 6494, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 16, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 17, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 15, 11, 352, 11, 362, 11, 513, 8, 220, 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, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 15, 11, 362, 11, 352, 11, 513, 8, 220, 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, 1441, 657, 1303, 357, 15, 11, 513, 11, 352, 11, 362, 8, 220, 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, 1366, 58, 15, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 16, 11, 362, 11, 657, 11, 513, 8, 220, 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, 1441, 352, 1303, 357, 16, 11, 513, 11, 657, 11, 362, 8, 220, 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, 1441, 657, 1303, 357, 17, 11, 513, 11, 657, 11, 352, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 15, 11, 352, 11, 513, 11, 362, 8, 220, 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, 1441, 657, 1303, 357, 15, 11, 362, 11, 513, 11, 352, 8, 220, 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, 1441, 352, 1303, 357, 15, 11, 513, 11, 362, 11, 352, 8, 220, 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, 1366, 58, 15, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 16, 11, 362, 11, 513, 11, 657, 8, 220, 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, 1441, 657, 1303, 357, 16, 11, 513, 11, 362, 11, 657, 8, 220, 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, 1441, 352, 1303, 357, 17, 11, 513, 11, 352, 11, 657, 8, 220, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 17, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 16, 11, 657, 11, 362, 11, 513, 8, 220, 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, 611, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 17, 11, 657, 11, 352, 11, 513, 8, 220, 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, 1441, 352, 1303, 357, 17, 11, 352, 11, 657, 11, 513, 8, 220, 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, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 18, 11, 657, 11, 352, 11, 362, 8, 220, 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, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 18, 11, 352, 11, 657, 11, 362, 8, 220, 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, 1441, 352, 1303, 357, 18, 11, 362, 11, 657, 11, 352, 8, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 15, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 16, 11, 657, 11, 513, 11, 362, 8, 220, 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, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 1303, 357, 17, 11, 657, 11, 513, 11, 352, 8, 220, 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, 1441, 657, 1303, 357, 17, 11, 352, 11, 513, 11, 657, 8, 220, 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, 1366, 58, 16, 60, 1279, 1366, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1366, 58, 16, 60, 1279, 1366, 58, 18, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 1303, 357, 18, 11, 657, 11, 362, 11, 352, 8, 220, 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, 1441, 352, 1303, 357, 18, 11, 352, 11, 362, 11, 657, 8, 220, 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, 1441, 657, 1303, 357, 18, 11, 362, 11, 352, 11, 657, 8, 220, 198 ]
1.403746
1,922
from sort import * import time import random n1 = int(input("Size\nFrom: ")) n2 = int(input("To: ")) h = int(input("Step:")) if n1 > n2 or n2 == n1 or h == 0: print("Wrong input") exit() else: result = measure_time(get_best_array, get_best_array, mysort_quick_middle, n1, n2 + 1, h, 100) print("\n", result, "\n") result = measure_time(get_worst_array, get_best_array, mysort_quick_end, n1, n2 + 1, h, 100) print("\n", result, "\n") result = measure_time(get_random_array, get_random_array, mysort_quick_middle, n1, n2 + 1, h, 100) print("\n", result, "\n")
[ 6738, 3297, 1330, 1635, 201, 198, 11748, 640, 201, 198, 11748, 4738, 201, 198, 201, 198, 77, 16, 796, 493, 7, 15414, 7203, 10699, 59, 77, 4863, 25, 366, 4008, 201, 198, 77, 17, 796, 493, 7, 15414, 7203, 2514, 25, 366, 4008, 201, 198, 71, 796, 493, 7, 15414, 7203, 8600, 11097, 4008, 201, 198, 201, 198, 361, 299, 16, 1875, 299, 17, 393, 299, 17, 6624, 299, 16, 393, 289, 6624, 657, 25, 201, 198, 220, 220, 220, 3601, 7203, 39213, 506, 5128, 4943, 201, 198, 220, 220, 220, 8420, 3419, 201, 198, 220, 220, 220, 220, 201, 198, 17772, 25, 201, 198, 220, 220, 220, 1255, 796, 3953, 62, 2435, 7, 1136, 62, 13466, 62, 18747, 11, 651, 62, 13466, 62, 18747, 11, 616, 30619, 62, 24209, 62, 27171, 11, 299, 16, 11, 299, 17, 1343, 352, 11, 289, 11, 1802, 8, 201, 198, 220, 220, 220, 3601, 7203, 59, 77, 1600, 1255, 11, 37082, 77, 4943, 201, 198, 201, 198, 220, 220, 220, 1255, 796, 3953, 62, 2435, 7, 1136, 62, 41430, 62, 18747, 11, 651, 62, 13466, 62, 18747, 11, 616, 30619, 62, 24209, 62, 437, 11, 299, 16, 11, 299, 17, 1343, 352, 11, 289, 11, 1802, 8, 201, 198, 220, 220, 220, 3601, 7203, 59, 77, 1600, 1255, 11, 37082, 77, 4943, 201, 198, 201, 198, 220, 220, 220, 1255, 796, 3953, 62, 2435, 7, 1136, 62, 25120, 62, 18747, 11, 651, 62, 25120, 62, 18747, 11, 616, 30619, 62, 24209, 62, 27171, 11, 299, 16, 11, 299, 17, 1343, 352, 11, 289, 11, 1802, 8, 201, 198, 220, 220, 220, 3601, 7203, 59, 77, 1600, 1255, 11, 37082, 77, 4943, 201, 198 ]
2.214286
280
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Era information for Flocker nodes. Every time a node reboots it gets a new, globally unique era. """ import sys from uuid import UUID from zope.interface import implementer from twisted.internet.defer import succeed from twisted.python.filepath import FilePath from twisted.python.usage import Options from twisted.python.runtime import platform from ..common.script import ( ICommandLineScript, flocker_standard_options, FlockerScriptRunner, ) _BOOT_ID = FilePath(b"/proc/sys/kernel/random/boot_id") def get_era(): """ :return UUID: A node- and boot-specific globally unique id. """ return UUID(hex=_BOOT_ID.getContent().strip()) @flocker_standard_options class EraOptions(Options): """ Command line options for ``flocker-node-era``. """ longdesc = ( "Print the current node's era to stdout. The era is a unique" "identifier per reboot per node, and can be used to discover the" "current node's state safely using Flocker's REST API.\n" ) synopsis = "Usage: flocker-node-era" @implementer(ICommandLineScript) class EraScript(object): """ Output the era to stdout. """ def era_main(): """ Entry point for ``flocker-node-era`` command-line tool. """ return FlockerScriptRunner( script=EraScript(), options=EraOptions(), logging=False).main()
[ 2, 15069, 38279, 41275, 3457, 13, 220, 4091, 38559, 24290, 2393, 329, 3307, 13, 198, 198, 37811, 198, 36, 430, 1321, 329, 1610, 12721, 13760, 13, 198, 198, 6109, 640, 257, 10139, 3405, 13880, 340, 3011, 257, 649, 11, 18309, 3748, 6980, 13, 198, 37811, 198, 198, 11748, 25064, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 1976, 3008, 13, 39994, 1330, 3494, 263, 198, 198, 6738, 19074, 13, 37675, 13, 4299, 263, 1330, 6758, 198, 6738, 19074, 13, 29412, 13, 7753, 6978, 1330, 9220, 15235, 198, 6738, 19074, 13, 29412, 13, 26060, 1330, 18634, 198, 6738, 19074, 13, 29412, 13, 43282, 1330, 3859, 198, 198, 6738, 11485, 11321, 13, 12048, 1330, 357, 198, 220, 220, 220, 314, 21575, 13949, 7391, 11, 781, 12721, 62, 20307, 62, 25811, 11, 1610, 12721, 7391, 49493, 11, 198, 8, 628, 198, 62, 8202, 2394, 62, 2389, 796, 9220, 15235, 7, 65, 1, 14, 36942, 14, 17597, 14, 33885, 14, 25120, 14, 18769, 62, 312, 4943, 628, 198, 4299, 651, 62, 8607, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 7783, 471, 27586, 25, 317, 10139, 12, 290, 6297, 12, 11423, 18309, 3748, 4686, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 471, 27586, 7, 33095, 28, 62, 8202, 2394, 62, 2389, 13, 1136, 19746, 22446, 36311, 28955, 628, 198, 31, 2704, 12721, 62, 20307, 62, 25811, 198, 4871, 25466, 29046, 7, 29046, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9455, 1627, 3689, 329, 7559, 2704, 12721, 12, 17440, 12, 8607, 15506, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 890, 20147, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 366, 18557, 262, 1459, 10139, 338, 6980, 284, 14367, 448, 13, 383, 6980, 318, 257, 3748, 1, 198, 220, 220, 220, 220, 220, 220, 220, 366, 738, 7483, 583, 20149, 583, 10139, 11, 290, 460, 307, 973, 284, 7073, 262, 1, 198, 220, 220, 220, 220, 220, 220, 220, 366, 14421, 10139, 338, 1181, 11512, 1262, 1610, 12721, 338, 30617, 7824, 13, 59, 77, 1, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 48830, 796, 366, 28350, 25, 781, 12721, 12, 17440, 12, 8607, 1, 628, 198, 31, 320, 26908, 263, 7, 2149, 2002, 392, 13949, 7391, 8, 198, 4871, 25466, 7391, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 25235, 262, 6980, 284, 14367, 448, 13, 198, 220, 220, 220, 37227, 628, 198, 4299, 6980, 62, 12417, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 21617, 966, 329, 7559, 2704, 12721, 12, 17440, 12, 8607, 15506, 3141, 12, 1370, 2891, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 1610, 12721, 7391, 49493, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4226, 28, 36, 430, 7391, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 3689, 28, 36, 430, 29046, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 28, 25101, 737, 12417, 3419, 198 ]
2.891566
498
# Distributions in Pandas import pandas as pd import numpy as np np.random.binomial(1, 0.5) np.random.binomial(1000, 0.5)/1000 chance_of_tornado = 0.01/100 np.random.binomial(100000, chance_of_tornado) chance_of_tornado = 0.01 tornado_events = np.random.binomial(1, chance_of_tornado, 1000000) two_days_in_a_row = 0 for j in range(1,len(tornado_events)-1): if tornado_events[j]==1 and tornado_events[j-1]==1: two_days_in_a_row+=1 print('{} tornadoes back to back in {} years'.format(two_days_in_a_row, 1000000/365)) np.random.uniform(0, 1) np.random.normal(0.75) Formula for standard deviation $$\sqrt{\frac{1}{N} \sum_{i=1}^N (x_i - \overline{x})^2}$$ distribution = np.random.normal(0.75,size=1000) np.sqrt(np.sum((np.mean(distribution)-distribution)**2)/len(distribution)) np.std(distribution) import scipy.stats as stats stats.kurtosis(distribution) stats.skew(distribution) chi_squared_df2 = np.random.chisquare(2, size=10000) stats.skew(chi_squared_df2) chi_squared_df5 = np.random.chisquare(5, size=10000) stats.skew(chi_squared_df5) %matplotlib inline import matplotlib import matplotlib.pyplot as plt output = plt.hist([chi_squared_df2,chi_squared_df5], bins=50, histtype='step', label=['2 degrees of freedom','5 degrees of freedom']) plt.legend(loc='upper right') # Hypothesis Testing df = pd.read_csv('grades.csv') df.head() len(df) early = df[df['assignment1_submission'] <= '2015-12-31'] late = df[df['assignment1_submission'] > '2015-12-31'] early.mean() late.mean() from scipy import stats stats.ttest_ind? stats.ttest_ind(early['assignment1_grade'], late['assignment1_grade']) stats.ttest_ind(early['assignment2_grade'], late['assignment2_grade']) stats.ttest_ind(early['assignment3_grade'], late['assignment3_grade'])
[ 2, 46567, 507, 287, 16492, 292, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 37659, 13, 25120, 13, 8800, 49070, 7, 16, 11, 657, 13, 20, 8, 198, 198, 37659, 13, 25120, 13, 8800, 49070, 7, 12825, 11, 657, 13, 20, 20679, 12825, 198, 198, 39486, 62, 1659, 62, 45910, 4533, 796, 657, 13, 486, 14, 3064, 198, 37659, 13, 25120, 13, 8800, 49070, 7, 3064, 830, 11, 2863, 62, 1659, 62, 45910, 4533, 8, 198, 198, 39486, 62, 1659, 62, 45910, 4533, 796, 657, 13, 486, 198, 198, 45910, 4533, 62, 31534, 796, 45941, 13, 25120, 13, 8800, 49070, 7, 16, 11, 2863, 62, 1659, 62, 45910, 4533, 11, 1802, 2388, 8, 198, 220, 220, 220, 220, 198, 11545, 62, 12545, 62, 259, 62, 64, 62, 808, 796, 657, 198, 1640, 474, 287, 2837, 7, 16, 11, 11925, 7, 45910, 4533, 62, 31534, 13219, 16, 2599, 198, 220, 220, 220, 611, 33718, 62, 31534, 58, 73, 60, 855, 16, 290, 33718, 62, 31534, 58, 73, 12, 16, 60, 855, 16, 25, 198, 220, 220, 220, 220, 220, 220, 220, 734, 62, 12545, 62, 259, 62, 64, 62, 808, 47932, 16, 198, 198, 4798, 10786, 90, 92, 12445, 46368, 736, 284, 736, 287, 23884, 812, 4458, 18982, 7, 11545, 62, 12545, 62, 259, 62, 64, 62, 808, 11, 1802, 2388, 14, 24760, 4008, 198, 198, 37659, 13, 25120, 13, 403, 6933, 7, 15, 11, 352, 8, 198, 198, 37659, 13, 25120, 13, 11265, 7, 15, 13, 2425, 8, 198, 198, 8479, 4712, 329, 3210, 28833, 198, 13702, 59, 31166, 17034, 31478, 31944, 90, 16, 18477, 45, 92, 3467, 16345, 23330, 72, 28, 16, 92, 61, 45, 357, 87, 62, 72, 532, 3467, 2502, 1370, 90, 87, 30072, 61, 17, 92, 13702, 198, 198, 17080, 3890, 796, 45941, 13, 25120, 13, 11265, 7, 15, 13, 2425, 11, 7857, 28, 12825, 8, 198, 198, 37659, 13, 31166, 17034, 7, 37659, 13, 16345, 19510, 37659, 13, 32604, 7, 17080, 3890, 13219, 17080, 3890, 8, 1174, 17, 20679, 11925, 7, 17080, 3890, 4008, 198, 198, 37659, 13, 19282, 7, 17080, 3890, 8, 198, 198, 11748, 629, 541, 88, 13, 34242, 355, 9756, 198, 34242, 13, 74, 3325, 5958, 7, 17080, 3890, 8, 198, 198, 34242, 13, 82, 365, 86, 7, 17080, 3890, 8, 198, 198, 11072, 62, 16485, 1144, 62, 7568, 17, 796, 45941, 13, 25120, 13, 354, 271, 421, 533, 7, 17, 11, 2546, 28, 49388, 8, 198, 34242, 13, 82, 365, 86, 7, 11072, 62, 16485, 1144, 62, 7568, 17, 8, 198, 198, 11072, 62, 16485, 1144, 62, 7568, 20, 796, 45941, 13, 25120, 13, 354, 271, 421, 533, 7, 20, 11, 2546, 28, 49388, 8, 198, 34242, 13, 82, 365, 86, 7, 11072, 62, 16485, 1144, 62, 7568, 20, 8, 198, 198, 4, 6759, 29487, 8019, 26098, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 22915, 796, 458, 83, 13, 10034, 26933, 11072, 62, 16485, 1144, 62, 7568, 17, 11, 11072, 62, 16485, 1144, 62, 7568, 20, 4357, 41701, 28, 1120, 11, 1554, 4906, 11639, 9662, 3256, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6167, 28, 17816, 17, 7370, 286, 4925, 41707, 20, 7370, 286, 4925, 6, 12962, 198, 489, 83, 13, 1455, 437, 7, 17946, 11639, 45828, 826, 11537, 628, 198, 2, 21209, 313, 8497, 23983, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 31177, 13, 40664, 11537, 198, 198, 7568, 13, 2256, 3419, 198, 198, 11925, 7, 7568, 8, 198, 198, 11458, 796, 47764, 58, 7568, 17816, 562, 16747, 16, 62, 7266, 3411, 20520, 19841, 705, 4626, 12, 1065, 12, 3132, 20520, 198, 17660, 796, 47764, 58, 7568, 17816, 562, 16747, 16, 62, 7266, 3411, 20520, 1875, 705, 4626, 12, 1065, 12, 3132, 20520, 198, 198, 11458, 13, 32604, 3419, 198, 198, 17660, 13, 32604, 3419, 198, 198, 6738, 629, 541, 88, 1330, 9756, 198, 34242, 13, 926, 395, 62, 521, 30, 198, 198, 34242, 13, 926, 395, 62, 521, 7, 11458, 17816, 562, 16747, 16, 62, 9526, 6, 4357, 2739, 17816, 562, 16747, 16, 62, 9526, 6, 12962, 198, 198, 34242, 13, 926, 395, 62, 521, 7, 11458, 17816, 562, 16747, 17, 62, 9526, 6, 4357, 2739, 17816, 562, 16747, 17, 62, 9526, 6, 12962, 198, 198, 34242, 13, 926, 395, 62, 521, 7, 11458, 17816, 562, 16747, 18, 62, 9526, 6, 4357, 2739, 17816, 562, 16747, 18, 62, 9526, 6, 12962 ]
2.379128
757
from jarbas.settings import * MIGRATION_MODULES = DisableMigrations()
[ 6738, 17379, 12093, 13, 33692, 1330, 1635, 628, 198, 198, 44, 3528, 49, 6234, 62, 33365, 6239, 1546, 796, 31529, 44, 3692, 602, 3419, 198 ]
2.92
25
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ FILE: identity_sample.py DESCRIPTION: These samples demonstrate creating a user, issuing a token, revoking a token and deleting a user. ///authenticating a client via a connection string USAGE: python identity_samples.py Set the environment variables with your own values before running the sample: 1) AZURE_COMMUNICATION_SERVICE_ENDPOINT - Communication Service endpoint url """ import os if __name__ == '__main__': sample = CommunicationIdentityClientSamples() sample.create_user() sample.create_user_with_token() sample.get_token() sample.revoke_tokens() sample.delete_user()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 198, 37811, 198, 25664, 25, 5369, 62, 39873, 13, 9078, 198, 30910, 40165, 25, 198, 220, 220, 220, 2312, 8405, 10176, 4441, 257, 2836, 11, 19089, 257, 11241, 11, 2710, 5730, 257, 11241, 290, 34817, 257, 2836, 13, 628, 220, 220, 220, 34013, 41299, 12364, 257, 5456, 2884, 257, 4637, 4731, 198, 2937, 11879, 25, 198, 220, 220, 220, 21015, 5369, 62, 82, 12629, 13, 9078, 198, 220, 220, 220, 5345, 262, 2858, 9633, 351, 534, 898, 3815, 878, 2491, 262, 6291, 25, 198, 220, 220, 220, 352, 8, 26253, 11335, 62, 9858, 44, 4944, 2149, 6234, 62, 35009, 27389, 62, 1677, 6322, 46, 12394, 532, 26117, 4809, 36123, 19016, 198, 37811, 198, 11748, 28686, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6291, 796, 26117, 7390, 26858, 11792, 50, 12629, 3419, 198, 220, 220, 220, 6291, 13, 17953, 62, 7220, 3419, 198, 220, 220, 220, 6291, 13, 17953, 62, 7220, 62, 4480, 62, 30001, 3419, 198, 220, 220, 220, 6291, 13, 1136, 62, 30001, 3419, 198, 220, 220, 220, 6291, 13, 18218, 2088, 62, 83, 482, 641, 3419, 198, 220, 220, 220, 6291, 13, 33678, 62, 7220, 3419, 198 ]
3.828
250
''' Created on 1 Dec 2012 @author: Jeremy ''' import serial import sys import rt import time s = serial.Serial(sys.argv[1],115200,timeout=15) t = time.time() c = 0 RT = rt.RaceTech(s) RT.run(decode)
[ 7061, 6, 201, 198, 41972, 319, 352, 4280, 2321, 201, 198, 201, 198, 31, 9800, 25, 11753, 201, 198, 7061, 6, 201, 198, 201, 198, 11748, 11389, 201, 198, 11748, 25064, 201, 198, 11748, 374, 83, 201, 198, 11748, 640, 201, 198, 201, 198, 82, 796, 11389, 13, 32634, 7, 17597, 13, 853, 85, 58, 16, 4357, 15363, 2167, 11, 48678, 28, 1314, 8, 201, 198, 83, 796, 640, 13, 2435, 3419, 201, 198, 66, 796, 657, 201, 198, 201, 198, 14181, 796, 374, 83, 13, 35157, 17760, 7, 82, 8, 201, 198, 14181, 13, 5143, 7, 12501, 1098, 8, 201, 198 ]
2.156863
102
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from pages import views urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), # allauth path('', include('pages.urls')), # Home and tools pages path('db/', include('db.urls')), # Oil field and well database path('accounts/', include('users.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) handler404 = views.handler404 handler500 = views.handler500
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 5468, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 10786, 28482, 14, 3256, 13169, 13, 15654, 13, 6371, 82, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 10786, 23317, 82, 14, 3256, 2291, 10786, 439, 18439, 13, 6371, 82, 11537, 828, 220, 1303, 477, 18439, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 10786, 3256, 2291, 10786, 31126, 13, 6371, 82, 11537, 828, 220, 1303, 5995, 290, 4899, 5468, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 10786, 9945, 14, 3256, 2291, 10786, 9945, 13, 6371, 82, 11537, 828, 220, 1303, 11474, 2214, 290, 880, 6831, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 10786, 23317, 82, 14, 3256, 2291, 10786, 18417, 13, 6371, 82, 11537, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 1343, 9037, 7, 33692, 13, 30733, 3539, 62, 21886, 11, 3188, 62, 15763, 28, 33692, 13, 30733, 3539, 62, 13252, 2394, 8, 198, 198, 30281, 26429, 796, 5009, 13, 30281, 26429, 198, 30281, 4059, 796, 5009, 13, 30281, 4059, 198 ]
2.401434
279
#!/usr/bin/python import numpy as np import pandas as pd import sys df = pd.read_csv('https://raw.githubusercontent.com/ChrisFodor333/early_warning/main/assets/machine.csv',header = 0); df = df.dropna(); #df.head(20); from sklearn.model_selection import train_test_split data = df X = data[['altman', 'in05', 'quicktest','bonity','taffler','binkert']] y = data['result'] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2) pd.options.mode.chained_assignment = None from sklearn.preprocessing import LabelEncoder labelencoder = LabelEncoder() data["result"] = labelencoder.fit_transform(data["result"]) type = pd.DataFrame({'result': ['No Financial Distress', 'First Degree Financial Distress ', 'Second Degree Financial Distress', 'Third Degree Financial Distress']}) data = create_dummies(data,"result") # Aby nevypรญsal warningy import warnings from sklearn.exceptions import DataConversionWarning warnings.filterwarnings(action='ignore', category=DataConversionWarning) # Vlastnosti pred strednou normalizรกciou vlastnosti_pred = X_train # Strednรก normalizรกcia pre rรฝchlejลกรญ classifier from sklearn.preprocessing import StandardScaler sc = StandardScaler() #Transformรกcia dรกt X_train_array = sc.fit_transform(X_train.values) # Priradรญm ลกkรกlovanรฉ รบdaje do DataFrame a pouลพijem argumenty indexu a stฤบpcov, aby som zachoval svoje pรดvodnรฉ indexy a nรกzvy stฤบpcov: X_train = pd.DataFrame(X_train_array, index=X_train.index, columns=X_train.columns) # Vycentrovanรฉ testovacie dรกta na trรฉnovacรญch dรกtach X_test_array = sc.transform(X_test.values) X_test = pd.DataFrame(X_test_array, index=X_test.index, columns=X_test.columns) # import modelu MLP from sklearn.neural_network import MLPClassifier # Inicializovanie perceptrรณnu mlp = MLPClassifier(hidden_layer_sizes =(100,),solver='adam',learning_rate_init= 0.01, max_iter=500) # Natrรฉnovaลฅ model mlp.fit(X_train, y_train) # Vรฝstupy MLPClassifier (activation='relu', alpha=0.0001, batch_size='auto', beta_1=0.9, beta_2=0.999, early_stopping=False, epsilon=1e-08, hidden_layer_sizes=10, learning_rate='constant', learning_rate_init=0.01, max_iter=1000, momentum=0.9, nesterovs_momentum=True, power_t=0.5, random_state=None, shuffle=True, solver='adam', tol=0.0001, validation_fraction=0.1, verbose=False, warm_start=False) altman = sys.argv[1] in05 = sys.argv[2] qt = sys.argv[3] bonity = sys.argv[4] taffler = sys.argv[5] binkert = sys.argv[6] X_test = [[altman, in05, qt, bonity, taffler, binkert]]; X_test = np.array(X_test); X_test.reshape(1, -1); mlp.predict(X_test) mlp.predict_proba(X_test)*100 print(mlp.predict(X_test),mlp.predict_proba(X_test)*100);
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 628, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 5450, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 15645, 37, 30530, 20370, 14, 11458, 62, 43917, 14, 12417, 14, 19668, 14, 30243, 13, 40664, 3256, 25677, 796, 657, 1776, 198, 7568, 796, 47764, 13, 14781, 2616, 9783, 198, 198, 2, 7568, 13, 2256, 7, 1238, 1776, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 7890, 796, 47764, 198, 55, 796, 1366, 58, 17816, 2501, 805, 3256, 705, 259, 2713, 3256, 705, 24209, 9288, 41707, 4189, 414, 41707, 83, 2001, 1754, 41707, 65, 676, 861, 6, 11907, 198, 88, 796, 1366, 17816, 20274, 20520, 198, 55, 62, 27432, 11, 1395, 62, 9288, 11, 331, 62, 27432, 11, 331, 62, 9288, 796, 4512, 62, 9288, 62, 35312, 7, 55, 11, 331, 11, 1332, 62, 7857, 796, 657, 13, 17, 8, 198, 198, 30094, 13, 25811, 13, 14171, 13, 354, 1328, 62, 562, 16747, 796, 6045, 198, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 18242, 12685, 12342, 796, 36052, 27195, 12342, 3419, 198, 7890, 14692, 20274, 8973, 796, 6167, 12685, 12342, 13, 11147, 62, 35636, 7, 7890, 14692, 20274, 8973, 8, 198, 4906, 796, 279, 67, 13, 6601, 19778, 15090, 6, 20274, 10354, 37250, 2949, 11302, 4307, 601, 3256, 705, 5962, 34486, 11302, 4307, 601, 197, 3256, 705, 12211, 34486, 11302, 4307, 601, 3256, 705, 22747, 34486, 11302, 4307, 601, 20520, 30072, 628, 198, 7890, 796, 2251, 62, 67, 39578, 7, 7890, 553, 20274, 4943, 198, 198, 2, 317, 1525, 497, 85, 4464, 8836, 21680, 6509, 88, 198, 11748, 14601, 198, 6738, 1341, 35720, 13, 1069, 11755, 1330, 6060, 3103, 9641, 20361, 198, 40539, 654, 13, 24455, 40539, 654, 7, 2673, 11639, 46430, 3256, 6536, 28, 6601, 3103, 9641, 20361, 8, 198, 198, 2, 569, 12957, 77, 455, 72, 2747, 336, 445, 77, 280, 3487, 528, 6557, 979, 280, 198, 85, 12957, 77, 455, 72, 62, 28764, 796, 1395, 62, 27432, 198, 198, 2, 520, 445, 77, 6557, 3487, 528, 6557, 33743, 662, 374, 127, 121, 354, 293, 73, 32790, 8836, 1398, 7483, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 1416, 796, 8997, 3351, 36213, 3419, 628, 198, 198, 2, 41762, 6557, 33743, 288, 6557, 83, 198, 55, 62, 27432, 62, 18747, 796, 629, 13, 11147, 62, 35636, 7, 55, 62, 27432, 13, 27160, 8, 198, 198, 2, 1736, 343, 324, 8836, 76, 25370, 94, 74, 6557, 75, 22590, 2634, 6184, 118, 67, 1228, 68, 466, 6060, 19778, 257, 279, 280, 129, 122, 2926, 368, 4578, 88, 6376, 84, 257, 336, 128, 118, 14751, 709, 11, 450, 88, 3870, 1976, 620, 8325, 264, 13038, 18015, 279, 27083, 85, 375, 77, 2634, 6376, 88, 257, 299, 6557, 89, 7670, 336, 128, 118, 14751, 709, 25, 198, 55, 62, 27432, 796, 279, 67, 13, 6601, 19778, 7, 55, 62, 27432, 62, 18747, 11, 6376, 28, 55, 62, 27432, 13, 9630, 11, 15180, 28, 55, 62, 27432, 13, 28665, 82, 8, 198, 198, 2, 569, 88, 1087, 305, 10438, 2634, 1332, 709, 330, 494, 288, 6557, 8326, 12385, 491, 35942, 709, 330, 8836, 354, 288, 6557, 83, 620, 198, 55, 62, 9288, 62, 18747, 796, 629, 13, 35636, 7, 55, 62, 9288, 13, 27160, 8, 198, 55, 62, 9288, 796, 279, 67, 13, 6601, 19778, 7, 55, 62, 9288, 62, 18747, 11, 6376, 28, 55, 62, 9288, 13, 9630, 11, 15180, 28, 55, 62, 9288, 13, 28665, 82, 8, 198, 198, 2, 1330, 2746, 84, 10373, 47, 198, 6738, 1341, 35720, 13, 710, 1523, 62, 27349, 1330, 10373, 47, 9487, 7483, 198, 2, 554, 6652, 528, 22590, 494, 34953, 81, 18840, 84, 198, 4029, 79, 796, 10373, 47, 9487, 7483, 7, 30342, 62, 29289, 62, 82, 4340, 796, 7, 3064, 11, 828, 82, 14375, 11639, 324, 321, 3256, 40684, 62, 4873, 62, 15003, 28, 657, 13, 486, 11, 3509, 62, 2676, 28, 4059, 8, 198, 198, 2, 14393, 29350, 38438, 129, 98, 2746, 198, 4029, 79, 13, 11147, 7, 55, 62, 27432, 11, 331, 62, 27432, 8, 198, 198, 2, 569, 127, 121, 301, 929, 88, 198, 5805, 47, 9487, 7483, 357, 48545, 11639, 260, 2290, 3256, 17130, 28, 15, 13, 18005, 11, 15458, 62, 7857, 11639, 23736, 3256, 12159, 62, 16, 28, 15, 13, 24, 11, 198, 31361, 62, 17, 28, 15, 13, 17032, 11, 1903, 62, 301, 33307, 28, 25101, 11, 304, 862, 33576, 28, 16, 68, 12, 2919, 11, 198, 30342, 62, 29289, 62, 82, 4340, 28, 940, 11, 4673, 62, 4873, 11639, 9979, 415, 3256, 198, 40684, 62, 4873, 62, 15003, 28, 15, 13, 486, 11, 3509, 62, 2676, 28, 12825, 11, 12858, 28, 15, 13, 24, 11, 198, 2516, 353, 709, 82, 62, 32542, 298, 388, 28, 17821, 11, 1176, 62, 83, 28, 15, 13, 20, 11, 4738, 62, 5219, 28, 14202, 11, 198, 1477, 18137, 28, 17821, 11, 1540, 332, 11639, 324, 321, 3256, 284, 75, 28, 15, 13, 18005, 11, 21201, 62, 69, 7861, 28, 15, 13, 16, 11, 198, 19011, 577, 28, 25101, 11, 5814, 62, 9688, 28, 25101, 8, 198, 198, 2501, 805, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 259, 2713, 796, 25064, 13, 853, 85, 58, 17, 60, 198, 39568, 796, 25064, 13, 853, 85, 58, 18, 60, 198, 4189, 414, 796, 25064, 13, 853, 85, 58, 19, 60, 198, 83, 2001, 1754, 796, 25064, 13, 853, 85, 58, 20, 60, 198, 65, 676, 861, 796, 25064, 13, 853, 85, 58, 21, 60, 198, 198, 55, 62, 9288, 796, 16410, 2501, 805, 11, 287, 2713, 11, 10662, 83, 11, 5351, 414, 11, 256, 2001, 1754, 11, 275, 676, 861, 60, 11208, 198, 55, 62, 9288, 220, 796, 45941, 13, 18747, 7, 55, 62, 9288, 1776, 198, 55, 62, 9288, 13, 3447, 1758, 7, 16, 11, 532, 16, 1776, 198, 4029, 79, 13, 79, 17407, 7, 55, 62, 9288, 8, 198, 198, 4029, 79, 13, 79, 17407, 62, 1676, 7012, 7, 55, 62, 9288, 27493, 3064, 198, 198, 4798, 7, 4029, 79, 13, 79, 17407, 7, 55, 62, 9288, 828, 4029, 79, 13, 79, 17407, 62, 1676, 7012, 7, 55, 62, 9288, 27493, 3064, 1776, 198 ]
2.508523
1,056
#!/usr/bin/python """Sample program.""" def hello_world(): """Print a message to stdout.""" print("Hello, world!") def return_true(): """You can rent this space for only $5 a week.""" return True
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 36674, 1430, 526, 15931, 198, 198, 4299, 23748, 62, 6894, 33529, 198, 220, 220, 220, 37227, 18557, 257, 3275, 284, 14367, 448, 526, 15931, 198, 220, 220, 220, 3601, 7203, 15496, 11, 995, 2474, 8, 628, 198, 4299, 1441, 62, 7942, 33529, 198, 220, 220, 220, 37227, 1639, 460, 5602, 428, 2272, 329, 691, 720, 20, 257, 1285, 526, 15931, 198, 220, 220, 220, 1441, 6407, 198 ]
2.828947
76
from django.contrib.auth import authenticate from .base import AllAccessTestCase class AuthBackendTestCase(AllAccessTestCase): "Custom contrib.auth backend tests." def test_successful_authenticate(self): "User successfully authenticated." provider = self.access.provider identifier = self.access.identifier user = authenticate(provider=provider, identifier=identifier) self.assertEqual(user, self.user, "Correct user was not returned.") def test_provider_name(self): "Match on provider name as a string." provider = self.access.provider.name identifier = self.access.identifier user = authenticate(provider=provider, identifier=identifier) self.assertEqual(user, self.user, "Correct user was not returned.") def test_failed_authentication(self): "No matches found for the provider/id pair." provider = self.access.provider identifier = self.access.identifier self.access.delete() user = authenticate(provider=provider, identifier=identifier) self.assertEqual(user, None, "No user should be returned.") def test_match_no_user(self): "Matched access is not associated with a user." self.access.user = None self.access.save() user = authenticate(provider=self.access.provider, identifier=self.access.identifier) self.assertEqual(user, None, "No user should be returned.") def test_performance(self): "Only one query should be required to get the user." with self.assertNumQueries(1): authenticate(provider=self.access.provider, identifier=self.access.identifier)
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 198, 6738, 764, 8692, 1330, 1439, 15457, 14402, 20448, 198, 4871, 26828, 7282, 437, 14402, 20448, 7, 3237, 15457, 14402, 20448, 2599, 198, 197, 1, 15022, 542, 822, 13, 18439, 30203, 5254, 526, 198, 197, 4299, 1332, 62, 17212, 62, 41299, 5344, 7, 944, 2599, 198, 197, 197, 1, 12982, 7675, 44529, 526, 198, 197, 197, 15234, 1304, 796, 2116, 13, 15526, 13, 15234, 1304, 198, 197, 197, 738, 7483, 796, 2116, 13, 15526, 13, 738, 7483, 198, 197, 197, 7220, 796, 8323, 5344, 7, 15234, 1304, 28, 15234, 1304, 11, 27421, 28, 738, 7483, 8, 198, 197, 197, 944, 13, 30493, 36, 13255, 7, 7220, 11, 2116, 13, 7220, 11, 366, 42779, 2836, 373, 407, 4504, 19570, 198, 197, 4299, 1332, 62, 15234, 1304, 62, 3672, 7, 944, 2599, 198, 197, 197, 1, 23850, 319, 10131, 1438, 355, 257, 4731, 526, 198, 197, 197, 15234, 1304, 796, 2116, 13, 15526, 13, 15234, 1304, 13, 3672, 198, 197, 197, 738, 7483, 796, 2116, 13, 15526, 13, 738, 7483, 198, 197, 197, 7220, 796, 8323, 5344, 7, 15234, 1304, 28, 15234, 1304, 11, 27421, 28, 738, 7483, 8, 198, 197, 197, 944, 13, 30493, 36, 13255, 7, 7220, 11, 2116, 13, 7220, 11, 366, 42779, 2836, 373, 407, 4504, 19570, 198, 197, 4299, 1332, 62, 47904, 62, 41299, 3299, 7, 944, 2599, 198, 197, 197, 1, 2949, 7466, 1043, 329, 262, 10131, 14, 312, 5166, 526, 198, 197, 197, 15234, 1304, 796, 2116, 13, 15526, 13, 15234, 1304, 198, 197, 197, 738, 7483, 796, 2116, 13, 15526, 13, 738, 7483, 198, 197, 197, 944, 13, 15526, 13, 33678, 3419, 198, 197, 197, 7220, 796, 8323, 5344, 7, 15234, 1304, 28, 15234, 1304, 11, 27421, 28, 738, 7483, 8, 198, 197, 197, 944, 13, 30493, 36, 13255, 7, 7220, 11, 6045, 11, 366, 2949, 2836, 815, 307, 4504, 19570, 198, 197, 4299, 1332, 62, 15699, 62, 3919, 62, 7220, 7, 944, 2599, 198, 197, 197, 1, 44, 14265, 1895, 318, 407, 3917, 351, 257, 2836, 526, 198, 197, 197, 944, 13, 15526, 13, 7220, 796, 6045, 198, 197, 197, 944, 13, 15526, 13, 21928, 3419, 198, 197, 197, 7220, 796, 8323, 5344, 7, 15234, 1304, 28, 944, 13, 15526, 13, 15234, 1304, 11, 27421, 28, 944, 13, 15526, 13, 738, 7483, 8, 198, 197, 197, 944, 13, 30493, 36, 13255, 7, 7220, 11, 6045, 11, 366, 2949, 2836, 815, 307, 4504, 19570, 198, 197, 4299, 1332, 62, 26585, 7, 944, 2599, 198, 197, 197, 1, 10049, 530, 12405, 815, 307, 2672, 284, 651, 262, 2836, 526, 198, 197, 197, 4480, 2116, 13, 30493, 33111, 4507, 10640, 7, 16, 2599, 198, 197, 197, 197, 41299, 5344, 7, 15234, 1304, 28, 944, 13, 15526, 13, 15234, 1304, 11, 27421, 28, 944, 13, 15526, 13, 738, 7483, 8 ]
3.194093
474
from _stories.mounted import ClassMountedStory
[ 6738, 4808, 50164, 13, 29728, 1330, 5016, 35452, 276, 11605, 628, 198 ]
4.083333
12
from os import system, name system('cls' if name == 'nt' else 'clear') dsc = ('''DESAFIO 017: Faรงa um programa que leia o comprimento do cateto oposto e do cateto adjacente de um triรขngulo retรขngulo, calcule e mostre o comprimento da hipotenusa. ''') from math import hypot n1 = float(input('Cateto oposto: ')) n2 = float(input('Cateto adjacente: ')) #print('A hipotenusa รฉ {}'.format((n1 ** 2 + n2 ** 2) ** 0.5)) print('A hipotenusa รฉ {}'.format(hypot(n1, n2)))
[ 6738, 28686, 1330, 1080, 11, 1438, 198, 10057, 10786, 565, 82, 6, 611, 1438, 6624, 705, 429, 6, 2073, 705, 20063, 11537, 198, 198, 67, 1416, 796, 357, 7061, 6, 30910, 8579, 9399, 5534, 22, 25, 198, 50110, 50041, 23781, 1430, 64, 8358, 443, 544, 267, 552, 3036, 50217, 466, 3797, 27206, 1034, 455, 78, 304, 466, 3797, 27206, 15909, 68, 390, 23781, 198, 28461, 22940, 782, 43348, 1005, 22940, 782, 43348, 11, 2386, 23172, 304, 749, 260, 267, 552, 3036, 50217, 12379, 10359, 313, 268, 22064, 13, 198, 7061, 11537, 198, 198, 6738, 10688, 1330, 8813, 198, 198, 77, 16, 796, 12178, 7, 15414, 10786, 21979, 27206, 1034, 455, 78, 25, 705, 4008, 198, 77, 17, 796, 12178, 7, 15414, 10786, 21979, 27206, 15909, 68, 25, 705, 4008, 198, 2, 4798, 10786, 32, 10359, 313, 268, 22064, 38251, 23884, 4458, 18982, 19510, 77, 16, 12429, 362, 1343, 299, 17, 12429, 362, 8, 12429, 657, 13, 20, 4008, 198, 4798, 10786, 32, 10359, 313, 268, 22064, 38251, 23884, 4458, 18982, 7, 36362, 313, 7, 77, 16, 11, 299, 17, 22305, 198 ]
2.574586
181
from __future__ import unicode_literals import biplist import os.path app = defines.get('app', './dmg/JoyfulPlayer.app') appname = os.path.basename(app) # Basics format = defines.get('format', 'UDZO') size = defines.get('size', None) files = [ app ] icon_locations = { appname: (160, 160), } # Window configuration show_status_bar = False show_tab_view = False show_toolbar = False show_pathbar = False show_sidebar = False sidebar_width = 180 window_rect = ((322, 331), (320, 362)) defaullt_view = 'icon_view' # Icon view configuration arrange_by = None grid_offset = (0, 0) grid_spacing = 100 scrolll_position = (0, 0) label_pos = 'bottom' text_size = 12 icon_size = 164
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 3182, 489, 396, 198, 11748, 28686, 13, 6978, 198, 198, 1324, 796, 15738, 13, 1136, 10786, 1324, 3256, 705, 19571, 67, 11296, 14, 41338, 913, 14140, 13, 1324, 11537, 198, 1324, 3672, 796, 28686, 13, 6978, 13, 12093, 12453, 7, 1324, 8, 198, 198, 2, 45884, 198, 198, 18982, 796, 15738, 13, 1136, 10786, 18982, 3256, 705, 8322, 57, 46, 11537, 198, 7857, 796, 15738, 13, 1136, 10786, 7857, 3256, 6045, 8, 198, 16624, 796, 685, 598, 2361, 198, 198, 4749, 62, 17946, 602, 796, 1391, 198, 220, 220, 220, 598, 3672, 25, 220, 220, 220, 220, 220, 220, 220, 357, 14198, 11, 13454, 828, 198, 92, 198, 198, 2, 26580, 8398, 198, 198, 12860, 62, 13376, 62, 5657, 796, 10352, 198, 12860, 62, 8658, 62, 1177, 796, 10352, 198, 12860, 62, 25981, 5657, 796, 10352, 198, 12860, 62, 6978, 5657, 796, 10352, 198, 12860, 62, 1589, 5657, 796, 10352, 198, 1589, 5657, 62, 10394, 796, 11546, 198, 198, 17497, 62, 2554, 796, 14808, 37283, 11, 43722, 828, 357, 19504, 11, 4570, 17, 4008, 198, 198, 4299, 559, 297, 83, 62, 1177, 796, 705, 4749, 62, 1177, 6, 198, 198, 2, 26544, 1570, 8398, 198, 198, 3258, 858, 62, 1525, 796, 6045, 198, 25928, 62, 28968, 796, 357, 15, 11, 657, 8, 198, 25928, 62, 2777, 4092, 796, 1802, 198, 48728, 75, 62, 9150, 796, 357, 15, 11, 657, 8, 198, 18242, 62, 1930, 796, 705, 22487, 6, 198, 5239, 62, 7857, 796, 1105, 198, 4749, 62, 7857, 796, 25307, 628 ]
2.636364
264
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Filename: mf_lqr.py # @Date: 2019-06-16-18-38 # @Author: Hany Abdulsamad # @Contact: [email protected] import gym from trajopt.gps import MFGPS # lqr task env = gym.make('LQR-TO-v0') env._max_episode_steps = 100 alg = MFGPS(env, nb_steps=100, kl_bound=10., init_ctl_sigma=50., activation=range(100)) # run gps trace = alg.run(nb_episodes=10, nb_iter=5) # plot dists alg.plot() # execute and plot nb_episodes = 25 data = alg.sample(nb_episodes, stoch=False) import matplotlib.pyplot as plt plt.figure() for k in range(alg.nb_xdim): plt.subplot(alg.nb_xdim + alg.nb_udim, 1, k + 1) plt.plot(data['x'][k, ...]) for k in range(alg.nb_udim): plt.subplot(alg.nb_xdim + alg.nb_udim, 1, alg.nb_xdim + k + 1) plt.plot(data['u'][k, ...]) plt.show() # plot objective plt.figure() plt.plot(trace) plt.show()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 35063, 25, 285, 69, 62, 75, 80, 81, 13, 9078, 198, 2, 2488, 10430, 25, 13130, 12, 3312, 12, 1433, 12, 1507, 12, 2548, 198, 2, 2488, 13838, 25, 367, 1092, 17870, 5753, 321, 324, 198, 2, 2488, 17829, 25, 289, 1092, 31, 305, 13645, 12, 40684, 13, 2934, 628, 198, 11748, 11550, 198, 6738, 1291, 73, 8738, 13, 70, 862, 1330, 337, 30386, 3705, 628, 198, 2, 300, 80, 81, 4876, 198, 24330, 796, 11550, 13, 15883, 10786, 43, 48, 49, 12, 10468, 12, 85, 15, 11537, 198, 24330, 13557, 9806, 62, 38668, 62, 20214, 796, 1802, 198, 198, 14016, 796, 337, 30386, 3705, 7, 24330, 11, 299, 65, 62, 20214, 28, 3064, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 75, 62, 7784, 28, 940, 1539, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2315, 62, 34168, 62, 82, 13495, 28, 1120, 1539, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14916, 28, 9521, 7, 3064, 4008, 198, 198, 2, 1057, 308, 862, 198, 40546, 796, 435, 70, 13, 5143, 7, 46803, 62, 538, 8052, 28, 940, 11, 299, 65, 62, 2676, 28, 20, 8, 198, 198, 2, 7110, 288, 1023, 198, 14016, 13, 29487, 3419, 198, 198, 2, 12260, 290, 7110, 198, 46803, 62, 538, 8052, 796, 1679, 198, 7890, 796, 435, 70, 13, 39873, 7, 46803, 62, 538, 8052, 11, 3995, 354, 28, 25101, 8, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 489, 83, 13, 26875, 3419, 198, 1640, 479, 287, 2837, 7, 14016, 13, 46803, 62, 24954, 320, 2599, 198, 220, 220, 220, 458, 83, 13, 7266, 29487, 7, 14016, 13, 46803, 62, 24954, 320, 1343, 435, 70, 13, 46803, 62, 463, 320, 11, 352, 11, 479, 1343, 352, 8, 198, 220, 220, 220, 458, 83, 13, 29487, 7, 7890, 17816, 87, 6, 7131, 74, 11, 2644, 12962, 198, 198, 1640, 479, 287, 2837, 7, 14016, 13, 46803, 62, 463, 320, 2599, 198, 220, 220, 220, 458, 83, 13, 7266, 29487, 7, 14016, 13, 46803, 62, 24954, 320, 1343, 435, 70, 13, 46803, 62, 463, 320, 11, 352, 11, 435, 70, 13, 46803, 62, 24954, 320, 1343, 479, 1343, 352, 8, 198, 220, 220, 220, 458, 83, 13, 29487, 7, 7890, 17816, 84, 6, 7131, 74, 11, 2644, 12962, 198, 198, 489, 83, 13, 12860, 3419, 198, 198, 2, 7110, 9432, 198, 489, 83, 13, 26875, 3419, 198, 489, 83, 13, 29487, 7, 40546, 8, 198, 489, 83, 13, 12860, 3419, 198 ]
2.017621
454
import time import sys import uuid import argparse import ibmiotf.device import wiotp.sdk.device from configparser import ConfigParser
[ 11748, 640, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 11748, 1822, 29572, 198, 11748, 24283, 76, 5151, 69, 13, 25202, 198, 11748, 266, 5151, 79, 13, 21282, 74, 13, 25202, 198, 6738, 4566, 48610, 1330, 17056, 46677, 628, 198 ]
3.425
40
from django.urls import path from django.contrib.auth import views as auth_views from . import editorviews from . import userviews urlpatterns = [ # editor paths path("project", editorviews.render_all_projects, name="projects"), path("project/create", editorviews.parse_new_project_request, name="new"), path("project/<str:project_name>", editorviews.paint, name="paint"), path("project/<str:project_name>/save", editorviews.parse_save_request, name="save"), path("project/<str:project_name>/render", editorviews.parse_render_request, name="render"), path("project/<str:project_name>/view", editorviews.parse_view_request, name="view"), path("project/<str:project_name>/publish", editorviews.parse_post_request, name="publish"), path("project/<str:project_name>/load", editorviews.parse_image_request, name="images"), path("project/<str:user>/<str:project_name>/detail", userviews.detail, name="project-detail"), path("project/<str:user>/<str:project_name>/comment", userviews.submit_comment, name="submit-comment"), path("", userviews.home, name="home"), # user authentication paths path("login/", auth_views.LoginView.as_view(template_name='login.html'), name="login"), path("logout/", auth_views.LogoutView.as_view(template_name='logout.html'), name="logout"), path("register/", userviews.register, name="register"), # password reset paths path("password_reset/", auth_views.PasswordResetView.as_view(template_name='password_reset.html'), name='password_reset'), path("password_reset/done", auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'), path("password_reset/confirm", auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'), name='password_reset_confirm'), path("password_reset/complete", auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'), name='password_reset_complete'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 198, 6738, 764, 1330, 5464, 33571, 198, 6738, 764, 1330, 514, 712, 769, 82, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 5464, 13532, 198, 220, 220, 220, 3108, 7203, 16302, 1600, 5464, 33571, 13, 13287, 62, 439, 62, 42068, 11, 1438, 2625, 42068, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 17953, 1600, 5464, 33571, 13, 29572, 62, 3605, 62, 16302, 62, 25927, 11, 1438, 2625, 3605, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 1600, 5464, 33571, 13, 79, 2913, 11, 1438, 2625, 79, 2913, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 21928, 1600, 5464, 33571, 13, 29572, 62, 21928, 62, 25927, 11, 1438, 2625, 21928, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 13287, 1600, 5464, 33571, 13, 29572, 62, 13287, 62, 25927, 11, 1438, 2625, 13287, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 1177, 1600, 5464, 33571, 13, 29572, 62, 1177, 62, 25927, 11, 1438, 2625, 1177, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 12984, 1836, 1600, 5464, 33571, 13, 29572, 62, 7353, 62, 25927, 11, 1438, 2625, 12984, 1836, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 2220, 1600, 5464, 33571, 13, 29572, 62, 9060, 62, 25927, 11, 1438, 2625, 17566, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 7220, 29, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 49170, 1600, 514, 712, 769, 82, 13, 49170, 11, 1438, 2625, 16302, 12, 49170, 12340, 198, 220, 220, 220, 3108, 7203, 16302, 14, 27, 2536, 25, 7220, 29, 14, 27, 2536, 25, 16302, 62, 3672, 29, 14, 23893, 1600, 514, 712, 769, 82, 13, 46002, 62, 23893, 11, 1438, 2625, 46002, 12, 23893, 12340, 628, 220, 220, 220, 3108, 7203, 1600, 514, 712, 769, 82, 13, 11195, 11, 1438, 2625, 11195, 12340, 628, 220, 220, 220, 1303, 2836, 18239, 13532, 198, 220, 220, 220, 3108, 7203, 38235, 14, 1600, 6284, 62, 33571, 13, 47790, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 38235, 13, 6494, 33809, 1438, 2625, 38235, 12340, 198, 220, 220, 220, 3108, 7203, 6404, 448, 14, 1600, 6284, 62, 33571, 13, 11187, 448, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 6404, 448, 13, 6494, 33809, 1438, 2625, 6404, 448, 12340, 198, 220, 220, 220, 3108, 7203, 30238, 14, 1600, 514, 712, 769, 82, 13, 30238, 11, 1438, 2625, 30238, 12340, 628, 220, 220, 220, 1303, 9206, 13259, 13532, 198, 220, 220, 220, 3108, 7203, 28712, 62, 42503, 14, 1600, 6284, 62, 33571, 13, 35215, 4965, 316, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 28712, 62, 42503, 13, 6494, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 28712, 62, 42503, 33809, 198, 220, 220, 220, 3108, 7203, 28712, 62, 42503, 14, 28060, 1600, 6284, 62, 33571, 13, 35215, 4965, 316, 45677, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 28712, 62, 42503, 62, 28060, 13, 6494, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 28712, 62, 42503, 62, 28060, 33809, 198, 220, 220, 220, 3108, 7203, 28712, 62, 42503, 14, 10414, 2533, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 6284, 62, 33571, 13, 35215, 4965, 316, 18546, 2533, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 28712, 62, 42503, 62, 10414, 2533, 13, 6494, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 28712, 62, 42503, 62, 10414, 2533, 33809, 198, 220, 220, 220, 3108, 7203, 28712, 62, 42503, 14, 20751, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 6284, 62, 33571, 13, 35215, 4965, 316, 20988, 7680, 13, 292, 62, 1177, 7, 28243, 62, 3672, 11639, 28712, 62, 42503, 62, 20751, 13, 6494, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 28712, 62, 42503, 62, 20751, 33809, 198, 60, 198 ]
2.867872
719
from PyQt5 import QtWidgets from .pages import IntroPage, EMPage, SimTypePage, IntegratorPage, \ NeighbourSearchPage, FreqControlPage, CoulombPage, \ VdWPage, EwaldPage, ThermostatPage, EndPage
[ 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 198, 198, 6738, 764, 31126, 1330, 37219, 9876, 11, 38144, 496, 11, 3184, 6030, 9876, 11, 15995, 12392, 9876, 11, 3467, 198, 220, 220, 220, 22505, 6084, 18243, 9876, 11, 4848, 80, 15988, 9876, 11, 27854, 2381, 9876, 11, 3467, 198, 220, 220, 220, 569, 67, 54, 9876, 11, 412, 21667, 9876, 11, 12634, 1712, 265, 9876, 11, 5268, 9876, 628 ]
2.873239
71
# -*- coding: utf-8 -*- """ Utilities for transforming and validating data types Given that many of the data transformations involve copying the data, they should ideally happen in a lazy manner to avoid memory issues. Created on Tue Nov 3 21:14:25 2015 @author: Suhas Somnath, Chris Smith """ from __future__ import division, absolute_import, unicode_literals, print_function import sys from warnings import warn import h5py import numpy as np import dask.array as da __all__ = ['flatten_complex_to_real', 'get_compound_sub_dtypes', 'flatten_compound_to_real', 'check_dtype', 'stack_real_to_complex', 'validate_dtype', 'is_complex_dtype', 'stack_real_to_compound', 'stack_real_to_target_dtype', 'flatten_to_real'] from sidpy.hdf.hdf_utils import lazy_load_array if sys.version_info.major == 3: unicode = str def flatten_complex_to_real(dataset, lazy=False): """ Stacks the real values followed by the imaginary values in the last dimension of the given N dimensional matrix. Thus a complex matrix of shape (2, 3, 5) will turn into a matrix of shape (2, 3, 10) Parameters ---------- dataset : array-like or :class:`numpy.ndarray`, or :class:`h5py.Dataset`, or :class:`dask.array.core.Array` Dataset of complex data type lazy : bool, optional. Default = False If set to True, will use lazy Dask arrays instead of in-memory numpy arrays Returns ------- retval : :class:`numpy.ndarray`, or :class:`dask.array.core.Array` real valued dataset """ if not isinstance(dataset, (h5py.Dataset, np.ndarray, da.core.Array)): raise TypeError('dataset should either be a h5py.Dataset or numpy / dask array') if not is_complex_dtype(dataset.dtype): raise TypeError("Expected a complex valued dataset") if isinstance(dataset, da.core.Array): lazy = True xp = np if lazy: dataset = lazy_load_array(dataset) xp = da axis = xp.array(dataset).ndim - 1 if axis == -1: return xp.hstack([xp.real(dataset), xp.imag(dataset)]) else: # along the last axis return xp.concatenate([xp.real(dataset), xp.imag(dataset)], axis=axis) def flatten_compound_to_real(dataset, lazy=False): """ Flattens the individual components in a structured array or compound valued hdf5 dataset along the last axis to form a real valued array. Thus a compound h5py.Dataset or structured numpy matrix of shape (2, 3, 5) having 3 components will turn into a real valued matrix of shape (2, 3, 15), assuming that all the sub-dtypes of the matrix are real valued. ie - this function does not handle structured dtypes having complex values Parameters ---------- dataset : :class:`numpy.ndarray`, or :class:`h5py.Dataset`, or :class:`dask.array.core.Array` Numpy array that is a structured array or a :class:`h5py.Dataset` of compound dtype lazy : bool, optional. Default = False If set to True, will use lazy Dask arrays instead of in-memory numpy arrays Returns ------- retval : :class:`numpy.ndarray`, or :class:`dask.array.core.Array` real valued dataset """ if isinstance(dataset, h5py.Dataset): if len(dataset.dtype) == 0: raise TypeError("Expected compound h5py dataset") if lazy: xp = da dataset = lazy_load_array(dataset) else: xp = np warn('HDF5 datasets will be loaded as Dask arrays in the future. ie - kwarg lazy will default to True in future releases of sidpy') return xp.concatenate([xp.array(dataset[name]) for name in dataset.dtype.names], axis=len(dataset.shape) - 1) elif isinstance(dataset, (np.ndarray, da.core.Array)): if isinstance(dataset, da.core.Array): lazy = True xp = np if lazy: dataset = lazy_load_array(dataset) xp = da if len(dataset.dtype) == 0: raise TypeError("Expected structured array") if dataset.ndim > 0: return xp.concatenate([dataset[name] for name in dataset.dtype.names], axis=dataset.ndim - 1) else: return xp.hstack([dataset[name] for name in dataset.dtype.names]) elif isinstance(dataset, np.void): return np.hstack([dataset[name] for name in dataset.dtype.names]) else: raise TypeError('Datatype {} not supported'.format(type(dataset))) def flatten_to_real(ds_main, lazy=False): """ Flattens complex / compound / real valued arrays to real valued arrays Parameters ---------- ds_main : :class:`numpy.ndarray`, or :class:`h5py.Dataset`, or :class:`dask.array.core.Array` Compound, complex or real valued numpy array or HDF5 dataset lazy : bool, optional. Default = False If set to True, will use lazy Dask arrays instead of in-memory numpy arrays Returns ---------- ds_main : :class:`numpy.ndarray`, or :class:`dask.array.core.Array` Array raveled to a float data type """ if not isinstance(ds_main, (h5py.Dataset, np.ndarray, da.core.Array)): ds_main = np.array(ds_main) if is_complex_dtype(ds_main.dtype): return flatten_complex_to_real(ds_main, lazy=lazy) elif len(ds_main.dtype) > 0: return flatten_compound_to_real(ds_main, lazy=lazy) else: return ds_main def get_compound_sub_dtypes(struct_dtype): """ Returns a dictionary of the dtypes of each of the fields in the given structured array dtype Parameters ---------- struct_dtype : :class:`numpy.dtype` dtype of a structured array Returns ------- dtypes : dict Dictionary whose keys are the field names and values are the corresponding dtypes """ if not isinstance(struct_dtype, np.dtype): raise TypeError('Provided object must be a structured array dtype') dtypes = dict() for field_name in struct_dtype.fields: dtypes[field_name] = struct_dtype.fields[field_name][0] return dtypes def check_dtype(h5_dset): """ Checks the datatype of the input HDF5 dataset and provides the appropriate function calls to convert it to a float Parameters ---------- h5_dset : :class:`h5py.Dataset` Dataset of interest Returns ------- func : callable function that will convert the dataset to a float is_complex : bool is the input dataset complex? is_compound : bool is the input dataset compound? n_features : Unsigned int Unsigned integer - the length of the 2nd dimension of the data after `func` is called on it type_mult : Unsigned int multiplier that converts from the typesize of the input :class:`~numpy.dtype` to the typesize of the data after func is run on it """ if not isinstance(h5_dset, h5py.Dataset): raise TypeError('h5_dset should be a h5py.Dataset object') is_complex = False is_compound = False in_dtype = h5_dset.dtype # TODO: avoid assuming 2d shape - why does one even need n_samples!? We only care about the last dimension! n_features = h5_dset.shape[-1] if is_complex_dtype(h5_dset.dtype): is_complex = True new_dtype = np.real(h5_dset[0, 0]).dtype type_mult = new_dtype.itemsize * 2 func = flatten_complex_to_real n_features *= 2 elif len(h5_dset.dtype) > 0: """ Some form of structured numpy is in use We only support real scalars for the component types at the current time """ is_compound = True # TODO: Avoid hard-coding to float32 new_dtype = np.float32 type_mult = len(in_dtype) * new_dtype(0).itemsize func = flatten_compound_to_real n_features *= len(in_dtype) else: if h5_dset.dtype not in [np.float32, np.float64]: new_dtype = np.float32 else: new_dtype = h5_dset.dtype.type type_mult = new_dtype(0).itemsize func = new_dtype return func, is_complex, is_compound, n_features, type_mult def stack_real_to_complex(ds_real, lazy=False): """ Puts the real and imaginary sections of the provided matrix (in the last axis) together to make complex matrix Parameters ------------ ds_real : :class:`numpy.ndarray`, :class:`dask.array.core.Array`, or :class:`h5py.Dataset` n dimensional real-valued numpy array or HDF5 dataset where data arranged as [instance, 2 x features], where the first half of the features are the real component and the second half contains the imaginary components lazy : bool, optional. Default = False If set to True, will use lazy Dask arrays instead of in-memory numpy arrays Returns ---------- ds_compound : :class:`numpy.ndarray` or :class:`dask.array.core.Array` 2D complex array arranged as [sample, features] """ if not isinstance(ds_real, (np.ndarray, da.core.Array, h5py.Dataset)): if not isinstance(ds_real, (tuple, list)): raise TypeError("Expected at least an iterable like a list or tuple") ds_real = np.array(ds_real) if len(ds_real.dtype) > 0: raise TypeError("Array cannot have a compound dtype") if is_complex_dtype(ds_real.dtype): raise TypeError("Array cannot have complex dtype") if ds_real.shape[-1] / 2 != ds_real.shape[-1] // 2: raise ValueError("Last dimension must be even sized") half_point = ds_real.shape[-1] // 2 if isinstance(ds_real, da.core.Array): lazy = True if lazy and not isinstance(ds_real, da.core.Array): ds_real = lazy_load_array(ds_real) return ds_real[..., :half_point] + 1j * ds_real[..., half_point:] def stack_real_to_compound(ds_real, compound_type, lazy=False): """ Converts a real-valued dataset to a compound dataset (along the last axis) of the provided compound d-type Parameters ------------ ds_real : :class:`numpy.ndarray`, :class:`dask.array.core.Array`, or :class:`h5py.Dataset` n dimensional real-valued numpy array or HDF5 dataset where data arranged as [instance, features] compound_type : :class:`numpy.dtype` Target complex data-type lazy : bool, optional. Default = False If set to True, will use lazy Dask arrays instead of in-memory numpy arrays Returns ---------- ds_compound : :class:`numpy.ndarray` or :class:`dask.array.core.Array` N-dimensional complex-valued array arranged as [sample, features] """ if lazy or isinstance(ds_real, da.core.Array): raise NotImplementedError('Lazy operation not available due to absence of Dask support') if not isinstance(ds_real, (np.ndarray, h5py.Dataset)): if not isinstance(ds_real, (list, tuple)): raise TypeError("Expected at least an iterable like a list or tuple") ds_real = np.array(ds_real) if len(ds_real.dtype) > 0: raise TypeError("Array cannot have a compound dtype") elif is_complex_dtype(ds_real.dtype): raise TypeError("Array cannot have complex dtype") if not isinstance(compound_type, np.dtype): raise TypeError('Provided object must be a structured array dtype') new_spec_length = ds_real.shape[-1] / len(compound_type) if new_spec_length % 1: raise ValueError('Provided compound type was not compatible by number of elements') new_spec_length = int(new_spec_length) new_shape = list(ds_real.shape) # Make mutable new_shape[-1] = new_spec_length xp = np kwargs = {} """ if isinstance(ds_real, h5py.Dataset) and not lazy: warn('HDF5 datasets will be loaded as Dask arrays in the future. ie - kwarg lazy will default to True in future releases of sidpy') if isinstance(ds_real, da.core.Array): lazy = True if lazy: xp = da ds_real = lazy_load_array(ds_real) kwargs = {'chunks': 'auto'} """ ds_compound = xp.empty(new_shape, dtype=compound_type, **kwargs) for name_ind, name in enumerate(compound_type.names): i_start = name_ind * new_spec_length i_end = (name_ind + 1) * new_spec_length ds_compound[name] = ds_real[..., i_start:i_end] return ds_compound.squeeze() def stack_real_to_target_dtype(ds_real, new_dtype, lazy=False): """ Transforms real data into the target dtype Parameters ---------- ds_real : :class:`numpy.ndarray`, :class:`dask.array.core.Array` or :class:`h5py.Dataset` n dimensional real-valued numpy array or HDF5 dataset new_dtype : :class:`numpy.dtype` Target data-type Returns ---------- ret_val : :class:`numpy.ndarray` or :class:`dask.array.core.Array` N-dimensional array of the target data-type """ if is_complex_dtype(new_dtype): return stack_real_to_complex(ds_real, lazy=lazy) try: if len(new_dtype) > 0: return stack_real_to_compound(ds_real, new_dtype, lazy=lazy) except TypeError: return new_dtype(ds_real) # catching all other cases, such as np.dtype('<f4') return new_dtype.type(ds_real) def validate_dtype(dtype): """ Checks the provided object to ensure that it is a valid dtype that can be written to an HDF5 file. Raises a type error if invalid. Returns True if the object passed the tests Parameters ---------- dtype : object Object that is hopefully a :class:`h5py.Datatype`, or :class:`numpy.dtype` object Returns ------- status : bool True if the object was a valid data-type """ if isinstance(dtype, (h5py.Datatype, np.dtype)): pass elif isinstance(np.dtype(dtype), np.dtype): # This should catch all those instances when dtype is something familiar like - np.float32 pass else: raise TypeError('dtype should either be a numpy or h5py dtype') return True def is_complex_dtype(dtype): """ Checks if the provided dtype is a complex dtype Parameters ---------- dtype : object Object that is a class:`h5py.Datatype`, or :class:`numpy.dtype` object Returns ------- is_complex : bool True if the dtype was a complex dtype. Else returns False """ validate_dtype(dtype) if dtype in [np.complex, np.complex64, np.complex128]: return True return False
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 18274, 2410, 329, 25449, 290, 4938, 803, 1366, 3858, 198, 198, 15056, 326, 867, 286, 262, 1366, 38226, 6211, 23345, 262, 1366, 11, 484, 815, 198, 485, 453, 1645, 287, 257, 16931, 5642, 284, 3368, 4088, 2428, 13, 198, 198, 41972, 319, 30030, 5267, 220, 513, 2310, 25, 1415, 25, 1495, 1853, 198, 198, 31, 9800, 25, 1778, 10134, 9995, 77, 776, 11, 5180, 4176, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 198, 11748, 25064, 198, 6738, 14601, 1330, 9828, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 2093, 13, 18747, 355, 12379, 198, 198, 834, 439, 834, 796, 37250, 2704, 41769, 62, 41887, 62, 1462, 62, 5305, 3256, 705, 1136, 62, 5589, 633, 62, 7266, 62, 67, 19199, 3256, 705, 2704, 41769, 62, 5589, 633, 62, 1462, 62, 5305, 3256, 705, 9122, 62, 67, 4906, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 25558, 62, 5305, 62, 1462, 62, 41887, 3256, 705, 12102, 378, 62, 67, 4906, 3256, 705, 271, 62, 41887, 62, 67, 4906, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 25558, 62, 5305, 62, 1462, 62, 5589, 633, 3256, 705, 25558, 62, 5305, 62, 1462, 62, 16793, 62, 67, 4906, 3256, 705, 2704, 41769, 62, 1462, 62, 5305, 20520, 198, 198, 6738, 9785, 9078, 13, 71, 7568, 13, 71, 7568, 62, 26791, 1330, 16931, 62, 2220, 62, 18747, 198, 198, 361, 25064, 13, 9641, 62, 10951, 13, 22478, 6624, 513, 25, 198, 220, 220, 220, 28000, 1098, 796, 965, 628, 198, 4299, 27172, 268, 62, 41887, 62, 1462, 62, 5305, 7, 19608, 292, 316, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 520, 4595, 262, 1103, 3815, 3940, 416, 262, 26726, 3815, 287, 262, 938, 15793, 286, 262, 1813, 399, 38517, 17593, 13, 198, 220, 220, 220, 6660, 257, 3716, 17593, 286, 5485, 357, 17, 11, 513, 11, 642, 8, 481, 1210, 656, 257, 17593, 286, 5485, 357, 17, 11, 513, 11, 838, 8, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 27039, 1058, 7177, 12, 2339, 393, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 16092, 292, 316, 286, 3716, 1366, 2099, 198, 220, 220, 220, 16931, 1058, 20512, 11, 11902, 13, 15161, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 900, 284, 6407, 11, 481, 779, 16931, 360, 2093, 26515, 2427, 286, 287, 12, 31673, 299, 32152, 26515, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 1005, 2100, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 1103, 17560, 27039, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 19608, 292, 316, 11, 357, 71, 20, 9078, 13, 27354, 292, 316, 11, 45941, 13, 358, 18747, 11, 12379, 13, 7295, 13, 19182, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 19608, 292, 316, 815, 2035, 307, 257, 289, 20, 9078, 13, 27354, 292, 316, 393, 299, 32152, 1220, 288, 2093, 7177, 11537, 198, 220, 220, 220, 611, 407, 318, 62, 41887, 62, 67, 4906, 7, 19608, 292, 316, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 3109, 7254, 257, 3716, 17560, 27039, 4943, 628, 220, 220, 220, 611, 318, 39098, 7, 19608, 292, 316, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 16931, 796, 6407, 628, 220, 220, 220, 36470, 796, 45941, 198, 220, 220, 220, 611, 16931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 27039, 796, 16931, 62, 2220, 62, 18747, 7, 19608, 292, 316, 8, 198, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 12379, 628, 220, 220, 220, 16488, 796, 36470, 13, 18747, 7, 19608, 292, 316, 737, 358, 320, 532, 352, 198, 220, 220, 220, 611, 16488, 6624, 532, 16, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36470, 13, 71, 25558, 26933, 42372, 13, 5305, 7, 19608, 292, 316, 828, 36470, 13, 48466, 7, 19608, 292, 316, 8, 12962, 198, 220, 220, 220, 2073, 25, 220, 1303, 1863, 262, 938, 16488, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36470, 13, 1102, 9246, 268, 378, 26933, 42372, 13, 5305, 7, 19608, 292, 316, 828, 36470, 13, 48466, 7, 19608, 292, 316, 8, 4357, 16488, 28, 22704, 8, 628, 198, 4299, 27172, 268, 62, 5589, 633, 62, 1462, 62, 5305, 7, 19608, 292, 316, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1610, 1078, 641, 262, 1981, 6805, 287, 257, 20793, 7177, 393, 13061, 17560, 289, 7568, 20, 27039, 1863, 262, 938, 16488, 284, 1296, 198, 220, 220, 220, 257, 1103, 17560, 7177, 13, 6660, 257, 13061, 289, 20, 9078, 13, 27354, 292, 316, 393, 20793, 299, 32152, 17593, 286, 5485, 357, 17, 11, 513, 11, 642, 8, 1719, 513, 6805, 198, 220, 220, 220, 481, 1210, 656, 257, 1103, 17560, 17593, 286, 5485, 357, 17, 11, 513, 11, 1315, 828, 13148, 326, 477, 262, 850, 12, 67, 19199, 286, 262, 17593, 389, 1103, 198, 220, 220, 220, 17560, 13, 37941, 532, 428, 2163, 857, 407, 5412, 20793, 288, 19199, 1719, 3716, 3815, 628, 198, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 27039, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 399, 32152, 7177, 326, 318, 257, 20793, 7177, 393, 257, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 63, 286, 13061, 288, 4906, 198, 220, 220, 220, 16931, 1058, 20512, 11, 11902, 13, 15161, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 900, 284, 6407, 11, 481, 779, 16931, 360, 2093, 26515, 2427, 286, 287, 12, 31673, 299, 32152, 26515, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 1005, 2100, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 1103, 17560, 27039, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 39098, 7, 19608, 292, 316, 11, 289, 20, 9078, 13, 27354, 292, 316, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 19608, 292, 316, 13, 67, 4906, 8, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 3109, 7254, 13061, 289, 20, 9078, 27039, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 611, 16931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 12379, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27039, 796, 16931, 62, 2220, 62, 18747, 7, 19608, 292, 316, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 45941, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9828, 10786, 39, 8068, 20, 40522, 481, 307, 9639, 355, 360, 2093, 26515, 287, 262, 2003, 13, 37941, 532, 479, 86, 853, 16931, 481, 4277, 284, 6407, 287, 2003, 10050, 286, 9785, 9078, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 36470, 13, 1102, 9246, 268, 378, 26933, 42372, 13, 18747, 7, 19608, 292, 316, 58, 3672, 12962, 329, 1438, 287, 27039, 13, 67, 4906, 13, 14933, 4357, 16488, 28, 11925, 7, 19608, 292, 316, 13, 43358, 8, 532, 352, 8, 628, 220, 220, 220, 1288, 361, 318, 39098, 7, 19608, 292, 316, 11, 357, 37659, 13, 358, 18747, 11, 12379, 13, 7295, 13, 19182, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 19608, 292, 316, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16931, 796, 6407, 628, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 45941, 198, 220, 220, 220, 220, 220, 220, 220, 611, 16931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27039, 796, 16931, 62, 2220, 62, 18747, 7, 19608, 292, 316, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 12379, 628, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 19608, 292, 316, 13, 67, 4906, 8, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 3109, 7254, 20793, 7177, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 27039, 13, 358, 320, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 36470, 13, 1102, 9246, 268, 378, 26933, 19608, 292, 316, 58, 3672, 60, 329, 1438, 287, 27039, 13, 67, 4906, 13, 14933, 4357, 16488, 28, 19608, 292, 316, 13, 358, 320, 532, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 36470, 13, 71, 25558, 26933, 19608, 292, 316, 58, 3672, 60, 329, 1438, 287, 27039, 13, 67, 4906, 13, 14933, 12962, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 19608, 292, 316, 11, 45941, 13, 19382, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 45941, 13, 71, 25558, 26933, 19608, 292, 316, 58, 3672, 60, 329, 1438, 287, 27039, 13, 67, 4906, 13, 14933, 12962, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 27354, 265, 2981, 23884, 407, 4855, 4458, 18982, 7, 4906, 7, 19608, 292, 316, 22305, 628, 198, 4299, 27172, 268, 62, 1462, 62, 5305, 7, 9310, 62, 12417, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1610, 1078, 641, 3716, 1220, 13061, 1220, 1103, 17560, 26515, 284, 1103, 17560, 26515, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 82, 62, 12417, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 3082, 633, 11, 3716, 393, 1103, 17560, 299, 32152, 7177, 393, 5572, 37, 20, 27039, 198, 220, 220, 220, 16931, 1058, 20512, 11, 11902, 13, 15161, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 900, 284, 6407, 11, 481, 779, 16931, 360, 2093, 26515, 2427, 286, 287, 12, 31673, 299, 32152, 26515, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 82, 62, 12417, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 15690, 2179, 626, 276, 284, 257, 12178, 1366, 2099, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 9310, 62, 12417, 11, 357, 71, 20, 9078, 13, 27354, 292, 316, 11, 45941, 13, 358, 18747, 11, 12379, 13, 7295, 13, 19182, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 12417, 796, 45941, 13, 18747, 7, 9310, 62, 12417, 8, 198, 220, 220, 220, 611, 318, 62, 41887, 62, 67, 4906, 7, 9310, 62, 12417, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 27172, 268, 62, 41887, 62, 1462, 62, 5305, 7, 9310, 62, 12417, 11, 16931, 28, 75, 12582, 8, 198, 220, 220, 220, 1288, 361, 18896, 7, 9310, 62, 12417, 13, 67, 4906, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 27172, 268, 62, 5589, 633, 62, 1462, 62, 5305, 7, 9310, 62, 12417, 11, 16931, 28, 75, 12582, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 288, 82, 62, 12417, 628, 198, 4299, 651, 62, 5589, 633, 62, 7266, 62, 67, 19199, 7, 7249, 62, 67, 4906, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 257, 22155, 286, 262, 288, 19199, 286, 1123, 286, 262, 7032, 287, 262, 1813, 20793, 7177, 288, 4906, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2878, 62, 67, 4906, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 67, 4906, 63, 198, 220, 220, 220, 220, 220, 220, 220, 288, 4906, 286, 257, 20793, 7177, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 288, 19199, 1058, 8633, 198, 220, 220, 220, 220, 220, 220, 220, 28261, 3025, 8251, 389, 262, 2214, 3891, 290, 3815, 389, 262, 11188, 288, 19199, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 7249, 62, 67, 4906, 11, 45941, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 15946, 1384, 2134, 1276, 307, 257, 20793, 7177, 288, 4906, 11537, 198, 220, 220, 220, 288, 19199, 796, 8633, 3419, 198, 220, 220, 220, 329, 2214, 62, 3672, 287, 2878, 62, 67, 4906, 13, 25747, 25, 198, 220, 220, 220, 220, 220, 220, 220, 288, 19199, 58, 3245, 62, 3672, 60, 796, 2878, 62, 67, 4906, 13, 25747, 58, 3245, 62, 3672, 7131, 15, 60, 198, 220, 220, 220, 1441, 288, 19199, 628, 198, 4299, 2198, 62, 67, 4906, 7, 71, 20, 62, 67, 2617, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 47719, 262, 4818, 265, 2981, 286, 262, 5128, 5572, 37, 20, 27039, 290, 3769, 262, 5035, 198, 220, 220, 220, 2163, 3848, 284, 10385, 340, 284, 257, 12178, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 289, 20, 62, 67, 2617, 1058, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 63, 198, 220, 220, 220, 220, 220, 220, 220, 16092, 292, 316, 286, 1393, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 25439, 1058, 869, 540, 198, 220, 220, 220, 220, 220, 220, 220, 2163, 326, 481, 10385, 262, 27039, 284, 257, 12178, 198, 220, 220, 220, 318, 62, 41887, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 318, 262, 5128, 27039, 3716, 30, 198, 220, 220, 220, 318, 62, 5589, 633, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 318, 262, 5128, 27039, 13061, 30, 198, 220, 220, 220, 299, 62, 40890, 1058, 791, 32696, 493, 198, 220, 220, 220, 220, 220, 220, 220, 791, 32696, 18253, 532, 262, 4129, 286, 262, 362, 358, 15793, 286, 262, 1366, 706, 4600, 20786, 63, 318, 1444, 319, 340, 198, 220, 220, 220, 2099, 62, 16680, 1058, 791, 32696, 493, 198, 220, 220, 220, 220, 220, 220, 220, 33090, 326, 26161, 422, 262, 3858, 1096, 286, 262, 5128, 1058, 4871, 25, 63, 93, 77, 32152, 13, 67, 4906, 63, 284, 262, 198, 220, 220, 220, 220, 220, 220, 220, 3858, 1096, 286, 262, 1366, 706, 25439, 318, 1057, 319, 340, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 71, 20, 62, 67, 2617, 11, 289, 20, 9078, 13, 27354, 292, 316, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 71, 20, 62, 67, 2617, 815, 307, 257, 289, 20, 9078, 13, 27354, 292, 316, 2134, 11537, 198, 220, 220, 220, 318, 62, 41887, 796, 10352, 198, 220, 220, 220, 318, 62, 5589, 633, 796, 10352, 198, 220, 220, 220, 287, 62, 67, 4906, 796, 289, 20, 62, 67, 2617, 13, 67, 4906, 198, 220, 220, 220, 1303, 16926, 46, 25, 3368, 13148, 362, 67, 5485, 532, 1521, 857, 530, 772, 761, 299, 62, 82, 12629, 22857, 775, 691, 1337, 546, 262, 938, 15793, 0, 198, 220, 220, 220, 299, 62, 40890, 796, 289, 20, 62, 67, 2617, 13, 43358, 58, 12, 16, 60, 198, 220, 220, 220, 611, 318, 62, 41887, 62, 67, 4906, 7, 71, 20, 62, 67, 2617, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 41887, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 67, 4906, 796, 45941, 13, 5305, 7, 71, 20, 62, 67, 2617, 58, 15, 11, 657, 35944, 67, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 16680, 796, 649, 62, 67, 4906, 13, 23814, 1096, 1635, 362, 198, 220, 220, 220, 220, 220, 220, 220, 25439, 796, 27172, 268, 62, 41887, 62, 1462, 62, 5305, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 40890, 1635, 28, 362, 198, 220, 220, 220, 1288, 361, 18896, 7, 71, 20, 62, 67, 2617, 13, 67, 4906, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2773, 1296, 286, 20793, 299, 32152, 318, 287, 779, 198, 220, 220, 220, 220, 220, 220, 220, 775, 691, 1104, 1103, 16578, 945, 329, 262, 7515, 3858, 379, 262, 1459, 640, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 5589, 633, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 24390, 1327, 12, 66, 7656, 284, 12178, 2624, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 67, 4906, 796, 45941, 13, 22468, 2624, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 16680, 796, 18896, 7, 259, 62, 67, 4906, 8, 1635, 649, 62, 67, 4906, 7, 15, 737, 23814, 1096, 198, 220, 220, 220, 220, 220, 220, 220, 25439, 796, 27172, 268, 62, 5589, 633, 62, 1462, 62, 5305, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 40890, 1635, 28, 18896, 7, 259, 62, 67, 4906, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 289, 20, 62, 67, 2617, 13, 67, 4906, 407, 287, 685, 37659, 13, 22468, 2624, 11, 45941, 13, 22468, 2414, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 67, 4906, 796, 45941, 13, 22468, 2624, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 67, 4906, 796, 289, 20, 62, 67, 2617, 13, 67, 4906, 13, 4906, 628, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 16680, 796, 649, 62, 67, 4906, 7, 15, 737, 23814, 1096, 628, 220, 220, 220, 220, 220, 220, 220, 25439, 796, 649, 62, 67, 4906, 628, 220, 220, 220, 1441, 25439, 11, 318, 62, 41887, 11, 318, 62, 5589, 633, 11, 299, 62, 40890, 11, 2099, 62, 16680, 628, 198, 4299, 8931, 62, 5305, 62, 1462, 62, 41887, 7, 9310, 62, 5305, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 350, 5500, 262, 1103, 290, 26726, 9004, 286, 262, 2810, 17593, 357, 259, 262, 938, 16488, 8, 1978, 284, 787, 3716, 17593, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 10541, 198, 220, 220, 220, 288, 82, 62, 5305, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 47671, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 63, 198, 220, 220, 220, 220, 220, 220, 220, 299, 38517, 1103, 12, 39728, 299, 32152, 7177, 393, 5572, 37, 20, 27039, 810, 1366, 14921, 355, 685, 39098, 11, 362, 2124, 3033, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 810, 262, 717, 2063, 286, 262, 3033, 389, 262, 1103, 7515, 290, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1218, 2063, 4909, 262, 26726, 6805, 198, 220, 220, 220, 16931, 1058, 20512, 11, 11902, 13, 15161, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 900, 284, 6407, 11, 481, 779, 16931, 360, 2093, 26515, 2427, 286, 287, 12, 31673, 299, 32152, 26515, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 82, 62, 5589, 633, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 63, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 362, 35, 3716, 7177, 14921, 355, 685, 39873, 11, 3033, 60, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 9310, 62, 5305, 11, 357, 37659, 13, 358, 18747, 11, 12379, 13, 7295, 13, 19182, 11, 289, 20, 9078, 13, 27354, 292, 316, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 9310, 62, 5305, 11, 357, 83, 29291, 11, 1351, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 3109, 7254, 379, 1551, 281, 11629, 540, 588, 257, 1351, 393, 46545, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 5305, 796, 45941, 13, 18747, 7, 9310, 62, 5305, 8, 198, 220, 220, 220, 611, 18896, 7, 9310, 62, 5305, 13, 67, 4906, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 19182, 2314, 423, 257, 13061, 288, 4906, 4943, 198, 220, 220, 220, 611, 318, 62, 41887, 62, 67, 4906, 7, 9310, 62, 5305, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 19182, 2314, 423, 3716, 288, 4906, 4943, 628, 220, 220, 220, 611, 288, 82, 62, 5305, 13, 43358, 58, 12, 16, 60, 1220, 362, 14512, 288, 82, 62, 5305, 13, 43358, 58, 12, 16, 60, 3373, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7203, 5956, 15793, 1276, 307, 772, 19943, 4943, 198, 220, 220, 220, 2063, 62, 4122, 796, 288, 82, 62, 5305, 13, 43358, 58, 12, 16, 60, 3373, 362, 628, 220, 220, 220, 611, 318, 39098, 7, 9310, 62, 5305, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 16931, 796, 6407, 628, 220, 220, 220, 611, 16931, 290, 407, 318, 39098, 7, 9310, 62, 5305, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 5305, 796, 16931, 62, 2220, 62, 18747, 7, 9310, 62, 5305, 8, 628, 220, 220, 220, 1441, 288, 82, 62, 5305, 58, 986, 11, 1058, 13959, 62, 4122, 60, 1343, 352, 73, 1635, 288, 82, 62, 5305, 58, 986, 11, 2063, 62, 4122, 47715, 628, 198, 4299, 8931, 62, 5305, 62, 1462, 62, 5589, 633, 7, 9310, 62, 5305, 11, 13061, 62, 4906, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1482, 24040, 257, 1103, 12, 39728, 27039, 284, 257, 13061, 27039, 357, 24176, 262, 938, 16488, 8, 286, 262, 2810, 13061, 288, 12, 4906, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 10541, 198, 220, 220, 220, 288, 82, 62, 5305, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 47671, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 63, 198, 220, 220, 220, 220, 220, 220, 220, 299, 38517, 1103, 12, 39728, 299, 32152, 7177, 393, 5572, 37, 20, 27039, 810, 1366, 14921, 355, 685, 39098, 11, 3033, 60, 198, 220, 220, 220, 13061, 62, 4906, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 67, 4906, 63, 198, 220, 220, 220, 220, 220, 220, 220, 12744, 3716, 1366, 12, 4906, 198, 220, 220, 220, 16931, 1058, 20512, 11, 11902, 13, 15161, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 900, 284, 6407, 11, 481, 779, 16931, 360, 2093, 26515, 2427, 286, 287, 12, 31673, 299, 32152, 26515, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 82, 62, 5589, 633, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 63, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 399, 12, 19577, 3716, 12, 39728, 7177, 14921, 355, 685, 39873, 11, 3033, 60, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 16931, 393, 318, 39098, 7, 9310, 62, 5305, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 10786, 43, 12582, 4905, 407, 1695, 2233, 284, 8889, 286, 360, 2093, 1104, 11537, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 9310, 62, 5305, 11, 357, 37659, 13, 358, 18747, 11, 289, 20, 9078, 13, 27354, 292, 316, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 9310, 62, 5305, 11, 357, 4868, 11, 46545, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 3109, 7254, 379, 1551, 281, 11629, 540, 588, 257, 1351, 393, 46545, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 5305, 796, 45941, 13, 18747, 7, 9310, 62, 5305, 8, 198, 220, 220, 220, 611, 18896, 7, 9310, 62, 5305, 13, 67, 4906, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 19182, 2314, 423, 257, 13061, 288, 4906, 4943, 198, 220, 220, 220, 1288, 361, 318, 62, 41887, 62, 67, 4906, 7, 9310, 62, 5305, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 7203, 19182, 2314, 423, 3716, 288, 4906, 4943, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 5589, 633, 62, 4906, 11, 45941, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 15946, 1384, 2134, 1276, 307, 257, 20793, 7177, 288, 4906, 11537, 628, 220, 220, 220, 649, 62, 16684, 62, 13664, 796, 288, 82, 62, 5305, 13, 43358, 58, 12, 16, 60, 1220, 18896, 7, 5589, 633, 62, 4906, 8, 198, 220, 220, 220, 611, 649, 62, 16684, 62, 13664, 4064, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 15946, 1384, 13061, 2099, 373, 407, 11670, 416, 1271, 286, 4847, 11537, 628, 220, 220, 220, 649, 62, 16684, 62, 13664, 796, 493, 7, 3605, 62, 16684, 62, 13664, 8, 198, 220, 220, 220, 649, 62, 43358, 796, 1351, 7, 9310, 62, 5305, 13, 43358, 8, 220, 1303, 6889, 4517, 540, 198, 220, 220, 220, 649, 62, 43358, 58, 12, 16, 60, 796, 649, 62, 16684, 62, 13664, 628, 220, 220, 220, 36470, 796, 45941, 198, 220, 220, 220, 479, 86, 22046, 796, 23884, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 39098, 7, 9310, 62, 5305, 11, 289, 20, 9078, 13, 27354, 292, 316, 8, 290, 407, 16931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 9828, 10786, 39, 8068, 20, 40522, 481, 307, 9639, 355, 360, 2093, 26515, 287, 262, 2003, 13, 37941, 532, 479, 86, 853, 16931, 481, 4277, 284, 6407, 287, 2003, 10050, 286, 9785, 9078, 11537, 198, 220, 220, 220, 611, 318, 39098, 7, 9310, 62, 5305, 11, 12379, 13, 7295, 13, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 16931, 796, 6407, 220, 220, 220, 220, 198, 220, 220, 220, 611, 16931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 36470, 796, 12379, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 5305, 796, 16931, 62, 2220, 62, 18747, 7, 9310, 62, 5305, 8, 198, 220, 220, 220, 220, 220, 220, 220, 479, 86, 22046, 796, 1391, 6, 354, 14125, 10354, 705, 23736, 6, 92, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 288, 82, 62, 5589, 633, 796, 36470, 13, 28920, 7, 3605, 62, 43358, 11, 288, 4906, 28, 5589, 633, 62, 4906, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 329, 1438, 62, 521, 11, 1438, 287, 27056, 378, 7, 5589, 633, 62, 4906, 13, 14933, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 9688, 796, 1438, 62, 521, 1635, 649, 62, 16684, 62, 13664, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 437, 796, 357, 3672, 62, 521, 1343, 352, 8, 1635, 649, 62, 16684, 62, 13664, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 62, 5589, 633, 58, 3672, 60, 796, 288, 82, 62, 5305, 58, 986, 11, 1312, 62, 9688, 25, 72, 62, 437, 60, 628, 220, 220, 220, 1441, 288, 82, 62, 5589, 633, 13, 16485, 1453, 2736, 3419, 628, 198, 4299, 8931, 62, 5305, 62, 1462, 62, 16793, 62, 67, 4906, 7, 9310, 62, 5305, 11, 649, 62, 67, 4906, 11, 16931, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3602, 23914, 1103, 1366, 656, 262, 2496, 288, 4906, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 82, 62, 5305, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 47671, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 393, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 292, 316, 63, 198, 220, 220, 220, 220, 220, 220, 220, 299, 38517, 1103, 12, 39728, 299, 32152, 7177, 393, 5572, 37, 20, 27039, 198, 220, 220, 220, 649, 62, 67, 4906, 1058, 1058, 4871, 25, 63, 77, 32152, 13, 67, 4906, 63, 198, 220, 220, 220, 220, 220, 220, 220, 12744, 1366, 12, 4906, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 1005, 62, 2100, 1058, 220, 1058, 4871, 25, 63, 77, 32152, 13, 358, 18747, 63, 393, 1058, 4871, 25, 63, 67, 2093, 13, 18747, 13, 7295, 13, 19182, 63, 198, 220, 220, 220, 220, 220, 220, 220, 399, 12, 19577, 7177, 286, 262, 2496, 1366, 12, 4906, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 62, 41887, 62, 67, 4906, 7, 3605, 62, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8931, 62, 5305, 62, 1462, 62, 41887, 7, 9310, 62, 5305, 11, 16931, 28, 75, 12582, 8, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 3605, 62, 67, 4906, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 8931, 62, 5305, 62, 1462, 62, 5589, 633, 7, 9310, 62, 5305, 11, 649, 62, 67, 4906, 11, 16931, 28, 75, 12582, 8, 198, 220, 220, 220, 2845, 5994, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 62, 67, 4906, 7, 9310, 62, 5305, 8, 628, 220, 220, 220, 1303, 16508, 477, 584, 2663, 11, 884, 355, 45941, 13, 67, 4906, 10786, 27, 69, 19, 11537, 198, 220, 220, 220, 1441, 649, 62, 67, 4906, 13, 4906, 7, 9310, 62, 5305, 8, 628, 198, 4299, 26571, 62, 67, 4906, 7, 67, 4906, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 47719, 262, 2810, 2134, 284, 4155, 326, 340, 318, 257, 4938, 288, 4906, 326, 460, 307, 3194, 284, 281, 5572, 37, 20, 2393, 13, 198, 220, 220, 220, 7567, 2696, 257, 2099, 4049, 611, 12515, 13, 16409, 6407, 611, 262, 2134, 3804, 262, 5254, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 4906, 1058, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 9515, 326, 318, 11481, 257, 1058, 4871, 25, 63, 71, 20, 9078, 13, 27354, 265, 2981, 47671, 393, 1058, 4871, 25, 63, 77, 32152, 13, 67, 4906, 63, 2134, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 3722, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 262, 2134, 373, 257, 4938, 1366, 12, 4906, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 39098, 7, 67, 4906, 11, 357, 71, 20, 9078, 13, 27354, 265, 2981, 11, 45941, 13, 67, 4906, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 37659, 13, 67, 4906, 7, 67, 4906, 828, 45941, 13, 67, 4906, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 770, 815, 4929, 477, 883, 10245, 618, 288, 4906, 318, 1223, 5385, 588, 532, 45941, 13, 22468, 2624, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 5994, 12331, 10786, 67, 4906, 815, 2035, 307, 257, 299, 32152, 393, 289, 20, 9078, 288, 4906, 11537, 198, 220, 220, 220, 1441, 6407, 628, 198, 4299, 318, 62, 41887, 62, 67, 4906, 7, 67, 4906, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 47719, 611, 262, 2810, 288, 4906, 318, 257, 3716, 288, 4906, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 288, 4906, 1058, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 9515, 326, 318, 257, 1398, 25, 63, 71, 20, 9078, 13, 27354, 265, 2981, 47671, 393, 1058, 4871, 25, 63, 77, 32152, 13, 67, 4906, 63, 2134, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 318, 62, 41887, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 262, 288, 4906, 373, 257, 3716, 288, 4906, 13, 25974, 5860, 10352, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 26571, 62, 67, 4906, 7, 67, 4906, 8, 198, 220, 220, 220, 611, 288, 4906, 287, 685, 37659, 13, 41887, 11, 45941, 13, 41887, 2414, 11, 45941, 13, 41887, 12762, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 220, 220, 220, 1441, 10352, 198 ]
2.504848
5,776
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains functions related with Pixar USD usdview application """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "[email protected]" import os import sys import logging import subprocess from artellapipe.libs.usd.core import usdpaths LOGGER = logging.getLogger('artellapipe-libs-usd') def get_usd_view_path(): """ Returns path to USD view executable :return: str """ platform_path = usdpaths.get_platform_path() usd_view_path = os.path.join(platform_path, 'pixar', 'bin', 'usdview') return usd_view_path def open_usd_file(usd_file_path): """ Opens given USD file in USD viewer (usdview) :param usd_file_path: str :return: bool """ if not usd_file_path or not os.path.isfile(usd_file_path): LOGGER.warning('Given USD file path does not exists: {}!'.format(usd_file_path)) return False usd_view_path = get_usd_view_path() if not os.path.exists(usd_view_path): LOGGER.warning( 'usdview path does not exists: {}. Impossible to open USD file!'.format(usd_view_path)) return False usd_view_python_libs_path = get_usd_view_python_libs_path() if not os.path.isdir(usd_view_python_libs_path): LOGGER.warning( 'No usdview Pythyon libs directory found. usdview cannot be opened or usdview OpenGL can be disabled') usd_view_python_libs_path = None pixar_usd_binaries_path = usdpaths.get_pixar_usd_binaries_path() if not pixar_usd_binaries_path: LOGGER.warning( 'No Pixar USD binaries path found: "{}". Impossible to launch usdview'.format(pixar_usd_binaries_path)) return False pixar_usd_libraries_path = usdpaths.get_pixar_usd_libraries_path() if not pixar_usd_libraries_path: LOGGER.warning( 'No Pixar USD libraries path found: "{}". Impossible to launch usdview'.format(pixar_usd_libraries_path)) return False # Dictionary that contains the environment configuration that will be used by usdview instance usd_view_env = dict() usd_view_env['PATH'] = r'{}{}{}'.format(pixar_usd_binaries_path, os.pathsep, pixar_usd_libraries_path) pixar_usd_python_libs_path = usdpaths.get_pixar_usd_python_libs_path() if pixar_usd_python_libs_path and os.path.isdir(pixar_usd_python_libs_path): if usd_view_python_libs_path and os.path.isdir(usd_view_python_libs_path): usd_view_env['PYTHONPATH'] = r'{}{}{}'.format( pixar_usd_python_libs_path, os.pathsep, usd_view_python_libs_path) else: usd_view_env['PYTHONPATH'] = r'{}'.format(pixar_usd_python_libs_path) else: if usd_view_python_libs_path and os.path.isdir(usd_view_python_libs_path): usd_view_env['PYTHONPATH'] = r'{}'.format(usd_view_python_libs_path) usd_view_plugins_path = get_usd_view_plugins_path() if usd_view_plugins_path and os.path.isdir(usd_view_python_libs_path): usd_view_env['PYTHONPATH'] += r'{}{}'.format(os.pathsep, usd_view_plugins_path) for name in os.listdir(usd_view_plugins_path): plugin_path = os.path.join(usd_view_plugins_path, name) if not os.path.isdir(plugin_path): continue if usd_view_env.get('PXR_PLUGINPATH_NAME', None): usd_view_env['PXR_PLUGINPATH_NAME'] += r'{}{}'.format(os.pathsep, plugin_path) else: usd_view_env['PXR_PLUGINPATH_NAME'] = r'{}'.format(plugin_path) p = subprocess.Popen( ['python.exe', usd_view_path, usd_file_path], env=usd_view_env) # output, error = p.communicate() # if error: # LOGGER.error('>>> usdview: {}'.format(error)) return True
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26796, 326, 4909, 5499, 3519, 351, 46706, 11403, 514, 67, 1177, 3586, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 11, 4112, 62, 11748, 198, 198, 834, 9800, 834, 796, 366, 13787, 292, 350, 2668, 64, 1, 198, 834, 43085, 834, 796, 366, 36393, 1, 198, 834, 76, 2913, 10613, 834, 796, 366, 13787, 292, 350, 2668, 64, 1, 198, 834, 12888, 834, 796, 366, 34788, 2668, 265, 67, 31, 14816, 13, 785, 1, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 198, 6738, 610, 33331, 499, 3757, 13, 8019, 82, 13, 385, 67, 13, 7295, 1330, 514, 67, 6978, 82, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 10786, 433, 695, 499, 3757, 12, 8019, 82, 12, 385, 67, 11537, 628, 198, 4299, 651, 62, 385, 67, 62, 1177, 62, 6978, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 3108, 284, 11403, 1570, 28883, 198, 220, 220, 220, 1058, 7783, 25, 965, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 3859, 62, 6978, 796, 514, 67, 6978, 82, 13, 1136, 62, 24254, 62, 6978, 3419, 628, 220, 220, 220, 514, 67, 62, 1177, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 24254, 62, 6978, 11, 705, 79, 844, 283, 3256, 705, 8800, 3256, 705, 385, 67, 1177, 11537, 628, 220, 220, 220, 1441, 514, 67, 62, 1177, 62, 6978, 628, 628, 198, 4299, 1280, 62, 385, 67, 62, 7753, 7, 385, 67, 62, 7753, 62, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8670, 641, 1813, 11403, 2393, 287, 11403, 19091, 357, 385, 67, 1177, 8, 198, 220, 220, 220, 1058, 17143, 514, 67, 62, 7753, 62, 6978, 25, 965, 198, 220, 220, 220, 1058, 7783, 25, 20512, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 611, 407, 514, 67, 62, 7753, 62, 6978, 393, 407, 28686, 13, 6978, 13, 4468, 576, 7, 385, 67, 62, 7753, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 13, 43917, 10786, 15056, 11403, 2393, 3108, 857, 407, 7160, 25, 23884, 0, 4458, 18982, 7, 385, 67, 62, 7753, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 514, 67, 62, 1177, 62, 6978, 796, 651, 62, 385, 67, 62, 1177, 62, 6978, 3419, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 385, 67, 62, 1177, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 13, 43917, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 67, 1177, 3108, 857, 407, 7160, 25, 23884, 13, 38791, 284, 1280, 11403, 2393, 0, 4458, 18982, 7, 385, 67, 62, 1177, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 514, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 796, 651, 62, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 3419, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 9409, 343, 7, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 13, 43917, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2949, 514, 67, 1177, 48657, 19181, 9195, 82, 8619, 1043, 13, 514, 67, 1177, 2314, 307, 4721, 393, 514, 67, 1177, 30672, 460, 307, 10058, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 796, 6045, 628, 220, 220, 220, 279, 844, 283, 62, 385, 67, 62, 8800, 3166, 62, 6978, 796, 514, 67, 6978, 82, 13, 1136, 62, 79, 844, 283, 62, 385, 67, 62, 8800, 3166, 62, 6978, 3419, 198, 220, 220, 220, 611, 407, 279, 844, 283, 62, 385, 67, 62, 8800, 3166, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 13, 43917, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2949, 46706, 11403, 38640, 3108, 1043, 25, 45144, 92, 1911, 38791, 284, 4219, 514, 67, 1177, 4458, 18982, 7, 79, 844, 283, 62, 385, 67, 62, 8800, 3166, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 279, 844, 283, 62, 385, 67, 62, 75, 11127, 62, 6978, 796, 514, 67, 6978, 82, 13, 1136, 62, 79, 844, 283, 62, 385, 67, 62, 75, 11127, 62, 6978, 3419, 198, 220, 220, 220, 611, 407, 279, 844, 283, 62, 385, 67, 62, 75, 11127, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 41605, 30373, 13, 43917, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2949, 46706, 11403, 12782, 3108, 1043, 25, 45144, 92, 1911, 38791, 284, 4219, 514, 67, 1177, 4458, 18982, 7, 79, 844, 283, 62, 385, 67, 62, 75, 11127, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 1303, 28261, 326, 4909, 262, 2858, 8398, 326, 481, 307, 973, 416, 514, 67, 1177, 4554, 198, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 796, 8633, 3419, 628, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 34219, 20520, 796, 374, 6, 90, 18477, 18477, 92, 4458, 18982, 7, 79, 844, 283, 62, 385, 67, 62, 8800, 3166, 62, 6978, 11, 28686, 13, 6978, 325, 79, 11, 279, 844, 283, 62, 385, 67, 62, 75, 11127, 62, 6978, 8, 628, 220, 220, 220, 279, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 796, 514, 67, 6978, 82, 13, 1136, 62, 79, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 3419, 198, 220, 220, 220, 611, 279, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 290, 28686, 13, 6978, 13, 9409, 343, 7, 79, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 514, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 290, 28686, 13, 6978, 13, 9409, 343, 7, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 47, 56, 4221, 1340, 34219, 20520, 796, 374, 6, 90, 18477, 18477, 92, 4458, 18982, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 11, 28686, 13, 6978, 325, 79, 11, 514, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 47, 56, 4221, 1340, 34219, 20520, 796, 374, 6, 90, 92, 4458, 18982, 7, 79, 844, 283, 62, 385, 67, 62, 29412, 62, 8019, 82, 62, 6978, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 514, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 290, 28686, 13, 6978, 13, 9409, 343, 7, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 47, 56, 4221, 1340, 34219, 20520, 796, 374, 6, 90, 92, 4458, 18982, 7, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 8, 628, 220, 220, 220, 514, 67, 62, 1177, 62, 37390, 62, 6978, 796, 651, 62, 385, 67, 62, 1177, 62, 37390, 62, 6978, 3419, 198, 220, 220, 220, 611, 514, 67, 62, 1177, 62, 37390, 62, 6978, 290, 28686, 13, 6978, 13, 9409, 343, 7, 385, 67, 62, 1177, 62, 29412, 62, 8019, 82, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 47, 56, 4221, 1340, 34219, 20520, 15853, 374, 6, 90, 18477, 92, 4458, 18982, 7, 418, 13, 6978, 325, 79, 11, 514, 67, 62, 1177, 62, 37390, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1438, 287, 28686, 13, 4868, 15908, 7, 385, 67, 62, 1177, 62, 37390, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13877, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 385, 67, 62, 1177, 62, 37390, 62, 6978, 11, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 9409, 343, 7, 33803, 62, 6978, 2599, 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, 611, 514, 67, 62, 1177, 62, 24330, 13, 1136, 10786, 47, 55, 49, 62, 6489, 7340, 1268, 34219, 62, 20608, 3256, 6045, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 67, 62, 1177, 62, 24330, 17816, 47, 55, 49, 62, 6489, 7340, 1268, 34219, 62, 20608, 20520, 15853, 374, 6, 90, 18477, 92, 4458, 18982, 7, 418, 13, 6978, 325, 79, 11, 13877, 62, 6978, 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, 514, 67, 62, 1177, 62, 24330, 17816, 47, 55, 49, 62, 6489, 7340, 1268, 34219, 62, 20608, 20520, 796, 374, 6, 90, 92, 4458, 18982, 7, 33803, 62, 6978, 8, 628, 220, 220, 220, 279, 796, 850, 14681, 13, 47, 9654, 7, 198, 220, 220, 220, 220, 220, 220, 220, 37250, 29412, 13, 13499, 3256, 514, 67, 62, 1177, 62, 6978, 11, 514, 67, 62, 7753, 62, 6978, 4357, 17365, 28, 385, 67, 62, 1177, 62, 24330, 8, 198, 220, 220, 220, 1303, 5072, 11, 4049, 796, 279, 13, 10709, 5344, 3419, 198, 220, 220, 220, 1303, 611, 4049, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 41605, 30373, 13, 18224, 10786, 33409, 514, 67, 1177, 25, 23884, 4458, 18982, 7, 18224, 4008, 628, 220, 220, 220, 1441, 6407, 198 ]
2.206466
1,763
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # #TOFILL if __name__ == '__main__': param = [ (4,'aggayxysdfa','aggajxaaasdfa',), (2,'55571659965107','390286654154',), (3,'01011011100','0000110001000',), (5,'aggasdfa','aggajasdfaxy',), (2,'5710246551','79032504084062',), (3,'0100010','10100000',), (3,'aabcaaaa','baaabcd',), (1,'1219','3337119582',), (2,'111000011','011',), (2,'wiC oD','csiuGOUwE',) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
[ 2, 15069, 357, 66, 8, 13130, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, 2, 628, 198, 2, 10468, 37, 8267, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5772, 796, 685, 198, 220, 220, 220, 357, 19, 4032, 9460, 323, 87, 893, 7568, 64, 41707, 9460, 1228, 87, 7252, 292, 7568, 64, 3256, 828, 198, 220, 220, 220, 357, 17, 4032, 2816, 3553, 20986, 2079, 2996, 15982, 41707, 25964, 2078, 2791, 4051, 21526, 3256, 828, 198, 220, 220, 220, 357, 18, 4032, 486, 486, 8784, 42060, 41707, 2388, 1157, 18005, 830, 3256, 828, 198, 220, 220, 220, 357, 20, 4032, 9460, 292, 7568, 64, 41707, 9460, 1228, 292, 7568, 6969, 3256, 828, 198, 220, 220, 220, 357, 17, 4032, 3553, 940, 26912, 43697, 41707, 37750, 2624, 1120, 26200, 1821, 5237, 3256, 828, 198, 220, 220, 220, 357, 18, 4032, 486, 18005, 15, 41707, 8784, 20483, 3256, 828, 198, 220, 220, 220, 357, 18, 4032, 64, 397, 6888, 46071, 41707, 7012, 64, 397, 10210, 3256, 828, 198, 220, 220, 220, 357, 16, 4032, 1065, 1129, 41707, 2091, 2718, 16315, 46044, 3256, 828, 198, 220, 220, 220, 357, 17, 4032, 16243, 2388, 1157, 41707, 28555, 3256, 828, 198, 220, 220, 220, 357, 17, 4032, 37686, 34, 267, 35, 41707, 6359, 16115, 38, 2606, 86, 36, 3256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 299, 62, 13138, 796, 657, 198, 220, 220, 220, 329, 1312, 11, 10007, 62, 2617, 287, 27056, 378, 7, 17143, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 277, 62, 20286, 46491, 17143, 7307, 62, 2617, 8, 6624, 277, 62, 24267, 46491, 17143, 7307, 62, 2617, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 62, 13138, 47932, 16, 198, 220, 220, 220, 3601, 7203, 2, 25468, 25, 4064, 72, 11, 4064, 72, 1, 4064, 357, 77, 62, 13138, 11, 18896, 7, 17143, 22305 ]
2.236915
363
import numpy as np import os import copy import torch import torch.nn as nn from torch.optim import Adam import torch.nn.functional as FF os.environ['CUDA_VISIBLE_DEVICES'] = '1' USE_CUDA = torch.cuda.is_available() FloatTensor = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor Device = torch.device("cuda" if USE_CUDA else "cpu")
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 40085, 1330, 7244, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 18402, 198, 198, 418, 13, 268, 2268, 17816, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 20520, 796, 705, 16, 6, 198, 19108, 62, 43633, 5631, 796, 28034, 13, 66, 15339, 13, 271, 62, 15182, 3419, 198, 43879, 51, 22854, 796, 28034, 13, 66, 15339, 13, 43879, 51, 22854, 611, 23210, 62, 43633, 5631, 2073, 28034, 13, 43879, 51, 22854, 198, 24728, 796, 28034, 13, 25202, 7203, 66, 15339, 1, 611, 23210, 62, 43633, 5631, 2073, 366, 36166, 4943, 628, 628, 628, 628, 198 ]
2.892562
121
from QuickPotato.database.queries import Crud
[ 6738, 12029, 25396, 5549, 13, 48806, 13, 421, 10640, 1330, 3864, 463, 628, 628 ]
3.5
14
# # example from CHiLL manual page 13 # # peel 4 statements from the END of innermost loop # from chill import * source('peel9101112.c') destination('peel12modified.c') procedure('mm') loop(0) peel(1,2,-4) # statement 1, loop 2 (middle, for j), 4 statements from END
[ 2, 198, 2, 220, 1672, 422, 5870, 72, 3069, 10107, 2443, 1511, 198, 2, 198, 2, 220, 31738, 604, 6299, 422, 262, 23578, 286, 8434, 1712, 9052, 198, 2, 198, 198, 6738, 20493, 1330, 1635, 198, 198, 10459, 10786, 431, 417, 6420, 486, 14686, 13, 66, 11537, 198, 16520, 1883, 10786, 431, 417, 1065, 41771, 13, 66, 11537, 198, 198, 1676, 771, 495, 10786, 3020, 11537, 198, 198, 26268, 7, 15, 8, 198, 198, 431, 417, 7, 16, 11, 17, 12095, 19, 8, 220, 1303, 2643, 352, 11, 9052, 362, 357, 27171, 11, 329, 474, 828, 604, 6299, 422, 23578, 628 ]
2.732673
101
import scrapy from opencc import OpenCC import os all = [[]] del(all[0])
[ 11748, 15881, 88, 198, 6738, 1280, 535, 1330, 4946, 4093, 198, 11748, 28686, 198, 198, 439, 796, 16410, 11907, 198, 12381, 7, 439, 58, 15, 12962 ]
2.807692
26
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'example.app.views.home'), url(r'^admin/', include(admin.site.urls)), url(r'^signup-email/', 'example.app.views.signup_email'), url(r'^email-sent/', 'example.app.views.validation_sent'), url(r'^login/$', 'example.app.views.home'), url(r'^logout/$', 'example.app.views.logout'), url(r'^done/$', 'example.app.views.done', name='done'), url(r'^email/$', 'example.app.views.require_email', name='require_email'), url(r'', include('social.apps.django_app.urls', namespace='social')) )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 198, 28482, 13, 2306, 375, 29392, 3419, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 11195, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 28482, 14, 3256, 2291, 7, 28482, 13, 15654, 13, 6371, 82, 36911, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 12683, 929, 12, 12888, 14, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 12683, 929, 62, 12888, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 12888, 12, 34086, 14, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 12102, 341, 62, 34086, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 38235, 32624, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 11195, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 6404, 448, 32624, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 6404, 448, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 28060, 32624, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 28060, 3256, 1438, 11639, 28060, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 12888, 32624, 3256, 705, 20688, 13, 1324, 13, 33571, 13, 46115, 62, 12888, 3256, 1438, 11639, 46115, 62, 12888, 33809, 198, 220, 220, 220, 19016, 7, 81, 6, 3256, 2291, 10786, 14557, 13, 18211, 13, 28241, 14208, 62, 1324, 13, 6371, 82, 3256, 25745, 11639, 14557, 6, 4008, 198, 8, 198 ]
2.520913
263
if __name__ == "__main__": main()
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.105263
19
from functools import wraps from http import HTTPStatus from django.utils.translation import gettext as _ from apps.api.errors import ApiException def signature_exempt(view_func): """Mark a view function as being exempt from signature and apikey check.""" wrapped_view.signature_exempt = True return wraps(view_func)(wrapped_view)
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 355, 4808, 198, 198, 6738, 6725, 13, 15042, 13, 48277, 1330, 5949, 72, 16922, 628, 628, 198, 4299, 9877, 62, 42679, 7, 1177, 62, 20786, 2599, 198, 220, 220, 220, 37227, 9704, 257, 1570, 2163, 355, 852, 13068, 422, 9877, 290, 2471, 522, 88, 2198, 526, 15931, 198, 220, 220, 220, 12908, 62, 1177, 13, 12683, 1300, 62, 42679, 796, 6407, 198, 220, 220, 220, 1441, 27521, 7, 1177, 62, 20786, 5769, 29988, 1496, 62, 1177, 8, 198 ]
3.421569
102
from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants page_sequence = [ QV ]
[ 6738, 267, 21048, 13, 15042, 1330, 20113, 355, 269, 11, 7395, 62, 9521, 198, 6738, 47540, 18780, 259, 1330, 7873, 11, 16314, 9876, 198, 6738, 764, 27530, 1330, 4757, 1187, 628, 198, 198, 7700, 62, 43167, 796, 685, 198, 220, 220, 220, 1195, 53, 198, 60, 198 ]
3.170213
47
#!/usr/bin/env python3 import os import sys import random from pprint import pprint import yaml import raffle # ------------------------ # Command-line interface # ------------------------ USAGE = f""" Usage: {os.path.basename(__file__)} config_file [random_seed] config_file (required): Raffle configuration file in YAML format. See config.sample.yaml for an example. random_seed (optional): An optional seed value to use for the underlying random number generator. Use this parameter for greater control and repeatable results. If not specified, the random number generator will use cryptographic random values provided by the operating system. """ try: with open(sys.argv[1], 'r') as config_file: configuration = yaml.safe_load(config_file) random_seed = sys.argv[2] if len(sys.argv) > 2 else None except (IndexError, IOError, yaml.parser.ParserError) as e: sys.stderr.write(USAGE) raise e try: prizes = configuration['prizes'] entries = configuration['entries'] preferences = configuration['preferences'] except KeyError as e: sys.stderr.write(f"Invalid configuration file: {repr(e)}\n") sys.exit(1) if random_seed: print(f"Using random seed: {random_seed}") random_source = random.Random(random_seed) else: print("Using system random number generator") random_source = random.SystemRandom() print("Running raffle with configuration:") pprint(configuration) results = raffle.raffle(prizes, entries, preferences, random_source) leftover_prizes = list(prizes) print("=" * 78) print("Results:\n") for i, (participant, prize) in enumerate(results): print(f"{i + 1}: {participant} -> {prize}") leftover_prizes.remove(prize) print("=" * 78) print("Leftover prizes:\n") pprint(leftover_prizes)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4738, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 11748, 331, 43695, 198, 198, 11748, 374, 30697, 198, 198, 2, 220, 22369, 198, 2, 220, 9455, 12, 1370, 7071, 198, 2, 220, 22369, 198, 198, 2937, 11879, 796, 277, 37811, 198, 28350, 25, 1391, 418, 13, 6978, 13, 12093, 12453, 7, 834, 7753, 834, 38165, 4566, 62, 7753, 685, 25120, 62, 28826, 60, 628, 220, 220, 220, 4566, 62, 7753, 357, 35827, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 371, 30697, 8398, 2393, 287, 575, 2390, 43, 5794, 13, 4091, 4566, 13, 39873, 13, 88, 43695, 198, 220, 220, 220, 220, 220, 220, 220, 329, 281, 1672, 13, 198, 220, 220, 220, 4738, 62, 28826, 357, 25968, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1052, 11902, 9403, 1988, 284, 779, 329, 262, 10238, 4738, 1271, 198, 220, 220, 220, 220, 220, 220, 220, 17301, 13, 5765, 428, 11507, 329, 3744, 1630, 290, 9585, 540, 198, 220, 220, 220, 220, 220, 220, 220, 2482, 13, 1002, 407, 7368, 11, 262, 4738, 1271, 17301, 481, 779, 198, 220, 220, 220, 220, 220, 220, 220, 40705, 4738, 3815, 2810, 416, 262, 5361, 1080, 13, 198, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, 351, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357, 705, 81, 11537, 355, 4566, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8398, 796, 331, 43695, 13, 21230, 62, 2220, 7, 11250, 62, 7753, 8, 628, 220, 220, 220, 4738, 62, 28826, 796, 25064, 13, 853, 85, 58, 17, 60, 611, 18896, 7, 17597, 13, 853, 85, 8, 1875, 362, 2073, 6045, 198, 198, 16341, 357, 15732, 12331, 11, 24418, 12331, 11, 331, 43695, 13, 48610, 13, 46677, 12331, 8, 355, 304, 25, 198, 220, 220, 220, 25064, 13, 301, 1082, 81, 13, 13564, 7, 2937, 11879, 8, 198, 220, 220, 220, 5298, 304, 198, 198, 28311, 25, 198, 220, 220, 220, 21740, 796, 8398, 17816, 3448, 12271, 20520, 198, 220, 220, 220, 12784, 796, 8398, 17816, 298, 1678, 20520, 198, 220, 220, 220, 15387, 796, 8398, 17816, 3866, 69, 4972, 20520, 198, 16341, 7383, 12331, 355, 304, 25, 198, 220, 220, 220, 25064, 13, 301, 1082, 81, 13, 13564, 7, 69, 1, 44651, 8398, 2393, 25, 1391, 260, 1050, 7, 68, 8, 32239, 77, 4943, 198, 220, 220, 220, 25064, 13, 37023, 7, 16, 8, 198, 198, 361, 4738, 62, 28826, 25, 198, 220, 220, 220, 3601, 7, 69, 1, 12814, 4738, 9403, 25, 1391, 25120, 62, 28826, 92, 4943, 198, 220, 220, 220, 4738, 62, 10459, 796, 4738, 13, 29531, 7, 25120, 62, 28826, 8, 198, 17772, 25, 198, 220, 220, 220, 3601, 7203, 12814, 1080, 4738, 1271, 17301, 4943, 198, 220, 220, 220, 4738, 62, 10459, 796, 4738, 13, 11964, 29531, 3419, 198, 198, 4798, 7203, 28768, 374, 30697, 351, 8398, 25, 4943, 198, 381, 22272, 7, 11250, 3924, 8, 198, 198, 43420, 796, 374, 30697, 13, 430, 487, 293, 7, 3448, 12271, 11, 12784, 11, 15387, 11, 4738, 62, 10459, 8, 198, 198, 9464, 2502, 62, 3448, 12271, 796, 1351, 7, 3448, 12271, 8, 198, 4798, 7203, 2625, 1635, 8699, 8, 198, 4798, 7203, 25468, 7479, 77, 4943, 198, 1640, 1312, 11, 357, 48013, 415, 11, 11596, 8, 287, 27056, 378, 7, 43420, 2599, 198, 220, 220, 220, 3601, 7, 69, 1, 90, 72, 1343, 352, 38362, 1391, 48013, 415, 92, 4613, 1391, 3448, 2736, 92, 4943, 198, 220, 220, 220, 39191, 62, 3448, 12271, 13, 28956, 7, 3448, 2736, 8, 198, 198, 4798, 7203, 2625, 1635, 8699, 8, 198, 4798, 7203, 18819, 2502, 21740, 7479, 77, 4943, 198, 381, 22272, 7, 9464, 2502, 62, 3448, 12271, 8, 198 ]
2.898734
632
from django.contrib import admin from .models import Comment admin.site.register(Comment, CommentAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 18957, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 21357, 11, 18957, 46787, 8, 198 ]
3.6
30
#!/home/ssericksen/anaconda2/bin/python2.7 import pandas as pd import numpy as np # load Ching-Pei's compound scores for BGLF4 with PKIS1 df1 = pd.read_csv('bglf4_pkis1', sep=" ") df1.set_index('fid', inplace=True) df1.columns = ['BGLF4'] df1.index.rename('molid', inplace=True) df1.index = df1.index.map(str) # load informer list as dataframe df2 = pd.read_csv('new_pkis1_informers_CP.csv', header=None) df2.set_index(0, inplace=True) df2.index.rename('molid', inplace=True) df2.columns = ['BGLF4'] df2.index = df2.index.map(str) # merge dataframes df3 = pd.concat( [df1, df2], axis=0 ) print("duplicated indices: {}").format( df3.duplicated().sum() ) # check duplicates for PKIS1 molid '11959682' print( df3.loc['11959682'] )
[ 2, 48443, 11195, 14, 824, 263, 3378, 268, 14, 272, 330, 13533, 17, 14, 8800, 14, 29412, 17, 13, 22, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 3440, 609, 278, 12, 6435, 72, 338, 13061, 8198, 329, 347, 8763, 37, 19, 351, 29673, 1797, 16, 198, 7568, 16, 796, 279, 67, 13, 961, 62, 40664, 10786, 35904, 1652, 19, 62, 79, 74, 271, 16, 3256, 41767, 2625, 366, 8, 198, 7568, 16, 13, 2617, 62, 9630, 10786, 69, 312, 3256, 287, 5372, 28, 17821, 8, 198, 7568, 16, 13, 28665, 82, 796, 37250, 33, 8763, 37, 19, 20520, 198, 7568, 16, 13, 9630, 13, 918, 480, 10786, 76, 10180, 3256, 287, 5372, 28, 17821, 8, 198, 7568, 16, 13, 9630, 796, 47764, 16, 13, 9630, 13, 8899, 7, 2536, 8, 198, 198, 2, 3440, 4175, 263, 1351, 355, 1366, 14535, 198, 7568, 17, 796, 279, 67, 13, 961, 62, 40664, 10786, 3605, 62, 79, 74, 271, 16, 62, 259, 687, 364, 62, 8697, 13, 40664, 3256, 13639, 28, 14202, 8, 198, 7568, 17, 13, 2617, 62, 9630, 7, 15, 11, 287, 5372, 28, 17821, 8, 198, 7568, 17, 13, 9630, 13, 918, 480, 10786, 76, 10180, 3256, 287, 5372, 28, 17821, 8, 198, 7568, 17, 13, 28665, 82, 796, 37250, 33, 8763, 37, 19, 20520, 198, 7568, 17, 13, 9630, 796, 47764, 17, 13, 9630, 13, 8899, 7, 2536, 8, 198, 198, 2, 20121, 1366, 37805, 198, 7568, 18, 796, 279, 67, 13, 1102, 9246, 7, 685, 7568, 16, 11, 47764, 17, 4357, 16488, 28, 15, 1267, 198, 4798, 7203, 646, 489, 3474, 36525, 25, 23884, 11074, 18982, 7, 47764, 18, 13, 646, 489, 3474, 22446, 16345, 3419, 1267, 198, 198, 2, 2198, 14184, 16856, 329, 29673, 1797, 16, 285, 10180, 705, 16315, 3270, 43950, 6, 198, 4798, 7, 47764, 18, 13, 17946, 17816, 16315, 3270, 43950, 20520, 1267, 628 ]
2.29375
320
import pandas as pd import numpy as np
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628, 628 ]
2.875
16
letters = 'abcdefghijklmnopqrstuvwxyz' numbers = '0123456789' """Teste Main criado para testar as funรงรตes. """ if __name__ == '__main__': print(er_to_afd('[J-M1-9]abc')) # er_to_afd('a(a|b)*a') # er_to_afd('aa*(bb*aa*b)*')
[ 198, 198, 15653, 796, 705, 39305, 4299, 456, 2926, 41582, 10295, 404, 80, 81, 301, 14795, 86, 5431, 89, 6, 198, 77, 17024, 796, 705, 486, 1954, 2231, 3134, 4531, 6, 628, 198, 198, 37811, 14402, 68, 198, 13383, 269, 380, 4533, 31215, 1332, 283, 355, 1257, 16175, 127, 113, 274, 13, 198, 37811, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 263, 62, 1462, 62, 1878, 67, 10786, 58, 41, 12, 44, 16, 12, 24, 60, 39305, 6, 4008, 198, 220, 220, 220, 1303, 1931, 62, 1462, 62, 1878, 67, 10786, 64, 7, 64, 91, 65, 27493, 64, 11537, 198, 220, 220, 220, 1303, 1931, 62, 1462, 62, 1878, 67, 10786, 7252, 9, 7, 11848, 9, 7252, 9, 65, 27493, 11537, 628 ]
1.825758
132
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import datetime from decimal import Decimal from pytz import utc import swapper from django.conf import settings from django.core.validators import ( RegexValidator, MaxLengthValidator, ) from django.db import models from django.db.models import Q from sorl.thumbnail import ImageField from django.utils.safestring import mark_safe from accelerator_abstract.models.accelerator_model import AcceleratorModel from accelerator_abstract.models.base_user_role import ( BaseUserRole, ) from accelerator_abstract.models.base_base_profile import ( EXPERT_USER_TYPE, ) from accelerator_abstract.models.base_user_utils import ( has_staff_clearance, ) from accelerator_abstract.models.base_program import ( ACTIVE_PROGRAM_STATUS, ENDED_PROGRAM_STATUS, ) INVITED_JUDGE_ALERT = ( "<h4>{first_name}, we would like to invite you to be a judge at " "MassChallenge!</h4>" "<p>&nbsp;</p>" "<p>{round_name} judging occurs from {start_date} to {end_date}! " "Of all our potential judges, we would like you, {first_name}, " "to take part." "</p><p>&nbsp;</p>" '<p><a class="btn btn-primary" href="/expert/commitments/">Click ' "here to tell us your availability" "</a></p> <p>&nbsp;</p>" ) MENTOR_TYPE_HELPTEXT = ( "Allowed Values: " "F - Functional Expert, " "P - Partner, " "T - Technical, " "E - Entrepreneur, " "N - Once accepted, now rejected, " "X - Not Accepted as a Mentor (may still be a judge)") JUDGE_TYPE_HELPTEXT = ( "Allowed Values: " "1 - Round 1 Judge, " "2 - Round 2 Judge, " "3 - Pre-final Judge, " "4 - Final Judge, " "0 - Once Accepted, now rejected, " "X - Not Accepted as a Judge (May still be a mentor)") IDENTITY_HELP_TEXT_VALUE = (mark_safe( 'Select as many options as you feel best represent your identity. ' 'Please press and hold Control (CTRL) on PCs or ' 'Command (&#8984;) on Macs to select multiple options')) JUDGE_FIELDS_TO_LABELS = {'desired_judge_label': 'Desired Judge', 'confirmed_judge_label': 'Judge'} BIO_MAX_LENGTH = 7500 PRIVACY_CHOICES = (("staff", "MC Staff Only"), ("finalists and staff", "Finalists and MC Staff"), ("public", "All Users"),) BASE_INTEREST = "I would like to participate in MassChallenge %s" BASE_TOPIC = ("Please describe the topic(s) you would be available " "to speak%s about%s") REF_BY_TEXT = ("If someone referred you to MassChallenge, please provide " "their name (and organization if relevant). Otherwise, please " "indicate how you learned about the opportunity to participate " "at MassChallenge (helps us understand the effectiveness of " "our outreach programs).") OTHER_EXPERTS_TEXT = ("We're always looking for more great experts to join " "the MassChallenge community and program. We welcome " "the names and contact info (email) of individuals you " "think could be great additions to the program, as well " "as how you think they might want to be involved " "(Judge, Mentor, etc.) Also, please encourage these " "individuals to fill out their own Expert Profile.")
[ 2, 17168, 13789, 198, 2, 15069, 357, 66, 8, 2177, 5674, 41812, 3540, 11, 3457, 13, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 12972, 22877, 1330, 3384, 66, 198, 198, 11748, 1509, 11463, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 357, 198, 220, 220, 220, 797, 25636, 47139, 1352, 11, 198, 220, 220, 220, 5436, 24539, 47139, 1352, 11, 198, 8, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 25655, 75, 13, 400, 20566, 1330, 7412, 15878, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 198, 6738, 44219, 62, 397, 8709, 13, 27530, 13, 330, 7015, 1352, 62, 19849, 1330, 29805, 1352, 17633, 198, 6738, 44219, 62, 397, 8709, 13, 27530, 13, 8692, 62, 7220, 62, 18090, 1330, 357, 198, 220, 220, 220, 7308, 12982, 47445, 11, 198, 8, 198, 6738, 44219, 62, 397, 8709, 13, 27530, 13, 8692, 62, 8692, 62, 13317, 1330, 357, 198, 220, 220, 220, 25703, 17395, 62, 29904, 62, 25216, 11, 198, 8, 198, 6738, 44219, 62, 397, 8709, 13, 27530, 13, 8692, 62, 7220, 62, 26791, 1330, 357, 198, 220, 220, 220, 468, 62, 28120, 62, 20063, 590, 11, 198, 8, 198, 6738, 44219, 62, 397, 8709, 13, 27530, 13, 8692, 62, 23065, 1330, 357, 198, 220, 220, 220, 11741, 9306, 62, 4805, 7730, 24115, 62, 35744, 2937, 11, 198, 220, 220, 220, 23578, 1961, 62, 4805, 7730, 24115, 62, 35744, 2937, 11, 198, 8, 198, 198, 1268, 53, 22061, 62, 41, 8322, 8264, 62, 1847, 17395, 796, 357, 198, 220, 220, 220, 33490, 71, 19, 29, 90, 11085, 62, 3672, 5512, 356, 561, 588, 284, 14037, 345, 284, 307, 257, 5052, 379, 366, 198, 220, 220, 220, 366, 20273, 41812, 3540, 0, 3556, 71, 19, 24618, 198, 220, 220, 220, 33490, 79, 29, 5, 77, 24145, 26, 3556, 79, 24618, 198, 220, 220, 220, 33490, 79, 29, 90, 744, 62, 3672, 92, 22989, 8833, 422, 1391, 9688, 62, 4475, 92, 284, 1391, 437, 62, 4475, 92, 0, 366, 198, 220, 220, 220, 366, 5189, 477, 674, 2785, 10266, 11, 356, 561, 588, 345, 11, 1391, 11085, 62, 3672, 5512, 366, 198, 220, 220, 220, 366, 1462, 1011, 636, 526, 198, 220, 220, 220, 366, 3556, 79, 6927, 79, 29, 5, 77, 24145, 26, 3556, 79, 24618, 198, 220, 220, 220, 705, 27, 79, 6927, 64, 1398, 2625, 46118, 275, 34106, 12, 39754, 1, 13291, 35922, 1069, 11766, 14, 41509, 902, 14, 5320, 8164, 705, 198, 220, 220, 220, 366, 1456, 284, 1560, 514, 534, 11500, 1, 198, 220, 220, 220, 366, 3556, 64, 12240, 79, 29, 1279, 79, 29, 5, 77, 24145, 26, 3556, 79, 24618, 198, 8, 198, 198, 10979, 1581, 62, 25216, 62, 39, 3698, 11571, 13918, 796, 357, 198, 220, 220, 220, 366, 3237, 6972, 27068, 25, 366, 198, 220, 220, 220, 366, 37, 532, 44224, 25516, 11, 366, 198, 220, 220, 220, 366, 47, 532, 35532, 11, 366, 198, 220, 220, 220, 366, 51, 532, 20671, 11, 366, 198, 220, 220, 220, 366, 36, 532, 42071, 333, 11, 366, 198, 220, 220, 220, 366, 45, 532, 4874, 6292, 11, 783, 8606, 11, 366, 198, 220, 220, 220, 366, 55, 532, 1892, 21699, 276, 355, 257, 31879, 273, 357, 11261, 991, 307, 257, 5052, 8, 4943, 198, 198, 41, 8322, 8264, 62, 25216, 62, 39, 3698, 11571, 13918, 796, 357, 198, 220, 220, 220, 366, 3237, 6972, 27068, 25, 366, 198, 220, 220, 220, 366, 16, 532, 10485, 352, 8974, 11, 366, 198, 220, 220, 220, 366, 17, 532, 10485, 362, 8974, 11, 366, 198, 220, 220, 220, 366, 18, 532, 3771, 12, 20311, 8974, 11, 366, 198, 220, 220, 220, 366, 19, 532, 8125, 8974, 11, 366, 198, 220, 220, 220, 366, 15, 532, 4874, 21699, 276, 11, 783, 8606, 11, 366, 198, 220, 220, 220, 366, 55, 532, 1892, 21699, 276, 355, 257, 8974, 357, 6747, 991, 307, 257, 22387, 8, 4943, 198, 198, 25256, 9050, 62, 39, 3698, 47, 62, 32541, 62, 39488, 796, 357, 4102, 62, 21230, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17563, 355, 867, 3689, 355, 345, 1254, 1266, 2380, 534, 5369, 13, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5492, 1803, 290, 1745, 6779, 357, 4177, 7836, 8, 319, 21869, 393, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 21575, 35494, 2, 23, 4089, 19, 26, 8, 319, 4100, 82, 284, 2922, 3294, 3689, 6, 4008, 198, 198, 41, 8322, 8264, 62, 11674, 3698, 5258, 62, 10468, 62, 48780, 37142, 796, 1391, 6, 8906, 1202, 62, 10456, 469, 62, 18242, 10354, 705, 5960, 1202, 8974, 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, 705, 36349, 62, 10456, 469, 62, 18242, 10354, 705, 29511, 6, 92, 198, 3483, 46, 62, 22921, 62, 43, 49494, 796, 767, 4059, 198, 198, 4805, 3824, 43300, 62, 44899, 34444, 796, 357, 7203, 28120, 1600, 366, 9655, 9983, 5514, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 20311, 1023, 290, 3085, 1600, 366, 19006, 1023, 290, 13122, 9983, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 11377, 1600, 366, 3237, 18987, 12340, 8, 198, 33, 11159, 62, 41358, 6465, 796, 366, 40, 561, 588, 284, 8277, 287, 5674, 41812, 3540, 4064, 82, 1, 198, 33, 11159, 62, 35222, 2149, 796, 5855, 5492, 6901, 262, 7243, 7, 82, 8, 345, 561, 307, 1695, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1462, 2740, 4, 82, 546, 4, 82, 4943, 198, 198, 31688, 62, 17513, 62, 32541, 796, 5855, 1532, 2130, 6412, 345, 284, 5674, 41812, 3540, 11, 3387, 2148, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 24571, 1438, 357, 392, 4009, 611, 5981, 737, 15323, 11, 3387, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 521, 5344, 703, 345, 4499, 546, 262, 3663, 284, 8277, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 265, 5674, 41812, 3540, 357, 35194, 514, 1833, 262, 13530, 286, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 454, 23424, 4056, 8, 19570, 198, 31858, 62, 6369, 18973, 4694, 62, 32541, 796, 5855, 1135, 821, 1464, 2045, 329, 517, 1049, 6154, 284, 4654, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1169, 5674, 41812, 3540, 2055, 290, 1430, 13, 775, 7062, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 1169, 3891, 290, 2800, 7508, 357, 12888, 8, 286, 3925, 345, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14925, 714, 307, 1049, 19885, 284, 262, 1430, 11, 355, 880, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 292, 703, 345, 892, 484, 1244, 765, 284, 307, 2950, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30629, 29511, 11, 31879, 273, 11, 3503, 2014, 4418, 11, 3387, 7898, 777, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 43129, 82, 284, 6070, 503, 511, 898, 25516, 13118, 19570, 628 ]
2.530973
1,356
import re import asyncio import pexpect as px import sys from glulxe.interface import i7Game from avatar import Avatar GAME_FILE_NAME = "rooms.gblorb" game = None current_location = None EXIT_COMMANDS = ["quit", "exit"] ROOM_SELECTION_PATTERN = 'You entered (.*) room' MESSAGE_PARAMS_PATTERN = '@([^\s]+) (.*)' agent = None if __name__ == "__main__": if len(sys.argv) == 3: jid = sys.argv[1] password = sys.argv[2] loop = asyncio.get_event_loop() loop.run_until_complete(main(jid, password))
[ 11748, 302, 198, 11748, 30351, 952, 198, 11748, 613, 87, 806, 355, 279, 87, 198, 11748, 25064, 198, 6738, 1278, 377, 27705, 13, 39994, 1330, 1312, 22, 8777, 198, 198, 6738, 30919, 1330, 26703, 198, 198, 47109, 62, 25664, 62, 20608, 796, 366, 9649, 13, 70, 2436, 27688, 1, 198, 198, 6057, 796, 6045, 198, 14421, 62, 24886, 796, 6045, 198, 198, 6369, 2043, 62, 9858, 10725, 5258, 796, 14631, 47391, 1600, 366, 37023, 8973, 198, 198, 13252, 2662, 62, 46506, 2849, 62, 47, 1404, 31800, 796, 705, 1639, 5982, 357, 15885, 8, 2119, 6, 198, 44, 1546, 4090, 8264, 62, 27082, 40834, 62, 47, 1404, 31800, 796, 705, 31, 26933, 61, 59, 82, 60, 28988, 357, 15885, 33047, 198, 198, 25781, 796, 6045, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 6624, 513, 25, 198, 220, 220, 220, 220, 220, 220, 220, 474, 312, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 9206, 796, 25064, 13, 853, 85, 58, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 9052, 796, 30351, 952, 13, 1136, 62, 15596, 62, 26268, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 9052, 13, 5143, 62, 28446, 62, 20751, 7, 12417, 7, 73, 312, 11, 9206, 4008, 198, 220, 220, 220, 220 ]
2.317597
233
from bricks_modeling.file_IO.model_writer import write_bricks_to_file_with_steps, write_model_to_file from util.debugger import MyDebugger from bricks_modeling.file_IO.model_reader import read_model_from_file, read_bricks_from_file ''' We assume the following information is provided: 1) assembly order 2) grouping 3) default camera view ''' if __name__ == "__main__": debugger = MyDebugger("brick_heads") file_path = r"data/full_models/steped_talor.ldr" model = read_model_from_file(file_path, read_fake_bricks=True) write_model_to_file(model, debugger.file_path(f"complete_full.ldr"))
[ 6738, 28902, 62, 4666, 10809, 13, 7753, 62, 9399, 13, 19849, 62, 16002, 1330, 3551, 62, 65, 23706, 62, 1462, 62, 7753, 62, 4480, 62, 20214, 11, 3551, 62, 19849, 62, 1462, 62, 7753, 198, 6738, 7736, 13, 24442, 1362, 1330, 2011, 27509, 1362, 198, 6738, 28902, 62, 4666, 10809, 13, 7753, 62, 9399, 13, 19849, 62, 46862, 1330, 1100, 62, 19849, 62, 6738, 62, 7753, 11, 1100, 62, 65, 23706, 62, 6738, 62, 7753, 198, 198, 7061, 6, 198, 1135, 7048, 262, 1708, 1321, 318, 2810, 25, 198, 16, 8, 10474, 1502, 198, 17, 8, 36115, 198, 18, 8, 4277, 4676, 1570, 198, 7061, 6, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 49518, 796, 2011, 27509, 1362, 7203, 1671, 624, 62, 16600, 4943, 198, 220, 220, 220, 2393, 62, 6978, 796, 374, 1, 7890, 14, 12853, 62, 27530, 14, 9662, 276, 62, 39240, 273, 13, 335, 81, 1, 628, 220, 220, 220, 2746, 796, 1100, 62, 19849, 62, 6738, 62, 7753, 7, 7753, 62, 6978, 11, 1100, 62, 30706, 62, 65, 23706, 28, 17821, 8, 198, 220, 220, 220, 3551, 62, 19849, 62, 1462, 62, 7753, 7, 19849, 11, 49518, 13, 7753, 62, 6978, 7, 69, 1, 20751, 62, 12853, 13, 335, 81, 48774 ]
2.827103
214
from sweeper.cloud import resource_config_combinations class CloudProvider: """ A CloudProvider object represents a Cloud Computing service that sweeper can manage in order to execute a workflow in this cloud base """ def __init__(self): """ Default constructor. You should overwrite all of this class for creating a new Cloud base """ self.name = "Base Cloud Provider" """Name of the cloud base""" def create_vm(self, name, config, **kwargs): """ Creates a virtual machine in the cloud base service """ raise NotImplementedError("You must implement create_vm") def delete_vm(self, name): """ Deletes the named virtual machine provided by this CloudProvider :param name: Name of the cloud resource to delete from this cloud base :return: None """ raise NotImplementedError("You must implement delete_vm") def get_config(self, config_name): """ Get a configuration name provided :param config_name: Name of the Configuration Name provided by this cloud base :return: as ResourceConfig object """ raise NotImplementedError("You must implement get_config") def list_configs(self): """ List all available configurations provided by this cloud base :return: A list of ResourceConfig Objects """ raise NotImplementedError("You must implement list_configs") # NOTE: We assume Method create_instance is implemented in each Cloud Provider Class # but, I can't find a way to create an interface for such static method def possible_configs(self, num): """ Returns all possible combinations of VM resources that has the number of :num: resources required. You should call this method from the implementation classes """ configs = self.list_configs() combs = resource_config_combinations(num, configs) return combs
[ 6738, 3490, 5723, 13, 17721, 1330, 8271, 62, 11250, 62, 24011, 7352, 628, 198, 4871, 10130, 29495, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 10130, 29495, 2134, 6870, 257, 10130, 38589, 2139, 198, 220, 220, 220, 326, 3490, 5723, 460, 6687, 287, 1502, 284, 12260, 257, 30798, 287, 428, 198, 220, 220, 220, 6279, 2779, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 15161, 23772, 13, 921, 815, 49312, 477, 286, 428, 198, 220, 220, 220, 220, 220, 220, 220, 1398, 329, 4441, 257, 649, 10130, 2779, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 3672, 796, 366, 14881, 10130, 32549, 1, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 5376, 286, 262, 6279, 2779, 37811, 628, 220, 220, 220, 825, 2251, 62, 14761, 7, 944, 11, 1438, 11, 4566, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7921, 274, 257, 7166, 4572, 287, 262, 6279, 2779, 2139, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 1639, 1276, 3494, 2251, 62, 14761, 4943, 628, 220, 220, 220, 825, 12233, 62, 14761, 7, 944, 11, 1438, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1024, 40676, 262, 3706, 7166, 4572, 2810, 416, 428, 10130, 29495, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1438, 25, 6530, 286, 262, 6279, 8271, 284, 12233, 422, 428, 6279, 2779, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 1639, 1276, 3494, 12233, 62, 14761, 4943, 628, 220, 220, 220, 825, 651, 62, 11250, 7, 944, 11, 4566, 62, 3672, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 257, 8398, 1438, 2810, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 4566, 62, 3672, 25, 6530, 286, 262, 28373, 6530, 2810, 416, 428, 6279, 2779, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 355, 20857, 16934, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 1639, 1276, 3494, 651, 62, 11250, 4943, 628, 220, 220, 220, 825, 1351, 62, 11250, 82, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7343, 477, 1695, 25412, 2810, 416, 428, 6279, 2779, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 317, 1351, 286, 20857, 16934, 35832, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 7203, 1639, 1276, 3494, 1351, 62, 11250, 82, 4943, 628, 220, 220, 220, 1303, 24550, 25, 775, 7048, 11789, 2251, 62, 39098, 318, 9177, 287, 1123, 10130, 32549, 5016, 198, 220, 220, 220, 1303, 475, 11, 314, 460, 470, 1064, 257, 835, 284, 2251, 281, 7071, 329, 884, 9037, 2446, 628, 198, 220, 220, 220, 825, 1744, 62, 11250, 82, 7, 944, 11, 997, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 477, 1744, 17790, 286, 16990, 4133, 198, 220, 220, 220, 220, 220, 220, 220, 326, 468, 262, 1271, 286, 1058, 22510, 25, 4133, 2672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 921, 815, 869, 428, 2446, 422, 262, 7822, 6097, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 82, 796, 2116, 13, 4868, 62, 11250, 82, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 401, 1443, 796, 8271, 62, 11250, 62, 24011, 7352, 7, 22510, 11, 4566, 82, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 401, 1443, 198 ]
2.870968
713
import re import glob import os path = r".\data\log" os.chdir(path) t = [] logs = glob.glob("log*.txt") Nbrun = len(logs) for log in logs: l = open(log,'r') m = re.findall("(?<=Elapsed: )(.*?)(?=s)",l.read()) if float(m[-1]) > 0: t.append(float(m[-1])) l.close() if t: t = float(sum(t)/len(t)) print("Average time of execution:",t,"seconds") path = r"..\tracking" os.chdir(path) TipsFile = glob.glob("Number*.txt") NbModule = 0 for file in TipsFile: NbTips = 0 Nbrun = 0 f = open(file,'r') for line in f.readlines(): NbTips += int(line) Nbrun += 1 NbTips = NbTips/Nbrun print("Average number of tips for NodeModule[" + str(NbModule) + "]:",NbTips) NbModule += 1 f.close()
[ 11748, 302, 201, 198, 11748, 15095, 201, 198, 11748, 28686, 201, 198, 201, 198, 6978, 796, 374, 1911, 59, 7890, 59, 6404, 1, 201, 198, 418, 13, 354, 15908, 7, 6978, 8, 201, 198, 201, 198, 83, 796, 17635, 201, 198, 6404, 82, 796, 15095, 13, 4743, 672, 7203, 6404, 24620, 14116, 4943, 201, 198, 45, 1671, 403, 796, 18896, 7, 6404, 82, 8, 201, 198, 201, 198, 1640, 2604, 287, 17259, 25, 201, 198, 220, 220, 220, 300, 796, 1280, 7, 6404, 4032, 81, 11537, 201, 198, 220, 220, 220, 285, 796, 302, 13, 19796, 439, 7203, 7, 30, 27, 28, 9527, 28361, 25, 1267, 7, 15885, 30, 5769, 30, 28, 82, 42501, 75, 13, 961, 28955, 201, 198, 220, 220, 220, 611, 12178, 7, 76, 58, 12, 16, 12962, 1875, 657, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 256, 13, 33295, 7, 22468, 7, 76, 58, 12, 16, 60, 4008, 201, 198, 220, 220, 220, 300, 13, 19836, 3419, 201, 198, 201, 198, 361, 256, 25, 201, 198, 220, 220, 220, 256, 796, 12178, 7, 16345, 7, 83, 20679, 11925, 7, 83, 4008, 201, 198, 220, 220, 220, 3601, 7203, 26287, 640, 286, 9706, 25, 1600, 83, 553, 43012, 4943, 201, 198, 201, 198, 6978, 796, 374, 1, 492, 59, 36280, 1, 201, 198, 418, 13, 354, 15908, 7, 6978, 8, 201, 198, 201, 198, 43368, 8979, 796, 15095, 13, 4743, 672, 7203, 15057, 24620, 14116, 4943, 201, 198, 45, 65, 26796, 796, 657, 201, 198, 201, 198, 1640, 2393, 287, 27558, 8979, 25, 201, 198, 220, 220, 220, 399, 65, 43368, 796, 657, 201, 198, 220, 220, 220, 399, 1671, 403, 796, 657, 201, 198, 220, 220, 220, 277, 796, 1280, 7, 7753, 4032, 81, 11537, 201, 198, 220, 220, 220, 329, 1627, 287, 277, 13, 961, 6615, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 399, 65, 43368, 15853, 493, 7, 1370, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 399, 1671, 403, 15853, 352, 201, 198, 201, 198, 220, 220, 220, 399, 65, 43368, 796, 399, 65, 43368, 14, 45, 1671, 403, 201, 198, 220, 220, 220, 3601, 7203, 26287, 1271, 286, 9040, 329, 19081, 26796, 14692, 1343, 965, 7, 45, 65, 26796, 8, 1343, 366, 5974, 1600, 45, 65, 43368, 8, 201, 198, 220, 220, 220, 399, 65, 26796, 15853, 352, 201, 198, 220, 220, 220, 277, 13, 19836, 3419, 201, 198 ]
1.975309
405
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. 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. """Resource filters supplementary help.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import textwrap from googlecloudsdk.calliope import base from googlecloudsdk.core.resource import resource_topics class Filters(base.TopicCommand): """Resource filters supplementary help.""" detailed_help = { 'DESCRIPTION': textwrap.dedent("""\ {description} + Note: Depending on the specific server API, filtering may be done entirely by the client, entirely by the server, or by a combination of both. ### Filter Expressions A filter expression is a Boolean function that selects the resources to print from a list of resources. Expressions are composed of terms connected by logic operators. *LogicOperator*:: Logic operators must be in uppercase: *AND*, *OR*, *NOT*. Additionally, expressions containing both *AND* and *OR* must be parenthesized to disambiguate precedence. *NOT* _term-1_::: True if _term-1_ is False, otherwise False. _term-1_ *AND* _term-2_::: True if both _term-1_ and _term-2_ are true. _term-1_ *OR* _term-2_::: True if at least one of _term-1_ or _term-2_ is true. _term-1_ _term-2_::: Term conjunction (implicit *AND*) is True if both _term-1_ and _term-2_ are true. Conjunction has lower precedence than *OR*. *Terms*:: A term is a _key_ _operator_ _value_ tuple, where _key_ is a dotted name that evaluates to the value of a resource attribute, and _value_ may be: *number*::: integer or floating point numeric constant *unquoted literal*::: character sequence terminated by space, ( or ) *quoted literal*::: _"..."_ or _'...'_ Most filter expressions need to be quoted in shell commands. If you use _'...'_ shell quotes then use _"..."_ filter string literal quotes and vice versa. Quoted literals will be interpreted as string values, even when the value could also be a valid number. For example, 'key:1e9' will be interpreted as a key named 'key' with the string value '1e9', rather than with the float value of one billion expressed in scientific notation. *Operator Terms*:: _key_ *:* _simple-pattern_::: *:* operator evaluation is changing for consistency across Google APIs. The current default is deprecated and will be dropped shortly. A warning will be displayed when a --filter expression would return different matches using both the deprecated and new implementations. + The current deprecated default is True if _key_ contains _simple-pattern_. The match is case insensitive. It allows one ```*``` that matches any sequence of 0 or more characters. If ```*``` is specified then the match is anchored, meaning all characters from the beginning and end of the value must match. + The new implementation is True if _simple-pattern_ matches any _word_ in _key_. Words are locale specific but typically consist of alpha-numeric characters. Non-word characters that do not appear in _simple-pattern_ are ignored. The matching is anchored and case insensitive. An optional trailing ```*``` does a word prefix match. + Use _key_```:*``` to test if _key_ is defined and ```-```_key_```:*``` to test if _key_ is undefined. _key_ *:(* _simple-pattern_ ... *)*::: True if _key_ matches any _simple-pattern_ in the (space, tab, newline, comma) separated list. _key_ *=* _value_::: True if _key_ is equal to _value_, or [deprecated] equivalent to *:* with the exception that the trailing ```*``` prefix match is not supported. + For historical reasons, this operation currently behaves differently for different Google APIs. For many APIs, this is True if key is equal to value. For a few APIs, this is currently equivalent to *:*, with the exception that the trailing ```*``` prefix match is not supported. However, this behaviour is being phased out, and use of ```=``` for those APIs is deprecated; for those APIs, if you want matching, you should use ```:``` instead of ```=```, and if you want to test for equality, you can use _key_ <= _value_ AND _key_ >= _value_. _key_ *=(* _value_ ... *)*::: True if _key_ is equal to any _value_ in the (space, tab, newline, *,*) separated list. _key_ *!=* _value_::: True if _key_ is not _value_. Equivalent to -_key_=_value_ and NOT _key_=_value_. _key_ *<* _value_::: True if _key_ is less than _value_. If both _key_ and _value_ are numeric then numeric comparison is used, otherwise lexicographic string comparison is used. _key_ *<=* _value_::: True if _key_ is less than or equal to _value_. If both _key_ and _value_ are numeric then numeric comparison is used, otherwise lexicographic string comparison is used. _key_ *>=* _value_::: True if _key_ is greater than or equal to _value_. If both _key_ and _value_ are numeric then numeric comparison is used, otherwise lexicographic string comparison is used. _key_ *>* _value_::: True if _key_ is greater than _value_. If both _key_ and _value_ are numeric then numeric comparison is used, otherwise lexicographic string comparison is used. _key_ *~* _value_::: True if _key_ contains a match for the RE (regular expression) pattern _value_. _key_ *!*~ _value_::: True if _key_ does not contain a match for the RE (regular expression) pattern _value_. For more about regular expression syntax, see: https://docs.python.org/3/library/re.html#re-syntax which follows the PCRE dialect. ### Determine which fields are available for filtering In order to build filters, it is often helpful to review some representative fields returned from commands. One simple way to do this is to add `--format=yaml --limit=1` to a command. With these flags, a single record is returned and its full contents are displayed as a YAML document. For example, a list of project fields could be generated by running: $ gcloud projects list --format=yaml --limit=1 This might display the following data: ```yaml createTime: '2021-02-10T19:19:49.242Z' lifecycleState: ACTIVE name: MyProject parent: id: '123' type: folder projectId: my-project projectNumber: '456' ``` Using this data, one way of filtering projects is by their parent's ID by specifying ``parent.id'' as the _key_. ### Filter on a custom or nested list in response By default the filter exprespression operates on root level resources. In order to filter on a nested list(not at the root level of the json) , one can use the `--flatten` flag to provide a the `resource-key` to list. For example, To list members under `my-project` that have an editor role, one can run: $ gcloud projects get-iam-policy cloudsdktest --flatten=bindings --filter=bindings.role:roles/editor --format='value(bindings.members)' """).format( description=resource_topics.ResourceDescription('filter')), 'EXAMPLES': textwrap.dedent("""\ List all Google Compute Engine instance resources: $ gcloud compute instances list List Compute Engine instance resources that have machineType *f1-micro*: $ gcloud compute instances list --filter="machineType:f1-micro" List Compute Engine instance resources using a regular expression for zone *us* and not MachineType *f1-micro*: $ gcloud compute instances list --filter="zone ~ us AND -machineType:f1-micro" List Compute Engine instance resources with tag *my-tag*: $ gcloud compute instances list --filter="tags.items=my-tag" List Compute Engine instance resources with tag *my-tag* or *my-other-tag*: $ gcloud compute instances list --filter="tags.items=(my-tag,my-other-tag)" List Compute Engine instance resources with tag *my-tag* and *my-other-tag*: $ gcloud compute instances list --filter="tags.items=my-tag AND tags.items=my-other-tag" List Compute Engine instance resources which either have tag *my-tag* but not *my-other-tag* or have tag *alternative-tag*: $ gcloud compute instances list --filter="(tags.items=my-tag AND -tags.items=my-other-tag) OR tags.items=alternative-tag" List Compute Engine instance resources which contain the key *fingerprint* in the *metadata* object: $ gcloud compute instances list --limit=1 --filter="metadata.list(show="keys"):fingerprint" List Compute Engine instance resources with label *my-label* with any value: $ gcloud compute instances list --filter="labels.my-label:*" List Container Registry images that have a tag with the value '30e5504145': $ gcloud container images list-tags --filter="'tags:30e5504145'" The last example encloses the filter expression in single quotes because the value '30e5504145' could be interpreted as a number in scientific notation. List in JSON format those projects where the labels match specific values (e.g. label.env is 'test' and label.version is alpha): $ gcloud projects list --format="json" --filter="labels.env=test AND labels.version=alpha" List projects that were created on and after a specific date: $ gcloud projects list --format="table(projectNumber,projectId,createTime)" --filter="createTime>=2018-01-15" List projects that were created on and after a specific date and time and sort from oldest to newest (with dates and times listed according to the local timezone): $ gcloud projects list --format="table(projectNumber,projectId,createTime.date(tz=LOCAL))" --filter="createTime>=2018-01-15T12:00:00" --sort-by=createTime List projects that were created within the last two weeks, using ISO8601 durations: $ gcloud projects list --format="table(projectNumber,projectId,createTime)" --filter="createTime>-P2W" For more about ISO8601 durations, see: https://en.wikipedia.org/wiki/ISO_8601 + The table below shows examples of pattern matching if used with the `:` operator: PATTERN | VALUE | MATCHES | DEPRECATED_MATCHES --- | --- | --- | --- abc* | abcpdqxyz | True | True abc | abcpdqxyz | False | True pdq* | abcpdqxyz | False | False pdq | abcpdqxyz | False | True xyz* | abcpdqxyz | False | False xyz | abcpdqxyz | False | True * | abcpdqxyz | True | True * | (None) | False | False * | ('') | False | False * | (otherwise) | True | True abc* | abc.pdq.xyz | True | True abc | abc.pdq.xyz | True | True abc.pdq | abc.pdq.xyz | True | True pdq* | abc.pdq.xyz | True | False pdq | abc.pdq.xyz | True | True pdq.xyz | abc.pdq.xyz | True | True xyz* | abc.pdq.xyz | True | False xyz | abc.pdq.xyz | True | True """), }
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 1946, 3012, 11419, 13, 1439, 6923, 33876, 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, 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, 26198, 16628, 43871, 1037, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 2420, 37150, 198, 198, 6738, 23645, 17721, 21282, 74, 13, 13345, 72, 3008, 1330, 2779, 198, 6738, 23645, 17721, 21282, 74, 13, 7295, 13, 31092, 1330, 8271, 62, 4852, 873, 628, 198, 4871, 7066, 1010, 7, 8692, 13, 33221, 21575, 2599, 198, 220, 37227, 26198, 16628, 43871, 1037, 526, 15931, 628, 220, 6496, 62, 16794, 796, 1391, 198, 220, 220, 220, 220, 220, 705, 30910, 40165, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 37150, 13, 9395, 298, 7203, 15931, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 11213, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5740, 25, 23591, 319, 262, 2176, 4382, 7824, 11, 25431, 743, 307, 1760, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5000, 416, 262, 5456, 11, 5000, 416, 262, 4382, 11, 393, 416, 257, 6087, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 286, 1111, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 25853, 10604, 507, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 8106, 5408, 318, 257, 41146, 2163, 326, 40573, 262, 4133, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 3601, 422, 257, 1351, 286, 4133, 13, 10604, 507, 389, 13160, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 286, 2846, 5884, 416, 9156, 12879, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 11187, 291, 18843, 1352, 9, 3712, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30146, 12879, 1276, 307, 287, 334, 39921, 589, 25, 1635, 6981, 25666, 1635, 1581, 25666, 1635, 11929, 24620, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12032, 11, 14700, 7268, 1111, 1635, 6981, 9, 290, 1635, 1581, 9, 1276, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2560, 956, 1143, 284, 595, 4131, 328, 4985, 38177, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 11929, 9, 4808, 4354, 12, 16, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 4354, 12, 16, 62, 318, 10352, 11, 4306, 10352, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4354, 12, 16, 62, 1635, 6981, 9, 4808, 4354, 12, 17, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 1111, 4808, 4354, 12, 16, 62, 290, 4808, 4354, 12, 17, 62, 389, 2081, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4354, 12, 16, 62, 1635, 1581, 9, 4808, 4354, 12, 17, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 379, 1551, 530, 286, 4808, 4354, 12, 16, 62, 393, 4808, 4354, 12, 17, 62, 318, 2081, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4354, 12, 16, 62, 4808, 4354, 12, 17, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35118, 17856, 357, 23928, 3628, 1635, 6981, 28104, 318, 6407, 611, 1111, 4808, 4354, 12, 16, 62, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 4808, 4354, 12, 17, 62, 389, 2081, 13, 220, 37587, 4575, 468, 2793, 38177, 621, 1635, 1581, 24620, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 15156, 907, 9, 3712, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 3381, 318, 257, 4808, 2539, 62, 4808, 46616, 62, 4808, 8367, 62, 46545, 11, 810, 4808, 2539, 62, 318, 257, 38745, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 326, 47850, 284, 262, 1988, 286, 257, 8271, 11688, 11, 290, 4808, 8367, 62, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 743, 307, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 17618, 9, 3712, 25, 18253, 393, 12462, 966, 35575, 6937, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 403, 421, 5191, 18875, 9, 3712, 25, 2095, 8379, 23083, 416, 2272, 11, 357, 393, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 421, 5191, 18875, 9, 3712, 25, 4808, 1, 9313, 62, 393, 4808, 6, 986, 6, 62, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4042, 8106, 14700, 761, 284, 307, 10947, 287, 7582, 9729, 13, 1002, 345, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 779, 4808, 6, 986, 6, 62, 7582, 13386, 788, 779, 4808, 1, 9313, 62, 8106, 4731, 18875, 13386, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 7927, 25470, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2264, 5191, 4187, 874, 481, 307, 16173, 355, 4731, 3815, 11, 772, 618, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 714, 635, 307, 257, 4938, 1271, 13, 1114, 1672, 11, 705, 2539, 25, 16, 68, 24, 6, 481, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16173, 355, 257, 1994, 3706, 705, 2539, 6, 351, 262, 4731, 1988, 705, 16, 68, 24, 3256, 2138, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 621, 351, 262, 12178, 1988, 286, 530, 2997, 6241, 287, 5654, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33274, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 18843, 1352, 17637, 9, 3712, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 25, 9, 4808, 36439, 12, 33279, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 25, 9, 10088, 12660, 318, 5609, 329, 15794, 1973, 3012, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23113, 13, 220, 383, 1459, 4277, 318, 39224, 290, 481, 307, 5710, 8972, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 6509, 481, 307, 9066, 618, 257, 1377, 24455, 5408, 561, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1180, 7466, 1262, 1111, 262, 39224, 290, 649, 25504, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1459, 39224, 4277, 318, 6407, 611, 4808, 2539, 62, 4909, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 36439, 12, 33279, 44807, 220, 383, 2872, 318, 1339, 41246, 13, 220, 632, 3578, 530, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 9, 15506, 63, 326, 7466, 597, 8379, 286, 657, 393, 517, 3435, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1002, 7559, 63, 9, 15506, 63, 318, 7368, 788, 262, 2872, 318, 39871, 11, 3616, 477, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3435, 422, 262, 3726, 290, 886, 286, 262, 1988, 1276, 2872, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 649, 7822, 318, 6407, 611, 4808, 36439, 12, 33279, 62, 7466, 597, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 4775, 62, 287, 4808, 2539, 44807, 220, 23087, 389, 36693, 2176, 475, 6032, 3473, 286, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17130, 12, 77, 39223, 3435, 13, 220, 8504, 12, 4775, 3435, 326, 466, 407, 1656, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 36439, 12, 33279, 62, 389, 9514, 13, 220, 383, 12336, 318, 39871, 290, 1339, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41246, 13, 220, 1052, 11902, 25462, 7559, 63, 9, 15506, 63, 857, 257, 1573, 21231, 2872, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5765, 4808, 2539, 62, 15506, 63, 25, 9, 15506, 63, 284, 1332, 611, 4808, 2539, 62, 318, 5447, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 12, 15506, 63, 62, 2539, 62, 15506, 63, 25, 9, 15506, 63, 284, 1332, 611, 4808, 2539, 62, 318, 28721, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 37498, 9, 4808, 36439, 12, 33279, 62, 2644, 1635, 27493, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 7466, 597, 4808, 36439, 12, 33279, 62, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 13200, 11, 7400, 11, 649, 1370, 11, 39650, 8, 11266, 1351, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 28, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 4961, 284, 4808, 8367, 62, 11, 393, 685, 10378, 31023, 60, 7548, 284, 1635, 25, 9, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 262, 6631, 326, 262, 25462, 7559, 63, 9, 15506, 63, 21231, 2872, 318, 407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4855, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1114, 6754, 3840, 11, 428, 4905, 3058, 39341, 10338, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1180, 3012, 23113, 13, 1114, 867, 23113, 11, 428, 318, 6407, 611, 1994, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4961, 284, 1988, 13, 1114, 257, 1178, 23113, 11, 428, 318, 3058, 7548, 284, 1635, 25, 25666, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 262, 6631, 326, 262, 25462, 7559, 63, 9, 15506, 63, 21231, 2872, 318, 407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4855, 13, 2102, 11, 428, 9172, 318, 852, 41716, 503, 11, 290, 779, 286, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 28, 15506, 63, 329, 883, 23113, 318, 39224, 26, 329, 883, 23113, 11, 611, 345, 765, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12336, 11, 345, 815, 779, 7559, 63, 25, 15506, 63, 2427, 286, 7559, 63, 28, 15506, 47671, 290, 611, 345, 765, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 1332, 329, 10537, 11, 345, 460, 779, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 19841, 4808, 8367, 62, 5357, 4808, 2539, 62, 18189, 4808, 8367, 44807, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 16193, 9, 4808, 8367, 62, 2644, 1635, 27493, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 4961, 284, 597, 4808, 8367, 62, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 13200, 11, 7400, 11, 649, 1370, 11, 1635, 11, 28104, 11266, 1351, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 0, 28, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 407, 4808, 8367, 44807, 7889, 29540, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 62, 2539, 62, 28, 62, 8367, 62, 290, 5626, 4808, 2539, 62, 28, 62, 8367, 44807, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 27, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 1342, 621, 4808, 8367, 44807, 1002, 1111, 4808, 2539, 62, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 8367, 62, 389, 35575, 788, 35575, 7208, 318, 973, 11, 4306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31191, 291, 6826, 4731, 7208, 318, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 27, 28, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 1342, 621, 393, 4961, 284, 4808, 8367, 44807, 1002, 1111, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 290, 4808, 8367, 62, 389, 35575, 788, 35575, 7208, 318, 973, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4306, 31191, 291, 6826, 4731, 7208, 318, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 29, 28, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 3744, 621, 393, 4961, 284, 4808, 8367, 44807, 1002, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1111, 4808, 2539, 62, 290, 4808, 8367, 62, 389, 35575, 788, 35575, 7208, 318, 973, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4306, 31191, 291, 6826, 4731, 7208, 318, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 29, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 318, 3744, 621, 4808, 8367, 44807, 1002, 1111, 4808, 2539, 62, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 8367, 62, 389, 35575, 788, 35575, 7208, 318, 973, 11, 4306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31191, 291, 6826, 4731, 7208, 318, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 93, 9, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 4909, 257, 2872, 329, 262, 4526, 357, 16338, 5408, 8, 3912, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 8367, 44807, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 2539, 62, 1635, 0, 9, 93, 4808, 8367, 62, 3712, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 4808, 2539, 62, 857, 407, 3994, 257, 2872, 329, 262, 4526, 357, 16338, 5408, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3912, 4808, 8367, 44807, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1114, 517, 546, 3218, 5408, 15582, 11, 766, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3740, 1378, 31628, 13, 29412, 13, 2398, 14, 18, 14, 32016, 14, 260, 13, 6494, 2, 260, 12, 1837, 41641, 543, 5679, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4217, 2200, 23637, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 45559, 3810, 543, 7032, 389, 1695, 329, 25431, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 554, 1502, 284, 1382, 16628, 11, 340, 318, 1690, 7613, 284, 2423, 617, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8852, 7032, 4504, 422, 9729, 13, 1881, 2829, 835, 284, 466, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 428, 318, 284, 751, 4600, 438, 18982, 28, 88, 43695, 1377, 32374, 28, 16, 63, 284, 257, 3141, 13, 2080, 777, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9701, 11, 257, 2060, 1700, 318, 4504, 290, 663, 1336, 10154, 389, 9066, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 355, 257, 575, 2390, 43, 3188, 13, 1114, 1672, 11, 257, 1351, 286, 1628, 7032, 714, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7560, 416, 2491, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 1351, 1377, 18982, 28, 88, 43695, 1377, 32374, 28, 16, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 770, 1244, 3359, 262, 1708, 1366, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 88, 43695, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2251, 7575, 25, 705, 1238, 2481, 12, 2999, 12, 940, 51, 1129, 25, 1129, 25, 2920, 13, 27877, 57, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3868, 47510, 9012, 25, 11741, 9306, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 25, 2011, 16775, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2560, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 25, 705, 10163, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 25, 9483, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1628, 7390, 25, 616, 12, 16302, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1628, 15057, 25, 705, 29228, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 63, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8554, 428, 1366, 11, 530, 835, 286, 25431, 4493, 318, 416, 511, 2560, 338, 4522, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 416, 31577, 7559, 8000, 13, 312, 7061, 355, 262, 4808, 2539, 44807, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44386, 25853, 319, 257, 2183, 393, 28376, 1351, 287, 2882, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2750, 4277, 262, 8106, 1033, 4363, 2234, 14051, 319, 6808, 1241, 4133, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 554, 1502, 284, 8106, 319, 257, 28376, 1351, 7, 1662, 379, 262, 6808, 1241, 286, 262, 33918, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 837, 530, 460, 779, 262, 4600, 438, 2704, 41769, 63, 6056, 284, 2148, 257, 262, 4600, 31092, 12, 2539, 63, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1351, 13, 1114, 1672, 11, 1675, 1351, 1866, 739, 4600, 1820, 12, 16302, 63, 326, 423, 281, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5464, 2597, 11, 530, 460, 1057, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 651, 12, 1789, 12, 30586, 15114, 34388, 9288, 1377, 2704, 41769, 28, 21653, 654, 1377, 24455, 28, 21653, 654, 13, 18090, 25, 305, 829, 14, 35352, 1377, 18982, 11639, 8367, 7, 21653, 654, 13, 30814, 33047, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 11074, 18982, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6764, 28, 31092, 62, 4852, 873, 13, 26198, 11828, 10786, 24455, 11537, 828, 198, 220, 220, 220, 220, 220, 705, 6369, 2390, 6489, 1546, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 37150, 13, 9395, 298, 7203, 15931, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 477, 3012, 3082, 1133, 7117, 4554, 4133, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 326, 423, 4572, 6030, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 69, 16, 12, 24055, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 30243, 6030, 25, 69, 16, 12, 24055, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 1262, 257, 3218, 5408, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6516, 1635, 385, 9, 290, 407, 10850, 6030, 1635, 69, 16, 12, 24055, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 11340, 5299, 514, 5357, 532, 30243, 6030, 25, 69, 16, 12, 24055, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 351, 7621, 1635, 1820, 12, 12985, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 31499, 13, 23814, 28, 1820, 12, 12985, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 351, 7621, 1635, 1820, 12, 12985, 9, 393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 1820, 12, 847, 12, 12985, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 31499, 13, 23814, 16193, 1820, 12, 12985, 11, 1820, 12, 847, 12, 12985, 16725, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 351, 7621, 1635, 1820, 12, 12985, 9, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 1820, 12, 847, 12, 12985, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 31499, 13, 23814, 28, 1820, 12, 12985, 5357, 15940, 13, 23814, 28, 1820, 12, 847, 12, 12985, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 543, 2035, 423, 7621, 1635, 1820, 12, 12985, 9, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 475, 407, 1635, 1820, 12, 847, 12, 12985, 9, 393, 423, 7621, 1635, 33645, 876, 12, 12985, 47026, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 7, 31499, 13, 23814, 28, 1820, 12, 12985, 5357, 532, 31499, 13, 23814, 28, 1820, 12, 847, 12, 12985, 8, 6375, 15940, 13, 23814, 28, 33645, 876, 12, 12985, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 543, 3994, 262, 1994, 1635, 35461, 4798, 9, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 287, 262, 1635, 38993, 9, 2134, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 32374, 28, 16, 1377, 24455, 2625, 38993, 13, 4868, 7, 12860, 2625, 13083, 1, 2599, 35461, 4798, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 3082, 1133, 7117, 4554, 4133, 351, 6167, 1635, 1820, 12, 18242, 9, 351, 597, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 24061, 10245, 1351, 1377, 24455, 2625, 23912, 1424, 13, 1820, 12, 18242, 25, 9, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 43101, 33432, 4263, 326, 423, 257, 7621, 351, 262, 1988, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1270, 68, 22730, 19, 18781, 10354, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 9290, 4263, 1351, 12, 31499, 1377, 24455, 2625, 6, 31499, 25, 1270, 68, 22730, 19, 18781, 29653, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 938, 1672, 13507, 4629, 262, 8106, 5408, 287, 2060, 13386, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 780, 262, 1988, 705, 1270, 68, 22730, 19, 18781, 6, 714, 307, 16173, 355, 257, 1271, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5654, 33274, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 287, 19449, 5794, 883, 4493, 810, 262, 14722, 2872, 2176, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 357, 68, 13, 70, 13, 6167, 13, 24330, 318, 705, 9288, 6, 290, 6167, 13, 9641, 318, 17130, 2599, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 1351, 1377, 18982, 2625, 17752, 1, 1377, 24455, 2625, 23912, 1424, 13, 24330, 28, 9288, 5357, 14722, 13, 9641, 28, 26591, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 4493, 326, 547, 2727, 319, 290, 706, 257, 2176, 3128, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 1351, 1377, 18982, 2625, 11487, 7, 16302, 15057, 11, 16302, 7390, 11, 17953, 7575, 16725, 1377, 24455, 2625, 17953, 7575, 29, 28, 7908, 12, 486, 12, 1314, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 4493, 326, 547, 2727, 319, 290, 706, 257, 2176, 3128, 290, 640, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 3297, 422, 13325, 284, 15530, 357, 4480, 9667, 290, 1661, 5610, 1864, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 262, 1957, 640, 11340, 2599, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 1351, 1377, 18982, 2625, 11487, 7, 16302, 15057, 11, 16302, 7390, 11, 17953, 7575, 13, 4475, 7, 22877, 28, 29701, 1847, 4008, 1, 1377, 24455, 2625, 17953, 7575, 29, 28, 7908, 12, 486, 12, 1314, 51, 1065, 25, 405, 25, 405, 1, 1377, 30619, 12, 1525, 28, 17953, 7575, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7343, 4493, 326, 547, 2727, 1626, 262, 938, 734, 2745, 11, 1262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19694, 4521, 486, 288, 20074, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 720, 308, 17721, 4493, 1351, 1377, 18982, 2625, 11487, 7, 16302, 15057, 11, 16302, 7390, 11, 17953, 7575, 16725, 1377, 24455, 2625, 17953, 7575, 29, 12, 47, 17, 54, 1, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1114, 517, 546, 19694, 4521, 486, 288, 20074, 11, 766, 25, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 40734, 62, 4521, 486, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 3084, 2174, 2523, 6096, 286, 3912, 12336, 611, 973, 351, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 4600, 25, 63, 10088, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28748, 31800, 930, 26173, 8924, 930, 337, 11417, 1546, 930, 5550, 47, 38827, 11617, 62, 44, 11417, 1546, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11420, 930, 11420, 930, 11420, 930, 11420, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 450, 66, 9, 930, 450, 13155, 49506, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 450, 66, 930, 450, 13155, 49506, 5431, 89, 930, 10352, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 49506, 9, 930, 450, 13155, 49506, 5431, 89, 930, 10352, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 49506, 930, 450, 13155, 49506, 5431, 89, 930, 10352, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 45579, 9, 930, 450, 13155, 49506, 5431, 89, 930, 10352, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 45579, 930, 450, 13155, 49506, 5431, 89, 930, 10352, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 930, 450, 13155, 49506, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 930, 357, 14202, 8, 930, 10352, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 930, 357, 7061, 8, 930, 10352, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1635, 930, 357, 847, 3083, 8, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 450, 66, 9, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 450, 66, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 450, 66, 13, 30094, 80, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 49506, 9, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 49506, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 49506, 13, 5431, 89, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 45579, 9, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 45579, 930, 450, 66, 13, 30094, 80, 13, 5431, 89, 930, 6407, 930, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 12340, 198, 220, 1782, 198 ]
2.55325
5,061
from bq import create_client, read_sql, query DATASET = 'ai2_replication' client = create_client() make_table('institutions') make_table('paper_authors_w_countries') make_table('language') make_table('ai_papers_any_author') make_table('paper_author_institution') make_table('oecd_comparison')
[ 6738, 275, 80, 1330, 2251, 62, 16366, 11, 1100, 62, 25410, 11, 12405, 198, 198, 35, 1404, 1921, 2767, 796, 705, 1872, 17, 62, 35666, 3299, 6, 198, 16366, 796, 2251, 62, 16366, 3419, 628, 198, 198, 15883, 62, 11487, 10786, 8625, 270, 3508, 11537, 198, 15883, 62, 11487, 10786, 20189, 62, 41617, 62, 86, 62, 9127, 1678, 11537, 198, 15883, 62, 11487, 10786, 16129, 11537, 198, 15883, 62, 11487, 10786, 1872, 62, 40491, 62, 1092, 62, 9800, 11537, 198, 15883, 62, 11487, 10786, 20189, 62, 9800, 62, 8625, 2738, 11537, 198, 15883, 62, 11487, 10786, 78, 21142, 62, 785, 1845, 1653, 11537, 198 ]
2.855769
104
from django.db import models from datetime import datetime # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.909091
22
import os import argparse import logging role = os.getenv('DMLC_ROLE').upper() if role == 'WORKER': role = 'Worker' # backward compatibility rank = os.getenv('DMLC_{}_ID'.format(role.upper())) logging.basicConfig(level=logging.INFO, format='%(asctime)s {0}[{1}] %(message)s'.format(role, rank)) from common import find_mxnet, data, fit import mxnet as mx if __name__ == '__main__': # parse args parser = argparse.ArgumentParser(description="train imagenet", formatter_class=argparse.ArgumentDefaultsHelpFormatter) fit.add_fit_args(parser) data.add_data_args(parser) data.add_data_aug_args(parser) # use a large aug level data.set_data_aug_level(parser, 3) parser.set_defaults( # network network = 'resnet', num_layers = 18, # data data_train = '/home/ubuntu/ILSVRC2012/ILSVRC2012_dataset_train.rec', # ALL DATA MUST BE PLACED IN A FOLDER data_val = '/home/ubuntu/ILSVRC2012/ILSVRC2012_dataset_val.rec', # INSTEAD OF A BUCKET num_classes = 1000, num_examples = 281167, image_shape = '3,224,224', min_random_scale = 1, # if input image has min size k, suggest to use # 256.0/x, e.g. 0.533 for 480 # train lr = 0.03, num_epochs = 80, lr_step_epochs = '30,60', disp_batches = 1 ) args = parser.parse_args() # load network from importlib import import_module net = import_module('symbols.'+args.network) sym = net.get_symbol(**vars(args)) # train fit.fit(args, sym, data.get_rec_iter)
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 18090, 796, 28686, 13, 1136, 24330, 10786, 23127, 5639, 62, 13252, 2538, 27691, 45828, 3419, 198, 361, 2597, 6624, 705, 33249, 1137, 10354, 198, 220, 220, 220, 2597, 796, 705, 12468, 263, 6, 220, 1303, 19528, 17764, 198, 43027, 796, 28686, 13, 1136, 24330, 10786, 23127, 5639, 23330, 92, 62, 2389, 4458, 18982, 7, 18090, 13, 45828, 3419, 4008, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 5794, 11639, 4, 7, 292, 310, 524, 8, 82, 1391, 15, 92, 58, 90, 16, 92, 60, 4064, 7, 20500, 8, 82, 4458, 18982, 7, 18090, 11, 4279, 4008, 198, 6738, 2219, 1330, 1064, 62, 36802, 3262, 11, 1366, 11, 4197, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 21136, 26498, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 27432, 3590, 268, 316, 1600, 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, 1296, 1436, 62, 4871, 28, 853, 29572, 13, 28100, 1713, 7469, 13185, 22087, 8479, 1436, 8, 198, 220, 220, 220, 4197, 13, 2860, 62, 11147, 62, 22046, 7, 48610, 8, 198, 220, 220, 220, 1366, 13, 2860, 62, 7890, 62, 22046, 7, 48610, 8, 198, 220, 220, 220, 1366, 13, 2860, 62, 7890, 62, 7493, 62, 22046, 7, 48610, 8, 198, 220, 220, 220, 1303, 779, 257, 1588, 16339, 1241, 198, 220, 220, 220, 1366, 13, 2617, 62, 7890, 62, 7493, 62, 5715, 7, 48610, 11, 513, 8, 198, 220, 220, 220, 30751, 13, 2617, 62, 12286, 82, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3127, 198, 220, 220, 220, 220, 220, 220, 220, 3127, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 705, 411, 3262, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 75, 6962, 220, 220, 220, 220, 220, 220, 796, 1248, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 27432, 220, 220, 220, 220, 220, 220, 796, 31051, 11195, 14, 32230, 14, 45484, 53, 7397, 6999, 14, 45484, 53, 7397, 6999, 62, 19608, 292, 316, 62, 27432, 13, 8344, 3256, 1303, 11096, 42865, 17191, 9348, 9297, 2246, 1961, 3268, 317, 376, 3535, 14418, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 62, 2100, 220, 220, 220, 220, 220, 220, 220, 220, 796, 31051, 11195, 14, 32230, 14, 45484, 53, 7397, 6999, 14, 45484, 53, 7397, 6999, 62, 19608, 292, 316, 62, 2100, 13, 8344, 3256, 220, 220, 1303, 3268, 30516, 2885, 3963, 317, 347, 16696, 2767, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 37724, 220, 220, 220, 220, 220, 796, 8576, 11, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 1069, 12629, 220, 220, 220, 220, 796, 2579, 1157, 3134, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 62, 43358, 220, 220, 220, 220, 220, 796, 705, 18, 11, 24137, 11, 24137, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 25120, 62, 9888, 796, 352, 11, 1303, 611, 5128, 2939, 468, 949, 2546, 479, 11, 1950, 284, 779, 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, 1303, 17759, 13, 15, 14, 87, 11, 304, 13, 70, 13, 657, 13, 44994, 329, 23487, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4512, 198, 220, 220, 220, 220, 220, 220, 220, 300, 81, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 657, 13, 3070, 11, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 538, 5374, 82, 220, 220, 220, 220, 220, 220, 796, 4019, 11, 198, 220, 220, 220, 220, 220, 220, 220, 300, 81, 62, 9662, 62, 538, 5374, 82, 220, 220, 796, 705, 1270, 11, 1899, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 4596, 62, 8664, 2052, 220, 220, 220, 220, 796, 352, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 628, 220, 220, 220, 1303, 3440, 3127, 198, 220, 220, 220, 422, 1330, 8019, 1330, 1330, 62, 21412, 198, 220, 220, 220, 2010, 796, 1330, 62, 21412, 10786, 1837, 2022, 10220, 2637, 10, 22046, 13, 27349, 8, 198, 220, 220, 220, 5659, 796, 2010, 13, 1136, 62, 1837, 23650, 7, 1174, 85, 945, 7, 22046, 4008, 628, 220, 220, 220, 1303, 4512, 198, 220, 220, 220, 4197, 13, 11147, 7, 22046, 11, 5659, 11, 1366, 13, 1136, 62, 8344, 62, 2676, 8, 198 ]
2.085366
820
#!/usr/bin/python2.5 # Copyright (C) 2007 Google Inc. # # 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. from __future__ import absolute_import import codecs import csv import os import re import zipfile from . import gtfsfactoryuser from . import problems from . import util from .compat import StringIO
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 20, 198, 198, 2, 15069, 357, 34, 8, 4343, 3012, 3457, 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, 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, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 40481, 82, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 19974, 7753, 198, 198, 6738, 764, 1330, 308, 83, 9501, 69, 9548, 7220, 198, 6738, 764, 1330, 2761, 198, 6738, 764, 1330, 7736, 198, 6738, 764, 5589, 265, 1330, 10903, 9399, 628 ]
3.626126
222
import pytest from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.admin', ], ) @pytest.fixture def build_tree(): """Builds a sitetree from dict definition. Returns items indexed by urls. Example: items_map = build_tree( {'alias': 'mytree'}, [{ 'title': 'one', 'url': '/one/', 'children': [ {'title': 'subone', 'url': '/subone/'} ] }] ) """ from sitetree.models import Tree, TreeItem from django.contrib.auth.models import Permission return build @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 9288, 62, 28241, 14208, 1324, 1330, 17425, 62, 28241, 14208, 1324, 62, 33803, 198, 198, 9078, 9288, 62, 37390, 796, 17425, 62, 28241, 14208, 1324, 62, 33803, 7, 198, 220, 220, 220, 9117, 62, 38604, 7036, 1961, 62, 2969, 3705, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 705, 28241, 14208, 13, 3642, 822, 13, 28482, 3256, 198, 220, 220, 220, 16589, 198, 8, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198, 4299, 1382, 62, 21048, 33529, 198, 220, 220, 220, 37227, 15580, 82, 257, 1650, 316, 631, 422, 8633, 6770, 13, 198, 220, 220, 220, 16409, 3709, 41497, 416, 2956, 7278, 13, 628, 220, 220, 220, 17934, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3709, 62, 8899, 796, 1382, 62, 21048, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 26011, 10354, 705, 1820, 21048, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 90, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7839, 10354, 705, 505, 3256, 705, 6371, 10354, 31051, 505, 14, 3256, 705, 17197, 10354, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 7839, 10354, 705, 7266, 505, 3256, 705, 6371, 10354, 31051, 7266, 505, 14, 6, 92, 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, 1782, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 422, 1650, 316, 631, 13, 27530, 1330, 12200, 11, 12200, 7449, 198, 220, 220, 220, 422, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 2448, 3411, 628, 220, 220, 220, 1441, 1382, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
2.138973
331
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
import pandas as pd from sklearn.metrics import mean_absolute_error from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeRegressor iowa_file_path = 'rain.csv' home_data = pd.read_csv(iowa_file_path) # Create target object and call it y y = home_data.SalePrice # Create X features = ['LotArea', 'YearBuilt', '1stFlrSF', '2ndFlrSF', 'FullBath', 'BedroomAbvGr', 'TotRmsAbvGrd'] X = home_data[features] # Split into validation and training data train_X, val_X, train_y, val_y = train_test_split(X, y, random_state=1) # Specify Model iowa_model = DecisionTreeRegressor(random_state=1) # Fit Model iowa_model.fit(train_X, train_y) # Make validation predictions and calculate mean absolute error val_predictions = iowa_model.predict(val_X) val_mae = mean_absolute_error(val_predictions, val_y) print("Validation MAE: {:,.0f}".format(val_mae)) # Find best tree dept to reduce overfitting and underfitting candidate_max_leaf_nodes = [5, 25, 50, 100, 250, 500] # Write loop to find the ideal tree size from candidate_max_leaf_nodes candidate = 0 min_mae = get_mae(candidate_max_leaf_nodes[0], train_X, val_X, train_y, val_y) for i in range(len(candidate_max_leaf_nodes)): n = candidate_max_leaf_nodes[i] mae = get_mae(n, train_X, val_X, train_y, val_y) if mae < min_mae: min_mae = mae candidate = i # Store the best value of max_leaf_nodes (it will be either 5, 25, 50, 100, 250 or 500) best_tree_size = candidate_max_leaf_nodes[candidate] print(candidate) # Final optimized model final_model = DecisionTreeRegressor(max_leaf_nodes = 100, random_state = 0) final_model.fit(X, y)
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 1612, 62, 48546, 62, 18224, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 21048, 1330, 26423, 27660, 8081, 44292, 198, 198, 72, 8455, 62, 7753, 62, 6978, 796, 705, 3201, 13, 40664, 6, 198, 198, 11195, 62, 7890, 796, 279, 67, 13, 961, 62, 40664, 7, 72, 8455, 62, 7753, 62, 6978, 8, 198, 2, 13610, 2496, 2134, 290, 869, 340, 331, 198, 88, 796, 1363, 62, 7890, 13, 50, 1000, 18124, 198, 2, 13610, 1395, 198, 40890, 796, 37250, 48601, 30547, 3256, 705, 17688, 39582, 3256, 705, 16, 301, 7414, 81, 20802, 3256, 705, 17, 358, 7414, 81, 20802, 3256, 705, 13295, 33, 776, 3256, 705, 45896, 3823, 4826, 85, 8642, 3256, 705, 51, 313, 49, 907, 4826, 85, 38, 4372, 20520, 198, 55, 796, 1363, 62, 7890, 58, 40890, 60, 198, 198, 2, 27758, 656, 21201, 290, 3047, 1366, 198, 27432, 62, 55, 11, 1188, 62, 55, 11, 4512, 62, 88, 11, 1188, 62, 88, 796, 4512, 62, 9288, 62, 35312, 7, 55, 11, 331, 11, 4738, 62, 5219, 28, 16, 8, 198, 198, 2, 18291, 1958, 9104, 198, 72, 8455, 62, 19849, 796, 26423, 27660, 8081, 44292, 7, 25120, 62, 5219, 28, 16, 8, 198, 2, 25048, 9104, 198, 72, 8455, 62, 19849, 13, 11147, 7, 27432, 62, 55, 11, 4512, 62, 88, 8, 198, 198, 2, 6889, 21201, 16277, 290, 15284, 1612, 4112, 4049, 198, 2100, 62, 28764, 9278, 796, 1312, 8455, 62, 19849, 13, 79, 17407, 7, 2100, 62, 55, 8, 198, 2100, 62, 2611, 68, 796, 1612, 62, 48546, 62, 18224, 7, 2100, 62, 28764, 9278, 11, 1188, 62, 88, 8, 198, 4798, 7203, 7762, 24765, 8779, 36, 25, 46110, 38508, 15, 69, 92, 1911, 18982, 7, 2100, 62, 2611, 68, 4008, 198, 198, 2, 9938, 1266, 5509, 390, 457, 284, 4646, 625, 32232, 290, 739, 32232, 198, 198, 46188, 20540, 62, 9806, 62, 33201, 62, 77, 4147, 796, 685, 20, 11, 1679, 11, 2026, 11, 1802, 11, 8646, 11, 5323, 60, 198, 2, 19430, 9052, 284, 1064, 262, 7306, 5509, 2546, 422, 4540, 62, 9806, 62, 33201, 62, 77, 4147, 198, 198, 46188, 20540, 796, 657, 198, 1084, 62, 2611, 68, 796, 651, 62, 2611, 68, 7, 46188, 20540, 62, 9806, 62, 33201, 62, 77, 4147, 58, 15, 4357, 4512, 62, 55, 11, 1188, 62, 55, 11, 4512, 62, 88, 11, 1188, 62, 88, 8, 198, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 46188, 20540, 62, 9806, 62, 33201, 62, 77, 4147, 8, 2599, 198, 220, 220, 220, 299, 796, 4540, 62, 9806, 62, 33201, 62, 77, 4147, 58, 72, 60, 198, 220, 220, 220, 285, 3609, 796, 651, 62, 2611, 68, 7, 77, 11, 4512, 62, 55, 11, 1188, 62, 55, 11, 4512, 62, 88, 11, 1188, 62, 88, 8, 198, 220, 220, 220, 611, 285, 3609, 1279, 949, 62, 2611, 68, 25, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 2611, 68, 796, 285, 3609, 198, 220, 220, 220, 220, 220, 220, 220, 4540, 796, 1312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 9363, 262, 1266, 1988, 286, 3509, 62, 33201, 62, 77, 4147, 357, 270, 481, 307, 2035, 642, 11, 1679, 11, 2026, 11, 1802, 11, 8646, 393, 5323, 8, 198, 13466, 62, 21048, 62, 7857, 796, 4540, 62, 9806, 62, 33201, 62, 77, 4147, 58, 46188, 20540, 60, 198, 198, 4798, 7, 46188, 20540, 8, 198, 198, 2, 8125, 23392, 2746, 198, 20311, 62, 19849, 796, 26423, 27660, 8081, 44292, 7, 9806, 62, 33201, 62, 77, 4147, 796, 1802, 11, 4738, 62, 5219, 796, 657, 8, 198, 198, 20311, 62, 19849, 13, 11147, 7, 55, 11, 331, 8 ]
2.621236
631
from turtle import * # Fractals if __name__ == '__main__': draw_fractal(5, 90, 10, 'FX', 'X', 'X+YF+', 'Y', '-FX-Y')
[ 6738, 28699, 1330, 1635, 198, 198, 2, 40548, 874, 628, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3197, 62, 69, 974, 282, 7, 20, 11, 4101, 11, 838, 11, 705, 17213, 3256, 705, 55, 3256, 705, 55, 10, 56, 37, 10, 3256, 705, 56, 3256, 705, 12, 17213, 12, 56, 11537, 198 ]
1.955224
67
from .command_conversion import CommandConversion
[ 6738, 764, 21812, 62, 1102, 9641, 1330, 9455, 3103, 9641, 628 ]
4.636364
11
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/1/10 3:23 PM # @Author : Slade # @File : datamake.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import numpy as np flags = tf.app.flags flags.DEFINE_string("input_dir", "./data/", "input dir") flags.DEFINE_string("output_dir", "./text/data/", "output dir") FLAGS = flags.FLAGS # ่ฟ ไธค่ฝฆ ่ฅฟ็“œ ๅˆฐ ๅŒ—ไบฌ ๅˆฐไป˜ # 23 1023 94 782 4234 10304 if __name__ == "__main__": tf.logging.set_verbosity(tf.logging.INFO) tf.app.run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 16, 14, 940, 513, 25, 1954, 3122, 198, 2, 2488, 13838, 220, 1058, 3454, 671, 198, 2, 2488, 8979, 220, 220, 220, 1058, 4818, 321, 539, 13, 9078, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 33152, 796, 48700, 13, 1324, 13, 33152, 198, 33152, 13, 7206, 29940, 62, 8841, 7203, 15414, 62, 15908, 1600, 366, 19571, 7890, 14, 1600, 366, 15414, 26672, 4943, 198, 33152, 13, 7206, 29940, 62, 8841, 7203, 22915, 62, 15908, 1600, 366, 19571, 5239, 14, 7890, 14, 1600, 366, 22915, 26672, 4943, 198, 198, 38948, 50, 796, 9701, 13, 38948, 50, 628, 198, 2, 5525, 123, 238, 220, 10310, 97, 164, 121, 99, 5525, 98, 123, 163, 241, 250, 10263, 230, 108, 10263, 234, 245, 12859, 105, 10263, 230, 108, 20015, 246, 198, 2, 2242, 838, 1954, 10048, 767, 6469, 604, 24409, 838, 21288, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 48700, 13, 6404, 2667, 13, 2617, 62, 19011, 16579, 7, 27110, 13, 6404, 2667, 13, 10778, 8, 198, 220, 220, 220, 48700, 13, 1324, 13, 5143, 3419, 198 ]
2.326772
254
from math import sqrt from pathlib import Path import ase.io import numpy as np from numpy.linalg import norm from numpy.testing import assert_equal as np_assert_equal import pytest from pytest import approx import tests from mofun import Atoms from mofun.helpers import typekey sqrt2_2 = sqrt(2) / 2 sqrt3_2 = sqrt(3) / 2 @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture
[ 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 257, 325, 13, 952, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 40496, 355, 45941, 62, 30493, 62, 40496, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 5561, 198, 198, 11748, 5254, 198, 6738, 285, 1659, 403, 1330, 1629, 3150, 198, 6738, 285, 1659, 403, 13, 16794, 364, 1330, 2099, 2539, 198, 198, 31166, 17034, 17, 62, 17, 796, 19862, 17034, 7, 17, 8, 1220, 362, 198, 31166, 17034, 18, 62, 17, 796, 19862, 17034, 7, 18, 8, 1220, 362, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
2.56701
194
""" Created on 31 Dec 2016 @author: Bruno Beloff ([email protected]) A helper class for validating and preparing GPS module output strings. https://www.nmea.org https://en.wikipedia.org/wiki/NMEA_0183 """ # -------------------------------------------------------------------------------------------------------------------- class NMEAReport(object): """ classdocs """ # ---------------------------------------------------------------------------------------------------------------- @classmethod # ---------------------------------------------------------------------------------------------------------------- @classmethod # ---------------------------------------------------------------------------------------------------------------- def __init__(self, fields): """ Constructor """ self.__fields = fields # ---------------------------------------------------------------------------------------------------------------- @property # ---------------------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------------------
[ 37811, 198, 41972, 319, 3261, 4280, 1584, 198, 198, 31, 9800, 25, 31045, 3944, 2364, 357, 1671, 36909, 13, 6667, 2364, 31, 35782, 1073, 5773, 4234, 13, 785, 8, 198, 198, 32, 31904, 1398, 329, 4938, 803, 290, 10629, 15472, 8265, 5072, 13042, 13, 198, 198, 5450, 1378, 2503, 13, 77, 1326, 64, 13, 2398, 198, 5450, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 45, 11682, 32, 62, 486, 5999, 198, 37811, 628, 198, 2, 16529, 3880, 19351, 198, 198, 4871, 399, 11682, 1503, 45813, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 31628, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 16529, 47232, 628, 220, 220, 220, 2488, 4871, 24396, 628, 198, 220, 220, 220, 1303, 16529, 47232, 628, 220, 220, 220, 2488, 4871, 24396, 628, 198, 220, 220, 220, 1303, 16529, 47232, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 7032, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 28407, 273, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 834, 25747, 796, 7032, 628, 628, 220, 220, 220, 1303, 16529, 47232, 628, 220, 220, 220, 2488, 26745, 628, 198, 220, 220, 220, 1303, 16529, 47232, 628, 628, 198, 220, 220, 220, 1303, 16529, 47232, 198 ]
5.608696
230
# Generated by Django 2.2.16 on 2020-11-07 11:31 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1433, 319, 12131, 12, 1157, 12, 2998, 1367, 25, 3132, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.840909
44
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 994, 262, 4981, 329, 534, 15881, 276, 3709, 198, 2, 198, 2, 4091, 10314, 287, 25, 198, 2, 2638, 1378, 15390, 13, 1416, 2416, 88, 13, 2398, 14, 268, 14, 42861, 14, 4852, 873, 14, 23814, 13, 6494, 198, 198, 11748, 15881, 88, 628, 198 ]
2.666667
63
from conftest import app from model.User import User
[ 6738, 369, 701, 395, 1330, 598, 198, 6738, 2746, 13, 12982, 1330, 11787 ]
4
13
import unittest from busco import BuscoConfig import shutil import os from unittest.mock import Mock from unittest.mock import patch, call
[ 11748, 555, 715, 395, 198, 6738, 1323, 1073, 1330, 5869, 1073, 16934, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 869, 628 ]
3.333333
42
"""Add driver switch activity status Revision ID: 8fde055f9d29 Revises: 8fe63e4276dc Create Date: 2020-02-15 16:46:48.890628 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "8fde055f9d29" down_revision = "8fe63e4276dc" branch_labels = None depends_on = None
[ 37811, 4550, 4639, 5078, 3842, 3722, 198, 198, 18009, 1166, 4522, 25, 807, 69, 2934, 47838, 69, 24, 67, 1959, 198, 18009, 2696, 25, 807, 5036, 5066, 68, 19, 27988, 17896, 198, 16447, 7536, 25, 12131, 12, 2999, 12, 1314, 1467, 25, 3510, 25, 2780, 13, 4531, 3312, 2078, 198, 198, 37811, 198, 6738, 31341, 2022, 291, 1330, 1034, 198, 11748, 44161, 282, 26599, 355, 473, 628, 198, 2, 18440, 42814, 11, 973, 416, 9300, 2022, 291, 13, 198, 260, 10178, 796, 366, 23, 69, 2934, 47838, 69, 24, 67, 1959, 1, 198, 2902, 62, 260, 10178, 796, 366, 23, 5036, 5066, 68, 19, 27988, 17896, 1, 198, 1671, 3702, 62, 23912, 1424, 796, 6045, 198, 10378, 2412, 62, 261, 796, 6045, 628, 198 ]
2.572581
124
"""UWEC Language Tools manager module Provides functions for defining and managing a corpus. """ # Python 3 forward compatability imports. from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import sys import os import hashlib import uweclang.batch from itertools import chain # Import async module. import trollius as asyncio from trollius import From # Setup logger. import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) def _default_filter(meta_data): """The default meta data filter which accepts all files. """ return True def default_metadata_function(filename): """A function producing a dictionary of metadata for a given file. This is the default implementation producing the file name, location, extension, and file size. Arguments: filename (str): The name of the file. Returns: None: If the file path is invalid. (dict): A dictionary containing the metadata. """ if not (filename and os.path.isfile(filename)): return None metadata = dict() # Collect basic metadata: metadata['filename'] = os.path.basename(filename) metadata['location'] = os.path.abspath(filename) ext = uweclang.split_ext(filename) metadata['base'] = ext[0] metadata['extension'] = ext[1] metadata['size'] = os.path.getsize(filename) # Get word count: # with open(os.path.abspath(filename), 'r') as f: # words = 0 # buf_size = 1024 * 1024 # read_f = f.read # loop optimization # buf = read_f(buf_size) # while buf: # try: # words += buf.count('/') # buf = read_f(buf_size) # except UnicodeDecodeError as e: # pass # Skip decode error? metadata['word_count'] = 0#words return metadata def get_file_md5(filename): """Returns the MD5 hash of the given file. """ block_size = 65536 hasher = hashlib.md5() with open(filename, 'rb') as f: buf = f.read(block_size) while len(buf) > 0: hasher.update(buf) buf = f.read(block_size) return hasher.hexdigest() class Corpus(object): """A corpus object for managing a collection of tagged text files. Attributes: file_metadata (dict): A dictionary containing corpus meta data for files indexed by ID. """ def add_files(self, search_locations, extensions=None, recursive=False): """Searches for files in the given locations and adds them to the corpus. Arguments: search_locations ([str]): A list of files and directories to search. extensions ([str]): The file extensions to find in directories. Defaults to None, which will find all files. recursive: (bool): Whether to search directories recursively. Note: Files given in search_locations that do not have the specified extensions will be included in the output. The extensions argument only effects files in the directories given. """ log = logging.getLogger('uweclang.corpus.manager') files = uweclang.get_files(search_locations, extensions=extensions, recursive=recursive) self._file_count += files[1] for f in files[0]: log.debug('Adding file %s', str(f)) # Get file meta data: self.file_metadata[self._current_id] = self._meta_op(f) meta = self.file_metadata[self._current_id] meta['corpus_id'] = self._current_id # meta['MD5'] = get_file_md5(f) # Get file count: self._word_count += meta['word_count'] # Set next file ID: self._current_id += 1 # Log File add. log.info('Adding %s files to corpus.', self._file_count) @property @property def get_file_ids(self, predicate=None): """Returns a list of file ids in the corpus. Arguments: predicate (dict -> bool): A predicate for selecting files based on metadata. Only file ids satisfying the predicate will be returned. """ if predicate: return (k for k in self.file_metadata.keys() if predicate(file_metadata[k])) else: return self.file_metadata.keys() def get_file_text(self, file_id): """Returns the tagged text of the file given by its ID.""" if not self.file_metadata.get(file_id): return None with open(self.file_metadata[file_id]['location'], 'r') as f: return f.read() def file_modified(self, file_id): """Returns true if the file's MD5 hash has changes since it was added to the corpus. """ if not self.file_metadata.get(file_id): return None md5 = get_file_md5(self.file_metadata[file_id]['location']) return md5 != self.file_metadata[file_id]['MD5'] def get_file_metadata(self, file_id): """Returns the text of the file associated with the given file_id.""" return self.file_metadata.get(file_id) def get_id_for_file(self, filename): """Returns the id of the given file in the corpus or None if it is not present. """ for k, v in self.file_metadata.items(): if v['location'] == os.path.abspath(filename): return k return None def files(self, meta_filter=None, exclude_modified=False): """Returns an iterator over the metadata and text of each file in the corpus. """ meta_filter = meta_filter or _default_filter for x in self.get_file_ids(): if (meta_filter(self.get_file_metadata(x)) and not (exclude_modified and self.file_modified(x))): yield (self.get_file_metadata(x), self.get_file_text(x)) def execute_queries( self, queries, definitions=None, meta_filter=None, exclude_modified=False): """Runs the given queries on the corpus asynchronously. Arguments: queries ([Query]): The queries to run. definitions (dict): A dictionary defining query terms. meta_filter (dict -> bool): A function taking file meta data and returning whether the file should be queried. exclude_modified (bool): Whether to exclude modified files from the query. Returns: [Result]: An iterator producing the results of the query. """ log = logging.getLogger('uweclang.corpus.manager') results = [] # Get filtered files from corpus. try: files = self.files( meta_filter=meta_filter, exclude_modified=exclude_modified) except Exception as e: raise CorpusException(e) try: log.debug('Executing query batch.') for index, (meta, tagged) in enumerate(files): # Extract TaggedToken list from file. text = list(chain.from_iterable(uweclang.read_tagged_string(tagged))) # Execute search. for i, query in enumerate(queries): log.debug('Running query #%d on file #%d', i, index) res = query.match(text, source_id=index, definitions=definitions) if res: results.append(res) return chain.from_iterable(results) except Exception as e: raise QueryExecutionError(e) def execute_queries_async( self, queries, definitions=None, meta_filter=None, exclude_modified=False): """Runs the given queries on the corpus asynchronously. Arguments: queries ([Query]): The queries to run. definitions (dict): A dictionary defining query terms. meta_filter (dict -> bool): A function taking file meta data and returning whether the file should be queried. exclude_modified (bool): Whether to exclude modified files from the query. Returns: [Result]: An iterator producing the results of the query. """ log = logging.getLogger('uweclang.corpus.manager') results = [] # Get filtered files from corpus. try: files = self.files( meta_filter=meta_filter, exclude_modified=exclude_modified) except Exception as e: raise CorpusException(e) status = { 'completed' : 0, 'total': 0, } # Dictionary needed since `nonlocal` is not in Python 2.7. log.debug('Executing query batch (async.)') # Function for searching a single file. # Worker function for running a file search. @asyncio.coroutine # Create asynchronous task list. loop = asyncio.get_event_loop() tasks = [] for index, (meta, tagged) in enumerate(files): log.debug('Added task %d', index) tasks.append(asyncio.ensure_future(worker(meta, tagged, index))) # Run tasks. status['total'] = len(tasks) log.info('Starting %d tasks.', status['total']) data = loop.run_until_complete(asyncio.gather(*tuple(tasks))) # Shutdown event loop and logger. loop.close() logging.shutdown() results = (task.result() for task in tasks if task.result()) return chain.from_iterable(results)
[ 37811, 52, 54, 2943, 15417, 20003, 4706, 8265, 628, 220, 220, 220, 47081, 5499, 329, 16215, 290, 11149, 257, 35789, 13, 198, 37811, 198, 2, 11361, 513, 2651, 8330, 1799, 17944, 13, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 11748, 334, 732, 565, 648, 13, 43501, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 2, 17267, 30351, 8265, 13, 198, 11748, 13278, 3754, 355, 30351, 952, 198, 6738, 13278, 3754, 1330, 3574, 198, 198, 2, 31122, 49706, 13, 198, 11748, 18931, 198, 6404, 2667, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 737, 2860, 25060, 7, 6404, 2667, 13, 35067, 25060, 28955, 628, 198, 4299, 4808, 12286, 62, 24455, 7, 28961, 62, 7890, 2599, 198, 220, 220, 220, 37227, 464, 4277, 13634, 1366, 8106, 543, 18178, 477, 3696, 13, 37227, 198, 220, 220, 220, 1441, 6407, 628, 198, 4299, 4277, 62, 38993, 62, 8818, 7, 34345, 2599, 198, 220, 220, 220, 37227, 32, 2163, 9194, 257, 22155, 286, 20150, 329, 257, 1813, 2393, 13, 770, 198, 220, 220, 220, 318, 262, 4277, 7822, 9194, 262, 2393, 1438, 11, 4067, 11, 7552, 11, 198, 220, 220, 220, 290, 2393, 2546, 13, 628, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 357, 2536, 2599, 383, 1438, 286, 262, 2393, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 6045, 25, 1002, 262, 2393, 3108, 318, 12515, 13, 198, 220, 220, 220, 220, 220, 220, 220, 357, 11600, 2599, 317, 22155, 7268, 262, 20150, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 407, 357, 34345, 290, 28686, 13, 6978, 13, 4468, 576, 7, 34345, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 628, 220, 220, 220, 20150, 796, 8633, 3419, 628, 220, 220, 220, 1303, 9745, 4096, 20150, 25, 198, 220, 220, 220, 20150, 17816, 34345, 20520, 796, 28686, 13, 6978, 13, 12093, 12453, 7, 34345, 8, 198, 220, 220, 220, 20150, 17816, 24886, 20520, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 34345, 8, 198, 220, 220, 220, 1070, 796, 334, 732, 565, 648, 13, 35312, 62, 2302, 7, 34345, 8, 198, 220, 220, 220, 20150, 17816, 8692, 20520, 796, 1070, 58, 15, 60, 198, 220, 220, 220, 20150, 17816, 2302, 3004, 20520, 796, 1070, 58, 16, 60, 198, 220, 220, 220, 20150, 17816, 7857, 20520, 796, 28686, 13, 6978, 13, 11407, 1096, 7, 34345, 8, 628, 220, 220, 220, 1303, 3497, 1573, 954, 25, 198, 220, 220, 220, 1303, 351, 1280, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 34345, 828, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2456, 796, 657, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 42684, 62, 7857, 796, 28119, 1635, 28119, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1100, 62, 69, 796, 277, 13, 961, 1303, 9052, 23989, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 42684, 796, 1100, 62, 69, 7, 29325, 62, 7857, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 981, 42684, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2456, 15853, 42684, 13, 9127, 10786, 14, 11537, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42684, 796, 1100, 62, 69, 7, 29325, 62, 7857, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 34371, 10707, 1098, 12331, 355, 304, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 1303, 32214, 36899, 4049, 30, 198, 220, 220, 220, 20150, 17816, 4775, 62, 9127, 20520, 796, 657, 2, 10879, 628, 220, 220, 220, 1441, 20150, 628, 198, 4299, 651, 62, 7753, 62, 9132, 20, 7, 34345, 2599, 198, 220, 220, 220, 37227, 35561, 262, 10670, 20, 12234, 286, 262, 1813, 2393, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2512, 62, 7857, 796, 45021, 2623, 198, 220, 220, 220, 468, 372, 796, 12234, 8019, 13, 9132, 20, 3419, 198, 220, 220, 220, 351, 1280, 7, 34345, 11, 705, 26145, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42684, 796, 277, 13, 961, 7, 9967, 62, 7857, 8, 198, 220, 220, 220, 220, 220, 220, 220, 981, 18896, 7, 29325, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 468, 372, 13, 19119, 7, 29325, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42684, 796, 277, 13, 961, 7, 9967, 62, 7857, 8, 198, 220, 220, 220, 1441, 468, 372, 13, 33095, 12894, 395, 3419, 628, 198, 4871, 44874, 7, 15252, 2599, 198, 220, 220, 220, 37227, 32, 35789, 2134, 329, 11149, 257, 4947, 286, 30509, 2420, 3696, 13, 628, 220, 220, 220, 49213, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 38993, 357, 11600, 2599, 317, 22155, 7268, 35789, 13634, 1366, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3696, 41497, 416, 4522, 13, 198, 220, 220, 220, 37227, 628, 198, 220, 220, 220, 825, 751, 62, 16624, 7, 944, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2989, 62, 17946, 602, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18366, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45115, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 50, 451, 2052, 329, 3696, 287, 262, 1813, 7064, 290, 6673, 606, 284, 262, 198, 220, 220, 220, 220, 220, 220, 220, 35789, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2989, 62, 17946, 602, 29565, 2536, 60, 2599, 317, 1351, 286, 3696, 290, 29196, 284, 2989, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18366, 29565, 2536, 60, 2599, 383, 2393, 18366, 284, 1064, 287, 29196, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2896, 13185, 284, 6045, 11, 543, 481, 1064, 477, 3696, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45115, 25, 357, 30388, 2599, 10127, 284, 2989, 29196, 664, 1834, 2280, 13, 628, 220, 220, 220, 220, 220, 220, 220, 5740, 25, 13283, 1813, 287, 2989, 62, 17946, 602, 326, 466, 407, 423, 262, 7368, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18366, 481, 307, 3017, 287, 262, 5072, 13, 383, 18366, 4578, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 691, 3048, 3696, 287, 262, 29196, 1813, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 796, 18931, 13, 1136, 11187, 1362, 10786, 84, 732, 565, 648, 13, 10215, 79, 385, 13, 37153, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 3696, 796, 334, 732, 565, 648, 13, 1136, 62, 16624, 7, 12947, 62, 17946, 602, 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, 18366, 28, 2302, 5736, 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, 45115, 28, 8344, 30753, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 7753, 62, 9127, 15853, 3696, 58, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 329, 277, 287, 3696, 58, 15, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 32901, 2393, 4064, 82, 3256, 965, 7, 69, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 2393, 13634, 1366, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7753, 62, 38993, 58, 944, 13557, 14421, 62, 312, 60, 796, 2116, 13557, 28961, 62, 404, 7, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 796, 2116, 13, 7753, 62, 38993, 58, 944, 13557, 14421, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 17816, 10215, 79, 385, 62, 312, 20520, 796, 2116, 13557, 14421, 62, 312, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13634, 17816, 12740, 20, 20520, 796, 651, 62, 7753, 62, 9132, 20, 7, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 2393, 954, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 4775, 62, 9127, 15853, 13634, 17816, 4775, 62, 9127, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5345, 1306, 2393, 4522, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 14421, 62, 312, 15853, 352, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5972, 9220, 751, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 10951, 10786, 32901, 4064, 82, 3696, 284, 35789, 2637, 11, 2116, 13557, 7753, 62, 9127, 8, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 825, 651, 62, 7753, 62, 2340, 7, 944, 11, 44010, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 257, 1351, 286, 2393, 220, 2340, 287, 262, 35789, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44010, 357, 11600, 4613, 20512, 2599, 317, 44010, 329, 17246, 3696, 1912, 319, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20150, 13, 5514, 2393, 220, 2340, 19201, 262, 44010, 481, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4504, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 44010, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 357, 74, 329, 479, 287, 2116, 13, 7753, 62, 38993, 13, 13083, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 44010, 7, 7753, 62, 38993, 58, 74, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 7753, 62, 38993, 13, 13083, 3419, 628, 198, 220, 220, 220, 825, 651, 62, 7753, 62, 5239, 7, 944, 11, 2393, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 262, 30509, 2420, 286, 262, 2393, 1813, 416, 663, 4522, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2116, 13, 7753, 62, 38993, 13, 1136, 7, 7753, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 628, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 944, 13, 7753, 62, 38993, 58, 7753, 62, 312, 7131, 6, 24886, 6, 4357, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 13, 961, 3419, 628, 198, 220, 220, 220, 825, 2393, 62, 41771, 7, 944, 11, 2393, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 2081, 611, 262, 2393, 338, 10670, 20, 12234, 468, 2458, 1201, 340, 373, 2087, 198, 220, 220, 220, 220, 220, 220, 220, 284, 262, 35789, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2116, 13, 7753, 62, 38993, 13, 1136, 7, 7753, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 628, 220, 220, 220, 220, 220, 220, 220, 45243, 20, 796, 651, 62, 7753, 62, 9132, 20, 7, 944, 13, 7753, 62, 38993, 58, 7753, 62, 312, 7131, 6, 24886, 6, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 45243, 20, 14512, 2116, 13, 7753, 62, 38993, 58, 7753, 62, 312, 7131, 6, 12740, 20, 20520, 628, 198, 220, 220, 220, 825, 651, 62, 7753, 62, 38993, 7, 944, 11, 2393, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 262, 2420, 286, 262, 2393, 3917, 351, 262, 1813, 2393, 62, 312, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 7753, 62, 38993, 13, 1136, 7, 7753, 62, 312, 8, 628, 198, 220, 220, 220, 825, 651, 62, 312, 62, 1640, 62, 7753, 7, 944, 11, 29472, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 262, 4686, 286, 262, 1813, 2393, 287, 262, 35789, 393, 6045, 611, 340, 318, 407, 198, 220, 220, 220, 220, 220, 220, 220, 1944, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 11, 410, 287, 2116, 13, 7753, 62, 38993, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 410, 17816, 24886, 20520, 6624, 28686, 13, 6978, 13, 397, 2777, 776, 7, 34345, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 479, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 628, 198, 220, 220, 220, 825, 3696, 7, 944, 11, 13634, 62, 24455, 28, 14202, 11, 19607, 62, 41771, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 281, 41313, 625, 262, 20150, 290, 2420, 286, 1123, 2393, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 35789, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 796, 13634, 62, 24455, 393, 4808, 12286, 62, 24455, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 2116, 13, 1136, 62, 7753, 62, 2340, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 357, 28961, 62, 24455, 7, 944, 13, 1136, 62, 7753, 62, 38993, 7, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 357, 1069, 9152, 62, 41771, 290, 2116, 13, 7753, 62, 41771, 7, 87, 4008, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7800, 357, 944, 13, 1136, 62, 7753, 62, 38993, 7, 87, 828, 2116, 13, 1136, 62, 7753, 62, 5239, 7, 87, 4008, 628, 198, 220, 220, 220, 825, 12260, 62, 421, 10640, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20743, 11, 198, 220, 220, 220, 220, 220, 220, 220, 17336, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10987, 82, 262, 1813, 20743, 319, 262, 35789, 355, 24871, 3481, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20743, 29565, 20746, 60, 2599, 383, 20743, 284, 1057, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17336, 357, 11600, 2599, 317, 22155, 16215, 12405, 2846, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 357, 11600, 4613, 20512, 2599, 317, 2163, 2263, 2393, 13634, 1366, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8024, 1771, 262, 2393, 815, 307, 42517, 798, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 357, 30388, 2599, 10127, 284, 19607, 9518, 3696, 422, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 12405, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 23004, 5974, 1052, 41313, 9194, 262, 2482, 286, 262, 12405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 796, 18931, 13, 1136, 11187, 1362, 10786, 84, 732, 565, 648, 13, 10215, 79, 385, 13, 37153, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 17635, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 29083, 3696, 422, 35789, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3696, 796, 2116, 13, 16624, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 28, 28961, 62, 24455, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 28, 1069, 9152, 62, 41771, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 44874, 16922, 7, 68, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 23002, 15129, 12405, 15458, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 6376, 11, 357, 28961, 11, 30509, 8, 287, 27056, 378, 7, 16624, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29677, 309, 14655, 30642, 1351, 422, 2393, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 796, 1351, 7, 7983, 13, 6738, 62, 2676, 540, 7, 84, 732, 565, 648, 13, 961, 62, 12985, 2004, 62, 8841, 7, 12985, 2004, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 8393, 1133, 2989, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 11, 12405, 287, 27056, 378, 7, 421, 10640, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 28768, 12405, 1303, 4, 67, 319, 2393, 1303, 4, 67, 3256, 1312, 11, 220, 6376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 581, 796, 12405, 13, 15699, 7, 5239, 11, 2723, 62, 312, 28, 9630, 11, 17336, 28, 4299, 50101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 581, 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, 2482, 13, 33295, 7, 411, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6333, 13, 6738, 62, 2676, 540, 7, 43420, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 43301, 23002, 1009, 12331, 7, 68, 8, 628, 220, 220, 220, 825, 12260, 62, 421, 10640, 62, 292, 13361, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20743, 11, 198, 220, 220, 220, 220, 220, 220, 220, 17336, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10987, 82, 262, 1813, 20743, 319, 262, 35789, 355, 24871, 3481, 13, 628, 220, 220, 220, 220, 220, 220, 220, 20559, 2886, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20743, 29565, 20746, 60, 2599, 383, 20743, 284, 1057, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17336, 357, 11600, 2599, 317, 22155, 16215, 12405, 2846, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 357, 11600, 4613, 20512, 2599, 317, 2163, 2263, 2393, 13634, 1366, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8024, 1771, 262, 2393, 815, 307, 42517, 798, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 357, 30388, 2599, 10127, 284, 19607, 9518, 3696, 422, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 12405, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 23004, 5974, 1052, 41313, 9194, 262, 2482, 286, 262, 12405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 796, 18931, 13, 1136, 11187, 1362, 10786, 84, 732, 565, 648, 13, 10215, 79, 385, 13, 37153, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 17635, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 29083, 3696, 422, 35789, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3696, 796, 2116, 13, 16624, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 24455, 28, 28961, 62, 24455, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19607, 62, 41771, 28, 1069, 9152, 62, 41771, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 44874, 16922, 7, 68, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3722, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 785, 16838, 6, 1058, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 23350, 10354, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 1303, 28261, 2622, 1201, 4600, 13159, 12001, 63, 318, 407, 287, 11361, 362, 13, 22, 13, 628, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 23002, 15129, 12405, 15458, 357, 292, 13361, 2014, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 15553, 329, 10342, 257, 2060, 2393, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 35412, 2163, 329, 2491, 257, 2393, 2989, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 952, 13, 10215, 28399, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 13610, 39354, 4876, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 9052, 796, 30351, 952, 13, 1136, 62, 15596, 62, 26268, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8861, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 6376, 11, 357, 28961, 11, 30509, 8, 287, 27056, 378, 7, 16624, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 13003, 4876, 4064, 67, 3256, 6376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8861, 13, 33295, 7, 292, 13361, 952, 13, 641, 495, 62, 37443, 7, 28816, 7, 28961, 11, 30509, 11, 6376, 22305, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5660, 8861, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 17816, 23350, 20520, 796, 18896, 7, 83, 6791, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 10951, 10786, 22851, 4064, 67, 8861, 2637, 11, 3722, 17816, 23350, 6, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 9052, 13, 5143, 62, 28446, 62, 20751, 7, 292, 13361, 952, 13, 70, 1032, 46491, 83, 29291, 7, 83, 6791, 22305, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 40411, 1785, 9052, 290, 49706, 13, 198, 220, 220, 220, 220, 220, 220, 220, 9052, 13, 19836, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 49625, 2902, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 2482, 796, 357, 35943, 13, 20274, 3419, 329, 4876, 287, 8861, 611, 4876, 13, 20274, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6333, 13, 6738, 62, 2676, 540, 7, 43420, 8, 198 ]
2.320056
4,268
""" .. class:: GalaxySpectrumVVDS .. moduleauthor:: Johan Comparat <johan.comparat__at__gmail.com> The class GalaxySpectrumVVDS is dedicated to handling VVDS spectra """ from os.path import join import os import numpy as n import astropy.io.fits as fits import glob import matplotlib matplotlib.use('pdf') import matplotlib.pyplot as p from LineFittingLibrary import * lfl = LineFittingLibrary() from filterList import * from lineListAir import * class GalaxySpectrumVVDS: """ Loads the environement proper to the vvds survey. Two modes of operation : flux calibration or line fitting :param catalog_entry: an entry of the vvds catalog :param calibration: if the class is loaded with intention of flux calibrating the vvds data. :param lineFits: if the class is loaded with intention of fitting line fluxes on the vvds spectra. """ def openObservedSpectrum(self): """ reads a VVDS pectrum returns the wavelength, the flux and the error on the flux and two arrays for masking purpose """ spL=glob.glob(join(self.vvds_spectra_dir,"sc_*" + str(self.catalog_entry['NUM']) + "*atm_clean.fits")) #print spL if len(spL)==1 : specFileName=spL[0] spectraHDU=fits.open(specFileName) wl=spectraHDU[0].header['CRVAL1'] + spectraHDU[0].header['CDELT1'] * n.arange(2,spectraHDU[0].header['NAXIS1']+2) fl=spectraHDU[0].data[0] noiseFileName=glob.glob(join(self.vvds_spectra_dir,"sc_*"+str(self.catalog_entry['NUM'])+"*noise.fits"))[0] noiseHDU=fits.open(noiseFileName) flErr=noiseHDU[0].data[0] self.wavelength,self.fluxl,self.fluxlErr=wl,fl,flErr else : self.wavelength,self.fluxl,self.fluxlErr= [-1,-1.],[-1,-1.],[-1,-1.] def plotFit(self, outputFigureNameRoot, ymin = 1e-19, ymax = 1e-17): """ Plots the spectrum and the line fits in a few figures """ ok = (self.fluxl >0 ) & (self.fluxl > 1.2* self.fluxlErr) p.figure(1,(12,4)) p.axes([0.1,0.2,0.85,0.75]) p.errorbar(self.wavelength[ok],self.fluxl[ok]/self.catalog_entry['fo'],yerr = self.fluxlErr[ok]/self.catalog_entry['fo'], linewidth=1, alpha= 0.4, label='spectrum') p.xlabel('wavelength [A]') p.ylabel(r'f$_\lambda$ [erg cm$^{-2}$ s$^{-1}$ A$^{-1}$]') p.yscale('log') p.ylim((ymin, ymax)) gl = p.legend(loc=0,fontsize=12) gl.set_frame_on(False) p.savefig( outputFigureNameRoot + "-all.png" ) p.clf() a0_1 = (1+self.catalog_entry['Z'])*O2_3727 a0_2 = (1+self.catalog_entry['Z'])*O2_3729 continu= self.catalog_entry['O2_3728_continu'] aas =n.arange(self.catalog_entry['O2_3728_a0']-70, self.catalog_entry['O2_3728_a0']+70,0.1) flMod=lambda aa,sigma,F0,sh :continu+ lfl.gaussianLineNC(aa,sigma,(1-sh)*F0,a0_1)+lfl.gaussianLineNC(aa,sigma,sh*F0,a0_2) model = flMod(aas, self.catalog_entry['O2_3728_sigma'], self.catalog_entry['O2_3728_flux'],0.58 )# self.catalog_entry['O2_3728_share']) p.figure(2,(4,4)) p.axes([0.21,0.2,0.78,0.7]) p.errorbar(self.wavelength,self.fluxl/self.catalog_entry['fo'],yerr = self.fluxlErr/self.catalog_entry['fo']) p.plot(aas, model/self.catalog_entry['fo'],'g',label='model', lw=2) p.xlabel('wavelength [A]') p.ylabel(r'f$_\lambda$ [erg cm$^{-2}$ s$^{-1}$ A$^{-1}$]') p.yscale('log') p.ylim((ymin, ymax)) p.xlim(( self.catalog_entry['O2_3728_a0']-100, self.catalog_entry['O2_3728_a0']+100)) gl = p.legend(loc=0,fontsize=12) gl.set_frame_on(False) p.title('[OII] 3727') p.savefig( outputFigureNameRoot + "-O2_3728.png") p.clf() a0 = self.catalog_entry['O3_5007_a0'] continu= self.catalog_entry['O3_5007_continu'] aas =n.arange(self.catalog_entry['O3_5007_a0']-70, self.catalog_entry['O3_5007_a0']+70,0.1) flMod=lambda aa,sigma,F0: lfl.gaussianLine(aa,sigma,F0,a0,continu) model = flMod(aas, self.catalog_entry['O3_5007_sigma'], self.catalog_entry['O3_5007_flux']) p.figure(2,(4,4)) p.axes([0.21,0.2,0.78,0.7]) p.errorbar(self.wavelength,self.fluxl/self.catalog_entry['fo'],yerr = self.fluxlErr/self.catalog_entry['fo']) p.plot(aas, model/self.catalog_entry['fo'],'g',label='model', lw =2) p.xlabel('wavelength [A]') p.ylabel(r'f$_\lambda$ [erg cm$^{-2}$ s$^{-1}$ A$^{-1}$]') p.yscale('log') p.ylim((ymin, ymax)) p.xlim(( self.catalog_entry['O3_5007_a0']-100, self.catalog_entry['O3_5007_a0']+100)) gl = p.legend(loc=0,fontsize=12) gl.set_frame_on(False) p.title('[OIII] 5007') p.savefig( outputFigureNameRoot + "-O3_5007.png") p.clf()
[ 37811, 198, 492, 1398, 3712, 9252, 49738, 6582, 53, 53, 5258, 198, 198, 492, 8265, 9800, 3712, 16053, 272, 22565, 265, 1279, 73, 22436, 13, 785, 1845, 265, 834, 265, 834, 14816, 13, 785, 29, 198, 198, 464, 1398, 9252, 49738, 6582, 53, 53, 5258, 318, 7256, 284, 9041, 569, 53, 5258, 5444, 430, 198, 198, 37811, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 299, 198, 11748, 6468, 28338, 13, 952, 13, 21013, 355, 11414, 198, 11748, 15095, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 12315, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 279, 198, 6738, 6910, 37, 2535, 23377, 1330, 1635, 198, 1652, 75, 796, 6910, 37, 2535, 23377, 3419, 198, 6738, 8106, 8053, 1330, 1635, 198, 6738, 1627, 8053, 16170, 1330, 1635, 198, 198, 4871, 9252, 49738, 6582, 53, 53, 5258, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8778, 82, 262, 551, 2268, 972, 1774, 284, 262, 410, 85, 9310, 5526, 13, 628, 220, 220, 220, 220, 220, 220, 220, 4930, 12881, 286, 4905, 1058, 28462, 36537, 393, 1627, 15830, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 18388, 62, 13000, 25, 281, 5726, 286, 262, 410, 85, 9310, 18388, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 36537, 25, 611, 262, 1398, 318, 9639, 351, 6778, 286, 28462, 33801, 803, 262, 410, 85, 9310, 1366, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 1627, 37, 896, 25, 611, 262, 1398, 318, 9639, 351, 6778, 286, 15830, 1627, 28462, 274, 319, 262, 410, 85, 9310, 5444, 430, 13, 198, 197, 37811, 628, 197, 4299, 1280, 31310, 8520, 49738, 6582, 7, 944, 2599, 198, 197, 197, 37811, 198, 197, 197, 40779, 257, 569, 53, 5258, 279, 478, 6582, 198, 197, 197, 7783, 82, 262, 28400, 11, 262, 28462, 290, 262, 4049, 319, 262, 28462, 290, 734, 26515, 329, 9335, 278, 4007, 198, 197, 197, 37811, 198, 197, 197, 2777, 43, 28, 4743, 672, 13, 4743, 672, 7, 22179, 7, 944, 13, 25093, 9310, 62, 4443, 430, 62, 15908, 553, 1416, 62, 9, 1, 1343, 965, 7, 944, 13, 9246, 11794, 62, 13000, 17816, 41359, 6, 12962, 1343, 366, 9, 265, 76, 62, 27773, 13, 21013, 48774, 198, 197, 197, 2, 4798, 599, 43, 198, 197, 197, 361, 18896, 7, 2777, 43, 8, 855, 16, 1058, 198, 197, 197, 197, 16684, 8979, 5376, 28, 2777, 43, 58, 15, 60, 198, 197, 197, 197, 4443, 430, 10227, 52, 28, 21013, 13, 9654, 7, 16684, 8979, 5376, 8, 198, 197, 197, 197, 40989, 28, 4443, 430, 10227, 52, 58, 15, 4083, 25677, 17816, 9419, 23428, 16, 20520, 1343, 5444, 430, 10227, 52, 58, 15, 4083, 25677, 17816, 8610, 3698, 51, 16, 20520, 1635, 299, 13, 283, 858, 7, 17, 11, 4443, 430, 10227, 52, 58, 15, 4083, 25677, 17816, 4535, 55, 1797, 16, 20520, 10, 17, 8, 198, 197, 197, 197, 2704, 28, 4443, 430, 10227, 52, 58, 15, 4083, 7890, 58, 15, 60, 198, 197, 197, 197, 3919, 786, 8979, 5376, 28, 4743, 672, 13, 4743, 672, 7, 22179, 7, 944, 13, 25093, 9310, 62, 4443, 430, 62, 15908, 553, 1416, 62, 9, 1, 10, 2536, 7, 944, 13, 9246, 11794, 62, 13000, 17816, 41359, 6, 12962, 10, 1, 9, 3919, 786, 13, 21013, 48774, 58, 15, 60, 198, 197, 197, 197, 3919, 786, 10227, 52, 28, 21013, 13, 9654, 7, 3919, 786, 8979, 5376, 8, 198, 197, 197, 197, 2704, 9139, 81, 28, 3919, 786, 10227, 52, 58, 15, 4083, 7890, 58, 15, 60, 198, 197, 197, 197, 944, 13, 10247, 26623, 11, 944, 13, 69, 22564, 75, 11, 944, 13, 69, 22564, 75, 9139, 81, 28, 40989, 11, 2704, 11, 2704, 9139, 81, 198, 197, 197, 17772, 1058, 198, 197, 197, 197, 944, 13, 10247, 26623, 11, 944, 13, 69, 22564, 75, 11, 944, 13, 69, 22564, 75, 9139, 81, 28, 25915, 16, 12095, 16, 13, 38430, 12, 16, 12095, 16, 13, 38430, 12, 16, 12095, 16, 8183, 628, 197, 4299, 7110, 31805, 7, 944, 11, 5072, 11337, 5376, 30016, 11, 331, 1084, 796, 352, 68, 12, 1129, 11, 331, 9806, 796, 352, 68, 12, 1558, 2599, 198, 197, 197, 37811, 198, 197, 197, 3646, 1747, 262, 10958, 290, 262, 1627, 11414, 287, 257, 1178, 5538, 198, 197, 197, 37811, 198, 197, 197, 482, 796, 357, 944, 13, 69, 22564, 75, 1875, 15, 1267, 1222, 357, 944, 13, 69, 22564, 75, 1875, 352, 13, 17, 9, 2116, 13, 69, 22564, 75, 9139, 81, 8, 198, 197, 197, 79, 13, 26875, 7, 16, 11, 7, 1065, 11, 19, 4008, 198, 197, 197, 79, 13, 897, 274, 26933, 15, 13, 16, 11, 15, 13, 17, 11, 15, 13, 5332, 11, 15, 13, 2425, 12962, 198, 197, 197, 79, 13, 18224, 5657, 7, 944, 13, 10247, 26623, 58, 482, 4357, 944, 13, 69, 22564, 75, 58, 482, 60, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 4357, 88, 8056, 796, 2116, 13, 69, 22564, 75, 9139, 81, 58, 482, 60, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 4357, 9493, 413, 5649, 28, 16, 11, 17130, 28, 657, 13, 19, 11, 6167, 11639, 4443, 6582, 11537, 198, 197, 197, 79, 13, 87, 18242, 10786, 10247, 26623, 685, 32, 60, 11537, 198, 197, 197, 79, 13, 2645, 9608, 7, 81, 6, 69, 3, 62, 59, 50033, 3, 685, 6422, 12067, 3, 36796, 12, 17, 92, 3, 264, 3, 36796, 12, 16, 92, 3, 317, 3, 36796, 12, 16, 92, 3, 60, 11537, 198, 197, 197, 79, 13, 28349, 1000, 10786, 6404, 11537, 198, 197, 197, 79, 13, 88, 2475, 19510, 88, 1084, 11, 331, 9806, 4008, 198, 197, 197, 4743, 796, 279, 13, 1455, 437, 7, 17946, 28, 15, 11, 10331, 7857, 28, 1065, 8, 198, 197, 197, 4743, 13, 2617, 62, 14535, 62, 261, 7, 25101, 8, 198, 197, 197, 79, 13, 21928, 5647, 7, 5072, 11337, 5376, 30016, 1343, 27444, 439, 13, 11134, 1, 1267, 198, 197, 197, 79, 13, 565, 69, 3419, 628, 197, 197, 64, 15, 62, 16, 796, 357, 16, 10, 944, 13, 9246, 11794, 62, 13000, 17816, 57, 6, 12962, 9, 46, 17, 62, 2718, 1983, 198, 197, 197, 64, 15, 62, 17, 796, 357, 16, 10, 944, 13, 9246, 11794, 62, 13000, 17816, 57, 6, 12962, 9, 46, 17, 62, 2718, 1959, 198, 197, 197, 18487, 84, 28, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 18487, 84, 20520, 198, 197, 197, 64, 292, 796, 77, 13, 283, 858, 7, 944, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 64, 15, 20520, 12, 2154, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 64, 15, 20520, 10, 2154, 11, 15, 13, 16, 8, 198, 197, 197, 2704, 5841, 28, 50033, 257, 64, 11, 82, 13495, 11, 37, 15, 11, 1477, 1058, 18487, 84, 10, 300, 2704, 13, 4908, 31562, 13949, 7792, 7, 7252, 11, 82, 13495, 11, 7, 16, 12, 1477, 27493, 37, 15, 11, 64, 15, 62, 16, 47762, 1652, 75, 13, 4908, 31562, 13949, 7792, 7, 7252, 11, 82, 13495, 11, 1477, 9, 37, 15, 11, 64, 15, 62, 17, 8, 198, 197, 197, 19849, 796, 781, 5841, 7, 64, 292, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 82, 13495, 6, 4357, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 69, 22564, 6, 4357, 15, 13, 3365, 1267, 2, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 20077, 6, 12962, 198, 197, 197, 198, 197, 197, 79, 13, 26875, 7, 17, 11, 7, 19, 11, 19, 4008, 198, 197, 197, 79, 13, 897, 274, 26933, 15, 13, 2481, 11, 15, 13, 17, 11, 15, 13, 3695, 11, 15, 13, 22, 12962, 198, 197, 197, 79, 13, 18224, 5657, 7, 944, 13, 10247, 26623, 11, 944, 13, 69, 22564, 75, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 4357, 88, 8056, 796, 2116, 13, 69, 22564, 75, 9139, 81, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 12962, 198, 197, 197, 79, 13, 29487, 7, 64, 292, 11, 2746, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 20520, 4032, 70, 3256, 18242, 11639, 19849, 3256, 300, 86, 28, 17, 8, 198, 197, 197, 79, 13, 87, 18242, 10786, 10247, 26623, 685, 32, 60, 11537, 198, 197, 197, 79, 13, 2645, 9608, 7, 81, 6, 69, 3, 62, 59, 50033, 3, 685, 6422, 12067, 3, 36796, 12, 17, 92, 3, 264, 3, 36796, 12, 16, 92, 3, 317, 3, 36796, 12, 16, 92, 3, 60, 11537, 198, 197, 197, 79, 13, 28349, 1000, 10786, 6404, 11537, 198, 197, 197, 79, 13, 88, 2475, 19510, 88, 1084, 11, 331, 9806, 4008, 198, 197, 197, 79, 13, 87, 2475, 19510, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 64, 15, 20520, 12, 3064, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 17, 62, 2718, 2078, 62, 64, 15, 20520, 10, 3064, 4008, 198, 197, 197, 4743, 796, 279, 13, 1455, 437, 7, 17946, 28, 15, 11, 10331, 7857, 28, 1065, 8, 198, 197, 197, 4743, 13, 2617, 62, 14535, 62, 261, 7, 25101, 8, 198, 197, 197, 79, 13, 7839, 10786, 58, 46, 3978, 60, 5214, 1983, 11537, 198, 197, 197, 79, 13, 21928, 5647, 7, 5072, 11337, 5376, 30016, 1343, 27444, 46, 17, 62, 2718, 2078, 13, 11134, 4943, 198, 197, 197, 79, 13, 565, 69, 3419, 628, 197, 197, 64, 15, 796, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 64, 15, 20520, 198, 197, 197, 18487, 84, 28, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 18487, 84, 20520, 198, 197, 197, 64, 292, 796, 77, 13, 283, 858, 7, 944, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 64, 15, 20520, 12, 2154, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 64, 15, 20520, 10, 2154, 11, 15, 13, 16, 8, 198, 197, 197, 2704, 5841, 28, 50033, 257, 64, 11, 82, 13495, 11, 37, 15, 25, 300, 2704, 13, 4908, 31562, 13949, 7, 7252, 11, 82, 13495, 11, 37, 15, 11, 64, 15, 11, 18487, 84, 8, 198, 197, 197, 19849, 796, 781, 5841, 7, 64, 292, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 82, 13495, 6, 4357, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 69, 22564, 6, 12962, 198, 197, 197, 198, 197, 197, 79, 13, 26875, 7, 17, 11, 7, 19, 11, 19, 4008, 198, 197, 197, 79, 13, 897, 274, 26933, 15, 13, 2481, 11, 15, 13, 17, 11, 15, 13, 3695, 11, 15, 13, 22, 12962, 198, 197, 197, 79, 13, 18224, 5657, 7, 944, 13, 10247, 26623, 11, 944, 13, 69, 22564, 75, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 4357, 88, 8056, 796, 2116, 13, 69, 22564, 75, 9139, 81, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 6, 12962, 198, 197, 197, 79, 13, 29487, 7, 64, 292, 11, 2746, 14, 944, 13, 9246, 11794, 62, 13000, 17816, 6513, 20520, 4032, 70, 3256, 18242, 11639, 19849, 3256, 300, 86, 796, 17, 8, 198, 197, 197, 79, 13, 87, 18242, 10786, 10247, 26623, 685, 32, 60, 11537, 198, 197, 197, 79, 13, 2645, 9608, 7, 81, 6, 69, 3, 62, 59, 50033, 3, 685, 6422, 12067, 3, 36796, 12, 17, 92, 3, 264, 3, 36796, 12, 16, 92, 3, 317, 3, 36796, 12, 16, 92, 3, 60, 11537, 198, 197, 197, 79, 13, 28349, 1000, 10786, 6404, 11537, 198, 197, 197, 79, 13, 88, 2475, 19510, 88, 1084, 11, 331, 9806, 4008, 198, 197, 197, 79, 13, 87, 2475, 19510, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 64, 15, 20520, 12, 3064, 11, 2116, 13, 9246, 11794, 62, 13000, 17816, 46, 18, 62, 4059, 22, 62, 64, 15, 20520, 10, 3064, 4008, 198, 197, 197, 4743, 796, 279, 13, 1455, 437, 7, 17946, 28, 15, 11, 10331, 7857, 28, 1065, 8, 198, 197, 197, 4743, 13, 2617, 62, 14535, 62, 261, 7, 25101, 8, 198, 197, 197, 79, 13, 7839, 10786, 58, 46, 10855, 60, 5323, 22, 11537, 198, 197, 197, 79, 13, 21928, 5647, 7, 5072, 11337, 5376, 30016, 1343, 27444, 46, 18, 62, 4059, 22, 13, 11134, 4943, 198, 197, 197, 79, 13, 565, 69, 3419, 628, 198 ]
2.081106
2,133
import setuptools setuptools.setup( name="RAscore", # Replace with your own username version="2020.9", author="Reymond Group/Molecular AI AstraZeneca", author_email="[email protected]", license="MIT", description="Computation of retrosynthetic accessibility from machine learening of CASP predictions", url="https://github.com/reymond-group/RAscore", packages=setuptools.find_packages(), python_requires='>=3.7', )
[ 11748, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 3861, 26675, 1600, 1303, 40177, 351, 534, 898, 20579, 198, 220, 220, 220, 2196, 2625, 42334, 13, 24, 1600, 198, 220, 220, 220, 1772, 2625, 49, 2959, 6327, 4912, 14, 44, 2305, 10440, 9552, 8304, 430, 47573, 31047, 1600, 198, 220, 220, 220, 1772, 62, 12888, 2625, 321, 349, 13, 400, 461, 21070, 31, 17896, 65, 13, 403, 32438, 13, 354, 1600, 198, 220, 220, 220, 5964, 2625, 36393, 1600, 198, 220, 220, 220, 6764, 2625, 5377, 1996, 341, 286, 12175, 1837, 429, 6587, 28969, 422, 4572, 443, 533, 768, 286, 35106, 47, 16277, 1600, 198, 220, 220, 220, 19016, 2625, 5450, 1378, 12567, 13, 785, 14, 4364, 6327, 12, 8094, 14, 3861, 26675, 1600, 198, 220, 220, 220, 10392, 28, 2617, 37623, 10141, 13, 19796, 62, 43789, 22784, 198, 220, 220, 220, 21015, 62, 47911, 11639, 29, 28, 18, 13, 22, 3256, 198, 8, 198 ]
2.804878
164
# pylint: disable=missing-function-docstring, missing-module-docstring/ import numpy as np import pytest from numpy.random import rand, randint import modules.complex_func as mod from pyccel.epyccel import epyccel @pytest.mark.parametrize("f", [ mod.create_complex_literal__int_int, mod.create_complex_literal__int_float, mod.create_complex_literal__int_complex, mod.create_complex_literal__float_int, mod.create_complex_literal__float_float, mod.create_complex_literal__float_complex, mod.create_complex_literal__complex_int, mod.create_complex_literal__complex_float, mod.create_complex_literal__complex_complex, mod.cast_complex_literal] )
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 8818, 12, 15390, 8841, 11, 4814, 12, 21412, 12, 15390, 8841, 14, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 299, 32152, 13, 25120, 1330, 43720, 11, 43720, 600, 198, 198, 11748, 13103, 13, 41887, 62, 20786, 355, 953, 198, 6738, 12972, 66, 5276, 13, 538, 88, 66, 5276, 1330, 2462, 88, 66, 5276, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 69, 1600, 685, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 600, 62, 600, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 600, 62, 22468, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 600, 62, 41887, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 22468, 62, 600, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 22468, 62, 22468, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 22468, 62, 41887, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 41887, 62, 600, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 41887, 62, 22468, 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, 953, 13, 17953, 62, 41887, 62, 18250, 1691, 834, 41887, 62, 41887, 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, 953, 13, 2701, 62, 41887, 62, 18250, 1691, 60, 1267, 198 ]
1.953846
455
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from sweeperbot._version import __version__ with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() setup( name="sweeperbot", version=__version__, description="Test", long_description=readme + "\n\n" + history, author="Glanyx", author_email="[email protected]", url="https://github.com/glanyx/segachan/", entry_points={"console_scripts": ["sweeperbot=sweeperbot.launch:main"]}, include_package_data=True, license="GNU General Public License v3", zip_safe=False, keywords=[ "sweeperbot", "sweeper", "bot", "discord", "benedict", "benedict 9940", "segachan", ], classifiers=[ "Development Status :: 2- Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", ], )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 3490, 5723, 13645, 13557, 9641, 1330, 11593, 9641, 834, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 81, 301, 4943, 355, 1100, 1326, 62, 7753, 25, 198, 220, 220, 220, 1100, 1326, 796, 1100, 1326, 62, 7753, 13, 961, 3419, 198, 198, 4480, 1280, 7203, 39, 42480, 13, 81, 301, 4943, 355, 2106, 62, 7753, 25, 198, 220, 220, 220, 2106, 796, 2106, 62, 7753, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 46280, 5723, 13645, 1600, 198, 220, 220, 220, 2196, 28, 834, 9641, 834, 11, 198, 220, 220, 220, 6764, 2625, 14402, 1600, 198, 220, 220, 220, 890, 62, 11213, 28, 961, 1326, 1343, 37082, 77, 59, 77, 1, 1343, 2106, 11, 198, 220, 220, 220, 1772, 2625, 9861, 1092, 87, 1600, 198, 220, 220, 220, 1772, 62, 12888, 2625, 76, 522, 74, 1211, 316, 31, 12583, 13, 1073, 13, 2724, 1600, 198, 220, 220, 220, 19016, 2625, 5450, 1378, 12567, 13, 785, 14, 4743, 1092, 87, 14, 325, 70, 620, 272, 14, 1600, 198, 220, 220, 220, 5726, 62, 13033, 28, 4895, 41947, 62, 46521, 1298, 14631, 46280, 5723, 13645, 28, 46280, 5723, 13645, 13, 35681, 25, 12417, 8973, 5512, 198, 220, 220, 220, 2291, 62, 26495, 62, 7890, 28, 17821, 11, 198, 220, 220, 220, 5964, 2625, 16630, 52, 3611, 5094, 13789, 410, 18, 1600, 198, 220, 220, 220, 19974, 62, 21230, 28, 25101, 11, 198, 220, 220, 220, 26286, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 366, 46280, 5723, 13645, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 46280, 5723, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 13645, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15410, 585, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 65, 2945, 713, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 65, 2945, 713, 7388, 1821, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 325, 70, 620, 272, 1600, 198, 220, 220, 220, 16589, 198, 220, 220, 220, 1398, 13350, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 366, 41206, 12678, 7904, 362, 12, 17993, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5317, 1631, 7591, 1240, 7904, 34152, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 34156, 7904, 7294, 40, 20010, 1079, 7904, 22961, 3611, 5094, 13789, 410, 18, 357, 38, 6489, 85, 18, 42501, 198, 220, 220, 220, 220, 220, 220, 220, 366, 35364, 15417, 7904, 3594, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15167, 2229, 15417, 7904, 11361, 7904, 513, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15167, 2229, 15417, 7904, 11361, 7904, 513, 13, 22, 1600, 198, 220, 220, 220, 16589, 198, 8, 198 ]
2.379032
496
import requests import os from datetime import datetime import json from bs4 import BeautifulSoup as bs import time import random import string
[ 11748, 7007, 201, 198, 11748, 28686, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 11748, 33918, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 201, 198, 11748, 640, 201, 198, 11748, 4738, 201, 198, 11748, 4731, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198 ]
2.698413
63
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name๏ผš test1 Description : ๅคš็บฟ็จ‹ๅฎž็Žฐ Author : pengsheng date๏ผš 2019-04-20 ------------------------------------------------- """ import threading new_thread = threading.Thread(target=worker, name='new_thread') new_thread.start() # ๆ›ดๅŠ ๅ……ๅˆ†ๅˆฉ็”จCPU็š„ๆ€ง่ƒฝไผ˜ๅŠฟ(็บฟ็จ‹ๆ‰ง่กŒๆ˜ฏๅผ‚ๆญฅ็š„) # ๅผ‚ๆญฅ็ผ–็จ‹ๅคš็”จไบŽ่งฃๅ†ณๆ€ง่ƒฝ้—ฎ้ข˜,ไธ€่ˆฌ้—ฎ้ข˜่ƒฝๅคŸ็”จๅŒๆญฅๅฐฑ็”จๅŒๆญฅ t = threading.current_thread() print(t.getName())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 198, 220, 220, 9220, 6530, 171, 120, 248, 220, 220, 220, 220, 1332, 16, 198, 220, 220, 12489, 1058, 220, 36469, 248, 163, 118, 123, 163, 101, 233, 22522, 252, 163, 236, 108, 198, 220, 220, 6434, 1058, 220, 220, 220, 220, 220, 220, 279, 1516, 7091, 782, 198, 220, 220, 3128, 171, 120, 248, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13130, 12, 3023, 12, 1238, 198, 47232, 12, 198, 37811, 198, 198, 11748, 4704, 278, 198, 198, 3605, 62, 16663, 796, 4704, 278, 13, 16818, 7, 16793, 28, 28816, 11, 1438, 11639, 3605, 62, 16663, 11537, 198, 3605, 62, 16663, 13, 9688, 3419, 198, 198, 2, 10545, 249, 112, 27950, 254, 17739, 227, 26344, 228, 26344, 102, 18796, 101, 36037, 21410, 45250, 100, 47797, 121, 27670, 246, 27950, 123, 7, 163, 118, 123, 163, 101, 233, 33699, 100, 26193, 234, 42468, 28156, 224, 29826, 98, 21410, 8, 198, 2, 10263, 120, 224, 29826, 98, 163, 120, 244, 163, 101, 233, 13783, 248, 18796, 101, 12859, 236, 164, 100, 96, 37863, 111, 45250, 100, 47797, 121, 29785, 106, 165, 95, 246, 11, 31660, 48958, 105, 29785, 106, 165, 95, 246, 47797, 121, 13783, 253, 18796, 101, 28938, 234, 29826, 98, 22887, 109, 18796, 101, 28938, 234, 29826, 98, 198, 198, 83, 796, 4704, 278, 13, 14421, 62, 16663, 3419, 198, 4798, 7, 83, 13, 1136, 5376, 28955 ]
1.802419
248
# fix absolute imports on ST3 # TODO: remove #import sys #import os #sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) try: from sublime_jedi import * except ImportError: from .sublime_jedi import *
[ 2, 4259, 4112, 17944, 319, 3563, 18, 198, 2, 16926, 46, 25, 4781, 198, 2, 11748, 25064, 198, 2, 11748, 28686, 198, 2, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 22305, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 41674, 62, 73, 13740, 1330, 1635, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 764, 7266, 27299, 62, 73, 13740, 1330, 1635, 198 ]
2.630952
84
__author__ = "Vanessa Sochat" __copyright__ = "Copyright 2021, Vanessa Sochat" __license__ = "MPL 2.0" import os import time import tarfile import tempfile import time from oras.logger import logger import oras.utils as utils import oras.defaults as defaults from .const import TempFilePattern, AnnotationUnpack, AnnotationDigest from .utils import resolve_name, tar_directory from .readerat import sizeReaderAt from .utils import tar_directory from .opts import CdWriterOpts, WithOutputHash from .iowriter import IoContentWriter import opencontainers.image.v1.annotations as annotations import opencontainers.image.v1.descriptor as descriptor class FileStore: """ A FileStore provides content from the file system """ def map_path(self, name, path): """ Map a name to a path """ path = self.resolve_path(path) self.path_map[name] = path return path def resolve_path(self, name): """ Return the path by name """ path = self.path_map.get(name) if path or (path and os.path.isabs(path)): return path return os.path.join(self.root, path) def set(self, desc): """ Save a descriptor to the map. """ self.descriptor[desc.Digest.value] = desc def add(self, name, media_type, path): """ Add a file reference """ path = path or name path = self.map_path(name, path) if os.path.isdir(path): desc = self.descriptor_from_dir(name, media_type, path) elif os.path.isfile(path): desc = self.descriptor_from_file(media_type, path) else: logger.exit("%s is not a valid path." % path) desc.Annotations[annotations.AnnotationTitle] = name self.set(desc) return desc def descriptor_from_file(self, media_type, path): """ Get a descriptor from file. """ if not os.path.exists(path): logger.exit("%s does not exist." % path) try: digest = utils.get_file_hash(path) except: logger.exit("Cannot calculate digest for %s" % path) if not media_type: media_type = defaults.DefaultBlobMediaType stat = os.stat(path) return descriptor.Descriptor(mediaType=media_type, digest=digest, size=stat.st_size) def descriptor_from_dir(self, name, media_type, root): """ Get a descriptor from a director """ name = self.map_path(name, tmpfie) # Compress directory to tmpfile tar = tar_directory(root, name, strip_times=self.reproducible) # Get digest digest = "sha256:%s" % utils.get_file_hash(tar) # generate descriptor if not media_type: media_type = defaults.DefaultBlobMediaType info = os.stat(tar) # Question: what is the difference between AnnotationDigest and digest? annotations = {"AnnotationDigest": digest, "AnnotationUnpack": True} return descriptor.Descriptor(mediaType=media_type, digest=digest,size=info.st_size, annotations=annotations) def temp_file(self): """ Create and store a temporary file """ filen = tempfile.NamedTemporaryFile(prefix=TempFilePattern) self.tmp_files[filen.name] = filen return filen def close(self): """Close frees up resources used by the file store """ for name, filen in self.tmp_files.items(): filen.close() if os.path.exists(name): os.remove(name) def set(self, desc): """ Set an OCI descriptor """ self.descriptor[desc.Digest] = desc def get(desc): """ Get an OCI descriptor """ value = self.descriptor.get(desc.Digest) if not value: return descriptor.Descriptor() return value def reader_at(self, desc): """ReaderAt provides contents """ desc = self.get(desc) if not desc: sys.exit("Could not find descriptor.") name = resolve_name(desc) if not name: sys.exit("Cannot resolve name for %s" % desc) path = self.resolve_path(name) fileo = open(path, 'r') return sizeReaderAt(fileo, desc.size) def writer(self, opts): """Writer begins or resumes the active writer identified by desc """ wopts = CdWriterOpts() wopts.update(opts) desc = wopts.Desc name = resolve_name(desc) # if we were not told to ignore NoName, then return an error if not name and not self.ignore_no_name: sys.exit("Cannot resolve name for %s" % desc) elif not name and self.ignore_no_name: # just return a nil writer - we do not want to calculate the hash, so just use # whatever was passed in the descriptor return IoContentWriter(WithOutputHash(desc.Digest) path = self.resolve_write_path(name) filen, after_commit = self.create_write_path(path, desc, name) now = time.time() # STOPPED HERE need to find content.Status status = status: content.Status{ Ref: name, Total: desc.Size, StartedAt: now, UpdatedAt: now, }, return FileWriter(store=self, fileh=filen, desc=desc, status=status, after_commit=after_commit) def resolve_write_path(self, name): """Resolve the write path """ path = self.resolve_path(name) if not self.allow_path_traversal_on_write: base = os.path.abspath(self.root) target = os.path.abspath(path) rel = os.path.relpath(base, target) if rel.startswith("../") or rel == "..": return "" if self.disable_overwrite: print("NEED TO CHECK OVERWRITE") # TODO what do we want to check here, if writable? #if os.stat(path) # if _, err := os.Stat(path); err == nil { # return "", ErrOverwriteDisallowed # } else if !os.IsNotExist(err) { # return "", err return path def create_write_path(self, path, desc, prefix): """ Create a write path? """ value = desc.Annotations.get(AnnotationUnpack) if not value: os.makedirs(os.path.dirname(path)) with open(path, 'w') as fd: pass return filen, None os.makedirs(path) filen = tempfile.mkstemp()[1] checksum = desc.Annotations.get(AnnotationDigest) return filen, after_commit class FileWriter: def __init__(self, store, fileh, desc, status, after_commit, digester=None): self.store = store # *FileStore self.file = fileh # *os.File self.desc = desc # ocispec.Descriptor self.status = status # content.Status self.after_commit = after_commit # func() self.digester = digester or digest.Canonical.Digester() # TODO what is this? func (w *fileWriter) Status() (content.Status, error) { return w.status, nil } // Digest returns the current digest of the content, up to the current write. // // Cannot be called concurrently with `Write`. func (w *fileWriter) Digest() digest.Digest { return w.digester.Digest() } // Write p to the transaction. func (w *fileWriter) Write(p []byte) (n int, err error) { n, err = w.file.Write(p) w.digester.Hash().Write(p[:n]) w.status.Offset += int64(len(p)) w.status.UpdatedAt = time.Now() return n, err } func (w *fileWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error { var base content.Info for _, opt := range opts { if err := opt(&base); err != nil { return err } } if w.file == nil { return errors.Wrap(errdefs.ErrFailedPrecondition, "cannot commit on closed writer") } file := w.file w.file = nil if err := file.Sync(); err != nil { file.Close() return errors.Wrap(err, "sync failed") } fileInfo, err := file.Stat() if err != nil { file.Close() return errors.Wrap(err, "stat failed") } if err := file.Close(); err != nil { return errors.Wrap(err, "failed to close file") } if size > 0 && size != fileInfo.Size() { return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit size %d, expected %d", fileInfo.Size(), size) } if dgst := w.digester.Digest(); expected != "" && expected != dgst { return errors.Wrapf(errdefs.ErrFailedPrecondition, "unexpected commit digest %s, expected %s", dgst, expected) } w.store.set(w.desc) if w.afterCommit != nil { return w.afterCommit() } return nil } // Close the writer, flushing any unwritten data and leaving the progress in // tact. func (w *fileWriter) Close() error { if w.file == nil { return nil } w.file.Sync() err := w.file.Close() w.file = nil return err } func (w *fileWriter) Truncate(size int64) error { if size != 0 { return ErrUnsupportedSize } w.status.Offset = 0 w.digester.Hash().Reset() if _, err := w.file.Seek(0, io.SeekStart); err != nil { return err } return w.file.Truncate(0) }
[ 834, 9800, 834, 796, 366, 25298, 21411, 1406, 17006, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 33448, 11, 42100, 1406, 17006, 1, 198, 834, 43085, 834, 796, 366, 44, 6489, 362, 13, 15, 1, 628, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 13422, 7753, 198, 11748, 20218, 7753, 198, 11748, 640, 198, 198, 6738, 393, 292, 13, 6404, 1362, 1330, 49706, 198, 11748, 393, 292, 13, 26791, 355, 3384, 4487, 198, 11748, 393, 292, 13, 12286, 82, 355, 26235, 198, 6738, 764, 9979, 1330, 24189, 8979, 47546, 11, 1052, 38983, 3118, 8002, 11, 1052, 38983, 19511, 395, 198, 6738, 764, 26791, 1330, 10568, 62, 3672, 11, 13422, 62, 34945, 198, 6738, 764, 46862, 265, 1330, 2546, 33634, 2953, 198, 6738, 764, 26791, 1330, 13422, 62, 34945, 198, 6738, 764, 404, 912, 1330, 327, 67, 34379, 27871, 82, 11, 2080, 26410, 26257, 198, 6738, 764, 72, 322, 43407, 1330, 27853, 19746, 34379, 198, 198, 11748, 1280, 3642, 50221, 13, 9060, 13, 85, 16, 13, 34574, 602, 355, 37647, 198, 11748, 1280, 3642, 50221, 13, 9060, 13, 85, 16, 13, 20147, 1968, 273, 355, 43087, 628, 198, 4871, 9220, 22658, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 9220, 22658, 3769, 2695, 422, 262, 2393, 1080, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 825, 3975, 62, 6978, 7, 944, 11, 1438, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9347, 257, 1438, 284, 257, 3108, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 411, 6442, 62, 6978, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6978, 62, 8899, 58, 3672, 60, 796, 3108, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3108, 220, 220, 220, 220, 220, 220, 628, 220, 220, 825, 10568, 62, 6978, 7, 944, 11, 1438, 2599, 198, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 8229, 262, 3108, 416, 1438, 198, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 6978, 62, 8899, 13, 1136, 7, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 611, 3108, 393, 357, 6978, 290, 28686, 13, 6978, 13, 271, 8937, 7, 6978, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3108, 198, 220, 220, 220, 220, 220, 220, 1441, 28686, 13, 6978, 13, 22179, 7, 944, 13, 15763, 11, 3108, 8, 628, 198, 220, 220, 220, 825, 900, 7, 944, 11, 1715, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 12793, 257, 43087, 284, 262, 3975, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 20147, 1968, 273, 58, 20147, 13, 19511, 395, 13, 8367, 60, 796, 1715, 628, 198, 220, 220, 220, 825, 751, 7, 944, 11, 1438, 11, 2056, 62, 4906, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3060, 257, 2393, 4941, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 3108, 393, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 8899, 62, 6978, 7, 3672, 11, 3108, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 9409, 343, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1715, 796, 2116, 13, 20147, 1968, 273, 62, 6738, 62, 15908, 7, 3672, 11, 2056, 62, 4906, 11, 3108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 28686, 13, 6978, 13, 4468, 576, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1715, 796, 2116, 13, 20147, 1968, 273, 62, 6738, 62, 7753, 7, 11431, 62, 4906, 11, 3108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 37023, 7203, 4, 82, 318, 407, 257, 4938, 3108, 526, 4064, 3108, 8, 198, 197, 20147, 13, 2025, 30078, 58, 34574, 602, 13, 2025, 38983, 19160, 60, 796, 1438, 628, 197, 944, 13, 2617, 7, 20147, 8, 198, 197, 7783, 1715, 628, 198, 220, 220, 220, 825, 43087, 62, 6738, 62, 7753, 7, 944, 11, 2056, 62, 4906, 11, 3108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 257, 43087, 422, 2393, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 37023, 7203, 4, 82, 857, 407, 2152, 526, 4064, 3108, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16274, 796, 3384, 4487, 13, 1136, 62, 7753, 62, 17831, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 37023, 7203, 34, 34574, 15284, 16274, 329, 4064, 82, 1, 4064, 3108, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2056, 62, 4906, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2056, 62, 4906, 796, 26235, 13, 19463, 3629, 672, 13152, 6030, 628, 220, 220, 220, 220, 220, 220, 220, 1185, 796, 28686, 13, 14269, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 43087, 13, 24564, 1968, 273, 7, 11431, 6030, 28, 11431, 62, 4906, 11, 16274, 28, 12894, 395, 11, 2546, 28, 14269, 13, 301, 62, 7857, 8, 628, 220, 220, 220, 825, 43087, 62, 6738, 62, 15908, 7, 944, 11, 1438, 11, 2056, 62, 4906, 11, 6808, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 257, 43087, 422, 257, 3437, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 2116, 13, 8899, 62, 6978, 7, 3672, 11, 45218, 69, 494, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3082, 601, 8619, 284, 45218, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 13422, 796, 13422, 62, 34945, 7, 15763, 11, 1438, 11, 10283, 62, 22355, 28, 944, 13, 260, 1676, 6077, 856, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 16274, 198, 220, 220, 220, 220, 220, 220, 220, 16274, 796, 366, 26270, 11645, 25, 4, 82, 1, 4064, 3384, 4487, 13, 1136, 62, 7753, 62, 17831, 7, 18870, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7716, 43087, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2056, 62, 4906, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2056, 62, 4906, 796, 26235, 13, 19463, 3629, 672, 13152, 6030, 628, 220, 220, 220, 220, 220, 220, 220, 7508, 796, 28686, 13, 14269, 7, 18870, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 18233, 25, 644, 318, 262, 3580, 1022, 1052, 38983, 19511, 395, 290, 16274, 30, 198, 220, 220, 220, 220, 220, 220, 220, 37647, 796, 19779, 2025, 38983, 19511, 395, 1298, 16274, 11, 366, 2025, 38983, 3118, 8002, 1298, 6407, 92, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 43087, 13, 24564, 1968, 273, 7, 11431, 6030, 28, 11431, 62, 4906, 11, 16274, 28, 12894, 395, 11, 7857, 28, 10951, 13, 301, 62, 7857, 11, 37647, 28, 34574, 602, 8, 628, 198, 220, 220, 220, 825, 20218, 62, 7753, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13610, 290, 3650, 257, 8584, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1226, 268, 796, 20218, 7753, 13, 45, 2434, 12966, 5551, 8979, 7, 40290, 28, 30782, 8979, 47546, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 22065, 62, 16624, 58, 10379, 268, 13, 3672, 60, 796, 1226, 268, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1226, 268, 628, 220, 220, 220, 825, 1969, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 26125, 2030, 274, 510, 4133, 973, 416, 262, 2393, 3650, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1438, 11, 1226, 268, 287, 2116, 13, 22065, 62, 16624, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1226, 268, 13, 19836, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 1069, 1023, 7, 3672, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 28956, 7, 3672, 8, 628, 220, 220, 220, 825, 900, 7, 944, 11, 1715, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5345, 281, 24775, 40, 43087, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 20147, 1968, 273, 58, 20147, 13, 19511, 395, 60, 796, 1715, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 825, 651, 7, 20147, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 281, 24775, 40, 43087, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 796, 2116, 13, 20147, 1968, 273, 13, 1136, 7, 20147, 13, 19511, 395, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1988, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 43087, 13, 24564, 1968, 273, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1988, 628, 220, 220, 220, 825, 9173, 62, 265, 7, 944, 11, 1715, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 33634, 2953, 3769, 10154, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1715, 796, 2116, 13, 1136, 7, 20147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1715, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7203, 23722, 407, 1064, 43087, 19570, 628, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 10568, 62, 3672, 7, 20147, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1438, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7203, 34, 34574, 10568, 1438, 329, 4064, 82, 1, 4064, 1715, 8, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 411, 6442, 62, 6978, 7, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 78, 796, 1280, 7, 6978, 11, 705, 81, 11537, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2546, 33634, 2953, 7, 7753, 78, 11, 1715, 13, 7857, 8, 628, 198, 220, 220, 220, 825, 6260, 7, 944, 11, 2172, 82, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 34379, 6140, 393, 42626, 262, 4075, 6260, 5174, 416, 1715, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 266, 404, 912, 796, 327, 67, 34379, 27871, 82, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 266, 404, 912, 13, 19119, 7, 404, 912, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1715, 796, 266, 404, 912, 13, 24564, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 10568, 62, 3672, 7, 20147, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 356, 547, 407, 1297, 284, 8856, 1400, 5376, 11, 788, 1441, 281, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1438, 290, 407, 2116, 13, 46430, 62, 3919, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7203, 34, 34574, 10568, 1438, 329, 4064, 82, 1, 4064, 1715, 8, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 407, 1438, 290, 2116, 13, 46430, 62, 3919, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 655, 1441, 257, 18038, 6260, 532, 356, 466, 407, 765, 284, 15284, 262, 12234, 11, 523, 655, 779, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4232, 373, 3804, 287, 262, 43087, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 27853, 19746, 34379, 7, 3152, 26410, 26257, 7, 20147, 13, 19511, 395, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 411, 6442, 62, 13564, 62, 6978, 7, 3672, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1226, 268, 11, 706, 62, 41509, 796, 2116, 13, 17953, 62, 13564, 62, 6978, 7, 6978, 11, 1715, 11, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 783, 796, 640, 13, 2435, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 44934, 47, 1961, 15698, 761, 284, 1064, 2695, 13, 19580, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 796, 198, 197, 197, 13376, 25, 2695, 13, 19580, 90, 198, 197, 197, 197, 8134, 25, 220, 220, 220, 220, 220, 220, 1438, 11, 198, 197, 197, 197, 14957, 25, 220, 220, 220, 220, 1715, 13, 10699, 11, 198, 197, 197, 197, 10434, 276, 2953, 25, 783, 11, 198, 197, 197, 197, 17354, 2953, 25, 783, 11, 198, 197, 197, 5512, 628, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 9220, 34379, 7, 8095, 28, 944, 11, 2393, 71, 28, 10379, 268, 11, 1715, 28, 20147, 11, 3722, 28, 13376, 11, 706, 62, 41509, 28, 8499, 62, 41509, 8, 628, 198, 220, 220, 220, 825, 10568, 62, 13564, 62, 6978, 7, 944, 11, 1438, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4965, 6442, 262, 3551, 3108, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 2116, 13, 411, 6442, 62, 6978, 7, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2116, 13, 12154, 62, 6978, 62, 9535, 690, 282, 62, 261, 62, 13564, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2779, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 944, 13, 15763, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 823, 796, 28686, 13, 6978, 13, 2411, 6978, 7, 8692, 11, 2496, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 823, 13, 9688, 2032, 342, 7203, 40720, 4943, 393, 823, 6624, 366, 492, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 13538, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 40223, 62, 2502, 13564, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 12161, 1961, 5390, 5870, 25171, 28729, 18564, 12709, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 644, 466, 356, 765, 284, 2198, 994, 11, 611, 1991, 540, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 361, 28686, 13, 14269, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 4808, 11, 11454, 19039, 28686, 13, 17126, 7, 6978, 1776, 11454, 6624, 18038, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1441, 366, 1600, 41512, 5886, 13564, 7279, 40845, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1782, 2073, 611, 5145, 418, 13, 3792, 3673, 3109, 396, 7, 8056, 8, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1441, 366, 1600, 11454, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3108, 628, 220, 220, 220, 825, 2251, 62, 13564, 62, 6978, 7, 944, 11, 3108, 11, 1715, 11, 21231, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 13610, 257, 3551, 3108, 30, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 796, 1715, 13, 2025, 30078, 13, 1136, 7, 2025, 38983, 3118, 8002, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1988, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 418, 13, 6978, 13, 15908, 3672, 7, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 6978, 11, 705, 86, 11537, 355, 277, 67, 25, 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, 220, 220, 220, 220, 1441, 1226, 268, 11, 6045, 628, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1226, 268, 796, 20218, 7753, 13, 28015, 927, 79, 3419, 58, 16, 60, 220, 198, 220, 220, 220, 220, 220, 220, 220, 8794, 388, 796, 1715, 13, 2025, 30078, 13, 1136, 7, 2025, 38983, 19511, 395, 8, 220, 198, 197, 7783, 1226, 268, 11, 706, 62, 41509, 628, 198, 4871, 9220, 34379, 25, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3650, 11, 2393, 71, 11, 1715, 11, 3722, 11, 706, 62, 41509, 11, 3100, 7834, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8095, 796, 3650, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1635, 8979, 22658, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7753, 796, 2393, 71, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1635, 418, 13, 8979, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 20147, 796, 1715, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 267, 66, 271, 43106, 13, 24564, 1968, 273, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13376, 796, 3722, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2695, 13, 19580, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8499, 62, 41509, 796, 706, 62, 41509, 220, 1303, 25439, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 12894, 7834, 796, 3100, 7834, 393, 16274, 13, 6090, 261, 605, 13, 19511, 7834, 3419, 1303, 16926, 46, 644, 318, 428, 30, 198, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 12678, 3419, 357, 11299, 13, 19580, 11, 4049, 8, 1391, 198, 197, 7783, 266, 13, 13376, 11, 18038, 198, 92, 198, 198, 1003, 44255, 5860, 262, 1459, 16274, 286, 262, 2695, 11, 510, 284, 262, 1459, 3551, 13, 198, 1003, 198, 1003, 26003, 307, 1444, 47480, 351, 4600, 16594, 44646, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 44255, 3419, 16274, 13, 19511, 395, 1391, 198, 197, 7783, 266, 13, 12894, 7834, 13, 19511, 395, 3419, 198, 92, 198, 198, 1003, 19430, 279, 284, 262, 8611, 13, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 19430, 7, 79, 17635, 26327, 8, 357, 77, 493, 11, 11454, 4049, 8, 1391, 198, 197, 77, 11, 11454, 796, 266, 13, 7753, 13, 16594, 7, 79, 8, 198, 197, 86, 13, 12894, 7834, 13, 26257, 22446, 16594, 7, 79, 58, 25, 77, 12962, 198, 197, 86, 13, 13376, 13, 34519, 15853, 493, 2414, 7, 11925, 7, 79, 4008, 198, 197, 86, 13, 13376, 13, 17354, 2953, 796, 640, 13, 3844, 3419, 198, 197, 7783, 299, 11, 11454, 198, 92, 198, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 35910, 7, 49464, 4732, 13, 21947, 11, 2546, 493, 2414, 11, 2938, 16274, 13, 19511, 395, 11, 2172, 82, 2644, 11299, 13, 27871, 8, 4049, 1391, 198, 197, 7785, 2779, 2695, 13, 12360, 198, 197, 1640, 4808, 11, 2172, 19039, 2837, 2172, 82, 1391, 198, 197, 197, 361, 11454, 19039, 2172, 39434, 8692, 1776, 11454, 14512, 18038, 1391, 198, 197, 197, 197, 7783, 11454, 198, 197, 197, 92, 198, 197, 92, 628, 197, 361, 266, 13, 7753, 6624, 18038, 1391, 198, 197, 197, 7783, 8563, 13, 54, 2416, 7, 8056, 4299, 82, 13, 9139, 81, 37, 6255, 6719, 31448, 11, 366, 66, 34574, 4589, 319, 4838, 6260, 4943, 198, 197, 92, 198, 197, 7753, 19039, 266, 13, 7753, 198, 197, 86, 13, 7753, 796, 18038, 628, 197, 361, 11454, 19039, 2393, 13, 28985, 9783, 11454, 14512, 18038, 1391, 198, 197, 197, 7753, 13, 26125, 3419, 198, 197, 197, 7783, 8563, 13, 54, 2416, 7, 8056, 11, 366, 27261, 4054, 4943, 198, 197, 92, 628, 197, 7753, 12360, 11, 11454, 19039, 2393, 13, 17126, 3419, 198, 197, 361, 11454, 14512, 18038, 1391, 198, 197, 197, 7753, 13, 26125, 3419, 198, 197, 197, 7783, 8563, 13, 54, 2416, 7, 8056, 11, 366, 14269, 4054, 4943, 198, 197, 92, 198, 197, 361, 11454, 19039, 2393, 13, 26125, 9783, 11454, 14512, 18038, 1391, 198, 197, 197, 7783, 8563, 13, 54, 2416, 7, 8056, 11, 366, 47904, 284, 1969, 2393, 4943, 198, 197, 92, 628, 197, 361, 2546, 1875, 657, 11405, 2546, 14512, 2393, 12360, 13, 10699, 3419, 1391, 198, 197, 197, 7783, 8563, 13, 54, 2416, 69, 7, 8056, 4299, 82, 13, 9139, 81, 37, 6255, 6719, 31448, 11, 366, 403, 40319, 4589, 2546, 4064, 67, 11, 2938, 4064, 67, 1600, 2393, 12360, 13, 10699, 22784, 2546, 8, 198, 197, 92, 198, 197, 361, 288, 70, 301, 19039, 266, 13, 12894, 7834, 13, 19511, 395, 9783, 2938, 14512, 13538, 11405, 2938, 14512, 288, 70, 301, 1391, 198, 197, 197, 7783, 8563, 13, 54, 2416, 69, 7, 8056, 4299, 82, 13, 9139, 81, 37, 6255, 6719, 31448, 11, 366, 403, 40319, 4589, 16274, 4064, 82, 11, 2938, 4064, 82, 1600, 288, 70, 301, 11, 2938, 8, 198, 197, 92, 628, 197, 86, 13, 8095, 13, 2617, 7, 86, 13, 20147, 8, 198, 197, 361, 266, 13, 8499, 6935, 270, 14512, 18038, 1391, 198, 197, 197, 7783, 266, 13, 8499, 6935, 270, 3419, 198, 197, 92, 198, 197, 7783, 18038, 198, 92, 198, 198, 1003, 13872, 262, 6260, 11, 781, 8023, 597, 7379, 9108, 1366, 290, 4305, 262, 4371, 287, 198, 1003, 6293, 13, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 13872, 3419, 4049, 1391, 198, 197, 361, 266, 13, 7753, 6624, 18038, 1391, 198, 197, 197, 7783, 18038, 198, 197, 92, 628, 197, 86, 13, 7753, 13, 28985, 3419, 198, 197, 8056, 19039, 266, 13, 7753, 13, 26125, 3419, 198, 197, 86, 13, 7753, 796, 18038, 198, 197, 7783, 11454, 198, 92, 198, 198, 20786, 357, 86, 1635, 7753, 34379, 8, 833, 19524, 378, 7, 7857, 493, 2414, 8, 4049, 1391, 198, 197, 361, 2546, 14512, 657, 1391, 198, 197, 197, 7783, 41512, 3118, 15999, 10699, 198, 197, 92, 198, 197, 86, 13, 13376, 13, 34519, 796, 657, 198, 197, 86, 13, 12894, 7834, 13, 26257, 22446, 4965, 316, 3419, 198, 197, 361, 4808, 11, 11454, 19039, 266, 13, 7753, 13, 4653, 988, 7, 15, 11, 33245, 13, 4653, 988, 10434, 1776, 11454, 14512, 18038, 1391, 198, 197, 197, 7783, 11454, 198, 197, 92, 198, 197, 7783, 266, 13, 7753, 13, 2898, 19524, 378, 7, 15, 8, 198, 92, 198 ]
2.289919
4,077
from tensorflow import keras from tensorflow.keras import backend as K
[ 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 30203, 355, 509, 628 ]
3.6
20
import numpy as np import torch import torch.nn as nn import time from tqdm import tqdm from .buffer import Buffer from .algo.base import Expert from .env import NormalizedEnv def soft_update(target, source, tau): """Soft update for SAC""" for t, s in zip(target.parameters(), source.parameters()): t.data.mul_(1.0 - tau) t.data.add_(tau * s.data) def disable_gradient(network: nn.Module): """Disable the gradients of parameters in the network""" for param in network.parameters(): param.requires_grad = False def add_random_noise(action, std): """Add random noise to the action""" action += np.random.randn(*action.shape) * std return action.clip(-1.0, 1.0) def collect_demo( env: NormalizedEnv, algo: Expert, buffer_size: int, device: torch.device, std: float, p_rand: float, seed: int = 0 ): """ Collect demonstrations using the well-trained policy Parameters ---------- env: NormalizedEnv environment to collect demonstrations algo: Expert well-trained algorithm used to collect demonstrations buffer_size: int size of the buffer, also the number of s-a pairs in the demonstrations device: torch.device cpu or cuda std: float standard deviation add to the policy p_rand: float with probability of p_rand, the policy will act randomly seed: int random seed Returns ------- buffer: Buffer buffer of demonstrations mean_return: float average episode reward """ env.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed(seed) buffer = Buffer( buffer_size=buffer_size, state_shape=env.observation_space.shape, action_shape=env.action_space.shape, device=device ) total_return = 0.0 num_steps = [] num_episodes = 0 state = env.reset() t = 0 episode_return = 0.0 episode_steps = 0 for _ in tqdm(range(1, buffer_size + 1)): t += 1 if np.random.rand() < p_rand: action = env.action_space.sample() else: action = algo.exploit(state) action = add_random_noise(action, std) next_state, reward, done, _ = env.step(action) mask = True if t == env.max_episode_steps else done buffer.append(state, action, reward, mask, next_state) episode_return += reward episode_steps += 1 if done or t == env.max_episode_steps: num_episodes += 1 total_return += episode_return state = env.reset() t = 0 episode_return = 0.0 num_steps.append(episode_steps) episode_steps = 0 state = next_state mean_return = total_return / num_episodes print(f'Mean return of the expert is {mean_return}') print(f'Max episode steps is {np.max(num_steps)}') print(f'Min episode steps is {np.min(num_steps)}') return buffer, mean_return def evaluation( env: NormalizedEnv, algo: Expert, episodes: int, render: bool, seed: int = 0, delay: float = 0.03 ): """ Evaluate the well-trained policy Parameters ---------- env: NormalizedEnv environment to evaluate the policy algo: Expert well-trained policy to be evaluated episodes: int number of episodes used in evaluation render: bool render the environment or not seed: int random seed delay: float number of seconds to delay while rendering, in case the agent moves too fast Returns ------- mean_return: float average episode reward """ env.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed(seed) total_return = 0.0 num_episodes = 0 num_steps = [] state = env.reset() t = 0 episode_return = 0.0 episode_steps = 0 while num_episodes < episodes: t += 1 action = algo.exploit(state) next_state, reward, done, _ = env.step(action) episode_return += reward episode_steps += 1 state = next_state if render: env.render() time.sleep(delay) if done or t == env.max_episode_steps: num_episodes += 1 total_return += episode_return state = env.reset() t = 0 episode_return = 0.0 num_steps.append(episode_steps) episode_steps = 0 mean_return = total_return / num_episodes print(f'Mean return of the policy is {mean_return}') print(f'Max episode steps is {np.max(num_steps)}') print(f'Min episode steps is {np.min(num_steps)}') return mean_return
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 640, 201, 198, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 201, 198, 6738, 764, 22252, 1330, 47017, 201, 198, 6738, 764, 282, 2188, 13, 8692, 1330, 25516, 201, 198, 6738, 764, 24330, 1330, 14435, 1143, 4834, 85, 201, 198, 201, 198, 201, 198, 4299, 2705, 62, 19119, 7, 16793, 11, 2723, 11, 256, 559, 2599, 201, 198, 220, 220, 220, 37227, 18380, 4296, 329, 311, 2246, 37811, 201, 198, 220, 220, 220, 329, 256, 11, 264, 287, 19974, 7, 16793, 13, 17143, 7307, 22784, 2723, 13, 17143, 7307, 3419, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 256, 13, 7890, 13, 76, 377, 41052, 16, 13, 15, 532, 256, 559, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 256, 13, 7890, 13, 2860, 41052, 83, 559, 1635, 264, 13, 7890, 8, 201, 198, 201, 198, 201, 198, 4299, 15560, 62, 49607, 7, 27349, 25, 299, 77, 13, 26796, 2599, 201, 198, 220, 220, 220, 37227, 48893, 262, 3915, 2334, 286, 10007, 287, 262, 3127, 37811, 201, 198, 220, 220, 220, 329, 5772, 287, 3127, 13, 17143, 7307, 33529, 201, 198, 220, 220, 220, 220, 220, 220, 220, 5772, 13, 47911, 62, 9744, 796, 10352, 201, 198, 201, 198, 201, 198, 4299, 751, 62, 25120, 62, 3919, 786, 7, 2673, 11, 14367, 2599, 201, 198, 220, 220, 220, 37227, 4550, 4738, 7838, 284, 262, 2223, 37811, 201, 198, 220, 220, 220, 2223, 15853, 45941, 13, 25120, 13, 25192, 77, 46491, 2673, 13, 43358, 8, 1635, 14367, 201, 198, 220, 220, 220, 1441, 2223, 13, 15036, 32590, 16, 13, 15, 11, 352, 13, 15, 8, 201, 198, 201, 198, 201, 198, 4299, 2824, 62, 9536, 78, 7, 201, 198, 220, 220, 220, 220, 220, 220, 220, 17365, 25, 14435, 1143, 4834, 85, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 435, 2188, 25, 25516, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 62, 7857, 25, 493, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3335, 25, 28034, 13, 25202, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 14367, 25, 12178, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 279, 62, 25192, 25, 12178, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 9403, 25, 493, 796, 657, 201, 198, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 9745, 18721, 1262, 262, 880, 12, 35311, 2450, 201, 198, 201, 198, 220, 220, 220, 40117, 201, 198, 220, 220, 220, 24200, 438, 201, 198, 220, 220, 220, 17365, 25, 14435, 1143, 4834, 85, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2858, 284, 2824, 18721, 201, 198, 220, 220, 220, 435, 2188, 25, 25516, 201, 198, 220, 220, 220, 220, 220, 220, 220, 880, 12, 35311, 11862, 973, 284, 2824, 18721, 201, 198, 220, 220, 220, 11876, 62, 7857, 25, 493, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 286, 262, 11876, 11, 635, 262, 1271, 286, 264, 12, 64, 14729, 287, 262, 18721, 201, 198, 220, 220, 220, 3335, 25, 28034, 13, 25202, 201, 198, 220, 220, 220, 220, 220, 220, 220, 42804, 393, 269, 15339, 201, 198, 220, 220, 220, 14367, 25, 12178, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3210, 28833, 751, 284, 262, 2450, 201, 198, 220, 220, 220, 279, 62, 25192, 25, 12178, 201, 198, 220, 220, 220, 220, 220, 220, 220, 351, 12867, 286, 279, 62, 25192, 11, 262, 2450, 481, 719, 15456, 201, 198, 220, 220, 220, 9403, 25, 493, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4738, 9403, 201, 198, 201, 198, 220, 220, 220, 16409, 201, 198, 220, 220, 220, 35656, 201, 198, 220, 220, 220, 11876, 25, 47017, 201, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 286, 18721, 201, 198, 220, 220, 220, 1612, 62, 7783, 25, 12178, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2811, 4471, 6721, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 17365, 13, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 45941, 13, 25120, 13, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 28034, 13, 805, 723, 62, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 28034, 13, 66, 15339, 13, 805, 723, 62, 28826, 7, 28826, 8, 201, 198, 201, 198, 220, 220, 220, 11876, 796, 47017, 7, 201, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 62, 7857, 28, 22252, 62, 7857, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 62, 43358, 28, 24330, 13, 672, 3168, 341, 62, 13200, 13, 43358, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2223, 62, 43358, 28, 24330, 13, 2673, 62, 13200, 13, 43358, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3335, 28, 25202, 201, 198, 220, 220, 220, 1267, 201, 198, 201, 198, 220, 220, 220, 2472, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 997, 62, 20214, 796, 17635, 201, 198, 220, 220, 220, 997, 62, 538, 8052, 796, 657, 201, 198, 201, 198, 220, 220, 220, 1181, 796, 17365, 13, 42503, 3419, 201, 198, 220, 220, 220, 256, 796, 657, 201, 198, 220, 220, 220, 4471, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 4471, 62, 20214, 796, 657, 201, 198, 201, 198, 220, 220, 220, 329, 4808, 287, 256, 80, 36020, 7, 9521, 7, 16, 11, 11876, 62, 7857, 1343, 352, 8, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15853, 352, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 45941, 13, 25120, 13, 25192, 3419, 1279, 279, 62, 25192, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2223, 796, 17365, 13, 2673, 62, 13200, 13, 39873, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2223, 796, 435, 2188, 13, 20676, 30711, 7, 5219, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2223, 796, 751, 62, 25120, 62, 3919, 786, 7, 2673, 11, 14367, 8, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 5219, 11, 6721, 11, 1760, 11, 4808, 796, 17365, 13, 9662, 7, 2673, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 796, 6407, 611, 256, 6624, 17365, 13, 9806, 62, 38668, 62, 20214, 2073, 1760, 201, 198, 220, 220, 220, 220, 220, 220, 220, 11876, 13, 33295, 7, 5219, 11, 2223, 11, 6721, 11, 9335, 11, 1306, 62, 5219, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 7783, 15853, 6721, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 20214, 15853, 352, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1760, 393, 256, 6624, 17365, 13, 9806, 62, 38668, 62, 20214, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 538, 8052, 15853, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 7783, 15853, 4471, 62, 7783, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 17365, 13, 42503, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 796, 657, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 20214, 13, 33295, 7, 38668, 62, 20214, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 20214, 796, 657, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 1306, 62, 5219, 201, 198, 201, 198, 220, 220, 220, 1612, 62, 7783, 796, 2472, 62, 7783, 1220, 997, 62, 538, 8052, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 5308, 272, 1441, 286, 262, 5887, 318, 1391, 32604, 62, 7783, 92, 11537, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 11518, 4471, 4831, 318, 1391, 37659, 13, 9806, 7, 22510, 62, 20214, 38165, 11537, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 9452, 4471, 4831, 318, 1391, 37659, 13, 1084, 7, 22510, 62, 20214, 38165, 11537, 201, 198, 201, 198, 220, 220, 220, 1441, 11876, 11, 1612, 62, 7783, 201, 198, 201, 198, 201, 198, 4299, 12660, 7, 201, 198, 220, 220, 220, 220, 220, 220, 220, 17365, 25, 14435, 1143, 4834, 85, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 435, 2188, 25, 25516, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 8640, 25, 493, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 8543, 25, 20512, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 9403, 25, 493, 796, 657, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 5711, 25, 12178, 796, 657, 13, 3070, 201, 198, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 26439, 4985, 262, 880, 12, 35311, 2450, 201, 198, 201, 198, 220, 220, 220, 40117, 201, 198, 220, 220, 220, 24200, 438, 201, 198, 220, 220, 220, 17365, 25, 14435, 1143, 4834, 85, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2858, 284, 13446, 262, 2450, 201, 198, 220, 220, 220, 435, 2188, 25, 25516, 201, 198, 220, 220, 220, 220, 220, 220, 220, 880, 12, 35311, 2450, 284, 307, 16726, 201, 198, 220, 220, 220, 8640, 25, 493, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1271, 286, 8640, 973, 287, 12660, 201, 198, 220, 220, 220, 8543, 25, 20512, 201, 198, 220, 220, 220, 220, 220, 220, 220, 8543, 262, 2858, 393, 407, 201, 198, 220, 220, 220, 9403, 25, 493, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4738, 9403, 201, 198, 220, 220, 220, 5711, 25, 12178, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1271, 286, 4201, 284, 5711, 981, 14837, 11, 287, 1339, 262, 5797, 6100, 1165, 3049, 201, 198, 201, 198, 220, 220, 220, 16409, 201, 198, 220, 220, 220, 35656, 201, 198, 220, 220, 220, 1612, 62, 7783, 25, 12178, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2811, 4471, 6721, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 17365, 13, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 45941, 13, 25120, 13, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 28034, 13, 805, 723, 62, 28826, 7, 28826, 8, 201, 198, 220, 220, 220, 28034, 13, 66, 15339, 13, 805, 723, 62, 28826, 7, 28826, 8, 201, 198, 201, 198, 220, 220, 220, 2472, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 997, 62, 538, 8052, 796, 657, 201, 198, 220, 220, 220, 997, 62, 20214, 796, 17635, 201, 198, 201, 198, 220, 220, 220, 1181, 796, 17365, 13, 42503, 3419, 201, 198, 220, 220, 220, 256, 796, 657, 201, 198, 220, 220, 220, 4471, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 4471, 62, 20214, 796, 657, 201, 198, 201, 198, 220, 220, 220, 981, 997, 62, 538, 8052, 1279, 8640, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15853, 352, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2223, 796, 435, 2188, 13, 20676, 30711, 7, 5219, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 5219, 11, 6721, 11, 1760, 11, 4808, 796, 17365, 13, 9662, 7, 2673, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 7783, 15853, 6721, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 20214, 15853, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 1306, 62, 5219, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8543, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17365, 13, 13287, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 40850, 8, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1760, 393, 256, 6624, 17365, 13, 9806, 62, 38668, 62, 20214, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 538, 8052, 15853, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 7783, 15853, 4471, 62, 7783, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1181, 796, 17365, 13, 42503, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 796, 657, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 7783, 796, 657, 13, 15, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 20214, 13, 33295, 7, 38668, 62, 20214, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4471, 62, 20214, 796, 657, 201, 198, 201, 198, 220, 220, 220, 1612, 62, 7783, 796, 2472, 62, 7783, 1220, 997, 62, 538, 8052, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 5308, 272, 1441, 286, 262, 2450, 318, 1391, 32604, 62, 7783, 92, 11537, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 11518, 4471, 4831, 318, 1391, 37659, 13, 9806, 7, 22510, 62, 20214, 38165, 11537, 201, 198, 220, 220, 220, 3601, 7, 69, 6, 9452, 4471, 4831, 318, 1391, 37659, 13, 1084, 7, 22510, 62, 20214, 38165, 11537, 201, 198, 201, 198, 220, 220, 220, 1441, 1612, 62, 7783, 201, 198 ]
2.197226
2,307
# Lint as: python3 # Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tests for forward rate agreement.""" import numpy as np import tensorflow.compat.v2 as tf import tf_quant_finance as tff from tensorflow.python.framework import test_util # pylint: disable=g-direct-tensorflow-import framework = tff.experimental.pricing_platform.framework business_days = framework.core.business_days currencies = framework.core.currencies daycount_conventions = framework.core.daycount_conventions interpolation_method = framework.core.interpolation_method instrument_protos = tff.experimental.pricing_platform.instrument_protos date_pb2 = instrument_protos.date decimal_pb2 = instrument_protos.decimal period_pb2 = instrument_protos.period fra_pb2 = instrument_protos.forward_rate_agreement rate_instruments = tff.experimental.pricing_platform.framework.rate_instruments forward_rate_agreement = rate_instruments.forward_rate_agreement market_data = tff.experimental.pricing_platform.framework.market_data DayCountConventions = daycount_conventions.DayCountConventions BusinessDayConvention = business_days.BusinessDayConvention RateIndex = instrument_protos.rate_indices.RateIndex Currency = currencies.Currency @test_util.run_all_in_graph_and_eager_modes if __name__ == "__main__": tf.test.main()
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 3012, 11419, 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, 3740, 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, 37811, 51, 3558, 329, 2651, 2494, 4381, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 17, 355, 48700, 198, 198, 11748, 48700, 62, 40972, 62, 69, 14149, 355, 256, 487, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 30604, 1330, 1332, 62, 22602, 220, 1303, 279, 2645, 600, 25, 15560, 28, 70, 12, 12942, 12, 83, 22854, 11125, 12, 11748, 198, 198, 30604, 796, 256, 487, 13, 23100, 9134, 13, 1050, 6345, 62, 24254, 13, 30604, 198, 22680, 62, 12545, 796, 9355, 13, 7295, 13, 22680, 62, 12545, 198, 22019, 14038, 796, 9355, 13, 7295, 13, 22019, 14038, 198, 820, 9127, 62, 1102, 16593, 796, 9355, 13, 7295, 13, 820, 9127, 62, 1102, 16593, 198, 3849, 16104, 341, 62, 24396, 796, 9355, 13, 7295, 13, 3849, 16104, 341, 62, 24396, 198, 198, 259, 43872, 62, 11235, 418, 796, 256, 487, 13, 23100, 9134, 13, 1050, 6345, 62, 24254, 13, 259, 43872, 62, 11235, 418, 198, 4475, 62, 40842, 17, 796, 8875, 62, 11235, 418, 13, 4475, 198, 12501, 4402, 62, 40842, 17, 796, 8875, 62, 11235, 418, 13, 12501, 4402, 198, 41007, 62, 40842, 17, 796, 8875, 62, 11235, 418, 13, 41007, 198, 69, 430, 62, 40842, 17, 796, 8875, 62, 11235, 418, 13, 11813, 62, 4873, 62, 363, 10237, 198, 198, 4873, 62, 259, 2536, 2886, 796, 256, 487, 13, 23100, 9134, 13, 1050, 6345, 62, 24254, 13, 30604, 13, 4873, 62, 259, 2536, 2886, 198, 11813, 62, 4873, 62, 363, 10237, 796, 2494, 62, 259, 2536, 2886, 13, 11813, 62, 4873, 62, 363, 10237, 198, 198, 10728, 62, 7890, 796, 256, 487, 13, 23100, 9134, 13, 1050, 6345, 62, 24254, 13, 30604, 13, 10728, 62, 7890, 198, 198, 12393, 12332, 3103, 16593, 796, 1110, 9127, 62, 1102, 16593, 13, 12393, 12332, 3103, 16593, 198, 24749, 12393, 3103, 4018, 796, 1597, 62, 12545, 13, 24749, 12393, 3103, 4018, 198, 32184, 15732, 796, 8875, 62, 11235, 418, 13, 4873, 62, 521, 1063, 13, 32184, 15732, 198, 34, 13382, 796, 19247, 13, 34, 13382, 628, 198, 31, 9288, 62, 22602, 13, 5143, 62, 439, 62, 259, 62, 34960, 62, 392, 62, 68, 3536, 62, 76, 4147, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 48700, 13, 9288, 13, 12417, 3419, 198 ]
3.364641
543
""" Extract charges obtained via HORTON and Bader. Copyright 2019 Simulation Lab University of Freiburg Author: Lukas Elflein <[email protected]> """ import os import pandas as pd def create_dir(path='./plotting'): """Create new folder for pictures if it does not exist yet.""" if os.path.isdir(path): return path os.makedirs(path) return path def collect_bader(): """Find charges and put them in one dataframe.""" # Initialize collection data frame coll_df = None # Crawl the directory structure for subdir, dirs, files in sorted(os.walk('./')): # Exclude template folders from search if 'template' in subdir or 'exclude' in subdir: continue # Select the folders with cost function if 'bader_charges' in subdir: print('Moving to {}'.format(subdir)) # Extract timestamp time = os.path.split(subdir)[0].replace('./', '').replace('_ps_snapshot', '') time = int(time) # Use the first charge file to come across as a template df = pd.read_csv(os.path.join(subdir, 'bader_charges.csv'), sep=r',\s*', engine='python') df['timestamp'] = time if coll_df is None: coll_df = df else: coll_df = coll_df.append(df) # The table still contains redundant hydrogen atoms: 1CD3... 2CB3 # Delete everything containing '1C' or '2C' # print(coll_df[coll_df.atom.str.contains(r'[1-2]C')]) coll_df = coll_df.drop(coll_df[coll_df.atom.str.contains(r'[1-2]C')].index) print('All collected. Transforming wide to long format ...') # Transform the wide format into a long format version (for easier plotting) coll_df = coll_df.rename({'q': 'bader'}, axis=1) coll_df = pd.melt(coll_df, id_vars=['atom', 'residue', 'timestamp'], value_vars=['bader']) coll_df = coll_df.rename({'value': 'charge', 'variable': 'Calculation Variant'}, axis=1) return coll_df def collect_horton(): """Find charges and put them in one dataframe.""" # Initialize collection data frame coll_df = None # Crawl the directory structure for subdir, dirs, files in sorted(os.walk('./')): # Exclude template folders from search if 'template' in subdir or 'exclude' in subdir or 'sweep' in subdir: continue # Select the folders with cost function if 'horton_cost_function' in subdir: print('Moving to {}'.format(subdir)) # Extract timestamp time = os.path.split(subdir)[0].replace('./', '').replace('_ps_snapshot', '') time = time.replace('/4_horton_cost_function', '') time = int(time) # Use the first charge file to come across as a template df = pd.read_csv(os.path.join(subdir, 'fitted_point_charges.csv')) df['timestamp'] = time if coll_df is None: coll_df = df else: coll_df = coll_df.append(df) print('All collected. Transforming wide to long format ...') # Transform the wide format into a long format version (for easier plotting) coll_df = coll_df.rename({'q': 'constrained', 'q_unconstrained': 'unconstrained'}, axis=1) coll_df = pd.melt(coll_df, id_vars=['atom', 'residue', 'timestamp'], value_vars=['constrained', 'unconstrained']) coll_df = coll_df.rename({'value': 'charge', 'variable': 'Calculation Variant'}, axis=1) return coll_df def extract_init_charges(rtp_path, df): """Extract charges from rtp file""" atom_names = df.atom.unique() residuum_names = df.residue.unique() charges = pd.DataFrame() with open(rtp_path, 'r') as rtp_file: print('Successfully loaded topolgy file {}'.format(rtp_path)) rtp_text = rtp_file.readlines() current_residuum = None for line in rtp_text: # atom names are only unique inside one residuum # Thus, specify which res we are currently in for residuum in residuum_names: if residuum in line: current_residuum = residuum break # Now, we can look up the atom name in the charge table. # First, select the lines with exactly one atom name for atom_name in atom_names: # Select lines with at least one atom name if atom_name in line[0:7]: second_entry = line[8:18].replace('+', '') second_entry = second_entry.replace('-', '').strip() # Select lines with no atom name in second column if not second_entry in atom_names: q_value = float(line[24:34].strip(' ')) charges = charges.append({'atom': atom_name, 'residue': current_residuum, 'q_init': q_value}, ignore_index=True) return charges def collect_average(): """Put averaged charegs in a dataframe.""" # Read charges from averaged cost function input_path = './horton_charges/fitted_point_charges.csv' avg_df = pd.read_csv(input_path) # Rename columns for consistency avg_df = avg_df.rename({'q': 'averaged cost function'}, axis=1) # Transform to long format avg_df = pd.melt(avg_df, id_vars=['atom', 'residue'], value_vars=['averaged cost function']) avg_df = avg_df.rename({'value': 'charge', 'variable': 'Calculation Variant'}, axis=1) return avg_df def main(): """Collect charges and save them to .csv file""" # Collect averaged charges avg_df = collect_average() print(avg_df.loc[avg_df.atom == 'NA2']) # Collect all horton charges print('Collecting HORTON charges ...') horton_df = collect_horton() print(horton_df.loc[horton_df.atom == 'NA2']) # Collect all bader charges print('Collecting Bader charges ...') bader_df = collect_bader() # Paste everything into single dataframe print('Combining different charges into one table ... ') constr_df = horton_df.loc[horton_df['Calculation Variant'] == 'constrained'] unconstr_df = horton_df.loc[horton_df['Calculation Variant'] == 'unconstrained'] collect_df = avg_df collect_df = collect_df.append(constr_df, sort=False) collect_df = collect_df.append(unconstr_df, sort=False) collect_df = collect_df.append(bader_df, sort=False) create_dir(path='./plotting') collect_df.to_csv('./plotting/all_charges.csv') if __name__ == '__main__': main()
[ 37811, 29677, 4530, 6492, 2884, 367, 9863, 1340, 290, 347, 5067, 13, 198, 15269, 13130, 41798, 3498, 198, 21009, 286, 4848, 571, 3686, 198, 13838, 25, 28102, 292, 19067, 33663, 1279, 7046, 33663, 75, 31, 6359, 13, 35657, 12, 19503, 571, 3686, 13, 2934, 29, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 2251, 62, 15908, 7, 6978, 28, 4458, 14, 29487, 889, 6, 2599, 198, 220, 220, 37227, 16447, 649, 9483, 329, 5986, 611, 340, 857, 407, 2152, 1865, 526, 15931, 198, 220, 220, 611, 28686, 13, 6978, 13, 9409, 343, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 1441, 3108, 628, 220, 220, 28686, 13, 76, 4335, 17062, 7, 6978, 8, 198, 220, 220, 1441, 3108, 628, 198, 4299, 2824, 62, 65, 5067, 33529, 198, 220, 220, 37227, 16742, 4530, 290, 1234, 606, 287, 530, 1366, 14535, 526, 15931, 198, 220, 220, 1303, 20768, 1096, 4947, 1366, 5739, 198, 220, 220, 2927, 62, 7568, 796, 6045, 198, 220, 220, 1303, 327, 13132, 262, 8619, 4645, 198, 220, 220, 329, 850, 15908, 11, 288, 17062, 11, 3696, 287, 23243, 7, 418, 13, 11152, 7, 4458, 14, 11537, 2599, 628, 220, 220, 220, 220, 220, 1303, 1475, 9152, 11055, 24512, 422, 2989, 198, 220, 220, 220, 220, 220, 611, 705, 28243, 6, 287, 850, 15908, 393, 705, 1069, 9152, 6, 287, 850, 15908, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 220, 220, 1303, 9683, 262, 24512, 351, 1575, 2163, 198, 220, 220, 220, 220, 220, 611, 705, 65, 5067, 62, 34948, 6, 287, 850, 15908, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 33622, 284, 23884, 4458, 18982, 7, 7266, 15908, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29677, 41033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 640, 796, 28686, 13, 6978, 13, 35312, 7, 7266, 15908, 38381, 15, 4083, 33491, 7, 4458, 14, 3256, 10148, 737, 33491, 10786, 62, 862, 62, 45380, 9442, 3256, 10148, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 640, 796, 493, 7, 2435, 8, 198, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5765, 262, 717, 3877, 2393, 284, 1282, 1973, 355, 257, 11055, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 47764, 796, 279, 67, 13, 961, 62, 40664, 7, 418, 13, 6978, 13, 22179, 7, 7266, 15908, 11, 705, 65, 5067, 62, 34948, 13, 40664, 33809, 41767, 28, 81, 3256, 59, 82, 9, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3113, 11639, 29412, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 47764, 17816, 16514, 27823, 20520, 796, 640, 628, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2927, 62, 7568, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2927, 62, 7568, 796, 47764, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 33295, 7, 7568, 8, 628, 220, 220, 1303, 383, 3084, 991, 4909, 30806, 17669, 23235, 25, 352, 8610, 18, 986, 362, 23199, 18, 198, 220, 220, 1303, 23520, 2279, 7268, 705, 16, 34, 6, 393, 705, 17, 34, 6, 198, 220, 220, 1303, 3601, 7, 26000, 62, 7568, 58, 26000, 62, 7568, 13, 37696, 13, 2536, 13, 3642, 1299, 7, 81, 6, 58, 16, 12, 17, 60, 34, 11537, 12962, 198, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 14781, 7, 26000, 62, 7568, 58, 26000, 62, 7568, 13, 37696, 13, 2536, 13, 3642, 1299, 7, 81, 6, 58, 16, 12, 17, 60, 34, 11537, 4083, 9630, 8, 628, 220, 220, 3601, 10786, 3237, 7723, 13, 3602, 15464, 3094, 284, 890, 5794, 2644, 11537, 198, 220, 220, 1303, 26981, 262, 3094, 5794, 656, 257, 890, 5794, 2196, 357, 1640, 4577, 29353, 8, 198, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 918, 480, 15090, 6, 80, 10354, 705, 65, 5067, 6, 5512, 16488, 28, 16, 8, 198, 220, 220, 2927, 62, 7568, 796, 279, 67, 13, 76, 2120, 7, 26000, 62, 7568, 11, 4686, 62, 85, 945, 28, 17816, 37696, 3256, 705, 411, 312, 518, 3256, 705, 16514, 27823, 6, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 62, 85, 945, 28, 17816, 65, 5067, 6, 12962, 198, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 918, 480, 15090, 6, 8367, 10354, 705, 10136, 3256, 705, 45286, 10354, 705, 9771, 14902, 38215, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16488, 28, 16, 8, 198, 220, 220, 1441, 2927, 62, 7568, 628, 198, 4299, 2824, 62, 71, 419, 261, 33529, 198, 220, 220, 37227, 16742, 4530, 290, 1234, 606, 287, 530, 1366, 14535, 526, 15931, 198, 220, 220, 1303, 20768, 1096, 4947, 1366, 5739, 198, 220, 220, 2927, 62, 7568, 796, 6045, 198, 220, 220, 1303, 327, 13132, 262, 8619, 4645, 198, 220, 220, 329, 850, 15908, 11, 288, 17062, 11, 3696, 287, 23243, 7, 418, 13, 11152, 7, 4458, 14, 11537, 2599, 628, 220, 220, 220, 220, 220, 1303, 1475, 9152, 11055, 24512, 422, 2989, 198, 220, 220, 220, 220, 220, 611, 705, 28243, 6, 287, 850, 15908, 393, 705, 1069, 9152, 6, 287, 850, 15908, 393, 705, 46280, 538, 6, 287, 850, 15908, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 220, 220, 1303, 9683, 262, 24512, 351, 1575, 2163, 198, 220, 220, 220, 220, 220, 611, 705, 71, 419, 261, 62, 15805, 62, 8818, 6, 287, 850, 15908, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 33622, 284, 23884, 4458, 18982, 7, 7266, 15908, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 29677, 41033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 640, 796, 28686, 13, 6978, 13, 35312, 7, 7266, 15908, 38381, 15, 4083, 33491, 7, 4458, 14, 3256, 10148, 737, 33491, 10786, 62, 862, 62, 45380, 9442, 3256, 10148, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 640, 796, 640, 13, 33491, 10786, 14, 19, 62, 71, 419, 261, 62, 15805, 62, 8818, 3256, 10148, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 640, 796, 493, 7, 2435, 8, 198, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5765, 262, 717, 3877, 2393, 284, 1282, 1973, 355, 257, 11055, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 47764, 796, 279, 67, 13, 961, 62, 40664, 7, 418, 13, 6978, 13, 22179, 7, 7266, 15908, 11, 705, 38631, 62, 4122, 62, 34948, 13, 40664, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 47764, 17816, 16514, 27823, 20520, 796, 640, 628, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2927, 62, 7568, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2927, 62, 7568, 796, 47764, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 33295, 7, 7568, 8, 628, 220, 220, 3601, 10786, 3237, 7723, 13, 3602, 15464, 3094, 284, 890, 5794, 2644, 11537, 198, 220, 220, 1303, 26981, 262, 3094, 5794, 656, 257, 890, 5794, 2196, 357, 1640, 4577, 29353, 8, 198, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 918, 480, 15090, 6, 80, 10354, 705, 1102, 2536, 1328, 3256, 705, 80, 62, 403, 1102, 2536, 1328, 10354, 705, 403, 1102, 2536, 1328, 6, 5512, 16488, 28, 16, 8, 198, 220, 220, 2927, 62, 7568, 796, 279, 67, 13, 76, 2120, 7, 26000, 62, 7568, 11, 4686, 62, 85, 945, 28, 17816, 37696, 3256, 705, 411, 312, 518, 3256, 705, 16514, 27823, 6, 4357, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 62, 85, 945, 28, 17816, 1102, 2536, 1328, 3256, 705, 403, 1102, 2536, 1328, 6, 12962, 198, 220, 220, 2927, 62, 7568, 796, 2927, 62, 7568, 13, 918, 480, 15090, 6, 8367, 10354, 705, 10136, 3256, 705, 45286, 10354, 705, 9771, 14902, 38215, 6, 5512, 16488, 28, 16, 8, 198, 220, 220, 1441, 2927, 62, 7568, 628, 198, 4299, 7925, 62, 15003, 62, 34948, 7, 17034, 79, 62, 6978, 11, 47764, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 11627, 974, 4530, 422, 374, 34788, 2393, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 22037, 62, 14933, 796, 47764, 13, 37696, 13, 34642, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 15384, 13814, 62, 14933, 796, 47764, 13, 411, 312, 518, 13, 34642, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 4530, 796, 279, 67, 13, 6601, 19778, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 17034, 79, 62, 6978, 11, 705, 81, 11537, 355, 374, 34788, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 33244, 2759, 9639, 1353, 349, 1360, 2393, 23884, 4458, 18982, 7, 17034, 79, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 34788, 62, 5239, 796, 374, 34788, 62, 7753, 13, 961, 6615, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1459, 62, 411, 312, 13814, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1627, 287, 374, 34788, 62, 5239, 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, 1303, 22037, 3891, 389, 691, 3748, 2641, 530, 15384, 13814, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 6660, 11, 11986, 543, 581, 356, 389, 3058, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 15384, 13814, 287, 15384, 13814, 62, 14933, 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, 220, 220, 220, 220, 220, 220, 220, 220, 611, 15384, 13814, 287, 1627, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1459, 62, 411, 312, 13814, 796, 15384, 13814, 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, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2735, 11, 356, 460, 804, 510, 262, 22037, 1438, 287, 262, 3877, 3084, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3274, 11, 2922, 262, 3951, 351, 3446, 530, 22037, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 22037, 62, 3672, 287, 22037, 62, 14933, 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, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9683, 3951, 351, 379, 1551, 530, 22037, 1438, 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, 611, 22037, 62, 3672, 287, 1627, 58, 15, 25, 22, 5974, 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, 1218, 62, 13000, 796, 1627, 58, 23, 25, 1507, 4083, 33491, 10786, 10, 3256, 10148, 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, 1218, 62, 13000, 796, 1218, 62, 13000, 13, 33491, 10786, 12, 3256, 10148, 737, 36311, 3419, 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, 1303, 9683, 3951, 351, 645, 22037, 1438, 287, 1218, 5721, 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, 611, 407, 1218, 62, 13000, 287, 22037, 62, 14933, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10662, 62, 8367, 796, 12178, 7, 1370, 58, 1731, 25, 2682, 4083, 36311, 10786, 705, 4008, 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, 4530, 796, 4530, 13, 33295, 15090, 6, 37696, 10354, 22037, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 411, 312, 518, 10354, 1459, 62, 411, 312, 13814, 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, 705, 80, 62, 15003, 10354, 10662, 62, 8367, 5512, 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, 8856, 62, 9630, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4530, 628, 198, 4299, 2824, 62, 23913, 33529, 198, 220, 220, 37227, 11588, 16449, 442, 533, 14542, 287, 257, 1366, 14535, 526, 15931, 198, 220, 220, 1303, 4149, 4530, 422, 16449, 1575, 2163, 198, 220, 220, 5128, 62, 6978, 796, 705, 19571, 71, 419, 261, 62, 34948, 14, 38631, 62, 4122, 62, 34948, 13, 40664, 6, 198, 220, 220, 42781, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 15414, 62, 6978, 8, 198, 220, 220, 1303, 7152, 480, 15180, 329, 15794, 198, 220, 220, 42781, 62, 7568, 796, 42781, 62, 7568, 13, 918, 480, 15090, 6, 80, 10354, 705, 8770, 1886, 1575, 2163, 6, 5512, 16488, 28, 16, 8, 198, 220, 220, 1303, 26981, 284, 890, 5794, 198, 220, 220, 42781, 62, 7568, 796, 279, 67, 13, 76, 2120, 7, 615, 70, 62, 7568, 11, 4686, 62, 85, 945, 28, 17816, 37696, 3256, 705, 411, 312, 518, 6, 4357, 1988, 62, 85, 945, 28, 17816, 8770, 1886, 1575, 2163, 6, 12962, 198, 220, 220, 42781, 62, 7568, 796, 42781, 62, 7568, 13, 918, 480, 15090, 6, 8367, 10354, 705, 10136, 3256, 705, 45286, 10354, 705, 9771, 14902, 38215, 6, 5512, 16488, 28, 16, 8, 198, 220, 220, 1441, 42781, 62, 7568, 628, 198, 4299, 1388, 33529, 198, 220, 220, 37227, 31337, 4530, 290, 3613, 606, 284, 764, 40664, 2393, 37811, 198, 220, 220, 1303, 9745, 16449, 4530, 198, 220, 220, 42781, 62, 7568, 796, 2824, 62, 23913, 3419, 198, 220, 220, 3601, 7, 615, 70, 62, 7568, 13, 17946, 58, 615, 70, 62, 7568, 13, 37696, 6624, 705, 4535, 17, 6, 12962, 628, 220, 220, 1303, 9745, 477, 289, 419, 261, 4530, 198, 220, 220, 3601, 10786, 31337, 278, 367, 9863, 1340, 4530, 2644, 11537, 198, 220, 220, 289, 419, 261, 62, 7568, 796, 2824, 62, 71, 419, 261, 3419, 198, 220, 220, 3601, 7, 71, 419, 261, 62, 7568, 13, 17946, 58, 71, 419, 261, 62, 7568, 13, 37696, 6624, 705, 4535, 17, 6, 12962, 628, 220, 220, 1303, 9745, 477, 2089, 263, 4530, 198, 220, 220, 3601, 10786, 31337, 278, 347, 5067, 4530, 2644, 11537, 198, 220, 220, 2089, 263, 62, 7568, 796, 2824, 62, 65, 5067, 3419, 628, 220, 220, 1303, 23517, 2279, 656, 2060, 1366, 14535, 198, 220, 220, 3601, 10786, 20575, 3191, 1180, 4530, 656, 530, 3084, 2644, 705, 8, 198, 220, 220, 1500, 81, 62, 7568, 796, 289, 419, 261, 62, 7568, 13, 17946, 58, 71, 419, 261, 62, 7568, 17816, 9771, 14902, 38215, 20520, 6624, 705, 1102, 2536, 1328, 20520, 198, 220, 220, 21254, 2536, 62, 7568, 796, 289, 419, 261, 62, 7568, 13, 17946, 58, 71, 419, 261, 62, 7568, 17816, 9771, 14902, 38215, 20520, 6624, 705, 403, 1102, 2536, 1328, 20520, 198, 220, 220, 2824, 62, 7568, 796, 42781, 62, 7568, 198, 220, 220, 2824, 62, 7568, 796, 2824, 62, 7568, 13, 33295, 7, 1102, 2536, 62, 7568, 11, 3297, 28, 25101, 8, 220, 198, 220, 220, 2824, 62, 7568, 796, 2824, 62, 7568, 13, 33295, 7, 403, 1102, 2536, 62, 7568, 11, 3297, 28, 25101, 8, 220, 198, 220, 220, 2824, 62, 7568, 796, 2824, 62, 7568, 13, 33295, 7, 65, 5067, 62, 7568, 11, 3297, 28, 25101, 8, 628, 220, 220, 2251, 62, 15908, 7, 6978, 28, 4458, 14, 29487, 889, 11537, 198, 220, 220, 2824, 62, 7568, 13, 1462, 62, 40664, 7, 4458, 14, 29487, 889, 14, 439, 62, 34948, 13, 40664, 11537, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 1388, 3419, 198 ]
2.173309
3,237
import os import time import json import datetime import subprocess from pythonping import ping from influxdb_client import InfluxDBClient from influxdb_client.client.write_api import SYNCHRONOUS from multiprocessing import Process # InfluxDB Settings NAMESPACE = os.getenv('NAMESPACE', 'None') DB_URL = os.getenv('INFLUX_DB_URL', 'http://localhost') DB_TOKEN = os.getenv('INFLUX_DB_TOKEN', 'my-token') DB_ORG = os.getenv('INFLUX_DB_ORG', 'my-org') DB_BUCKET = os.getenv('INFLUX_DB_BUCKET', 'my-bucket') DB_TAGS = os.getenv('INFLUX_DB_TAGS', None) PING_TARGETS = os.getenv('PING_TARGETS', '1.1.1.1, 8.8.8.8') # Speedtest Settings # Time between tests (in minutes, converts to seconds). TEST_INTERVAL = int(os.getenv('SPEEDTEST_INTERVAL', '5')) * 60 # Time before retrying a failed Speedtest (in minutes, converts to seconds). TEST_FAIL_INTERVAL = int(os.getenv('SPEEDTEST_FAIL_INTERVAL', '5')) * 60 # Specific server ID SERVER_ID = os.getenv('SPEEDTEST_SERVER_ID', '') # Time between ping tests (in seconds). PING_INTERVAL = int(os.getenv('PING_INTERVAL', '5')) with InfluxDBClient(url=DB_URL, token=DB_TOKEN, org=DB_ORG) as client: write_api = client.write_api(write_options=SYNCHRONOUS) pass # time.sleep(TEST_FAIL_INTERVAL) if __name__ == '__main__': print('Speedtest CLI data logger to InfluxDB started...') main()
[ 11748, 28686, 201, 198, 11748, 640, 201, 198, 11748, 33918, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 850, 14681, 201, 198, 6738, 21015, 13886, 1330, 29400, 201, 198, 6738, 25065, 9945, 62, 16366, 1330, 4806, 22564, 11012, 11792, 201, 198, 6738, 25065, 9945, 62, 16366, 13, 16366, 13, 13564, 62, 15042, 1330, 19704, 45, 37846, 1340, 20958, 201, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 201, 198, 201, 198, 2, 4806, 22564, 11012, 16163, 201, 198, 45, 29559, 47, 11598, 796, 28686, 13, 1136, 24330, 10786, 45, 29559, 47, 11598, 3256, 705, 14202, 11537, 201, 198, 11012, 62, 21886, 796, 28686, 13, 1136, 24330, 10786, 1268, 3697, 31235, 62, 11012, 62, 21886, 3256, 705, 4023, 1378, 36750, 11537, 201, 198, 11012, 62, 10468, 43959, 796, 28686, 13, 1136, 24330, 10786, 1268, 3697, 31235, 62, 11012, 62, 10468, 43959, 3256, 705, 1820, 12, 30001, 11537, 201, 198, 11012, 62, 1581, 38, 796, 28686, 13, 1136, 24330, 10786, 1268, 3697, 31235, 62, 11012, 62, 1581, 38, 3256, 705, 1820, 12, 2398, 11537, 201, 198, 11012, 62, 33, 16696, 2767, 796, 28686, 13, 1136, 24330, 10786, 1268, 3697, 31235, 62, 11012, 62, 33, 16696, 2767, 3256, 705, 1820, 12, 27041, 316, 11537, 201, 198, 11012, 62, 42197, 50, 796, 28686, 13, 1136, 24330, 10786, 1268, 3697, 31235, 62, 11012, 62, 42197, 50, 3256, 6045, 8, 201, 198, 47, 2751, 62, 51, 46095, 50, 796, 28686, 13, 1136, 24330, 10786, 47, 2751, 62, 51, 46095, 50, 3256, 705, 16, 13, 16, 13, 16, 13, 16, 11, 807, 13, 23, 13, 23, 13, 23, 11537, 201, 198, 201, 198, 2, 8729, 9288, 16163, 201, 198, 2, 3862, 1022, 5254, 357, 259, 2431, 11, 26161, 284, 4201, 737, 201, 198, 51, 6465, 62, 41358, 23428, 796, 493, 7, 418, 13, 1136, 24330, 10786, 4303, 41841, 51, 6465, 62, 41358, 23428, 3256, 705, 20, 6, 4008, 1635, 3126, 201, 198, 2, 3862, 878, 1005, 14992, 257, 4054, 8729, 9288, 357, 259, 2431, 11, 26161, 284, 4201, 737, 201, 198, 51, 6465, 62, 7708, 4146, 62, 41358, 23428, 796, 493, 7, 418, 13, 1136, 24330, 10786, 4303, 41841, 51, 6465, 62, 7708, 4146, 62, 41358, 23428, 3256, 705, 20, 6, 4008, 1635, 3126, 201, 198, 2, 17377, 4382, 4522, 201, 198, 35009, 5959, 62, 2389, 796, 28686, 13, 1136, 24330, 10786, 4303, 41841, 51, 6465, 62, 35009, 5959, 62, 2389, 3256, 10148, 8, 201, 198, 2, 3862, 1022, 29400, 5254, 357, 259, 4201, 737, 201, 198, 47, 2751, 62, 41358, 23428, 796, 493, 7, 418, 13, 1136, 24330, 10786, 47, 2751, 62, 41358, 23428, 3256, 705, 20, 6, 4008, 201, 198, 201, 198, 4480, 4806, 22564, 11012, 11792, 7, 6371, 28, 11012, 62, 21886, 11, 11241, 28, 11012, 62, 10468, 43959, 11, 8745, 28, 11012, 62, 1581, 38, 8, 355, 5456, 25, 201, 198, 220, 220, 220, 3551, 62, 15042, 796, 5456, 13, 13564, 62, 15042, 7, 13564, 62, 25811, 28, 23060, 45, 37846, 1340, 20958, 8, 201, 198, 220, 220, 220, 1208, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 2, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 51, 6465, 62, 7708, 4146, 62, 41358, 23428, 8, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 3601, 10786, 22785, 9288, 43749, 1366, 49706, 284, 4806, 22564, 11012, 2067, 986, 11537, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
2.415517
580
""" This module contains the RA calculator """ from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder from kivy.properties import StringProperty from Moduler.customwidgets import MyLabel from Moduler.customwidgets import MyTextInput from Moduler.datasaving import SurfaceRaData Builder.load_string( """ <BoxLayout>: orientation: 'horizontal' <MyTextInput>: <Ra>: feed: feed nr: nr cols: 1 padding: 10 spacing: 10 BoxLayout: size_hint_y: None height: "40dp" Label: text: "Feedrate: " MyTextInput: id: feed hint_text: "mm/o" multiline: False write_tab: False on_text_validate: root.calc() BoxLayout: size_hint_y: None height: "40dp" Label: text: "Nose Radius: " MyTextInput: id: nr hint_text: "mm" multiline: False write_tab: False on_text_validate: root.calc() BoxLayout: size_hint_y: None height: "40dp" Button: text: "Calculate!" on_press: root.calc() BoxLayout: #size_hint_y: None #height: "200dp" Label: BoxLayout: size_hint_y: None height: "40dp" MyLabel: text: "Ra: " bcolor: [1, 1, 1, 0.15] MyLabel: text: root.surface_ra bcolor: [1, 1, 1, 0.15] """ ) class Ra(GridLayout): """ Main class for the RA module """ surface_ra = StringProperty() def calc(self): """ Calculating RA """ try: feed = self.feed.text feed = feed.replace(',', '.') feed = float(feed) except ValueError: pass try: nose_radius = self.nr.text nose_radius = nose_radius.replace(',', '.') nose_radius = float(nose_radius) except ValueError: pass try: result = ((feed**2) / (nose_radius*24)) * 1000 result = round(result, 2) except(TypeError, ZeroDivisionError): result = "Please input values" self.surface_ra = str(result) SurfaceRaData("Database.xlsx").filesave(self.feed.text, self.nr.text, result)
[ 37811, 770, 8265, 4909, 262, 17926, 28260, 37227, 198, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 25928, 39786, 1330, 24846, 32517, 198, 6738, 479, 452, 88, 13, 17204, 1330, 35869, 198, 6738, 479, 452, 88, 13, 48310, 1330, 10903, 21746, 198, 198, 6738, 3401, 18173, 13, 23144, 28029, 11407, 1330, 2011, 33986, 198, 6738, 3401, 18173, 13, 23144, 28029, 11407, 1330, 2011, 8206, 20560, 198, 6738, 3401, 18173, 13, 19608, 292, 2703, 1330, 20321, 21762, 6601, 198, 198, 32875, 13, 2220, 62, 8841, 7, 198, 220, 220, 220, 37227, 198, 198, 27, 14253, 32517, 31175, 198, 220, 220, 220, 12852, 25, 705, 17899, 38342, 6, 198, 198, 27, 3666, 8206, 20560, 31175, 198, 198, 27, 21762, 31175, 628, 220, 220, 220, 3745, 25, 3745, 198, 220, 220, 220, 299, 81, 25, 299, 81, 628, 220, 220, 220, 951, 82, 25, 352, 198, 220, 220, 220, 24511, 25, 838, 198, 220, 220, 220, 31050, 25, 838, 628, 220, 220, 220, 8315, 32517, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 62, 71, 600, 62, 88, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 25, 366, 1821, 26059, 1, 198, 220, 220, 220, 220, 220, 220, 220, 36052, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 25, 366, 18332, 4873, 25, 366, 628, 220, 220, 220, 220, 220, 220, 220, 2011, 8206, 20560, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 25, 3745, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9254, 62, 5239, 25, 366, 3020, 14, 78, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1963, 346, 500, 25, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 62, 8658, 25, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 62, 5239, 62, 12102, 378, 25, 6808, 13, 9948, 66, 3419, 628, 220, 220, 220, 8315, 32517, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 62, 71, 600, 62, 88, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 25, 366, 1821, 26059, 1, 198, 220, 220, 220, 220, 220, 220, 220, 36052, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 25, 366, 45, 577, 48838, 25, 366, 628, 220, 220, 220, 220, 220, 220, 220, 2011, 8206, 20560, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 25, 299, 81, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9254, 62, 5239, 25, 366, 3020, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1963, 346, 500, 25, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 62, 8658, 25, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 62, 5239, 62, 12102, 378, 25, 6808, 13, 9948, 66, 3419, 628, 220, 220, 220, 8315, 32517, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 62, 71, 600, 62, 88, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 25, 366, 1821, 26059, 1, 198, 220, 220, 220, 220, 220, 220, 220, 20969, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 25, 366, 9771, 3129, 378, 2474, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 62, 8439, 25, 6808, 13, 9948, 66, 3419, 628, 220, 220, 220, 8315, 32517, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7857, 62, 71, 600, 62, 88, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 17015, 25, 366, 2167, 26059, 1, 198, 220, 220, 220, 220, 220, 220, 220, 36052, 25, 628, 220, 220, 220, 8315, 32517, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2546, 62, 71, 600, 62, 88, 25, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 25, 366, 1821, 26059, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2011, 33986, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 25, 366, 21762, 25, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 8043, 25, 685, 16, 11, 352, 11, 352, 11, 657, 13, 1314, 60, 628, 220, 220, 220, 220, 220, 220, 220, 2011, 33986, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 25, 6808, 13, 42029, 62, 430, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 8043, 25, 685, 16, 11, 352, 11, 352, 11, 657, 13, 1314, 60, 628, 220, 220, 220, 37227, 198, 8, 628, 198, 4871, 7567, 7, 41339, 32517, 2599, 628, 220, 220, 220, 37227, 8774, 1398, 329, 262, 17926, 8265, 37227, 628, 220, 220, 220, 4417, 62, 430, 796, 10903, 21746, 3419, 628, 220, 220, 220, 825, 42302, 7, 944, 2599, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 27131, 803, 17926, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3745, 796, 2116, 13, 12363, 13, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3745, 796, 3745, 13, 33491, 7, 3256, 3256, 705, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3745, 796, 12178, 7, 12363, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9686, 62, 42172, 796, 2116, 13, 48624, 13, 5239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9686, 62, 42172, 796, 9686, 62, 42172, 13, 33491, 7, 3256, 3256, 705, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9686, 62, 42172, 796, 12178, 7, 77, 577, 62, 42172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 14808, 12363, 1174, 17, 8, 1220, 357, 77, 577, 62, 42172, 9, 1731, 4008, 1635, 8576, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 2835, 7, 20274, 11, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 7, 6030, 12331, 11, 12169, 24095, 1166, 12331, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 366, 5492, 5128, 3815, 1, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 42029, 62, 430, 796, 965, 7, 20274, 8, 628, 220, 220, 220, 220, 220, 220, 220, 20321, 21762, 6601, 7203, 38105, 13, 87, 7278, 87, 11074, 16624, 1015, 7, 944, 13, 12363, 13, 5239, 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, 2116, 13, 48624, 13, 5239, 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, 1255, 8, 198 ]
1.890178
1,293
"""Top-level package for nhdpy.""" __author__ = """Jemma Stachelek""" __email__ = '[email protected]' __version__ = '0.1.0' from .nhdpy import nhd_get from .nhdpy import nhd_list from .nhdpy import nhd_load
[ 37811, 9126, 12, 5715, 5301, 329, 299, 31298, 9078, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 41, 368, 2611, 520, 4891, 293, 74, 37811, 198, 834, 12888, 834, 796, 705, 301, 9636, 17, 31, 907, 84, 13, 15532, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198, 198, 6738, 764, 77, 31298, 9078, 1330, 299, 31298, 62, 1136, 198, 6738, 764, 77, 31298, 9078, 1330, 299, 31298, 62, 4868, 198, 6738, 764, 77, 31298, 9078, 1330, 299, 31298, 62, 2220, 628 ]
2.375
88
# TODO merge naive and weighted loss. import numpy as np import torch import torch.nn.functional as F from ..bbox import bbox_overlaps from ...ops import sigmoid_focal_loss from ..bbox.transforms import delta2bbox # added by Shengkai Wu # implement iou_balanced cross entropy loss. def iou_balanced_cross_entropy(pred, label, weight, iou, eta = 1.5, avg_factor=None, reduce=True): """ iou_balanced cross entropy loss to make the training process to focus more on positives with higher iou. :param pred: tesnor of shape (batch*num_samples, num_class) :param label: tensor of shape (batch*num_samples), store gt labels such as 0, 1, 2, 80 for corresponding class(0 represent background). :param weight: tensor of shape (batch*num_samples), 1 for all the elements; :param iou: tensor of shape (batch*num_samples), iou between predicted boxes and corresponding ground truth boxes for positives and 0 for negatives. :param eta: control to which extent the training process focuses on the positives with high iou. :param avg_factor: :param reduce: :return: """ # avg_factor = batch*num_samples # if avg_factor is None: # avg_factor = max(torch.sum(weight > 0).float().item(), 1.) raw1 = F.cross_entropy(pred, label, reduction='none') target = iou.new_zeros(iou.size(0)) # target_1 = iou.new_zeros(iou.size(0)) # the way to get the indexes of positive example may be wrong; is it right? # pos_inds_1 = label > 0 # target_1[pos_inds_1] = 1 # modify the way to get the indexes pos_inds = (label > 0).nonzero().view(-1) # pos_inds = (label >= 1).nonzero().view(-1) target[pos_inds] = 1.0 # pos_inds_test = target.nonzero().view(-1) method_1 = True normalization = True method_2 = False threshold = 0.66 # threshold = torch.min(iou[pos_inds]).item() method_3 = False target = target.type_as(pred) if method_1: if normalization: iou_weights = (1 - target) + (target * iou).pow(eta) # normalized to keep the sum of loss for positive examples unchanged; raw2 = raw1*iou_weights normalizer = (raw1 * target).sum() / ((raw2 * target).sum() + 1e-6) normalized_iou_weights = (1 - target) + (target * iou).pow(eta) * normalizer normalized_iou_weights = normalized_iou_weights.detach() raw = raw1*normalized_iou_weights else: weight_pos = 1.8 iou_weights = (1 - target) + (target * iou).pow(eta)*weight_pos iou_weights = iou_weights.detach() raw = raw1*iou_weights elif method_2: iou_weights = (1 - target) + (target*(1 + (iou - threshold))).pow(eta) iou_weights = iou_weights.detach() raw = raw1 * iou_weights elif method_3: ones_weight = iou.new_ones(iou.size(0)) iou_weights_1 = torch.where(iou > threshold, 1.0 + (iou - threshold), ones_weight) # iou_weights = (1 - target) + (target * iou_weights_1).pow(eta) iou_weights = (1 - target) + target * iou_weights_1 iou_weights = iou_weights.detach() raw = raw1 * iou_weights # raw = (raw1 * iou_weights +raw1)/2 # print('test_loss') if avg_factor is None: # avg_factor = max(torch.sum(normalized_iou_weights).float().item(), 1.) avg_factor = max(torch.sum(weight > 0).float().item(), 1.) if reduce: return torch.sum(raw * weight)[None] / avg_factor else: return raw * weight / avg_factor def consistent_loss(pred, label, weight, iou, avg_factor=None, reduce=True): """ :param pred: tesnor of shape (batch*num_samples, num_class) :param label: tensor of shape (batch*num_samples), store gt labels such as 0, 1, 2, 80 for corresponding class(0 represent background). :param weight: tensor of shape (batch*num_samples), 1 for all the elements; :param iou: tensor of shape (batch*num_samples), iou between proposals and corresponding ground truth boxes for positives and 0 for negatives. :param avg_factor: :param reduce: :return: """ if avg_factor is None: avg_factor = max(torch.sum(weight > 0).float().item(), 1.) raw1 = F.cross_entropy(pred, label, reduction='none') target = iou.new_zeros(iou.size(0)) pos_inds = (label > 0).nonzero().view(-1) target[pos_inds] = 1.0 threshold = 0.5 ones_weight = iou.new_ones(iou.size(0)) iou_weights_1 = torch.where(iou > threshold, 1.0 + (iou - threshold), ones_weight) iou_weights = (1 - target) + target * iou_weights_1 iou_weights = iou_weights.detach() raw = raw1 * iou_weights if reduce: return torch.sum(raw * weight)[None] / avg_factor else: return raw * weight / avg_factor def iou_balanced_binary_cross_entropy(pred, label, weight, iou, eta = 1.5, avg_factor=None, reduce=True): """ :param pred: tensor of shape (num_examples, 1) :param label: tensor of shape (num_examples, 1) :param weight: tensor of shape (num_examples, 1) :param iou: tensor of shape (num_examples), containing the iou for all the regressed positive examples. :param eta: :param avg_factor: :return: """ if pred.dim() != label.dim(): label, weight = _expand_binary_labels(label, weight, pred.size(-1)) if avg_factor is None: avg_factor = max(torch.sum(weight > 0).float().item(), 1.) raw1 = F.binary_cross_entropy_with_logits(pred, label.float(),reduction='none') target = label.new_zeros(label.size()) # target_1 = iou.new_zeros(iou.size(0)) # the way to get the indexes of positive example may be wrong; is it wright? # pos_inds_1 = label > 0 # target_1[pos_inds_1] = 1 # modify the way to get the indexes # label_squeeze = torch.squeeze(label) # pos_inds = (label > 0).nonzero().view(-1) # print('the size of label is ', label.size()) pos_inds = (label > 0).nonzero() # print('the size of label_squeeze is ', label_squeeze.size()) target[pos_inds] = 1 # print('the num of positive examples is', torch.sum(target)) # print('the num of positive examples for target_1 is', torch.sum(target_1)) normalization = True if normalization: target = target.type_as(pred) iou = iou.unsqueeze(-1) # print('the size of target is ', target.size()) # print('the size of iou is ', iou.size()) # print('the size of iou_1 is ', iou_1.size()) iou_weights = (1 - target) + (target * iou).pow(eta) # print('the size of iou_weights is ', iou_weights.size()) # print('the size of raw1 is ', raw1.size()) # iou_weights.unsqueeze(1) # normalized to keep the sum of loss for positive examples unchanged; raw2 = raw1 * iou_weights normalizer = (raw1 * target).sum() / ((raw2 * target).sum() + 1e-6) normalized_iou_weights = (1 - target) + (target * iou).pow(eta) * normalizer normalized_iou_weights = normalized_iou_weights.detach() raw = raw1 * normalized_iou_weights else: target = target.type_as(pred) weight_pos = 1.8 iou_weights = (1 - target) + (target * iou).pow(eta) * weight_pos iou_weights = iou_weights.detach() raw = raw1 * iou_weights if reduce: return torch.sum(raw * weight)[None] / avg_factor else: return raw * weight / avg_factor # return F.binary_cross_entropy_with_logits( # pred, label.float(), weight.float(), # reduction='sum')[None] / avg_factor # Known from the definition of weight in file anchor_target.py, # all the elements of tensor 'weight' are 1. # added by Shengkai Wu # The focal loss is only computed for negative examples, and the standard binary cross # entropy loss is computed for the positive examples. This is designed to investigate # whether hard example mining for positive examples is beneficial for the performance. def weighted_sigmoid_focal_loss(pred, target, weight, gamma=2.0, alpha=0.25, avg_factor=None, num_classes=80): """ note that :param pred: tensor of shape (batch*A*width*height, num_class) :param target: tensor of shape (batch*A*width*height, num_class), only the element for the positive labels are 1. :param weight: tensor of shape (batch*A*width*height, num_class), 1 for pos and neg, 0 for the others :param gamma: :param alpha: :param avg_factor: :param num_classes: :return: """ if avg_factor is None: avg_factor = torch.sum(weight > 0).float().item() / num_classes + 1e-6 return py_sigmoid_focal_loss( pred, target, weight, gamma=gamma, alpha=alpha, reduction='sum')[None] / avg_factor # added by Shengkai Wu # iou-balanced classification loss is designed to strengthen the correlation between classificaiton and # localization task. The goal is to make that the detections with high IOU with the ground truth boxes also have # high classification scores. def iou_balanced_sigmoid_focal_loss(pred, target, weight, iou, gamma=2.0, alpha=0.25, eta=1.5, avg_factor=None, num_classes=80): """ :param pred: tensor of shape (batch*A*width*height, num_class) :param target: tensor of shape (batch*A*width*height, num_class), only the positive label is assigned 1, 0 for others. :param weight: tensor of shape (batch*A*width*height, num_class), 1 for pos and neg, 0 for the others. :param iou: tensor of shape (batch*A*width*height), store the iou between predicted boxes and its corresponding ground truth boxes for the positives and the iou between the predicted boxes and anchors for negatives. :param gamma: :param alpha: :param eta: control the suppression for the positives of low iou. :param avg_factor: num_positive_samples. If None, :param num_classes: :return: """ # if avg_factor is None: # avg_factor = torch.sum(target).float().item() + 1e-6 # use_diff_thr = True # pred_sigmoid = pred.sigmoid() target = target.type_as(pred) loss1 = py_sigmoid_focal_loss( pred, target, weight, gamma=gamma, alpha=alpha, reduction='none') IoU_balanced_Cls = True threshold = 0.5 if IoU_balanced_Cls: # compute the normalized weights so that the loss produced by the positive examples # doesn't change. iou_expanded = iou.view(-1, 1).expand(-1, target.size()[1]) iou_weights = (1 - target) + (target * iou_expanded).pow(eta) # iou_weights = iou_weights.detach() loss2 = loss1*iou_weights normalizer = (loss1*target).sum()/((loss2*target).sum()+1e-6) # normalizer = 2.1 normalized_iou_weights = (1-target) + (target*iou_expanded).pow(eta)*normalizer normalized_iou_weights = normalized_iou_weights.detach() loss = loss1*normalized_iou_weights # print('test') else: # consistent loss iou_expanded = iou.view(-1, 1).expand(-1, target.size()[1]) ones_weight = iou_expanded.new_ones(iou_expanded.size()) # print('ones_weight.size() is ', ones_weight.size()) iou_weights_1 = torch.where(iou_expanded > threshold, 1.0 + (iou_expanded - threshold), ones_weight) # iou_weights = (1 - target) + (target * iou_weights_1).pow(eta) iou_weights = (1 - target) + target * iou_weights_1 iou_weights = iou_weights.detach() # loss = loss1 * iou_weights balance_factor = 0.6 loss = loss1*balance_factor + loss1 * iou_weights*(1-balance_factor) return torch.sum(loss)[None] / avg_factor # Known from the definition of weight in file anchor_target.py, # the elements of tensor 'weight' for positive proposals are one. # added by Shengkai Wu # implement the focal loss for localization task. def weighted_iou_balanced_smoothl1(pred, target, iou, weight, beta=1.0, delta=1.5, avg_factor=None): """ :param pred: tensor of shape (batch*A*width*height, 4) or (batch*num_pos, 4) :param target: tensor of shape (batch*A*width*height, 4), store the parametrized coordinates of target boxes for the positive anchors and other values are set to be 0. Or tensor of shape (batch*num_pos, 4) :param iou: tensor of shape (batch*A*width*height)Or tensor of shape (batch*num_pos), store the iou between predicted boxes and its corresponding groundtruth boxes for the positives and the iou between the predicted boxes and anchors for negatives. :param weight: tensor of shape (batch*A*width*height, 4), only the weights for positive anchors are set to be 1 and other values are set to be 0. Or tensor of shape (batch*num_pos, 4), all the elements are 1. :param beta: :param delta: control the suppression for the outliers. :param avg_factor: :return: """ # the pred and target are transformed to image domain and represented by top-left and bottom-right corners. assert pred.size() == target.size() and target.numel() > 0 # ignore the positive examples of which the iou after regression is smaller # than 0.5; ignore_outliers = False iou_threshold = 0.5 if ignore_outliers: filter = iou.new_zeros(iou.size()) filter_extend = filter.view(-1, 1).expand(-1, 4) ind = (iou >= iou_threshold).nonzero() filter[ind] = 1 iou = iou * filter iou_expanded = iou.view(-1, 1).expand(-1, 4) iou_weight = weight * iou_expanded.pow(delta) iou_weight = iou_weight.detach() if avg_factor is None: avg_factor = torch.sum(weight > 0).float().item() / 4 + 1e-6 loss1 = smooth_l1_loss(pred, target, beta, reduction='none') loss2 = loss1*iou_weight # loss2 = loss1 *filter_extend return torch.sum(loss2)[None] / avg_factor def weighted_iou_regression_loss(iou_pred, iou_target, weight, avg_factor=None): """ :param iou_pred: tensor of shape (batch*A*width*height) or (batch*num_pos) :param iou_target: tensor of shape (batch*A*width*height)Or tensor of shape (batch*num_pos), store the iou between predicted boxes and its corresponding groundtruth boxes for the positives and the iou between the predicted boxes and anchors for negatives. :param weight: tensor of shape (batch*A*width*height) or (batch*num_pos), 1 for positives and 0 for negatives and neutrals. :param avg_factor: :return: """ # iou_pred_sigmoid = iou_pred.sigmoid() # iou_target = iou_target.detach() # L2 loss. # loss = torch.pow((iou_pred_sigmoid - iou_target), 2)*weight # Binary cross-entropy loss for the positive examples loss = F.binary_cross_entropy_with_logits(iou_pred, iou_target, reduction='none')* weight return torch.sum(loss)[None] / avg_factor def bounded_iou_loss(pred, target, beta=0.2, eps=1e-3, reduction='mean'): """Improving Object Localization with Fitness NMS and Bounded IoU Loss, https://arxiv.org/abs/1711.00164. Args: pred (tensor): Predicted bboxes. target (tensor): Target bboxes. beta (float): beta parameter in smoothl1. eps (float): eps to avoid NaN. reduction (str): Reduction type. """ pred_ctrx = (pred[:, 0] + pred[:, 2]) * 0.5 pred_ctry = (pred[:, 1] + pred[:, 3]) * 0.5 pred_w = pred[:, 2] - pred[:, 0] + 1 pred_h = pred[:, 3] - pred[:, 1] + 1 with torch.no_grad(): target_ctrx = (target[:, 0] + target[:, 2]) * 0.5 target_ctry = (target[:, 1] + target[:, 3]) * 0.5 target_w = target[:, 2] - target[:, 0] + 1 target_h = target[:, 3] - target[:, 1] + 1 dx = target_ctrx - pred_ctrx dy = target_ctry - pred_ctry loss_dx = 1 - torch.max( (target_w - 2 * dx.abs()) / (target_w + 2 * dx.abs() + eps), torch.zeros_like(dx)) loss_dy = 1 - torch.max( (target_h - 2 * dy.abs()) / (target_h + 2 * dy.abs() + eps), torch.zeros_like(dy)) loss_dw = 1 - torch.min(target_w / (pred_w + eps), pred_w / (target_w + eps)) loss_dh = 1 - torch.min(target_h / (pred_h + eps), pred_h / (target_h + eps)) loss_comb = torch.stack([loss_dx, loss_dy, loss_dw, loss_dh], dim=-1).view(loss_dx.size(0), -1) loss = torch.where(loss_comb < beta, 0.5 * loss_comb * loss_comb / beta, loss_comb - 0.5 * beta) reduction_enum = F._Reduction.get_enum(reduction) # none: 0, mean:1, sum: 2 if reduction_enum == 0: return loss elif reduction_enum == 1: return loss.sum() / pred.numel() elif reduction_enum == 2: return loss.sum() def accuracy(pred, target, topk=1): """ :param pred: (batch*num_sample, C) :param target: (batch*num_sample) :param topk: :return: """ if isinstance(topk, int): topk = (topk, ) return_single = True else: return_single = False maxk = max(topk) _, pred_label = pred.topk(maxk, 1, True, True) # (batch*num_sample, 1) pred_label = pred_label.t() # (1, batch*num_sample) correct = pred_label.eq(target.view(1, -1).expand_as(pred_label)) # (1, batch*num_sample) res = [] for k in topk: correct_k = correct[:k].view(-1).float().sum(0, keepdim=True) res.append(correct_k.mul_(100.0 / pred.size(0))) return res[0] if return_single else res
[ 2, 16926, 46, 20121, 24354, 290, 26356, 2994, 13, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 11485, 65, 3524, 1330, 275, 3524, 62, 2502, 75, 1686, 198, 6738, 2644, 2840, 1330, 264, 17225, 1868, 62, 69, 4374, 62, 22462, 198, 6738, 11485, 65, 3524, 13, 7645, 23914, 1330, 25979, 17, 65, 3524, 628, 628, 198, 2, 2087, 416, 1375, 782, 32765, 18027, 198, 2, 3494, 1312, 280, 62, 27753, 3272, 40709, 2994, 13, 198, 4299, 1312, 280, 62, 27753, 62, 19692, 62, 298, 28338, 7, 28764, 11, 6167, 11, 3463, 11, 1312, 280, 11, 2123, 64, 796, 352, 13, 20, 11, 42781, 62, 31412, 28, 14202, 11, 4646, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1312, 280, 62, 27753, 3272, 40709, 2994, 284, 787, 262, 3047, 1429, 284, 2962, 517, 319, 38548, 351, 2440, 198, 220, 220, 220, 1312, 280, 13, 198, 220, 220, 220, 1058, 17143, 2747, 25, 256, 274, 13099, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 11, 997, 62, 4871, 8, 198, 220, 220, 220, 1058, 17143, 6167, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 3650, 308, 83, 14722, 884, 355, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 352, 11, 362, 11, 4019, 329, 11188, 1398, 7, 15, 2380, 4469, 737, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 352, 329, 477, 262, 4847, 26, 198, 220, 220, 220, 1058, 17143, 1312, 280, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 1312, 280, 1022, 11001, 10559, 290, 11188, 2323, 198, 220, 220, 220, 220, 220, 220, 220, 3872, 10559, 329, 38548, 290, 657, 329, 42510, 13, 198, 220, 220, 220, 1058, 17143, 2123, 64, 25, 1630, 284, 543, 6287, 262, 3047, 1429, 13692, 319, 262, 38548, 351, 1029, 1312, 280, 13, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 17143, 4646, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 42781, 62, 31412, 796, 15458, 9, 22510, 62, 82, 12629, 198, 220, 220, 220, 1303, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 42781, 62, 31412, 796, 3509, 7, 13165, 354, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 22784, 352, 2014, 628, 220, 220, 220, 8246, 16, 796, 376, 13, 19692, 62, 298, 28338, 7, 28764, 11, 6167, 11, 7741, 11639, 23108, 11537, 628, 220, 220, 220, 2496, 796, 1312, 280, 13, 3605, 62, 9107, 418, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 1303, 2496, 62, 16, 796, 1312, 280, 13, 3605, 62, 9107, 418, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 1303, 262, 835, 284, 651, 262, 39199, 286, 3967, 1672, 743, 307, 2642, 26, 318, 340, 826, 30, 198, 220, 220, 220, 1303, 1426, 62, 521, 82, 62, 16, 796, 6167, 1875, 657, 198, 220, 220, 220, 1303, 2496, 62, 16, 58, 1930, 62, 521, 82, 62, 16, 60, 796, 352, 198, 220, 220, 220, 1303, 13096, 262, 835, 284, 651, 262, 39199, 198, 220, 220, 220, 1426, 62, 521, 82, 796, 357, 18242, 1875, 657, 737, 13159, 22570, 22446, 1177, 32590, 16, 8, 198, 220, 220, 220, 1303, 1426, 62, 521, 82, 796, 357, 18242, 18189, 352, 737, 13159, 22570, 22446, 1177, 32590, 16, 8, 198, 220, 220, 220, 2496, 58, 1930, 62, 521, 82, 60, 796, 352, 13, 15, 198, 220, 220, 220, 1303, 1426, 62, 521, 82, 62, 9288, 796, 2496, 13, 13159, 22570, 22446, 1177, 32590, 16, 8, 628, 220, 220, 220, 2446, 62, 16, 796, 6407, 198, 220, 220, 220, 3487, 1634, 796, 6407, 628, 220, 220, 220, 2446, 62, 17, 796, 10352, 628, 220, 220, 220, 11387, 796, 657, 13, 2791, 198, 220, 220, 220, 1303, 11387, 796, 28034, 13, 1084, 7, 72, 280, 58, 1930, 62, 521, 82, 35944, 9186, 3419, 628, 220, 220, 220, 2446, 62, 18, 796, 10352, 628, 220, 220, 220, 2496, 796, 2496, 13, 4906, 62, 292, 7, 28764, 8, 198, 220, 220, 220, 611, 2446, 62, 16, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3487, 1634, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 39279, 284, 1394, 262, 2160, 286, 2994, 329, 3967, 6096, 21588, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8246, 17, 796, 8246, 16, 9, 72, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3487, 7509, 796, 357, 1831, 16, 1635, 2496, 737, 16345, 3419, 1220, 14808, 1831, 17, 1635, 2496, 737, 16345, 3419, 1343, 352, 68, 12, 21, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 8, 1635, 3487, 7509, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 39279, 62, 72, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 9, 11265, 1143, 62, 72, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3463, 62, 1930, 796, 352, 13, 23, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 27493, 6551, 62, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 9, 72, 280, 62, 43775, 198, 220, 220, 220, 1288, 361, 2446, 62, 17, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 9, 7, 16, 1343, 357, 72, 280, 532, 11387, 4008, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 1635, 1312, 280, 62, 43775, 198, 220, 220, 220, 1288, 361, 2446, 62, 18, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3392, 62, 6551, 796, 1312, 280, 13, 3605, 62, 1952, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 62, 16, 796, 28034, 13, 3003, 7, 72, 280, 1875, 11387, 11, 352, 13, 15, 1343, 357, 72, 280, 532, 11387, 828, 3392, 62, 6551, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 62, 43775, 62, 16, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 2496, 1635, 1312, 280, 62, 43775, 62, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 1635, 1312, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 8246, 796, 357, 1831, 16, 1635, 1312, 280, 62, 43775, 1343, 1831, 16, 20679, 17, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 9288, 62, 22462, 11537, 628, 220, 220, 220, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 42781, 62, 31412, 796, 3509, 7, 13165, 354, 13, 16345, 7, 11265, 1143, 62, 72, 280, 62, 43775, 737, 22468, 22446, 9186, 22784, 352, 2014, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 31412, 796, 3509, 7, 13165, 354, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 22784, 352, 2014, 628, 220, 220, 220, 611, 4646, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 28034, 13, 16345, 7, 1831, 1635, 3463, 38381, 14202, 60, 1220, 42781, 62, 31412, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8246, 1635, 3463, 1220, 42781, 62, 31412, 198, 198, 4299, 6414, 62, 22462, 7, 28764, 11, 6167, 11, 3463, 11, 1312, 280, 11, 42781, 62, 31412, 28, 14202, 11, 4646, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 2747, 25, 256, 274, 13099, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 11, 997, 62, 4871, 8, 198, 220, 220, 220, 1058, 17143, 6167, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 3650, 308, 83, 14722, 884, 355, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 352, 11, 362, 11, 4019, 329, 11188, 1398, 7, 15, 2380, 4469, 737, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 352, 329, 477, 262, 4847, 26, 198, 220, 220, 220, 1058, 17143, 1312, 280, 25, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 82, 12629, 828, 1312, 280, 1022, 11628, 290, 11188, 2323, 198, 220, 220, 220, 220, 220, 220, 220, 3872, 10559, 329, 38548, 290, 657, 329, 42510, 13, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 17143, 4646, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 31412, 796, 3509, 7, 13165, 354, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 22784, 352, 2014, 198, 220, 220, 220, 8246, 16, 796, 376, 13, 19692, 62, 298, 28338, 7, 28764, 11, 6167, 11, 7741, 11639, 23108, 11537, 198, 220, 220, 220, 2496, 796, 1312, 280, 13, 3605, 62, 9107, 418, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 1426, 62, 521, 82, 796, 357, 18242, 1875, 657, 737, 13159, 22570, 22446, 1177, 32590, 16, 8, 198, 220, 220, 220, 2496, 58, 1930, 62, 521, 82, 60, 796, 352, 13, 15, 198, 220, 220, 220, 11387, 796, 657, 13, 20, 198, 220, 220, 220, 3392, 62, 6551, 796, 1312, 280, 13, 3605, 62, 1952, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 1312, 280, 62, 43775, 62, 16, 796, 28034, 13, 3003, 7, 72, 280, 1875, 11387, 11, 352, 13, 15, 1343, 357, 72, 280, 532, 11387, 828, 3392, 62, 6551, 8, 198, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 2496, 1635, 1312, 280, 62, 43775, 62, 16, 198, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 8246, 796, 8246, 16, 1635, 1312, 280, 62, 43775, 198, 220, 220, 220, 611, 4646, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 28034, 13, 16345, 7, 1831, 1635, 3463, 38381, 14202, 60, 1220, 42781, 62, 31412, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8246, 1635, 3463, 1220, 42781, 62, 31412, 628, 198, 198, 4299, 1312, 280, 62, 27753, 62, 39491, 62, 19692, 62, 298, 28338, 7, 28764, 11, 6167, 11, 3463, 11, 1312, 280, 11, 2123, 64, 796, 352, 13, 20, 11, 42781, 62, 31412, 28, 14202, 11, 4646, 28, 17821, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 2747, 25, 11192, 273, 286, 5485, 357, 22510, 62, 1069, 12629, 11, 352, 8, 198, 220, 220, 220, 1058, 17143, 6167, 25, 11192, 273, 286, 5485, 357, 22510, 62, 1069, 12629, 11, 352, 8, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 22510, 62, 1069, 12629, 11, 352, 8, 198, 220, 220, 220, 1058, 17143, 1312, 280, 25, 11192, 273, 286, 5485, 357, 22510, 62, 1069, 12629, 828, 7268, 262, 1312, 280, 329, 477, 262, 842, 2790, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3967, 6096, 13, 198, 220, 220, 220, 1058, 17143, 2123, 64, 25, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 2747, 13, 27740, 3419, 14512, 6167, 13, 27740, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 11, 3463, 796, 4808, 11201, 392, 62, 39491, 62, 23912, 1424, 7, 18242, 11, 3463, 11, 2747, 13, 7857, 32590, 16, 4008, 198, 220, 220, 220, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 31412, 796, 3509, 7, 13165, 354, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 22784, 352, 2014, 628, 220, 220, 220, 8246, 16, 796, 376, 13, 39491, 62, 19692, 62, 298, 28338, 62, 4480, 62, 6404, 896, 7, 28764, 11, 6167, 13, 22468, 22784, 445, 8110, 11639, 23108, 11537, 628, 220, 220, 220, 2496, 796, 6167, 13, 3605, 62, 9107, 418, 7, 18242, 13, 7857, 28955, 198, 220, 220, 220, 1303, 2496, 62, 16, 796, 1312, 280, 13, 3605, 62, 9107, 418, 7, 72, 280, 13, 7857, 7, 15, 4008, 198, 220, 220, 220, 1303, 262, 835, 284, 651, 262, 39199, 286, 3967, 1672, 743, 307, 2642, 26, 318, 340, 1319, 432, 30, 198, 220, 220, 220, 1303, 1426, 62, 521, 82, 62, 16, 796, 6167, 1875, 657, 198, 220, 220, 220, 1303, 2496, 62, 16, 58, 1930, 62, 521, 82, 62, 16, 60, 796, 352, 198, 220, 220, 220, 1303, 13096, 262, 835, 284, 651, 262, 39199, 198, 220, 220, 220, 1303, 6167, 62, 16485, 1453, 2736, 796, 28034, 13, 16485, 1453, 2736, 7, 18242, 8, 198, 220, 220, 220, 1303, 1426, 62, 521, 82, 796, 357, 18242, 1875, 657, 737, 13159, 22570, 22446, 1177, 32590, 16, 8, 198, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 6167, 318, 46083, 6167, 13, 7857, 28955, 198, 220, 220, 220, 1426, 62, 521, 82, 796, 357, 18242, 1875, 657, 737, 13159, 22570, 3419, 198, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 6167, 62, 16485, 1453, 2736, 318, 46083, 6167, 62, 16485, 1453, 2736, 13, 7857, 28955, 198, 220, 220, 220, 2496, 58, 1930, 62, 521, 82, 60, 796, 352, 628, 220, 220, 220, 1303, 3601, 10786, 1169, 997, 286, 3967, 6096, 318, 3256, 28034, 13, 16345, 7, 16793, 4008, 198, 220, 220, 220, 1303, 3601, 10786, 1169, 997, 286, 3967, 6096, 329, 2496, 62, 16, 318, 3256, 28034, 13, 16345, 7, 16793, 62, 16, 4008, 198, 220, 220, 220, 3487, 1634, 796, 6407, 198, 220, 220, 220, 611, 3487, 1634, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 796, 2496, 13, 4906, 62, 292, 7, 28764, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 796, 1312, 280, 13, 13271, 421, 1453, 2736, 32590, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 2496, 318, 46083, 2496, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 1312, 280, 318, 46083, 1312, 280, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 1312, 280, 62, 16, 318, 46083, 1312, 280, 62, 16, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 1312, 280, 62, 43775, 318, 46083, 1312, 280, 62, 43775, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1169, 2546, 286, 8246, 16, 318, 46083, 8246, 16, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1312, 280, 62, 43775, 13, 13271, 421, 1453, 2736, 7, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 39279, 284, 1394, 262, 2160, 286, 2994, 329, 3967, 6096, 21588, 26, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 17, 796, 8246, 16, 1635, 1312, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 3487, 7509, 796, 357, 1831, 16, 1635, 2496, 737, 16345, 3419, 1220, 14808, 1831, 17, 1635, 2496, 737, 16345, 3419, 1343, 352, 68, 12, 21, 8, 198, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 8, 1635, 3487, 7509, 198, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 39279, 62, 72, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 1635, 39279, 62, 72, 280, 62, 43775, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 796, 2496, 13, 4906, 62, 292, 7, 28764, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 62, 1930, 796, 352, 13, 23, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 737, 79, 322, 7, 17167, 8, 1635, 3463, 62, 1930, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 8246, 16, 1635, 1312, 280, 62, 43775, 628, 220, 220, 220, 611, 4646, 25, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 28034, 13, 16345, 7, 1831, 1635, 3463, 38381, 14202, 60, 1220, 42781, 62, 31412, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 8246, 1635, 3463, 1220, 42781, 62, 31412, 628, 220, 220, 220, 1303, 1441, 376, 13, 39491, 62, 19692, 62, 298, 28338, 62, 4480, 62, 6404, 896, 7, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2747, 11, 6167, 13, 22468, 22784, 3463, 13, 22468, 22784, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 7741, 11639, 16345, 11537, 58, 14202, 60, 1220, 42781, 62, 31412, 628, 628, 628, 198, 2, 29454, 422, 262, 6770, 286, 3463, 287, 2393, 18021, 62, 16793, 13, 9078, 11, 198, 2, 477, 262, 4847, 286, 11192, 273, 705, 6551, 6, 389, 352, 13, 628, 198, 2, 2087, 416, 1375, 782, 32765, 18027, 198, 2, 383, 25397, 2994, 318, 691, 29231, 329, 4633, 6096, 11, 290, 262, 3210, 13934, 3272, 198, 2, 40709, 2994, 318, 29231, 329, 262, 3967, 6096, 13, 770, 318, 3562, 284, 9161, 198, 2, 1771, 1327, 1672, 9691, 329, 3967, 6096, 318, 13205, 329, 262, 2854, 13, 628, 198, 198, 4299, 26356, 62, 82, 17225, 1868, 62, 69, 4374, 62, 22462, 7, 28764, 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, 2496, 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, 3463, 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, 34236, 28, 17, 13, 15, 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, 17130, 28, 15, 13, 1495, 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, 42781, 62, 31412, 28, 14202, 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, 997, 62, 37724, 28, 1795, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3465, 326, 198, 220, 220, 220, 1058, 17143, 2747, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 8, 198, 220, 220, 220, 1058, 17143, 2496, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 828, 691, 262, 5002, 329, 262, 198, 220, 220, 220, 220, 220, 220, 220, 3967, 14722, 389, 352, 13, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 828, 352, 329, 1426, 290, 2469, 11, 657, 329, 262, 1854, 198, 220, 220, 220, 1058, 17143, 34236, 25, 198, 220, 220, 220, 1058, 17143, 17130, 25, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 17143, 997, 62, 37724, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 31412, 796, 28034, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 3419, 1220, 997, 62, 37724, 1343, 352, 68, 12, 21, 628, 220, 220, 220, 1441, 12972, 62, 82, 17225, 1868, 62, 69, 4374, 62, 22462, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 11, 2496, 11, 3463, 11, 34236, 28, 28483, 2611, 11, 17130, 28, 26591, 11, 198, 220, 220, 220, 220, 220, 220, 220, 7741, 11639, 16345, 11537, 58, 14202, 60, 1220, 42781, 62, 31412, 198, 198, 2, 2087, 416, 1375, 782, 32765, 18027, 198, 2, 1312, 280, 12, 27753, 17923, 2994, 318, 3562, 284, 12160, 262, 16096, 1022, 1398, 811, 4548, 261, 290, 198, 2, 42842, 4876, 13, 383, 3061, 318, 284, 787, 326, 262, 4886, 507, 351, 1029, 314, 2606, 351, 262, 2323, 3872, 10559, 635, 423, 198, 2, 1029, 17923, 8198, 13, 198, 4299, 1312, 280, 62, 27753, 62, 82, 17225, 1868, 62, 69, 4374, 62, 22462, 7, 28764, 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, 2496, 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, 3463, 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, 1312, 280, 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, 34236, 28, 17, 13, 15, 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, 17130, 28, 15, 13, 1495, 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, 2123, 64, 28, 16, 13, 20, 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, 42781, 62, 31412, 28, 14202, 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, 997, 62, 37724, 28, 1795, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 2747, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 8, 198, 220, 220, 220, 1058, 17143, 2496, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 828, 691, 262, 3967, 6167, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8686, 352, 11, 657, 329, 1854, 13, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 997, 62, 4871, 828, 352, 329, 1426, 290, 2469, 11, 657, 329, 262, 1854, 13, 198, 220, 220, 220, 1058, 17143, 1312, 280, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 828, 3650, 262, 1312, 280, 1022, 11001, 10559, 290, 663, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11188, 2323, 3872, 10559, 329, 262, 38548, 290, 262, 1312, 280, 1022, 262, 11001, 10559, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43360, 329, 42510, 13, 198, 220, 220, 220, 1058, 17143, 34236, 25, 198, 220, 220, 220, 1058, 17143, 17130, 25, 198, 220, 220, 220, 1058, 17143, 2123, 64, 25, 1630, 262, 22711, 329, 262, 38548, 286, 1877, 1312, 280, 13, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 997, 62, 24561, 62, 82, 12629, 13, 1002, 6045, 11, 198, 220, 220, 220, 1058, 17143, 997, 62, 37724, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 42781, 62, 31412, 796, 28034, 13, 16345, 7, 16793, 737, 22468, 22446, 9186, 3419, 1343, 352, 68, 12, 21, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 779, 62, 26069, 62, 400, 81, 796, 6407, 198, 220, 220, 220, 1303, 2747, 62, 82, 17225, 1868, 796, 2747, 13, 82, 17225, 1868, 3419, 198, 220, 220, 220, 2496, 796, 2496, 13, 4906, 62, 292, 7, 28764, 8, 628, 220, 220, 220, 2994, 16, 796, 12972, 62, 82, 17225, 1868, 62, 69, 4374, 62, 22462, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 11, 2496, 11, 3463, 11, 34236, 28, 28483, 2611, 11, 17130, 28, 26591, 11, 198, 220, 220, 220, 220, 220, 220, 220, 7741, 11639, 23108, 11537, 628, 220, 220, 220, 27853, 52, 62, 27753, 62, 2601, 82, 796, 6407, 198, 220, 220, 220, 11387, 796, 657, 13, 20, 198, 220, 220, 220, 611, 27853, 52, 62, 27753, 62, 2601, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 24061, 262, 39279, 19590, 523, 326, 262, 2994, 4635, 416, 262, 3967, 6096, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1595, 470, 1487, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 11201, 12249, 796, 1312, 280, 13, 1177, 32590, 16, 11, 352, 737, 11201, 392, 32590, 16, 11, 2496, 13, 7857, 3419, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 62, 11201, 12249, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2994, 17, 796, 2994, 16, 9, 72, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 3487, 7509, 796, 357, 22462, 16, 9, 16793, 737, 16345, 3419, 14, 19510, 22462, 17, 9, 16793, 737, 16345, 3419, 10, 16, 68, 12, 21, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3487, 7509, 796, 362, 13, 16, 198, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 357, 16, 12, 16793, 8, 1343, 357, 16793, 9, 72, 280, 62, 11201, 12249, 737, 79, 322, 7, 17167, 27493, 11265, 7509, 198, 220, 220, 220, 220, 220, 220, 220, 39279, 62, 72, 280, 62, 43775, 796, 39279, 62, 72, 280, 62, 43775, 13, 15255, 620, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 2994, 796, 2994, 16, 9, 11265, 1143, 62, 72, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 9288, 11537, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6414, 2994, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 11201, 12249, 796, 1312, 280, 13, 1177, 32590, 16, 11, 352, 737, 11201, 392, 32590, 16, 11, 2496, 13, 7857, 3419, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 3392, 62, 6551, 796, 1312, 280, 62, 11201, 12249, 13, 3605, 62, 1952, 7, 72, 280, 62, 11201, 12249, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3601, 10786, 1952, 62, 6551, 13, 7857, 3419, 318, 46083, 3392, 62, 6551, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 62, 16, 796, 28034, 13, 3003, 7, 72, 280, 62, 11201, 12249, 1875, 11387, 11, 352, 13, 15, 1343, 357, 72, 280, 62, 11201, 12249, 532, 11387, 828, 3392, 62, 6551, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 357, 16793, 1635, 1312, 280, 62, 43775, 62, 16, 737, 79, 322, 7, 17167, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 357, 16, 532, 2496, 8, 1343, 2496, 1635, 1312, 280, 62, 43775, 62, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 62, 43775, 796, 1312, 280, 62, 43775, 13, 15255, 620, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2994, 796, 2994, 16, 1635, 1312, 280, 62, 43775, 198, 220, 220, 220, 220, 220, 220, 220, 5236, 62, 31412, 796, 657, 13, 21, 198, 220, 220, 220, 220, 220, 220, 220, 2994, 796, 2994, 16, 9, 20427, 62, 31412, 1343, 2994, 16, 1635, 1312, 280, 62, 43775, 9, 7, 16, 12, 20427, 62, 31412, 8, 628, 198, 220, 220, 220, 1441, 28034, 13, 16345, 7, 22462, 38381, 14202, 60, 1220, 42781, 62, 31412, 628, 198, 198, 2, 29454, 422, 262, 6770, 286, 3463, 287, 2393, 18021, 62, 16793, 13, 9078, 11, 198, 2, 262, 4847, 286, 11192, 273, 705, 6551, 6, 329, 3967, 11628, 389, 530, 13, 628, 198, 2, 2087, 416, 1375, 782, 32765, 18027, 198, 2, 3494, 262, 25397, 2994, 329, 42842, 4876, 13, 198, 4299, 26356, 62, 72, 280, 62, 27753, 62, 5796, 5226, 75, 16, 7, 28764, 11, 2496, 11, 1312, 280, 11, 3463, 11, 12159, 28, 16, 13, 15, 11, 25979, 28, 16, 13, 20, 11, 42781, 62, 31412, 28, 14202, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 2747, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 604, 8, 393, 357, 43501, 9, 22510, 62, 1930, 11, 604, 8, 198, 220, 220, 220, 1058, 17143, 2496, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 604, 828, 3650, 262, 5772, 316, 380, 8863, 22715, 286, 2496, 10559, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 262, 3967, 43360, 290, 584, 3815, 389, 900, 284, 307, 657, 13, 1471, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 1930, 11, 604, 8, 198, 220, 220, 220, 1058, 17143, 1312, 280, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 8, 5574, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 1930, 828, 3650, 262, 1312, 280, 1022, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11001, 10559, 290, 663, 11188, 2323, 35310, 10559, 329, 262, 38548, 290, 262, 1312, 280, 1022, 262, 11001, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10559, 290, 43360, 329, 42510, 13, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 11, 604, 828, 691, 262, 19590, 329, 3967, 43360, 389, 900, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 307, 352, 290, 584, 3815, 389, 900, 284, 307, 657, 13, 1471, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 1930, 11, 604, 828, 477, 262, 4847, 389, 352, 13, 198, 220, 220, 220, 1058, 17143, 12159, 25, 198, 220, 220, 220, 1058, 17143, 25979, 25, 1630, 262, 22711, 329, 262, 41528, 3183, 13, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 262, 2747, 290, 2496, 389, 14434, 284, 2939, 7386, 290, 7997, 416, 1353, 12, 9464, 290, 4220, 12, 3506, 14371, 13, 198, 220, 220, 220, 6818, 2747, 13, 7857, 3419, 6624, 2496, 13, 7857, 3419, 290, 2496, 13, 22510, 417, 3419, 1875, 657, 198, 220, 220, 220, 1303, 8856, 262, 3967, 6096, 286, 543, 262, 1312, 280, 706, 20683, 318, 4833, 198, 220, 220, 220, 1303, 621, 657, 13, 20, 26, 198, 220, 220, 220, 8856, 62, 448, 75, 3183, 796, 10352, 198, 220, 220, 220, 1312, 280, 62, 400, 10126, 796, 657, 13, 20, 198, 220, 220, 220, 611, 8856, 62, 448, 75, 3183, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8106, 796, 1312, 280, 13, 3605, 62, 9107, 418, 7, 72, 280, 13, 7857, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 8106, 62, 2302, 437, 796, 8106, 13, 1177, 32590, 16, 11, 352, 737, 11201, 392, 32590, 16, 11, 604, 8, 198, 220, 220, 220, 220, 220, 220, 220, 773, 796, 357, 72, 280, 18189, 1312, 280, 62, 400, 10126, 737, 13159, 22570, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8106, 58, 521, 60, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 280, 796, 1312, 280, 1635, 8106, 628, 220, 220, 220, 1312, 280, 62, 11201, 12249, 796, 1312, 280, 13, 1177, 32590, 16, 11, 352, 737, 11201, 392, 32590, 16, 11, 604, 8, 628, 220, 220, 220, 1312, 280, 62, 6551, 796, 3463, 1635, 1312, 280, 62, 11201, 12249, 13, 79, 322, 7, 67, 12514, 8, 198, 220, 220, 220, 1312, 280, 62, 6551, 796, 1312, 280, 62, 6551, 13, 15255, 620, 3419, 628, 198, 220, 220, 220, 611, 42781, 62, 31412, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 31412, 796, 28034, 13, 16345, 7, 6551, 1875, 657, 737, 22468, 22446, 9186, 3419, 1220, 604, 1343, 352, 68, 12, 21, 628, 220, 220, 220, 2994, 16, 796, 7209, 62, 75, 16, 62, 22462, 7, 28764, 11, 2496, 11, 12159, 11, 7741, 11639, 23108, 11537, 198, 220, 220, 220, 2994, 17, 796, 2994, 16, 9, 72, 280, 62, 6551, 198, 220, 220, 220, 1303, 2994, 17, 796, 2994, 16, 1635, 24455, 62, 2302, 437, 628, 220, 220, 220, 1441, 28034, 13, 16345, 7, 22462, 17, 38381, 14202, 60, 1220, 42781, 62, 31412, 198, 198, 4299, 26356, 62, 72, 280, 62, 2301, 2234, 62, 22462, 7, 72, 280, 62, 28764, 11, 1312, 280, 62, 16793, 11, 3463, 11, 42781, 62, 31412, 28, 14202, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 1312, 280, 62, 28764, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 8, 393, 357, 43501, 9, 22510, 62, 1930, 8, 198, 220, 220, 220, 1058, 17143, 1312, 280, 62, 16793, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 8, 5574, 11192, 273, 286, 5485, 357, 43501, 9, 22510, 62, 1930, 828, 3650, 262, 1312, 280, 1022, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11001, 10559, 290, 663, 11188, 2323, 35310, 10559, 329, 262, 38548, 290, 262, 1312, 280, 1022, 262, 11001, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10559, 290, 43360, 329, 42510, 13, 198, 220, 220, 220, 1058, 17143, 3463, 25, 11192, 273, 286, 5485, 357, 43501, 9, 32, 9, 10394, 9, 17015, 8, 393, 357, 43501, 9, 22510, 62, 1930, 828, 352, 329, 38548, 290, 657, 329, 42510, 290, 22190, 30691, 13, 198, 220, 220, 220, 1058, 17143, 42781, 62, 31412, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 1312, 280, 62, 28764, 62, 82, 17225, 1868, 796, 1312, 280, 62, 28764, 13, 82, 17225, 1868, 3419, 198, 220, 220, 220, 1303, 1312, 280, 62, 16793, 796, 1312, 280, 62, 16793, 13, 15255, 620, 3419, 628, 220, 220, 220, 1303, 406, 17, 2994, 13, 198, 220, 220, 220, 1303, 2994, 796, 28034, 13, 79, 322, 19510, 72, 280, 62, 28764, 62, 82, 17225, 1868, 532, 1312, 280, 62, 16793, 828, 362, 27493, 6551, 628, 220, 220, 220, 1303, 45755, 3272, 12, 298, 28338, 2994, 329, 262, 3967, 6096, 198, 220, 220, 220, 2994, 796, 376, 13, 39491, 62, 19692, 62, 298, 28338, 62, 4480, 62, 6404, 896, 7, 72, 280, 62, 28764, 11, 1312, 280, 62, 16793, 11, 7741, 11639, 23108, 11537, 9, 3463, 628, 220, 220, 220, 1441, 28034, 13, 16345, 7, 22462, 38381, 14202, 60, 1220, 42781, 62, 31412, 628, 198, 198, 4299, 49948, 62, 72, 280, 62, 22462, 7, 28764, 11, 2496, 11, 12159, 28, 15, 13, 17, 11, 304, 862, 28, 16, 68, 12, 18, 11, 7741, 11639, 32604, 6, 2599, 198, 220, 220, 220, 37227, 23028, 1075, 9515, 10714, 1634, 351, 34545, 399, 5653, 290, 347, 6302, 27853, 52, 22014, 11, 198, 220, 220, 220, 3740, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 1558, 1157, 13, 405, 23237, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 357, 83, 22854, 2599, 14322, 5722, 275, 29305, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 357, 83, 22854, 2599, 12744, 275, 29305, 13, 198, 220, 220, 220, 220, 220, 220, 220, 12159, 357, 22468, 2599, 12159, 11507, 287, 7209, 75, 16, 13, 198, 220, 220, 220, 220, 220, 220, 220, 304, 862, 357, 22468, 2599, 304, 862, 284, 3368, 11013, 45, 13, 198, 220, 220, 220, 220, 220, 220, 220, 7741, 357, 2536, 2599, 33396, 2099, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2747, 62, 24087, 87, 796, 357, 28764, 58, 45299, 657, 60, 1343, 2747, 58, 45299, 362, 12962, 1635, 657, 13, 20, 198, 220, 220, 220, 2747, 62, 310, 563, 796, 357, 28764, 58, 45299, 352, 60, 1343, 2747, 58, 45299, 513, 12962, 1635, 657, 13, 20, 198, 220, 220, 220, 2747, 62, 86, 796, 2747, 58, 45299, 362, 60, 532, 2747, 58, 45299, 657, 60, 1343, 352, 198, 220, 220, 220, 2747, 62, 71, 796, 2747, 58, 45299, 513, 60, 532, 2747, 58, 45299, 352, 60, 1343, 352, 198, 220, 220, 220, 351, 28034, 13, 3919, 62, 9744, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 24087, 87, 796, 357, 16793, 58, 45299, 657, 60, 1343, 2496, 58, 45299, 362, 12962, 1635, 657, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 310, 563, 796, 357, 16793, 58, 45299, 352, 60, 1343, 2496, 58, 45299, 513, 12962, 1635, 657, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 86, 796, 2496, 58, 45299, 362, 60, 532, 2496, 58, 45299, 657, 60, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 71, 796, 2496, 58, 45299, 513, 60, 532, 2496, 58, 45299, 352, 60, 1343, 352, 628, 220, 220, 220, 44332, 796, 2496, 62, 24087, 87, 532, 2747, 62, 24087, 87, 198, 220, 220, 220, 20268, 796, 2496, 62, 310, 563, 532, 2747, 62, 310, 563, 628, 220, 220, 220, 2994, 62, 34350, 796, 352, 532, 28034, 13, 9806, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 16793, 62, 86, 532, 362, 1635, 44332, 13, 8937, 28955, 1220, 198, 220, 220, 220, 220, 220, 220, 220, 357, 16793, 62, 86, 1343, 362, 1635, 44332, 13, 8937, 3419, 1343, 304, 862, 828, 28034, 13, 9107, 418, 62, 2339, 7, 34350, 4008, 198, 220, 220, 220, 2994, 62, 9892, 796, 352, 532, 28034, 13, 9806, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 16793, 62, 71, 532, 362, 1635, 20268, 13, 8937, 28955, 1220, 198, 220, 220, 220, 220, 220, 220, 220, 357, 16793, 62, 71, 1343, 362, 1635, 20268, 13, 8937, 3419, 1343, 304, 862, 828, 28034, 13, 9107, 418, 62, 2339, 7, 9892, 4008, 198, 220, 220, 220, 2994, 62, 67, 86, 796, 352, 532, 28034, 13, 1084, 7, 16793, 62, 86, 1220, 357, 28764, 62, 86, 1343, 304, 862, 828, 2747, 62, 86, 1220, 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, 357, 16793, 62, 86, 1343, 304, 862, 4008, 198, 220, 220, 220, 2994, 62, 34985, 796, 352, 532, 28034, 13, 1084, 7, 16793, 62, 71, 1220, 357, 28764, 62, 71, 1343, 304, 862, 828, 2747, 62, 71, 1220, 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, 357, 16793, 62, 71, 1343, 304, 862, 4008, 198, 220, 220, 220, 2994, 62, 24011, 796, 28034, 13, 25558, 26933, 22462, 62, 34350, 11, 2994, 62, 9892, 11, 2994, 62, 67, 86, 11, 2994, 62, 34985, 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, 220, 5391, 10779, 16, 737, 1177, 7, 22462, 62, 34350, 13, 7857, 7, 15, 828, 532, 16, 8, 628, 220, 220, 220, 2994, 796, 28034, 13, 3003, 7, 22462, 62, 24011, 1279, 12159, 11, 657, 13, 20, 1635, 2994, 62, 24011, 1635, 2994, 62, 24011, 1220, 12159, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2994, 62, 24011, 532, 657, 13, 20, 1635, 12159, 8, 198, 220, 220, 220, 7741, 62, 44709, 796, 376, 13557, 7738, 8110, 13, 1136, 62, 44709, 7, 445, 8110, 8, 198, 220, 220, 220, 1303, 4844, 25, 657, 11, 1612, 25, 16, 11, 2160, 25, 362, 198, 220, 220, 220, 611, 7741, 62, 44709, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2994, 198, 220, 220, 220, 1288, 361, 7741, 62, 44709, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2994, 13, 16345, 3419, 1220, 2747, 13, 22510, 417, 3419, 198, 220, 220, 220, 1288, 361, 7741, 62, 44709, 6624, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2994, 13, 16345, 3419, 628, 198, 198, 4299, 9922, 7, 28764, 11, 2496, 11, 1353, 74, 28, 16, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 2747, 25, 357, 43501, 9, 22510, 62, 39873, 11, 327, 8, 198, 220, 220, 220, 1058, 17143, 2496, 25, 357, 43501, 9, 22510, 62, 39873, 8, 198, 220, 220, 220, 1058, 17143, 1353, 74, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 611, 318, 39098, 7, 4852, 74, 11, 493, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1353, 74, 796, 357, 4852, 74, 11, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 62, 29762, 796, 6407, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 62, 29762, 796, 10352, 628, 220, 220, 220, 3509, 74, 796, 3509, 7, 4852, 74, 8, 198, 220, 220, 220, 4808, 11, 2747, 62, 18242, 796, 2747, 13, 4852, 74, 7, 9806, 74, 11, 352, 11, 6407, 11, 6407, 8, 1303, 357, 43501, 9, 22510, 62, 39873, 11, 352, 8, 198, 220, 220, 220, 2747, 62, 18242, 796, 2747, 62, 18242, 13, 83, 3419, 1303, 357, 16, 11, 15458, 9, 22510, 62, 39873, 8, 198, 220, 220, 220, 3376, 796, 2747, 62, 18242, 13, 27363, 7, 16793, 13, 1177, 7, 16, 11, 532, 16, 737, 11201, 392, 62, 292, 7, 28764, 62, 18242, 4008, 1303, 357, 16, 11, 15458, 9, 22510, 62, 39873, 8, 628, 220, 220, 220, 581, 796, 17635, 198, 220, 220, 220, 329, 479, 287, 1353, 74, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3376, 62, 74, 796, 3376, 58, 25, 74, 4083, 1177, 32590, 16, 737, 22468, 22446, 16345, 7, 15, 11, 1394, 27740, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 581, 13, 33295, 7, 30283, 62, 74, 13, 76, 377, 41052, 3064, 13, 15, 1220, 2747, 13, 7857, 7, 15, 22305, 198, 220, 220, 220, 1441, 581, 58, 15, 60, 611, 1441, 62, 29762, 2073, 581, 628, 198 ]
2.372826
7,588