content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json colours = json.loads(open("theme/default.json").read())
[ 11748, 33918, 198, 198, 4033, 4662, 796, 33918, 13, 46030, 7, 9654, 7203, 43810, 14, 12286, 13, 17752, 11074, 961, 28955 ]
3.238095
21
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import multiprocessing import os import random import time from enum import Enum import numpy as np from PIL import Image from settings import default_sim_settings, make_cfg import habitat_sim import habitat_sim.agent import habitat_sim.bindings as hsim from habitat_sim.physics import MotionType from habitat_sim.utils.common import ( d3_40_colors_rgb, download_and_unzip, quat_from_angle_axis, ) _barrier = None
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 628, 198, 11748, 10688, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 640, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 6460, 1330, 4277, 62, 14323, 62, 33692, 11, 787, 62, 37581, 198, 198, 11748, 20018, 62, 14323, 198, 11748, 20018, 62, 14323, 13, 25781, 198, 11748, 20018, 62, 14323, 13, 21653, 654, 355, 289, 14323, 198, 6738, 20018, 62, 14323, 13, 746, 23154, 1330, 20843, 6030, 198, 6738, 20018, 62, 14323, 13, 26791, 13, 11321, 1330, 357, 198, 220, 220, 220, 288, 18, 62, 1821, 62, 4033, 669, 62, 81, 22296, 11, 198, 220, 220, 220, 4321, 62, 392, 62, 403, 13344, 11, 198, 220, 220, 220, 627, 265, 62, 6738, 62, 9248, 62, 22704, 11, 198, 8, 198, 198, 62, 5657, 5277, 796, 6045, 628, 198 ]
3.297872
188
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 17 15:05:43 2020 @author: lihaoyang03 """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2365, 1596, 1315, 25, 2713, 25, 3559, 12131, 198, 198, 31, 9800, 25, 7649, 3099, 726, 648, 3070, 198, 37811, 628, 198, 220, 220, 220, 220, 198 ]
2.142857
56
import sys import time import random from sync_utils import Thread, Semaphore, Barrier, watch SANTA = Semaphore(0) NUM_DEERS = 0 DEER_MUTEX = Semaphore(1) SLEDGE = Semaphore(0) SLEDGE_READY = Semaphore(0) BARRIER = Barrier(9) NUM_ELVES = 0 ELF_MUTEX = Semaphore(1) ELF_MULTIPLEX = Semaphore(3) HELP = Semaphore(0) watch(main)
[ 11748, 25064, 198, 11748, 640, 198, 11748, 4738, 198, 6738, 17510, 62, 26791, 1330, 14122, 11, 12449, 6570, 382, 11, 32804, 11, 2342, 628, 198, 36753, 5603, 796, 12449, 6570, 382, 7, 15, 8, 198, 198, 41359, 62, 7206, 4877, 796, 657, 198, 7206, 1137, 62, 44, 3843, 6369, 796, 12449, 6570, 382, 7, 16, 8, 198, 8634, 1961, 8264, 796, 12449, 6570, 382, 7, 15, 8, 198, 8634, 1961, 8264, 62, 15675, 56, 796, 12449, 6570, 382, 7, 15, 8, 198, 33, 1503, 7112, 1137, 796, 32804, 7, 24, 8, 198, 198, 41359, 62, 3698, 53, 1546, 796, 657, 198, 37738, 62, 44, 3843, 6369, 796, 12449, 6570, 382, 7, 16, 8, 198, 37738, 62, 44, 16724, 4061, 2538, 55, 796, 12449, 6570, 382, 7, 18, 8, 198, 39, 3698, 47, 796, 12449, 6570, 382, 7, 15, 8, 628, 628, 628, 198, 8340, 7, 12417, 8, 198 ]
2.27027
148
import pandas as pd import numpy as np
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198 ]
3
13
#!/usr/bin/python import argparse import dns.resolver import dns.query import dns.zone import os import sys from multiprocessing import Pool INPUTFILE = sys.stdin OUTPUTFILE = sys.stdout LOGFILE = sys.stderr PROCESSES = 20 if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1822, 29572, 198, 11748, 288, 5907, 13, 411, 14375, 198, 11748, 288, 5907, 13, 22766, 198, 11748, 288, 5907, 13, 11340, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 1268, 30076, 25664, 796, 25064, 13, 19282, 259, 198, 2606, 7250, 3843, 25664, 796, 25064, 13, 19282, 448, 198, 25294, 25664, 796, 25064, 13, 301, 1082, 81, 198, 4805, 4503, 7597, 1546, 796, 1160, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 1388, 3419, 198 ]
2.673469
98
"""Script to convert non-jpgs in a folder to jpg""" import os from pathlib import Path from PIL import Image from glob import glob from tqdm import tqdm from shutil import move cwd = Path.cwd() DATA_DIR = cwd.parent / 'data' / 'stanford-car-dataset-by-classes-folder' / 'car_data' / 'new_data' if __name__ == '__main__': convert_png_to_jpg()
[ 37811, 7391, 284, 10385, 1729, 12, 9479, 82, 287, 257, 9483, 284, 474, 6024, 37811, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 15095, 1330, 15095, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 4423, 346, 1330, 1445, 628, 198, 66, 16993, 796, 10644, 13, 66, 16993, 3419, 198, 26947, 62, 34720, 796, 269, 16993, 13, 8000, 1220, 705, 7890, 6, 1220, 705, 14192, 3841, 12, 7718, 12, 19608, 292, 316, 12, 1525, 12, 37724, 12, 43551, 6, 1220, 705, 7718, 62, 7890, 6, 1220, 705, 3605, 62, 7890, 6, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 10385, 62, 11134, 62, 1462, 62, 9479, 3419 ]
2.76378
127
import learnable_histogram import TauDataset import data_processing as dp import numpy as np import tensorflow as tf import losses import histogram import visualizer import CubeDataset from report import print_report, error_statistics mode = 'rb' # path = "/media/donik/Disk/intel_tau/paths_field.txt" # imgs = load_image_names(path, base_path='/media/donik/Disk/intel_tau') # count = len(imgs) # imgs_test = imgs[int(count * 0.9):] import CubeDataset from sklearn.model_selection import train_test_split path = "/media/donik/Slowpoke/fax/Cube+/paths.txt" paths = load_image_names(path, base_path="/media/donik/Slowpoke/fax/Cube+") _, paths = train_test_split(paths, train_size=0.8, random_state=69) gts = np.loadtxt("/media/donik/Slowpoke/fax/Cube+/cube+_gt.txt") indices = np.array(list(map(lambda x: int(x[x.rfind('/') + 1:-4]) - 1, paths))) ds = CubeDataset.regression_dataset(paths, indices, type=CubeDataset.TEST, bs=1, cache=False, uv=False, gts=gts) # ds = TauDataset.regression_dataset(imgs_test, dp.TEST, bs=1, uv=True) ds = ds.map(map_fn) model, hist = learnable_histogram.build_model(TauDataset.IMG_HEIGHT // 2, TauDataset.IMG_WIDTH // 2, 5, 256, range_init=(0, 1), w_init=1 / 64, out=2, activation='relu') # model, hist = learnable_histogram.build_simple_model(TauDataset.IMG_HEIGHT // 2, TauDataset.IMG_WIDTH // 2, 3, 64, # range_init=(-5, 5), w_init=1 / 32) checkpoint_path = f"/home/donik/Desktop/models/training_08_11/hist_simple_2_cube.ckpt" # checkpoint_path = f"/home/donik/Desktop/models/training_06_11/hist_simple_tau.ckpt" model.load_weights(checkpoint_path) learnable_histogram.plot_histogram(hist) coss = [] for img, mask in iter(ds): pred = model.predict(img) if mode == 'uv': pred_rgb = histogram.from_uv(pred) mask_rgb = histogram.from_uv(mask) else: pred_rgb = tf.stack([pred[..., 0], tf.ones_like(pred[..., 0]), pred[..., 1]], axis=-1) mask_rgb = tf.stack([mask[..., 0], tf.ones_like(mask[..., 0]), mask[..., 1]], axis=-1) mask_rgb = tf.cast(mask_rgb, dtype=float) cos = losses.cosine_similarity(pred_rgb, mask_rgb) * 180 / 3.14 coss.append(cos) print(cos) p = visualizer.create_mask(pred_rgb[0], (10, 10)) m = visualizer.create_mask(mask_rgb[0], (10, 10)) visualizer.visualize([m,p]) report = error_statistics(coss) print_report(report)
[ 11748, 2193, 540, 62, 10034, 21857, 198, 11748, 36849, 27354, 292, 316, 198, 11748, 1366, 62, 36948, 355, 288, 79, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 9089, 198, 11748, 1554, 21857, 198, 11748, 5874, 7509, 198, 11748, 23315, 27354, 292, 316, 198, 198, 6738, 989, 1330, 3601, 62, 13116, 11, 4049, 62, 14269, 3969, 628, 198, 14171, 796, 705, 26145, 6, 198, 198, 2, 3108, 796, 12813, 11431, 14, 9099, 1134, 14, 40961, 14, 48779, 62, 83, 559, 14, 6978, 82, 62, 3245, 13, 14116, 1, 198, 2, 545, 14542, 796, 3440, 62, 9060, 62, 14933, 7, 6978, 11, 2779, 62, 6978, 11639, 14, 11431, 14, 9099, 1134, 14, 40961, 14, 48779, 62, 83, 559, 11537, 198, 2, 954, 796, 18896, 7, 9600, 82, 8, 198, 2, 545, 14542, 62, 9288, 796, 545, 14542, 58, 600, 7, 9127, 1635, 657, 13, 24, 2599, 60, 198, 198, 11748, 23315, 27354, 292, 316, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 6978, 796, 12813, 11431, 14, 9099, 1134, 14, 36423, 35924, 14, 23560, 14, 29071, 10, 14, 6978, 82, 13, 14116, 1, 198, 6978, 82, 796, 3440, 62, 9060, 62, 14933, 7, 6978, 11, 2779, 62, 6978, 35922, 11431, 14, 9099, 1134, 14, 36423, 35924, 14, 23560, 14, 29071, 10, 4943, 198, 62, 11, 13532, 796, 4512, 62, 9288, 62, 35312, 7, 6978, 82, 11, 4512, 62, 7857, 28, 15, 13, 23, 11, 4738, 62, 5219, 28, 3388, 8, 198, 70, 912, 796, 45941, 13, 2220, 14116, 7203, 14, 11431, 14, 9099, 1134, 14, 36423, 35924, 14, 23560, 14, 29071, 10, 14, 40296, 10, 62, 13655, 13, 14116, 4943, 198, 198, 521, 1063, 796, 45941, 13, 18747, 7, 4868, 7, 8899, 7, 50033, 2124, 25, 493, 7, 87, 58, 87, 13, 81, 19796, 10786, 14, 11537, 1343, 352, 21912, 19, 12962, 532, 352, 11, 13532, 22305, 198, 9310, 796, 23315, 27354, 292, 316, 13, 2301, 2234, 62, 19608, 292, 316, 7, 6978, 82, 11, 36525, 11, 2099, 28, 29071, 27354, 292, 316, 13, 51, 6465, 11, 275, 82, 28, 16, 11, 12940, 28, 25101, 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, 334, 85, 28, 25101, 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, 308, 912, 28, 70, 912, 8, 198, 198, 2, 288, 82, 796, 36849, 27354, 292, 316, 13, 2301, 2234, 62, 19608, 292, 316, 7, 9600, 82, 62, 9288, 11, 288, 79, 13, 51, 6465, 11, 275, 82, 28, 16, 11, 334, 85, 28, 17821, 8, 198, 198, 9310, 796, 288, 82, 13, 8899, 7, 8899, 62, 22184, 8, 628, 198, 19849, 11, 1554, 796, 2193, 540, 62, 10034, 21857, 13, 11249, 62, 19849, 7, 51, 559, 27354, 292, 316, 13, 3955, 38, 62, 13909, 9947, 3373, 362, 11, 36849, 27354, 292, 316, 13, 3955, 38, 62, 54, 2389, 4221, 3373, 362, 11, 642, 11, 17759, 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, 2837, 62, 15003, 16193, 15, 11, 352, 828, 266, 62, 15003, 28, 16, 1220, 5598, 11, 503, 28, 17, 11, 14916, 11639, 260, 2290, 11537, 198, 198, 2, 2746, 11, 1554, 796, 2193, 540, 62, 10034, 21857, 13, 11249, 62, 36439, 62, 19849, 7, 51, 559, 27354, 292, 316, 13, 3955, 38, 62, 13909, 9947, 3373, 362, 11, 36849, 27354, 292, 316, 13, 3955, 38, 62, 54, 2389, 4221, 3373, 362, 11, 513, 11, 5598, 11, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2837, 62, 15003, 16193, 12, 20, 11, 642, 828, 266, 62, 15003, 28, 16, 1220, 3933, 8, 198, 198, 9122, 4122, 62, 6978, 796, 277, 1, 14, 11195, 14, 9099, 1134, 14, 36881, 14, 27530, 14, 34409, 62, 2919, 62, 1157, 14, 10034, 62, 36439, 62, 17, 62, 40296, 13, 694, 457, 1, 198, 2, 26954, 62, 6978, 796, 277, 1, 14, 11195, 14, 9099, 1134, 14, 36881, 14, 27530, 14, 34409, 62, 3312, 62, 1157, 14, 10034, 62, 36439, 62, 83, 559, 13, 694, 457, 1, 198, 198, 19849, 13, 2220, 62, 43775, 7, 9122, 4122, 62, 6978, 8, 198, 198, 35720, 540, 62, 10034, 21857, 13, 29487, 62, 10034, 21857, 7, 10034, 8, 628, 198, 66, 793, 796, 17635, 198, 1640, 33705, 11, 9335, 287, 11629, 7, 9310, 2599, 198, 220, 220, 220, 2747, 796, 2746, 13, 79, 17407, 7, 9600, 8, 628, 220, 220, 220, 611, 4235, 6624, 705, 14795, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 62, 81, 22296, 796, 1554, 21857, 13, 6738, 62, 14795, 7, 28764, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 62, 81, 22296, 796, 1554, 21857, 13, 6738, 62, 14795, 7, 27932, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2747, 62, 81, 22296, 796, 48700, 13, 25558, 26933, 28764, 58, 986, 11, 657, 4357, 48700, 13, 1952, 62, 2339, 7, 28764, 58, 986, 11, 657, 46570, 2747, 58, 986, 11, 352, 60, 4357, 16488, 10779, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9335, 62, 81, 22296, 796, 48700, 13, 25558, 26933, 27932, 58, 986, 11, 657, 4357, 48700, 13, 1952, 62, 2339, 7, 27932, 58, 986, 11, 657, 46570, 9335, 58, 986, 11, 352, 60, 4357, 16488, 10779, 16, 8, 198, 220, 220, 220, 9335, 62, 81, 22296, 796, 48700, 13, 2701, 7, 27932, 62, 81, 22296, 11, 288, 4906, 28, 22468, 8, 198, 220, 220, 220, 8615, 796, 9089, 13, 6966, 500, 62, 38610, 414, 7, 28764, 62, 81, 22296, 11, 9335, 62, 81, 22296, 8, 1635, 11546, 1220, 513, 13, 1415, 198, 220, 220, 220, 269, 793, 13, 33295, 7, 6966, 8, 198, 220, 220, 220, 3601, 7, 6966, 8, 628, 220, 220, 220, 279, 796, 5874, 7509, 13, 17953, 62, 27932, 7, 28764, 62, 81, 22296, 58, 15, 4357, 357, 940, 11, 838, 4008, 198, 220, 220, 220, 285, 796, 5874, 7509, 13, 17953, 62, 27932, 7, 27932, 62, 81, 22296, 58, 15, 4357, 357, 940, 11, 838, 4008, 198, 220, 220, 220, 5874, 7509, 13, 41464, 1096, 26933, 76, 11, 79, 12962, 198, 198, 13116, 796, 4049, 62, 14269, 3969, 7, 66, 793, 8, 198, 4798, 62, 13116, 7, 13116, 8 ]
2.142017
1,190
from .rotation import *
[ 6738, 764, 10599, 341, 1330, 1635 ]
3.833333
6
from output.models.nist_data.list_pkg.any_uri.schema_instance.nistschema_sv_iv_list_any_uri_max_length_3_xsd.nistschema_sv_iv_list_any_uri_max_length_3 import NistschemaSvIvListAnyUriMaxLength3 __all__ = [ "NistschemaSvIvListAnyUriMaxLength3", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 1092, 62, 9900, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 1092, 62, 9900, 62, 9806, 62, 13664, 62, 18, 62, 87, 21282, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 1092, 62, 9900, 62, 9806, 62, 13664, 62, 18, 1330, 399, 1023, 2395, 2611, 50, 85, 45766, 8053, 7149, 52, 380, 11518, 24539, 18, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 45, 1023, 2395, 2611, 50, 85, 45766, 8053, 7149, 52, 380, 11518, 24539, 18, 1600, 198, 60, 198 ]
2.241071
112
# -*- coding: utf-8 -*- import sys, time, random #FLASK from flask import Flask, request from flaskJSONRPCServer import flaskJSONRPCServer echo._alias='helloworld' #setting alias for method app=Flask(__name__) @app.route('/readpost', methods=['POST']) app2=Flask(__name__) @app2.route('/helloworld', methods=['GET']) @app2.route('/readpost', methods=['POST']) if __name__=='__main__': print 'Running api..' # Creating instance of server # <blocking> switch server to one-request-per-time mode # <cors> switch auto CORS support # <gevent> switch to patching process with Gevent # <debug> switch to logging connection's info from serv-backend # <log> set logging level (0-critical, 1-errors, 2-warnings, 3-info, 4-debug) # <fallback> switch auto fallback to JSONP on GET requests # <allowCompress> switch auto compression # <compressMinSize> set min limit for compression # <tweakDescriptors> set file-descriptor's limit for server (useful on high-load servers) # <jsonBackend> set JSON-backend. Auto fallback to native when problems # <notifBackend> set exec-backend for Notify-requests # <servBackend> set serving-backend ('pywsgi', 'werkzeug', 'wsgiex' or 'auto'). 'auto' is more preffered # <experimental> switch using of experimental perfomance-patches server=flaskJSONRPCServer(("0.0.0.0", 7001), blocking=False, cors=False, gevent=True, debug=False, log=3, fallback=True, allowCompress=False, jsonBackend='simplejson', notifBackend='simple', tweakDescriptors=[1000, 1000], servBackend='auto') # Register dispatchers for single functions server.registerFunction(echo, path='/api') server.registerFunction(stats, path='/api') # merge with Flask app server.postprocessAdd_wsgi(app, status=404) server.postprocessAdd_wsgi(fakeWSGI1, status=404) server.postprocessAdd_wsgi(fakeWSGI2, status=404) server.postprocessAdd_wsgi(app2, status=404) server.postprocessAdd_cb(ppCB1, status=404) # Run server server.serveForever() # Now you can access this api by path http://127.0.0.1:7001/api for JSON-RPC requests # Or by path http://127.0.0.1:7001/api/<method>?jsonp=<callback>&(params) for JSONP requests # For example by http://127.0.0.1:7001/api/echo?data=test_data&jsonp=jsonpCallback_129620
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 11, 640, 11, 4738, 198, 198, 2, 3697, 1921, 42, 198, 6738, 42903, 1330, 46947, 11, 2581, 198, 198, 6738, 42903, 40386, 49, 5662, 10697, 1330, 42903, 40386, 49, 5662, 10697, 198, 30328, 13557, 26011, 11639, 12758, 322, 1764, 6, 1303, 33990, 16144, 329, 2446, 198, 198, 1324, 28, 7414, 2093, 7, 834, 3672, 834, 8, 198, 31, 1324, 13, 38629, 10786, 14, 961, 7353, 3256, 5050, 28, 17816, 32782, 6, 12962, 198, 198, 1324, 17, 28, 7414, 2093, 7, 834, 3672, 834, 8, 198, 31, 1324, 17, 13, 38629, 10786, 14, 12758, 322, 1764, 3256, 5050, 28, 17816, 18851, 6, 12962, 198, 198, 31, 1324, 17, 13, 38629, 10786, 14, 961, 7353, 3256, 5050, 28, 17816, 32782, 6, 12962, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 3601, 705, 28768, 40391, 492, 6, 198, 220, 220, 1303, 30481, 4554, 286, 4382, 198, 220, 220, 1303, 220, 220, 220, 1279, 41938, 29, 220, 220, 220, 220, 220, 220, 220, 220, 5078, 4382, 284, 530, 12, 25927, 12, 525, 12, 2435, 4235, 198, 220, 220, 1303, 220, 220, 220, 1279, 66, 669, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5078, 8295, 327, 20673, 1104, 198, 220, 220, 1303, 220, 220, 220, 1279, 469, 1151, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5078, 284, 8529, 278, 1429, 351, 2269, 1151, 198, 220, 220, 1303, 220, 220, 220, 1279, 24442, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5078, 284, 18931, 4637, 338, 7508, 422, 1113, 12, 1891, 437, 198, 220, 220, 1303, 220, 220, 220, 1279, 6404, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 18931, 1241, 357, 15, 12, 34666, 11, 352, 12, 48277, 11, 362, 12, 40539, 654, 11, 513, 12, 10951, 11, 604, 12, 24442, 8, 198, 220, 220, 1303, 220, 220, 220, 1279, 7207, 1891, 29, 220, 220, 220, 220, 220, 220, 220, 220, 5078, 8295, 2121, 1891, 284, 19449, 47, 319, 17151, 7007, 198, 220, 220, 1303, 220, 220, 220, 1279, 12154, 7293, 601, 29, 220, 220, 220, 5078, 8295, 19794, 198, 220, 220, 1303, 220, 220, 220, 1279, 5589, 601, 9452, 10699, 29, 220, 900, 949, 4179, 329, 19794, 198, 220, 220, 1303, 220, 220, 220, 1279, 83, 38695, 24564, 1968, 669, 29, 900, 2393, 12, 20147, 1968, 273, 338, 4179, 329, 4382, 357, 1904, 913, 319, 1029, 12, 2220, 9597, 8, 198, 220, 220, 1303, 220, 220, 220, 1279, 17752, 7282, 437, 29, 220, 220, 220, 220, 220, 900, 19449, 12, 1891, 437, 13, 11160, 2121, 1891, 284, 6868, 618, 2761, 198, 220, 220, 1303, 220, 220, 220, 1279, 1662, 361, 7282, 437, 29, 220, 220, 220, 220, 900, 2452, 12, 1891, 437, 329, 1892, 1958, 12, 8897, 3558, 198, 220, 220, 1303, 220, 220, 220, 1279, 3168, 7282, 437, 29, 220, 220, 220, 220, 220, 900, 7351, 12, 1891, 437, 19203, 9078, 18504, 12397, 3256, 705, 86, 9587, 2736, 1018, 3256, 705, 18504, 22699, 87, 6, 393, 705, 23736, 27691, 705, 23736, 6, 318, 517, 662, 487, 1068, 198, 220, 220, 1303, 220, 220, 220, 1279, 23100, 9134, 29, 220, 220, 220, 220, 5078, 1262, 286, 11992, 23035, 296, 590, 12, 8071, 2052, 198, 220, 220, 4382, 28, 2704, 2093, 40386, 49, 5662, 10697, 7, 7203, 15, 13, 15, 13, 15, 13, 15, 1600, 767, 8298, 828, 12013, 28, 25101, 11, 269, 669, 28, 25101, 11, 4903, 1151, 28, 17821, 11, 14257, 28, 25101, 11, 2604, 28, 18, 11, 2121, 1891, 28, 17821, 11, 1249, 7293, 601, 28, 25101, 11, 33918, 7282, 437, 11639, 36439, 17752, 3256, 407, 361, 7282, 437, 11639, 36439, 3256, 25393, 24564, 1968, 669, 41888, 12825, 11, 8576, 4357, 1113, 7282, 437, 11639, 23736, 11537, 198, 220, 220, 1303, 17296, 4596, 265, 3533, 329, 2060, 5499, 198, 220, 220, 4382, 13, 30238, 22203, 7, 30328, 11, 3108, 11639, 14, 15042, 11537, 198, 220, 220, 4382, 13, 30238, 22203, 7, 34242, 11, 3108, 11639, 14, 15042, 11537, 198, 220, 220, 1303, 20121, 351, 46947, 598, 198, 220, 220, 4382, 13, 7353, 14681, 4550, 62, 18504, 12397, 7, 1324, 11, 3722, 28, 26429, 8, 198, 220, 220, 4382, 13, 7353, 14681, 4550, 62, 18504, 12397, 7, 30706, 19416, 18878, 16, 11, 3722, 28, 26429, 8, 198, 220, 220, 4382, 13, 7353, 14681, 4550, 62, 18504, 12397, 7, 30706, 19416, 18878, 17, 11, 3722, 28, 26429, 8, 198, 220, 220, 4382, 13, 7353, 14681, 4550, 62, 18504, 12397, 7, 1324, 17, 11, 3722, 28, 26429, 8, 198, 220, 220, 4382, 13, 7353, 14681, 4550, 62, 21101, 7, 381, 23199, 16, 11, 3722, 28, 26429, 8, 198, 220, 220, 1303, 5660, 4382, 198, 220, 220, 4382, 13, 2655, 303, 16351, 332, 3419, 198, 220, 220, 1303, 2735, 345, 460, 1895, 428, 40391, 416, 3108, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 22, 8298, 14, 15042, 329, 19449, 12, 49, 5662, 7007, 198, 220, 220, 1303, 1471, 416, 3108, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 22, 8298, 14, 15042, 14, 27, 24396, 29, 30, 17752, 79, 28, 27, 47423, 29, 5, 7, 37266, 8, 329, 19449, 47, 7007, 198, 220, 220, 1303, 220, 220, 220, 1114, 1672, 416, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 22, 8298, 14, 15042, 14, 30328, 30, 7890, 28, 9288, 62, 7890, 5, 17752, 79, 28, 17752, 79, 47258, 62, 1065, 4846, 1238, 198 ]
2.59806
928
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pathlib import Path import pytest from pants.core.util_rules.distdir import DistDir, InvalidDistDir, validate_distdir
[ 2, 15069, 13130, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 12581, 13, 7295, 13, 22602, 62, 38785, 13, 17080, 15908, 1330, 4307, 35277, 11, 17665, 20344, 35277, 11, 26571, 62, 17080, 15908, 628 ]
3.685714
70
import numpy as np import pickle from .testutil import datadir from brainstat.stats.SLM import SLM, f_test from brainstat.stats.terms import Term # test data *pkl consists of slm1* and slm2* keys # slm1* variables will be assigned to slm1 dictionary, and slm2* to the slm2 dict.
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 6738, 764, 9288, 22602, 1330, 4818, 324, 343, 198, 6738, 3632, 14269, 13, 34242, 13, 8634, 44, 1330, 12419, 44, 11, 277, 62, 9288, 198, 6738, 3632, 14269, 13, 34242, 13, 38707, 1330, 35118, 628, 198, 198, 2, 1332, 1366, 1635, 79, 41582, 10874, 286, 1017, 76, 16, 9, 290, 1017, 76, 17, 9, 8251, 198, 2, 1017, 76, 16, 9, 9633, 481, 307, 8686, 284, 1017, 76, 16, 22155, 11, 290, 1017, 76, 17, 9, 284, 262, 1017, 76, 17, 8633, 13, 628, 628, 628, 628, 628, 628, 198 ]
2.94
100
import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np import pickle from collections import OrderedDict from fragresp.gaussian_tools import check_opt as _check_opt from fragresp.gaussian_tools import check_esp as _check_esp from fragresp.gaussian_tools import get_energy as _get_energy from fragresp.constants import hartree_to_kcal
[ 11748, 28686, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 76, 489, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 7956, 4363, 13, 4908, 31562, 62, 31391, 1330, 2198, 62, 8738, 355, 4808, 9122, 62, 8738, 198, 6738, 7956, 4363, 13, 4908, 31562, 62, 31391, 1330, 2198, 62, 9774, 355, 4808, 9122, 62, 9774, 198, 6738, 7956, 4363, 13, 4908, 31562, 62, 31391, 1330, 651, 62, 22554, 355, 4808, 1136, 62, 22554, 198, 6738, 7956, 4363, 13, 9979, 1187, 1330, 289, 433, 631, 62, 1462, 62, 74, 9948, 198 ]
3.201681
119
from model.factor import RandomVar from model.factor import CPD from model.factor import Factor from model.influence import InfluenceDiagram from inference.exact import ExpectedUtility if __name__ == '__main__': main()
[ 6738, 2746, 13, 31412, 1330, 14534, 19852, 198, 6738, 2746, 13, 31412, 1330, 327, 5760, 198, 6738, 2746, 13, 31412, 1330, 27929, 198, 6738, 2746, 13, 10745, 23079, 1330, 35948, 18683, 6713, 198, 6738, 32278, 13, 1069, 529, 1330, 1475, 7254, 18274, 879, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.603175
63
#!/usr/bin/python # Importing custom files import sys sys.path.insert(1, '../') import utils import instagram from datetime import date from PIL import Image, ImageDraw from bs4 import BeautifulSoup import urllib.request import requests import time import wget import json import os if __name__ == "__main__": if "--debug" in sys.argv[1:]: debug=True elif "-d" in sys.argv[1:]: debug=True else: debug=False main(debug) print("\nDONE")
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 17267, 278, 2183, 3696, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 705, 40720, 11537, 198, 198, 11748, 3384, 4487, 198, 11748, 916, 6713, 198, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 266, 1136, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 611, 366, 438, 24442, 1, 287, 25064, 13, 853, 85, 58, 16, 25, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 28, 17821, 198, 220, 220, 220, 1288, 361, 27444, 67, 1, 287, 25064, 13, 853, 85, 58, 16, 25, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 28, 17821, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 14257, 28, 25101, 628, 220, 220, 220, 1388, 7, 24442, 8, 628, 220, 220, 220, 3601, 7203, 59, 77, 35, 11651, 4943 ]
2.526042
192
import os
[ 11748, 28686, 628 ]
3.666667
3
import sys import os sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('../')) sys.path.append(os.path.abspath('../../')) import matplotlib.pyplot as plt import numpy as np from fusion.scheduling import batch_size from fusion.scheduling import Resource from fusion.scheduling import LoopLowerBound from fusion.scheduling import ScheduleGenerator from fusion.scheduling import extract_arch_info, extract_dataflow_info from fusion.scheduling import CostModel from fusion.scheduling import res_parse from fusion.nn_models import import_network def do_scheduling(): """ Get optimal scheduling for given problem. Return a result schedule. """ buffer = [128, 128, 256, 256, 512, 512, 512, 512] pe_array = [16, 32, 16, 32, 16, 16, 32, 64] # Network. batch_size.init(4) network = import_network("squeezenet") dataflow_info = extract_dataflow_info('./fusion/dataflow/dataflow_Ow_Cout.json') access_list = [] energy_list = [] for pe, bf in zip(pe_array, buffer): arch_file = './fusion/arch/3_level_mem_{}KB.json'.format(bf) arch_info = extract_arch_info(arch_file) arch_info["parallel_count"][0] = pe ** 2 if pe == 8: arch_info["parallel_cost"][0] = 0.05 resource = Resource.arch(arch_info) # Unroll loop lower bound dataflow_info["partitioning_size"] = [pe] * len(dataflow_info["partitioning_size"]) loop_lower_bound = LoopLowerBound.dataflow(dataflow_info) print("\n===========================================================") print('PE-array: {}x{}, buffer size: {}(KB)'.format(pe, pe, bf)) print("waiting...") cost_model = CostModel(network, resource) # optimal schedule sg = ScheduleGenerator(network, resource, cost_model, loop_lower_bound) schedule_info_list, _ = sg.schedule_search() print("done!\n\n") energy, access = res_parse(schedule_info_list, resource, cost_model, sg, network, loop_lower_bound, './result/pe_array', arch_info) energy_list.append(energy) access_list.append(access) x = ["16x16,128", "32x32,128", "16x16,256", "32x32,256", "8x8,512", "16x16,512", "32x32,512", "64x64,512"] energy_list = np.array(energy_list) / energy_list[0] access_list = np.array(access_list) / access_list[0] plt.figure(figsize=(8, 2)) plt.plot(x, energy_list, label="Normalized Energy") plt.plot(x, access_list, label="Normalized DRAM Access") plt.ylim(0.2, 1.2) plt.legend() plt.savefig('./result/pe_array/pe_array.png') plt.show() def main(): """ Main function. """ do_scheduling() return 0 if __name__ == '__main__': sys.exit(main())
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 2637, 4008, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 6, 4008, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 40720, 6, 4008, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 15458, 62, 7857, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 20857, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 26304, 31426, 49646, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 19281, 8645, 1352, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 7925, 62, 998, 62, 10951, 11, 7925, 62, 7890, 11125, 62, 10951, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 6446, 17633, 198, 6738, 21748, 13, 1416, 704, 16619, 1330, 581, 62, 29572, 198, 198, 6738, 21748, 13, 20471, 62, 27530, 1330, 1330, 62, 27349, 628, 198, 4299, 466, 62, 1416, 704, 16619, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3497, 16586, 26925, 329, 1813, 1917, 13, 8229, 257, 1255, 7269, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 11876, 796, 685, 12762, 11, 13108, 11, 17759, 11, 17759, 11, 22243, 11, 22243, 11, 22243, 11, 22243, 60, 198, 220, 220, 220, 613, 62, 18747, 796, 685, 1433, 11, 3933, 11, 1467, 11, 3933, 11, 1467, 11, 1467, 11, 3933, 11, 5598, 60, 628, 220, 220, 220, 1303, 7311, 13, 198, 220, 220, 220, 15458, 62, 7857, 13, 15003, 7, 19, 8, 198, 220, 220, 220, 3127, 796, 1330, 62, 27349, 7203, 16485, 1453, 4801, 316, 4943, 628, 220, 220, 220, 1366, 11125, 62, 10951, 796, 7925, 62, 7890, 11125, 62, 10951, 7, 4458, 14, 69, 4241, 14, 7890, 11125, 14, 7890, 11125, 62, 46, 86, 62, 34, 448, 13, 17752, 11537, 628, 220, 220, 220, 1895, 62, 4868, 796, 17635, 198, 220, 220, 220, 2568, 62, 4868, 796, 17635, 628, 220, 220, 220, 329, 613, 11, 275, 69, 287, 19974, 7, 431, 62, 18747, 11, 11876, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3934, 62, 7753, 796, 705, 19571, 69, 4241, 14, 998, 14, 18, 62, 5715, 62, 11883, 23330, 92, 22764, 13, 17752, 4458, 18982, 7, 19881, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3934, 62, 10951, 796, 7925, 62, 998, 62, 10951, 7, 998, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3934, 62, 10951, 14692, 1845, 29363, 62, 9127, 1, 7131, 15, 60, 796, 613, 12429, 362, 198, 220, 220, 220, 220, 220, 220, 220, 611, 613, 6624, 807, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3934, 62, 10951, 14692, 1845, 29363, 62, 15805, 1, 7131, 15, 60, 796, 657, 13, 2713, 198, 220, 220, 220, 220, 220, 220, 220, 8271, 796, 20857, 13, 998, 7, 998, 62, 10951, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 791, 2487, 9052, 2793, 5421, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 11125, 62, 10951, 14692, 3911, 653, 278, 62, 7857, 8973, 796, 685, 431, 60, 1635, 18896, 7, 7890, 11125, 62, 10951, 14692, 3911, 653, 278, 62, 7857, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 9052, 62, 21037, 62, 7784, 796, 26304, 31426, 49646, 13, 7890, 11125, 7, 7890, 11125, 62, 10951, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 59, 77, 10052, 4770, 2559, 855, 2625, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 11401, 12, 18747, 25, 23884, 87, 90, 5512, 11876, 2546, 25, 23884, 7, 22764, 8, 4458, 18982, 7, 431, 11, 613, 11, 275, 69, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 10247, 1780, 9313, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1575, 62, 19849, 796, 6446, 17633, 7, 27349, 11, 8271, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 16586, 7269, 198, 220, 220, 220, 220, 220, 220, 220, 264, 70, 796, 19281, 8645, 1352, 7, 27349, 11, 8271, 11, 1575, 62, 19849, 11, 9052, 62, 21037, 62, 7784, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7269, 62, 10951, 62, 4868, 11, 4808, 796, 264, 70, 13, 15952, 5950, 62, 12947, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 28060, 0, 59, 77, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2568, 11, 1895, 796, 581, 62, 29572, 7, 15952, 5950, 62, 10951, 62, 4868, 11, 8271, 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, 1575, 62, 19849, 11, 264, 70, 11, 3127, 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, 9052, 62, 21037, 62, 7784, 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, 705, 19571, 20274, 14, 431, 62, 18747, 3256, 3934, 62, 10951, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2568, 62, 4868, 13, 33295, 7, 22554, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1895, 62, 4868, 13, 33295, 7, 15526, 8, 628, 220, 220, 220, 2124, 796, 14631, 1433, 87, 1433, 11, 12762, 1600, 366, 2624, 87, 2624, 11, 12762, 1600, 366, 1433, 87, 1433, 11, 11645, 1600, 366, 2624, 87, 2624, 11, 11645, 1600, 366, 23, 87, 23, 11, 25836, 1600, 366, 1433, 87, 1433, 11, 25836, 1600, 366, 2624, 87, 2624, 11, 25836, 1600, 366, 2414, 87, 2414, 11, 25836, 8973, 198, 220, 220, 220, 2568, 62, 4868, 796, 45941, 13, 18747, 7, 22554, 62, 4868, 8, 1220, 2568, 62, 4868, 58, 15, 60, 198, 220, 220, 220, 1895, 62, 4868, 796, 45941, 13, 18747, 7, 15526, 62, 4868, 8, 1220, 1895, 62, 4868, 58, 15, 60, 198, 220, 220, 220, 458, 83, 13, 26875, 7, 5647, 7857, 16193, 23, 11, 362, 4008, 198, 220, 220, 220, 458, 83, 13, 29487, 7, 87, 11, 2568, 62, 4868, 11, 6167, 2625, 26447, 1143, 6682, 4943, 198, 220, 220, 220, 458, 83, 13, 29487, 7, 87, 11, 1895, 62, 4868, 11, 6167, 2625, 26447, 1143, 10560, 2390, 8798, 4943, 198, 220, 220, 220, 458, 83, 13, 88, 2475, 7, 15, 13, 17, 11, 352, 13, 17, 8, 198, 220, 220, 220, 458, 83, 13, 1455, 437, 3419, 198, 220, 220, 220, 458, 83, 13, 21928, 5647, 7, 4458, 14, 20274, 14, 431, 62, 18747, 14, 431, 62, 18747, 13, 11134, 11537, 198, 220, 220, 220, 458, 83, 13, 12860, 3419, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8774, 2163, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 466, 62, 1416, 704, 16619, 3419, 198, 220, 220, 220, 1441, 657, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 25064, 13, 37023, 7, 12417, 28955, 198 ]
2.328431
1,224
from libfuturize.fixes.fix_future_builtins import FixFutureBuiltins
[ 6738, 9195, 69, 315, 333, 1096, 13, 42624, 13, 13049, 62, 37443, 62, 18780, 1040, 1330, 13268, 29783, 39582, 1040, 198 ]
3.238095
21
"""This module does blah blah.""" import httplib2 resp, content = httplib2.Http().request("http://myip.dk") #start = content.find("ipv4address") #end = start + 100 print (content) #[start:end].strip())
[ 37811, 1212, 8265, 857, 33367, 33367, 526, 15931, 198, 11748, 1841, 489, 571, 17, 198, 4363, 11, 2695, 796, 1841, 489, 571, 17, 13, 43481, 22446, 25927, 7203, 4023, 1378, 1820, 541, 13, 34388, 4943, 198, 2, 9688, 796, 2695, 13, 19796, 7203, 541, 85, 19, 21975, 4943, 198, 2, 437, 796, 923, 1343, 1802, 198, 198, 4798, 357, 11299, 8, 1303, 58, 9688, 25, 437, 4083, 36311, 28955 ]
2.927536
69
from enum import Enum import requests from bbdata.config import output_api_url from bbdata.util import handle_response from bbdata.exceptions import ClientException
[ 6738, 33829, 1330, 2039, 388, 198, 11748, 7007, 198, 6738, 275, 65, 7890, 13, 11250, 1330, 5072, 62, 15042, 62, 6371, 198, 6738, 275, 65, 7890, 13, 22602, 1330, 5412, 62, 26209, 198, 6738, 275, 65, 7890, 13, 1069, 11755, 1330, 20985, 16922, 628 ]
3.772727
44
from collections import defaultdict from lxml import html import requests from plumbum import colors from dict_tiny.setting import TIME_OUT def is_alphabet(word): """ return the word is English or Chinese :param word: :return: """ is_alphabet = defaultdict(int) word = word.replace(' ', '') for each_letter in word: if each_letter >= '\u4e00' and each_letter <= '\u9fff': is_alphabet['cn'] += 1 # elif word >= '\u0030' and word <= '\u0039': # return 'num' elif (each_letter >= '\u0041' and each_letter <= '\u005a') or ( each_letter >= '\u0061' and each_letter <= '\u007a'): is_alphabet['en'] += 1 else: is_alphabet['other'] += 1 is_alphabet['en'] /= 4 for len_type, num in is_alphabet.items(): if num >= sum(is_alphabet.values()) * 0.7: return len_type return 'other' def downloader(url, header): """ :param url: url need to be downloaded :param header: fake header :return: """ try: result = requests.get(url, headers=header, timeout=TIME_OUT) result_selector = html.etree.HTML(result.text) resp_code = result.status_code except requests.exceptions.ConnectionError as e: print(colors.red | "[Error!] Time out.") print("<%s>" % e) result_selector = None resp_code = None return result_selector, resp_code def downloader_plain(url, header): """ plain download. Do not make the resp to selector :param url: :param header: :return: """ try: return requests.get(url, headers=header).text except: return None
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 300, 19875, 1330, 27711, 198, 11748, 7007, 198, 6738, 458, 2178, 388, 1330, 7577, 198, 6738, 8633, 62, 44152, 13, 33990, 1330, 20460, 62, 12425, 628, 198, 4299, 318, 62, 17307, 8380, 7, 4775, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 262, 1573, 318, 3594, 393, 3999, 198, 220, 220, 220, 1058, 17143, 1573, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 318, 62, 17307, 8380, 796, 4277, 11600, 7, 600, 8, 198, 220, 220, 220, 1573, 796, 1573, 13, 33491, 10786, 46083, 10148, 8, 198, 220, 220, 220, 329, 1123, 62, 9291, 287, 1573, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1123, 62, 9291, 18189, 705, 59, 84, 19, 68, 405, 6, 290, 1123, 62, 9291, 19841, 705, 59, 84, 24, 20972, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 17307, 8380, 17816, 31522, 20520, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1288, 361, 1573, 18189, 705, 59, 84, 405, 1270, 6, 290, 1573, 19841, 705, 59, 84, 405, 2670, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 220, 220, 220, 1441, 705, 22510, 6, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 357, 27379, 62, 9291, 18189, 705, 59, 84, 405, 3901, 6, 290, 1123, 62, 9291, 19841, 705, 59, 84, 22544, 64, 11537, 393, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1123, 62, 9291, 18189, 705, 59, 84, 405, 5333, 6, 290, 1123, 62, 9291, 19841, 705, 59, 84, 25816, 64, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 17307, 8380, 17816, 268, 20520, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 62, 17307, 8380, 17816, 847, 20520, 15853, 352, 628, 220, 220, 220, 318, 62, 17307, 8380, 17816, 268, 20520, 1220, 28, 604, 628, 220, 220, 220, 329, 18896, 62, 4906, 11, 997, 287, 318, 62, 17307, 8380, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 611, 997, 18189, 2160, 7, 271, 62, 17307, 8380, 13, 27160, 28955, 1635, 657, 13, 22, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 18896, 62, 4906, 198, 220, 220, 220, 1441, 705, 847, 6, 628, 198, 4299, 4321, 263, 7, 6371, 11, 13639, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 19016, 25, 19016, 761, 284, 307, 15680, 198, 220, 220, 220, 1058, 17143, 13639, 25, 8390, 13639, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 7007, 13, 1136, 7, 6371, 11, 24697, 28, 25677, 11, 26827, 28, 34694, 62, 12425, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 19738, 273, 796, 27711, 13, 316, 631, 13, 28656, 7, 20274, 13, 5239, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1217, 62, 8189, 796, 1255, 13, 13376, 62, 8189, 198, 220, 220, 220, 2845, 7007, 13, 1069, 11755, 13, 32048, 12331, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 4033, 669, 13, 445, 930, 12878, 12331, 36463, 3862, 503, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 27, 4, 82, 24618, 4064, 304, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 19738, 273, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 1217, 62, 8189, 796, 6045, 198, 220, 220, 220, 1441, 1255, 62, 19738, 273, 11, 1217, 62, 8189, 628, 198, 4299, 4321, 263, 62, 25638, 7, 6371, 11, 13639, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8631, 4321, 13, 2141, 407, 787, 262, 1217, 284, 31870, 198, 220, 220, 220, 1058, 17143, 19016, 25, 198, 220, 220, 220, 1058, 17143, 13639, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 7007, 13, 1136, 7, 6371, 11, 24697, 28, 25677, 737, 5239, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6045, 198 ]
2.320652
736
#!/usr/bin/env python3 """ Created on Thr Apr 8 18:00:00 2021 :Authors: Mark Driver <mdd31> Mark J. Williamson <mjw99> """ import logging from cmlgenerator.test.cmlgeneratortests import run_tests logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.WARN) if __name__ == "__main__": run_tests()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 41972, 319, 16283, 2758, 807, 1248, 25, 405, 25, 405, 33448, 198, 198, 25, 30515, 669, 25, 198, 220, 220, 220, 2940, 12434, 1279, 76, 1860, 3132, 29, 198, 220, 220, 220, 2940, 449, 13, 34974, 1279, 76, 73, 86, 2079, 29, 198, 37811, 198, 198, 11748, 18931, 198, 6738, 269, 4029, 8612, 1352, 13, 9288, 13, 66, 4029, 8612, 265, 419, 3558, 1330, 1057, 62, 41989, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 25294, 30373, 13, 2617, 4971, 7, 6404, 2667, 13, 37771, 8, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1057, 62, 41989, 3419, 198 ]
2.544776
134
from math import cos, sin, pi import bgl import blf import bpy import gpu from bpy.props import * from bpy.types import Operator from gpu_extras.batch import batch_for_shader from .utils import dpifac, draw_tri_fan from ...preferences import get_pref class RSN_OT_DrawNodes(Operator): """Draw the active task's settings """ bl_idname = "rsn.draw_nodes" bl_label = "Draw Nodes" bl_options = {'REGISTER', 'UNDO'}
[ 6738, 10688, 1330, 8615, 11, 7813, 11, 31028, 198, 198, 11748, 275, 4743, 198, 11748, 698, 69, 198, 11748, 275, 9078, 198, 11748, 308, 19944, 198, 198, 6738, 275, 9078, 13, 1676, 862, 1330, 1635, 198, 6738, 275, 9078, 13, 19199, 1330, 35946, 198, 6738, 308, 19944, 62, 2302, 8847, 13, 43501, 1330, 15458, 62, 1640, 62, 1477, 5067, 198, 198, 6738, 764, 26791, 1330, 288, 79, 361, 330, 11, 3197, 62, 28461, 62, 24408, 198, 6738, 2644, 3866, 69, 4972, 1330, 651, 62, 3866, 69, 628, 628, 628, 628, 198, 198, 4871, 371, 15571, 62, 2394, 62, 25302, 45, 4147, 7, 18843, 1352, 2599, 198, 220, 220, 220, 37227, 25302, 262, 4075, 4876, 338, 6460, 37227, 198, 220, 220, 220, 698, 62, 312, 3672, 796, 366, 3808, 77, 13, 19334, 62, 77, 4147, 1, 198, 220, 220, 220, 698, 62, 18242, 796, 366, 25302, 399, 4147, 1, 198, 220, 220, 220, 698, 62, 25811, 796, 1391, 6, 31553, 41517, 3256, 705, 4944, 18227, 6, 92, 628, 198 ]
2.625
168
from internal.model import Node, Rule, ExistRule, ChildRule, Direction, RuleNode, ParentChildRule
[ 6738, 5387, 13, 19849, 1330, 19081, 11, 14330, 11, 1475, 396, 31929, 11, 5932, 31929, 11, 41837, 11, 14330, 19667, 11, 16774, 16424, 31929, 628, 628, 628, 198 ]
3.714286
28
from marshmallow import fields, post_load from portals.wwits.apis.rest import BaseSchemaExcludeFields as Schema from .models import ParmModel, FunctionAuthorizeListModel, FunctionModel
[ 6738, 22397, 42725, 1330, 7032, 11, 1281, 62, 2220, 198, 6738, 42604, 13, 1383, 896, 13, 499, 271, 13, 2118, 1330, 7308, 27054, 2611, 3109, 9152, 15878, 82, 355, 10011, 2611, 198, 198, 6738, 764, 27530, 1330, 47796, 17633, 11, 15553, 13838, 1096, 8053, 17633, 11, 15553, 17633, 628, 628 ]
3.78
50
#!/usr/bin/env python3 # IB002 Domaci uloha 6. # # V nasledujicim textu pouzivame pojem "halda" ve vyznamu "binarni halda". # # Minimova halda je v kanonickem tvaru, pokud pro kazdy jeji prvek se dvema # potomky plati, ze jeho levy potomek je mensi nez ten pravy nebo se oba # rovnaji. # # Je v kanonickem tvaru | Neni v kanonickem tvaru # | # (1) | (1) # / \ | / \ # (2) (3) | (3) (2) # Trida representujici minimovou haldu. Pro praci s ni muzete s vyhodou pouzit # funkce, ktere jste implementovali v zakladnim domacim ukolu. # Ukol 1. # Vasim prvnim ukolem je implementovat funkci is_canonical_min_heap(heap), # ktera overi, zda je zadana halda 'heap' korektni minimovou haldou # v kanonickem tvaru. Pokud ano, vrati True, v opacnem pripade vrati False. # # Prazdna nebo jednoprvkova halda je v kanonickem tvaru implicitne. Mejte na # pameti, ze halda v kanonickem tvaru musi splnovat take pozadavky kladene na # minimovou haldu. def is_canonical_min_heap(heap): """ vstup: 'heap' typu MinHeap (je zaruceno, ze heap.size je velikost pole heap.array; neni zaruceno, ze prvky heap.array splnuji haldovou podminku nebo podminku kanonickeho tvaru) vystup: True, pokud je 'heap' minimova halda v kanonickem tvaru False, jinak casova slozitost: O(n), kde 'n' je pocet prvku 'heap' """ if heap is None: return False if heap.size == 1 or heap.size == 0: return True if not is_min_heap(heap.array, 0): return False i = 1 left = heap.array[1] while i < heap.size: if i % 2 == 1: left = heap.array[i] i += 1 continue if left > heap.array[i]: return False i += 1 return True # Ukol 2. # Druhym ukolem je implementovat funkci canonise_min_heap(heap), ktera zadanou # minimovou haldu 'heap' prevede na kanonicky tvar. Funkce bude menit primo # haldu zadanou v argumentu, proto nebude vracet zadnou navratovou hodnotu. # # Napoveda: # Pro algoritmus s linearni casovou slozitosti je potreba postupovat takto: # - Rekurzivne resime od korene k listum haldy; # - pro kazdy uzel haldy: # + zkontrolujeme, jestli potomci splnuji vlastnost kanonickeho tvaru; # pokud ne: # * prohodime hodnoty leveho a praveho potomka; # * tim se muze pokazit vlastnost haldy v pravem podstrome, proto # probublame problematickou hodnotu z korene praveho podstromu # tak hluboko, aby uz neporusovala vlastnost haldy (pri tomto bublani # opravujeme pouze vlastnost haldy, kanonicky tvar neresime) # + mame tedy korektni minimovou haldu, ktera navic splnuje kanonicky # tvar od tohoto uzlu smerem nahoru; # + pokracujeme v rekurzi vlevo a vpravo. def canonise_min_heap(heap): """ vstup: 'heap' korektni minimova halda typu MinHeap vystup: funkce nic nevraci, vstupni halda 'heap' je prevedena do kanonickeho tvaru (pritom obsahuje stejne prvky jako na zacatku) casova slozitost: O(n), kde 'n' je pocet prvku 'heap' """ if is_min_heap(heap.array, 0): for i in range(heap.size // 2): left, right = 2 * i + 1, 2 * i + 2 if left < heap.size and right < heap.size: if heap.array[left] > heap.array[right]: swap(heap.array, left, right) check_subtree(heap, right) heap = MinHeap() heap.array = [1, 3, 2] heap.size = 3 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [-1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1] heap.size = 14 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [-2, 0, -2, 0, 0, -1, -2] heap.size = 7 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [-1, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, -1] heap.size = 12 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [1, 3, 2, 4, 5, 9, 7, 6, 8] heap.size = 9 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [0, 1, 0, 1, 1, 0] heap.size = 6 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [0, 1, 0, 1, 1, 0, 0] heap.size = 7 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------") heap.array = [0, 1, 0, 1, 1, 0, 1] heap.size = 7 if is_canonical_min_heap(heap): print(heap.array, " = IS canonical heap") else: print(heap.array, " = IS NOT canonical heap") canonise_min_heap(heap) print(heap.array, " = REPAIRED") if is_canonical_min_heap(heap): print(" = TEST OK") else: print(" = TEST NOK") print("-----------------------------------------")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 2, 34782, 21601, 9666, 32009, 14856, 28083, 718, 13, 198, 2, 198, 2, 569, 25221, 992, 23577, 291, 320, 2420, 84, 279, 280, 89, 452, 480, 745, 73, 368, 366, 71, 1940, 64, 1, 1569, 410, 45579, 7402, 84, 366, 8800, 1501, 72, 289, 1940, 64, 1911, 198, 2, 198, 2, 1855, 320, 10071, 289, 1940, 64, 11223, 410, 43998, 9229, 365, 76, 256, 7785, 84, 11, 279, 482, 463, 386, 479, 1031, 9892, 11223, 7285, 778, 303, 74, 384, 288, 303, 2611, 198, 2, 1787, 296, 2584, 458, 7246, 11, 41271, 11223, 8873, 35783, 1787, 462, 74, 11223, 285, 641, 72, 497, 89, 3478, 279, 4108, 88, 497, 2127, 384, 909, 64, 198, 2, 686, 85, 77, 26436, 13, 198, 2, 198, 2, 3852, 410, 43998, 9229, 365, 76, 256, 7785, 84, 930, 399, 43850, 410, 43998, 9229, 365, 76, 256, 7785, 84, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 198, 2, 220, 220, 220, 220, 220, 220, 357, 16, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 16, 8, 198, 2, 220, 220, 220, 220, 220, 1220, 220, 220, 3467, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1220, 220, 220, 3467, 198, 2, 220, 220, 220, 357, 17, 8, 220, 220, 357, 18, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 930, 220, 220, 220, 220, 220, 220, 220, 357, 18, 8, 220, 220, 357, 17, 8, 628, 198, 2, 833, 3755, 2380, 23577, 44070, 10356, 709, 280, 10284, 646, 13, 1041, 778, 32009, 264, 37628, 285, 10277, 14471, 264, 410, 88, 2065, 280, 279, 280, 89, 270, 198, 2, 46212, 344, 11, 479, 83, 567, 474, 4169, 3494, 709, 7344, 410, 1976, 461, 9435, 77, 320, 2401, 330, 320, 334, 74, 349, 84, 13, 628, 198, 2, 5065, 349, 352, 13, 198, 2, 23663, 320, 778, 85, 77, 320, 334, 74, 2305, 76, 11223, 3494, 709, 265, 46212, 979, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 828, 198, 2, 479, 49600, 625, 72, 11, 1976, 6814, 11223, 1976, 324, 2271, 289, 1940, 64, 705, 258, 499, 6, 479, 382, 21841, 8461, 10356, 709, 280, 289, 1940, 280, 198, 2, 410, 43998, 9229, 365, 76, 256, 7785, 84, 13, 8175, 463, 281, 78, 11, 410, 81, 7246, 6407, 11, 410, 1034, 330, 77, 368, 1293, 79, 671, 410, 81, 7246, 10352, 13, 198, 2, 198, 2, 350, 3247, 67, 2616, 497, 2127, 474, 276, 77, 404, 81, 85, 74, 10071, 289, 1940, 64, 11223, 410, 43998, 9229, 365, 76, 256, 7785, 84, 16992, 710, 13, 2185, 73, 660, 12385, 198, 2, 279, 321, 316, 72, 11, 41271, 289, 1940, 64, 410, 43998, 9229, 365, 76, 256, 7785, 84, 1928, 72, 4328, 37302, 265, 1011, 745, 89, 324, 615, 2584, 479, 9435, 1734, 12385, 198, 2, 10356, 709, 280, 10284, 646, 13, 628, 198, 198, 4299, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 410, 301, 929, 25, 705, 258, 499, 6, 2170, 84, 1855, 1544, 499, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 18015, 1976, 283, 1229, 23397, 11, 41271, 24575, 13, 7857, 11223, 11555, 1134, 455, 16825, 24575, 13, 18747, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 43850, 1976, 283, 1229, 23397, 11, 41271, 778, 85, 2584, 24575, 13, 18747, 4328, 28803, 7285, 289, 1940, 709, 280, 24573, 76, 676, 84, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 497, 2127, 24573, 76, 676, 84, 43998, 9229, 365, 8873, 256, 7785, 84, 8, 198, 220, 220, 220, 410, 88, 301, 929, 25, 6407, 11, 279, 482, 463, 11223, 705, 258, 499, 6, 10356, 10071, 289, 1940, 64, 410, 43998, 9229, 365, 76, 256, 7785, 84, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10352, 11, 474, 259, 461, 198, 220, 220, 220, 6124, 10071, 1017, 8590, 270, 455, 25, 440, 7, 77, 828, 479, 2934, 705, 77, 6, 11223, 279, 420, 316, 778, 85, 23063, 705, 258, 499, 6, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 24575, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 611, 24575, 13, 7857, 6624, 352, 393, 24575, 13, 7857, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 220, 220, 220, 611, 407, 318, 62, 1084, 62, 258, 499, 7, 258, 499, 13, 18747, 11, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 1312, 796, 352, 198, 220, 220, 220, 1364, 796, 24575, 13, 18747, 58, 16, 60, 198, 220, 220, 220, 981, 1312, 1279, 24575, 13, 7857, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 4064, 362, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1364, 796, 24575, 13, 18747, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1364, 1875, 24575, 13, 18747, 58, 72, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 15853, 352, 198, 220, 220, 220, 1441, 6407, 628, 198, 2, 5065, 349, 362, 13, 198, 2, 21295, 71, 4948, 334, 74, 2305, 76, 11223, 3494, 709, 265, 46212, 979, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 828, 479, 49600, 1976, 29157, 280, 198, 2, 10356, 709, 280, 10284, 646, 705, 258, 499, 6, 662, 1079, 68, 12385, 479, 36902, 17479, 256, 7785, 13, 37299, 344, 275, 2507, 1450, 270, 2684, 78, 198, 2, 10284, 646, 1976, 29157, 280, 410, 4578, 84, 11, 44876, 45508, 2507, 410, 11510, 316, 1976, 324, 77, 280, 6812, 10366, 709, 280, 289, 375, 1662, 84, 13, 198, 2, 198, 2, 14332, 2668, 64, 25, 198, 2, 1041, 435, 7053, 270, 14664, 264, 14174, 8461, 6124, 709, 280, 1017, 8590, 270, 455, 72, 11223, 1787, 260, 7012, 1281, 929, 709, 265, 256, 461, 1462, 25, 198, 2, 532, 797, 74, 333, 89, 452, 710, 581, 524, 16298, 479, 382, 710, 479, 1351, 388, 289, 1940, 88, 26, 198, 2, 532, 386, 479, 1031, 9892, 334, 17396, 289, 1940, 88, 25, 198, 2, 220, 220, 1343, 1976, 74, 756, 305, 2290, 73, 34755, 11, 474, 395, 4528, 1787, 296, 979, 4328, 28803, 7285, 410, 12957, 77, 455, 43998, 9229, 365, 8873, 256, 7785, 84, 26, 198, 2, 220, 220, 220, 220, 279, 482, 463, 497, 25, 198, 2, 220, 220, 220, 220, 1635, 386, 2065, 524, 289, 375, 1662, 88, 34002, 8873, 257, 279, 5758, 8873, 1787, 296, 4914, 26, 198, 2, 220, 220, 220, 220, 1635, 4628, 384, 38779, 2736, 279, 482, 1031, 270, 410, 12957, 77, 455, 289, 1940, 88, 410, 279, 5758, 76, 24573, 301, 5998, 11, 44876, 198, 2, 220, 220, 220, 220, 220, 220, 1861, 549, 75, 480, 1917, 265, 624, 280, 289, 375, 1662, 84, 1976, 479, 382, 710, 279, 5758, 8873, 24573, 20282, 84, 198, 2, 220, 220, 220, 220, 220, 220, 256, 461, 289, 75, 549, 16044, 11, 450, 88, 334, 89, 497, 1819, 385, 709, 6081, 410, 12957, 77, 455, 289, 1940, 88, 357, 3448, 16667, 1462, 10015, 75, 3216, 198, 2, 220, 220, 220, 220, 220, 220, 1034, 4108, 23577, 34755, 279, 280, 2736, 410, 12957, 77, 455, 289, 1940, 88, 11, 479, 36902, 17479, 256, 7785, 497, 411, 524, 8, 198, 2, 220, 220, 1343, 285, 480, 256, 4716, 479, 382, 21841, 8461, 10356, 709, 280, 10284, 646, 11, 479, 49600, 6812, 291, 4328, 28803, 18015, 479, 36902, 17479, 198, 2, 220, 220, 220, 220, 256, 7785, 16298, 284, 71, 2069, 334, 89, 2290, 895, 567, 76, 299, 993, 27786, 26, 198, 2, 220, 220, 1343, 279, 482, 11510, 23577, 34755, 410, 302, 74, 333, 17027, 410, 2768, 78, 257, 410, 79, 4108, 78, 13, 628, 628, 198, 4299, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 410, 301, 929, 25, 705, 258, 499, 6, 479, 382, 21841, 8461, 10356, 10071, 289, 1940, 64, 2170, 84, 1855, 1544, 499, 198, 220, 220, 220, 410, 88, 301, 929, 25, 46212, 344, 9200, 497, 85, 11510, 72, 11, 410, 301, 929, 8461, 289, 1940, 64, 705, 258, 499, 6, 11223, 662, 1079, 8107, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 466, 43998, 9229, 365, 8873, 256, 7785, 84, 357, 79, 799, 296, 10201, 12196, 18015, 2876, 73, 710, 778, 85, 2584, 474, 25496, 12385, 1976, 330, 265, 23063, 8, 198, 220, 220, 220, 6124, 10071, 1017, 8590, 270, 455, 25, 440, 7, 77, 828, 479, 2934, 705, 77, 6, 11223, 279, 420, 316, 778, 85, 23063, 705, 258, 499, 6, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 62, 1084, 62, 258, 499, 7, 258, 499, 13, 18747, 11, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 258, 499, 13, 7857, 3373, 362, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1364, 11, 826, 796, 362, 1635, 1312, 1343, 352, 11, 362, 1635, 1312, 1343, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1364, 1279, 24575, 13, 7857, 290, 826, 1279, 24575, 13, 7857, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 24575, 13, 18747, 58, 9464, 60, 1875, 24575, 13, 18747, 58, 3506, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16075, 7, 258, 499, 13, 18747, 11, 1364, 11, 826, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 7266, 21048, 7, 258, 499, 11, 826, 8, 628, 198, 258, 499, 796, 1855, 1544, 499, 3419, 198, 198, 258, 499, 13, 18747, 796, 685, 16, 11, 513, 11, 362, 60, 198, 258, 499, 13, 7857, 796, 513, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 25915, 16, 11, 657, 11, 532, 16, 11, 657, 11, 657, 11, 657, 11, 532, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 11, 532, 16, 60, 198, 258, 499, 13, 7857, 796, 1478, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 25915, 17, 11, 657, 11, 532, 17, 11, 657, 11, 657, 11, 532, 16, 11, 532, 17, 60, 198, 258, 499, 13, 7857, 796, 767, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 25915, 16, 11, 657, 11, 532, 16, 11, 657, 11, 657, 11, 532, 16, 11, 657, 11, 657, 11, 657, 11, 657, 11, 657, 11, 532, 16, 60, 198, 258, 499, 13, 7857, 796, 1105, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 685, 16, 11, 513, 11, 362, 11, 604, 11, 642, 11, 860, 11, 767, 11, 718, 11, 807, 60, 198, 258, 499, 13, 7857, 796, 860, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 685, 15, 11, 352, 11, 657, 11, 352, 11, 352, 11, 657, 60, 198, 258, 499, 13, 7857, 796, 718, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 685, 15, 11, 352, 11, 657, 11, 352, 11, 352, 11, 657, 11, 657, 60, 198, 258, 499, 13, 7857, 796, 767, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943, 628, 198, 258, 499, 13, 18747, 796, 685, 15, 11, 352, 11, 657, 11, 352, 11, 352, 11, 657, 11, 352, 60, 198, 258, 499, 13, 7857, 796, 767, 198, 361, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 40091, 24575, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 3180, 5626, 40091, 24575, 4943, 198, 220, 220, 220, 18061, 786, 62, 1084, 62, 258, 499, 7, 258, 499, 8, 198, 220, 220, 220, 3601, 7, 258, 499, 13, 18747, 11, 366, 796, 4526, 4537, 37819, 4943, 198, 220, 220, 220, 611, 318, 62, 49883, 605, 62, 1084, 62, 258, 499, 7, 258, 499, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 7477, 4943, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 796, 43001, 8005, 42, 4943, 198, 4798, 7203, 3880, 45537, 4943 ]
2.14209
3,167
import os, glob import json from transformers import BertTokenizer from tqdm import tqdm from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser() parser.add_argument('--file_path', type=str, required=True) parser.add_argument('--output_path', type=str, required=True) args = parser.parse_args() if not os.path.exists(args.output_path): os.makedirs(args.output_path) # file_path = '../msmarco_passage_unicoil_encoded_TILDE_200' # output_path = '../msmarco_passage_unicoil_encoded_TILDE_200_decoded' tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', use_fast=True, cache_dir="../cache") files = glob.glob(os.path.join(args.file_path, '*')) for file in tqdm(files): with open(file, 'r') as f, open(f"{args.output_path}/{file.split('/')[-1]}", 'w') as wf: for line in f: data = json.loads(line) vector = {} for tok_id in data['vector'].keys(): vector[tokenizer.decode([int(tok_id)])] = data['vector'][tok_id] data['vector'] = vector json.dump(data, wf) wf.write('\n')
[ 11748, 28686, 11, 15095, 198, 11748, 33918, 198, 6738, 6121, 364, 1330, 22108, 30642, 7509, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 1822, 29572, 1330, 45751, 46677, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 45751, 46677, 3419, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 438, 7753, 62, 6978, 3256, 2099, 28, 2536, 11, 2672, 28, 17821, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 438, 22915, 62, 6978, 3256, 2099, 28, 2536, 11, 2672, 28, 17821, 8, 198, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 628, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 22046, 13, 22915, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 22046, 13, 22915, 62, 6978, 8, 628, 220, 220, 220, 1303, 2393, 62, 6978, 796, 705, 40720, 907, 3876, 1073, 62, 6603, 496, 62, 403, 3713, 346, 62, 12685, 9043, 62, 51, 4146, 7206, 62, 2167, 6, 198, 220, 220, 220, 1303, 5072, 62, 6978, 796, 705, 40720, 907, 3876, 1073, 62, 6603, 496, 62, 403, 3713, 346, 62, 12685, 9043, 62, 51, 4146, 7206, 62, 2167, 62, 12501, 9043, 6, 198, 220, 220, 220, 11241, 7509, 796, 22108, 30642, 7509, 13, 6738, 62, 5310, 13363, 10786, 4835, 12, 8692, 12, 19524, 839, 3256, 779, 62, 7217, 28, 17821, 11, 12940, 62, 15908, 2625, 40720, 23870, 4943, 628, 220, 220, 220, 3696, 796, 15095, 13, 4743, 672, 7, 418, 13, 6978, 13, 22179, 7, 22046, 13, 7753, 62, 6978, 11, 705, 9, 6, 4008, 198, 220, 220, 220, 329, 2393, 287, 256, 80, 36020, 7, 16624, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 7753, 11, 705, 81, 11537, 355, 277, 11, 1280, 7, 69, 1, 90, 22046, 13, 22915, 62, 6978, 92, 14, 90, 7753, 13, 35312, 10786, 14, 11537, 58, 12, 16, 48999, 1600, 705, 86, 11537, 355, 266, 69, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1627, 287, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 33918, 13, 46030, 7, 1370, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15879, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 284, 74, 62, 312, 287, 1366, 17816, 31364, 6, 4083, 13083, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15879, 58, 30001, 7509, 13, 12501, 1098, 26933, 600, 7, 83, 482, 62, 312, 8, 12962, 60, 796, 1366, 17816, 31364, 6, 7131, 83, 482, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 17816, 31364, 20520, 796, 15879, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 13, 39455, 7, 7890, 11, 266, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 69, 13, 13564, 10786, 59, 77, 11537, 628 ]
2.183636
550
from django.conf.urls import include, url from django.contrib import admin from chapter.view.createChapter import * from chapter.view.getChapter import * urlpatterns = [ # url('^login/$', login), url('^createAChapter/$', createAChapter), url('^getChapter/$', getChapter), url('^bookChapter/$', bookChapter), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 6843, 13, 1177, 13, 17953, 14126, 1330, 220, 1635, 198, 6738, 6843, 13, 1177, 13, 1136, 14126, 1330, 220, 1635, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 19016, 10786, 61, 38235, 32624, 3256, 17594, 828, 198, 220, 220, 220, 19016, 10786, 61, 17953, 32, 14126, 32624, 3256, 2251, 32, 14126, 828, 198, 220, 220, 220, 19016, 10786, 61, 1136, 14126, 32624, 3256, 651, 14126, 828, 198, 220, 220, 220, 19016, 10786, 61, 2070, 14126, 32624, 3256, 1492, 14126, 828, 198, 60, 198 ]
2.990909
110
""" This module imports the configuration for yggdrasil. .. todo:: Remove reference to environment variables for accessing config options. """ import os import sys import json import shutil import logging import warnings import subprocess from yggdrasil.backwards import configparser from yggdrasil import platform, tools conda_prefix = os.environ.get('CONDA_PREFIX', '') config_file = '.yggdrasil.cfg' def_config_file = os.path.join(os.path.dirname(__file__), 'defaults.cfg') if conda_prefix: usr_dir = conda_prefix else: usr_dir = os.path.expanduser('~') usr_config_file = os.path.join(usr_dir, config_file) loc_config_file = os.path.join(os.getcwd(), config_file) if not os.path.isfile(usr_config_file): # pragma: no cover from yggdrasil.languages import install_languages shutil.copy(def_config_file, usr_config_file) install_languages.install_all_languages(from_setup=True) logger = logging.getLogger(__name__) class YggConfigParser(configparser.ConfigParser, object): r"""Config parser that returns None if option not provided on get.""" def reload(self): r"""Reload parameters from the original files.""" self._sections = self._dict() if self.files is not None: self.read(self.files) @property def file_to_update(self): r"""str: Full path to file that should be updated if update_file is called without an explicit file path.""" out = None if self.files is not None: out = self.files[-1] return out def update_file(self, fname=None): r"""Write out updated contents to a file. Args: fname (str, optional): Full path to file where contents should be saved. If None, file_to_update is used. Defaults to None. Raises: RuntimeError: If fname is None and file_to_update is None. """ if fname is None: fname = self.file_to_update if fname is None: raise RuntimeError("No file provided or set at creation.") with open(fname, 'w') as fd: self.write(fd) @classmethod def from_files(cls, files, **kwargs): r"""Construct a config parser from a set of files. Args: files (list): One or more files that options should be read from in the order they should be loaded. **kwargs: Additional keyword arguments are passed to the class constructor. Returns: YggConfigParser: Config parser with information loaded from the provided files. """ out = cls(files=files, **kwargs) out.reload() return out def set(self, section, option, value=None): """Set an option.""" if not isinstance(value, str): value = json.dumps(value) super(YggConfigParser, self).set(section, option, value=value) def get(self, section, option, default=None, **kwargs): r"""Return None if the section/option does not exist. Args: section (str): Name of section. option (str): Name of option in section. default (obj, optional): Value that should be returned if the section and/or option are not found or are an empty string. Defaults to None. **kwargs: Additional keyword arguments are passed to the parent class's get. Returns: obj: String entry if the section & option exist, otherwise default. """ section = section.lower() option = option.lower() if self.has_section(section) and self.has_option(section, option): # Super does not work for ConfigParser as not inherited from object out = configparser.ConfigParser.get(self, section, option, **kwargs) # Count empty strings as not provided if not out: return default else: return self.backwards_str2val(out) else: return default # Initialize config ygg_cfg_usr = YggConfigParser.from_files([usr_config_file]) ygg_cfg = YggConfigParser.from_files([def_config_file, usr_config_file, loc_config_file]) def update_language_config(drv, skip_warnings=False, disable_languages=None, enable_languages=None, overwrite=False, verbose=False): r"""Update configuration options for a language driver. Args: drv (list, class): One or more language drivers that should be configured. skip_warnings (bool, optional): If True, warnings about missing options will not be raised. Defaults to False. disable_languages (list, optional): List of languages that should be disabled. Defaults to an empty list. enable_languages (list, optional): List of languages that should be enabled. Defaults to an empty list. overwrite (bool, optional): If True, the existing file will be overwritten. Defaults to False. verbose (bool, optional): If True, information about the config file will be displayed. Defaults to False. """ if verbose: logger.info("Updating user configuration file for yggdrasil at:\n\t%s" % usr_config_file) miss = [] if not isinstance(drv, list): drv = [drv] if disable_languages is None: disable_languages = [] if enable_languages is None: enable_languages = [] if overwrite: shutil.copy(def_config_file, usr_config_file) ygg_cfg_usr.reload() for idrv in drv: if (((idrv.language in disable_languages) and (idrv.language in enable_languages))): logger.info(("%s language both enabled and disabled. " "No action will be taken.") % idrv.language) elif idrv.language in disable_languages: ygg_cfg_usr.set(idrv.language, 'disable', 'True') elif idrv.language in enable_languages: ygg_cfg_usr.set(idrv.language, 'disable', 'False') if ygg_cfg_usr.get(idrv.language, 'disable', 'False').lower() == 'true': continue # pragma: no cover miss += idrv.configure(ygg_cfg_usr) ygg_cfg_usr.update_file() ygg_cfg.reload() if not skip_warnings: for sect, opt, desc in miss: # pragma: windows warnings.warn(("Could not set option %s in section %s. " + "Please set this in %s to: %s") % (opt, sect, ygg_cfg_usr.file_to_update, desc), RuntimeWarning) def find_all(name, path): r"""Find all instances of a file with a given name within the directory tree starting at a given path. Args: name (str): Name of the file to be found (with the extension). path (str, None): Directory where search should start. If set to None on Windows, the current directory and PATH variable are searched. Returns: list: All instances of the specified file. """ result = [] try: if platform._is_win: # pragma: windows if path is None: out = subprocess.check_output(["where", name], env=os.environ, stderr=subprocess.STDOUT) else: out = subprocess.check_output(["where", "/r", path, name], env=os.environ, stderr=subprocess.STDOUT) else: args = ["find", "-L", path, "-type", "f", "-name", name] pfind = subprocess.Popen(args, env=os.environ, stderr=subprocess.PIPE, stdout=subprocess.PIPE) (stdoutdata, stderrdata) = pfind.communicate() out = stdoutdata for l in stderrdata.splitlines(): if b'Permission denied' not in l: raise subprocess.CalledProcessError(pfind.returncode, ' '.join(args), output=stderrdata) except subprocess.CalledProcessError: out = '' if not out.isspace(): result = sorted(out.splitlines()) result = [os.path.normcase(os.path.normpath(m.decode('utf-8'))) for m in result] return result def locate_file(fname, environment_variable='PATH', directory_list=None): r"""Locate a file within a set of paths defined by a list or environment variable. Args: fname (str): Name of the file that should be located. environment_variable (str): Environment variable containing the set of paths that should be searched. Defaults to 'PATH'. If None, this keyword argument will be ignored. If a list is provided, it is assumed to be a list of environment variables that should be searched in the specified order. directory_list (list): List of paths that should be searched in addition to those specified by environment_variable. Defaults to None and is ignored. These directories will be searched be for those in the specified environment variables. Returns: bool, str: Full path to the located file if it was located, False otherwise. """ out = [] if ((platform._is_win and (environment_variable == 'PATH') and (directory_list is None))): # pragma: windows out += find_all(fname, None) else: if directory_list is None: directory_list = [] if environment_variable is not None: if not isinstance(environment_variable, list): environment_variable = [environment_variable] for x in environment_variable: directory_list += os.environ.get(x, '').split(os.pathsep) for path in directory_list: if path: out += find_all(fname, path) if not out: return False first = out[0] if len(out) > 1: warnings.warn(("More than one (%d) match to %s. " + "Using first match (%s)") % (len(out), fname, first), RuntimeWarning) return first # Set associated environment variables env_map = [('debug', 'ygg', 'YGG_DEBUG'), ('debug', 'rmq', 'RMQ_DEBUG'), ('debug', 'client', 'YGG_CLIENT_DEBUG'), ('jsonschema', 'validate_components', 'YGG_SKIP_COMPONENT_VALIDATION'), ('jsonschema', 'validate_all_messages', 'YGG_VALIDATE_ALL_MESSAGES'), ('rmq', 'namespace', 'YGG_NAMESPACE'), ('rmq', 'host', 'YGG_MSG_HOST'), ('rmq', 'vhost', 'YGG_MSG_VHOST'), ('rmq', 'user', 'YGG_MSG_USER'), ('rmq', 'password', 'YGG_MSG_PW'), ('parallel', 'cluster', 'YGG_CLUSTER'), ] def get_ygg_loglevel(cfg=None, default='DEBUG'): r"""Get the current log level. Args: cfg (:class:`yggdrasil.config.YggConfigParser`, optional): Config parser with options that should be used to determine the log level. Defaults to :data:`yggdrasil.config.ygg_cfg`. default (str, optional): Log level that should be returned if the log level option is not set in cfg. Defaults to 'DEBUG'. Returns: str: Log level string. """ is_model = tools.is_subprocess() if cfg is None: cfg = ygg_cfg if is_model: opt = 'client' else: opt = 'ygg' return cfg.get('debug', opt, default) def set_ygg_loglevel(level, cfg=None): r"""Set the current log level. Args: level (str): Level that the log should be set to. cfg (:class:`yggdrasil.config.YggConfigParser`, optional): Config parser with options that should be used to update the environment. Defaults to :data:`yggdrasil.config.ygg_cfg`. """ is_model = tools.is_subprocess() if cfg is None: cfg = ygg_cfg if is_model: opt = 'client' else: opt = 'ygg' cfg.set('debug', opt, level) logLevelYGG = eval('logging.%s' % level) ygg_logger = logging.getLogger("yggdrasil") ygg_logger.setLevel(level=logLevelYGG) def cfg_logging(cfg=None): r"""Set logging levels from config options. Args: cfg (:class:`yggdrasil.config.YggConfigParser`, optional): Config parser with options that should be used to update the environment. Defaults to :data:`yggdrasil.config.ygg_cfg`. """ is_model = tools.is_subprocess() if cfg is None: cfg = ygg_cfg _LOG_FORMAT = "%(levelname)s:%(module)s.%(funcName)s[%(lineno)d]:%(message)s" logging.basicConfig(level=logging.INFO, format=_LOG_FORMAT) logLevelYGG = eval('logging.%s' % cfg.get('debug', 'ygg', 'NOTSET')) logLevelRMQ = eval('logging.%s' % cfg.get('debug', 'rmq', 'INFO')) logLevelCLI = eval('logging.%s' % cfg.get('debug', 'client', 'INFO')) ygg_logger = logging.getLogger("yggdrasil") rmq_logger = logging.getLogger("pika") if is_model: ygg_logger.setLevel(level=logLevelCLI) else: ygg_logger.setLevel(level=logLevelYGG) rmq_logger.setLevel(level=logLevelRMQ) # For models, route the loggs to stdout so that they are displayed by the # model driver. if is_model: handler = logging.StreamHandler(sys.stdout) handler.setLevel(logLevelCLI) ygg_logger.addHandler(handler) rmq_logger.addHandler(handler) def cfg_environment(env=None, cfg=None): r"""Set environment variables based on config options. Args: env (dict, optional): Dictionary of environment variables that should be updated. Defaults to `os.environ`. cfg (:class:`yggdrasil.config.YggConfigParser`, optional): Config parser with options that should be used to update the environment. Defaults to :data:`yggdrasil.config.ygg_cfg`. """ if env is None: env = os.environ if cfg is None: cfg = ygg_cfg for s, o, e in env_map: v = cfg.get(s, o) if v: env[e] = v # Do initial update of logging & environment (legacy) cfg_logging() cfg_environment()
[ 37811, 198, 1212, 8265, 17944, 262, 8398, 329, 331, 1130, 7109, 292, 346, 13, 198, 198, 492, 284, 4598, 3712, 198, 220, 220, 17220, 4941, 284, 2858, 9633, 329, 22534, 4566, 3689, 13, 198, 198, 37811, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 4423, 346, 198, 11748, 18931, 198, 11748, 14601, 198, 11748, 850, 14681, 198, 6738, 331, 1130, 7109, 292, 346, 13, 1891, 2017, 1330, 4566, 48610, 198, 6738, 331, 1130, 7109, 292, 346, 1330, 3859, 11, 4899, 198, 66, 13533, 62, 40290, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 10943, 5631, 62, 47, 31688, 10426, 3256, 10148, 8, 198, 11250, 62, 7753, 796, 45302, 88, 1130, 7109, 292, 346, 13, 37581, 6, 198, 4299, 62, 11250, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 12286, 82, 13, 37581, 11537, 198, 361, 1779, 64, 62, 40290, 25, 198, 220, 220, 220, 514, 81, 62, 15908, 796, 1779, 64, 62, 40290, 198, 17772, 25, 198, 220, 220, 220, 514, 81, 62, 15908, 796, 28686, 13, 6978, 13, 11201, 392, 7220, 10786, 93, 11537, 198, 14629, 62, 11250, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 14629, 62, 15908, 11, 4566, 62, 7753, 8, 198, 17946, 62, 11250, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 1136, 66, 16993, 22784, 4566, 62, 7753, 8, 198, 361, 407, 28686, 13, 6978, 13, 4468, 576, 7, 14629, 62, 11250, 62, 7753, 2599, 220, 1303, 23864, 2611, 25, 645, 3002, 198, 220, 220, 220, 422, 331, 1130, 7109, 292, 346, 13, 75, 33213, 1330, 2721, 62, 75, 33213, 198, 220, 220, 220, 4423, 346, 13, 30073, 7, 4299, 62, 11250, 62, 7753, 11, 514, 81, 62, 11250, 62, 7753, 8, 198, 220, 220, 220, 2721, 62, 75, 33213, 13, 17350, 62, 439, 62, 75, 33213, 7, 6738, 62, 40406, 28, 17821, 8, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4871, 575, 1130, 16934, 46677, 7, 11250, 48610, 13, 16934, 46677, 11, 2134, 2599, 198, 220, 220, 220, 374, 37811, 16934, 30751, 326, 5860, 6045, 611, 3038, 407, 2810, 319, 651, 526, 15931, 628, 220, 220, 220, 825, 18126, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37811, 6892, 1170, 10007, 422, 262, 2656, 3696, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 23946, 796, 2116, 13557, 11600, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 16624, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 961, 7, 944, 13, 16624, 8, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2393, 62, 1462, 62, 19119, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37811, 2536, 25, 6462, 3108, 284, 2393, 326, 815, 307, 6153, 611, 4296, 62, 7753, 318, 198, 220, 220, 220, 220, 220, 220, 220, 1444, 1231, 281, 7952, 2393, 3108, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 16624, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 796, 2116, 13, 16624, 58, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 503, 628, 220, 220, 220, 825, 4296, 62, 7753, 7, 944, 11, 277, 3672, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37811, 16594, 503, 6153, 10154, 284, 257, 2393, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 357, 2536, 11, 11902, 2599, 6462, 3108, 284, 2393, 810, 10154, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7448, 13, 1002, 6045, 11, 2393, 62, 1462, 62, 19119, 318, 973, 13, 2896, 13185, 284, 6045, 13, 628, 220, 220, 220, 220, 220, 220, 220, 7567, 2696, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43160, 12331, 25, 1002, 277, 3672, 318, 6045, 290, 2393, 62, 1462, 62, 19119, 318, 6045, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 277, 3672, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 796, 2116, 13, 7753, 62, 1462, 62, 19119, 198, 220, 220, 220, 220, 220, 220, 220, 611, 277, 3672, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 43160, 12331, 7203, 2949, 2393, 2810, 393, 900, 379, 6282, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 69, 3672, 11, 705, 86, 11537, 355, 277, 67, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13564, 7, 16344, 8, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 422, 62, 16624, 7, 565, 82, 11, 3696, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37811, 42316, 257, 4566, 30751, 422, 257, 900, 286, 3696, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3696, 357, 4868, 2599, 1881, 393, 517, 3696, 326, 3689, 815, 307, 1100, 422, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 1502, 484, 815, 307, 9639, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12429, 46265, 22046, 25, 15891, 21179, 7159, 389, 3804, 284, 262, 1398, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23772, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 575, 1130, 16934, 46677, 25, 17056, 30751, 351, 1321, 9639, 422, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2810, 3696, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 537, 82, 7, 16624, 28, 16624, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 503, 13, 260, 2220, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 503, 628, 220, 220, 220, 825, 900, 7, 944, 11, 2665, 11, 3038, 11, 1988, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7248, 281, 3038, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 8367, 11, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 796, 33918, 13, 67, 8142, 7, 8367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 7, 56, 1130, 16934, 46677, 11, 2116, 737, 2617, 7, 5458, 11, 3038, 11, 1988, 28, 8367, 8, 628, 220, 220, 220, 825, 651, 7, 944, 11, 2665, 11, 3038, 11, 4277, 28, 14202, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 374, 37811, 13615, 6045, 611, 262, 2665, 14, 18076, 857, 407, 2152, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2665, 357, 2536, 2599, 6530, 286, 2665, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3038, 357, 2536, 2599, 6530, 286, 3038, 287, 2665, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4277, 357, 26801, 11, 11902, 2599, 11052, 326, 815, 307, 4504, 611, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2665, 290, 14, 273, 3038, 389, 407, 1043, 393, 389, 281, 6565, 4731, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2896, 13185, 284, 6045, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12429, 46265, 22046, 25, 15891, 21179, 7159, 389, 3804, 284, 262, 2560, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1398, 338, 651, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26181, 25, 10903, 5726, 611, 262, 2665, 1222, 3038, 2152, 11, 4306, 4277, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2665, 796, 2665, 13, 21037, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3038, 796, 3038, 13, 21037, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 10134, 62, 5458, 7, 5458, 8, 290, 2116, 13, 10134, 62, 18076, 7, 5458, 11, 3038, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3115, 857, 407, 670, 329, 17056, 46677, 355, 407, 19552, 422, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 796, 4566, 48610, 13, 16934, 46677, 13, 1136, 7, 944, 11, 2665, 11, 3038, 11, 12429, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2764, 6565, 13042, 355, 407, 2810, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 503, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 4277, 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, 1441, 2116, 13, 1891, 2017, 62, 2536, 17, 2100, 7, 448, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 4277, 628, 198, 2, 20768, 1096, 4566, 198, 88, 1130, 62, 37581, 62, 14629, 796, 575, 1130, 16934, 46677, 13, 6738, 62, 16624, 26933, 14629, 62, 11250, 62, 7753, 12962, 198, 88, 1130, 62, 37581, 796, 575, 1130, 16934, 46677, 13, 6738, 62, 16624, 26933, 4299, 62, 11250, 62, 7753, 11, 514, 81, 62, 11250, 62, 7753, 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, 1179, 62, 11250, 62, 7753, 12962, 628, 198, 4299, 4296, 62, 16129, 62, 11250, 7, 7109, 85, 11, 14267, 62, 40539, 654, 28, 25101, 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, 15560, 62, 75, 33213, 28, 14202, 11, 7139, 62, 75, 33213, 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, 49312, 28, 25101, 11, 15942, 577, 28, 25101, 2599, 198, 220, 220, 220, 374, 37811, 10260, 8398, 3689, 329, 257, 3303, 4639, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1553, 85, 357, 4868, 11, 1398, 2599, 1881, 393, 517, 3303, 6643, 326, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17839, 13, 198, 220, 220, 220, 220, 220, 220, 220, 14267, 62, 40539, 654, 357, 30388, 11, 11902, 2599, 1002, 6407, 11, 14601, 546, 4814, 3689, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 481, 407, 307, 4376, 13, 2896, 13185, 284, 10352, 13, 198, 220, 220, 220, 220, 220, 220, 220, 15560, 62, 75, 33213, 357, 4868, 11, 11902, 2599, 7343, 286, 8950, 326, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10058, 13, 2896, 13185, 284, 281, 6565, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 7139, 62, 75, 33213, 357, 4868, 11, 11902, 2599, 7343, 286, 8950, 326, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9343, 13, 2896, 13185, 284, 281, 6565, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 49312, 357, 30388, 11, 11902, 2599, 1002, 6407, 11, 262, 4683, 2393, 481, 307, 6993, 9108, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2896, 13185, 284, 10352, 13, 198, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 357, 30388, 11, 11902, 2599, 1002, 6407, 11, 1321, 546, 262, 4566, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 481, 307, 9066, 13, 2896, 13185, 284, 10352, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 15942, 577, 25, 198, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 4933, 38734, 2836, 8398, 2393, 329, 331, 1130, 7109, 292, 346, 379, 7479, 77, 59, 83, 4, 82, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4064, 514, 81, 62, 11250, 62, 7753, 8, 198, 220, 220, 220, 2051, 796, 17635, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 7109, 85, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1553, 85, 796, 685, 7109, 85, 60, 198, 220, 220, 220, 611, 15560, 62, 75, 33213, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 15560, 62, 75, 33213, 796, 17635, 198, 220, 220, 220, 611, 7139, 62, 75, 33213, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7139, 62, 75, 33213, 796, 17635, 198, 220, 220, 220, 611, 49312, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4423, 346, 13, 30073, 7, 4299, 62, 11250, 62, 7753, 11, 514, 81, 62, 11250, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 37581, 62, 14629, 13, 260, 2220, 3419, 198, 220, 220, 220, 329, 4686, 81, 85, 287, 1553, 85, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 14808, 7, 312, 81, 85, 13, 16129, 287, 15560, 62, 75, 33213, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 357, 312, 81, 85, 13, 16129, 287, 7139, 62, 75, 33213, 4008, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7, 7203, 4, 82, 3303, 1111, 9343, 290, 10058, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2949, 2223, 481, 307, 2077, 19570, 4064, 4686, 81, 85, 13, 16129, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 4686, 81, 85, 13, 16129, 287, 15560, 62, 75, 33213, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 37581, 62, 14629, 13, 2617, 7, 312, 81, 85, 13, 16129, 11, 705, 40223, 3256, 705, 17821, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 4686, 81, 85, 13, 16129, 287, 7139, 62, 75, 33213, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 37581, 62, 14629, 13, 2617, 7, 312, 81, 85, 13, 16129, 11, 705, 40223, 3256, 705, 25101, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 611, 331, 1130, 62, 37581, 62, 14629, 13, 1136, 7, 312, 81, 85, 13, 16129, 11, 705, 40223, 3256, 705, 25101, 27691, 21037, 3419, 6624, 705, 7942, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 220, 1303, 23864, 2611, 25, 645, 3002, 198, 220, 220, 220, 220, 220, 220, 220, 2051, 15853, 4686, 81, 85, 13, 11250, 495, 7, 88, 1130, 62, 37581, 62, 14629, 8, 198, 220, 220, 220, 331, 1130, 62, 37581, 62, 14629, 13, 19119, 62, 7753, 3419, 198, 220, 220, 220, 331, 1130, 62, 37581, 13, 260, 2220, 3419, 198, 220, 220, 220, 611, 407, 14267, 62, 40539, 654, 25, 198, 220, 220, 220, 220, 220, 220, 220, 329, 15951, 11, 2172, 11, 1715, 287, 2051, 25, 220, 1303, 23864, 2611, 25, 9168, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14601, 13, 40539, 7, 7203, 23722, 407, 900, 3038, 4064, 82, 287, 2665, 4064, 82, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 366, 5492, 900, 428, 287, 4064, 82, 284, 25, 4064, 82, 4943, 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, 4064, 357, 8738, 11, 15951, 11, 331, 1130, 62, 37581, 62, 14629, 13, 7753, 62, 1462, 62, 19119, 11, 1715, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43160, 20361, 8, 198, 220, 220, 220, 220, 198, 198, 4299, 1064, 62, 439, 7, 3672, 11, 3108, 2599, 198, 220, 220, 220, 374, 37811, 16742, 477, 10245, 286, 257, 2393, 351, 257, 1813, 1438, 1626, 262, 8619, 198, 220, 220, 220, 5509, 3599, 379, 257, 1813, 3108, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 357, 2536, 2599, 6530, 286, 262, 2393, 284, 307, 1043, 357, 4480, 262, 7552, 737, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 357, 2536, 11, 6045, 2599, 27387, 810, 2989, 815, 923, 13, 1002, 900, 284, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6045, 319, 3964, 11, 262, 1459, 8619, 290, 46490, 7885, 389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16499, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1351, 25, 1439, 10245, 286, 262, 7368, 2393, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 1255, 796, 17635, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3859, 13557, 271, 62, 5404, 25, 220, 1303, 23864, 2611, 25, 9168, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 3108, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 796, 850, 14681, 13, 9122, 62, 22915, 7, 14692, 3003, 1600, 1438, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17365, 28, 418, 13, 268, 2268, 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, 336, 1082, 81, 28, 7266, 14681, 13, 36886, 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, 503, 796, 850, 14681, 13, 9122, 62, 22915, 7, 14692, 3003, 1600, 12813, 81, 1600, 3108, 11, 1438, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17365, 28, 418, 13, 268, 2268, 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, 336, 1082, 81, 28, 7266, 14681, 13, 36886, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26498, 796, 14631, 19796, 1600, 27444, 43, 1600, 3108, 11, 27444, 4906, 1600, 366, 69, 1600, 27444, 3672, 1600, 1438, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 19796, 796, 850, 14681, 13, 47, 9654, 7, 22046, 11, 17365, 28, 418, 13, 268, 2268, 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, 336, 1082, 81, 28, 7266, 14681, 13, 47, 4061, 36, 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, 14367, 448, 28, 7266, 14681, 13, 47, 4061, 36, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 19282, 448, 7890, 11, 336, 1082, 4372, 1045, 8, 796, 279, 19796, 13, 10709, 5344, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 796, 14367, 448, 7890, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 300, 287, 336, 1082, 4372, 1045, 13, 35312, 6615, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 275, 6, 5990, 3411, 6699, 6, 407, 287, 300, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 850, 14681, 13, 34, 4262, 18709, 12331, 7, 79, 19796, 13, 7783, 8189, 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, 705, 45302, 22179, 7, 22046, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 28, 301, 1082, 4372, 1045, 8, 198, 220, 220, 220, 2845, 850, 14681, 13, 34, 4262, 18709, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 10148, 198, 220, 220, 220, 611, 407, 503, 13, 747, 10223, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 23243, 7, 448, 13, 35312, 6615, 28955, 198, 220, 220, 220, 1255, 796, 685, 418, 13, 6978, 13, 27237, 7442, 7, 418, 13, 6978, 13, 27237, 6978, 7, 76, 13, 12501, 1098, 10786, 40477, 12, 23, 6, 22305, 329, 285, 287, 1255, 60, 198, 220, 220, 220, 1441, 1255, 628, 198, 4299, 17276, 62, 7753, 7, 69, 3672, 11, 2858, 62, 45286, 11639, 34219, 3256, 8619, 62, 4868, 28, 14202, 2599, 198, 220, 220, 220, 374, 37811, 43, 13369, 257, 2393, 1626, 257, 900, 286, 13532, 5447, 416, 257, 1351, 393, 2858, 198, 220, 220, 220, 7885, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 277, 3672, 357, 2536, 2599, 6530, 286, 262, 2393, 326, 815, 307, 5140, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2858, 62, 45286, 357, 2536, 2599, 9344, 7885, 7268, 262, 900, 286, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13532, 326, 815, 307, 16499, 13, 2896, 13185, 284, 705, 34219, 4458, 1002, 6045, 11, 428, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21179, 4578, 481, 307, 9514, 13, 1002, 257, 1351, 318, 2810, 11, 340, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9672, 284, 307, 257, 1351, 286, 2858, 9633, 326, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16499, 287, 262, 7368, 1502, 13, 198, 220, 220, 220, 220, 220, 220, 220, 8619, 62, 4868, 357, 4868, 2599, 7343, 286, 13532, 326, 815, 307, 16499, 287, 3090, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 883, 7368, 416, 2858, 62, 45286, 13, 2896, 13185, 284, 6045, 290, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9514, 13, 2312, 29196, 481, 307, 16499, 307, 329, 883, 287, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7368, 2858, 9633, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 20512, 11, 965, 25, 6462, 3108, 284, 262, 5140, 2393, 611, 340, 373, 5140, 11, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4306, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 503, 796, 17635, 198, 220, 220, 220, 611, 14808, 24254, 13557, 271, 62, 5404, 290, 357, 38986, 62, 45286, 6624, 705, 34219, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 290, 357, 34945, 62, 4868, 318, 6045, 4008, 2599, 220, 1303, 23864, 2611, 25, 9168, 198, 220, 220, 220, 220, 220, 220, 220, 503, 15853, 1064, 62, 439, 7, 69, 3672, 11, 6045, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8619, 62, 4868, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8619, 62, 4868, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2858, 62, 45286, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 39098, 7, 38986, 62, 45286, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2858, 62, 45286, 796, 685, 38986, 62, 45286, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 2858, 62, 45286, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8619, 62, 4868, 15853, 28686, 13, 268, 2268, 13, 1136, 7, 87, 11, 10148, 737, 35312, 7, 418, 13, 6978, 325, 79, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 3108, 287, 8619, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 3108, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 15853, 1064, 62, 439, 7, 69, 3672, 11, 3108, 8, 198, 220, 220, 220, 611, 407, 503, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 717, 796, 503, 58, 15, 60, 198, 220, 220, 220, 611, 18896, 7, 448, 8, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 14601, 13, 40539, 7, 7203, 5167, 621, 530, 37633, 67, 8, 2872, 284, 4064, 82, 13, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 366, 12814, 717, 2872, 37633, 82, 8, 4943, 4064, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 11925, 7, 448, 828, 277, 3672, 11, 717, 828, 43160, 20361, 8, 198, 220, 220, 220, 1441, 717, 628, 198, 2, 5345, 3917, 2858, 9633, 198, 24330, 62, 8899, 796, 685, 10786, 24442, 3256, 705, 88, 1130, 3256, 705, 56, 11190, 62, 30531, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 24442, 3256, 705, 26224, 80, 3256, 705, 29138, 48, 62, 30531, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 24442, 3256, 705, 16366, 3256, 705, 56, 11190, 62, 5097, 28495, 62, 30531, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 8457, 684, 2395, 2611, 3256, 705, 12102, 378, 62, 5589, 3906, 3256, 705, 56, 11190, 62, 18831, 4061, 62, 9858, 47, 1340, 3525, 62, 23428, 2389, 6234, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 8457, 684, 2395, 2611, 3256, 705, 12102, 378, 62, 439, 62, 37348, 1095, 3256, 705, 56, 11190, 62, 23428, 2389, 6158, 62, 7036, 62, 44, 1546, 4090, 48075, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 26224, 80, 3256, 705, 14933, 10223, 3256, 705, 56, 11190, 62, 45, 29559, 47, 11598, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 26224, 80, 3256, 705, 4774, 3256, 705, 56, 11190, 62, 5653, 38, 62, 39, 10892, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 26224, 80, 3256, 705, 85, 4774, 3256, 705, 56, 11190, 62, 5653, 38, 62, 53, 39, 10892, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 26224, 80, 3256, 705, 7220, 3256, 705, 56, 11190, 62, 5653, 38, 62, 29904, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 26224, 80, 3256, 705, 28712, 3256, 705, 56, 11190, 62, 5653, 38, 62, 47, 54, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 1845, 29363, 3256, 705, 565, 5819, 3256, 705, 56, 11190, 62, 5097, 7759, 1137, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 628, 198, 4299, 651, 62, 88, 1130, 62, 75, 2467, 626, 7, 37581, 28, 14202, 11, 4277, 11639, 30531, 6, 2599, 198, 220, 220, 220, 374, 37811, 3855, 262, 1459, 2604, 1241, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 357, 25, 4871, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 56, 1130, 16934, 46677, 47671, 11902, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17056, 30751, 351, 3689, 326, 815, 307, 973, 284, 5004, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 1241, 13, 2896, 13185, 284, 1058, 7890, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 88, 1130, 62, 37581, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 357, 2536, 11, 11902, 2599, 5972, 1241, 326, 815, 307, 4504, 611, 262, 2604, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1241, 3038, 318, 407, 900, 287, 30218, 70, 13, 2896, 13185, 284, 705, 30531, 4458, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 965, 25, 5972, 1241, 4731, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 318, 62, 19849, 796, 4899, 13, 271, 62, 7266, 14681, 3419, 198, 220, 220, 220, 611, 30218, 70, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 796, 331, 1130, 62, 37581, 198, 220, 220, 220, 611, 318, 62, 19849, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2172, 796, 705, 16366, 6, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2172, 796, 705, 88, 1130, 6, 198, 220, 220, 220, 1441, 30218, 70, 13, 1136, 10786, 24442, 3256, 2172, 11, 4277, 8, 628, 198, 4299, 900, 62, 88, 1130, 62, 75, 2467, 626, 7, 5715, 11, 30218, 70, 28, 14202, 2599, 198, 220, 220, 220, 374, 37811, 7248, 262, 1459, 2604, 1241, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1241, 357, 2536, 2599, 5684, 326, 262, 2604, 815, 307, 900, 284, 13, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 357, 25, 4871, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 56, 1130, 16934, 46677, 47671, 11902, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17056, 30751, 351, 3689, 326, 815, 307, 973, 284, 4296, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2858, 13, 2896, 13185, 284, 1058, 7890, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 88, 1130, 62, 37581, 44646, 198, 220, 220, 220, 220, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 318, 62, 19849, 796, 4899, 13, 271, 62, 7266, 14681, 3419, 198, 220, 220, 220, 611, 30218, 70, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 796, 331, 1130, 62, 37581, 198, 220, 220, 220, 611, 318, 62, 19849, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2172, 796, 705, 16366, 6, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2172, 796, 705, 88, 1130, 6, 198, 220, 220, 220, 30218, 70, 13, 2617, 10786, 24442, 3256, 2172, 11, 1241, 8, 198, 220, 220, 220, 2604, 4971, 56, 11190, 796, 5418, 10786, 6404, 2667, 13, 4, 82, 6, 4064, 1241, 8, 198, 220, 220, 220, 331, 1130, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 88, 1130, 7109, 292, 346, 4943, 198, 220, 220, 220, 331, 1130, 62, 6404, 1362, 13, 2617, 4971, 7, 5715, 28, 6404, 4971, 56, 11190, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 4299, 30218, 70, 62, 6404, 2667, 7, 37581, 28, 14202, 2599, 198, 220, 220, 220, 374, 37811, 7248, 18931, 2974, 422, 4566, 3689, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 357, 25, 4871, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 56, 1130, 16934, 46677, 47671, 11902, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17056, 30751, 351, 3689, 326, 815, 307, 973, 284, 4296, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2858, 13, 2896, 13185, 284, 1058, 7890, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 88, 1130, 62, 37581, 44646, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 318, 62, 19849, 796, 4899, 13, 271, 62, 7266, 14681, 3419, 198, 220, 220, 220, 611, 30218, 70, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 796, 331, 1130, 62, 37581, 198, 220, 220, 220, 4808, 25294, 62, 21389, 1404, 796, 36521, 7, 5715, 3672, 8, 82, 25, 4, 7, 21412, 8, 82, 13, 4, 7, 20786, 5376, 8, 82, 58, 4, 7, 2815, 23397, 8, 67, 5974, 4, 7, 20500, 8, 82, 1, 198, 220, 220, 220, 18931, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 5794, 28, 62, 25294, 62, 21389, 1404, 8, 198, 220, 220, 220, 2604, 4971, 56, 11190, 796, 5418, 10786, 6404, 2667, 13, 4, 82, 6, 4064, 30218, 70, 13, 1136, 10786, 24442, 3256, 705, 88, 1130, 3256, 705, 11929, 28480, 6, 4008, 198, 220, 220, 220, 2604, 4971, 29138, 48, 796, 5418, 10786, 6404, 2667, 13, 4, 82, 6, 4064, 30218, 70, 13, 1136, 10786, 24442, 3256, 705, 26224, 80, 3256, 705, 10778, 6, 4008, 198, 220, 220, 220, 2604, 4971, 5097, 40, 796, 5418, 10786, 6404, 2667, 13, 4, 82, 6, 4064, 30218, 70, 13, 1136, 10786, 24442, 3256, 705, 16366, 3256, 705, 10778, 6, 4008, 198, 220, 220, 220, 331, 1130, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 88, 1130, 7109, 292, 346, 4943, 198, 220, 220, 220, 42721, 80, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 79, 9232, 4943, 198, 220, 220, 220, 611, 318, 62, 19849, 25, 198, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 6404, 1362, 13, 2617, 4971, 7, 5715, 28, 6404, 4971, 5097, 40, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 6404, 1362, 13, 2617, 4971, 7, 5715, 28, 6404, 4971, 56, 11190, 8, 198, 220, 220, 220, 42721, 80, 62, 6404, 1362, 13, 2617, 4971, 7, 5715, 28, 6404, 4971, 29138, 48, 8, 198, 220, 220, 220, 1303, 1114, 4981, 11, 6339, 262, 2604, 14542, 284, 14367, 448, 523, 326, 484, 389, 9066, 416, 262, 198, 220, 220, 220, 1303, 2746, 4639, 13, 198, 220, 220, 220, 611, 318, 62, 19849, 25, 198, 220, 220, 220, 220, 220, 220, 220, 21360, 796, 18931, 13, 12124, 25060, 7, 17597, 13, 19282, 448, 8, 198, 220, 220, 220, 220, 220, 220, 220, 21360, 13, 2617, 4971, 7, 6404, 4971, 5097, 40, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 1130, 62, 6404, 1362, 13, 2860, 25060, 7, 30281, 8, 198, 220, 220, 220, 220, 220, 220, 220, 42721, 80, 62, 6404, 1362, 13, 2860, 25060, 7, 30281, 8, 628, 198, 4299, 30218, 70, 62, 38986, 7, 24330, 28, 14202, 11, 30218, 70, 28, 14202, 2599, 198, 220, 220, 220, 374, 37811, 7248, 2858, 9633, 1912, 319, 4566, 3689, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 17365, 357, 11600, 11, 11902, 2599, 28261, 286, 2858, 9633, 326, 815, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 307, 6153, 13, 2896, 13185, 284, 4600, 418, 13, 268, 2268, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 357, 25, 4871, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 56, 1130, 16934, 46677, 47671, 11902, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17056, 30751, 351, 3689, 326, 815, 307, 973, 284, 4296, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2858, 13, 2896, 13185, 284, 1058, 7890, 25, 63, 88, 1130, 7109, 292, 346, 13, 11250, 13, 88, 1130, 62, 37581, 44646, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 17365, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 17365, 796, 28686, 13, 268, 2268, 198, 220, 220, 220, 611, 30218, 70, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 796, 331, 1130, 62, 37581, 198, 220, 220, 220, 329, 264, 11, 267, 11, 304, 287, 17365, 62, 8899, 25, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 30218, 70, 13, 1136, 7, 82, 11, 267, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 410, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17365, 58, 68, 60, 796, 410, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 2141, 4238, 4296, 286, 18931, 1222, 2858, 357, 1455, 1590, 8, 198, 37581, 62, 6404, 2667, 3419, 198, 37581, 62, 38986, 3419, 198 ]
2.236475
6,525
# -*- coding:utf-8; -*- class Solution: """ 解题思路:递归 """
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 26, 532, 9, 12, 628, 198, 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5525, 100, 96, 165, 95, 246, 45250, 251, 164, 115, 107, 171, 120, 248, 34460, 240, 37605, 240, 198, 220, 220, 220, 37227, 198 ]
1.372549
51
import requests_unixsocket import json from errors import NoSuchContainerError, ServerErrorError from utils.utils import Utils u = Utils() #https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/
[ 11748, 7007, 62, 403, 844, 44971, 198, 11748, 33918, 198, 6738, 8563, 1330, 1400, 16678, 29869, 12331, 11, 9652, 12331, 12331, 198, 198, 6738, 3384, 4487, 13, 26791, 1330, 7273, 4487, 198, 84, 796, 7273, 4487, 3419, 628, 198, 2, 5450, 1378, 31628, 13, 45986, 13, 785, 14, 18392, 14, 35790, 14, 15042, 14, 45986, 62, 47960, 62, 15042, 62, 85, 16, 13, 1731, 14, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 628, 628 ]
2.8875
80
quant_de_testes = int(input()) soma_de_impares_consecutivos(quant_de_testes)
[ 628, 198, 40972, 62, 2934, 62, 9288, 274, 796, 493, 7, 15414, 28955, 198, 82, 6086, 62, 2934, 62, 11011, 3565, 62, 1102, 4552, 452, 418, 7, 40972, 62, 2934, 62, 9288, 274, 8, 198 ]
2.285714
35
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import argparse import json import logging from google.cloud import bigquery def parse_arguments(): """Parse command line arguments.""" parser = argparse.ArgumentParser() parser.add_argument( '--output', type=str, required=False, help='GCS URL where results will be saved as a CSV.') parser.add_argument( '--query', type=str, required=True, help='The SQL query to be run in BigQuery') parser.add_argument( '--dataset_id', type=str, required=True, help='Dataset of the destination table.') parser.add_argument( '--table_id', type=str, required=True, help='Name of the destination table.') parser.add_argument( '--project', type=str, required=True, help='The GCP project to run the query.') args = parser.parse_args() return args if __name__ == '__main__': main()
[ 2, 15069, 2864, 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, 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, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 23645, 13, 17721, 1330, 1263, 22766, 628, 198, 198, 4299, 21136, 62, 853, 2886, 33529, 198, 220, 37227, 10044, 325, 3141, 1627, 7159, 526, 15931, 628, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 705, 438, 22915, 3256, 198, 220, 220, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 220, 220, 2672, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 1037, 11639, 38, 7902, 10289, 810, 2482, 481, 307, 7448, 355, 257, 44189, 2637, 8, 198, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 705, 438, 22766, 3256, 198, 220, 220, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 1037, 11639, 464, 16363, 12405, 284, 307, 1057, 287, 4403, 20746, 11537, 198, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 705, 438, 19608, 292, 316, 62, 312, 3256, 198, 220, 220, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 1037, 11639, 27354, 292, 316, 286, 262, 10965, 3084, 2637, 8, 198, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 705, 438, 11487, 62, 312, 3256, 198, 220, 220, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 1037, 11639, 5376, 286, 262, 10965, 3084, 2637, 8, 198, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 705, 438, 16302, 3256, 198, 220, 220, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 1037, 11639, 464, 402, 8697, 1628, 284, 1057, 262, 12405, 2637, 8, 628, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 220, 1441, 26498, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 1388, 3419, 198 ]
2.88932
515
import os import subprocess import sys import shutil import logging from typing import Optional, List import click from google.cloud import storage @click.command() @click.option('-b', "--bucket_name", help="(str) Name of GCS bucket") @click.option( '-r', "--requirement", help="(str) Name of Python package or requirements file", ) @click.option( '-d', "--download_dir", default="gcs_packages", help="(optional, str) File download destination", ) @click.option("-t", "--target", default="", help="(str) Package install destination") def main(bucket_name, requirement, download_dir, target): """Pip install {pkg_name}/{pkg_name_versioned}.tar.gz to current enviroment or a target directory (1) Copy package_name.tar.gz from Google Cloud bucket (2) Pip Install package_name.tar.gz into staging directory (3) Remove the package_name.tar.gz """ try: packages = [] if os.path.isfile(requirement): with open(requirement) as gs_requirements: for package_name in gs_requirements.readlines(): packages.append(package_name.strip()) else: packages.append(requirement) download_packages( bucket_name=bucket_name, package_list=packages, packages_download_dir=download_dir, ) logging.info('download done') install_packages(download_dir, target) finally: if os.path.exists(download_dir): shutil.rmtree(download_dir) def install_packages(packages_download_dir: str, target_dir: Optional[str] = None): """Install packages found in local directory. Do not install dependencies if target directory is specified. Args: packages_download_dir (str): Directory containing packages target_dir (str): Destination to install packages """ for gs_package_zip_file in os.listdir(packages_download_dir): if not target_dir: install_command = [ sys.executable, "-m", "pip", "install", "--quiet", "--upgrade", f"{packages_download_dir}/{gs_package_zip_file}", ] else: install_command = [ sys.executable, "-m", "pip", "install", "--quiet", "--no-deps", "--upgrade", "-t", target_dir, f"{packages_download_dir}/{gs_package_zip_file}", ] try: subprocess.check_output(install_command) except Exception: logging.warning("Attempting pip install with pyenv python") install_command[0] = f"{os.environ['HOME']}/.pyenv/shims/python" subprocess.check_output(install_command) def download_packages( packages_download_dir: str, bucket_name: str, package_list: List[str], ): """Download Python packages from GCS into a local directory. Args: packages_download_dir (str): Local directory to download packages into bucket_name (str): Name of GCS bucket to download packages from packages list(str): Names of packages found in bucket """ os.mkdir(packages_download_dir) storage_client = storage.Client() bucket = storage_client.bucket(bucket_name) for package_name in package_list: name_no_version = package_name.split("==")[0] name_versioned = package_name.replace("==", "-") package_filepath = f"{name_versioned}.tar.gz" gs_package_path = f"{name_no_version}/{package_filepath}" blob_package = bucket.blob(gs_package_path) blob_package.download_to_filename( os.path.join(packages_download_dir, package_filepath) )
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 18931, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 11748, 3904, 198, 6738, 23645, 13, 17721, 1330, 6143, 628, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 18076, 10786, 12, 65, 3256, 366, 438, 27041, 316, 62, 3672, 1600, 1037, 2625, 7, 2536, 8, 6530, 286, 402, 7902, 19236, 4943, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 705, 12, 81, 3256, 198, 220, 220, 220, 366, 438, 8897, 24615, 1600, 198, 220, 220, 220, 1037, 2625, 7, 2536, 8, 6530, 286, 11361, 5301, 393, 5359, 2393, 1600, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 705, 12, 67, 3256, 198, 220, 220, 220, 366, 438, 15002, 62, 15908, 1600, 198, 220, 220, 220, 4277, 2625, 70, 6359, 62, 43789, 1600, 198, 220, 220, 220, 1037, 2625, 7, 25968, 11, 965, 8, 9220, 4321, 10965, 1600, 198, 8, 198, 31, 12976, 13, 18076, 7203, 12, 83, 1600, 366, 438, 16793, 1600, 4277, 2625, 1600, 1037, 2625, 7, 2536, 8, 15717, 2721, 10965, 4943, 198, 4299, 1388, 7, 27041, 316, 62, 3672, 11, 9079, 11, 4321, 62, 15908, 11, 2496, 2599, 198, 220, 220, 220, 37227, 47, 541, 2721, 1391, 35339, 62, 3672, 92, 14, 90, 35339, 62, 3672, 62, 9641, 276, 27422, 18870, 13, 34586, 284, 198, 220, 220, 220, 1459, 17365, 343, 296, 298, 393, 257, 2496, 8619, 628, 220, 220, 220, 357, 16, 8, 17393, 5301, 62, 3672, 13, 18870, 13, 34586, 422, 3012, 10130, 19236, 628, 220, 220, 220, 357, 17, 8, 25149, 15545, 5301, 62, 3672, 13, 18870, 13, 34586, 656, 29475, 8619, 628, 220, 220, 220, 357, 18, 8, 17220, 262, 5301, 62, 3672, 13, 18870, 13, 34586, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10392, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 4468, 576, 7, 8897, 24615, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 8897, 24615, 8, 355, 308, 82, 62, 8897, 18883, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 5301, 62, 3672, 287, 308, 82, 62, 8897, 18883, 13, 961, 6615, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10392, 13, 33295, 7, 26495, 62, 3672, 13, 36311, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10392, 13, 33295, 7, 8897, 24615, 8, 628, 220, 220, 220, 220, 220, 220, 220, 4321, 62, 43789, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19236, 62, 3672, 28, 27041, 316, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5301, 62, 4868, 28, 43789, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10392, 62, 15002, 62, 15908, 28, 15002, 62, 15908, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 10951, 10786, 15002, 1760, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2721, 62, 43789, 7, 15002, 62, 15908, 11, 2496, 8, 198, 220, 220, 220, 3443, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 1069, 1023, 7, 15002, 62, 15908, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4423, 346, 13, 81, 16762, 631, 7, 15002, 62, 15908, 8, 628, 198, 4299, 2721, 62, 43789, 7, 43789, 62, 15002, 62, 15908, 25, 965, 11, 2496, 62, 15908, 25, 32233, 58, 2536, 60, 796, 6045, 2599, 198, 220, 220, 220, 37227, 15798, 10392, 1043, 287, 1957, 8619, 13, 2141, 407, 2721, 20086, 611, 198, 220, 220, 220, 2496, 8619, 318, 7368, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10392, 62, 15002, 62, 15908, 357, 2536, 2599, 27387, 7268, 10392, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 15908, 357, 2536, 2599, 45657, 284, 2721, 10392, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 329, 308, 82, 62, 26495, 62, 13344, 62, 7753, 287, 28686, 13, 4868, 15908, 7, 43789, 62, 15002, 62, 15908, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2496, 62, 15908, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2721, 62, 21812, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 18558, 18187, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27444, 76, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 79, 541, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17350, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 438, 39624, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 438, 929, 9526, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 43789, 62, 15002, 62, 15908, 92, 14, 90, 14542, 62, 26495, 62, 13344, 62, 7753, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2721, 62, 21812, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 18558, 18187, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27444, 76, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 79, 541, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17350, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 438, 39624, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 438, 3919, 12, 10378, 82, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 438, 929, 9526, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27444, 83, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 15908, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 43789, 62, 15002, 62, 15908, 92, 14, 90, 14542, 62, 26495, 62, 13344, 62, 7753, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 14681, 13, 9122, 62, 22915, 7, 17350, 62, 21812, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 43917, 7203, 37177, 278, 7347, 2721, 351, 12972, 24330, 21015, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2721, 62, 21812, 58, 15, 60, 796, 277, 1, 90, 418, 13, 268, 2268, 17816, 39069, 20520, 92, 11757, 9078, 24330, 14, 1477, 12078, 14, 29412, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 14681, 13, 9122, 62, 22915, 7, 17350, 62, 21812, 8, 628, 198, 4299, 4321, 62, 43789, 7, 198, 220, 220, 220, 10392, 62, 15002, 62, 15908, 25, 965, 11, 198, 220, 220, 220, 19236, 62, 3672, 25, 965, 11, 198, 220, 220, 220, 5301, 62, 4868, 25, 7343, 58, 2536, 4357, 198, 2599, 198, 220, 220, 220, 37227, 10002, 11361, 10392, 422, 402, 7902, 656, 257, 1957, 8619, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10392, 62, 15002, 62, 15908, 357, 2536, 2599, 10714, 8619, 284, 4321, 10392, 656, 198, 220, 220, 220, 220, 220, 220, 220, 19236, 62, 3672, 357, 2536, 2599, 6530, 286, 402, 7902, 19236, 284, 4321, 10392, 422, 198, 220, 220, 220, 220, 220, 220, 220, 10392, 1351, 7, 2536, 2599, 28531, 286, 10392, 1043, 287, 19236, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 28686, 13, 28015, 15908, 7, 43789, 62, 15002, 62, 15908, 8, 628, 220, 220, 220, 6143, 62, 16366, 796, 6143, 13, 11792, 3419, 198, 220, 220, 220, 19236, 796, 6143, 62, 16366, 13, 27041, 316, 7, 27041, 316, 62, 3672, 8, 628, 220, 220, 220, 329, 5301, 62, 3672, 287, 5301, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 62, 3919, 62, 9641, 796, 5301, 62, 3672, 13, 35312, 7203, 855, 4943, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 62, 9641, 276, 796, 5301, 62, 3672, 13, 33491, 7203, 855, 1600, 27444, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 5301, 62, 7753, 6978, 796, 277, 1, 90, 3672, 62, 9641, 276, 27422, 18870, 13, 34586, 1, 198, 220, 220, 220, 220, 220, 220, 220, 308, 82, 62, 26495, 62, 6978, 796, 277, 1, 90, 3672, 62, 3919, 62, 9641, 92, 14, 90, 26495, 62, 7753, 6978, 36786, 628, 220, 220, 220, 220, 220, 220, 220, 44812, 62, 26495, 796, 19236, 13, 2436, 672, 7, 14542, 62, 26495, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44812, 62, 26495, 13, 15002, 62, 1462, 62, 34345, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 43789, 62, 15002, 62, 15908, 11, 5301, 62, 7753, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198 ]
2.27459
1,708
#!/usr/bin/env python from django.core.management.utils import get_random_secret_key print(get_random_secret_key())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 26791, 1330, 651, 62, 25120, 62, 21078, 62, 2539, 198, 198, 4798, 7, 1136, 62, 25120, 62, 21078, 62, 2539, 28955, 198 ]
2.95
40
import json import os
[ 11748, 33918, 198, 11748, 28686, 628, 198 ]
3.428571
7
from .locate import ( this_dir, allow_relative_location_imports, force_relative_location_imports, append_sys_path, prepend_sys_path, )
[ 6738, 764, 75, 13369, 1330, 357, 198, 220, 220, 220, 428, 62, 15908, 11, 198, 220, 220, 220, 1249, 62, 43762, 62, 24886, 62, 320, 3742, 11, 198, 220, 220, 220, 2700, 62, 43762, 62, 24886, 62, 320, 3742, 11, 198, 220, 220, 220, 24443, 62, 17597, 62, 6978, 11, 198, 220, 220, 220, 3143, 437, 62, 17597, 62, 6978, 11, 198, 8, 198 ]
2.421875
64
from .basecontainer import inflateChildren from .. import LabeledContainer
[ 6738, 764, 8692, 34924, 1330, 1167, 17660, 26829, 198, 6738, 11485, 1330, 3498, 18449, 29869, 198 ]
4.6875
16
from functools import wraps import re from urllib.parse import unquote from twilio.base.exceptions import TwilioRestException from flask import ( current_app as app, render_template, request, Response, url_for, )
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 302, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 555, 22708, 198, 198, 6738, 665, 346, 952, 13, 8692, 13, 1069, 11755, 1330, 1815, 346, 952, 19452, 16922, 198, 198, 6738, 42903, 1330, 357, 198, 220, 220, 220, 1459, 62, 1324, 355, 598, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 18261, 11, 198, 220, 220, 220, 19016, 62, 1640, 11, 198, 8, 628, 628, 628, 198 ]
2.802326
86
""" .. module:: ldtui :synopsis: Main tools UI. .. moduleauthor:: Ezequiel Mastrasso """ from Qt import QtGui, QtWidgets, QtCore from Qt.QtWidgets import QApplication, QWidget, QLabel, QMainWindow import sys import imp import os import logging from functools import partial from ldtui import qtutils import ldt logger = logging.getLogger(__name__) class LDTWindow(QMainWindow): '''Main Tools UI Window. Loads the plugInfo.plugin_object.plugin_layout QWidget from all loaded plugins as tabs'''
[ 37811, 198, 492, 8265, 3712, 300, 28664, 9019, 198, 220, 220, 1058, 28869, 24608, 25, 8774, 4899, 12454, 13, 198, 198, 492, 8265, 9800, 3712, 412, 2736, 421, 8207, 30868, 81, 28372, 198, 198, 37811, 198, 198, 6738, 33734, 1330, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 11, 33734, 14055, 198, 6738, 33734, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 38300, 11, 1195, 33986, 11, 1195, 13383, 27703, 198, 198, 11748, 25064, 198, 11748, 848, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 300, 28664, 9019, 1330, 10662, 83, 26791, 198, 198, 11748, 300, 28664, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4871, 406, 24544, 27703, 7, 48, 13383, 27703, 2599, 198, 220, 220, 220, 705, 7061, 13383, 20003, 12454, 26580, 13, 8778, 82, 262, 6107, 12360, 13, 33803, 62, 15252, 13, 33803, 62, 39786, 198, 220, 220, 220, 1195, 38300, 422, 477, 9639, 20652, 355, 22524, 7061, 6, 198 ]
2.976744
172
import unittest from poker import best_hands if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 27101, 1330, 1266, 62, 43365, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.714286
35
from lib.actions import BaseAction
[ 6738, 9195, 13, 4658, 1330, 7308, 12502, 628 ]
4.5
8
from rest_framework import serializers from .models import Exchange
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 12516, 198 ]
4.6
15
from dataclasses import field from enum import Enum from typing import Dict, List, Optional, Union from . import is_pydantic_available from .doc import generate_doc_dataclass if is_pydantic_available(): from pydantic.dataclasses import dataclass else: from dataclasses import dataclass @generate_doc_dataclass @dataclass class Calibration: """Parameters for post-training calibration with static quantization.""" method: CalibrationMethods = field( metadata={"description": 'Calibration method used, either "minmax", "entropy" or "percentile".'} ) num_calibration_samples: int = field( metadata={ "description": "Number of examples to use for the calibration step resulting from static quantization." } ) calibration_histogram_percentile: Optional[float] = field( default=None, metadata={"description": "The percentile used for the percentile calibration method."} ) calibration_moving_average: Optional[bool] = field( default=None, metadata={ "description": "Whether to compute the moving average of the minimum and maximum values for the minmax calibration method." }, ) calibration_moving_average_constant: Optional[float] = field( default=None, metadata={ "description": "Constant smoothing factor to use when computing the moving average of the minimum and maximum values. Effective only when the selected calibration method is minmax and `calibration_moving_average` is set to True." }, ) @generate_doc_dataclass @dataclass @generate_doc_dataclass @dataclass @generate_doc_dataclass @dataclass @generate_doc_dataclass @dataclass class DatasetArgs: """Parameters related to the dataset.""" path: str = field(metadata={"description": "Path to the dataset, as in `datasets.load_dataset(path)`."}) eval_split: str = field(metadata={"description": 'Dataset split used for evaluation (e.g. "test").'}) data_keys: Dict[str, Union[None, str]] = field( metadata={ "description": 'Dataset columns used as input data. At most two, indicated with "primary" and "secondary".' } ) ref_keys: List[str] = field(metadata={"description": "Dataset column used for references during evaluation."}) name: Optional[str] = field( default=None, metadata={"description": "Name of the dataset, as in `datasets.load_dataset(path, name)`."} ) calibration_split: Optional[str] = field( default=None, metadata={"description": 'Dataset split used for calibration (e.g. "train").'} ) @generate_doc_dataclass @dataclass class TaskArgs: """Task-specific parameters.""" is_regression: Optional[bool] = field( default=None, metadata={ "description": "Text classification specific. Set whether the task is regression (output = one float)." }, ) @dataclass @dataclass @dataclass class _RunConfigBase: """Parameters defining a run. A run is an evaluation of a triplet (model, dataset, metric) coupled with optimization parameters, allowing to compare a transformers baseline and a model optimized with Optimum.""" metrics: List[str] = field(metadata={"description": "List of metrics to evaluate on."}) @dataclass @dataclass @generate_doc_dataclass @dataclass class RunConfig(Run, _RunConfigDefaults, _RunConfigBase): """Class holding the parameters to launch a run.""" pass
[ 6738, 4818, 330, 28958, 1330, 2214, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 11, 4479, 198, 198, 6738, 764, 1330, 318, 62, 79, 5173, 5109, 62, 15182, 198, 6738, 764, 15390, 1330, 7716, 62, 15390, 62, 19608, 330, 31172, 628, 198, 361, 318, 62, 79, 5173, 5109, 62, 15182, 33529, 198, 220, 220, 220, 422, 279, 5173, 5109, 13, 19608, 330, 28958, 1330, 4818, 330, 31172, 198, 17772, 25, 198, 220, 220, 220, 422, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 628, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 198, 4871, 2199, 571, 1358, 25, 198, 220, 220, 220, 37227, 48944, 329, 1281, 12, 34409, 36537, 351, 9037, 5554, 1634, 526, 15931, 628, 220, 220, 220, 2446, 25, 2199, 571, 1358, 46202, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 28, 4895, 11213, 1298, 705, 9771, 571, 1358, 2446, 973, 11, 2035, 366, 1084, 9806, 1600, 366, 298, 28338, 1, 393, 366, 25067, 576, 1911, 6, 92, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 997, 62, 9948, 571, 1358, 62, 82, 12629, 25, 493, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 366, 15057, 286, 6096, 284, 779, 329, 262, 36537, 2239, 7186, 422, 9037, 5554, 1634, 526, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 36537, 62, 10034, 21857, 62, 25067, 576, 25, 32233, 58, 22468, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 20150, 28, 4895, 11213, 1298, 366, 464, 37894, 973, 329, 262, 37894, 36537, 2446, 526, 92, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 36537, 62, 31462, 62, 23913, 25, 32233, 58, 30388, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 366, 15354, 284, 24061, 262, 3867, 2811, 286, 262, 5288, 290, 5415, 3815, 329, 262, 949, 9806, 36537, 2446, 526, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 36537, 62, 31462, 62, 23913, 62, 9979, 415, 25, 32233, 58, 22468, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 366, 3103, 18797, 32746, 722, 5766, 284, 779, 618, 14492, 262, 3867, 2811, 286, 262, 5288, 290, 5415, 3815, 13, 29455, 691, 618, 262, 6163, 36537, 2446, 318, 949, 9806, 290, 4600, 9948, 571, 1358, 62, 31462, 62, 23913, 63, 318, 900, 284, 6407, 526, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 198, 4871, 16092, 292, 316, 42035, 25, 198, 220, 220, 220, 37227, 48944, 3519, 284, 262, 27039, 526, 15931, 628, 220, 220, 220, 3108, 25, 965, 796, 2214, 7, 38993, 28, 4895, 11213, 1298, 366, 15235, 284, 262, 27039, 11, 355, 287, 4600, 19608, 292, 1039, 13, 2220, 62, 19608, 292, 316, 7, 6978, 8, 63, 526, 30072, 198, 220, 220, 220, 5418, 62, 35312, 25, 965, 796, 2214, 7, 38993, 28, 4895, 11213, 1298, 705, 27354, 292, 316, 6626, 973, 329, 12660, 357, 68, 13, 70, 13, 366, 9288, 11074, 6, 30072, 198, 220, 220, 220, 1366, 62, 13083, 25, 360, 713, 58, 2536, 11, 4479, 58, 14202, 11, 965, 11907, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 705, 27354, 292, 316, 15180, 973, 355, 5128, 1366, 13, 1629, 749, 734, 11, 8203, 351, 366, 39754, 1, 290, 366, 38238, 1911, 6, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1006, 62, 13083, 25, 7343, 58, 2536, 60, 796, 2214, 7, 38993, 28, 4895, 11213, 1298, 366, 27354, 292, 316, 5721, 973, 329, 10288, 1141, 12660, 526, 30072, 198, 220, 220, 220, 1438, 25, 32233, 58, 2536, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 20150, 28, 4895, 11213, 1298, 366, 5376, 286, 262, 27039, 11, 355, 287, 4600, 19608, 292, 1039, 13, 2220, 62, 19608, 292, 316, 7, 6978, 11, 1438, 8, 63, 526, 92, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 36537, 62, 35312, 25, 32233, 58, 2536, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 20150, 28, 4895, 11213, 1298, 705, 27354, 292, 316, 6626, 973, 329, 36537, 357, 68, 13, 70, 13, 366, 27432, 11074, 6, 92, 198, 220, 220, 220, 1267, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 198, 4871, 15941, 42035, 25, 198, 220, 220, 220, 37227, 25714, 12, 11423, 10007, 526, 15931, 628, 220, 220, 220, 318, 62, 2301, 2234, 25, 32233, 58, 30388, 60, 796, 2214, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 366, 8206, 17923, 2176, 13, 5345, 1771, 262, 4876, 318, 20683, 357, 22915, 796, 530, 12178, 21387, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 1267, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198, 4871, 4808, 10987, 16934, 14881, 25, 198, 220, 220, 220, 37227, 48944, 16215, 257, 1057, 13, 317, 1057, 318, 281, 12660, 286, 257, 15055, 83, 357, 19849, 11, 27039, 11, 18663, 8, 18064, 351, 23989, 10007, 11, 5086, 284, 8996, 257, 6121, 364, 14805, 290, 257, 2746, 23392, 351, 13123, 2847, 526, 15931, 628, 220, 220, 220, 20731, 25, 7343, 58, 2536, 60, 796, 2214, 7, 38993, 28, 4895, 11213, 1298, 366, 8053, 286, 20731, 284, 13446, 319, 526, 30072, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 8612, 378, 62, 15390, 62, 19608, 330, 31172, 198, 31, 19608, 330, 31172, 198, 4871, 5660, 16934, 7, 10987, 11, 4808, 10987, 16934, 7469, 13185, 11, 4808, 10987, 16934, 14881, 2599, 198, 220, 220, 220, 37227, 9487, 4769, 262, 10007, 284, 4219, 257, 1057, 526, 15931, 628, 220, 220, 220, 1208, 198 ]
2.947679
1,185
""" =========================================================== Plot single trial activity, grouped by ROI and sorted by RT =========================================================== This will produce what is sometimes called an event related potential / field (ERP/ERF) image. The EEGLAB example file, which contains an experiment with button press responses to simple visual stimuli, is read in and response times are calculated. Regions of Interest are determined by the channel types (in 10/20 channel notation, even channels are right, odd are left, and 'z' are central). The median and the Global Field Power within each channel group is calculated, and the trials are plotted, sorting by response time. """ # Authors: Jona Sassenhagen <[email protected]> # # License: BSD-3-Clause # %% import mne from mne.event import define_target_events from mne.channels import make_1020_channel_selections print(__doc__) # %% # Load EEGLAB example data (a small EEG dataset) data_path = mne.datasets.testing.data_path() fname = data_path / 'EEGLAB' / 'test_raw.set' event_id = {"rt": 1, "square": 2} # must be specified for str events raw = mne.io.read_raw_eeglab(fname) mapping = { 'EEG 000': 'Fpz', 'EEG 001': 'EOG1', 'EEG 002': 'F3', 'EEG 003': 'Fz', 'EEG 004': 'F4', 'EEG 005': 'EOG2', 'EEG 006': 'FC5', 'EEG 007': 'FC1', 'EEG 008': 'FC2', 'EEG 009': 'FC6', 'EEG 010': 'T7', 'EEG 011': 'C3', 'EEG 012': 'C4', 'EEG 013': 'Cz', 'EEG 014': 'T8', 'EEG 015': 'CP5', 'EEG 016': 'CP1', 'EEG 017': 'CP2', 'EEG 018': 'CP6', 'EEG 019': 'P7', 'EEG 020': 'P3', 'EEG 021': 'Pz', 'EEG 022': 'P4', 'EEG 023': 'P8', 'EEG 024': 'PO7', 'EEG 025': 'PO3', 'EEG 026': 'POz', 'EEG 027': 'PO4', 'EEG 028': 'PO8', 'EEG 029': 'O1', 'EEG 030': 'Oz', 'EEG 031': 'O2' } raw.rename_channels(mapping) raw.set_channel_types({"EOG1": 'eog', "EOG2": 'eog'}) raw.set_montage('standard_1020') events = mne.events_from_annotations(raw, event_id)[0] # %% # Create Epochs # define target events: # 1. find response times: distance between "square" and "rt" events # 2. extract A. "square" events B. followed by a button press within 700 msec tmax = 0.7 sfreq = raw.info["sfreq"] reference_id, target_id = 2, 1 new_events, rts = define_target_events(events, reference_id, target_id, sfreq, tmin=0., tmax=tmax, new_id=2) epochs = mne.Epochs(raw, events=new_events, tmax=tmax + 0.1, event_id={"square": 2}) # %% # Plot using :term:`global field power` # Parameters for plotting order = rts.argsort() # sorting from fast to slow trials selections = make_1020_channel_selections(epochs.info, midline="12z") # The actual plots (GFP) epochs.plot_image(group_by=selections, order=order, sigma=1.5, overlay_times=rts / 1000., combine='gfp', ts_args=dict(vlines=[0, rts.mean() / 1000.])) # %% # Plot using median epochs.plot_image(group_by=selections, order=order, sigma=1.5, overlay_times=rts / 1000., combine='median', ts_args=dict(vlines=[0, rts.mean() / 1000.]))
[ 37811, 198, 10052, 4770, 2559, 18604, 198, 43328, 2060, 4473, 3842, 11, 32824, 416, 15107, 40, 290, 23243, 416, 11923, 198, 10052, 4770, 2559, 18604, 198, 198, 1212, 481, 4439, 644, 318, 3360, 1444, 281, 1785, 3519, 198, 13059, 1843, 1220, 2214, 357, 1137, 47, 14, 1137, 37, 8, 2939, 13, 198, 198, 464, 48749, 48780, 1672, 2393, 11, 543, 4909, 281, 6306, 351, 4936, 1803, 198, 16733, 274, 284, 2829, 5874, 25973, 11, 318, 1100, 287, 290, 2882, 1661, 389, 198, 9948, 49262, 13, 198, 8081, 507, 286, 12033, 389, 5295, 416, 262, 6518, 3858, 357, 259, 838, 14, 1238, 6518, 198, 38983, 11, 772, 9619, 389, 826, 11, 5629, 389, 1364, 11, 290, 705, 89, 6, 389, 4318, 737, 383, 198, 1150, 666, 290, 262, 8060, 7663, 4333, 1626, 1123, 6518, 1448, 318, 10488, 11, 198, 392, 262, 9867, 389, 37515, 11, 29407, 416, 2882, 640, 13, 198, 37811, 198, 2, 46665, 25, 449, 4450, 48572, 30347, 1279, 73, 4450, 13, 82, 562, 30347, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 13789, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 198, 2, 43313, 198, 198, 11748, 285, 710, 198, 6738, 285, 710, 13, 15596, 1330, 8160, 62, 16793, 62, 31534, 198, 6738, 285, 710, 13, 354, 8961, 1330, 787, 62, 940, 1238, 62, 17620, 62, 19738, 507, 198, 198, 4798, 7, 834, 15390, 834, 8, 198, 198, 2, 43313, 198, 2, 8778, 48749, 48780, 1672, 1366, 357, 64, 1402, 48749, 27039, 8, 198, 7890, 62, 6978, 796, 285, 710, 13, 19608, 292, 1039, 13, 33407, 13, 7890, 62, 6978, 3419, 198, 69, 3672, 796, 1366, 62, 6978, 1220, 705, 6500, 8763, 6242, 6, 1220, 705, 9288, 62, 1831, 13, 2617, 6, 198, 198, 15596, 62, 312, 796, 19779, 17034, 1298, 352, 11, 366, 23415, 1298, 362, 92, 220, 1303, 1276, 307, 7368, 329, 965, 2995, 198, 1831, 796, 285, 710, 13, 952, 13, 961, 62, 1831, 62, 1453, 4743, 397, 7, 69, 3672, 8, 198, 198, 76, 5912, 796, 1391, 198, 220, 220, 220, 705, 6500, 38, 12877, 10354, 705, 37, 79, 89, 3256, 705, 6500, 38, 3571, 16, 10354, 705, 4720, 38, 16, 3256, 705, 6500, 38, 3571, 17, 10354, 705, 37, 18, 3256, 705, 6500, 38, 3571, 18, 10354, 705, 37, 89, 3256, 198, 220, 220, 220, 705, 6500, 38, 3571, 19, 10354, 705, 37, 19, 3256, 705, 6500, 38, 3571, 20, 10354, 705, 4720, 38, 17, 3256, 705, 6500, 38, 3571, 21, 10354, 705, 4851, 20, 3256, 705, 6500, 38, 3571, 22, 10354, 705, 4851, 16, 3256, 198, 220, 220, 220, 705, 6500, 38, 3571, 23, 10354, 705, 4851, 17, 3256, 705, 6500, 38, 3571, 24, 10354, 705, 4851, 21, 3256, 705, 6500, 38, 5534, 15, 10354, 705, 51, 22, 3256, 705, 6500, 38, 5534, 16, 10354, 705, 34, 18, 3256, 198, 220, 220, 220, 705, 6500, 38, 5534, 17, 10354, 705, 34, 19, 3256, 705, 6500, 38, 5534, 18, 10354, 705, 34, 89, 3256, 705, 6500, 38, 5534, 19, 10354, 705, 51, 23, 3256, 705, 6500, 38, 5534, 20, 10354, 705, 8697, 20, 3256, 198, 220, 220, 220, 705, 6500, 38, 5534, 21, 10354, 705, 8697, 16, 3256, 705, 6500, 38, 5534, 22, 10354, 705, 8697, 17, 3256, 705, 6500, 38, 5534, 23, 10354, 705, 8697, 21, 3256, 705, 6500, 38, 5534, 24, 10354, 705, 47, 22, 3256, 198, 220, 220, 220, 705, 6500, 38, 657, 1238, 10354, 705, 47, 18, 3256, 705, 6500, 38, 657, 2481, 10354, 705, 47, 89, 3256, 705, 6500, 38, 657, 1828, 10354, 705, 47, 19, 3256, 705, 6500, 38, 657, 1954, 10354, 705, 47, 23, 3256, 198, 220, 220, 220, 705, 6500, 38, 657, 1731, 10354, 705, 16402, 22, 3256, 705, 6500, 38, 657, 1495, 10354, 705, 16402, 18, 3256, 705, 6500, 38, 657, 2075, 10354, 705, 16402, 89, 3256, 705, 6500, 38, 657, 1983, 10354, 705, 16402, 19, 3256, 198, 220, 220, 220, 705, 6500, 38, 657, 2078, 10354, 705, 16402, 23, 3256, 705, 6500, 38, 657, 1959, 10354, 705, 46, 16, 3256, 705, 6500, 38, 657, 1270, 10354, 705, 46, 89, 3256, 705, 6500, 38, 657, 3132, 10354, 705, 46, 17, 6, 198, 92, 198, 1831, 13, 918, 480, 62, 354, 8961, 7, 76, 5912, 8, 198, 1831, 13, 2617, 62, 17620, 62, 19199, 7, 4895, 4720, 38, 16, 1298, 705, 68, 519, 3256, 366, 4720, 38, 17, 1298, 705, 68, 519, 6, 30072, 198, 1831, 13, 2617, 62, 8691, 496, 10786, 20307, 62, 940, 1238, 11537, 198, 198, 31534, 796, 285, 710, 13, 31534, 62, 6738, 62, 34574, 602, 7, 1831, 11, 1785, 62, 312, 38381, 15, 60, 198, 198, 2, 43313, 198, 2, 13610, 4551, 5374, 82, 198, 198, 2, 8160, 2496, 2995, 25, 198, 2, 352, 13, 1064, 2882, 1661, 25, 5253, 1022, 366, 23415, 1, 290, 366, 17034, 1, 2995, 198, 2, 362, 13, 7925, 317, 13, 366, 23415, 1, 2995, 347, 13, 3940, 416, 257, 4936, 1803, 1626, 13037, 43242, 198, 83, 9806, 796, 657, 13, 22, 198, 82, 19503, 80, 796, 8246, 13, 10951, 14692, 82, 19503, 80, 8973, 198, 35790, 62, 312, 11, 2496, 62, 312, 796, 362, 11, 352, 198, 3605, 62, 31534, 11, 374, 912, 796, 8160, 62, 16793, 62, 31534, 7, 31534, 11, 4941, 62, 312, 11, 2496, 62, 312, 11, 264, 19503, 80, 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, 256, 1084, 28, 15, 1539, 256, 9806, 28, 83, 9806, 11, 649, 62, 312, 28, 17, 8, 198, 198, 538, 5374, 82, 796, 285, 710, 13, 13807, 5374, 82, 7, 1831, 11, 2995, 28, 3605, 62, 31534, 11, 256, 9806, 28, 83, 9806, 1343, 657, 13, 16, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1785, 62, 312, 28, 4895, 23415, 1298, 362, 30072, 198, 198, 2, 43313, 198, 2, 28114, 1262, 1058, 4354, 25, 63, 20541, 2214, 1176, 63, 198, 198, 2, 40117, 329, 29353, 198, 2875, 796, 374, 912, 13, 22046, 419, 3419, 220, 1303, 29407, 422, 3049, 284, 3105, 9867, 198, 198, 19738, 507, 796, 787, 62, 940, 1238, 62, 17620, 62, 19738, 507, 7, 538, 5374, 82, 13, 10951, 11, 3095, 1370, 2625, 1065, 89, 4943, 198, 198, 2, 383, 4036, 21528, 357, 38, 5837, 8, 198, 538, 5374, 82, 13, 29487, 62, 9060, 7, 8094, 62, 1525, 28, 19738, 507, 11, 1502, 28, 2875, 11, 264, 13495, 28, 16, 13, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33345, 62, 22355, 28, 81, 912, 1220, 8576, 1539, 12082, 11639, 70, 46428, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40379, 62, 22046, 28, 11600, 7, 85, 6615, 41888, 15, 11, 374, 912, 13, 32604, 3419, 1220, 8576, 8183, 4008, 198, 198, 2, 43313, 198, 2, 28114, 1262, 14288, 198, 198, 538, 5374, 82, 13, 29487, 62, 9060, 7, 8094, 62, 1525, 28, 19738, 507, 11, 1502, 28, 2875, 11, 264, 13495, 28, 16, 13, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33345, 62, 22355, 28, 81, 912, 1220, 8576, 1539, 12082, 11639, 1150, 666, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 40379, 62, 22046, 28, 11600, 7, 85, 6615, 41888, 15, 11, 374, 912, 13, 32604, 3419, 1220, 8576, 8183, 4008, 198 ]
2.432369
1,279
# This file is intended for local testing when contributing to this repository # Do not commit any changes # You will need to generate a GitLab Personal Access Token to use this from os import environ as env import gitlab from gitlabchangelog.changelog import Changelog env["GITLAB_URL"] = "https://gitlab.invenia.ca" env["GITLAB_API_TOKEN"] = "<the-personal-access-token-you-created>" client = gitlab.Gitlab(env["GITLAB_URL"], private_token=env["GITLAB_API_TOKEN"]) repo = "invenia/Example.jl" p = client.projects.get(repo, lazy=True) template = """ This is release {{ version }} of {{ package }}. {% if merge_requests %} **Summary:** {% for merge_request in merge_requests %} - {{ merge_request.labels }} {{ merge_request.title }} (!{{ merge_request.number }}) {% endfor %} {% endif %} {% if previous_release %} **Changeset:** {{ compare_url }}) {% endif %} """ changelog = Changelog(p, template) tags = p.tags.list(all=False) for tag in tags: commit = tag.commit["id"] version = tag.name release_notes = changelog.get(version, commit) print(release_notes) print("\n-----------------------------------------------------------------------\n") # Note the line below will actually set the release notes in the repository used # Should only be used if that is the intended behaviour # tag.set_release_description(release_notes)
[ 2, 770, 2393, 318, 5292, 329, 1957, 4856, 618, 14329, 284, 428, 16099, 198, 2, 2141, 407, 4589, 597, 2458, 198, 2, 921, 481, 761, 284, 7716, 257, 15151, 17822, 15644, 8798, 29130, 284, 779, 428, 198, 6738, 28686, 1330, 551, 2268, 355, 17365, 198, 11748, 17606, 23912, 198, 6738, 17606, 23912, 354, 8368, 519, 13, 354, 8368, 519, 1330, 609, 8368, 519, 198, 198, 24330, 14692, 38, 2043, 48780, 62, 21886, 8973, 796, 366, 5450, 1378, 18300, 23912, 13, 259, 574, 544, 13, 6888, 1, 198, 24330, 14692, 38, 2043, 48780, 62, 17614, 62, 10468, 43959, 8973, 796, 33490, 1169, 12, 22682, 12, 15526, 12, 30001, 12, 5832, 12, 25598, 24618, 198, 16366, 796, 17606, 23912, 13, 38, 270, 23912, 7, 24330, 14692, 38, 2043, 48780, 62, 21886, 33116, 2839, 62, 30001, 28, 24330, 14692, 38, 2043, 48780, 62, 17614, 62, 10468, 43959, 8973, 8, 198, 198, 260, 7501, 796, 366, 259, 574, 544, 14, 16281, 13, 20362, 1, 198, 79, 796, 5456, 13, 42068, 13, 1136, 7, 260, 7501, 11, 16931, 28, 17821, 8, 198, 198, 28243, 796, 37227, 198, 1212, 318, 2650, 22935, 2196, 34949, 286, 22935, 5301, 1782, 27422, 628, 220, 220, 220, 1391, 4, 611, 20121, 62, 8897, 3558, 4064, 92, 198, 220, 220, 220, 12429, 22093, 25, 1174, 198, 220, 220, 220, 1391, 4, 329, 20121, 62, 25927, 287, 20121, 62, 8897, 3558, 4064, 92, 198, 220, 220, 220, 220, 220, 220, 220, 532, 22935, 20121, 62, 25927, 13, 23912, 1424, 34949, 22935, 20121, 62, 25927, 13, 7839, 34949, 22759, 27007, 20121, 62, 25927, 13, 17618, 1782, 30072, 198, 220, 220, 220, 1391, 4, 886, 1640, 4064, 92, 198, 220, 220, 220, 1391, 4, 45762, 4064, 92, 628, 220, 220, 220, 1391, 4, 611, 2180, 62, 20979, 4064, 92, 198, 220, 220, 220, 12429, 29238, 316, 25, 1174, 22935, 8996, 62, 6371, 1782, 30072, 198, 220, 220, 220, 1391, 4, 45762, 4064, 92, 198, 37811, 198, 198, 354, 8368, 519, 796, 609, 8368, 519, 7, 79, 11, 11055, 8, 198, 198, 31499, 796, 279, 13, 31499, 13, 4868, 7, 439, 28, 25101, 8, 198, 1640, 7621, 287, 15940, 25, 198, 220, 220, 220, 4589, 796, 7621, 13, 41509, 14692, 312, 8973, 198, 220, 220, 220, 2196, 796, 7621, 13, 3672, 628, 220, 220, 220, 2650, 62, 17815, 796, 1488, 417, 519, 13, 1136, 7, 9641, 11, 4589, 8, 198, 220, 220, 220, 3601, 7, 20979, 62, 17815, 8, 198, 220, 220, 220, 3601, 7203, 59, 77, 10097, 26866, 59, 77, 4943, 628, 220, 220, 220, 1303, 5740, 262, 1627, 2174, 481, 1682, 900, 262, 2650, 4710, 287, 262, 16099, 973, 198, 220, 220, 220, 1303, 10358, 691, 307, 973, 611, 326, 318, 262, 5292, 9172, 198, 220, 220, 220, 1303, 7621, 13, 2617, 62, 20979, 62, 11213, 7, 20979, 62, 17815, 8, 198 ]
3
469
import os from pathlib import Path from colorama import Fore, init if __name__ == '__main__': Tree().main()
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3124, 1689, 1330, 4558, 11, 2315, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 12200, 22446, 12417, 3419, 198 ]
2.688889
45
import uuid from django.core.exceptions import ValidationError from django.db import models from sagepaypi.constants import COUNTRY_CHOICES, US_STATE_CHOICES from sagepaypi.models import CardIdentifier from tests.test_case import AppTestCase # fields # properties # validation
[ 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 35021, 15577, 14415, 13, 9979, 1187, 1330, 31404, 40405, 62, 44899, 34444, 11, 1294, 62, 44724, 62, 44899, 34444, 198, 6738, 35021, 15577, 14415, 13, 27530, 1330, 5172, 33234, 7483, 198, 198, 6738, 5254, 13, 9288, 62, 7442, 1330, 2034, 14402, 20448, 628, 198, 220, 220, 220, 1303, 7032, 628, 220, 220, 220, 1303, 6608, 628, 220, 220, 220, 1303, 21201, 198 ]
3.288889
90
"""Setup for Axis.""" from setuptools import setup setup( name="axis", packages=["axis"], version="33", description="A Python library for communicating with devices from Axis Communications", author="Robert Svensson", author_email="[email protected]", license="MIT", url="https://github.com/Kane610/axis", download_url="https://github.com/Kane610/axis/archive/v33.tar.gz", install_requires=["attrs", "requests", "xmltodict"], keywords=["axis", "vapix", "onvif", "event stream", "homeassistant"], classifiers=["Natural Language :: English", "Programming Language :: Python :: 3"], )
[ 37811, 40786, 329, 38349, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 22704, 1600, 198, 220, 220, 220, 10392, 28, 14692, 22704, 33116, 198, 220, 220, 220, 2196, 2625, 2091, 1600, 198, 220, 220, 220, 6764, 2625, 32, 11361, 5888, 329, 22889, 351, 4410, 422, 38349, 14620, 1600, 198, 220, 220, 220, 1772, 2625, 19156, 44611, 16528, 1600, 198, 220, 220, 220, 1772, 62, 12888, 2625, 42, 1531, 39132, 31, 18417, 13, 77, 382, 2145, 13, 12567, 13, 785, 1600, 198, 220, 220, 220, 5964, 2625, 36393, 1600, 198, 220, 220, 220, 19016, 2625, 5450, 1378, 12567, 13, 785, 14, 42, 1531, 39132, 14, 22704, 1600, 198, 220, 220, 220, 4321, 62, 6371, 2625, 5450, 1378, 12567, 13, 785, 14, 42, 1531, 39132, 14, 22704, 14, 17474, 14, 85, 2091, 13, 18870, 13, 34586, 1600, 198, 220, 220, 220, 2721, 62, 47911, 28, 14692, 1078, 3808, 1600, 366, 8897, 3558, 1600, 366, 87, 76, 2528, 375, 713, 33116, 198, 220, 220, 220, 26286, 28, 14692, 22704, 1600, 366, 85, 499, 844, 1600, 366, 261, 85, 361, 1600, 366, 15596, 4269, 1600, 366, 11195, 562, 10167, 33116, 198, 220, 220, 220, 1398, 13350, 28, 14692, 35364, 15417, 7904, 3594, 1600, 366, 15167, 2229, 15417, 7904, 11361, 7904, 513, 33116, 198, 8, 198 ]
2.901345
223
from keras import backend as K from keras.layers import Input, Convolution2D, MaxPooling2D, Activation, concatenate, Dense, add, GaussianNoise from keras.layers import GlobalAveragePooling2D from keras.models import Model from keras.regularizers import l2 sq1x1 = "squeeze1x1" exp1x1 = "expand1x1" exp3x3 = "expand3x3" selu = "selu_" # Modular function for Fire Node # Original SqueezeNet from paper. def SqueezeNet( input_shape=None, filters=8, weight_decay=0., classes=2): """Instantiates the SqueezeNet architecture. """ assert filters % 2 == 0, 'Number of filters must be 2*n, n > 1' img_input = Input(shape=input_shape) x = Convolution2D(filters, (3, 3), padding='valid', use_bias=True, kernel_regularizer=l2(weight_decay), name='conv1')(img_input) x = Activation('selu', name='selu_conv1')(x) x = fire_module(x, fire_id=2, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) residual = x x = fire_module(x, fire_id=3, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = add([x, residual]) filters *= 2 x = fire_module(x, fire_id=4, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = MaxPooling2D(pool_size=(3, 3), strides=(2, 2), name='pool1')(x) residual = x x = fire_module(x, fire_id=5, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = add([x, residual]) filters *=2 x = fire_module(x, fire_id=6, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) residual = x x = fire_module(x, fire_id=7, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = add([x, residual]) filters *= 2 x = fire_module(x, fire_id=8, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = MaxPooling2D(pool_size=(3, 3), strides=(2, 2), name='pool2')(x) residual = x x = fire_module(x, fire_id=9, squeeze=filters // 2, expand=filters, weight_decay=weight_decay) x = add([x, residual]) x = Convolution2D(filters, (1, 1), padding='valid', use_bias=True, kernel_regularizer=l2(weight_decay), name='conv10')(x) x = Activation('selu', name='selu_conv10')(x) x = GlobalAveragePooling2D()(x) x = Dense(classes, activation='softmax', name='predictions')(x) # Ensure that the model takes into account # any potential predecessors of `input_tensor`. inputs = img_input model = Model(inputs, x, name='squeezenet') return model
[ 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 23412, 11, 34872, 2122, 17, 35, 11, 5436, 27201, 278, 17, 35, 11, 13144, 341, 11, 1673, 36686, 378, 11, 360, 1072, 11, 751, 11, 12822, 31562, 2949, 786, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 8060, 26287, 27201, 278, 17, 35, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 198, 6738, 41927, 292, 13, 16338, 11341, 1330, 300, 17, 198, 198, 31166, 16, 87, 16, 796, 366, 16485, 1453, 2736, 16, 87, 16, 1, 198, 11201, 16, 87, 16, 796, 366, 11201, 392, 16, 87, 16, 1, 198, 11201, 18, 87, 18, 796, 366, 11201, 392, 18, 87, 18, 1, 198, 741, 84, 796, 366, 741, 84, 62, 1, 628, 198, 2, 3401, 934, 2163, 329, 3764, 19081, 628, 198, 2, 13745, 5056, 1453, 2736, 7934, 422, 3348, 13, 198, 198, 4299, 5056, 1453, 2736, 7934, 7, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 62, 43358, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 16628, 28, 23, 11, 198, 220, 220, 220, 220, 220, 220, 220, 3463, 62, 12501, 323, 28, 15, 1539, 198, 220, 220, 220, 220, 220, 220, 220, 6097, 28, 17, 2599, 198, 220, 220, 220, 37227, 6310, 17096, 689, 262, 5056, 1453, 2736, 7934, 10959, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 6818, 16628, 4064, 362, 6624, 657, 11, 705, 15057, 286, 16628, 1276, 307, 362, 9, 77, 11, 299, 1875, 352, 6, 628, 220, 220, 220, 33705, 62, 15414, 796, 23412, 7, 43358, 28, 15414, 62, 43358, 8, 628, 220, 220, 220, 2124, 796, 34872, 2122, 17, 35, 7, 10379, 1010, 11, 357, 18, 11, 513, 828, 24511, 11639, 12102, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 779, 62, 65, 4448, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 62, 16338, 7509, 28, 75, 17, 7, 6551, 62, 12501, 323, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 42946, 16, 6, 5769, 9600, 62, 15414, 8, 198, 220, 220, 220, 2124, 796, 13144, 341, 10786, 741, 84, 3256, 1438, 11639, 741, 84, 62, 42946, 16, 6, 5769, 87, 8, 628, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 17, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 29598, 796, 2124, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 18, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 751, 26933, 87, 11, 29598, 12962, 198, 220, 220, 220, 16628, 1635, 28, 362, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 19, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 5436, 27201, 278, 17, 35, 7, 7742, 62, 7857, 16193, 18, 11, 513, 828, 35002, 16193, 17, 11, 362, 828, 1438, 11639, 7742, 16, 6, 5769, 87, 8, 628, 220, 220, 220, 29598, 796, 2124, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 20, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 751, 26933, 87, 11, 29598, 12962, 198, 220, 220, 220, 16628, 1635, 28, 17, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 21, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 29598, 796, 2124, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 22, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 751, 26933, 87, 11, 29598, 12962, 198, 220, 220, 220, 16628, 1635, 28, 362, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 23, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 5436, 27201, 278, 17, 35, 7, 7742, 62, 7857, 16193, 18, 11, 513, 828, 35002, 16193, 17, 11, 362, 828, 1438, 11639, 7742, 17, 6, 5769, 87, 8, 628, 220, 220, 220, 29598, 796, 2124, 198, 220, 220, 220, 2124, 796, 2046, 62, 21412, 7, 87, 11, 2046, 62, 312, 28, 24, 11, 21229, 28, 10379, 1010, 3373, 362, 11, 4292, 28, 10379, 1010, 11, 3463, 62, 12501, 323, 28, 6551, 62, 12501, 323, 8, 198, 220, 220, 220, 2124, 796, 751, 26933, 87, 11, 29598, 12962, 198, 220, 220, 220, 2124, 796, 34872, 2122, 17, 35, 7, 10379, 1010, 11, 357, 16, 11, 352, 828, 24511, 11639, 12102, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 779, 62, 65, 4448, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9720, 62, 16338, 7509, 28, 75, 17, 7, 6551, 62, 12501, 323, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 11639, 42946, 940, 6, 5769, 87, 8, 198, 220, 220, 220, 2124, 796, 13144, 341, 10786, 741, 84, 3256, 1438, 11639, 741, 84, 62, 42946, 940, 6, 5769, 87, 8, 628, 220, 220, 220, 2124, 796, 8060, 26287, 27201, 278, 17, 35, 3419, 7, 87, 8, 198, 220, 220, 220, 2124, 796, 360, 1072, 7, 37724, 11, 14916, 11639, 4215, 9806, 3256, 1438, 11639, 28764, 9278, 6, 5769, 87, 8, 628, 220, 220, 220, 1303, 48987, 326, 262, 2746, 2753, 656, 1848, 198, 220, 220, 220, 1303, 597, 2785, 27677, 286, 4600, 15414, 62, 83, 22854, 44646, 198, 220, 220, 220, 17311, 796, 33705, 62, 15414, 198, 220, 220, 220, 2746, 796, 9104, 7, 15414, 82, 11, 2124, 11, 1438, 11639, 16485, 1453, 4801, 316, 11537, 628, 220, 220, 220, 1441, 2746, 198 ]
2.305872
1,141
co = float(input('Medida do cateto oposto: ')) ca = float(input('Medida do cateto adjacente:')) hi = ((co**2) + (ca**2)) ** (1/2) print('A hipotenusa mede {:.2f}.'.format(hi))
[ 1073, 796, 12178, 7, 15414, 10786, 9921, 3755, 466, 3797, 27206, 1034, 455, 78, 25, 705, 4008, 198, 6888, 796, 12178, 7, 15414, 10786, 9921, 3755, 466, 3797, 27206, 15909, 68, 32105, 4008, 198, 198, 5303, 796, 14808, 1073, 1174, 17, 8, 1343, 357, 6888, 1174, 17, 4008, 12429, 357, 16, 14, 17, 8, 198, 198, 4798, 10786, 32, 10359, 313, 268, 22064, 1117, 68, 46110, 13, 17, 69, 92, 2637, 13, 18982, 7, 5303, 4008, 198 ]
2.311688
77
from typing import Optional from pydantic import BaseModel, Field, validator from app.airtable.response import AirtableResponse, ListAirtableResponse from app.airtable.validators import get_first_or_default_none
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 11, 4938, 1352, 198, 198, 6738, 598, 13, 958, 11487, 13, 26209, 1330, 317, 2265, 540, 31077, 11, 7343, 32, 2265, 540, 31077, 198, 6738, 598, 13, 958, 11487, 13, 12102, 2024, 1330, 651, 62, 11085, 62, 273, 62, 12286, 62, 23108, 628, 628 ]
3.677966
59
''' import boto3 from boto.mturk.connection import MTurkConnection from boto.mturk.question import HTMLQuestion from boto.mturk.layoutparam import LayoutParameter from boto.mturk.layoutparam import LayoutParameters import json # Create your connection to MTurk mtc = MTurkConnection(aws_access_key_id='AKIAIBPHQKOJQZULHJSA', aws_secret_access_key='2EDgdoD4lFrAUd4NHqWnF9qoQBYp1ekV6CVlhUTS', host='mechanicalturk.sandbox.amazonaws.com') #host='mechanicalturk.amazonaws.com') account_balance = mtc.get_account_balance()[0] print("You have a balance of: {}".format(account_balance)) ''' import boto3 import json region_name = 'us-east-1' aws_access_key_id = 'AKIAIBPHQKOJQZULHJSA' aws_secret_access_key = '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' endpoint_url = 'https://mturk-requester-sandbox.us-east-1.amazonaws.com' # Uncomment this line to use in production # endpoint_url = 'https://mturk-requester.us-east-1.amazonaws.com' mtc = boto3.client( 'mturk', endpoint_url=endpoint_url, region_name=region_name, aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, ) # This will return $10,000.00 in the MTurk Developer Sandbox print(mtc.get_account_balance()['AvailableBalance']) # This is the value you received when you created the HIT # You can also retrieve HIT IDs by calling GetReviewableHITs # and SearchHITs. See the links to read more about these APIs. hit_id = "386T3MLZLNVRU564VQVZSIKA8D580B" result = mtc.get_assignments(hit_id) assignment = result[0] worker_id = assignment.WorkerId for answer in assignment.answers[0]: if answer.qid == 'annotation_data': worker_answer = json.loads(answer.fields[0]) print("The Worker with ID {} gave the answer {}".format(worker_id, worker_answer)) left = worker_answer[0]['left'] top = worker_answer[0]['top'] print("The top and left coordinates are {} and {}".format(top, left))
[ 7061, 6, 198, 11748, 275, 2069, 18, 198, 6738, 275, 2069, 13, 16762, 333, 74, 13, 38659, 1330, 337, 17483, 74, 32048, 198, 6738, 275, 2069, 13, 16762, 333, 74, 13, 25652, 1330, 11532, 24361, 198, 6738, 275, 2069, 13, 16762, 333, 74, 13, 39786, 17143, 1330, 47639, 36301, 198, 6738, 275, 2069, 13, 16762, 333, 74, 13, 39786, 17143, 1330, 47639, 48944, 198, 11748, 33918, 198, 198, 2, 13610, 534, 4637, 284, 337, 17483, 74, 198, 16762, 66, 796, 337, 17483, 74, 32048, 7, 8356, 62, 15526, 62, 2539, 62, 312, 11639, 10206, 3539, 9865, 11909, 48, 22328, 41, 48, 57, 6239, 39, 41, 4090, 3256, 198, 8356, 62, 21078, 62, 15526, 62, 2539, 11639, 17, 1961, 70, 4598, 35, 19, 75, 6732, 26830, 67, 19, 33863, 80, 54, 77, 37, 24, 80, 78, 48, 17513, 79, 16, 988, 53, 21, 33538, 75, 71, 3843, 50, 3256, 198, 4774, 11639, 1326, 3147, 605, 36590, 74, 13, 38142, 3524, 13, 33103, 8356, 13, 785, 11537, 1303, 4774, 11639, 1326, 3147, 605, 36590, 74, 13, 33103, 8356, 13, 785, 11537, 198, 23317, 62, 20427, 796, 285, 23047, 13, 1136, 62, 23317, 62, 20427, 3419, 58, 15, 60, 198, 4798, 7203, 1639, 423, 257, 5236, 286, 25, 23884, 1911, 18982, 7, 23317, 62, 20427, 4008, 198, 7061, 6, 198, 198, 11748, 275, 2069, 18, 198, 11748, 33918, 198, 198, 36996, 62, 3672, 796, 705, 385, 12, 23316, 12, 16, 6, 198, 8356, 62, 15526, 62, 2539, 62, 312, 796, 705, 10206, 3539, 9865, 11909, 48, 22328, 41, 48, 57, 6239, 39, 41, 4090, 6, 198, 8356, 62, 21078, 62, 15526, 62, 2539, 796, 705, 17, 1961, 70, 4598, 35, 19, 75, 6732, 26830, 67, 19, 33863, 80, 54, 77, 37, 24, 80, 78, 48, 17513, 79, 16, 988, 53, 21, 33538, 75, 71, 3843, 50, 6, 198, 198, 437, 4122, 62, 6371, 796, 705, 5450, 1378, 16762, 333, 74, 12, 8897, 7834, 12, 38142, 3524, 13, 385, 12, 23316, 12, 16, 13, 33103, 8356, 13, 785, 6, 198, 198, 2, 791, 23893, 428, 1627, 284, 779, 287, 3227, 198, 2, 36123, 62, 6371, 796, 705, 5450, 1378, 16762, 333, 74, 12, 8897, 7834, 13, 385, 12, 23316, 12, 16, 13, 33103, 8356, 13, 785, 6, 198, 198, 16762, 66, 796, 275, 2069, 18, 13, 16366, 7, 198, 220, 220, 220, 705, 16762, 333, 74, 3256, 198, 220, 220, 220, 36123, 62, 6371, 28, 437, 4122, 62, 6371, 11, 198, 220, 220, 220, 3814, 62, 3672, 28, 36996, 62, 3672, 11, 198, 220, 220, 220, 3253, 82, 62, 15526, 62, 2539, 62, 312, 28, 8356, 62, 15526, 62, 2539, 62, 312, 11, 198, 220, 220, 220, 3253, 82, 62, 21078, 62, 15526, 62, 2539, 28, 8356, 62, 21078, 62, 15526, 62, 2539, 11, 198, 8, 198, 198, 2, 770, 481, 1441, 720, 940, 11, 830, 13, 405, 287, 262, 337, 17483, 74, 23836, 3837, 3524, 198, 4798, 7, 16762, 66, 13, 1136, 62, 23317, 62, 20427, 3419, 17816, 10493, 45866, 6, 12962, 628, 198, 2, 770, 318, 262, 1988, 345, 2722, 618, 345, 2727, 262, 46405, 198, 2, 921, 460, 635, 19818, 46405, 32373, 416, 4585, 3497, 14832, 540, 39, 2043, 82, 198, 2, 290, 11140, 39, 2043, 82, 13, 4091, 262, 6117, 284, 1100, 517, 546, 777, 23113, 13, 198, 17945, 62, 312, 796, 366, 21734, 51, 18, 5805, 57, 43, 45, 13024, 52, 20, 2414, 53, 48, 53, 57, 11584, 25123, 23, 35, 39322, 33, 1, 198, 20274, 796, 285, 23047, 13, 1136, 62, 562, 570, 902, 7, 17945, 62, 312, 8, 198, 562, 16747, 796, 1255, 58, 15, 60, 198, 28816, 62, 312, 796, 16237, 13, 12468, 263, 7390, 198, 1640, 3280, 287, 16237, 13, 504, 86, 364, 58, 15, 5974, 198, 220, 611, 3280, 13, 80, 312, 6624, 705, 1236, 14221, 62, 7890, 10354, 198, 220, 220, 220, 8383, 62, 41484, 796, 33918, 13, 46030, 7, 41484, 13, 25747, 58, 15, 12962, 198, 198, 4798, 7203, 464, 35412, 351, 4522, 23884, 2921, 262, 3280, 23884, 1911, 18982, 7, 28816, 62, 312, 11, 8383, 62, 41484, 4008, 198, 9464, 796, 8383, 62, 41484, 58, 15, 7131, 6, 9464, 20520, 198, 4852, 220, 796, 8383, 62, 41484, 58, 15, 7131, 6, 4852, 20520, 198, 4798, 7203, 464, 1353, 290, 1364, 22715, 389, 23884, 290, 23884, 1911, 18982, 7, 4852, 11, 1364, 4008 ]
2.624133
721
import torch import torch.nn as nn # import torch.onnx # import onnx # import onnx_caffe2.backend # from onnx import checker, helper import torch.optim as optim import numpy as np import cv2 from PIL import Image import torch.utils.model_zoo as model_zoo import torch.onnx # print(make_prediction("test/Prairie.jpg")) # print(make_prediction("test/He_was_happy..png")) # print(make_prediction("test/the_little.png")) # print(make_prediction("test/with_his_family.png")) # print(make_prediction("test/with_his_mouth..png")) # print(make_prediction("test/would_run_and_get_it.png"))
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 2, 1330, 28034, 13, 261, 77, 87, 198, 2, 1330, 319, 77, 87, 198, 2, 1330, 319, 77, 87, 62, 66, 21223, 17, 13, 1891, 437, 198, 2, 422, 319, 77, 87, 1330, 2198, 263, 11, 31904, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28034, 13, 26791, 13, 19849, 62, 89, 2238, 355, 2746, 62, 89, 2238, 198, 11748, 28034, 13, 261, 77, 87, 628, 198, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 47, 430, 28191, 13, 9479, 48774, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 1544, 62, 9776, 62, 34191, 492, 11134, 48774, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 1169, 62, 31629, 13, 11134, 48774, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 4480, 62, 14363, 62, 17989, 13, 11134, 48774, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 4480, 62, 14363, 62, 14775, 492, 11134, 48774, 198, 2, 3601, 7, 15883, 62, 28764, 2867, 7203, 9288, 14, 19188, 62, 5143, 62, 392, 62, 1136, 62, 270, 13, 11134, 48774 ]
2.77619
210
## SPDX-License-Identifier: MIT ## The content of this file has been developed in the context of the MOSIM research project. ## Original author(s): Jannes Lehwald # -*- coding: utf-8 -*- """ """ from MOSIM.mmi.register import MMIAdapter #from MMIStandard import MMIAdapter from MOSIM.abstraction.access.interface.adapter_client import IAdapterClient class LocalAdapterClient(IAdapterClient): """ A wrapper for an adapter client connection Attributes ---------- _acces : MMIAdapter.Iface The actual access """ def __init__(self, instance): """ Constructor which needs an address, a port and an access_type. Parameters ---------- instance : MMIAdapter.Iface The local instance """ assert(isinstance(instance, MMIAdapter.Iface)), "The instance is no MMIAdapter" super(LocalAdapterClient, self).__init__() self._access = instance
[ 2235, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2235, 383, 2695, 286, 428, 2393, 468, 587, 4166, 287, 262, 4732, 286, 262, 337, 2640, 3955, 2267, 1628, 13, 198, 2235, 13745, 1772, 7, 82, 2599, 449, 1236, 274, 29921, 21667, 628, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 37811, 198, 198, 6738, 337, 2640, 3955, 13, 3020, 72, 13, 30238, 1330, 337, 8895, 47307, 198, 2, 6738, 337, 8895, 23615, 1330, 337, 8895, 47307, 198, 198, 6738, 337, 2640, 3955, 13, 397, 301, 7861, 13, 15526, 13, 39994, 13, 324, 3429, 62, 16366, 1330, 314, 47307, 11792, 628, 198, 4871, 10714, 47307, 11792, 7, 40, 47307, 11792, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 29908, 329, 281, 21302, 5456, 4637, 198, 220, 220, 220, 220, 198, 220, 220, 220, 49213, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 4808, 330, 728, 1058, 337, 8895, 47307, 13, 1532, 558, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4036, 1895, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 4554, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 28407, 273, 543, 2476, 281, 2209, 11, 257, 2493, 290, 281, 1895, 62, 4906, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 1058, 337, 8895, 47307, 13, 1532, 558, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1957, 4554, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 7, 271, 39098, 7, 39098, 11, 337, 8895, 47307, 13, 1532, 558, 36911, 366, 464, 4554, 318, 645, 337, 8895, 47307, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 7, 14565, 47307, 11792, 11, 2116, 737, 834, 15003, 834, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 15526, 796, 4554 ]
2.53944
393
from argparse import ArgumentParser from getpass import getpass from os.path import isfile, expanduser from sys import exit
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4292, 7220, 198, 6738, 25064, 1330, 8420 ]
4.241379
29
#!/usr/bin/env python # -*- coding: utf-8 """ Taxonomy Resolver :copyright: (c) 2020-2021. :license: Apache 2.0, see LICENSE for more details. """ import os import pytest from taxonresolver import TaxonResolver from taxonresolver.utils import load_logging @pytest.fixture @pytest.fixture
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 27017, 30565, 1874, 14375, 198, 198, 25, 22163, 4766, 25, 357, 66, 8, 12131, 12, 1238, 2481, 13, 198, 25, 43085, 25, 24843, 362, 13, 15, 11, 766, 38559, 24290, 329, 517, 3307, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 198, 6738, 1687, 261, 411, 14375, 1330, 9241, 261, 4965, 14375, 198, 6738, 1687, 261, 411, 14375, 13, 26791, 1330, 3440, 62, 6404, 2667, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628 ]
2.724771
109
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pyspark.mllib.tree import DecisionTree from functions_MLlib import spark_context, training_set, test_set, write_result, brexit_labeled_data, mode_predict if __name__ == "__main__" : sc = spark_context() numFeatures = 10000 print("Training...\n") (training, idf) = training_set(sc, numFeatures = numFeatures) model = DecisionTree.trainClassifier(training, categoricalFeaturesInfo={}, impurity="entropy", maxDepth=5, numClasses=2) print("Test... \n") test = test_set(sc, numFeatures = numFeatures, idf = idf) (num_pos, num_neg) = mode_predict(model, test) print("Test on Brexit labeled data...\n") (accuracy, f1) = brexit_labeled_data(sc, model = model, numFeatures = numFeatures, idf = idf) print("Saving results...") write_result(num_pos, num_neg, accuracy = accuracy, f1 = f1, name = "Decision Tree (Entropy)")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 279, 893, 20928, 13, 76, 297, 571, 13, 21048, 1330, 26423, 27660, 198, 6738, 5499, 62, 5805, 8019, 1330, 9009, 62, 22866, 11, 3047, 62, 2617, 11, 1332, 62, 2617, 11, 3551, 62, 20274, 11, 1449, 10198, 62, 18242, 276, 62, 7890, 11, 4235, 62, 79, 17407, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1, 1058, 198, 220, 220, 220, 220, 198, 220, 220, 220, 629, 796, 9009, 62, 22866, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 997, 23595, 796, 33028, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3601, 7203, 44357, 986, 59, 77, 4943, 198, 220, 220, 220, 220, 198, 220, 220, 220, 357, 34409, 11, 4686, 69, 8, 796, 3047, 62, 2617, 7, 1416, 11, 997, 23595, 796, 997, 23595, 8, 198, 220, 220, 220, 2746, 796, 26423, 27660, 13, 27432, 9487, 7483, 7, 34409, 11, 4253, 12409, 23595, 12360, 34758, 5512, 848, 1684, 2625, 298, 28338, 1600, 3509, 48791, 28, 20, 11, 997, 9487, 274, 28, 17, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3601, 7203, 14402, 986, 3467, 77, 4943, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1332, 796, 1332, 62, 2617, 7, 1416, 11, 997, 23595, 796, 997, 23595, 11, 4686, 69, 796, 4686, 69, 8, 198, 220, 220, 220, 357, 22510, 62, 1930, 11, 997, 62, 12480, 8, 796, 4235, 62, 79, 17407, 7, 19849, 11, 1332, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3601, 7203, 14402, 319, 11435, 15494, 1366, 986, 59, 77, 4943, 198, 220, 220, 220, 220, 198, 220, 220, 220, 357, 4134, 23843, 11, 277, 16, 8, 796, 1449, 10198, 62, 18242, 276, 62, 7890, 7, 1416, 11, 2746, 796, 2746, 11, 997, 23595, 796, 997, 23595, 11, 4686, 69, 796, 4686, 69, 8, 628, 220, 220, 220, 3601, 7203, 50, 2703, 2482, 9313, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 3551, 62, 20274, 7, 22510, 62, 1930, 11, 997, 62, 12480, 11, 9922, 796, 9922, 11, 277, 16, 796, 277, 16, 11, 1438, 796, 366, 10707, 1166, 12200, 357, 14539, 28338, 8, 4943 ]
2.528947
380
# SPDX-FileCopyrightText: 2021 Sandy Macdonald # # SPDX-License-Identifier: MIT """ `Keybow 2040 CircuitPython library` ==================================================== CircuitPython driver for the Pimoroni Keybow 2040 and Pico RGB Keypad Base. Drop the `lib` contents (`keybow2040.py` file and `keybow_hardware` folder) into your `lib` folder on your `CIRCUITPY` drive. * Authors: Sandy Macdonald, Maciej Sokolowski Notes -------------------- **Hardware:** One of: * Pimoroni Keybow 2040 <https://shop.pimoroni.com/products/keybow-2040>_ * Pimoroni Pico RGB Keypad Base <https://shop.pimoroni.com/products/pico-rgb-keypad-base>_ **Software and Dependencies:** For Keybow 2040: * Adafruit CircuitPython firmware for Keybow 2040: <https://circuitpython.org/board/pimoroni_keybow2040/>_ * Adafruit CircuitPython IS31FL3731 library: <https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731>_ For Pico RGB Keypad Base: * Adafruit CircuitPython firmware for Raspberry Pi Pico: <https://circuitpython.org/board/raspberry_pi_pico/>_ * Adafruit CircuitPython DotStar library: <https://github.com/adafruit/Adafruit_CircuitPython_DotStar>_ """ import time class Keybow2040(object): """ Represents a Keybow 2040 and hence a set of Key instances with associated LEDs and key behaviours. :param hardware: object representing a board hardware """ # def rotate(self, degrees): # # Rotates all of Keybow's keys by a number of degrees, clamped to # # the closest multiple of 90 degrees. Because it shuffles the order # # of the Key instances, all of the associated attributes of the key # # are retained. The x/y coordinate of the keys are rotated also. It # # also handles negative degrees, e.g. -90 to rotate 90 degrees anti- # # clockwise. # # Rotate as follows: `keybow.rotate(270)` # self.rotation = degrees # num_rotations = degrees // 90 # if num_rotations == 0: # return # if num_rotations < 1: # num_rotations = 4 + num_rotations # matrix = [[(x * 4) + y for y in range(4)] for x in range(4)] # for r in range(num_rotations): # matrix = zip(*matrix[::-1]) # matrix = [list(x) for x in list(matrix)] # flat_matrix = [x for y in matrix for x in y] # for i in range(len(self.keys)): # self.keys[i].number = flat_matrix[i] # self.keys = sorted(self.keys, key=lambda x:x.number) class Key: """ Represents a key on Keybow 2040, with associated switch and LED behaviours. :param number: the key number (0-15) to associate with the key :param hardware: object representing a board hardware """
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 17581, 4100, 40915, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 37811, 198, 63, 9218, 8176, 1160, 1821, 13588, 37906, 5888, 63, 198, 10052, 4770, 1421, 198, 198, 31560, 5013, 37906, 4639, 329, 262, 350, 320, 273, 14651, 7383, 8176, 1160, 1821, 290, 350, 3713, 25228, 7383, 15636, 7308, 13, 198, 198, 26932, 262, 4600, 8019, 63, 10154, 357, 63, 2539, 8176, 1238, 1821, 13, 9078, 63, 2393, 290, 4600, 2539, 8176, 62, 10424, 1574, 63, 9483, 8, 198, 20424, 534, 4600, 8019, 63, 9483, 319, 534, 4600, 34, 4663, 43633, 2043, 47, 56, 63, 3708, 13, 198, 198, 9, 46665, 25, 17581, 4100, 40915, 11, 4100, 494, 73, 37641, 349, 12079, 198, 198, 16130, 198, 19351, 198, 198, 1174, 49865, 25, 1174, 198, 198, 3198, 286, 25, 198, 198, 9, 350, 320, 273, 14651, 7383, 8176, 1160, 1821, 198, 220, 1279, 5450, 1378, 24643, 13, 79, 320, 273, 14651, 13, 785, 14, 29498, 14, 2539, 8176, 12, 1238, 1821, 29, 62, 198, 198, 9, 350, 320, 273, 14651, 350, 3713, 25228, 7383, 15636, 7308, 198, 220, 1279, 5450, 1378, 24643, 13, 79, 320, 273, 14651, 13, 785, 14, 29498, 14, 79, 3713, 12, 81, 22296, 12, 2539, 15636, 12, 8692, 29, 62, 198, 198, 1174, 25423, 290, 37947, 3976, 25, 1174, 198, 198, 1890, 7383, 8176, 1160, 1821, 25, 198, 198, 9, 1215, 1878, 4872, 13588, 37906, 18779, 329, 7383, 8176, 1160, 1821, 25, 198, 220, 1279, 5450, 1378, 21170, 5013, 29412, 13, 2398, 14, 3526, 14, 79, 320, 273, 14651, 62, 2539, 8176, 1238, 1821, 15913, 62, 198, 198, 9, 1215, 1878, 4872, 13588, 37906, 3180, 3132, 3697, 2718, 3132, 5888, 25, 198, 220, 1279, 5450, 1378, 12567, 13, 785, 14, 324, 1878, 4872, 14, 2782, 1878, 4872, 62, 31560, 5013, 37906, 62, 1797, 3132, 3697, 2718, 3132, 29, 62, 198, 198, 1890, 350, 3713, 25228, 7383, 15636, 7308, 25, 198, 198, 9, 1215, 1878, 4872, 13588, 37906, 18779, 329, 24244, 13993, 350, 3713, 25, 198, 220, 1279, 5450, 1378, 21170, 5013, 29412, 13, 2398, 14, 3526, 14, 81, 17653, 62, 14415, 62, 79, 3713, 15913, 62, 198, 198, 9, 1215, 1878, 4872, 13588, 37906, 22875, 8248, 5888, 25, 198, 220, 1279, 5450, 1378, 12567, 13, 785, 14, 324, 1878, 4872, 14, 2782, 1878, 4872, 62, 31560, 5013, 37906, 62, 35, 313, 8248, 29, 62, 198, 198, 37811, 198, 198, 11748, 640, 198, 198, 4871, 7383, 8176, 1238, 1821, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1432, 6629, 257, 7383, 8176, 1160, 1821, 290, 12891, 257, 900, 286, 7383, 10245, 351, 198, 220, 220, 220, 3917, 33697, 290, 1994, 38975, 13, 628, 220, 220, 220, 1058, 17143, 6890, 25, 2134, 10200, 257, 3096, 6890, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1303, 825, 23064, 7, 944, 11, 7370, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 18481, 689, 477, 286, 7383, 8176, 338, 8251, 416, 257, 1271, 286, 7370, 11, 537, 13322, 284, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 262, 11706, 3294, 286, 4101, 7370, 13, 4362, 340, 32299, 829, 262, 1502, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 286, 262, 7383, 10245, 11, 477, 286, 262, 3917, 12608, 286, 262, 1994, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 389, 17383, 13, 383, 2124, 14, 88, 20435, 286, 262, 8251, 389, 38375, 635, 13, 632, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 635, 17105, 4633, 7370, 11, 304, 13, 70, 13, 532, 3829, 284, 23064, 4101, 7370, 3098, 12, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 8801, 3083, 13, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 18481, 378, 355, 5679, 25, 4600, 2539, 8176, 13, 10599, 378, 7, 20233, 8, 63, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 2116, 13, 10599, 341, 796, 7370, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 997, 62, 10599, 602, 796, 7370, 3373, 4101, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 611, 997, 62, 10599, 602, 6624, 657, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 611, 997, 62, 10599, 602, 1279, 352, 25, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 10599, 602, 796, 604, 1343, 997, 62, 10599, 602, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 17593, 796, 16410, 7, 87, 1635, 604, 8, 1343, 331, 329, 331, 287, 2837, 7, 19, 15437, 329, 2124, 287, 2837, 7, 19, 15437, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 329, 374, 287, 2837, 7, 22510, 62, 10599, 602, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 17593, 796, 19974, 46491, 6759, 8609, 58, 3712, 12, 16, 12962, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 17593, 796, 685, 4868, 7, 87, 8, 329, 2124, 287, 1351, 7, 6759, 8609, 15437, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 6228, 62, 6759, 8609, 796, 685, 87, 329, 331, 287, 17593, 329, 2124, 287, 331, 60, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 11925, 7, 944, 13, 13083, 8, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13083, 58, 72, 4083, 17618, 796, 6228, 62, 6759, 8609, 58, 72, 60, 628, 220, 220, 220, 1303, 220, 220, 220, 220, 2116, 13, 13083, 796, 23243, 7, 944, 13, 13083, 11, 1994, 28, 50033, 2124, 25, 87, 13, 17618, 8, 628, 198, 4871, 7383, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1432, 6629, 257, 1994, 319, 7383, 8176, 1160, 1821, 11, 351, 3917, 5078, 290, 198, 220, 220, 220, 12365, 38975, 13, 628, 220, 220, 220, 1058, 17143, 1271, 25, 262, 1994, 1271, 357, 15, 12, 1314, 8, 284, 11602, 351, 262, 1994, 198, 220, 220, 220, 1058, 17143, 6890, 25, 220, 2134, 10200, 257, 3096, 6890, 198, 220, 220, 220, 37227 ]
2.680542
1,033
import urequests from simp_py import lcd, mon while 1: try: response = urequests.get('http://api.coindesk.com/v1/bpi/currentprice.json') if response.reason==b'OK': data= response.json() updated=data['time']['updatedISO'] btc = data['bpi']['USD']['rate_float'] lcd.text(0,140,updated) lcd.text(0,160,'btc:%.04f ' % btc) else: lcd.text(0,140,'err:%s' % response.reason) except Exception as e: mon.log_exc(e) time.sleep(10)
[ 11748, 334, 8897, 3558, 198, 6738, 985, 79, 62, 9078, 1330, 300, 10210, 11, 937, 198, 4514, 352, 25, 198, 220, 1949, 25, 198, 220, 220, 220, 2882, 796, 334, 8897, 3558, 13, 1136, 10786, 4023, 1378, 15042, 13, 1073, 521, 274, 74, 13, 785, 14, 85, 16, 14, 65, 14415, 14, 14421, 20888, 13, 17752, 11537, 198, 220, 220, 220, 611, 2882, 13, 41181, 855, 65, 6, 11380, 10354, 198, 220, 220, 220, 220, 220, 1366, 28, 2882, 13, 17752, 3419, 198, 220, 220, 220, 220, 220, 6153, 28, 7890, 17816, 2435, 6, 7131, 6, 43162, 40734, 20520, 198, 220, 220, 220, 220, 220, 275, 23047, 796, 1366, 17816, 65, 14415, 6, 7131, 6, 29072, 6, 7131, 6, 4873, 62, 22468, 20520, 198, 220, 220, 220, 220, 220, 300, 10210, 13, 5239, 7, 15, 11, 15187, 11, 43162, 8, 198, 220, 220, 220, 220, 220, 300, 10210, 13, 5239, 7, 15, 11, 14198, 4032, 18347, 66, 25, 7225, 3023, 69, 220, 705, 4064, 275, 23047, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 300, 10210, 13, 5239, 7, 15, 11, 15187, 4032, 8056, 25, 4, 82, 6, 4064, 2882, 13, 41181, 8, 198, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 937, 13, 6404, 62, 41194, 7, 68, 8, 198, 220, 640, 13, 42832, 7, 940, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 198 ]
2.067227
238
# mapGenerator.py import os, os.path, sys, tempfile # NOTE: The following needs to be added to fix a problem with my path and # Python3. Remove to make this work generally. sys.path.insert(0, "/usr/local/lib/python3.3/site-packages") # End of fix. import mapnik
[ 2, 3975, 8645, 1352, 13, 9078, 198, 198, 11748, 28686, 11, 28686, 13, 6978, 11, 25064, 11, 20218, 7753, 198, 198, 2, 24550, 25, 383, 1708, 2476, 284, 307, 2087, 284, 4259, 257, 1917, 351, 616, 3108, 290, 198, 2, 11361, 18, 13, 220, 17220, 284, 787, 428, 670, 4143, 13, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 12813, 14629, 14, 12001, 14, 8019, 14, 29412, 18, 13, 18, 14, 15654, 12, 43789, 4943, 198, 2, 5268, 286, 4259, 13, 198, 198, 11748, 3975, 17187, 198 ]
3.022727
88
""" The Code is under Tencent Youtu Public Rule builder for transforms transforms from torch or home-made """ import copy from torchvision import transforms from .randaugment import RandAugmentMC from .gaussian_blur import GaussianBlur other_func = {"RandAugmentMC": RandAugmentMC,"GaussianBlur":GaussianBlur} class BaseTransform(object): """ For torch transform or self write """ def __init__(self, pipeline): """ transforms for data Args: pipelines (list): list of dict, each dict is a transform """ self.pipeline = pipeline self.transform = self.init_trans(pipeline) class ListTransform(BaseTransform): """ For torch transform or self write """ def __init__(self, pipelines): """ transforms for data Args: pipelines (list): list of dict, each dict is a transform """ self.pipelines = pipelines self.transforms = [] for trans_dict in self.pipelines: self.transforms.append(self.init_trans(trans_dict))
[ 37811, 383, 6127, 318, 739, 9368, 1087, 575, 448, 84, 5094, 14330, 198, 38272, 329, 31408, 198, 198, 7645, 23914, 422, 28034, 393, 1363, 12, 9727, 198, 37811, 198, 198, 11748, 4866, 198, 198, 6738, 28034, 10178, 1330, 31408, 198, 198, 6738, 764, 25192, 559, 5154, 1330, 8790, 12512, 434, 9655, 198, 6738, 764, 4908, 31562, 62, 2436, 333, 1330, 12822, 31562, 3629, 333, 198, 847, 62, 20786, 796, 19779, 38918, 12512, 434, 9655, 1298, 8790, 12512, 434, 9655, 553, 35389, 31562, 3629, 333, 1298, 35389, 31562, 3629, 333, 92, 628, 198, 198, 4871, 7308, 41762, 7, 15252, 2599, 198, 220, 220, 220, 37227, 1114, 28034, 6121, 393, 2116, 3551, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 11523, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 31408, 329, 1366, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31108, 357, 4868, 2599, 1351, 286, 8633, 11, 1123, 8633, 318, 257, 6121, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 541, 4470, 796, 11523, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 35636, 796, 2116, 13, 15003, 62, 7645, 7, 79, 541, 4470, 8, 628, 198, 4871, 7343, 41762, 7, 14881, 41762, 2599, 198, 220, 220, 220, 37227, 1114, 28034, 6121, 393, 2116, 3551, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 31108, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 31408, 329, 1366, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31108, 357, 4868, 2599, 1351, 286, 8633, 11, 1123, 8633, 318, 257, 6121, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 541, 20655, 796, 31108, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7645, 23914, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1007, 62, 11600, 287, 2116, 13, 79, 541, 20655, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 7645, 23914, 13, 33295, 7, 944, 13, 15003, 62, 7645, 7, 7645, 62, 11600, 4008, 198 ]
2.691139
395
from django.contrib import admin from .models.fakeauth import FakeAuthMail @admin.register(FakeAuthMail)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 13, 30706, 18439, 1330, 33482, 30515, 25804, 628, 198, 31, 28482, 13, 30238, 7, 49233, 30515, 25804, 8, 198 ]
3.375
32
#!/usr/bin/python3 """ ssh [email protected] cd compData python startServer.py """ from http.server import HTTPServer, SimpleHTTPRequestHandler from os import curdir import json from copy import deepcopy if __name__ == '__main__': # i.e. if this file is being run directly, not as imported module main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 45824, 269, 85, 15097, 16, 31, 19880, 13, 25399, 13, 3559, 13, 1238, 198, 10210, 552, 6601, 198, 29412, 923, 10697, 13, 9078, 198, 37811, 198, 198, 6738, 2638, 13, 15388, 1330, 38288, 18497, 11, 17427, 40717, 18453, 25060, 198, 6738, 28686, 1330, 1090, 15908, 198, 11748, 33918, 198, 6738, 4866, 1330, 2769, 30073, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 1312, 13, 68, 13, 611, 428, 2393, 318, 852, 1057, 3264, 11, 407, 355, 17392, 8265, 198, 220, 220, 220, 1388, 3419, 198 ]
3.028302
106
from extractor.models import Extractor from rest_framework import serializers from datetime import datetime from .tasks import extractor_job from .models import Extractor from django.utils import timezone import pytz
[ 6738, 7925, 273, 13, 27530, 1330, 29677, 273, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 764, 83, 6791, 1330, 7925, 273, 62, 21858, 198, 6738, 764, 27530, 1330, 29677, 273, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 11748, 12972, 22877 ]
4.075472
53
""" LeetCode Problem: 392. Is Subsequence Link: https://leetcode.com/problems/is-subsequence/ Written by: Mostofa Adib Shakib Language: Python """ """ Recursion + Memoization[Built-in function] Time Complexity: O(n*m) Space Complexity: O(n*m) """ from functools import lru_cache """ Dynamic Programming Time Complexity: O(n*m) Space Complexity: O(n*m) """
[ 37811, 198, 3123, 316, 10669, 20647, 25, 48207, 13, 1148, 3834, 43167, 198, 11280, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 271, 12, 7266, 43167, 14, 198, 25354, 416, 25, 4042, 1659, 64, 1215, 571, 35274, 571, 198, 32065, 25, 11361, 198, 198, 37811, 198, 198, 37811, 198, 6690, 24197, 1343, 4942, 78, 1634, 58, 39582, 12, 259, 2163, 60, 198, 7575, 19157, 414, 25, 440, 7, 77, 9, 76, 8, 198, 14106, 19157, 414, 25, 440, 7, 77, 9, 76, 8, 198, 37811, 198, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 198, 37811, 198, 44090, 30297, 198, 7575, 19157, 414, 25, 440, 7, 77, 9, 76, 8, 198, 14106, 19157, 414, 25, 440, 7, 77, 9, 76, 8, 198, 37811, 628, 220, 220, 220, 220, 628, 198 ]
2.686131
137
# Licensed under the BSD 3-Clause License # Copyright (C) 2021 GeospaceLab (geospacelab) # Author: Lei Cai, Space Physics and Astronomy, University of Oulu import netCDF4 import datetime import numpy as np import geospacelab.toolbox.utilities.pydatetime as dttool if __name__ == "__main__": import pathlib fp = pathlib.Path('/Users/lcai/Geospacelab/Data/JHUAPL/DMSP/SSUSI/f17/20151205/' + 'PS.APL_V0105S027CE0008_SC.U_DI.A_GP.F17-SSUSI_PA.APL-EDR-AURORA_DD.20151205_SN.46863-00_DF.NC') loader = Loader(file_path=fp) # if hasattr(readObj, 'pole'): # readObj.filter_data_pole(boundinglat = 25)
[ 2, 49962, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 15069, 357, 34, 8, 33448, 2269, 24912, 17822, 357, 469, 2117, 330, 417, 397, 8, 198, 2, 6434, 25, 48579, 327, 1872, 11, 4687, 23123, 290, 25398, 9145, 11, 2059, 286, 440, 15712, 198, 198, 11748, 2010, 34, 8068, 19, 198, 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4903, 2117, 330, 417, 397, 13, 25981, 3524, 13, 315, 2410, 13, 79, 5173, 265, 8079, 355, 288, 926, 970, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 3108, 8019, 198, 220, 220, 220, 277, 79, 796, 3108, 8019, 13, 15235, 10786, 14, 14490, 14, 44601, 1872, 14, 10082, 2117, 330, 417, 397, 14, 6601, 14, 41, 39, 52, 2969, 43, 14, 23127, 4303, 14, 5432, 2937, 40, 14, 69, 1558, 14, 4626, 1065, 2713, 14, 6, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3705, 13, 2969, 43, 62, 53, 486, 2713, 50, 44698, 5222, 830, 23, 62, 6173, 13, 52, 62, 17931, 13, 32, 62, 16960, 13, 37, 1558, 12, 5432, 2937, 40, 62, 4537, 13, 2969, 43, 12, 1961, 49, 12, 32, 4261, 1581, 32, 62, 16458, 13, 4626, 1065, 2713, 62, 15571, 13, 38472, 5066, 12, 405, 62, 8068, 13, 7792, 11537, 198, 220, 220, 220, 40213, 796, 8778, 263, 7, 7753, 62, 6978, 28, 46428, 8, 628, 198, 220, 220, 220, 1303, 611, 468, 35226, 7, 961, 49201, 11, 705, 36869, 6, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 1100, 49201, 13, 24455, 62, 7890, 62, 36869, 7, 7784, 278, 15460, 796, 1679, 8 ]
2.19863
292
""" My init to load all main process around my ML project """ from .spark_manage import spark_start from .data_processing import dataset_train_transpose
[ 37811, 2011, 2315, 284, 3440, 477, 1388, 1429, 1088, 616, 10373, 1628, 37227, 198, 198, 6738, 764, 2777, 668, 62, 805, 496, 1330, 9009, 62, 9688, 198, 6738, 764, 7890, 62, 36948, 1330, 27039, 62, 27432, 62, 7645, 3455 ]
3.923077
39
# coding=utf-8 import os import unittest import six from conans.errors import ConanException from conans.model.build_info import CppInfo, DepsCppInfo, DepCppInfo from conans.test.utils.test_files import temp_folder from conans.util.files import save
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 11748, 2237, 198, 198, 6738, 369, 504, 13, 48277, 1330, 31634, 16922, 198, 6738, 369, 504, 13, 19849, 13, 11249, 62, 10951, 1330, 327, 381, 12360, 11, 2129, 82, 34, 381, 12360, 11, 2129, 34, 381, 12360, 198, 6738, 369, 504, 13, 9288, 13, 26791, 13, 9288, 62, 16624, 1330, 20218, 62, 43551, 198, 6738, 369, 504, 13, 22602, 13, 16624, 1330, 3613, 628 ]
3.1625
80
# encoding: utf-8 # module Wms.RemotingImplementation.Activities.Renderers calls itself Renderers # from Wms.RemotingImplementation,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no important from __init__ import * # no functions # classes class MobileProgressBarRenderer(object): """ MobileProgressBarRenderer(current: Decimal,total: Decimal,title: str,enableDetails: bool,progressColor: str) """ def ZZZ(self): """hardcoded/mock instance of the class""" return MobileProgressBarRenderer() instance=ZZZ() """hardcoded/returns an instance of the class""" def Dispose(self): """ Dispose(self: MobileProgressBarRenderer) """ pass def Render(self): """ Render(self: MobileProgressBarRenderer) -> Array[Byte] """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass @staticmethod def __new__(self,current,total,title,enableDetails,progressColor): """ __new__(cls: type,current: Decimal,total: Decimal,title: str,enableDetails: bool,progressColor: str) """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass Current=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Current(self: MobileProgressBarRenderer) -> Decimal Set: Current(self: MobileProgressBarRenderer)=value """ EnableDetails=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: EnableDetails(self: MobileProgressBarRenderer) -> bool Set: EnableDetails(self: MobileProgressBarRenderer)=value """ ProgressColor=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: ProgressColor(self: MobileProgressBarRenderer) -> str Set: ProgressColor(self: MobileProgressBarRenderer)=value """ Title=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Title(self: MobileProgressBarRenderer) -> str Set: Title(self: MobileProgressBarRenderer)=value """ Total=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Total(self: MobileProgressBarRenderer) -> Decimal Set: Total(self: MobileProgressBarRenderer)=value """
[ 2, 21004, 25, 3384, 69, 12, 23, 201, 198, 2, 8265, 370, 907, 13, 8413, 10720, 3546, 32851, 13, 25526, 871, 13, 49, 437, 19288, 3848, 2346, 28703, 19288, 201, 198, 2, 422, 370, 907, 13, 8413, 10720, 3546, 32851, 11, 14815, 28, 16, 13, 1954, 13, 16, 13, 15, 11, 34, 6456, 28, 29797, 11, 15202, 9218, 30642, 28, 8423, 201, 198, 2, 416, 17301, 352, 13, 18781, 201, 198, 2, 645, 2205, 201, 198, 2, 645, 1593, 201, 198, 6738, 11593, 15003, 834, 1330, 1635, 201, 198, 201, 198, 2, 645, 5499, 201, 198, 2, 6097, 201, 198, 201, 198, 4871, 12173, 32577, 10374, 49, 437, 11882, 7, 15252, 2599, 201, 198, 37227, 12173, 32577, 10374, 49, 437, 11882, 7, 14421, 25, 4280, 4402, 11, 23350, 25, 4280, 4402, 11, 7839, 25, 965, 11, 21633, 24259, 25, 20512, 11, 33723, 10258, 25, 965, 8, 37227, 201, 198, 825, 1168, 30148, 7, 944, 2599, 201, 198, 220, 37227, 10424, 40976, 14, 76, 735, 4554, 286, 262, 1398, 37811, 201, 198, 220, 1441, 12173, 32577, 10374, 49, 437, 11882, 3419, 201, 198, 4554, 28, 30148, 57, 3419, 201, 198, 37227, 10424, 40976, 14, 7783, 82, 281, 4554, 286, 262, 1398, 37811, 201, 198, 825, 3167, 3455, 7, 944, 2599, 201, 198, 220, 37227, 3167, 3455, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 37227, 201, 198, 220, 1208, 201, 198, 825, 46722, 7, 944, 2599, 201, 198, 220, 37227, 46722, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 15690, 58, 40778, 60, 37227, 201, 198, 220, 1208, 201, 198, 825, 11593, 9255, 834, 7, 944, 11, 9, 22046, 2599, 201, 198, 220, 37227, 11593, 9255, 834, 7, 944, 25, 4522, 271, 1930, 540, 8, 4613, 2134, 37227, 201, 198, 220, 1208, 201, 198, 825, 11593, 37023, 834, 7, 944, 11, 9, 22046, 2599, 201, 198, 220, 37227, 11593, 37023, 834, 7, 944, 25, 4522, 271, 1930, 540, 11, 41194, 62, 4906, 25, 2134, 11, 41194, 62, 8367, 25, 2134, 11, 41194, 62, 1891, 25, 2134, 8, 37227, 201, 198, 220, 1208, 201, 198, 825, 11593, 15003, 834, 7, 944, 11, 9, 22046, 2599, 201, 198, 220, 37227, 2124, 13, 834, 15003, 834, 7, 23029, 4238, 4340, 2124, 26, 766, 2124, 13, 834, 4871, 834, 13, 834, 15390, 834, 329, 9877, 87, 13, 834, 15003, 834, 7, 23029, 4238, 4340, 2124, 26, 766, 2124, 13, 834, 4871, 834, 13, 834, 15390, 834, 329, 9877, 87, 13, 834, 15003, 834, 7, 23029, 4238, 4340, 2124, 26, 766, 2124, 13, 834, 4871, 834, 13, 834, 15390, 834, 329, 9877, 37227, 201, 198, 220, 1208, 201, 198, 2488, 12708, 24396, 201, 198, 825, 11593, 3605, 834, 7, 944, 11, 14421, 11, 23350, 11, 7839, 11, 21633, 24259, 11, 33723, 10258, 2599, 201, 198, 220, 37227, 11593, 3605, 834, 7, 565, 82, 25, 2099, 11, 14421, 25, 4280, 4402, 11, 23350, 25, 4280, 4402, 11, 7839, 25, 965, 11, 21633, 24259, 25, 20512, 11, 33723, 10258, 25, 965, 8, 37227, 201, 198, 220, 1208, 201, 198, 825, 11593, 260, 1050, 834, 7, 944, 11, 9, 22046, 2599, 201, 198, 220, 37227, 11593, 260, 1050, 834, 7, 944, 25, 2134, 8, 4613, 965, 37227, 201, 198, 220, 1208, 201, 198, 9236, 28, 26745, 7, 50033, 2116, 25, 2134, 22784, 50033, 2116, 11, 85, 25, 6045, 11, 50033, 2116, 25, 6045, 8, 201, 198, 37227, 3855, 25, 9236, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 4280, 4402, 201, 201, 198, 201, 201, 198, 7248, 25, 9236, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 47505, 8367, 201, 201, 198, 37811, 201, 198, 201, 198, 27882, 24259, 28, 26745, 7, 50033, 2116, 25, 2134, 22784, 50033, 2116, 11, 85, 25, 6045, 11, 50033, 2116, 25, 6045, 8, 201, 198, 37227, 3855, 25, 27882, 24259, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 20512, 201, 201, 198, 201, 201, 198, 7248, 25, 27882, 24259, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 47505, 8367, 201, 201, 198, 37811, 201, 198, 201, 198, 18387, 10258, 28, 26745, 7, 50033, 2116, 25, 2134, 22784, 50033, 2116, 11, 85, 25, 6045, 11, 50033, 2116, 25, 6045, 8, 201, 198, 37227, 3855, 25, 18387, 10258, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 965, 201, 201, 198, 201, 201, 198, 7248, 25, 18387, 10258, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 47505, 8367, 201, 201, 198, 37811, 201, 198, 201, 198, 11851, 28, 26745, 7, 50033, 2116, 25, 2134, 22784, 50033, 2116, 11, 85, 25, 6045, 11, 50033, 2116, 25, 6045, 8, 201, 198, 37227, 3855, 25, 11851, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 965, 201, 201, 198, 201, 201, 198, 7248, 25, 11851, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 47505, 8367, 201, 201, 198, 37811, 201, 198, 201, 198, 7472, 28, 26745, 7, 50033, 2116, 25, 2134, 22784, 50033, 2116, 11, 85, 25, 6045, 11, 50033, 2116, 25, 6045, 8, 201, 198, 37227, 3855, 25, 7472, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 8, 4613, 4280, 4402, 201, 201, 198, 201, 201, 198, 7248, 25, 7472, 7, 944, 25, 12173, 32577, 10374, 49, 437, 11882, 47505, 8367, 201, 201, 198, 37811, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.930023
886
# Copyright 2015 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import os, shutil, logging, subprocess, sys, stat TAG = 'version_4'
[ 2, 15069, 1853, 383, 412, 907, 6519, 268, 46665, 13, 220, 1439, 2489, 10395, 13, 198, 2, 412, 907, 6519, 268, 318, 1695, 739, 734, 4553, 16625, 11, 262, 17168, 5964, 290, 262, 198, 2, 2059, 286, 9486, 14, 7792, 4090, 4946, 8090, 13789, 13, 220, 5747, 777, 16625, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 11748, 28686, 11, 4423, 346, 11, 18931, 11, 850, 14681, 11, 25064, 11, 1185, 198, 198, 42197, 796, 705, 9641, 62, 19, 6, 628, 628, 198 ]
3.681818
88
from requests import Session from models.vendor import Vendor from bs4 import BeautifulSoup from io_utils.csv_exporter import save_scraped_vendor
[ 6738, 7007, 1330, 23575, 198, 6738, 4981, 13, 85, 18738, 1330, 39896, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 33245, 62, 26791, 13, 40664, 62, 1069, 26634, 1330, 3613, 62, 1416, 31951, 62, 85, 18738, 628, 198 ]
3.609756
41
""" Common test tools. """ from os import environ from semver import compare from unittest import skipIf import requests import subprocess import time TEST_GOLANG_VERSION = environ.get("TEST_GOLANG_VERSION", False) DOCKER_VERSION = environ.get("DOCKER_VERSION", "") skip_if_go_version = skipIf( TEST_GOLANG_VERSION, "Not expected to work in go version" ) skip_if_python_version = skipIf( not TEST_GOLANG_VERSION, "Not expected to work in Python version" ) skip_if_docker_version_less_than = lambda ver: skipIf( _skip_max_docker_ver(ver), "Not expected to work in this Docker version") def try_until(f, attempts=5, backoff=0.1, attempt=1): """ Synchronously, retry ``f`` every ``backoff`` * (2 ^ ``attempt``) seconds until it doesn't raise an exception, or we've tried ``attempts`` many times. Return the result of running ``f`` successfully, or raise the last exception it raised when attempted. """ try: return f() except: if attempt > attempts: raise time.sleep(backoff * (2 ** attempt)) return try_until( f, attempts=attempts, backoff=backoff, attempt=attempt + 1) def run(cmd): """ Run cmd (list of bytes), e.g. ["ls", "/"] and return the result, raising CalledProcessErrorWithOutput if return code is non-zero. """ try: result = subprocess.check_output( cmd, stderr=subprocess.STDOUT ) except subprocess.CalledProcessError, error: exc = CalledProcessErrorWithOutput( "\n>> command:\n%(command)s" "\n>> returncode\n%(returncode)d" "\n>> output:\n%(output)s" % dict(command=" ".join(cmd), returncode=error.returncode, output=error.output)) exc.original = error raise exc return result
[ 37811, 198, 17227, 1332, 4899, 13, 198, 37811, 198, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 5026, 332, 1330, 8996, 198, 6738, 555, 715, 395, 1330, 14267, 1532, 198, 11748, 7007, 198, 11748, 850, 14681, 198, 11748, 640, 198, 198, 51, 6465, 62, 38, 3535, 15567, 62, 43717, 796, 551, 2268, 13, 1136, 7203, 51, 6465, 62, 38, 3535, 15567, 62, 43717, 1600, 10352, 8, 198, 35, 11290, 1137, 62, 43717, 796, 551, 2268, 13, 1136, 7203, 35, 11290, 1137, 62, 43717, 1600, 366, 4943, 198, 198, 48267, 62, 361, 62, 2188, 62, 9641, 796, 14267, 1532, 7, 198, 220, 220, 220, 43001, 62, 38, 3535, 15567, 62, 43717, 11, 198, 220, 220, 220, 366, 3673, 2938, 284, 670, 287, 467, 2196, 1, 198, 8, 198, 198, 48267, 62, 361, 62, 29412, 62, 9641, 796, 14267, 1532, 7, 198, 220, 220, 220, 407, 43001, 62, 38, 3535, 15567, 62, 43717, 11, 198, 220, 220, 220, 366, 3673, 2938, 284, 670, 287, 11361, 2196, 1, 198, 8, 198, 198, 48267, 62, 361, 62, 45986, 62, 9641, 62, 1203, 62, 14813, 796, 37456, 3326, 25, 14267, 1532, 7, 198, 220, 220, 220, 4808, 48267, 62, 9806, 62, 45986, 62, 332, 7, 332, 828, 198, 220, 220, 220, 366, 3673, 2938, 284, 670, 287, 428, 25716, 2196, 4943, 628, 198, 4299, 1949, 62, 28446, 7, 69, 11, 6370, 28, 20, 11, 736, 2364, 28, 15, 13, 16, 11, 2230, 28, 16, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16065, 11413, 3481, 11, 1005, 563, 7559, 69, 15506, 790, 7559, 1891, 2364, 15506, 1635, 357, 17, 10563, 7559, 1078, 1791, 15506, 8, 4201, 198, 220, 220, 220, 1566, 340, 1595, 470, 5298, 281, 6631, 11, 393, 356, 1053, 3088, 7559, 1078, 1791, 82, 15506, 867, 198, 220, 220, 220, 1661, 13, 8229, 262, 1255, 286, 2491, 7559, 69, 15506, 7675, 11, 393, 5298, 262, 938, 198, 220, 220, 220, 6631, 340, 4376, 618, 7482, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 277, 3419, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2230, 1875, 6370, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 198, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 1891, 2364, 1635, 357, 17, 12429, 2230, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1949, 62, 28446, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 11, 6370, 28, 1078, 1791, 82, 11, 736, 2364, 28, 1891, 2364, 11, 2230, 28, 1078, 1791, 1343, 352, 8, 628, 198, 4299, 1057, 7, 28758, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5660, 23991, 357, 4868, 286, 9881, 828, 304, 13, 70, 13, 14631, 7278, 1600, 12813, 8973, 290, 1441, 262, 1255, 11, 8620, 198, 220, 220, 220, 34099, 18709, 12331, 3152, 26410, 611, 1441, 2438, 318, 1729, 12, 22570, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 850, 14681, 13, 9122, 62, 22915, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 1082, 81, 28, 7266, 14681, 13, 36886, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 2845, 850, 14681, 13, 34, 4262, 18709, 12331, 11, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2859, 796, 34099, 18709, 12331, 3152, 26410, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37082, 77, 4211, 3141, 7479, 77, 4, 7, 21812, 8, 82, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37082, 77, 4211, 1441, 8189, 59, 77, 4, 7, 7783, 8189, 8, 67, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37082, 77, 4211, 5072, 7479, 77, 4, 7, 22915, 8, 82, 1, 4064, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8633, 7, 21812, 2625, 27071, 22179, 7, 28758, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 8189, 28, 18224, 13, 7783, 8189, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 28, 18224, 13, 22915, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2859, 13, 14986, 796, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 2859, 198, 220, 220, 220, 1441, 1255, 198 ]
2.419231
780
#!/bin/py # # interpolate over data field with 2d polynomial fit # # fit a 2D, 3rd order polynomial to data # estimate the 16 coefficients using all of your data points. # # http://stackoverflow.com/questions/18832763/drawing-directions-fields # # import numpy as np import matplotlib matplotlib.use('Agg') import itertools import matplotlib.pyplot as plt from scipy import integrate from scipy.integrate import ode hprime = -4.5 # # # # # # # # # # # main function: execute # # # EXECUTE # main() # # nick # 1/30/16 # # http://stackoverflow.com/questions/7997152/python-3d-polynomial-surface-fit-order-dependent #
[ 2, 48443, 8800, 14, 9078, 198, 2, 198, 2, 39555, 378, 625, 1366, 2214, 351, 362, 67, 745, 6213, 49070, 4197, 198, 2, 198, 2, 220, 4197, 257, 362, 35, 11, 513, 4372, 1502, 745, 6213, 49070, 284, 1366, 198, 2, 220, 8636, 262, 1467, 44036, 1262, 477, 286, 534, 1366, 2173, 13, 198, 2, 198, 2, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1507, 5999, 1983, 5066, 14, 19334, 278, 12, 12942, 507, 12, 25747, 198, 2, 198, 2, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 340, 861, 10141, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 629, 541, 88, 1330, 19386, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 267, 2934, 198, 198, 71, 35505, 796, 532, 19, 13, 20, 628, 198, 2, 198, 2, 198, 2, 198, 198, 2, 198, 2, 198, 2, 198, 198, 2, 198, 2, 198, 2, 628, 198, 2, 198, 2, 1388, 2163, 25, 12260, 198, 2, 198, 2, 198, 2, 7788, 2943, 37780, 198, 2, 198, 12417, 3419, 628, 198, 2, 198, 2, 14428, 220, 198, 2, 352, 14, 1270, 14, 1433, 220, 198, 2, 198, 2, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 22, 39647, 17827, 14, 29412, 12, 18, 67, 12, 35428, 26601, 498, 12, 42029, 12, 11147, 12, 2875, 12, 21186, 198, 2, 198 ]
2.567347
245
import cv2 from matplotlib import pyplot as plt img = cv2.imread('galaxy.jpg', 0) img = cv2.resize(img, (int(img.shape[1]/2), int(img.shape[0]/2))) cv2.imwrite('GlaxyResized.jpg', img) plt.imshow(img) plt.show()
[ 11748, 269, 85, 17, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 10786, 13528, 6969, 13, 9479, 3256, 657, 8, 198, 9600, 796, 269, 85, 17, 13, 411, 1096, 7, 9600, 11, 357, 600, 7, 9600, 13, 43358, 58, 16, 60, 14, 17, 828, 493, 7, 9600, 13, 43358, 58, 15, 60, 14, 17, 22305, 198, 33967, 17, 13, 320, 13564, 10786, 9861, 6969, 4965, 1143, 13, 9479, 3256, 33705, 8, 198, 198, 489, 83, 13, 320, 12860, 7, 9600, 8, 198, 489, 83, 13, 12860, 3419, 198 ]
2.118812
101
import os import re from pathlib import Path from typing import Dict from typing import Optional from typing import Union from urllib.request import urlopen from xsdata.codegen.parsers import DefinitionsParser from xsdata.codegen.parsers import SchemaParser from xsdata.logger import logger from xsdata.models.wsdl import Definitions from xsdata.models.xsd import Schema class Downloader: """ Helper class to download a schema or a definitions with all their imports locally. The imports paths will be adjusted if necessary. :param output: Output path """ __slots__ = ("output", "base_path", "downloaded") def wget(self, uri: str, location: Optional[str] = None): """Download handler for any uri input with circular protection.""" if not (uri in self.downloaded or (location and location in self.downloaded)): self.downloaded[uri] = None self.downloaded[location] = None self.adjust_base_path(uri) logger.info("Fetching %s", uri) input_stream = urlopen(uri).read() # nosec if uri.endswith("wsdl"): self.parse_definitions(uri, input_stream) else: self.parse_schema(uri, input_stream) self.write_file(uri, location, input_stream.decode()) def parse_schema(self, uri: str, content: bytes): """Convert content to a schema instance and process all sub imports.""" parser = SchemaParser(location=uri) schema = parser.from_bytes(content, Schema) self.wget_included(schema) def parse_definitions(self, uri: str, content: bytes): """Convert content to a definitions instance and process all sub imports.""" parser = DefinitionsParser(location=uri) definitions = parser.from_bytes(content, Definitions) self.wget_included(definitions) for schema in definitions.schemas: self.wget_included(schema) def adjust_base_path(self, uri: str): """ Adjust base path for every new uri loaded. Example runs: - file:///schemas/air_v48_0/Air.wsdl -> file:///schemas/air_v48_0 - file:///schemas/common_v48_0/CommonReqRsp.xsd -> file:///schemas """ if not self.base_path: self.base_path = Path(uri).parent logger.info("Setting base path to %s", self.base_path) else: common_path = os.path.commonpath((self.base_path or "", uri)) if common_path: common_path_path = Path(common_path) if common_path_path < self.base_path: self.base_path = Path(common_path) logger.info("Adjusting base path to %s", self.base_path) def adjust_imports(self, path: Path, content: str) -> str: """Try to adjust the import locations for external locations that are not relative to the first requested uri.""" matches = re.findall(r"ocation=\"(.*)\"", content) for match in matches: if isinstance(self.downloaded.get(match), Path): location = os.path.relpath(self.downloaded[match], path) replace = str(location).replace("\\", "/") content = content.replace(f'ocation="{match}"', f'ocation="{replace}"') return content def write_file(self, uri: str, location: Optional[str], content: str): """ Write the given uri and it's content according to the base path and if the uri is relative to first requested uri. Keep track of all the written file paths, in case we have to modify the location attribute in an upcoming schema/definition import. """ common_path = os.path.commonpath((self.base_path or "", uri)) if common_path: file_path = self.output.joinpath(Path(uri).relative_to(common_path)) else: file_path = self.output.joinpath(Path(uri).name) content = self.adjust_imports(file_path.parent, content) file_path.parent.mkdir(parents=True, exist_ok=True) file_path.write_text(content, encoding="utf-8") logger.info("Writing %s", file_path) self.downloaded[uri] = file_path if location: self.downloaded[location] = file_path
[ 11748, 28686, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, 32233, 198, 6738, 19720, 1330, 4479, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 198, 6738, 2124, 82, 7890, 13, 8189, 5235, 13, 79, 945, 364, 1330, 45205, 46677, 198, 6738, 2124, 82, 7890, 13, 8189, 5235, 13, 79, 945, 364, 1330, 10011, 2611, 46677, 198, 6738, 2124, 82, 7890, 13, 6404, 1362, 1330, 49706, 198, 6738, 2124, 82, 7890, 13, 27530, 13, 18504, 25404, 1330, 45205, 198, 6738, 2124, 82, 7890, 13, 27530, 13, 87, 21282, 1330, 10011, 2611, 628, 198, 4871, 10472, 263, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5053, 525, 1398, 284, 4321, 257, 32815, 393, 257, 17336, 351, 477, 511, 17944, 198, 220, 220, 220, 15726, 13, 383, 17944, 13532, 481, 307, 12328, 611, 3306, 13, 628, 220, 220, 220, 1058, 17143, 5072, 25, 25235, 3108, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 11593, 6649, 1747, 834, 796, 5855, 22915, 1600, 366, 8692, 62, 6978, 1600, 366, 2902, 14578, 4943, 628, 220, 220, 220, 825, 266, 1136, 7, 944, 11, 2956, 72, 25, 965, 11, 4067, 25, 32233, 58, 2536, 60, 796, 6045, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10002, 21360, 329, 597, 2956, 72, 5128, 351, 18620, 4800, 526, 15931, 628, 220, 220, 220, 220, 220, 220, 220, 611, 407, 357, 9900, 287, 2116, 13, 2902, 14578, 393, 357, 24886, 290, 4067, 287, 2116, 13, 2902, 14578, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 14578, 58, 9900, 60, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 14578, 58, 24886, 60, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 23032, 62, 8692, 62, 6978, 7, 9900, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 37, 7569, 278, 4064, 82, 1600, 2956, 72, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5128, 62, 5532, 796, 19016, 9654, 7, 9900, 737, 961, 3419, 220, 1303, 9686, 66, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2956, 72, 13, 437, 2032, 342, 7203, 18504, 25404, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 29572, 62, 4299, 50101, 7, 9900, 11, 5128, 62, 5532, 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, 2116, 13, 29572, 62, 15952, 2611, 7, 9900, 11, 5128, 62, 5532, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 13564, 62, 7753, 7, 9900, 11, 4067, 11, 5128, 62, 5532, 13, 12501, 1098, 28955, 628, 220, 220, 220, 825, 21136, 62, 15952, 2611, 7, 944, 11, 2956, 72, 25, 965, 11, 2695, 25, 9881, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3103, 1851, 2695, 284, 257, 32815, 4554, 290, 1429, 477, 850, 17944, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 30751, 796, 10011, 2611, 46677, 7, 24886, 28, 9900, 8, 198, 220, 220, 220, 220, 220, 220, 220, 32815, 796, 30751, 13, 6738, 62, 33661, 7, 11299, 11, 10011, 2611, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 86, 1136, 62, 259, 10341, 7, 15952, 2611, 8, 628, 220, 220, 220, 825, 21136, 62, 4299, 50101, 7, 944, 11, 2956, 72, 25, 965, 11, 2695, 25, 9881, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3103, 1851, 2695, 284, 257, 17336, 4554, 290, 1429, 477, 850, 198, 220, 220, 220, 220, 220, 220, 220, 17944, 526, 15931, 628, 220, 220, 220, 220, 220, 220, 220, 30751, 796, 45205, 46677, 7, 24886, 28, 9900, 8, 198, 220, 220, 220, 220, 220, 220, 220, 17336, 796, 30751, 13, 6738, 62, 33661, 7, 11299, 11, 45205, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 86, 1136, 62, 259, 10341, 7, 4299, 50101, 8, 628, 220, 220, 220, 220, 220, 220, 220, 329, 32815, 287, 17336, 13, 1416, 4411, 292, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 86, 1136, 62, 259, 10341, 7, 15952, 2611, 8, 628, 220, 220, 220, 825, 4532, 62, 8692, 62, 6978, 7, 944, 11, 2956, 72, 25, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 20292, 2779, 3108, 329, 790, 649, 2956, 72, 9639, 13, 628, 220, 220, 220, 220, 220, 220, 220, 17934, 4539, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 2393, 1378, 14, 1416, 4411, 292, 14, 958, 62, 85, 2780, 62, 15, 14, 16170, 13, 18504, 25404, 4613, 2393, 1378, 14, 1416, 4411, 292, 14, 958, 62, 85, 2780, 62, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 2393, 1378, 14, 1416, 4411, 292, 14, 11321, 62, 85, 2780, 62, 15, 14, 17227, 3041, 80, 49, 2777, 13, 87, 21282, 4613, 2393, 1378, 14, 1416, 4411, 292, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2116, 13, 8692, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8692, 62, 6978, 796, 10644, 7, 9900, 737, 8000, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 34149, 2779, 3108, 284, 4064, 82, 1600, 2116, 13, 8692, 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, 2219, 62, 6978, 796, 28686, 13, 6978, 13, 11321, 6978, 19510, 944, 13, 8692, 62, 6978, 393, 366, 1600, 2956, 72, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2219, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2219, 62, 6978, 62, 6978, 796, 10644, 7, 11321, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2219, 62, 6978, 62, 6978, 1279, 2116, 13, 8692, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8692, 62, 6978, 796, 10644, 7, 11321, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 39668, 278, 2779, 3108, 284, 4064, 82, 1600, 2116, 13, 8692, 62, 6978, 8, 628, 220, 220, 220, 825, 4532, 62, 320, 3742, 7, 944, 11, 3108, 25, 10644, 11, 2695, 25, 965, 8, 4613, 965, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 23433, 284, 4532, 262, 1330, 7064, 329, 7097, 7064, 326, 389, 198, 220, 220, 220, 220, 220, 220, 220, 407, 3585, 284, 262, 717, 9167, 2956, 72, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 7466, 796, 302, 13, 19796, 439, 7, 81, 1, 5040, 17553, 7, 15885, 8, 7879, 1600, 2695, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2872, 287, 7466, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 944, 13, 2902, 14578, 13, 1136, 7, 15699, 828, 10644, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4067, 796, 28686, 13, 6978, 13, 2411, 6978, 7, 944, 13, 2902, 14578, 58, 15699, 4357, 3108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6330, 796, 965, 7, 24886, 737, 33491, 7203, 6852, 1600, 12813, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2695, 796, 2695, 13, 33491, 7, 69, 6, 5040, 2625, 90, 15699, 36786, 3256, 277, 6, 5040, 2625, 90, 33491, 36786, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 2695, 628, 220, 220, 220, 825, 3551, 62, 7753, 7, 944, 11, 2956, 72, 25, 965, 11, 4067, 25, 32233, 58, 2536, 4357, 2695, 25, 965, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 19430, 262, 1813, 2956, 72, 290, 340, 338, 2695, 1864, 284, 262, 2779, 3108, 290, 611, 198, 220, 220, 220, 220, 220, 220, 220, 262, 2956, 72, 318, 3585, 284, 717, 9167, 2956, 72, 13, 628, 220, 220, 220, 220, 220, 220, 220, 9175, 2610, 286, 477, 262, 3194, 2393, 13532, 11, 287, 1339, 356, 423, 284, 198, 220, 220, 220, 220, 220, 220, 220, 13096, 262, 4067, 11688, 287, 281, 7865, 32815, 14, 46758, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2219, 62, 6978, 796, 28686, 13, 6978, 13, 11321, 6978, 19510, 944, 13, 8692, 62, 6978, 393, 366, 1600, 2956, 72, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2219, 62, 6978, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 2116, 13, 22915, 13, 22179, 6978, 7, 15235, 7, 9900, 737, 43762, 62, 1462, 7, 11321, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 796, 2116, 13, 22915, 13, 22179, 6978, 7, 15235, 7, 9900, 737, 3672, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2695, 796, 2116, 13, 23032, 62, 320, 3742, 7, 7753, 62, 6978, 13, 8000, 11, 2695, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 13, 8000, 13, 28015, 15908, 7, 23743, 28, 17821, 11, 2152, 62, 482, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 6978, 13, 13564, 62, 5239, 7, 11299, 11, 21004, 2625, 40477, 12, 23, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 33874, 4064, 82, 1600, 2393, 62, 6978, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 14578, 58, 9900, 60, 796, 2393, 62, 6978, 628, 220, 220, 220, 220, 220, 220, 220, 611, 4067, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 14578, 58, 24886, 60, 796, 2393, 62, 6978, 198 ]
2.413237
1,798
from setuptools import setup, find_packages import sys, os version = '0.2.2' setup(name = 'eclipseprofileselector', version = version, description = 'Manage separate Eclipse profiles and workspaces with a nice graphical user interface.', long_description = open('README.rst', 'r').read(), keywords = 'eclipse profile', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: X11 Applications :: GTK', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: POSIX', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Utilities' ], author = 'Stephan Klein', url = 'https://github.com/privatwolke/eclipseprofileselector', license = 'MIT', packages = ['eclipseprofileselector'], package_data = { 'eclipseprofileselector': ['ui.glade'] }, include_package_data = True, zip_safe = True, entry_points = { 'gui_scripts': [ 'eclipse-profile-selector = eclipseprofileselector.profile:main' ] } )
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 25064, 11, 28686, 198, 198, 9641, 796, 705, 15, 13, 17, 13, 17, 6, 198, 198, 40406, 7, 3672, 796, 705, 68, 17043, 5577, 346, 2771, 801, 273, 3256, 198, 197, 9641, 796, 2196, 11, 198, 197, 11213, 796, 705, 5124, 496, 4553, 30991, 16545, 290, 2499, 43076, 351, 257, 3621, 27831, 2836, 7071, 2637, 11, 198, 197, 6511, 62, 11213, 796, 1280, 10786, 15675, 11682, 13, 81, 301, 3256, 705, 81, 27691, 961, 22784, 198, 197, 2539, 10879, 796, 705, 68, 17043, 7034, 3256, 198, 197, 4871, 13350, 796, 685, 198, 197, 197, 6, 41206, 12678, 7904, 604, 532, 17993, 3256, 198, 197, 197, 6, 31441, 7904, 1395, 1157, 26622, 7904, 7963, 42, 3256, 198, 197, 197, 6, 5317, 1631, 7591, 1240, 7904, 34152, 3256, 198, 197, 197, 6, 34156, 7904, 7294, 40, 20010, 1079, 7904, 17168, 13789, 3256, 198, 197, 197, 6, 35364, 15417, 7904, 3594, 3256, 198, 197, 197, 6, 18843, 803, 4482, 7904, 28069, 10426, 3256, 198, 197, 197, 6, 15167, 2229, 15417, 7904, 11361, 7904, 362, 13, 22, 3256, 198, 197, 197, 6, 15167, 2229, 15417, 7904, 11361, 7904, 513, 3256, 198, 197, 197, 6, 33221, 7904, 41086, 6, 198, 197, 4357, 198, 197, 9800, 796, 705, 8600, 7637, 22864, 3256, 198, 197, 6371, 796, 705, 5450, 1378, 12567, 13, 785, 14, 13776, 265, 86, 349, 365, 14, 68, 17043, 5577, 346, 2771, 801, 273, 3256, 198, 197, 43085, 796, 705, 36393, 3256, 198, 197, 43789, 796, 37250, 68, 17043, 5577, 346, 2771, 801, 273, 6, 4357, 198, 197, 26495, 62, 7890, 796, 1391, 198, 197, 197, 6, 68, 17043, 5577, 346, 2771, 801, 273, 10354, 37250, 9019, 13, 4743, 671, 20520, 198, 197, 5512, 198, 197, 17256, 62, 26495, 62, 7890, 796, 6407, 11, 198, 197, 13344, 62, 21230, 796, 6407, 11, 198, 197, 13000, 62, 13033, 796, 1391, 198, 197, 197, 6, 48317, 62, 46521, 10354, 685, 198, 197, 197, 197, 6, 68, 17043, 12, 13317, 12, 19738, 273, 796, 25872, 5577, 346, 2771, 801, 273, 13, 13317, 25, 12417, 6, 198, 197, 197, 60, 198, 197, 92, 198, 8, 198 ]
2.922222
360
from django.contrib import admin from .models import Contributor admin.site.register(Contributor)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 25767, 273, 198, 198, 28482, 13, 15654, 13, 30238, 7, 37146, 273, 8, 198 ]
3.571429
28
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 6738, 5366, 13, 9945, 1330, 20613, 198, 6738, 5366, 13, 85, 17, 1330, 10011, 2611, 44, 4254, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
2.977273
44
from sqlalchemy.orm.exc import NoResultFound from porthole.app import Session from .logger import PortholeLogger from porthole.models import AutomatedReport, AutomatedReportContact, AutomatedReportRecipient
[ 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 1400, 23004, 21077, 198, 6738, 279, 1506, 2305, 13, 1324, 1330, 23575, 198, 6738, 764, 6404, 1362, 1330, 350, 1506, 2305, 11187, 1362, 198, 6738, 279, 1506, 2305, 13, 27530, 1330, 17406, 515, 19100, 11, 17406, 515, 19100, 17829, 11, 17406, 515, 19100, 6690, 48137, 628 ]
3.781818
55
from __future__ import print_function import kwfile_dict import glob, os, sys import numpy as N from astropy.io import fits as pyfits import pylab as P import matplotlib from pysynphot.compat import ASTROPY_LT_1_3 def reverse(d): """Return a reverse lookup dictionary for the input dictionary""" r={} for k in d: r[d[k]]=k return r if __name__ == '__main__': #dirpath, fieldname, instr=sys.argv[1:] try: run(*sys.argv[1:]) except TypeError as e: print("sys.argv[1:] = ",sys.argv[1:]) raise e
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 479, 86, 7753, 62, 11600, 198, 11748, 15095, 11, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 399, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 355, 12972, 21013, 198, 11748, 279, 2645, 397, 355, 350, 198, 11748, 2603, 29487, 8019, 198, 198, 6738, 279, 893, 2047, 38611, 13, 5589, 265, 1330, 317, 18601, 3185, 56, 62, 27734, 62, 16, 62, 18, 628, 198, 4299, 9575, 7, 67, 2599, 198, 220, 220, 220, 37227, 13615, 257, 9575, 35847, 22155, 329, 262, 5128, 22155, 37811, 198, 220, 220, 220, 374, 34758, 92, 198, 220, 220, 220, 329, 479, 287, 288, 25, 198, 220, 220, 220, 220, 220, 220, 220, 374, 58, 67, 58, 74, 11907, 28, 74, 198, 220, 220, 220, 1441, 374, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 15908, 6978, 11, 2214, 3672, 11, 6480, 28, 17597, 13, 853, 85, 58, 16, 47715, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1057, 46491, 17597, 13, 853, 85, 58, 16, 25, 12962, 198, 220, 220, 220, 2845, 5994, 12331, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 17597, 13, 853, 85, 58, 16, 47715, 796, 33172, 17597, 13, 853, 85, 58, 16, 25, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 304, 198 ]
2.355932
236
""" Usage ----- CUDA_VISIBLE_DEVICES=0 python app.py """ import os from time import time # from neuspell import AspellChecker, JamspellChecker from neuspell import BertsclstmChecker, CnnlstmChecker, ElmosclstmChecker, NestedlstmChecker from neuspell import SclstmChecker, SclstmbertChecker, SclstmelmoChecker, BertChecker from flask import Flask, render_template, url_for, request from flask_cors import CORS TOKENIZE = True PRELOADED_MODELS = {} CURR_MODEL_KEYWORD = "elmosc-rnn" CURR_MODEL = None TOPK = 1 LOGS_PATH = "./logs" if not os.path.exists(LOGS_PATH): os.makedirs(LOGS_PATH) opfile = open(os.path.join(LOGS_PATH, str(time()) + ".logs.txt"), "w") # Define the app app = Flask(__name__) CORS(app) # needed for cross-domain requests, allow everything by default @app.route('/') @app.route('/home', methods=['POST']) @app.route('/loaded', methods=['POST']) @app.route('/reset', methods=['POST']) @app.route('/predict', methods=['POST']) if __name__ == "__main__": print("*** Flask Server ***") preload_models() app.run(debug=True, host='0.0.0.0', port=5000)
[ 37811, 201, 198, 28350, 201, 198, 30934, 201, 198, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 28, 15, 21015, 598, 13, 9078, 201, 198, 37811, 201, 198, 201, 198, 11748, 28686, 201, 198, 6738, 640, 1330, 640, 201, 198, 201, 198, 2, 422, 497, 385, 23506, 1330, 1081, 23506, 9787, 263, 11, 449, 4105, 23506, 9787, 263, 201, 198, 6738, 497, 385, 23506, 1330, 22108, 38528, 301, 76, 9787, 263, 11, 327, 20471, 75, 301, 76, 9787, 263, 11, 2574, 16785, 565, 301, 76, 9787, 263, 11, 399, 7287, 75, 301, 76, 9787, 263, 201, 198, 6738, 497, 385, 23506, 1330, 311, 565, 301, 76, 9787, 263, 11, 311, 565, 301, 1916, 83, 9787, 263, 11, 311, 565, 301, 17694, 5908, 9787, 263, 11, 22108, 9787, 263, 201, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 2581, 201, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 201, 198, 201, 198, 10468, 43959, 35400, 796, 6407, 201, 198, 47, 16448, 41048, 1961, 62, 33365, 37142, 796, 23884, 201, 198, 34, 31302, 62, 33365, 3698, 62, 20373, 54, 12532, 796, 366, 417, 16785, 66, 12, 81, 20471, 1, 201, 198, 34, 31302, 62, 33365, 3698, 796, 6045, 201, 198, 35222, 42, 796, 352, 201, 198, 25294, 50, 62, 34219, 796, 366, 19571, 6404, 82, 1, 201, 198, 361, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 25294, 50, 62, 34219, 2599, 201, 198, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 25294, 50, 62, 34219, 8, 201, 198, 404, 7753, 796, 1280, 7, 418, 13, 6978, 13, 22179, 7, 25294, 50, 62, 34219, 11, 965, 7, 2435, 28955, 1343, 27071, 6404, 82, 13, 14116, 12340, 366, 86, 4943, 201, 198, 201, 198, 2, 2896, 500, 262, 598, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 34, 20673, 7, 1324, 8, 220, 1303, 2622, 329, 3272, 12, 27830, 7007, 11, 1249, 2279, 416, 4277, 201, 198, 201, 198, 201, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 201, 198, 31, 1324, 13, 38629, 10786, 14, 11195, 3256, 5050, 28, 17816, 32782, 6, 12962, 201, 198, 201, 198, 201, 198, 31, 1324, 13, 38629, 10786, 14, 14578, 3256, 5050, 28, 17816, 32782, 6, 12962, 201, 198, 201, 198, 201, 198, 31, 1324, 13, 38629, 10786, 14, 42503, 3256, 5050, 28, 17816, 32782, 6, 12962, 201, 198, 201, 198, 201, 198, 31, 1324, 13, 38629, 10786, 14, 79, 17407, 3256, 5050, 28, 17816, 32782, 6, 12962, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 3601, 7203, 8162, 46947, 9652, 17202, 4943, 201, 198, 220, 220, 220, 662, 2220, 62, 27530, 3419, 201, 198, 220, 220, 220, 598, 13, 5143, 7, 24442, 28, 17821, 11, 2583, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 2493, 28, 27641, 8, 201, 198 ]
2.359343
487
# Released under the MIT License. See LICENSE for details. # """Provides help related ui.""" from __future__ import annotations from typing import TYPE_CHECKING import _ba import ba if TYPE_CHECKING: from typing import Optional class HelpWindow(ba.Window): """A window providing help on how to play."""
[ 2, 28728, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 329, 3307, 13, 198, 2, 198, 37811, 15946, 1460, 1037, 3519, 334, 72, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 11748, 4808, 7012, 198, 11748, 26605, 198, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 19720, 1330, 32233, 628, 198, 4871, 10478, 27703, 7, 7012, 13, 27703, 2599, 198, 220, 220, 220, 37227, 32, 4324, 4955, 1037, 319, 703, 284, 711, 526, 15931, 198 ]
3.445652
92
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Utils to handle Switcher elements. """ # Standard library imports import os import os.path as osp import sys # Local imports from spyder.config.base import _ from spyder.py3compat import iteritems, PY2 from spyder.utils import icon_manager as ima if PY2: from itertools import izip as zip def shorten_paths(path_list, is_unsaved): """ Takes a list of paths and tries to "intelligently" shorten them all. The aim is to make it clear to the user where the paths differ, as that is likely what they care about. Note that this operates on a list of paths not on individual paths. If the path ends in an actual file name, it will be trimmed off. """ # TODO: at the end, if the path is too long, should do a more dumb kind of # shortening, but not completely dumb. # Convert the path strings to a list of tokens and start building the # new_path using the drive path_list = path_list[:] # Make a local copy new_path_list = [] common_prefix = osp.dirname(osp.commonprefix(path_list)) for ii, (path, is_unsav) in enumerate(zip(path_list, is_unsaved)): if is_unsav: new_path_list.append(_('unsaved file')) path_list[ii] = None else: drive, path = osp.splitdrive(osp.dirname(path)) new_path_list.append(drive + osp.sep) path_list[ii] = [part for part in path.split(osp.sep) if part] recurse_level({i: pl for i, pl in enumerate(path_list) if pl}) if common_prefix: result_paths = [] for path in new_path_list: path_elements = path.rstrip(os.sep).split(common_prefix) if len(path_elements) > 1: result_paths.append("...{}".format(path_elements[-1])) else: result_paths.append(path) else: result_paths = [path.rstrip(os.sep) for path in new_path_list] return result_paths def get_file_icon(path): """Get icon for file by extension.""" if sys.platform == 'darwin': scale_factor = 0.9 elif os.name == 'nt': scale_factor = 0.8 else: scale_factor = 0.6 return ima.get_icon_by_extension_or_type(path, scale_factor)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 23688, 1082, 4935, 25767, 669, 198, 2, 49962, 739, 262, 2846, 286, 262, 17168, 13789, 198, 2, 357, 3826, 13997, 1082, 14, 834, 15003, 834, 13, 9078, 329, 3307, 8, 198, 198, 37811, 198, 18274, 4487, 284, 5412, 2451, 23640, 4847, 13, 198, 37811, 198, 198, 2, 8997, 5888, 17944, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 25064, 198, 198, 2, 10714, 17944, 198, 6738, 13997, 1082, 13, 11250, 13, 8692, 1330, 4808, 198, 6738, 13997, 1082, 13, 9078, 18, 5589, 265, 1330, 11629, 23814, 11, 350, 56, 17, 198, 6738, 13997, 1082, 13, 26791, 1330, 7196, 62, 37153, 355, 545, 64, 198, 198, 361, 350, 56, 17, 25, 198, 220, 220, 220, 422, 340, 861, 10141, 1330, 220, 528, 541, 355, 19974, 628, 198, 4299, 45381, 62, 6978, 82, 7, 6978, 62, 4868, 11, 318, 62, 13271, 9586, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 33687, 257, 1351, 286, 13532, 290, 8404, 284, 366, 600, 2976, 1473, 1, 45381, 606, 477, 13, 383, 198, 220, 220, 220, 4031, 318, 284, 787, 340, 1598, 284, 262, 2836, 810, 262, 13532, 13238, 11, 355, 326, 318, 198, 220, 220, 220, 1884, 644, 484, 1337, 546, 13, 5740, 326, 428, 14051, 319, 257, 1351, 286, 13532, 198, 220, 220, 220, 407, 319, 1981, 13532, 13, 628, 220, 220, 220, 1002, 262, 3108, 5645, 287, 281, 4036, 2393, 1438, 11, 340, 481, 307, 40325, 572, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 16926, 46, 25, 379, 262, 886, 11, 611, 262, 3108, 318, 1165, 890, 11, 815, 466, 257, 517, 13526, 1611, 286, 198, 220, 220, 220, 1303, 1790, 3101, 11, 475, 407, 3190, 13526, 13, 628, 220, 220, 220, 1303, 38240, 262, 3108, 13042, 284, 257, 1351, 286, 16326, 290, 923, 2615, 262, 198, 220, 220, 220, 1303, 649, 62, 6978, 1262, 262, 3708, 198, 220, 220, 220, 3108, 62, 4868, 796, 3108, 62, 4868, 58, 47715, 220, 1303, 6889, 257, 1957, 4866, 198, 220, 220, 220, 649, 62, 6978, 62, 4868, 796, 17635, 198, 220, 220, 220, 2219, 62, 40290, 796, 267, 2777, 13, 15908, 3672, 7, 2117, 13, 11321, 40290, 7, 6978, 62, 4868, 4008, 628, 220, 220, 220, 329, 21065, 11, 357, 6978, 11, 318, 62, 13271, 615, 8, 287, 27056, 378, 7, 13344, 7, 6978, 62, 4868, 11, 318, 62, 13271, 9586, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 318, 62, 13271, 615, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 6978, 62, 4868, 13, 33295, 28264, 10786, 13271, 9586, 2393, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 62, 4868, 58, 4178, 60, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3708, 11, 3108, 796, 267, 2777, 13, 35312, 19472, 7, 2117, 13, 15908, 3672, 7, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 6978, 62, 4868, 13, 33295, 7, 19472, 1343, 267, 2777, 13, 325, 79, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 62, 4868, 58, 4178, 60, 796, 685, 3911, 329, 636, 287, 3108, 13, 35312, 7, 2117, 13, 325, 79, 8, 611, 636, 60, 628, 220, 220, 220, 664, 12321, 62, 5715, 15090, 72, 25, 458, 329, 1312, 11, 458, 287, 27056, 378, 7, 6978, 62, 4868, 8, 611, 458, 30072, 628, 220, 220, 220, 611, 2219, 62, 40290, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 6978, 82, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 3108, 287, 649, 62, 6978, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 62, 68, 3639, 796, 3108, 13, 81, 36311, 7, 418, 13, 325, 79, 737, 35312, 7, 11321, 62, 40290, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 6978, 62, 68, 3639, 8, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 6978, 82, 13, 33295, 7203, 986, 90, 92, 1911, 18982, 7, 6978, 62, 68, 3639, 58, 12, 16, 60, 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, 1255, 62, 6978, 82, 13, 33295, 7, 6978, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 62, 6978, 82, 796, 685, 6978, 13, 81, 36311, 7, 418, 13, 325, 79, 8, 329, 3108, 287, 649, 62, 6978, 62, 4868, 60, 628, 220, 220, 220, 1441, 1255, 62, 6978, 82, 628, 198, 4299, 651, 62, 7753, 62, 4749, 7, 6978, 2599, 198, 220, 220, 220, 37227, 3855, 7196, 329, 2393, 416, 7552, 526, 15931, 628, 220, 220, 220, 611, 25064, 13, 24254, 6624, 705, 27455, 5404, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 5046, 62, 31412, 796, 657, 13, 24, 198, 220, 220, 220, 1288, 361, 28686, 13, 3672, 6624, 705, 429, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 5046, 62, 31412, 796, 657, 13, 23, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5046, 62, 31412, 796, 657, 13, 21, 628, 220, 220, 220, 1441, 545, 64, 13, 1136, 62, 4749, 62, 1525, 62, 2302, 3004, 62, 273, 62, 4906, 7, 6978, 11, 5046, 62, 31412, 8, 198 ]
2.466597
958
import os import logging from src.trainer import train_by_config logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) directory = 'train_settings/' for filename in os.listdir(directory): config_path = os.path.join(directory, filename) logging.info(f'Training model in accordance with {config_path} config') try: train_by_config(config_path) except Exception as err: print(err)
[ 11748, 28686, 201, 198, 11748, 18931, 201, 198, 6738, 12351, 13, 2213, 10613, 1330, 4512, 62, 1525, 62, 11250, 201, 198, 201, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 292, 310, 524, 8, 82, 532, 4064, 7, 20500, 8, 82, 3256, 1241, 28, 6404, 2667, 13, 10778, 8, 201, 198, 34945, 796, 705, 27432, 62, 33692, 14, 6, 201, 198, 1640, 29472, 287, 28686, 13, 4868, 15908, 7, 34945, 2599, 201, 198, 220, 220, 220, 4566, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 34945, 11, 29472, 8, 201, 198, 220, 220, 220, 18931, 13, 10951, 7, 69, 6, 44357, 2746, 287, 10213, 351, 1391, 11250, 62, 6978, 92, 4566, 11537, 201, 198, 201, 198, 220, 220, 220, 1949, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 1525, 62, 11250, 7, 11250, 62, 6978, 8, 201, 198, 220, 220, 220, 2845, 35528, 355, 11454, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 8056, 8, 201, 198 ]
2.650888
169
""" Simple utility to get random names. I think it uses data from a US census, located in the words folder. """ import random import os.path __author__ = "Matt Fister" maleFirsts = [line.rstrip('\n').title() for line in open(os.path.join(os.path.dirname(__file__), (os.path.join('words', 'maleFirstNames.txt'))))] femaleFirsts = [line.rstrip('\n').title() for line in open(os.path.join(os.path.dirname(__file__), (os.path.join('words', 'femaleFirstNames.txt'))))] lasts = [line.rstrip('\n').title() for line in open(os.path.join(os.path.dirname(__file__), (os.path.join('words', 'lastNames.txt'))))] if __name__ == "__main__": print(get_name(random.choice(['male', 'female'])))
[ 37811, 198, 26437, 10361, 284, 651, 4738, 3891, 13, 314, 892, 340, 3544, 1366, 422, 257, 1294, 21649, 11, 5140, 287, 262, 2456, 9483, 13, 198, 37811, 198, 198, 11748, 4738, 198, 11748, 28686, 13, 6978, 198, 198, 834, 9800, 834, 796, 366, 13448, 376, 1694, 1, 198, 198, 22606, 5962, 82, 796, 685, 1370, 13, 81, 36311, 10786, 59, 77, 27691, 7839, 3419, 329, 1627, 287, 1280, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 357, 418, 13, 6978, 13, 22179, 10786, 10879, 3256, 705, 22606, 5962, 36690, 13, 14116, 6, 35514, 60, 198, 24724, 5962, 82, 796, 685, 1370, 13, 81, 36311, 10786, 59, 77, 27691, 7839, 3419, 329, 1627, 287, 1280, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 357, 418, 13, 6978, 13, 22179, 10786, 10879, 3256, 705, 24724, 5962, 36690, 13, 14116, 6, 35514, 60, 198, 75, 5773, 796, 685, 1370, 13, 81, 36311, 10786, 59, 77, 27691, 7839, 3419, 329, 1627, 287, 1280, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 357, 418, 13, 6978, 13, 22179, 10786, 10879, 3256, 705, 12957, 36690, 13, 14116, 6, 35514, 60, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 1136, 62, 3672, 7, 25120, 13, 25541, 7, 17816, 22606, 3256, 705, 24724, 20520, 22305, 198 ]
2.767068
249
from django.conf import settings from core.utils import ensure_user_group_membership from .models import SlackAccess def invite_to_slack(privilege, person): """ Invites the user to Slack. """ privilege.slack_access.grant(person) def add_to_group(privilege, person): """ Generic "add person to group" privilege. The group to add is taken from the privilege slug. """ group = Group.objects.get(name=privilege.slug) ensure_user_group_membership(person.user, groups_to_add=[group])
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 4755, 13, 26791, 1330, 4155, 62, 7220, 62, 8094, 62, 30814, 1056, 198, 198, 6738, 764, 27530, 1330, 36256, 15457, 628, 198, 198, 4299, 14037, 62, 1462, 62, 6649, 441, 7, 13776, 41866, 11, 1048, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10001, 2737, 262, 2836, 284, 36256, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 11941, 13, 6649, 441, 62, 15526, 13, 2164, 415, 7, 6259, 8, 628, 198, 4299, 751, 62, 1462, 62, 8094, 7, 13776, 41866, 11, 1048, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 42044, 366, 2860, 1048, 284, 1448, 1, 11941, 13, 383, 1448, 284, 751, 318, 2077, 422, 262, 11941, 31065, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1448, 796, 4912, 13, 48205, 13, 1136, 7, 3672, 28, 13776, 41866, 13, 6649, 1018, 8, 198, 220, 220, 220, 4155, 62, 7220, 62, 8094, 62, 30814, 1056, 7, 6259, 13, 7220, 11, 2628, 62, 1462, 62, 2860, 41888, 8094, 12962, 198 ]
2.949153
177
from django.contrib import admin from .models import Transaction, Header, Ticker # Register your models here. admin.site.register(Transaction) admin.site.register(Header) admin.site.register(Ticker)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 45389, 11, 48900, 11, 309, 15799, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 48720, 8, 198, 28482, 13, 15654, 13, 30238, 7, 39681, 8, 198, 28482, 13, 15654, 13, 30238, 7, 51, 15799, 8, 198 ]
3.526316
57
# Copyright 2019 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. """ ################################################ Testcase_PrepareCondition: Testcase_TestSteps: Testcase_ExpectedResult: """ import datetime import os from base import TestBase import pytest from test_run.focal_loss_run import focal_loss_run from test_run.focalloss_ad_run import focalloss_grad_run from test_run.smooth_l1_loss_run import smooth_l1_loss_run from test_run.smooth_l1_loss_grad_run import smooth_l1_loss_grad_run ############################################################ # TestCase= class: put to tests/*/ ############################################################ if __name__ == "__main__": c = TestFocalLoss() c.setup() c.test_ci_run() c.teardown()
[ 2, 15069, 13130, 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, 201, 198, 37811, 201, 198, 29113, 14468, 201, 198, 201, 198, 14402, 7442, 62, 37534, 533, 48362, 25, 201, 198, 201, 198, 14402, 7442, 62, 14402, 8600, 82, 25, 201, 198, 201, 198, 14402, 7442, 62, 3109, 7254, 23004, 25, 201, 198, 201, 198, 37811, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 28686, 201, 198, 201, 198, 6738, 2779, 1330, 6208, 14881, 201, 198, 11748, 12972, 9288, 201, 198, 201, 198, 6738, 1332, 62, 5143, 13, 69, 4374, 62, 22462, 62, 5143, 1330, 25397, 62, 22462, 62, 5143, 201, 198, 6738, 1332, 62, 5143, 13, 69, 420, 439, 793, 62, 324, 62, 5143, 1330, 2133, 439, 793, 62, 9744, 62, 5143, 201, 198, 6738, 1332, 62, 5143, 13, 5796, 5226, 62, 75, 16, 62, 22462, 62, 5143, 1330, 7209, 62, 75, 16, 62, 22462, 62, 5143, 201, 198, 6738, 1332, 62, 5143, 13, 5796, 5226, 62, 75, 16, 62, 22462, 62, 9744, 62, 5143, 1330, 7209, 62, 75, 16, 62, 22462, 62, 9744, 62, 5143, 201, 198, 201, 198, 201, 198, 29113, 14468, 7804, 4242, 201, 198, 2, 6208, 20448, 28, 1398, 25, 1234, 284, 5254, 15211, 14, 201, 198, 29113, 14468, 7804, 4242, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 269, 796, 6208, 37, 4374, 43, 793, 3419, 201, 198, 220, 220, 220, 269, 13, 40406, 3419, 201, 198, 220, 220, 220, 269, 13, 9288, 62, 979, 62, 5143, 3419, 201, 198, 220, 220, 220, 269, 13, 660, 446, 593, 3419, 201, 198 ]
3.175772
421
import cfnresponse, logging, traceback, boto3 from random import choice from string import ascii_uppercase, ascii_lowercase, digits
[ 11748, 269, 22184, 26209, 11, 18931, 11, 12854, 1891, 11, 275, 2069, 18, 198, 6738, 4738, 1330, 3572, 198, 6738, 4731, 1330, 355, 979, 72, 62, 7211, 2798, 589, 11, 355, 979, 72, 62, 21037, 7442, 11, 19561, 628, 198 ]
3.35
40
from django.urls import path, include from rest_framework.routers import DefaultRouter from rest_framework_bulk.routes import BulkRouter from supplier import views router = DefaultRouter() bulk_router = BulkRouter() bulk_router.register("receives", views.ReceiveViewSet) bulk_router.register("suppliers", views.SupplierViewSet) bulk_router.register("purchase_orders", views.PurchaseOrderViewSet) app_name = "supplier" urlpatterns = [ path("", include(router.urls)), path("", include(bulk_router.urls)), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 6738, 1334, 62, 30604, 62, 65, 12171, 13, 81, 448, 274, 1330, 47900, 49, 39605, 198, 198, 6738, 22693, 1330, 5009, 628, 198, 472, 353, 796, 15161, 49, 39605, 3419, 198, 65, 12171, 62, 472, 353, 796, 47900, 49, 39605, 3419, 198, 198, 65, 12171, 62, 472, 353, 13, 30238, 7203, 260, 344, 1083, 1600, 5009, 13, 3041, 15164, 7680, 7248, 8, 198, 65, 12171, 62, 472, 353, 13, 30238, 7203, 18608, 75, 3183, 1600, 5009, 13, 15979, 2505, 7680, 7248, 8, 198, 65, 12171, 62, 472, 353, 13, 30238, 7203, 79, 18737, 62, 6361, 1600, 5009, 13, 47651, 18743, 7680, 7248, 8, 198, 198, 1324, 62, 3672, 796, 366, 18608, 2505, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 1600, 2291, 7, 472, 353, 13, 6371, 82, 36911, 198, 220, 220, 220, 3108, 7203, 1600, 2291, 7, 65, 12171, 62, 472, 353, 13, 6371, 82, 36911, 198, 60, 198 ]
2.899441
179
''' A pangram is a sentence where every letter of the English alphabet appears at least once. Given a string sentence containing only lowercase English letters, return true if sentence is a pangram, or false otherwise. Example 1: Input: sentence = "thequickbrownfoxjumpsoverthelazydog" Output: true Explanation: sentence contains at least one of every letter of the English alphabet. Example 2: Input: sentence = "leetcode" Output: false '''
[ 7061, 6, 198, 32, 279, 648, 859, 318, 257, 6827, 810, 790, 3850, 286, 262, 3594, 24830, 3568, 379, 1551, 1752, 13, 198, 15056, 257, 4731, 6827, 7268, 691, 2793, 7442, 3594, 7475, 11, 1441, 2081, 611, 6827, 318, 257, 279, 648, 859, 11, 393, 3991, 4306, 13, 198, 220, 198, 16281, 352, 25, 198, 198, 20560, 25, 6827, 796, 366, 1169, 24209, 33282, 12792, 43327, 568, 332, 37274, 1031, 5173, 519, 1, 198, 26410, 25, 2081, 198, 3109, 11578, 341, 25, 6827, 4909, 379, 1551, 530, 286, 790, 3850, 286, 262, 3594, 24830, 13, 198, 16281, 362, 25, 198, 198, 20560, 25, 6827, 796, 366, 293, 316, 8189, 1, 198, 26410, 25, 3991, 198, 7061, 6, 198 ]
3.779661
118
import matplotlib.pyplot as plt import numpy as np from PyQt5.QtCore import Qt from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QApplication from draw_binary_image import plot_binary_image if __name__ == "__main__": main()
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 36070, 21471, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 198, 6738, 3197, 62, 39491, 62, 9060, 1330, 7110, 62, 39491, 62, 9060, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.7
90
from PolyAModel import * import re import os, sys, copy, getopt, re, argparse import random import pandas as pd import numpy as np from Bio.Seq import Seq from TrimmedMean import TrimmedMean import gc #from extract_coverage_from_scanGenome import check #def dataProcessing(scan_file,window,rst): if __name__ == "__main__": Evaluate(*args())
[ 6738, 12280, 2390, 375, 417, 1330, 1635, 201, 198, 11748, 302, 201, 198, 11748, 28686, 11, 25064, 11, 4866, 11, 651, 8738, 11, 302, 11, 1822, 29572, 201, 198, 11748, 4738, 201, 198, 11748, 19798, 292, 355, 279, 67, 220, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 16024, 13, 4653, 80, 1330, 1001, 80, 201, 198, 6738, 833, 320, 1150, 5308, 272, 1330, 833, 320, 1150, 5308, 272, 201, 198, 11748, 308, 66, 201, 198, 2, 6738, 7925, 62, 1073, 1857, 62, 6738, 62, 35836, 13746, 462, 1330, 2198, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 2, 4299, 1366, 18709, 278, 7, 35836, 62, 7753, 11, 17497, 11, 81, 301, 2599, 201, 198, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 26439, 4985, 46491, 22046, 28955, 201, 198, 201, 198 ]
2.386503
163
import sys import os from jinja2 import Template # Apply environment variables to a Jinga2 Template file # Save the results into an output file specified by the caller if __name__ == "__main__": if len(sys.argv) != 3: print("usage: python apply_env.py input_file output_file") sys.exit(1) with open(sys.argv[1], "r") as f: data = f.read() t = Template(data) with open(sys.argv[2], "w") as f: f.write(t.render(os.environ))
[ 11748, 25064, 198, 11748, 28686, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 198, 198, 2, 27967, 2858, 9633, 284, 257, 42279, 64, 17, 37350, 2393, 198, 2, 12793, 262, 2482, 656, 281, 5072, 2393, 7368, 416, 262, 24955, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 14512, 513, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 26060, 25, 21015, 4174, 62, 24330, 13, 9078, 5128, 62, 7753, 5072, 62, 7753, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 25064, 13, 37023, 7, 16, 8, 628, 220, 220, 220, 351, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 277, 13, 961, 3419, 628, 220, 220, 220, 256, 796, 37350, 7, 7890, 8, 198, 220, 220, 220, 351, 1280, 7, 17597, 13, 853, 85, 58, 17, 4357, 366, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 277, 13, 13564, 7, 83, 13, 13287, 7, 418, 13, 268, 2268, 4008, 198 ]
2.489474
190
#!/usr/bin/env python import os import argparse import PIL.Image import PIL.ExifTags if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 11748, 350, 4146, 13, 5159, 198, 11748, 350, 4146, 13, 3109, 361, 36142, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.529412
51
### # Copyright (c) 2004-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions, and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions, and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the author of this software nor the name of # contributors to this software may be used to endorse or promote products # derived from this software without specific prior written consent. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### import supybot.utils as utils from supybot.commands import * import supybot.ircutils as ircutils import supybot.schedule as schedule import supybot.callbacks as callbacks import commands Class = Tail # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
[ 21017, 198, 2, 15069, 357, 66, 8, 5472, 12, 14315, 11, 40192, 376, 1939, 372, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 389, 1138, 25, 198, 2, 198, 2, 220, 220, 1635, 2297, 396, 2455, 507, 286, 2723, 2438, 1276, 12377, 262, 2029, 6634, 4003, 11, 198, 2, 220, 220, 220, 220, 428, 1351, 286, 3403, 11, 290, 262, 1708, 37592, 13, 198, 2, 220, 220, 1635, 2297, 396, 2455, 507, 287, 13934, 1296, 1276, 22919, 262, 2029, 6634, 4003, 11, 198, 2, 220, 220, 220, 220, 428, 1351, 286, 3403, 11, 290, 262, 1708, 37592, 287, 262, 198, 2, 220, 220, 220, 220, 10314, 290, 14, 273, 584, 5696, 2810, 351, 262, 6082, 13, 198, 2, 220, 220, 1635, 16126, 262, 1438, 286, 262, 1772, 286, 428, 3788, 4249, 262, 1438, 286, 198, 2, 220, 220, 220, 220, 20420, 284, 428, 3788, 743, 307, 973, 284, 11438, 393, 7719, 3186, 198, 2, 220, 220, 220, 220, 10944, 422, 428, 3788, 1231, 2176, 3161, 3194, 8281, 13, 198, 2, 198, 2, 12680, 47466, 3180, 36592, 2389, 1961, 11050, 3336, 27975, 38162, 9947, 367, 15173, 4877, 5357, 27342, 9865, 3843, 20673, 366, 1921, 3180, 1, 198, 2, 5357, 15529, 7788, 32761, 6375, 8959, 49094, 34764, 11015, 11, 47783, 2751, 11, 21728, 5626, 40880, 5390, 11, 3336, 198, 2, 8959, 49094, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 5357, 376, 46144, 7473, 317, 16652, 2149, 37232, 33079, 48933, 198, 2, 15986, 13954, 48778, 1961, 13, 220, 3268, 8005, 49261, 50163, 3336, 27975, 38162, 9947, 47210, 21479, 6375, 27342, 9865, 3843, 20673, 9348, 198, 2, 43031, 19146, 7473, 15529, 42242, 11, 3268, 17931, 23988, 11, 19387, 25256, 1847, 11, 38846, 11, 7788, 3620, 6489, 13153, 11, 6375, 198, 2, 7102, 5188, 10917, 3525, 12576, 29506, 25552, 357, 1268, 39149, 2751, 11, 21728, 5626, 40880, 5390, 11, 41755, 11335, 10979, 3963, 198, 2, 28932, 2257, 2043, 37780, 21090, 50, 6375, 49254, 26, 406, 18420, 3963, 23210, 11, 42865, 11, 6375, 4810, 19238, 29722, 26, 6375, 43949, 44180, 198, 2, 23255, 49, 8577, 24131, 8, 29630, 36, 5959, 7257, 2937, 1961, 5357, 6177, 15529, 3336, 15513, 3963, 43031, 25382, 11, 7655, 2767, 16879, 3268, 198, 2, 27342, 10659, 11, 19269, 18379, 43031, 25382, 11, 6375, 309, 9863, 357, 1268, 39149, 2751, 399, 7156, 43, 3528, 18310, 6375, 25401, 54, 24352, 8, 198, 2, 5923, 1797, 2751, 3268, 15529, 34882, 16289, 3963, 3336, 23210, 3963, 12680, 47466, 11, 45886, 16876, 5984, 29817, 1961, 3963, 3336, 198, 2, 28069, 11584, 25382, 3963, 13558, 3398, 29506, 11879, 13, 198, 21017, 198, 198, 11748, 7418, 88, 13645, 13, 26791, 355, 3384, 4487, 198, 6738, 7418, 88, 13645, 13, 9503, 1746, 1330, 1635, 198, 11748, 7418, 88, 13645, 13, 1980, 26791, 355, 220, 1980, 26791, 198, 11748, 7418, 88, 13645, 13, 15952, 5950, 355, 7269, 198, 11748, 7418, 88, 13645, 13, 13345, 10146, 355, 869, 10146, 198, 198, 11748, 9729, 628, 198, 198, 9487, 796, 21759, 628, 198, 2, 43907, 25, 2617, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 4292, 8658, 2420, 10394, 28, 3720, 25, 198 ]
3.449814
538
# # Fusion Pickles Probability 3 Parts # # Peter Turney, July 14, 2021 # # From the 20 runs, extract all of the pickled three-part seeds # that are stored in the 20 "fusion_storage.bin" pickle files. # Read the pickles and run each pickle, recording the results in # a numpy tensor: # # tensor = num_seeds x num_steps x num_colours x num_parts # # num_seeds = to be determined # num_steps = 1001 # num_colours = 5 (white, red, orange, blue, green) # num_parts = 3 # # After this tensor has been filled with values, generate # a table of the form: # # <prob N M> = <probability for N managers and M workers> # # row in table = <step number> <prob 3 0> <prob 2 1> <prob 1 2> <prob 0 3> # import golly as g import model_classes as mclass import model_functions as mfunc import model_parameters as mparam import numpy as np import copy import time import pickle import os import re import sys # # Parameter values for making the graphs. # max_seeds = 2000 # probably won't need more seeds than this num_steps = 1001 # number of time steps in the game num_colours = 5 # 5 colours [white, red, blue, orange, green] num_parts = 3 # number of parts num_files = 20 # number of fusion pickle files step_size = 20 # number of time steps between each plot point # # Location of fusion_storage.bin files -- the input pickles. # fusion_dir = "C:/Users/peter/Peter's Projects" + \ "/management-theory-revised/Experiments" # list of pickle files fusion_files = [] # loop through the fusion files and record the file paths # -- we assume the folders have the form "run1", "run2", ... for i in range(num_files): fusion_files.append(fusion_dir + "/run" + str(i + 1) + \ "/fusion_storage.bin") # # Loop through the pickles, loading them into fusion_list. # Each fusion file will contain several pickles. # seed_list = mfunc.read_fusion_pickles(fusion_files) # # Given a list of seeds, fill a tensor with counts of the growth of colours # generated by running the Management Game. # [tensor, num_seeds] = mfunc.growth_tensor(g, seed_list, step_size, max_seeds, num_steps, num_colours, num_parts) # # now the tensor is full, so let's make the graph for 3 parts # graph_file = fusion_dir + "/fusion_pickles_probability_3.txt" graph_handle = open(graph_file, "w") graph_handle.write("\n\nNOTE: {} Seeds -- {} Parts per seed\n\n".format( num_seeds, num_parts)) header = ["step num", \ "3 managers and 0 workers", \ "2 managers and 1 worker", \ "1 manager and 2 workers", \ "0 managers and 3 workers"] graph_handle.write("\t".join(header) + "\n") # for step_num in range(0, num_steps, step_size): # initialize counts count_3m0w = 0 # 3 managers, 0 workers count_2m1w = 0 # 2 managers, 1 worker count_1m2w = 0 # 1 manager, 2 workers count_0m3w = 0 # 0 managers, 3 workers # iterate over seed_num for seed_num in range(num_seeds): # iterate over parts manager_count = 0 for part_num in range(num_parts): # extract colours red = tensor[seed_num, step_num, 1, part_num] blue = tensor[seed_num, step_num, 2, part_num] orange = tensor[seed_num, step_num, 3, part_num] green = tensor[seed_num, step_num, 4, part_num] # we focus on the current part (part_num) only # -- the current part is always red, by convention red_manager = (orange > green) # true or false manager_count += red_manager # will increment by 0 or 1 # increment counts if (manager_count == 3): count_3m0w += 1 elif (manager_count == 2): count_2m1w += 1 elif (manager_count == 1): count_1m2w += 1 else: count_0m3w += 1 # assert count_3m0w + count_2m1w + count_1m2w + count_0m3w == num_seeds # probability_3m0w = count_3m0w / num_seeds probability_2m1w = count_2m1w / num_seeds probability_1m2w = count_1m2w / num_seeds probability_0m3w = count_0m3w / num_seeds # graph_handle.write("{}\t{:.3f}\t{:.3f}\t{:.3f}\t{:.3f}\n".format(step_num, probability_3m0w, probability_2m1w, probability_1m2w, probability_0m3w)) # # graph_handle.close() # #
[ 2, 201, 198, 2, 21278, 12346, 829, 30873, 1799, 513, 22349, 201, 198, 2, 201, 198, 2, 5613, 6756, 2959, 11, 2901, 1478, 11, 33448, 201, 198, 2, 201, 198, 2, 3574, 262, 1160, 4539, 11, 7925, 477, 286, 262, 2298, 992, 1115, 12, 3911, 11904, 201, 198, 2, 326, 389, 8574, 287, 262, 1160, 366, 69, 4241, 62, 35350, 13, 8800, 1, 2298, 293, 3696, 13, 201, 198, 2, 4149, 262, 2298, 829, 290, 1057, 1123, 2298, 293, 11, 8296, 262, 2482, 287, 201, 198, 2, 257, 299, 32152, 11192, 273, 25, 201, 198, 2, 201, 198, 2, 11192, 273, 796, 997, 62, 325, 5379, 2124, 997, 62, 20214, 2124, 997, 62, 4033, 4662, 2124, 997, 62, 42632, 201, 198, 2, 201, 198, 2, 997, 62, 325, 5379, 220, 220, 796, 284, 307, 5295, 201, 198, 2, 997, 62, 20214, 220, 220, 796, 1802, 16, 201, 198, 2, 997, 62, 4033, 4662, 796, 642, 357, 11186, 11, 2266, 11, 10912, 11, 4171, 11, 4077, 8, 201, 198, 2, 997, 62, 42632, 220, 220, 796, 513, 201, 198, 2, 201, 198, 2, 2293, 428, 11192, 273, 468, 587, 5901, 351, 3815, 11, 7716, 201, 198, 2, 257, 3084, 286, 262, 1296, 25, 201, 198, 2, 201, 198, 2, 1279, 1676, 65, 399, 337, 29, 796, 1279, 1676, 65, 1799, 329, 399, 11663, 290, 337, 3259, 29, 201, 198, 2, 201, 198, 2, 5752, 287, 3084, 796, 1279, 9662, 1271, 29, 1279, 1676, 65, 513, 657, 29, 1279, 1676, 65, 362, 352, 29, 1279, 1676, 65, 352, 362, 29, 1279, 1676, 65, 657, 513, 29, 201, 198, 2, 201, 198, 11748, 467, 12810, 355, 308, 201, 198, 11748, 2746, 62, 37724, 355, 285, 4871, 201, 198, 11748, 2746, 62, 12543, 2733, 355, 285, 20786, 201, 198, 11748, 2746, 62, 17143, 7307, 355, 285, 17143, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 4866, 201, 198, 11748, 640, 201, 198, 11748, 2298, 293, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 11748, 25064, 201, 198, 2, 201, 198, 2, 25139, 2357, 3815, 329, 1642, 262, 28770, 13, 201, 198, 2, 201, 198, 9806, 62, 325, 5379, 220, 220, 796, 4751, 1303, 2192, 1839, 470, 761, 517, 11904, 621, 428, 201, 198, 22510, 62, 20214, 220, 220, 796, 1802, 16, 1303, 1271, 286, 640, 4831, 287, 262, 983, 201, 198, 22510, 62, 4033, 4662, 796, 642, 220, 220, 220, 1303, 642, 18915, 685, 11186, 11, 2266, 11, 4171, 11, 10912, 11, 4077, 60, 201, 198, 22510, 62, 42632, 220, 220, 796, 513, 220, 220, 220, 1303, 1271, 286, 3354, 201, 198, 22510, 62, 16624, 220, 220, 796, 1160, 220, 220, 1303, 1271, 286, 21748, 2298, 293, 3696, 201, 198, 9662, 62, 7857, 220, 220, 796, 1160, 220, 220, 1303, 1271, 286, 640, 4831, 1022, 1123, 7110, 966, 201, 198, 2, 201, 198, 2, 13397, 286, 21748, 62, 35350, 13, 8800, 3696, 1377, 262, 5128, 2298, 829, 13, 201, 198, 2, 201, 198, 69, 4241, 62, 15908, 796, 366, 34, 14079, 14490, 14, 79, 2357, 14, 19727, 338, 29898, 1, 1343, 3467, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12813, 27604, 12, 1169, 652, 12, 260, 16149, 14, 20468, 6800, 1, 201, 198, 2, 1351, 286, 2298, 293, 3696, 201, 198, 69, 4241, 62, 16624, 796, 17635, 201, 198, 2, 9052, 832, 262, 21748, 3696, 290, 1700, 262, 2393, 13532, 201, 198, 2, 1377, 356, 7048, 262, 24512, 423, 262, 1296, 366, 5143, 16, 1600, 366, 5143, 17, 1600, 2644, 201, 198, 1640, 1312, 287, 2837, 7, 22510, 62, 16624, 2599, 201, 198, 220, 21748, 62, 16624, 13, 33295, 7, 69, 4241, 62, 15908, 1343, 12813, 5143, 1, 1343, 965, 7, 72, 1343, 352, 8, 1343, 3467, 201, 198, 220, 220, 220, 12813, 69, 4241, 62, 35350, 13, 8800, 4943, 201, 198, 2, 201, 198, 2, 26304, 832, 262, 2298, 829, 11, 11046, 606, 656, 21748, 62, 4868, 13, 201, 198, 2, 5501, 21748, 2393, 481, 3994, 1811, 2298, 829, 13, 201, 198, 2, 201, 198, 28826, 62, 4868, 796, 285, 20786, 13, 961, 62, 69, 4241, 62, 27729, 829, 7, 69, 4241, 62, 16624, 8, 201, 198, 2, 201, 198, 2, 11259, 257, 1351, 286, 11904, 11, 6070, 257, 11192, 273, 351, 9853, 286, 262, 3349, 286, 18915, 201, 198, 2, 7560, 416, 2491, 262, 8549, 3776, 13, 201, 198, 2, 201, 198, 58, 83, 22854, 11, 997, 62, 325, 5379, 60, 796, 285, 20786, 13, 27922, 62, 83, 22854, 7, 70, 11, 9403, 62, 4868, 11, 2239, 62, 7857, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 325, 5379, 11, 997, 62, 20214, 11, 997, 62, 4033, 4662, 11, 997, 62, 42632, 8, 201, 198, 2, 201, 198, 2, 783, 262, 11192, 273, 318, 1336, 11, 523, 1309, 338, 787, 262, 4823, 329, 513, 3354, 201, 198, 2, 201, 198, 34960, 62, 7753, 796, 21748, 62, 15908, 1343, 12813, 69, 4241, 62, 27729, 829, 62, 1676, 65, 1799, 62, 18, 13, 14116, 1, 201, 198, 34960, 62, 28144, 796, 1280, 7, 34960, 62, 7753, 11, 366, 86, 4943, 201, 198, 34960, 62, 28144, 13, 13564, 7203, 59, 77, 59, 77, 16580, 25, 23884, 41833, 1377, 23884, 22349, 583, 9403, 59, 77, 59, 77, 1911, 18982, 7, 201, 198, 220, 997, 62, 325, 5379, 11, 997, 62, 42632, 4008, 201, 198, 25677, 796, 14631, 9662, 997, 1600, 3467, 201, 198, 220, 366, 18, 11663, 290, 657, 3259, 1600, 3467, 201, 198, 220, 366, 17, 11663, 290, 352, 8383, 1600, 3467, 201, 198, 220, 366, 16, 4706, 290, 362, 3259, 1600, 3467, 201, 198, 220, 366, 15, 11663, 290, 513, 3259, 8973, 201, 198, 34960, 62, 28144, 13, 13564, 7203, 59, 83, 1911, 22179, 7, 25677, 8, 1343, 37082, 77, 4943, 201, 198, 2, 201, 198, 1640, 2239, 62, 22510, 287, 2837, 7, 15, 11, 997, 62, 20214, 11, 2239, 62, 7857, 2599, 201, 198, 220, 1303, 41216, 9853, 201, 198, 220, 954, 62, 18, 76, 15, 86, 796, 657, 1303, 513, 11663, 11, 657, 3259, 201, 198, 220, 954, 62, 17, 76, 16, 86, 796, 657, 1303, 362, 11663, 11, 352, 8383, 201, 198, 220, 954, 62, 16, 76, 17, 86, 796, 657, 1303, 352, 4706, 11, 220, 362, 3259, 201, 198, 220, 954, 62, 15, 76, 18, 86, 796, 657, 1303, 657, 11663, 11, 513, 3259, 201, 198, 220, 1303, 11629, 378, 625, 9403, 62, 22510, 201, 198, 220, 329, 9403, 62, 22510, 287, 2837, 7, 22510, 62, 325, 5379, 2599, 201, 198, 220, 220, 220, 1303, 11629, 378, 625, 3354, 201, 198, 220, 220, 220, 4706, 62, 9127, 796, 657, 201, 198, 220, 220, 220, 329, 636, 62, 22510, 287, 2837, 7, 22510, 62, 42632, 2599, 201, 198, 220, 220, 220, 220, 220, 1303, 7925, 18915, 201, 198, 220, 220, 220, 220, 220, 2266, 220, 220, 220, 796, 11192, 273, 58, 28826, 62, 22510, 11, 2239, 62, 22510, 11, 352, 11, 636, 62, 22510, 60, 201, 198, 220, 220, 220, 220, 220, 4171, 220, 220, 796, 11192, 273, 58, 28826, 62, 22510, 11, 2239, 62, 22510, 11, 362, 11, 636, 62, 22510, 60, 201, 198, 220, 220, 220, 220, 220, 10912, 796, 11192, 273, 58, 28826, 62, 22510, 11, 2239, 62, 22510, 11, 513, 11, 636, 62, 22510, 60, 201, 198, 220, 220, 220, 220, 220, 4077, 220, 796, 11192, 273, 58, 28826, 62, 22510, 11, 2239, 62, 22510, 11, 604, 11, 636, 62, 22510, 60, 201, 198, 220, 220, 220, 220, 220, 1303, 356, 2962, 319, 262, 1459, 636, 357, 3911, 62, 22510, 8, 691, 201, 198, 220, 220, 220, 220, 220, 1303, 1377, 262, 1459, 636, 318, 1464, 2266, 11, 416, 9831, 201, 198, 220, 220, 220, 220, 220, 2266, 62, 37153, 796, 357, 43745, 1875, 4077, 8, 1303, 2081, 393, 3991, 201, 198, 220, 220, 220, 220, 220, 4706, 62, 9127, 15853, 2266, 62, 37153, 1303, 481, 18703, 416, 657, 393, 352, 201, 198, 220, 220, 220, 1303, 18703, 9853, 201, 198, 220, 220, 220, 611, 357, 37153, 62, 9127, 6624, 513, 2599, 201, 198, 220, 220, 220, 220, 220, 954, 62, 18, 76, 15, 86, 15853, 352, 201, 198, 220, 220, 220, 1288, 361, 357, 37153, 62, 9127, 6624, 362, 2599, 201, 198, 220, 220, 220, 220, 220, 954, 62, 17, 76, 16, 86, 15853, 352, 201, 198, 220, 220, 220, 1288, 361, 357, 37153, 62, 9127, 6624, 352, 2599, 201, 198, 220, 220, 220, 220, 220, 954, 62, 16, 76, 17, 86, 15853, 352, 201, 198, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 954, 62, 15, 76, 18, 86, 15853, 352, 201, 198, 220, 1303, 201, 198, 220, 6818, 954, 62, 18, 76, 15, 86, 1343, 954, 62, 17, 76, 16, 86, 1343, 954, 62, 16, 76, 17, 86, 1343, 954, 62, 15, 76, 18, 86, 6624, 997, 62, 325, 5379, 201, 198, 220, 1303, 201, 198, 220, 12867, 62, 18, 76, 15, 86, 796, 954, 62, 18, 76, 15, 86, 1220, 997, 62, 325, 5379, 201, 198, 220, 12867, 62, 17, 76, 16, 86, 796, 954, 62, 17, 76, 16, 86, 1220, 997, 62, 325, 5379, 201, 198, 220, 12867, 62, 16, 76, 17, 86, 796, 954, 62, 16, 76, 17, 86, 1220, 997, 62, 325, 5379, 201, 198, 220, 12867, 62, 15, 76, 18, 86, 796, 954, 62, 15, 76, 18, 86, 1220, 997, 62, 325, 5379, 201, 198, 220, 1303, 201, 198, 220, 4823, 62, 28144, 13, 13564, 7203, 90, 32239, 83, 90, 25, 13, 18, 69, 32239, 83, 90, 25, 13, 18, 69, 32239, 83, 90, 25, 13, 18, 69, 32239, 83, 90, 25, 13, 18, 69, 32239, 77, 1911, 18982, 7, 9662, 62, 22510, 11, 201, 198, 220, 220, 220, 12867, 62, 18, 76, 15, 86, 11, 12867, 62, 17, 76, 16, 86, 11, 12867, 62, 16, 76, 17, 86, 11, 12867, 62, 15, 76, 18, 86, 4008, 201, 198, 220, 1303, 201, 198, 2, 201, 198, 34960, 62, 28144, 13, 19836, 3419, 201, 198, 2, 201, 198, 2 ]
2.514269
1,682
#!/usr/bin/env python3 # Copyright 2022 Amazon.com, Inc. or its affiliates. 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. import logging import os import re import sys from typing import Optional, Tuple import click from aws_ddk.__metadata__ import __version__ from aws_ddk.commands.bootstrap import bootstrap_account from aws_ddk.commands.create import create_code_repository from aws_ddk.commands.deploy import cdk_deploy from aws_ddk.commands.init import init_project from aws_ddk.utils import get_package_root from boto3 import Session, _get_default_session, setup_default_session DEBUG_LOGGING_FORMAT = "[%(asctime)s][%(filename)-13s:%(lineno)3d] %(message)s" DEBUG_LOGGING_FORMAT_REMOTE = "[%(filename)-13s:%(lineno)3d] %(message)s" DEFAULT_PROJECT_TEMPLATE = "data/project_templates/ddk_app/" _logger: logging.Logger = logging.getLogger(__name__) @click.group() @click.version_option(__version__) @click.option( "--debug/--no-debug", default=False, help="Turn debug logging on/off.", show_default=True, ) def cli( debug: bool, ) -> None: """AWS DDK CLI.""" click.echo(f"AWS DDK CLI {__version__} (Python {sys.version})") if debug: enable_debug(format=DEBUG_LOGGING_FORMAT) _logger.debug(f"debug: {debug}") @cli.command(name="init") @click.argument( "name", type=str, required=True, ) @click.option( "--environment", "-e", type=str, help="The id of the environment.", required=True, default="dev", show_default=True, ) @click.option( "--template", "-t", type=str, help="A directory containing a project template directory, or a URL to a git repository", ) def init(name: str, environment: str, template: Optional[str] = None) -> None: """ Create the local structure for a new AWS DDK Python project. NAME is the name of the project. """ # Use default Cookiecutter project template if not template: template = os.path.join(get_package_root(), DEFAULT_PROJECT_TEMPLATE) return init_project(name=name, environment=environment, template=template) @cli.command(name="bootstrap") @click.option( "--environment", "-e", type=RegexString(regex=r"^[A-Za-z0-9_-]{1,4}$"), help="The id of the environment.", required=True, default="dev", show_default=True, ) @click.option( "--profile", "-p", type=str, default="default", help="Use a specific profile from your AWS credentials file.", show_default=True, required=False, ) @click.option( "--region", "-r", type=str, default=None, help="AWS Region name (e.g. us-east-1). If None, it will be inferred.", show_default=False, required=False, ) @click.option( "--prefix", type=RegexString(regex=r"^[A-Za-z0-9_-]{1,5}$"), help="The prefix to resource names.", required=False, default="ddk", show_default=True, ) @click.option( "--qualifier", type=RegexString(regex=r"^[A-Za-z0-9_-]{1,10}$"), help="The CDK bootstrap qualifier.", required=False, ) @click.option( "--trusted-accounts", "-a", type=str, help="List of trusted AWS accounts to perform deployments (e.g. -a 111111111111 -a 222222222222).", multiple=True, required=False, ) @click.option( "--iam-policies", "-i", type=str, help="""List of IAM managed policy ARNs that should be attached to the role performing deployments. (e.g. -i arn1 -i arn2)""", multiple=True, required=False, ) @click.option( "--permissions-boundary", type=str, help="IAM managed permissions boundary policy ARN that should be attached to the role performing deployments.", required=False, ) @click.option( "--tags", "-t", type=(str, str), help="List of tags to apply to the stack (e.g -t CostCenter 1984 -t Framework DDK).", multiple=True, required=False, ) def bootstrap( environment: str, profile: str, region: Optional[str] = None, prefix: Optional[str] = None, qualifier: Optional[str] = None, trusted_accounts: Optional[Tuple[str]] = None, iam_policies: Optional[Tuple[str]] = None, permissions_boundary: Optional[str] = None, tags: Optional[Tuple[Tuple[str, str]]] = None, ) -> None: """Bootstrap the AWS account with DDK resources.""" setup_boto_session(profile, region) bootstrap_account( environment=environment, prefix=prefix, qualifier=qualifier, trusted_accounts=trusted_accounts, iam_policies=iam_policies, permissions_boundary=permissions_boundary, tags=tags, ) @cli.command(name="create-repository") @click.argument( "name", type=str, required=True, ) @click.option( "--profile", "-p", type=str, default="default", help="Use a specific profile from your AWS credentials file.", show_default=True, required=False, ) @click.option( "--region", "-r", type=str, default=None, help="AWS Region name (e.g. us-east-1). If None, it will be inferred.", show_default=False, required=False, ) @click.option( "--description", "-d", type=str, help="The description of the repository.", required=False, ) @click.option( "--tags", "-t", type=(str, str), help="List of tags to apply to the repository (e.g -t CostCenter 1984 -t Framework DDK).", multiple=True, required=False, ) def create_repository( name: str, profile: str, region: Optional[str] = None, description: Optional[str] = None, tags: Optional[Tuple[Tuple[str, str]]] = None, ) -> None: """ Create a code repository from the source system provider. NAME is the name of the repository. """ setup_boto_session(profile, region) create_code_repository( name=name, description=description, tags=tags, ) @cli.command(name="deploy") @click.option( "--profile", "-p", type=str, default="default", help="Use a specific profile from your AWS credentials file.", show_default=True, required=False, ) @click.option( "--require-approval", type=click.Choice(["never", "any-change", "broadening"], case_sensitive=False), default="never", help="What security-sensitive changes need manual approval.", required=False, ) @click.option( "--force", "-f", is_flag=True, default=False, help="Always deploy stack even if templates are identical.", required=False, ) @click.option( "--output-dir", "-o", type=str, help="Directory where cloud assembly is synthesized.", required=False, ) def deploy( profile: str, require_approval: Optional[str] = None, force: Optional[bool] = None, output_dir: Optional[str] = None, ) -> None: """Deploy DDK stacks to AWS account.""" setup_boto_session(profile) cdk_deploy( profile=profile, require_approval=require_approval, force=force, output_dir=output_dir, )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 33160, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 11748, 3904, 198, 6738, 3253, 82, 62, 1860, 74, 13, 834, 38993, 834, 1330, 11593, 9641, 834, 198, 6738, 3253, 82, 62, 1860, 74, 13, 9503, 1746, 13, 18769, 26418, 1330, 6297, 26418, 62, 23317, 198, 6738, 3253, 82, 62, 1860, 74, 13, 9503, 1746, 13, 17953, 1330, 2251, 62, 8189, 62, 260, 1930, 37765, 198, 6738, 3253, 82, 62, 1860, 74, 13, 9503, 1746, 13, 2934, 1420, 1330, 22927, 74, 62, 2934, 1420, 198, 6738, 3253, 82, 62, 1860, 74, 13, 9503, 1746, 13, 15003, 1330, 2315, 62, 16302, 198, 6738, 3253, 82, 62, 1860, 74, 13, 26791, 1330, 651, 62, 26495, 62, 15763, 198, 6738, 275, 2069, 18, 1330, 23575, 11, 4808, 1136, 62, 12286, 62, 29891, 11, 9058, 62, 12286, 62, 29891, 198, 198, 30531, 62, 25294, 38, 2751, 62, 21389, 1404, 796, 12878, 4, 7, 292, 310, 524, 8, 82, 7131, 4, 7, 34345, 13219, 1485, 82, 25, 4, 7, 2815, 23397, 8, 18, 67, 60, 4064, 7, 20500, 8, 82, 1, 198, 30531, 62, 25294, 38, 2751, 62, 21389, 1404, 62, 40726, 23051, 796, 12878, 4, 7, 34345, 13219, 1485, 82, 25, 4, 7, 2815, 23397, 8, 18, 67, 60, 4064, 7, 20500, 8, 82, 1, 198, 7206, 38865, 62, 31190, 23680, 62, 51, 3620, 6489, 6158, 796, 366, 7890, 14, 16302, 62, 11498, 17041, 14, 1860, 74, 62, 1324, 30487, 198, 198, 62, 6404, 1362, 25, 18931, 13, 11187, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628, 198, 198, 31, 12976, 13, 8094, 3419, 198, 31, 12976, 13, 9641, 62, 18076, 7, 834, 9641, 834, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 24442, 14, 438, 3919, 12, 24442, 1600, 198, 220, 220, 220, 4277, 28, 25101, 11, 198, 220, 220, 220, 1037, 2625, 17278, 14257, 18931, 319, 14, 2364, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 8, 198, 4299, 537, 72, 7, 198, 220, 220, 220, 14257, 25, 20512, 11, 198, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 12298, 50, 20084, 42, 43749, 526, 15931, 198, 220, 220, 220, 3904, 13, 30328, 7, 69, 1, 12298, 50, 20084, 42, 43749, 1391, 834, 9641, 834, 92, 357, 37906, 1391, 17597, 13, 9641, 30072, 4943, 198, 220, 220, 220, 611, 14257, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7139, 62, 24442, 7, 18982, 28, 30531, 62, 25294, 38, 2751, 62, 21389, 1404, 8, 198, 220, 220, 220, 4808, 6404, 1362, 13, 24442, 7, 69, 1, 24442, 25, 1391, 24442, 92, 4943, 628, 198, 31, 44506, 13, 21812, 7, 3672, 2625, 15003, 4943, 198, 31, 12976, 13, 49140, 7, 198, 220, 220, 220, 366, 3672, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 2672, 28, 17821, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 38986, 1600, 198, 220, 220, 220, 27444, 68, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 464, 4686, 286, 262, 2858, 33283, 198, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 4277, 2625, 7959, 1600, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 28243, 1600, 198, 220, 220, 220, 27444, 83, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 32, 8619, 7268, 257, 1628, 11055, 8619, 11, 393, 257, 10289, 284, 257, 17606, 16099, 1600, 198, 8, 198, 4299, 2315, 7, 3672, 25, 965, 11, 2858, 25, 965, 11, 11055, 25, 32233, 58, 2536, 60, 796, 6045, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 262, 1957, 4645, 329, 257, 649, 30865, 20084, 42, 11361, 1628, 13, 628, 220, 220, 220, 36751, 318, 262, 1438, 286, 262, 1628, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 5765, 4277, 39606, 8968, 353, 1628, 11055, 198, 220, 220, 220, 611, 407, 11055, 25, 198, 220, 220, 220, 220, 220, 220, 220, 11055, 796, 28686, 13, 6978, 13, 22179, 7, 1136, 62, 26495, 62, 15763, 22784, 5550, 38865, 62, 31190, 23680, 62, 51, 3620, 6489, 6158, 8, 198, 220, 220, 220, 1441, 2315, 62, 16302, 7, 3672, 28, 3672, 11, 2858, 28, 38986, 11, 11055, 28, 28243, 8, 628, 198, 31, 44506, 13, 21812, 7, 3672, 2625, 18769, 26418, 4943, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 38986, 1600, 198, 220, 220, 220, 27444, 68, 1600, 198, 220, 220, 220, 2099, 28, 3041, 25636, 10100, 7, 260, 25636, 28, 81, 1, 61, 58, 32, 12, 57, 64, 12, 89, 15, 12, 24, 22955, 60, 90, 16, 11, 19, 92, 3, 12340, 198, 220, 220, 220, 1037, 2625, 464, 4686, 286, 262, 2858, 33283, 198, 220, 220, 220, 2672, 28, 17821, 11, 198, 220, 220, 220, 4277, 2625, 7959, 1600, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 13317, 1600, 198, 220, 220, 220, 27444, 79, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 4277, 2625, 12286, 1600, 198, 220, 220, 220, 1037, 2625, 11041, 257, 2176, 7034, 422, 534, 30865, 18031, 2393, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 36996, 1600, 198, 220, 220, 220, 27444, 81, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 1037, 2625, 12298, 50, 17718, 1438, 357, 68, 13, 70, 13, 514, 12, 23316, 12, 16, 737, 1002, 6045, 11, 340, 481, 307, 41240, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 25101, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 40290, 1600, 198, 220, 220, 220, 2099, 28, 3041, 25636, 10100, 7, 260, 25636, 28, 81, 1, 61, 58, 32, 12, 57, 64, 12, 89, 15, 12, 24, 22955, 60, 90, 16, 11, 20, 92, 3, 12340, 198, 220, 220, 220, 1037, 2625, 464, 21231, 284, 8271, 3891, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 220, 220, 220, 4277, 2625, 1860, 74, 1600, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 13255, 7483, 1600, 198, 220, 220, 220, 2099, 28, 3041, 25636, 10100, 7, 260, 25636, 28, 81, 1, 61, 58, 32, 12, 57, 64, 12, 89, 15, 12, 24, 22955, 60, 90, 16, 11, 940, 92, 3, 12340, 198, 220, 220, 220, 1037, 2625, 464, 6458, 42, 6297, 26418, 39265, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 2213, 8459, 12, 23317, 82, 1600, 198, 220, 220, 220, 27444, 64, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 8053, 286, 13467, 30865, 5504, 284, 1620, 40854, 357, 68, 13, 70, 13, 532, 64, 13374, 26259, 1157, 16243, 532, 64, 27795, 1828, 1828, 1828, 23148, 21387, 11, 198, 220, 220, 220, 3294, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 1789, 12, 79, 4160, 444, 1600, 198, 220, 220, 220, 27444, 72, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 15931, 8053, 286, 314, 2390, 5257, 2450, 5923, 47503, 326, 815, 307, 7223, 284, 262, 2597, 9489, 40854, 13, 198, 220, 220, 220, 357, 68, 13, 70, 13, 532, 72, 610, 77, 16, 532, 72, 610, 77, 17, 8, 15931, 1600, 198, 220, 220, 220, 3294, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 525, 8481, 12, 7784, 560, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 40, 2390, 5257, 21627, 18645, 2450, 5923, 45, 326, 815, 307, 7223, 284, 262, 2597, 9489, 40854, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 31499, 1600, 198, 220, 220, 220, 27444, 83, 1600, 198, 220, 220, 220, 2099, 16193, 2536, 11, 965, 828, 198, 220, 220, 220, 1037, 2625, 8053, 286, 15940, 284, 4174, 284, 262, 8931, 357, 68, 13, 70, 532, 83, 6446, 23656, 12844, 532, 83, 25161, 20084, 42, 21387, 11, 198, 220, 220, 220, 3294, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 4299, 6297, 26418, 7, 198, 220, 220, 220, 2858, 25, 965, 11, 198, 220, 220, 220, 7034, 25, 965, 11, 198, 220, 220, 220, 3814, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 21231, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 39265, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 13467, 62, 23317, 82, 25, 32233, 58, 51, 29291, 58, 2536, 11907, 796, 6045, 11, 198, 220, 220, 220, 1312, 321, 62, 79, 4160, 444, 25, 32233, 58, 51, 29291, 58, 2536, 11907, 796, 6045, 11, 198, 220, 220, 220, 21627, 62, 7784, 560, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 15940, 25, 32233, 58, 51, 29291, 58, 51, 29291, 58, 2536, 11, 965, 11907, 60, 796, 6045, 11, 198, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 36476, 26418, 262, 30865, 1848, 351, 20084, 42, 4133, 526, 15931, 198, 220, 220, 220, 9058, 62, 65, 2069, 62, 29891, 7, 13317, 11, 3814, 8, 198, 220, 220, 220, 6297, 26418, 62, 23317, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2858, 28, 38986, 11, 198, 220, 220, 220, 220, 220, 220, 220, 21231, 28, 40290, 11, 198, 220, 220, 220, 220, 220, 220, 220, 39265, 28, 13255, 7483, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13467, 62, 23317, 82, 28, 2213, 8459, 62, 23317, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 321, 62, 79, 4160, 444, 28, 1789, 62, 79, 4160, 444, 11, 198, 220, 220, 220, 220, 220, 220, 220, 21627, 62, 7784, 560, 28, 525, 8481, 62, 7784, 560, 11, 198, 220, 220, 220, 220, 220, 220, 220, 15940, 28, 31499, 11, 198, 220, 220, 220, 1267, 628, 198, 31, 44506, 13, 21812, 7, 3672, 2625, 17953, 12, 260, 1930, 37765, 4943, 198, 31, 12976, 13, 49140, 7, 198, 220, 220, 220, 366, 3672, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 2672, 28, 17821, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 13317, 1600, 198, 220, 220, 220, 27444, 79, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 4277, 2625, 12286, 1600, 198, 220, 220, 220, 1037, 2625, 11041, 257, 2176, 7034, 422, 534, 30865, 18031, 2393, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 36996, 1600, 198, 220, 220, 220, 27444, 81, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 4277, 28, 14202, 11, 198, 220, 220, 220, 1037, 2625, 12298, 50, 17718, 1438, 357, 68, 13, 70, 13, 514, 12, 23316, 12, 16, 737, 1002, 6045, 11, 340, 481, 307, 41240, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 25101, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 11213, 1600, 198, 220, 220, 220, 27444, 67, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 464, 6764, 286, 262, 16099, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 31499, 1600, 198, 220, 220, 220, 27444, 83, 1600, 198, 220, 220, 220, 2099, 16193, 2536, 11, 965, 828, 198, 220, 220, 220, 1037, 2625, 8053, 286, 15940, 284, 4174, 284, 262, 16099, 357, 68, 13, 70, 532, 83, 6446, 23656, 12844, 532, 83, 25161, 20084, 42, 21387, 11, 198, 220, 220, 220, 3294, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 4299, 2251, 62, 260, 1930, 37765, 7, 198, 220, 220, 220, 1438, 25, 965, 11, 198, 220, 220, 220, 7034, 25, 965, 11, 198, 220, 220, 220, 3814, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 6764, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 15940, 25, 32233, 58, 51, 29291, 58, 51, 29291, 58, 2536, 11, 965, 11907, 60, 796, 6045, 11, 198, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 257, 2438, 16099, 422, 262, 2723, 1080, 10131, 13, 628, 220, 220, 220, 36751, 318, 262, 1438, 286, 262, 16099, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9058, 62, 65, 2069, 62, 29891, 7, 13317, 11, 3814, 8, 198, 220, 220, 220, 2251, 62, 8189, 62, 260, 1930, 37765, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 28, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6764, 28, 11213, 11, 198, 220, 220, 220, 220, 220, 220, 220, 15940, 28, 31499, 11, 198, 220, 220, 220, 1267, 628, 198, 31, 44506, 13, 21812, 7, 3672, 2625, 2934, 1420, 4943, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 13317, 1600, 198, 220, 220, 220, 27444, 79, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 4277, 2625, 12286, 1600, 198, 220, 220, 220, 1037, 2625, 11041, 257, 2176, 7034, 422, 534, 30865, 18031, 2393, 33283, 198, 220, 220, 220, 905, 62, 12286, 28, 17821, 11, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 46115, 12, 21064, 2100, 1600, 198, 220, 220, 220, 2099, 28, 12976, 13, 46770, 7, 14692, 12081, 1600, 366, 1092, 12, 3803, 1600, 366, 36654, 3101, 33116, 1339, 62, 30176, 28, 25101, 828, 198, 220, 220, 220, 4277, 2625, 12081, 1600, 198, 220, 220, 220, 1037, 2625, 2061, 2324, 12, 30176, 2458, 761, 10107, 7546, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 3174, 1600, 198, 220, 220, 220, 27444, 69, 1600, 198, 220, 220, 220, 318, 62, 32109, 28, 17821, 11, 198, 220, 220, 220, 4277, 28, 25101, 11, 198, 220, 220, 220, 1037, 2625, 30374, 6061, 8931, 772, 611, 24019, 389, 10411, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 31, 12976, 13, 18076, 7, 198, 220, 220, 220, 366, 438, 22915, 12, 15908, 1600, 198, 220, 220, 220, 27444, 78, 1600, 198, 220, 220, 220, 2099, 28, 2536, 11, 198, 220, 220, 220, 1037, 2625, 43055, 810, 6279, 10474, 318, 24983, 1143, 33283, 198, 220, 220, 220, 2672, 28, 25101, 11, 198, 8, 198, 4299, 6061, 7, 198, 220, 220, 220, 7034, 25, 965, 11, 198, 220, 220, 220, 2421, 62, 21064, 2100, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 220, 220, 220, 2700, 25, 32233, 58, 30388, 60, 796, 6045, 11, 198, 220, 220, 220, 5072, 62, 15908, 25, 32233, 58, 2536, 60, 796, 6045, 11, 198, 8, 4613, 6045, 25, 198, 220, 220, 220, 37227, 49322, 20084, 42, 24285, 284, 30865, 1848, 526, 15931, 198, 220, 220, 220, 9058, 62, 65, 2069, 62, 29891, 7, 13317, 8, 198, 220, 220, 220, 22927, 74, 62, 2934, 1420, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7034, 28, 13317, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2421, 62, 21064, 2100, 28, 46115, 62, 21064, 2100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2700, 28, 3174, 11, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 15908, 28, 22915, 62, 15908, 11, 198, 220, 220, 220, 1267, 628 ]
2.578066
2,927