content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from typing import Any, Dict, Optional from django import forms from django.contrib import admin from django.core.exceptions import ValidationError from django.db.models.functions import Lower from django.utils.safestring import mark_safe from django.utils.timezone import now from allianceauth.eveonline.models import EveAllianceInfo, EveCorporationInfo from . import tasks from .models import ( DiscordWebhook, NotificationRule, ScheduledNotification, StagingSystem, Timer, ) @admin.register(DiscordWebhook) @admin.register(NotificationRule) @admin.register(ScheduledNotification) # @admin.register(Timer) # class TimerAdmin(admin.ModelAdmin): # list_select_related = ("eve_solar_system", "structure_type", "user") # list_filter = ( # "timer_type", # ("eve_solar_system", admin.RelatedOnlyFieldListFilter), # ("structure_type", admin.RelatedOnlyFieldListFilter), # "objective", # "owner_name", # ("user", admin.RelatedOnlyFieldListFilter), # "is_opsec", # ) # ordering = ("-date",) # autocomplete_fields = ["eve_solar_system", "structure_type"] # """ # def _scheduled_notifications(self, obj): # return sorted( # [ # x["notification_date"].strftime(DATETIME_FORMAT) # for x in ScheduledNotification.objects.filter( # timer=obj, notification_date__gt=now() # ).values("notification_date", "notification_rule_id") # ] # ) # """ # actions = ["send_test_notification"] # def send_test_notification(self, request, queryset): # for timer in queryset: # for webhook in DiscordWebhook.objects.filter(is_enabled=True): # timer.send_notification( # webhook=webhook, # content=f"Test notification sent by **{request.user}**", # ) # self.message_user( # request, f"Initiated sending test notification for timer: {timer}" # ) # for webhook in DiscordWebhook.objects.filter(is_enabled=True): # tasks.send_messages_for_webhook.delay(webhook.pk) # send_test_notification.short_description = ( # "Send test notification for selected timers to all enabled webhooks" # ) @admin.register(StagingSystem)
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12543, 2733, 1330, 16048, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 783, 198, 198, 6738, 12801, 18439, 13, 44655, 25119, 13, 27530, 1330, 12882, 3237, 3610, 12360, 11, 12882, 10606, 1819, 341, 12360, 198, 198, 6738, 764, 1330, 8861, 198, 6738, 764, 27530, 1330, 357, 198, 220, 220, 220, 39462, 13908, 25480, 11, 198, 220, 220, 220, 42808, 31929, 11, 198, 220, 220, 220, 27774, 6309, 3673, 2649, 11, 198, 220, 220, 220, 520, 3039, 11964, 11, 198, 220, 220, 220, 5045, 263, 11, 198, 8, 628, 198, 31, 28482, 13, 30238, 7, 15642, 585, 13908, 25480, 8, 628, 628, 198, 31, 28482, 13, 30238, 7, 3673, 2649, 31929, 8, 628, 198, 31, 28482, 13, 30238, 7, 50, 1740, 6309, 3673, 2649, 8, 628, 198, 2, 2488, 28482, 13, 30238, 7, 48801, 8, 198, 2, 1398, 5045, 263, 46787, 7, 28482, 13, 17633, 46787, 2599, 198, 2, 220, 220, 220, 220, 1351, 62, 19738, 62, 5363, 796, 5855, 44655, 62, 82, 6192, 62, 10057, 1600, 366, 301, 5620, 62, 4906, 1600, 366, 7220, 4943, 198, 2, 220, 220, 220, 220, 1351, 62, 24455, 796, 357, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 45016, 62, 4906, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 44655, 62, 82, 6192, 62, 10057, 1600, 13169, 13, 9819, 10049, 15878, 8053, 22417, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 301, 5620, 62, 4906, 1600, 13169, 13, 9819, 10049, 15878, 8053, 22417, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15252, 425, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18403, 62, 3672, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 7220, 1600, 13169, 13, 9819, 10049, 15878, 8053, 22417, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 271, 62, 404, 2363, 1600, 198, 2, 220, 220, 220, 220, 1267, 198, 2, 220, 220, 220, 220, 16216, 796, 5855, 12, 4475, 1600, 8, 198, 2, 220, 220, 220, 220, 1960, 42829, 6677, 62, 25747, 796, 14631, 44655, 62, 82, 6192, 62, 10057, 1600, 366, 301, 5620, 62, 4906, 8973, 198, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 825, 4808, 1416, 704, 6309, 62, 1662, 6637, 7, 944, 11, 26181, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 23243, 7, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 14692, 1662, 2649, 62, 4475, 1, 4083, 2536, 31387, 7, 35, 1404, 2767, 12789, 62, 21389, 1404, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 27774, 6309, 3673, 2649, 13, 48205, 13, 24455, 7, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19781, 28, 26801, 11, 14483, 62, 4475, 834, 13655, 28, 2197, 3419, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6739, 27160, 7203, 1662, 2649, 62, 4475, 1600, 366, 1662, 2649, 62, 25135, 62, 312, 4943, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 4028, 796, 14631, 21280, 62, 9288, 62, 1662, 2649, 8973, 198, 198, 2, 220, 220, 220, 220, 825, 3758, 62, 9288, 62, 1662, 2649, 7, 944, 11, 2581, 11, 42517, 893, 316, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 329, 19781, 287, 42517, 893, 316, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 3992, 25480, 287, 39462, 13908, 25480, 13, 48205, 13, 24455, 7, 271, 62, 25616, 28, 17821, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19781, 13, 21280, 62, 1662, 2649, 7, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3992, 25480, 28, 12384, 25480, 11, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2695, 28, 69, 1, 14402, 14483, 1908, 416, 12429, 90, 25927, 13, 7220, 92, 1174, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 20500, 62, 7220, 7, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2581, 11, 277, 1, 818, 8846, 515, 7216, 1332, 14483, 329, 19781, 25, 1391, 45016, 36786, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 329, 3992, 25480, 287, 39462, 13908, 25480, 13, 48205, 13, 24455, 7, 271, 62, 25616, 28, 17821, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8861, 13, 21280, 62, 37348, 1095, 62, 1640, 62, 12384, 25480, 13, 40850, 7, 12384, 25480, 13, 79, 74, 8, 198, 198, 2, 220, 220, 220, 220, 3758, 62, 9288, 62, 1662, 2649, 13, 19509, 62, 11213, 796, 357, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 25206, 1332, 14483, 329, 6163, 48085, 284, 477, 9343, 3992, 25480, 82, 1, 198, 2, 220, 220, 220, 220, 1267, 628, 198, 31, 28482, 13, 30238, 7, 1273, 3039, 11964, 8, 198 ]
2.300384
1,042
from datetime import datetime, timezone from bson import ObjectId from pydantic import BaseModel, Field from app.models.types import PyObjectId
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 198, 198, 6738, 275, 1559, 1330, 9515, 7390, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 198, 198, 6738, 598, 13, 27530, 13, 19199, 1330, 9485, 10267, 7390, 628, 628 ]
3.634146
41
from logparser.ADC.ADC_Fast import log_split, log_similarity # '<$>()<-1> : getImeiV2 memory:868404020067521' tem = ['<$>', '(', '', ')', '<-1>', ' ', '', ':', '', ' ', '<$>', '<$>', '<$>', '<$>', '<$>'] log = ['<$>', '(', '', ')', '<-1>', ' ', '', ':', '', ' ', 'getImeiV2', ' ', 'memory', ':', '868404020067521'] a = log_similarity(tem, log, 5) print(a)
[ 6738, 2604, 48610, 13, 2885, 34, 13, 2885, 34, 62, 22968, 1330, 2604, 62, 35312, 11, 2604, 62, 38610, 414, 198, 198, 2, 705, 27, 3, 29, 3419, 27, 12, 16, 29, 1058, 651, 40, 1326, 72, 53, 17, 4088, 25, 23, 3104, 1821, 1821, 13330, 2425, 2481, 6, 198, 11498, 796, 37250, 27, 3, 29, 3256, 29513, 3256, 705, 3256, 705, 8, 3256, 705, 27, 12, 16, 29, 3256, 705, 46083, 705, 3256, 705, 25, 3256, 705, 3256, 705, 46083, 705, 27, 3, 29, 3256, 705, 27, 3, 29, 3256, 705, 27, 3, 29, 3256, 705, 27, 3, 29, 3256, 705, 27, 3, 29, 20520, 198, 6404, 796, 37250, 27, 3, 29, 3256, 29513, 3256, 705, 3256, 705, 8, 3256, 705, 27, 12, 16, 29, 3256, 705, 46083, 705, 3256, 705, 25, 3256, 705, 3256, 705, 46083, 705, 1136, 40, 1326, 72, 53, 17, 3256, 705, 46083, 705, 31673, 3256, 705, 25, 3256, 705, 23, 3104, 1821, 1821, 13330, 2425, 2481, 20520, 198, 64, 796, 2604, 62, 38610, 414, 7, 11498, 11, 2604, 11, 642, 8, 198, 4798, 7, 64, 8, 198 ]
1.95082
183
from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer chatbot = ChatBot('Ron Obvious') # Create a new trainer for the chatbot trainer = ChatterBotCorpusTrainer(chatbot) # Train the chatbot based on the english corpus trainer.train("chatterbot.corpus.english") # Get a response to an input statement chatbot.get_response("Hello, how are you today?")
[ 6738, 37303, 13645, 1330, 24101, 20630, 198, 6738, 37303, 13645, 13, 27432, 364, 1330, 609, 1436, 20630, 45680, 385, 2898, 10613, 198, 198, 17006, 13645, 796, 24101, 20630, 10786, 23672, 1835, 1442, 11537, 198, 198, 2, 13610, 257, 649, 21997, 329, 262, 8537, 13645, 198, 2213, 10613, 796, 609, 1436, 20630, 45680, 385, 2898, 10613, 7, 17006, 13645, 8, 198, 198, 2, 16835, 262, 8537, 13645, 1912, 319, 262, 46932, 35789, 198, 2213, 10613, 13, 27432, 7203, 354, 1436, 13645, 13, 10215, 79, 385, 13, 39126, 4943, 198, 198, 2, 3497, 257, 2882, 284, 281, 5128, 2643, 198, 17006, 13645, 13, 1136, 62, 26209, 7203, 15496, 11, 703, 389, 345, 1909, 1701, 8, 198 ]
3.385965
114
from drlgeb.ac import A3C if __name__ == '__main__': env_id = "SpaceInvaders-v0" agent = A3C(env_id=env_id) # train agent.learn() # test model_path = "..." agent.play(episodes=5, model_path=model_path)
[ 6738, 1553, 75, 469, 65, 13, 330, 1330, 317, 18, 34, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 198, 220, 220, 220, 17365, 62, 312, 796, 366, 14106, 19904, 9972, 12, 85, 15, 1, 198, 220, 220, 220, 5797, 796, 317, 18, 34, 7, 24330, 62, 312, 28, 24330, 62, 312, 8, 628, 220, 220, 220, 1303, 4512, 198, 220, 220, 220, 5797, 13, 35720, 3419, 628, 220, 220, 220, 1303, 1332, 198, 220, 220, 220, 2746, 62, 6978, 796, 366, 9313, 198, 220, 220, 220, 5797, 13, 1759, 7, 538, 8052, 28, 20, 11, 2746, 62, 6978, 28, 19849, 62, 6978, 8, 198 ]
2.145455
110
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 5366, 13, 26791, 1330, 4818, 8079, 62, 26791, 355, 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, 198 ]
3.113208
53
custom_params = {} custom_params['model_dir'] = 'nn_models/all_feat_1l/model_data/' custom_params['out_dir'] = 'output/all_feat_1l/' custom_params['feat_mask'] = [1.0, 1.0, 1.0, 1.0, 1.0] custom_params['n_conv_layers'] = 1
[ 23144, 62, 37266, 796, 23884, 198, 23144, 62, 37266, 17816, 19849, 62, 15908, 20520, 796, 705, 20471, 62, 27530, 14, 439, 62, 27594, 62, 16, 75, 14, 19849, 62, 7890, 14, 6, 198, 23144, 62, 37266, 17816, 448, 62, 15908, 20520, 796, 705, 22915, 14, 439, 62, 27594, 62, 16, 75, 14, 6, 198, 23144, 62, 37266, 17816, 27594, 62, 27932, 20520, 796, 685, 16, 13, 15, 11, 352, 13, 15, 11, 352, 13, 15, 11, 352, 13, 15, 11, 352, 13, 15, 60, 198, 23144, 62, 37266, 17816, 77, 62, 42946, 62, 75, 6962, 20520, 796, 352, 198 ]
2.252525
99
# Copyright 2016-2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # 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. # # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Sketch of Spanish grapheme-to-phoneme conversion. The dialect transcribed is roughly standard Mexican Spanish. """ import pynini from pynini.lib import pynutil from pynini.lib import rewrite # Inventories. _g = pynini.union("a", "á", "b", "c", "d", "e", "é", "f", "g", "h", "i", "í", "j", "k", "l", "m", "n", "ñ", "o", "ó", "p", "q", "r", "s", "t", "u", "ú", "ü", "v", "w", "x", "y", "z") _p = pynini.union("a", "b", "d", "e", "f", "g", "i", "j", "k", "l", "ʝ", "m", "n", "ɲ", "o", "p", "r", "ɾ", "s", "ʃ", "t", "u", "w", "x", "z") _sigma_star = pynini.union(_g, _p).closure().optimize() # Rules. _r1 = pynini.cdrewrite( pynini.string_map([ ("ch", "tʃ"), ("ll", "ʝ"), ("qu", "k"), ("j", "x"), ("ñ", "ɲ"), ("v", "b"), ("x", "s"), ("y", "j"), ("á", "a"), ("é", "e"), ("í", "i"), ("ó", "o"), ("ú", "u"), ("ü", "w"), ]), "", "", _sigma_star, ).optimize() _r2 = pynini.cdrewrite(pynutil.delete("h"), "", "", _sigma_star).optimize() _v = pynini.union("a", "e", "i", "o", "u") _r3 = pynini.cdrewrite(pynini.cross("r", "ɾ"), _v, _v, _sigma_star).optimize() _r4 = pynini.cdrewrite(pynini.cross("rr", "r"), "", "", _sigma_star).optimize() _r5 = pynini.cdrewrite( pynini.string_map([("c", "s"), ("g", "x")]), "", pynini.union("i", "e"), _sigma_star).optimize() _r6 = pynini.cdrewrite(pynini.cross("c", "k"), "", "", _sigma_star).optimize() _rules = _r1 @ _r2 @ _r3 @ _r4 @ _r5 @ _r6 _g2p = pynini.closure(_g) @ _rules @ pynini.closure(_p) _g2p.optimize() # Functions.
[ 2, 15069, 1584, 12, 42334, 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, 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, 2, 198, 198, 2, 1114, 2276, 1321, 319, 262, 350, 2047, 5362, 23491, 23340, 5888, 11, 766, 198, 2, 279, 2047, 5362, 13, 404, 1516, 26224, 13, 2398, 13, 198, 37811, 50, 7126, 354, 286, 7897, 23360, 258, 1326, 12, 1462, 12, 746, 261, 34755, 11315, 13, 198, 198, 464, 23637, 23589, 8725, 318, 7323, 3210, 10816, 7897, 13, 198, 37811, 198, 198, 11748, 279, 2047, 5362, 198, 6738, 279, 2047, 5362, 13, 8019, 1330, 279, 2047, 22602, 198, 6738, 279, 2047, 5362, 13, 8019, 1330, 28183, 198, 198, 2, 554, 1151, 1749, 13, 198, 62, 70, 796, 279, 2047, 5362, 13, 24592, 7203, 64, 1600, 366, 6557, 1600, 366, 65, 1600, 366, 66, 1600, 366, 67, 1600, 366, 68, 1600, 366, 2634, 1600, 366, 69, 1600, 366, 70, 1600, 366, 71, 1600, 366, 72, 1600, 366, 8836, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 73, 1600, 366, 74, 1600, 366, 75, 1600, 366, 76, 1600, 366, 77, 1600, 366, 12654, 1600, 366, 78, 1600, 366, 10205, 1600, 366, 79, 1600, 366, 80, 1600, 366, 81, 1600, 366, 82, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 83, 1600, 366, 84, 1600, 366, 21356, 1600, 366, 9116, 1600, 366, 85, 1600, 366, 86, 1600, 366, 87, 1600, 366, 88, 1600, 366, 89, 4943, 198, 62, 79, 796, 279, 2047, 5362, 13, 24592, 7203, 64, 1600, 366, 65, 1600, 366, 67, 1600, 366, 68, 1600, 366, 69, 1600, 366, 70, 1600, 366, 72, 1600, 366, 73, 1600, 366, 74, 1600, 366, 75, 1600, 366, 134, 251, 1600, 366, 76, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 77, 1600, 366, 133, 110, 1600, 366, 78, 1600, 366, 79, 1600, 366, 81, 1600, 366, 133, 122, 1600, 366, 82, 1600, 366, 134, 225, 1600, 366, 83, 1600, 366, 84, 1600, 366, 86, 1600, 366, 87, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 89, 4943, 198, 62, 82, 13495, 62, 7364, 796, 279, 2047, 5362, 13, 24592, 28264, 70, 11, 4808, 79, 737, 17966, 22446, 40085, 1096, 3419, 198, 198, 2, 14252, 13, 198, 62, 81, 16, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 198, 220, 220, 220, 279, 2047, 5362, 13, 8841, 62, 8899, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 354, 1600, 366, 83, 134, 225, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 297, 1600, 366, 134, 251, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 421, 1600, 366, 74, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 73, 1600, 366, 87, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 12654, 1600, 366, 133, 110, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 85, 1600, 366, 65, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 87, 1600, 366, 82, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 88, 1600, 366, 73, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 6557, 1600, 366, 64, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 2634, 1600, 366, 68, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 8836, 1600, 366, 72, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 10205, 1600, 366, 78, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 21356, 1600, 366, 84, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 5855, 9116, 1600, 366, 86, 12340, 198, 220, 220, 220, 2361, 828, 198, 220, 220, 220, 366, 1600, 198, 220, 220, 220, 366, 1600, 198, 220, 220, 220, 4808, 82, 13495, 62, 7364, 11, 198, 737, 40085, 1096, 3419, 198, 62, 81, 17, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 79, 2047, 22602, 13, 33678, 7203, 71, 12340, 366, 1600, 366, 1600, 4808, 82, 13495, 62, 7364, 737, 40085, 1096, 3419, 198, 62, 85, 796, 279, 2047, 5362, 13, 24592, 7203, 64, 1600, 366, 68, 1600, 366, 72, 1600, 366, 78, 1600, 366, 84, 4943, 198, 62, 81, 18, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 79, 2047, 5362, 13, 19692, 7203, 81, 1600, 366, 133, 122, 12340, 4808, 85, 11, 4808, 85, 11, 4808, 82, 13495, 62, 7364, 737, 40085, 1096, 3419, 198, 62, 81, 19, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 79, 2047, 5362, 13, 19692, 7203, 21062, 1600, 366, 81, 12340, 366, 1600, 366, 1600, 4808, 82, 13495, 62, 7364, 737, 40085, 1096, 3419, 198, 62, 81, 20, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 198, 220, 220, 220, 279, 2047, 5362, 13, 8841, 62, 8899, 26933, 7203, 66, 1600, 366, 82, 12340, 5855, 70, 1600, 366, 87, 4943, 46570, 366, 1600, 279, 2047, 5362, 13, 24592, 7203, 72, 1600, 366, 68, 12340, 198, 220, 220, 220, 4808, 82, 13495, 62, 7364, 737, 40085, 1096, 3419, 198, 62, 81, 21, 796, 279, 2047, 5362, 13, 10210, 1809, 6525, 7, 79, 2047, 5362, 13, 19692, 7203, 66, 1600, 366, 74, 12340, 366, 1600, 366, 1600, 4808, 82, 13495, 62, 7364, 737, 40085, 1096, 3419, 198, 62, 38785, 796, 4808, 81, 16, 2488, 4808, 81, 17, 2488, 4808, 81, 18, 2488, 4808, 81, 19, 2488, 4808, 81, 20, 2488, 4808, 81, 21, 198, 62, 70, 17, 79, 796, 279, 2047, 5362, 13, 17966, 28264, 70, 8, 2488, 4808, 38785, 2488, 279, 2047, 5362, 13, 17966, 28264, 79, 8, 198, 62, 70, 17, 79, 13, 40085, 1096, 3419, 198, 198, 2, 40480, 13, 628, 198 ]
2.135993
1,103
""" SKLearn linear model to SKAST. """ from skompiler.dsl import const def linear_model(coef, intercept, inputs): """ Linear regression. Depending on the shape of the coef and intercept, produces either a single-valued linear model (w @ x + b) or a multi-valued one (M @ x + b_vec) Args: coef (np.array): A vector (1D array, for single-valued model) or a matrix (2D array, for multi-valued one) for the model. intercept: a number (for single-valued) or a 1D array (for multi-valued regression). inputs: a list of AST nodes to be used as the input vector to the model or a single node, corresponding to a vector. """ single_valued = (coef.ndim == 1) if single_valued and hasattr(intercept, '__iter__'): raise ValueError("Single-valued linear model must have a single value for the intercept") elif not single_valued and (coef.ndim != 2 or intercept.ndim != 1): raise ValueError("Multi-valued linear model must have a 2D coefficient matrix and a 1D intercept vector") return const(coef) @ inputs + const(intercept)
[ 37811, 198, 18831, 20238, 14174, 2746, 284, 14277, 11262, 13, 198, 37811, 198, 6738, 1341, 3361, 5329, 13, 67, 6649, 1330, 1500, 198, 198, 4299, 14174, 62, 19849, 7, 1073, 891, 11, 15788, 11, 17311, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 44800, 20683, 13, 198, 220, 220, 220, 23591, 319, 262, 5485, 286, 262, 763, 891, 290, 15788, 11, 11073, 2035, 257, 2060, 12, 39728, 198, 220, 220, 220, 14174, 2746, 357, 86, 2488, 2124, 1343, 275, 8, 393, 257, 5021, 12, 39728, 530, 357, 44, 2488, 2124, 1343, 275, 62, 35138, 8, 628, 220, 220, 220, 943, 14542, 25, 628, 220, 220, 220, 220, 220, 220, 220, 763, 891, 357, 37659, 13, 18747, 2599, 317, 15879, 357, 16, 35, 7177, 11, 329, 2060, 12, 39728, 2746, 8, 393, 257, 17593, 357, 17, 35, 7177, 11, 329, 5021, 12, 39728, 530, 8, 329, 262, 2746, 13, 198, 220, 220, 220, 220, 220, 220, 220, 15788, 25, 220, 257, 1271, 357, 1640, 2060, 12, 39728, 8, 393, 257, 352, 35, 7177, 357, 1640, 5021, 12, 39728, 20683, 737, 198, 220, 220, 220, 220, 220, 220, 220, 17311, 25, 220, 257, 1351, 286, 29273, 13760, 284, 307, 973, 355, 262, 5128, 15879, 284, 262, 2746, 393, 257, 2060, 10139, 11, 11188, 284, 257, 15879, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2060, 62, 39728, 796, 357, 1073, 891, 13, 358, 320, 6624, 352, 8, 198, 220, 220, 220, 611, 2060, 62, 39728, 290, 468, 35226, 7, 3849, 984, 11, 705, 834, 2676, 834, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7203, 28008, 12, 39728, 14174, 2746, 1276, 423, 257, 2060, 1988, 329, 262, 15788, 4943, 198, 220, 220, 220, 1288, 361, 407, 2060, 62, 39728, 290, 357, 1073, 891, 13, 358, 320, 14512, 362, 393, 15788, 13, 358, 320, 14512, 352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7203, 29800, 12, 39728, 14174, 2746, 1276, 423, 257, 362, 35, 35381, 17593, 290, 257, 352, 35, 15788, 15879, 4943, 628, 220, 220, 220, 1441, 1500, 7, 1073, 891, 8, 2488, 17311, 1343, 1500, 7, 3849, 984, 8, 198 ]
3.030303
363
default_app_config = 'roomsensor.apps.RoomsensorConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 9649, 22854, 13, 18211, 13, 15450, 3150, 22854, 16934, 6 ]
3.235294
17
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 14 21:10:20 2018 @author: haoqi """ import os import torch import torch.nn as nn class Classification_Base_1D_NN_fixed_seq_len_1s_majvote_v2(nn.Module): ''' '''
[ 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, 3300, 5267, 1478, 2310, 25, 940, 25, 1238, 2864, 198, 198, 31, 9800, 25, 387, 78, 40603, 198, 37811, 198, 11748, 28686, 198, 11748, 28034, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198, 4871, 40984, 62, 14881, 62, 16, 35, 62, 6144, 62, 34021, 62, 41068, 62, 11925, 62, 16, 82, 62, 76, 1228, 27257, 62, 85, 17, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 705, 7061, 198 ]
2.271028
107
#! /usr/bin/env python """API Wrapper for Bitcoin.de Trading API.""" import requests import time import json import hmac import hashlib import logging import codecs import decimal import inspect import urllib from urllib.parse import urlencode logging.basicConfig() log = logging.getLogger(__name__) requests_log = logging.getLogger("requests.packages.urllib3") requests_log.propagate = True __version__ = '4.0' class ParameterBuilder(object): '''To verify given parameters for API.''' TRADING_PAIRS = ['btceur', 'bcheur', 'etheur', 'btgeur', 'bsveur', 'ltceur', 'iotabtc', 'dashbtc', 'gntbtc', 'ltcbtc'] ORDER_TYPES = ['buy', 'sell'] CURRENCIES = ['btc', 'bch', 'eth', 'btg', 'bsv', 'ltc', 'iota', 'dash', 'gnt'] BANK_SEATS = ['AT', 'BE', 'BG', 'CH', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IS', 'IT', 'LI', 'LT', 'LU', 'LV', 'MT', 'MQ', 'NL', 'NO', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK'] TRUST_LEVELS = ['bronze', 'silver', 'gold', 'platin'] TRADE_STATES = [-1, 0, 1] ORDER_STATES = [-2, -1, 0] PAYMENT_OPTIONS = [1, 2, 3] TRADE_TYPES = ['all', 'buy', 'sell', 'inpayment', 'payout', 'affiliate', 'welcome_btc', 'buy_yubikey', 'buy_goldshop', 'buy_diamondshop', 'kickback', 'outgoing_fee_voluntary'] def HandleRequestsException(e): """Handle Exception from request.""" log.warning(e) def HandleAPIErrors(r): """To handle Errors from BTCDE API.""" valid_status_codes = [200, 201, 204] if r.status_code not in valid_status_codes: content = r.json() errors = content.get('errors') log.warning('API Error Code: {}'.format(str(errors[0]['code']))) log.warning('API Error Message: {}'.format(errors[0]['message'])) log.warning('API Error URL: {}'.format(r.url)) return False else: return True class Connection(object): """To provide connection credentials to the trading API""" def APIConnect(self, method, params): """Transform Parameters to URL""" header = self.set_header(params.url, method, params.encoded_string) log.debug('Set Header: {}'.format(header)) try: r = self.send_request(params.url, method, header, params.encoded_string) # Handle API Errors if HandleAPIErrors(r): # get results result = r.json(parse_float=decimal.Decimal) else: result = {} except requests.exceptions.RequestException as e: HandleRequestsException(e) result = {} return result def addToAddressPool(self, currency, address, **args): """Add address to pool""" uri = f'{self.apibase}{currency}/address' params = {'address': address} params.update(args) avail_params = ['address', 'amount_usages', 'comment'] p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('POST', p) def removeFromAddressPool(self, currency, address): """Remove address from pool""" uri = f'{self.apibase}{currency}/address/{address}' params = {'currency': currency, 'address': address} avail_params = ['currency', 'address'] p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('DELETE', p) def listAddressPool(self, currency, **args): """List address pool""" uri = f'{self.apibase}{currency}/address' params = args avail_params = ['usable', 'comment', 'page'] p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('GET', p) def showOrderbook(self, order_type, trading_pair, **args): """Search Orderbook for offers.""" uri = f'{self.apibase}{trading_pair}/orderbook' params = {'type': order_type} params.update(args) avail_params = ['type', 'trading_pair', 'amount_currency_to_trade', 'price', 'order_requirements_fullfilled', 'only_kyc_full', 'only_express_orders', 'payment_option', 'sepa_option', 'only_same_bankgroup', 'only_same_bic', 'seat_of_bank', 'page_size'] p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('GET', p) def showOrderDetails(self, trading_pair, order_id): """Show details for an offer.""" uri = f'{self.apibase}{trading_pair}/orders/public/details/{order_id}' params = {'trading_pair': trading_pair, 'order_id': order_id} avail_params = ['trading_pair', 'order_id'] p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('GET', p) def createOrder(self, order_type, trading_pair, max_amount_currency_to_trade, price, **args): """Create a new Order.""" uri = f'{self.apibase}{trading_pair}/orders' # Build parameters params = {'type': order_type, 'max_amount_currency_to_trade': max_amount_currency_to_trade, 'price': price} params.update(args) avail_params = ['type', 'max_amount_currency_to_trade', 'price', 'min_amount_currency_to_trade', 'end_datetime', 'new_order_for_remaining_amount', 'trading_pair', 'min_trust_level', 'only_kyc_full', 'payment_option', 'sepa_option', 'seat_of_bank'] p = ParameterBuilder(avail_params, params, uri) p.verify_keys_and_values(avail_params, {'trading_pair': trading_pair}) return self.APIConnect('POST', p) def deleteOrder(self, order_id, trading_pair): """Delete an Order.""" # Build parameters uri = f'{self.apibase}{trading_pair}/orders/{order_id}' avail_params = ['order_id', 'trading_pair'] params = { 'order_id': order_id, 'trading_pair': trading_pair} p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('DELETE', p) def showMyOrders(self, **args): """Query and Filter own Orders.""" # Build parameters params = args avail_params = ['type', 'trading_pair', 'state', 'date_start', 'date_end', 'page'] if params.get("trading_pair"): uri = f'{self.apibase}{params["trading_pair"]}/orders' del params["trading_pair"] else: uri = f'{self.apibase}orders' p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('GET', p) def showMyOrderDetails(self, trading_pair, order_id): """Details to an own Order.""" uri = f'{self.apibase}{trading_pair}/orders/{order_id}' p = ParameterBuilder({}, {}, uri) return self.APIConnect('GET', p) def executeTrade(self, trading_pair, order_id, order_type, amount): """Buy/Sell on a specific Order.""" uri = f'{self.apibase}{trading_pair}/trades/{order_id}' params = { 'type': order_type, 'amount_currency_to_trade': amount} avail_params = ['type', 'amount_currency_to_trade'] p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('POST', p) def showMyTrades(self, **args): """Query and Filter on past Trades.""" # Build parameters params = args avail_params = ['type', 'trading_pair', 'state', 'only_trades_with_action_for_payment_or_transfer_required', 'payment_method', 'date_start', 'date_end', 'page'] if params.get("trading_pair"): uri = f'{self.apibase}{params["trading_pair"]}/trades' del params["trading_pair"] else: uri = f'{self.apibase}trades' p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('GET', p) def showMyTradeDetails(self, trading_pair, trade_id): """Details to a specific Trade.""" params = {'trading_pair': trading_pair, 'trade_id': trade_id} avail_params = [ 'trading_pair', 'trade_id' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}' p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('GET', p) def markCoinsAsTransferred(self, trading_pair, trade_id, amount_currency_to_trade_after_fee): """Mark trade as transferred.""" params = {'amount_currency_to_trade_after_fee': amount_currency_to_trade_after_fee, 'trading_pair': trading_pair, 'trade_id': trade_id} avail_params = [ 'trading_pair', 'trade_id', 'amount_currency_to_trade_after_fee' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}/mark_coins_as_transferred' p = ParameterBuilder(avail_params, {'amount_currency_to_trade_after_fee': amount_currency_to_trade_after_fee}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('POST', p) def markTradeAsPaid(self, trading_pair, trade_id, volume_currency_to_pay_after_fee): """Mark traded as paid.""" params = {'volume_currency_to_pay_after_fee': volume_currency_to_pay_after_fee, 'trading_pair': trading_pair, 'trade_id': trade_id} avail_params = [ 'trading_pair', 'trade_id', 'volume_currency_to_pay_after_fee' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}/mark_trade_as_paid' p = ParameterBuilder(avail_params, {'volume_currency_to_pay_after_fee': volume_currency_to_pay_after_fee}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('POST', p) def markCoinsAsReceived(self, trading_pair, trade_id, amount_currency_to_trade_after_fee, rating): """Mark coins as received.""" params = {'amount_currency_to_trade_after_fee': amount_currency_to_trade_after_fee, 'trading_pair': trading_pair, 'trade_id': trade_id, 'rating': rating} params_post = {'amount_currency_to_trade_after_fee': amount_currency_to_trade_after_fee, 'rating': rating} avail_params = [ 'trading_pair', 'trade_id', 'amount_currency_to_trade_after_fee', 'rating' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}/mark_coins_as_received' p = ParameterBuilder(avail_params, params_post, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('POST', p) def markTradeAsPaymentReceived(self, trading_pair, trade_id, volume_currency_to_pay_after_fee, rating, is_paid_from_correct_bank_account): """Mark coins as received.""" params = {'volume_currency_to_pay_after_fee': volume_currency_to_pay_after_fee, 'trading_pair': trading_pair, 'trade_id': trade_id, 'rating': rating} params_post = {'volume_currency_to_pay_after_fee': volume_currency_to_pay_after_fee, 'rating': rating, 'is_paid_from_correct_bank_account': is_paid_from_correct_bank_account} avail_params = [ 'trading_pair', 'trade_id', 'volume_currency_to_pay_after_fee', 'rating', 'is_paid_from_correct_bank_account' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}/mark_trade_as_payment_received' p = ParameterBuilder(avail_params, params_post, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('POST', p) def addTradeRating(self, trading_pair, trade_id, rating): """Mark coins as received.""" params = {'trading_pair': trading_pair, 'trade_id': trade_id, 'rating': rating} params_post = {'rating': rating} avail_params = [ 'trading_pair', 'trade_id', 'rating' ] uri = f'{self.apibase}{trading_pair}/trades/{trade_id}/add_trade_rating' p = ParameterBuilder(avail_params, params_post, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('POST', p) def showAccountInfo(self): """Query on Account Infos.""" uri = f'{self.apibase}account' p = ParameterBuilder({}, {}, uri) return self.APIConnect('GET', p) def showOrderbookCompact(self, trading_pair): """Bids and Asks in compact format.""" params = {'trading_pair': trading_pair} avail_params = ['trading_pair'] uri = f'{self.apibase}{trading_pair}/orderbook/compact' # Build parameters p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('GET', p) def showPublicTradeHistory(self, trading_pair, **args): """All successful trades of the last 24 hours.""" params = { 'trading_pair': trading_pair } params.update(args) avail_params = ['trading_pair', 'since_tid'] uri = f'{self.apibase}{trading_pair}/trades/history' if params.get('since_tid'): del params["trading_pair"] p = ParameterBuilder(avail_params, params, uri) else: p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('GET', p) def showRates(self, trading_pair): """Query of the average rate last 3 and 12 hours.""" uri = f'{self.apibase}{trading_pair}/rates' params = {'trading_pair': trading_pair} avail_params = ['trading_pair'] # Build parameters p = ParameterBuilder({}, {}, uri) p.verify_keys_and_values(avail_params, params) return self.APIConnect('GET', p) def showAccountLedger(self, currency, **args): """Query on Account statement.""" params = {'currency': currency} params.update(args) uri = f'{self.apibase}{currency}/account/ledger' avail_params = ['currency', 'type', 'datetime_start', 'datetime_end', 'page'] p = ParameterBuilder(avail_params, params, uri) del params['currency'] p = ParameterBuilder(avail_params, params, uri) return self.APIConnect('GET', p) def showPermissions(self): """Show permissions that are allowed for used API key""" uri = f'{self.apibase}permissions' p = ParameterBuilder({}, {}, uri) return self.APIConnect('GET', p)
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 17614, 27323, 2848, 329, 6185, 13, 2934, 25469, 7824, 526, 15931, 198, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 40481, 82, 198, 11748, 32465, 198, 11748, 10104, 198, 11748, 2956, 297, 571, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 8897, 3558, 62, 6404, 796, 18931, 13, 1136, 11187, 1362, 7203, 8897, 3558, 13, 43789, 13, 333, 297, 571, 18, 4943, 198, 8897, 3558, 62, 6404, 13, 22930, 37861, 796, 6407, 198, 198, 834, 9641, 834, 796, 705, 19, 13, 15, 6, 198, 198, 4871, 25139, 2357, 32875, 7, 15252, 2599, 198, 220, 220, 220, 705, 7061, 2514, 11767, 1813, 10007, 329, 7824, 2637, 7061, 628, 198, 220, 220, 220, 7579, 2885, 2751, 62, 4537, 4663, 50, 796, 37250, 18347, 344, 333, 3256, 705, 65, 2395, 333, 3256, 705, 10567, 333, 3256, 705, 18347, 469, 333, 3256, 705, 1443, 303, 333, 3256, 705, 2528, 344, 333, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5151, 397, 23047, 3256, 705, 42460, 18347, 66, 3256, 705, 70, 429, 18347, 66, 3256, 705, 2528, 66, 18347, 66, 20520, 198, 220, 220, 220, 38678, 62, 9936, 47, 1546, 796, 37250, 17846, 3256, 705, 7255, 20520, 198, 220, 220, 220, 327, 31302, 24181, 11015, 796, 37250, 18347, 66, 3256, 705, 65, 354, 3256, 705, 2788, 3256, 705, 18347, 70, 3256, 705, 1443, 85, 3256, 705, 2528, 66, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 72, 4265, 3256, 705, 42460, 3256, 705, 70, 429, 20520, 198, 220, 220, 220, 347, 15154, 62, 5188, 33586, 796, 37250, 1404, 3256, 705, 12473, 3256, 705, 40469, 3256, 705, 3398, 3256, 705, 34, 56, 3256, 705, 34, 57, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7206, 3256, 705, 48510, 3256, 705, 6500, 3256, 705, 1546, 3256, 705, 11674, 3256, 705, 10913, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 4579, 3256, 705, 10761, 3256, 705, 17184, 3256, 705, 39, 52, 3256, 705, 10008, 3256, 705, 1797, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2043, 3256, 705, 31271, 3256, 705, 27734, 3256, 705, 41596, 3256, 705, 30976, 3256, 705, 13752, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 49215, 3256, 705, 32572, 3256, 705, 15285, 3256, 705, 6489, 3256, 705, 11571, 3256, 705, 13252, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5188, 3256, 705, 11584, 3256, 705, 18831, 20520, 198, 220, 220, 220, 7579, 7759, 62, 2538, 18697, 50, 796, 37250, 65, 1313, 2736, 3256, 705, 40503, 3256, 705, 24267, 3256, 705, 489, 10680, 20520, 198, 220, 220, 220, 7579, 19266, 62, 2257, 29462, 796, 25915, 16, 11, 657, 11, 352, 60, 198, 220, 220, 220, 38678, 62, 2257, 29462, 796, 25915, 17, 11, 532, 16, 11, 657, 60, 198, 220, 220, 220, 38444, 10979, 62, 3185, 51, 11053, 796, 685, 16, 11, 362, 11, 513, 60, 198, 220, 220, 220, 7579, 19266, 62, 9936, 47, 1546, 796, 37250, 439, 3256, 705, 17846, 3256, 705, 7255, 3256, 705, 259, 37301, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 15577, 448, 3256, 705, 2001, 49826, 3256, 705, 86, 9571, 62, 18347, 66, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17846, 62, 88, 549, 522, 88, 3256, 705, 17846, 62, 24267, 24643, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17846, 62, 67, 8446, 24643, 3256, 705, 24585, 1891, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 448, 5146, 62, 39071, 62, 10396, 26468, 20520, 198, 198, 4299, 33141, 16844, 3558, 16922, 7, 68, 2599, 198, 220, 220, 220, 37227, 37508, 35528, 422, 2581, 526, 15931, 198, 220, 220, 220, 2604, 13, 43917, 7, 68, 8, 628, 198, 4299, 33141, 17614, 9139, 5965, 7, 81, 2599, 198, 220, 220, 220, 37227, 2514, 5412, 44225, 422, 14503, 7206, 7824, 526, 15931, 198, 220, 220, 220, 4938, 62, 13376, 62, 40148, 796, 685, 2167, 11, 580, 11, 26956, 60, 198, 220, 220, 220, 611, 374, 13, 13376, 62, 8189, 407, 287, 4938, 62, 13376, 62, 40148, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2695, 796, 374, 13, 17752, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8563, 796, 2695, 13, 1136, 10786, 48277, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 43917, 10786, 17614, 13047, 6127, 25, 23884, 4458, 18982, 7, 2536, 7, 48277, 58, 15, 7131, 6, 8189, 20520, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 43917, 10786, 17614, 13047, 16000, 25, 23884, 4458, 18982, 7, 48277, 58, 15, 7131, 6, 20500, 20520, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 43917, 10786, 17614, 13047, 10289, 25, 23884, 4458, 18982, 7, 81, 13, 6371, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 198, 4871, 26923, 7, 15252, 2599, 198, 220, 220, 220, 37227, 2514, 2148, 4637, 18031, 284, 262, 7313, 7824, 37811, 628, 220, 220, 220, 825, 3486, 2149, 261, 1606, 7, 944, 11, 2446, 11, 42287, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 41762, 40117, 284, 10289, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 13639, 796, 2116, 13, 2617, 62, 25677, 7, 37266, 13, 6371, 11, 2446, 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, 42287, 13, 12685, 9043, 62, 8841, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 24442, 10786, 7248, 48900, 25, 23884, 4458, 18982, 7, 25677, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 2116, 13, 21280, 62, 25927, 7, 37266, 13, 6371, 11, 2446, 11, 13639, 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, 42287, 13, 12685, 9043, 62, 8841, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 33141, 7824, 44225, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 33141, 17614, 9139, 5965, 7, 81, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 2482, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 374, 13, 17752, 7, 29572, 62, 22468, 28, 12501, 4402, 13, 10707, 4402, 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, 1255, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 7007, 13, 1069, 11755, 13, 18453, 16922, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33141, 16844, 3558, 16922, 7, 68, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1255, 628, 220, 220, 220, 825, 751, 2514, 20231, 27201, 7, 944, 11, 7395, 11, 2209, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 4550, 2209, 284, 5933, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 34415, 92, 14, 21975, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 21975, 10354, 2209, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 19119, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 21975, 3256, 705, 17287, 62, 385, 1095, 3256, 705, 23893, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 4781, 4863, 20231, 27201, 7, 944, 11, 7395, 11, 2209, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 27914, 2209, 422, 5933, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 34415, 92, 14, 21975, 14, 90, 21975, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 34415, 10354, 7395, 11, 705, 21975, 10354, 2209, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 34415, 3256, 705, 21975, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 7206, 2538, 9328, 3256, 279, 8, 628, 220, 220, 220, 825, 1351, 20231, 27201, 7, 944, 11, 7395, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8053, 2209, 5933, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 34415, 92, 14, 21975, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 26498, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 31979, 3256, 705, 23893, 3256, 705, 7700, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 18743, 2070, 7, 944, 11, 1502, 62, 4906, 11, 7313, 62, 24874, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 18243, 8284, 2070, 329, 4394, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2875, 2070, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 4906, 10354, 1502, 62, 4906, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 19119, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 4906, 3256, 705, 2213, 4980, 62, 24874, 3256, 705, 17287, 62, 34415, 62, 1462, 62, 25351, 3256, 705, 20888, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2875, 62, 8897, 18883, 62, 12853, 20286, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8807, 62, 2584, 66, 62, 12853, 3256, 705, 8807, 62, 42712, 62, 6361, 3256, 705, 37301, 62, 18076, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 325, 8957, 62, 18076, 3256, 705, 8807, 62, 31642, 62, 17796, 8094, 3256, 705, 8807, 62, 31642, 62, 65, 291, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 24073, 62, 1659, 62, 17796, 3256, 705, 7700, 62, 7857, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 18743, 24259, 7, 944, 11, 7313, 62, 24874, 11, 1502, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15307, 3307, 329, 281, 2897, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 6361, 14, 11377, 14, 36604, 14, 90, 2875, 62, 312, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 2875, 62, 312, 10354, 1502, 62, 312, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 2213, 4980, 62, 24874, 3256, 705, 2875, 62, 312, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 2251, 18743, 7, 944, 11, 1502, 62, 4906, 11, 7313, 62, 24874, 11, 3509, 62, 17287, 62, 34415, 62, 1462, 62, 25351, 11, 2756, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 16447, 257, 649, 8284, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 6361, 6, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 4906, 10354, 1502, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 9806, 62, 17287, 62, 34415, 62, 1462, 62, 25351, 10354, 3509, 62, 17287, 62, 34415, 62, 1462, 62, 25351, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 20888, 10354, 2756, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 19119, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 4906, 3256, 705, 9806, 62, 17287, 62, 34415, 62, 1462, 62, 25351, 3256, 705, 20888, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1084, 62, 17287, 62, 34415, 62, 1462, 62, 25351, 3256, 705, 437, 62, 19608, 8079, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3605, 62, 2875, 62, 1640, 62, 2787, 1397, 62, 17287, 3256, 705, 2213, 4980, 62, 24874, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1084, 62, 38087, 62, 5715, 3256, 705, 8807, 62, 2584, 66, 62, 12853, 3256, 705, 37301, 62, 18076, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 325, 8957, 62, 18076, 3256, 705, 24073, 62, 1659, 62, 17796, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 12233, 18743, 7, 944, 11, 1502, 62, 312, 11, 7313, 62, 24874, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 38727, 281, 8284, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 6361, 14, 90, 2875, 62, 312, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 2875, 62, 312, 3256, 705, 2213, 4980, 62, 24874, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 705, 2875, 62, 312, 10354, 1502, 62, 312, 11, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 92, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 7206, 2538, 9328, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 3666, 35422, 364, 7, 944, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 20746, 290, 25853, 898, 30689, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 26498, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 4906, 3256, 705, 2213, 4980, 62, 24874, 3256, 705, 5219, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 4475, 62, 9688, 3256, 705, 4475, 62, 437, 3256, 705, 7700, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42287, 13, 1136, 7203, 2213, 4980, 62, 24874, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 37266, 14692, 2213, 4980, 62, 24874, 8973, 92, 14, 6361, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 42287, 14692, 2213, 4980, 62, 24874, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 92, 6361, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 3666, 18743, 24259, 7, 944, 11, 7313, 62, 24874, 11, 1502, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 24259, 284, 281, 898, 8284, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 6361, 14, 90, 2875, 62, 312, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 12260, 35965, 7, 944, 11, 7313, 62, 24874, 11, 1502, 62, 312, 11, 1502, 62, 4906, 11, 2033, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14518, 14, 50, 695, 319, 257, 2176, 8284, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 2875, 62, 312, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 705, 4906, 10354, 1502, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17287, 62, 34415, 62, 1462, 62, 25351, 10354, 2033, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 4906, 3256, 705, 17287, 62, 34415, 62, 1462, 62, 25351, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 3666, 2898, 2367, 7, 944, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 20746, 290, 25853, 319, 1613, 833, 2367, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 26498, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 4906, 3256, 705, 2213, 4980, 62, 24874, 3256, 705, 5219, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8807, 62, 2213, 2367, 62, 4480, 62, 2673, 62, 1640, 62, 37301, 62, 273, 62, 39437, 62, 35827, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 37301, 62, 24396, 3256, 705, 4475, 62, 9688, 3256, 705, 4475, 62, 437, 3256, 705, 7700, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42287, 13, 1136, 7203, 2213, 4980, 62, 24874, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 37266, 14692, 2213, 4980, 62, 24874, 8973, 92, 14, 2213, 2367, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 42287, 14692, 2213, 4980, 62, 24874, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 92, 2213, 2367, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 3666, 35965, 24259, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 24259, 284, 257, 2176, 9601, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 1317, 7222, 1040, 1722, 8291, 18186, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 11, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9704, 3292, 355, 11172, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 10354, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 92, 628, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 3256, 705, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 14, 4102, 62, 14624, 62, 292, 62, 7645, 18186, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 10354, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 1317, 35965, 1722, 47, 1698, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 11, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9704, 14018, 355, 3432, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 10354, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 92, 628, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 3256, 705, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 14, 4102, 62, 25351, 62, 292, 62, 20333, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 10354, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 1317, 7222, 1040, 1722, 3041, 6471, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 11, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 11, 7955, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9704, 10796, 355, 2722, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 10354, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 11, 705, 8821, 10354, 7955, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 62, 7353, 796, 1391, 6, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 10354, 2033, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8821, 10354, 7955, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 3256, 705, 17287, 62, 34415, 62, 1462, 62, 25351, 62, 8499, 62, 39071, 3256, 705, 8821, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 14, 4102, 62, 14624, 62, 292, 62, 47844, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 62, 7353, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 1317, 35965, 1722, 19197, 434, 3041, 6471, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 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, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 11, 7955, 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, 318, 62, 20333, 62, 6738, 62, 30283, 62, 17796, 62, 23317, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9704, 10796, 355, 2722, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 10354, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 11, 705, 8821, 10354, 7955, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 62, 7353, 796, 1391, 6, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 10354, 6115, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8821, 10354, 7955, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 271, 62, 20333, 62, 6738, 62, 30283, 62, 17796, 62, 23317, 10354, 318, 62, 20333, 62, 6738, 62, 30283, 62, 17796, 62, 23317, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 3256, 705, 29048, 62, 34415, 62, 1462, 62, 15577, 62, 8499, 62, 39071, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8821, 3256, 705, 271, 62, 20333, 62, 6738, 62, 30283, 62, 17796, 62, 23317, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 14, 4102, 62, 25351, 62, 292, 62, 37301, 62, 47844, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 62, 7353, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 751, 35965, 29321, 7, 944, 11, 7313, 62, 24874, 11, 3292, 62, 312, 11, 7955, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 9704, 10796, 355, 2722, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 11, 705, 25351, 62, 312, 10354, 3292, 62, 312, 11, 705, 8821, 10354, 7955, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 62, 7353, 796, 1391, 6, 8821, 10354, 7955, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 685, 705, 2213, 4980, 62, 24874, 3256, 705, 25351, 62, 312, 3256, 705, 8821, 6, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 90, 25351, 62, 312, 92, 14, 2860, 62, 25351, 62, 8821, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 62, 7353, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 32782, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 30116, 12360, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 20746, 319, 10781, 4806, 418, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 92, 23317, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 18743, 2070, 7293, 529, 7, 944, 11, 7313, 62, 24874, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 33, 2340, 290, 1081, 591, 287, 16001, 5794, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 2213, 4980, 62, 24874, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2875, 2070, 14, 5589, 529, 6, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 15202, 35965, 18122, 7, 944, 11, 7313, 62, 24874, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 3237, 4388, 17674, 286, 262, 938, 1987, 2250, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 705, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 19119, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 2213, 4980, 62, 24874, 3256, 705, 20777, 62, 83, 312, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 2213, 2367, 14, 23569, 6, 198, 220, 220, 220, 220, 220, 220, 220, 611, 42287, 13, 1136, 10786, 20777, 62, 83, 312, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 42287, 14692, 2213, 4980, 62, 24874, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 49, 689, 7, 944, 11, 7313, 62, 24874, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 20746, 286, 262, 2811, 2494, 938, 513, 290, 1105, 2250, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 2213, 4980, 62, 24874, 92, 14, 9700, 6, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 2213, 4980, 62, 24874, 10354, 7313, 62, 24874, 92, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 2213, 4980, 62, 24874, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 13, 332, 1958, 62, 13083, 62, 392, 62, 27160, 7, 615, 603, 62, 37266, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 30116, 42416, 1362, 7, 944, 11, 7395, 11, 12429, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 20746, 319, 10781, 2643, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 796, 1391, 6, 34415, 10354, 7395, 92, 198, 220, 220, 220, 220, 220, 220, 220, 42287, 13, 19119, 7, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 18477, 34415, 92, 14, 23317, 14, 992, 1362, 6, 198, 220, 220, 220, 220, 220, 220, 220, 29107, 62, 37266, 796, 37250, 34415, 3256, 705, 4906, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 19608, 8079, 62, 9688, 3256, 705, 19608, 8079, 62, 437, 3256, 705, 7700, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 42287, 17816, 34415, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 7, 615, 603, 62, 37266, 11, 42287, 11, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8, 628, 220, 220, 220, 825, 905, 5990, 8481, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 15307, 21627, 326, 389, 3142, 329, 973, 7824, 1994, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2956, 72, 796, 277, 6, 90, 944, 13, 499, 571, 589, 92, 525, 8481, 6, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 25139, 2357, 32875, 15090, 5512, 1391, 5512, 2956, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 2969, 2149, 261, 1606, 10786, 18851, 3256, 279, 8 ]
2.171941
6,857
import numpy as np arr=np.arange(10) print arr #saving single array np.save('saved_array',arr) #now_file_is_created = saved_array.npy new_array=np.load('saved_array.npy') print new_array #save multiple array array_1=np.arange(25) array_2=np.arange(30) np.savez('saved_archieve.npz',x=array_1,y=array_2) load_archieve=np.load('saved_archieve.npz') print 'load_archieve[x] is' print load_archieve['x'] print 'load_archieve[y] is' print load_archieve['y'] #save to textfile np.savetxt('notepadfile.txt',array_1,delimiter = ',') # delimeter is a new function wwhich used with the to file generation of text file. #loading of txt file load_txt_file=np.loadtxt('notepadfile.txt',delimiter=',') print "load_txt_file is" print load_txt_file
[ 11748, 299, 32152, 355, 45941, 198, 3258, 28, 37659, 13, 283, 858, 7, 940, 8, 198, 4798, 5240, 198, 198, 2, 29336, 2060, 7177, 198, 37659, 13, 21928, 10786, 82, 9586, 62, 18747, 3256, 3258, 8, 198, 2, 2197, 62, 7753, 62, 271, 62, 25598, 796, 7448, 62, 18747, 13, 77, 9078, 198, 198, 3605, 62, 18747, 28, 37659, 13, 2220, 10786, 82, 9586, 62, 18747, 13, 77, 9078, 11537, 198, 4798, 649, 62, 18747, 628, 198, 2, 21928, 3294, 7177, 198, 198, 18747, 62, 16, 28, 37659, 13, 283, 858, 7, 1495, 8, 198, 18747, 62, 17, 28, 37659, 13, 283, 858, 7, 1270, 8, 198, 198, 37659, 13, 21928, 89, 10786, 82, 9586, 62, 998, 12311, 13, 37659, 89, 3256, 87, 28, 18747, 62, 16, 11, 88, 28, 18747, 62, 17, 8, 198, 198, 2220, 62, 998, 12311, 28, 37659, 13, 2220, 10786, 82, 9586, 62, 998, 12311, 13, 37659, 89, 11537, 198, 198, 4798, 705, 2220, 62, 998, 12311, 58, 87, 60, 318, 6, 198, 4798, 3440, 62, 998, 12311, 17816, 87, 20520, 198, 198, 4798, 705, 2220, 62, 998, 12311, 58, 88, 60, 318, 6, 198, 4798, 3440, 62, 998, 12311, 17816, 88, 20520, 198, 198, 2, 21928, 284, 2420, 7753, 198, 198, 37659, 13, 21928, 14116, 10786, 1662, 47852, 7753, 13, 14116, 3256, 18747, 62, 16, 11, 12381, 320, 2676, 796, 705, 4032, 8, 1303, 1619, 16912, 318, 257, 649, 2163, 266, 4758, 973, 351, 262, 284, 2393, 5270, 286, 2420, 2393, 13, 198, 198, 2, 25138, 286, 256, 742, 2393, 198, 198, 2220, 62, 14116, 62, 7753, 28, 37659, 13, 2220, 14116, 10786, 1662, 47852, 7753, 13, 14116, 3256, 12381, 320, 2676, 28, 3256, 11537, 198, 4798, 366, 2220, 62, 14116, 62, 7753, 318, 1, 198, 4798, 3440, 62, 14116, 62, 7753, 628, 628 ]
2.496667
300
import cocotb from cocotb.clock import Clock from cocotb.triggers import RisingEdge, FallingEdge, ClockCycles import random from test.test_encoder import Encoder clocks_per_phase = 10 # takes ~60 seconds on my PC @cocotb.test()
[ 11748, 8954, 313, 65, 198, 6738, 8954, 313, 65, 13, 15750, 1330, 21328, 198, 6738, 8954, 313, 65, 13, 2213, 328, 5355, 1330, 17658, 37021, 11, 42914, 37021, 11, 21328, 20418, 5427, 198, 11748, 4738, 198, 6738, 1332, 13, 9288, 62, 12685, 12342, 1330, 14711, 12342, 198, 198, 565, 3320, 62, 525, 62, 40715, 796, 838, 628, 198, 2, 2753, 5299, 1899, 4201, 319, 616, 4217, 198, 31, 66, 420, 313, 65, 13, 9288, 3419, 628 ]
3.052632
76
import datetime import numpy from sqlalchemy import func, and_ from lemonadefashion_flask_monitoringdashboard.core.timezone import to_utc_datetime, to_local_datetime from lemonadefashion_flask_monitoringdashboard.database import Request from lemonadefashion_flask_monitoringdashboard.database.count_group import count_requests_per_day, get_value from lemonadefashion_flask_monitoringdashboard.database.endpoint import get_endpoints, get_num_requests from lemonadefashion_flask_monitoringdashboard.database.request import create_time_based_sample_criterion def get_num_requests_data(session, start_date, end_date): """ :param session: session for the database :param start_date: datetime object :param end_date: datetime object and: end_date >= start_date :return: a list of the number of requests for each endpoint and on which day """ numdays = (end_date - start_date).days + 1 days = [start_date + datetime.timedelta(days=i) for i in range(numdays)] hits = count_requests_per_day(session, days) endpoints = get_endpoints(session) data = [ {'name': end.name, 'values': [get_value(hits_day, end.id) for hits_day in hits]} for end in endpoints ] return {'days': [d.strftime('%Y-%m-%d') for d in days], 'data': data} def get_all_request_status_code_counts(session, endpoint_id): """ Gets all the request status code counts. :param session: session for the database :param endpoint_id: id for the endpoint :return: A list of tuples in the form of `(status_code, count)` """ return ( session.query(Request.status_code, func.count(Request.status_code)) .filter(Request.endpoint_id == endpoint_id, Request.status_code.isnot(None)) .group_by(Request.status_code) .all() ) def get_status_code_distribution(session, endpoint_id): """ Gets the distribution of status codes returned by the given endpoint. :param session: session for the database :param endpoint_id: id for the endpoint :return: A dict where the key is the status code and the value is the fraction of requests that returned the status code. Example: a return value of `{ 200: 0.92, 404: 0.08 }` means that status code 200 was returned on 92% of the requests. 8% of the requests returned a 404 status code. """ status_code_counts = get_all_request_status_code_counts(session, endpoint_id) total_count = sum(frequency for (_, frequency) in status_code_counts) return {status_code: frequency / total_count for (status_code, frequency) in status_code_counts} def get_status_code_frequencies(session, endpoint_id, *criterion): """ Gets the frequencies of each status code. :param session: session for the database :param endpoint_id: id for the endpoint :param criterion: Optional criteria used to file the requests. :return: A dict where the key is the status code and the value is the fraction of requests that returned the status code. Example: a return value of `{ 200: 105, 404: 3 }` means that status code 200 was returned 105 times and 404 was returned 3 times. """ status_code_counts = session.query(Request.status_code, func.count(Request.status_code)) \ .filter(Request.endpoint_id == endpoint_id, Request.status_code.isnot(None), *criterion) \ .group_by(Request.status_code).all() return dict(status_code_counts) def get_error_requests(session, endpoint_id, *criterion): """ Gets all requests that did not return a 200 status code. :param session: session for the database :param endpoint_id: ID of the endpoint to be queried :param criterion: Optional criteria used to file the requests. :return: """ criteria = and_( Request.endpoint_id == endpoint_id, Request.status_code.isnot(None), Request.status_code >= 400, Request.status_code <= 599, ) return session.query(Request).filter(criteria, *criterion).all() def get_hourly_load(session, endpoint_id, start_date, end_date): """ :param session: session for the database :param endpoint_id: id for the endpoint :param start_date: datetime object :param end_date: datetime object and: end_date >= start_date :return: """ numdays = (end_date - start_date).days + 1 # list of hours: 0:00 - 23:00 hours = ['0{}:00'.format(h) for h in range(0, 10)] + ['{}:00'.format(h) for h in range(10, 24)] heatmap_data = numpy.zeros((len(hours), numdays)) start_datetime = to_utc_datetime( datetime.datetime.combine(start_date, datetime.time(0, 0, 0, 0)) ) end_datetime = to_utc_datetime(datetime.datetime.combine(end_date, datetime.time(23, 59, 59))) for time, count in get_num_requests(session, endpoint_id, start_datetime, end_datetime): parsed_time = datetime.datetime.strptime(time, '%Y-%m-%d %H:%M:%S') day_index = (parsed_time - start_datetime).days hour_index = int(to_local_datetime(parsed_time).strftime('%H')) heatmap_data[hour_index][day_index] = count return { 'days': [ (start_date + datetime.timedelta(days=i)).strftime('%Y-%m-%d') for i in range(numdays) ], "data": heatmap_data.tolist(), }
[ 11748, 4818, 8079, 198, 198, 11748, 299, 32152, 198, 6738, 44161, 282, 26599, 1330, 25439, 11, 290, 62, 198, 198, 6738, 18873, 671, 25265, 62, 2704, 2093, 62, 41143, 278, 42460, 3526, 13, 7295, 13, 2435, 11340, 1330, 284, 62, 315, 66, 62, 19608, 8079, 11, 284, 62, 12001, 62, 19608, 8079, 198, 6738, 18873, 671, 25265, 62, 2704, 2093, 62, 41143, 278, 42460, 3526, 13, 48806, 1330, 19390, 198, 6738, 18873, 671, 25265, 62, 2704, 2093, 62, 41143, 278, 42460, 3526, 13, 48806, 13, 9127, 62, 8094, 1330, 954, 62, 8897, 3558, 62, 525, 62, 820, 11, 651, 62, 8367, 198, 6738, 18873, 671, 25265, 62, 2704, 2093, 62, 41143, 278, 42460, 3526, 13, 48806, 13, 437, 4122, 1330, 651, 62, 437, 13033, 11, 651, 62, 22510, 62, 8897, 3558, 198, 6738, 18873, 671, 25265, 62, 2704, 2093, 62, 41143, 278, 42460, 3526, 13, 48806, 13, 25927, 1330, 2251, 62, 2435, 62, 3106, 62, 39873, 62, 22213, 28019, 628, 198, 4299, 651, 62, 22510, 62, 8897, 3558, 62, 7890, 7, 29891, 11, 923, 62, 4475, 11, 886, 62, 4475, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 923, 62, 4475, 25, 4818, 8079, 2134, 198, 220, 220, 220, 1058, 17143, 886, 62, 4475, 25, 4818, 8079, 2134, 290, 25, 886, 62, 4475, 18189, 923, 62, 4475, 198, 220, 220, 220, 1058, 7783, 25, 257, 1351, 286, 262, 1271, 286, 7007, 329, 1123, 36123, 290, 319, 543, 1110, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 997, 12545, 796, 357, 437, 62, 4475, 532, 923, 62, 4475, 737, 12545, 1343, 352, 198, 220, 220, 220, 1528, 796, 685, 9688, 62, 4475, 1343, 4818, 8079, 13, 16514, 276, 12514, 7, 12545, 28, 72, 8, 329, 1312, 287, 2837, 7, 22510, 12545, 15437, 628, 220, 220, 220, 7127, 796, 954, 62, 8897, 3558, 62, 525, 62, 820, 7, 29891, 11, 1528, 8, 198, 220, 220, 220, 886, 13033, 796, 651, 62, 437, 13033, 7, 29891, 8, 198, 220, 220, 220, 1366, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 3672, 10354, 886, 13, 3672, 11, 705, 27160, 10354, 685, 1136, 62, 8367, 7, 71, 896, 62, 820, 11, 886, 13, 312, 8, 329, 7127, 62, 820, 287, 7127, 48999, 198, 220, 220, 220, 220, 220, 220, 220, 329, 886, 287, 886, 13033, 198, 220, 220, 220, 2361, 628, 220, 220, 220, 1441, 1391, 6, 12545, 10354, 685, 67, 13, 2536, 31387, 10786, 4, 56, 12, 4, 76, 12, 4, 67, 11537, 329, 288, 287, 1528, 4357, 705, 7890, 10354, 1366, 92, 628, 198, 4299, 651, 62, 439, 62, 25927, 62, 13376, 62, 8189, 62, 9127, 82, 7, 29891, 11, 36123, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29620, 477, 262, 2581, 3722, 2438, 9853, 13, 628, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 36123, 62, 312, 25, 4686, 329, 262, 36123, 198, 220, 220, 220, 1058, 7783, 25, 317, 1351, 286, 12777, 2374, 287, 262, 1296, 286, 4600, 7, 13376, 62, 8189, 11, 954, 8, 63, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 357, 198, 220, 220, 220, 220, 220, 220, 220, 6246, 13, 22766, 7, 18453, 13, 13376, 62, 8189, 11, 25439, 13, 9127, 7, 18453, 13, 13376, 62, 8189, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 24455, 7, 18453, 13, 437, 4122, 62, 312, 6624, 36123, 62, 312, 11, 19390, 13, 13376, 62, 8189, 13, 271, 1662, 7, 14202, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 8094, 62, 1525, 7, 18453, 13, 13376, 62, 8189, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 439, 3419, 198, 220, 220, 220, 1267, 628, 198, 4299, 651, 62, 13376, 62, 8189, 62, 17080, 3890, 7, 29891, 11, 36123, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29620, 262, 6082, 286, 3722, 12416, 4504, 416, 262, 1813, 36123, 13, 628, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 36123, 62, 312, 25, 4686, 329, 262, 36123, 198, 220, 220, 220, 1058, 7783, 25, 317, 8633, 810, 262, 1994, 318, 262, 3722, 2438, 290, 262, 1988, 318, 262, 13390, 286, 7007, 198, 220, 220, 220, 326, 4504, 262, 3722, 198, 220, 220, 220, 2438, 13, 17934, 25, 257, 1441, 1988, 286, 4600, 90, 939, 25, 657, 13, 5892, 11, 32320, 25, 657, 13, 2919, 1782, 63, 1724, 326, 3722, 2438, 939, 373, 198, 220, 220, 220, 4504, 319, 10190, 4, 286, 262, 198, 220, 220, 220, 7007, 13, 807, 4, 286, 262, 7007, 4504, 257, 32320, 3722, 2438, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3722, 62, 8189, 62, 9127, 82, 796, 651, 62, 439, 62, 25927, 62, 13376, 62, 8189, 62, 9127, 82, 7, 29891, 11, 36123, 62, 312, 8, 198, 220, 220, 220, 2472, 62, 9127, 796, 2160, 7, 35324, 329, 44104, 11, 8373, 8, 287, 3722, 62, 8189, 62, 9127, 82, 8, 198, 220, 220, 220, 1441, 1391, 13376, 62, 8189, 25, 8373, 1220, 2472, 62, 9127, 329, 357, 13376, 62, 8189, 11, 8373, 8, 287, 3722, 62, 8189, 62, 9127, 82, 92, 628, 198, 4299, 651, 62, 13376, 62, 8189, 62, 69, 8897, 3976, 7, 29891, 11, 36123, 62, 312, 11, 1635, 22213, 28019, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29620, 262, 19998, 286, 1123, 3722, 2438, 13, 628, 198, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 36123, 62, 312, 25, 4686, 329, 262, 36123, 198, 220, 220, 220, 1058, 17143, 34054, 25, 32233, 9987, 973, 284, 2393, 262, 7007, 13, 198, 220, 220, 220, 1058, 7783, 25, 317, 8633, 810, 262, 1994, 318, 262, 3722, 2438, 290, 262, 1988, 318, 262, 13390, 286, 7007, 326, 4504, 262, 3722, 198, 220, 220, 220, 2438, 13, 17934, 25, 257, 1441, 1988, 286, 4600, 90, 939, 25, 13343, 11, 32320, 25, 513, 1782, 63, 1724, 326, 3722, 2438, 939, 373, 4504, 13343, 1661, 290, 198, 220, 220, 220, 32320, 373, 4504, 513, 1661, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3722, 62, 8189, 62, 9127, 82, 796, 6246, 13, 22766, 7, 18453, 13, 13376, 62, 8189, 11, 25439, 13, 9127, 7, 18453, 13, 13376, 62, 8189, 4008, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 764, 24455, 7, 18453, 13, 437, 4122, 62, 312, 6624, 36123, 62, 312, 11, 19390, 13, 13376, 62, 8189, 13, 271, 1662, 7, 14202, 828, 1635, 22213, 28019, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 764, 8094, 62, 1525, 7, 18453, 13, 13376, 62, 8189, 737, 439, 3419, 628, 220, 220, 220, 1441, 8633, 7, 13376, 62, 8189, 62, 9127, 82, 8, 628, 198, 4299, 651, 62, 18224, 62, 8897, 3558, 7, 29891, 11, 36123, 62, 312, 11, 1635, 22213, 28019, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29620, 477, 7007, 326, 750, 407, 1441, 257, 939, 3722, 2438, 13, 628, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 36123, 62, 312, 25, 4522, 286, 262, 36123, 284, 307, 42517, 798, 198, 220, 220, 220, 1058, 17143, 34054, 25, 32233, 9987, 973, 284, 2393, 262, 7007, 13, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 9987, 796, 290, 41052, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 13, 437, 4122, 62, 312, 6624, 36123, 62, 312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 13, 13376, 62, 8189, 13, 271, 1662, 7, 14202, 828, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 13, 13376, 62, 8189, 18189, 7337, 11, 198, 220, 220, 220, 220, 220, 220, 220, 19390, 13, 13376, 62, 8189, 19841, 642, 2079, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 6246, 13, 22766, 7, 18453, 737, 24455, 7, 22213, 5142, 11, 1635, 22213, 28019, 737, 439, 3419, 628, 198, 198, 4299, 651, 62, 9769, 306, 62, 2220, 7, 29891, 11, 36123, 62, 312, 11, 923, 62, 4475, 11, 886, 62, 4475, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 6246, 25, 6246, 329, 262, 6831, 198, 220, 220, 220, 1058, 17143, 36123, 62, 312, 25, 4686, 329, 262, 36123, 198, 220, 220, 220, 1058, 17143, 923, 62, 4475, 25, 4818, 8079, 2134, 198, 220, 220, 220, 1058, 17143, 886, 62, 4475, 25, 4818, 8079, 2134, 290, 25, 886, 62, 4475, 18189, 923, 62, 4475, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 997, 12545, 796, 357, 437, 62, 4475, 532, 923, 62, 4475, 737, 12545, 1343, 352, 628, 220, 220, 220, 1303, 1351, 286, 2250, 25, 657, 25, 405, 532, 2242, 25, 405, 198, 220, 220, 220, 2250, 796, 37250, 15, 90, 38362, 405, 4458, 18982, 7, 71, 8, 329, 289, 287, 2837, 7, 15, 11, 838, 15437, 1343, 37250, 90, 38362, 405, 4458, 18982, 7, 71, 8, 329, 289, 287, 2837, 7, 940, 11, 1987, 15437, 198, 220, 220, 220, 4894, 8899, 62, 7890, 796, 299, 32152, 13, 9107, 418, 19510, 11925, 7, 24425, 828, 997, 12545, 4008, 628, 220, 220, 220, 923, 62, 19608, 8079, 796, 284, 62, 315, 66, 62, 19608, 8079, 7, 198, 220, 220, 220, 220, 220, 220, 220, 4818, 8079, 13, 19608, 8079, 13, 24011, 500, 7, 9688, 62, 4475, 11, 4818, 8079, 13, 2435, 7, 15, 11, 657, 11, 657, 11, 657, 4008, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 62, 19608, 8079, 796, 284, 62, 315, 66, 62, 19608, 8079, 7, 19608, 8079, 13, 19608, 8079, 13, 24011, 500, 7, 437, 62, 4475, 11, 4818, 8079, 13, 2435, 7, 1954, 11, 7863, 11, 7863, 22305, 628, 220, 220, 220, 329, 640, 11, 954, 287, 651, 62, 22510, 62, 8897, 3558, 7, 29891, 11, 36123, 62, 312, 11, 923, 62, 19608, 8079, 11, 886, 62, 19608, 8079, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 44267, 62, 2435, 796, 4818, 8079, 13, 19608, 8079, 13, 2536, 457, 524, 7, 2435, 11, 705, 4, 56, 12, 4, 76, 12, 4, 67, 4064, 39, 25, 4, 44, 25, 4, 50, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1110, 62, 9630, 796, 357, 79, 945, 276, 62, 2435, 532, 923, 62, 19608, 8079, 737, 12545, 198, 220, 220, 220, 220, 220, 220, 220, 1711, 62, 9630, 796, 493, 7, 1462, 62, 12001, 62, 19608, 8079, 7, 79, 945, 276, 62, 2435, 737, 2536, 31387, 10786, 4, 39, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4894, 8899, 62, 7890, 58, 9769, 62, 9630, 7131, 820, 62, 9630, 60, 796, 954, 198, 220, 220, 220, 1441, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 12545, 10354, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 9688, 62, 4475, 1343, 4818, 8079, 13, 16514, 276, 12514, 7, 12545, 28, 72, 29720, 2536, 31387, 10786, 4, 56, 12, 4, 76, 12, 4, 67, 11537, 329, 1312, 287, 2837, 7, 22510, 12545, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16589, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7890, 1298, 4894, 8899, 62, 7890, 13, 83, 349, 396, 22784, 198, 220, 220, 220, 1782, 198 ]
2.75715
1,923
#====================================================================== # MYTH : Multipurpose code compiles YT-rendering for Hydro-simulations # # Author: Siddhartha Gupta # contact: [email protected] # # Last modified on 17 July 2020 #====================================================================== from headers import * from users_input import * import timeit start = timeit.default_timer() print(CodeInfo) ######################################## # Creating Output directory ######################################## dirName = "%s" % (OutputPath) if not os.path.exists(dirName): os.makedirs(dirName) print(">> Creating directory: %s\n" % (dirName)) else: print(">> Directory: ", dirName , "already exists\n") if PrintLog == 'yes': sys.stdout = open("%s/myth.log"%OutputPath, 'w') ######################################## # Input data file main loop starts ######################################## for infilenumber in range(File_Start,File_End+1,1): #************************************** # Input data files #************************************** print(">> Input File Number:%d"%infilenumber) nx,ny,nz = Nx1, Nx2, Nx3 #************************************** # Volrender info #************************************** Zoomedinout = ZoomedOperation + [infilenumber] + ZoomingInfo RenderingOperation=Zoomedinout+Rotation #************************************** # Reading input data file #************************************** if FreshRead == 'yes': data = readfile.Read_InputFile(simulation, 'data', nx,ny,nz,infilenumber,InputPath) X1,X2,X3 = readfile.Read_InputFile(simulation, 'grid', nx,ny,nz,infilenumber,InputPath) if AddParticles == 'yes': Particles = readfile.Read_Particles(infilenumber,InputPath) Particles=Particles[:,[1,2,3]] else: Particles = [0] #************************************** # Check a data slice #************************************** if (FreshRead == 'yes' and CheckInputData == 'yes'): import matplotlib.pyplot as plt import matplotlib as mpl fig,ax = plt.subplots(1,1) ax = fig.add_subplot(111,aspect='equal') ax = fig.add_subplot(111,aspect=1.0) ax.set_aspect('equal') plt.axes().set_aspect('equal') color_map_name = 'magma' if Check_slice == 'xy': print(data.shape) plt.pcolormesh(X1,X2,np.log10(data[len(X3)//2,:,:]), cmap=color_map_name) plt.colorbar() if AddParticles == 'yes': plt.scatter(Particles[:,0],Particles[:,1]) print(">> Please check at %s file:checkinput%04d.png" % (OutputPath,infilenumber)) plt.savefig("%s/checkinput%04d.png"%(OutputPath,infilenumber)) plt.close() #************************************** # Convert data to uniform grid #************************************** if FreshRead == 'yes': # if ConverToUniformGrid == 'yes': unidata = tools.Interpolate(Resol_x1,Resol_x2,Resol_x3,Interpolationbox,X1,X2,X3,data) # else: unidata = data dumpfilename="%s/unigriddata%04d.txt" % (OutputPath,infilenumber) print(">>Dumping data into file=%s" % dumpfilename) file = open(dumpfilename, "w") for k in range((Resol_x3)): for j in range((Resol_x2)): for i in range((Resol_x1)): file.write("%e\n"% (unidata[k,j,i])) file.write("\n") file.write("\n") file.close() else: dumpfilename="%s/unigriddata%04d.txt" % (OutputPath,infilenumber) print(">>Reading data from the file dumped previously (%s)"%(dumpfilename)) data = np.loadtxt(dumpfilename) data = np.reshape(data,(Resol_x3,Resol_x2,Resol_x1)) unidata = data #************************************** # Reshaping data for the yt project #************************************** #unidata = np.moveaxis(unidata.reshape(Resol_x3,Resol_x2,Resol_x1),0,-2) x1beg, x1end = Interpolationbox[1], Interpolationbox[2] x2beg, x2end = Interpolationbox[3], Interpolationbox[4] x3beg, x3end = Interpolationbox[5], Interpolationbox[6] x1 = np.linspace(x1beg, x1end, Resol_x1) x2 = np.linspace(x2beg, x2end, Resol_x2) x3 = np.linspace(x3beg, x3end, Resol_x3) #************************************** # Checking if interpolation is correct # Please see figure in output dir # checkdum.filenumber.png #************************************** if CheckInterpolation == 'yes': import matplotlib.pyplot as plt import matplotlib as mpl fig,ax = plt.subplots(1,1) ax = fig.add_subplot(111,aspect='equal') ax = fig.add_subplot(111,aspect=1.0) ax.set_aspect('equal') plt.axes().set_aspect('equal') print(unidata.shape) color_map_name = 'magma' if Check_slice == 'xy': #plt.pcolormesh(x1,x2,np.log10(unidata[Check_slice_number,:,:], cmap=color_map_name) #vmin=np.log10(colorbound[0]),vmax=np.log10(colorbound[1])) plt.pcolormesh(x1,x2,np.log10(unidata[Check_slice_number,:,:]), cmap=color_map_name) plt.colorbar() if AddParticles == 'yes': plt.scatter(Particles[:,0],Particles[:,1]) print(">> Please check at %s file:checkdump%04d.png" % (OutputPath,infilenumber)) plt.savefig("%s/checkdump%04d.png"%(OutputPath,infilenumber)) plt.close() #************************************** # Volume rendering #************************************** # yt reads d[nx,ny,nz] instead d[nz,ny,nz], so we reshape data below B=np.moveaxis(unidata,2,0) unidata=np.moveaxis(B,1,-1) #Ready for performing yt-rendering outputfilename = "%s/volren%04d" % (OutputPath,infilenumber) ytrendering.VolumeRender(colorbound, RenderingOperation, outputfilename, x1,x2,x3,unidata,Particles) #************************************** # Job completed for filenumber #************************************** print(">> File: %d Completed! cheers!!!"%infilenumber) stop = timeit.default_timer() tools.RuntimeCalculation(start, stop) print(">> Completed! cheers!!!") print(Completion) ######################################## # Input data file main loop ends ########################################
[ 2, 23926, 50155, 198, 2, 17615, 4221, 1058, 7854, 541, 333, 3455, 2438, 552, 2915, 575, 51, 12, 13287, 278, 329, 32116, 12, 14323, 5768, 198, 2, 220, 220, 198, 2, 6434, 25, 44487, 9869, 12898, 42095, 198, 2, 2800, 25, 308, 82, 1638, 9869, 12898, 31, 794, 4549, 13, 15532, 198, 2, 220, 220, 220, 220, 220, 198, 2, 4586, 9518, 319, 1596, 2901, 12131, 198, 2, 23926, 50155, 198, 6738, 24697, 1330, 1635, 198, 6738, 2985, 62, 15414, 1330, 1635, 198, 11748, 640, 270, 198, 9688, 796, 640, 270, 13, 12286, 62, 45016, 3419, 198, 198, 4798, 7, 10669, 12360, 8, 198, 29113, 7804, 198, 2, 30481, 25235, 8619, 220, 198, 29113, 7804, 198, 15908, 5376, 796, 36521, 82, 1, 4064, 357, 26410, 15235, 8, 198, 361, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 15908, 5376, 2599, 198, 220, 220, 28686, 13, 76, 4335, 17062, 7, 15908, 5376, 8, 198, 220, 220, 3601, 7203, 4211, 30481, 8619, 25, 4064, 82, 59, 77, 1, 4064, 357, 15908, 5376, 4008, 198, 17772, 25, 198, 220, 220, 3601, 7203, 4211, 27387, 25, 33172, 26672, 5376, 837, 220, 366, 282, 1493, 7160, 59, 77, 4943, 198, 198, 361, 12578, 11187, 6624, 705, 8505, 10354, 198, 220, 220, 25064, 13, 19282, 448, 796, 1280, 7203, 4, 82, 14, 1820, 400, 13, 6404, 1, 4, 26410, 15235, 11, 705, 86, 11537, 198, 198, 29113, 7804, 198, 2, 220, 23412, 1366, 2393, 1388, 9052, 4940, 198, 29113, 7804, 198, 1640, 1167, 346, 268, 4494, 287, 2837, 7, 8979, 62, 10434, 11, 8979, 62, 12915, 10, 16, 11, 16, 2599, 628, 1303, 17174, 2466, 1174, 198, 1303, 23412, 1366, 3696, 198, 1303, 17174, 2466, 1174, 198, 3601, 7203, 4211, 23412, 9220, 7913, 25, 4, 67, 1, 4, 259, 10379, 268, 4494, 8, 198, 299, 87, 11, 3281, 11, 27305, 796, 399, 87, 16, 11, 399, 87, 17, 11, 399, 87, 18, 198, 220, 198, 1303, 17174, 2466, 1174, 198, 1303, 4709, 13287, 7508, 198, 1303, 17174, 2466, 1174, 198, 40305, 27152, 448, 796, 40305, 276, 32180, 1343, 685, 259, 10379, 268, 4494, 60, 1343, 1168, 30602, 12360, 198, 28703, 1586, 32180, 28, 57, 4207, 27152, 448, 10, 49, 14221, 220, 628, 1303, 17174, 2466, 1174, 198, 1303, 220, 220, 220, 220, 220, 11725, 5128, 1366, 2393, 198, 1303, 17174, 2466, 1174, 628, 611, 20138, 5569, 6624, 705, 8505, 10354, 198, 220, 1366, 220, 220, 220, 220, 796, 1100, 7753, 13, 5569, 62, 20560, 8979, 7, 14323, 1741, 11, 705, 7890, 3256, 299, 87, 11, 3281, 11, 27305, 11, 259, 10379, 268, 4494, 11, 20560, 15235, 8, 198, 220, 1395, 16, 11, 55, 17, 11, 55, 18, 220, 796, 1100, 7753, 13, 5569, 62, 20560, 8979, 7, 14323, 1741, 11, 705, 25928, 3256, 299, 87, 11, 3281, 11, 27305, 11, 259, 10379, 268, 4494, 11, 20560, 15235, 8, 628, 611, 3060, 7841, 2983, 6624, 705, 8505, 10354, 198, 220, 2142, 2983, 796, 1100, 7753, 13, 5569, 62, 7841, 2983, 7, 259, 10379, 268, 4494, 11, 20560, 15235, 8, 198, 220, 2142, 2983, 28, 7841, 2983, 58, 25, 17414, 16, 11, 17, 11, 18, 11907, 198, 2073, 25, 198, 220, 2142, 2983, 796, 685, 15, 60, 628, 1303, 17174, 2466, 1174, 198, 1303, 6822, 257, 1366, 16416, 220, 198, 1303, 17174, 2466, 1174, 198, 611, 357, 35857, 5569, 6624, 705, 8505, 6, 290, 6822, 20560, 6601, 6624, 705, 8505, 6, 2599, 198, 220, 220, 1330, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 220, 220, 1330, 2603, 29487, 8019, 355, 285, 489, 198, 220, 220, 2336, 11, 897, 796, 458, 83, 13, 7266, 489, 1747, 7, 16, 11, 16, 8, 198, 220, 220, 7877, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16243, 11, 292, 806, 11639, 40496, 11537, 198, 220, 220, 7877, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16243, 11, 292, 806, 28, 16, 13, 15, 8, 198, 220, 220, 7877, 13, 2617, 62, 292, 806, 10786, 40496, 11537, 198, 220, 220, 458, 83, 13, 897, 274, 22446, 2617, 62, 292, 806, 10786, 40496, 11537, 628, 220, 220, 3124, 62, 8899, 62, 3672, 796, 705, 19726, 2611, 6, 198, 220, 220, 611, 6822, 62, 48369, 6624, 705, 5431, 10354, 198, 220, 220, 220, 220, 3601, 7, 7890, 13, 43358, 8, 198, 220, 220, 220, 220, 458, 83, 13, 79, 4033, 579, 5069, 7, 55, 16, 11, 55, 17, 11, 37659, 13, 6404, 940, 7, 7890, 58, 11925, 7, 55, 18, 8, 1003, 17, 11, 45299, 25, 46570, 269, 8899, 28, 8043, 62, 8899, 62, 3672, 8, 220, 198, 220, 220, 220, 220, 458, 83, 13, 8043, 5657, 3419, 198, 220, 220, 220, 220, 611, 3060, 7841, 2983, 6624, 705, 8505, 10354, 198, 220, 220, 220, 220, 220, 220, 458, 83, 13, 1416, 1436, 7, 7841, 2983, 58, 45299, 15, 4357, 7841, 2983, 58, 45299, 16, 12962, 628, 220, 220, 3601, 7203, 4211, 4222, 2198, 379, 4064, 82, 2393, 25, 9122, 15414, 4, 3023, 67, 13, 11134, 1, 4064, 357, 26410, 15235, 11, 259, 10379, 268, 4494, 4008, 198, 220, 220, 458, 83, 13, 21928, 5647, 7203, 4, 82, 14, 9122, 15414, 4, 3023, 67, 13, 11134, 1, 4, 7, 26410, 15235, 11, 259, 10379, 268, 4494, 4008, 198, 220, 220, 458, 83, 13, 19836, 3419, 628, 1303, 17174, 2466, 1174, 198, 1303, 220, 220, 38240, 1366, 284, 8187, 10706, 220, 198, 1303, 17174, 2466, 1174, 198, 611, 20138, 5569, 6624, 705, 8505, 10354, 198, 220, 1303, 198, 220, 611, 35602, 2514, 3118, 6933, 41339, 6624, 705, 8505, 10354, 198, 220, 220, 220, 555, 312, 1045, 796, 4899, 13, 9492, 16104, 378, 7, 4965, 349, 62, 87, 16, 11, 4965, 349, 62, 87, 17, 11, 4965, 349, 62, 87, 18, 11, 9492, 16104, 341, 3524, 11, 55, 16, 11, 55, 17, 11, 55, 18, 11, 7890, 8, 198, 220, 1303, 198, 220, 2073, 25, 198, 220, 220, 220, 555, 312, 1045, 796, 1366, 220, 628, 220, 10285, 34345, 2625, 4, 82, 14, 403, 3692, 1638, 1045, 4, 3023, 67, 13, 14116, 1, 4064, 357, 26410, 15235, 11, 259, 10379, 268, 4494, 8, 220, 198, 220, 3601, 7203, 4211, 35, 25218, 1366, 656, 2393, 28, 4, 82, 1, 4064, 10285, 34345, 8, 198, 220, 2393, 796, 1280, 7, 39455, 34345, 11, 366, 86, 4943, 198, 220, 329, 479, 287, 2837, 19510, 4965, 349, 62, 87, 18, 8, 2599, 198, 220, 220, 220, 329, 474, 287, 2837, 19510, 4965, 349, 62, 87, 17, 8, 2599, 198, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 19510, 4965, 349, 62, 87, 16, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 13, 13564, 7203, 4, 68, 59, 77, 1, 4, 357, 403, 312, 1045, 58, 74, 11, 73, 11, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 2393, 13, 13564, 7203, 59, 77, 4943, 198, 220, 220, 220, 2393, 13, 13564, 7203, 59, 77, 4943, 198, 220, 2393, 13, 19836, 3419, 198, 220, 220, 198, 2073, 25, 198, 220, 220, 10285, 34345, 2625, 4, 82, 14, 403, 3692, 1638, 1045, 4, 3023, 67, 13, 14116, 1, 4064, 357, 26410, 15235, 11, 259, 10379, 268, 4494, 8, 198, 220, 220, 3601, 7203, 4211, 36120, 1366, 422, 262, 2393, 24105, 4271, 37633, 82, 16725, 4, 7, 39455, 34345, 4008, 198, 220, 220, 1366, 796, 45941, 13, 2220, 14116, 7, 39455, 34345, 8, 198, 220, 220, 1366, 796, 45941, 13, 3447, 1758, 7, 7890, 11, 7, 4965, 349, 62, 87, 18, 11, 4965, 349, 62, 87, 17, 11, 4965, 349, 62, 87, 16, 4008, 198, 220, 220, 555, 312, 1045, 796, 1366, 628, 1303, 17174, 2466, 1174, 198, 1303, 1874, 71, 9269, 1366, 329, 262, 331, 83, 1628, 198, 1303, 17174, 2466, 1174, 198, 1303, 403, 312, 1045, 796, 45941, 13, 21084, 22704, 7, 403, 312, 1045, 13, 3447, 1758, 7, 4965, 349, 62, 87, 18, 11, 4965, 349, 62, 87, 17, 11, 4965, 349, 62, 87, 16, 828, 15, 12095, 17, 8, 628, 2124, 16, 1350, 70, 11, 2124, 16, 437, 796, 4225, 16104, 341, 3524, 58, 16, 4357, 4225, 16104, 341, 3524, 58, 17, 60, 198, 2124, 17, 1350, 70, 11, 2124, 17, 437, 796, 4225, 16104, 341, 3524, 58, 18, 4357, 4225, 16104, 341, 3524, 58, 19, 60, 198, 2124, 18, 1350, 70, 11, 2124, 18, 437, 796, 4225, 16104, 341, 3524, 58, 20, 4357, 4225, 16104, 341, 3524, 58, 21, 60, 198, 2124, 16, 796, 45941, 13, 21602, 10223, 7, 87, 16, 1350, 70, 11, 2124, 16, 437, 11, 1874, 349, 62, 87, 16, 8, 198, 2124, 17, 796, 45941, 13, 21602, 10223, 7, 87, 17, 1350, 70, 11, 2124, 17, 437, 11, 1874, 349, 62, 87, 17, 8, 198, 2124, 18, 796, 45941, 13, 21602, 10223, 7, 87, 18, 1350, 70, 11, 2124, 18, 437, 11, 1874, 349, 62, 87, 18, 8, 628, 1303, 17174, 2466, 1174, 198, 1303, 39432, 611, 39555, 341, 318, 3376, 198, 1303, 4222, 766, 3785, 287, 5072, 26672, 220, 198, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2198, 67, 388, 13, 10379, 268, 4494, 13, 11134, 198, 1303, 17174, 2466, 1174, 198, 611, 6822, 9492, 16104, 341, 6624, 705, 8505, 10354, 198, 220, 220, 1330, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 220, 220, 1330, 2603, 29487, 8019, 355, 285, 489, 198, 220, 220, 2336, 11, 897, 796, 458, 83, 13, 7266, 489, 1747, 7, 16, 11, 16, 8, 198, 220, 220, 7877, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16243, 11, 292, 806, 11639, 40496, 11537, 198, 220, 220, 7877, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16243, 11, 292, 806, 28, 16, 13, 15, 8, 198, 220, 220, 7877, 13, 2617, 62, 292, 806, 10786, 40496, 11537, 198, 220, 220, 458, 83, 13, 897, 274, 22446, 2617, 62, 292, 806, 10786, 40496, 11537, 628, 220, 220, 3601, 7, 403, 312, 1045, 13, 43358, 8, 198, 220, 220, 3124, 62, 8899, 62, 3672, 796, 705, 19726, 2611, 6, 198, 220, 220, 611, 6822, 62, 48369, 6624, 705, 5431, 10354, 198, 220, 220, 220, 220, 1303, 489, 83, 13, 79, 4033, 579, 5069, 7, 87, 16, 11, 87, 17, 11, 37659, 13, 6404, 940, 7, 403, 312, 1045, 58, 9787, 62, 48369, 62, 17618, 11, 45299, 25, 4357, 269, 8899, 28, 8043, 62, 8899, 62, 3672, 8, 220, 198, 220, 220, 220, 220, 1303, 85, 1084, 28, 37659, 13, 6404, 940, 7, 8043, 7784, 58, 15, 46570, 85, 9806, 28, 37659, 13, 6404, 940, 7, 8043, 7784, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 458, 83, 13, 79, 4033, 579, 5069, 7, 87, 16, 11, 87, 17, 11, 37659, 13, 6404, 940, 7, 403, 312, 1045, 58, 9787, 62, 48369, 62, 17618, 11, 45299, 25, 46570, 269, 8899, 28, 8043, 62, 8899, 62, 3672, 8, 198, 220, 220, 220, 220, 458, 83, 13, 8043, 5657, 3419, 198, 220, 220, 220, 220, 611, 3060, 7841, 2983, 6624, 705, 8505, 10354, 198, 220, 220, 220, 220, 220, 220, 458, 83, 13, 1416, 1436, 7, 7841, 2983, 58, 45299, 15, 4357, 7841, 2983, 58, 45299, 16, 12962, 628, 220, 220, 3601, 7203, 4211, 4222, 2198, 379, 4064, 82, 2393, 25, 9122, 39455, 4, 3023, 67, 13, 11134, 1, 4064, 357, 26410, 15235, 11, 259, 10379, 268, 4494, 4008, 198, 220, 220, 458, 83, 13, 21928, 5647, 7203, 4, 82, 14, 9122, 39455, 4, 3023, 67, 13, 11134, 1, 4, 7, 26410, 15235, 11, 259, 10379, 268, 4494, 4008, 198, 220, 220, 458, 83, 13, 19836, 3419, 198, 220, 198, 1303, 17174, 2466, 1174, 198, 1303, 220, 14701, 14837, 220, 198, 1303, 17174, 2466, 1174, 220, 198, 1303, 331, 83, 9743, 288, 58, 77, 87, 11, 3281, 11, 27305, 60, 2427, 288, 58, 27305, 11, 3281, 11, 27305, 4357, 523, 356, 27179, 1758, 1366, 2174, 198, 347, 28, 37659, 13, 21084, 22704, 7, 403, 312, 1045, 11, 17, 11, 15, 8, 198, 555, 312, 1045, 28, 37659, 13, 21084, 22704, 7, 33, 11, 16, 12095, 16, 8, 198, 1303, 35474, 329, 9489, 331, 83, 12, 13287, 278, 198, 5072, 34345, 796, 36521, 82, 14, 10396, 918, 4, 3023, 67, 1, 4064, 357, 26410, 15235, 11, 259, 10379, 268, 4494, 8, 198, 331, 83, 13287, 278, 13, 31715, 45819, 7, 8043, 7784, 11, 28703, 1586, 32180, 11, 5072, 34345, 11, 2124, 16, 11, 87, 17, 11, 87, 18, 11, 403, 312, 1045, 11, 7841, 2983, 8, 628, 1303, 17174, 2466, 1174, 198, 1303, 15768, 5668, 329, 1226, 268, 4494, 198, 1303, 17174, 2466, 1174, 198, 3601, 7203, 4211, 9220, 25, 4064, 67, 32983, 0, 34550, 3228, 2474, 4, 259, 10379, 268, 4494, 8, 198, 198, 11338, 796, 640, 270, 13, 12286, 62, 45016, 3419, 198, 31391, 13, 41006, 9771, 14902, 7, 9688, 11, 2245, 8, 198, 4798, 7203, 4211, 32983, 0, 34550, 3228, 2474, 8, 198, 4798, 7, 5377, 24547, 8, 198, 29113, 7804, 198, 2, 23412, 1366, 2393, 1388, 9052, 5645, 198, 29113, 7804, 198 ]
2.783093
2,153
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.serialization import Model class ClusterCreateParameters(Model): """Parameters supplied to the Create operation. :param location: The region in which to create the cluster. :type location: str :param tags: The user specified tags associated with the Cluster. :type tags: dict :param vm_size: The size of the virtual machines in the cluster. All virtual machines in a cluster are the same size. For information about available VM sizes for clusters using images from the Virtual Machines Marketplace (see Sizes for Virtual Machines (Linux) or Sizes for Virtual Machines (Windows). Batch AI service supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). :type vm_size: str :param vm_priority: dedicated or lowpriority. Default is dedicated. Possible values include: 'dedicated', 'lowpriority'. Default value: "dedicated" . :type vm_priority: str or :class:`VmPriority <azure.mgmt.batchai.models.VmPriority>` :param scale_settings: Desired scale for the cluster. :type scale_settings: :class:`ScaleSettings <azure.mgmt.batchai.models.ScaleSettings>` :param virtual_machine_configuration: Settings for OS image and mounted data volumes. :type virtual_machine_configuration: :class:`VirtualMachineConfiguration <azure.mgmt.batchai.models.VirtualMachineConfiguration>` :param node_setup: Setup to be done on all compute nodes in the cluster. :type node_setup: :class:`NodeSetup <azure.mgmt.batchai.models.NodeSetup>` :param user_account_settings: Settings for user account that will be created on all compute nodes of the cluster. :type user_account_settings: :class:`UserAccountSettings <azure.mgmt.batchai.models.UserAccountSettings>` :param subnet: Specifies the identifier of the subnet. . :type subnet: :class:`ResourceId <azure.mgmt.batchai.models.ResourceId>` """ _validation = { 'location': {'required': True}, 'vm_size': {'required': True}, 'user_account_settings': {'required': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, 'vm_priority': {'key': 'properties.vmPriority', 'type': 'VmPriority'}, 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, 'virtual_machine_configuration': {'key': 'properties.virtualMachineConfiguration', 'type': 'VirtualMachineConfiguration'}, 'node_setup': {'key': 'properties.nodeSetup', 'type': 'NodeSetup'}, 'user_account_settings': {'key': 'properties.userAccountSettings', 'type': 'UserAccountSettings'}, 'subnet': {'key': 'properties.subnet', 'type': 'ResourceId'}, }
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 13, 198, 2, 19179, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611, 262, 2438, 318, 198, 2, 16935, 515, 13, 198, 2, 16529, 35937, 198, 198, 6738, 13845, 2118, 13, 46911, 1634, 1330, 9104, 628, 198, 4871, 38279, 16447, 48944, 7, 17633, 2599, 198, 220, 220, 220, 37227, 48944, 14275, 284, 262, 13610, 4905, 13, 628, 220, 220, 220, 1058, 17143, 4067, 25, 383, 3814, 287, 543, 284, 2251, 262, 13946, 13, 198, 220, 220, 220, 1058, 4906, 4067, 25, 965, 198, 220, 220, 220, 1058, 17143, 15940, 25, 383, 2836, 7368, 15940, 3917, 351, 262, 38279, 13, 198, 220, 220, 220, 1058, 4906, 15940, 25, 8633, 198, 220, 220, 220, 1058, 17143, 45887, 62, 7857, 25, 383, 2546, 286, 262, 7166, 8217, 287, 262, 13946, 13, 1439, 198, 220, 220, 220, 220, 7166, 8217, 287, 257, 13946, 389, 262, 976, 2546, 13, 1114, 1321, 546, 198, 220, 220, 220, 220, 1695, 16990, 10620, 329, 23163, 1262, 4263, 422, 262, 15595, 31182, 198, 220, 220, 220, 220, 36703, 357, 3826, 311, 4340, 329, 15595, 31182, 357, 19314, 8, 393, 311, 4340, 329, 15595, 198, 220, 220, 220, 220, 31182, 357, 11209, 737, 347, 963, 9552, 2139, 6971, 477, 22134, 16990, 10620, 2845, 198, 220, 220, 220, 220, 49053, 9795, 62, 32, 15, 290, 883, 351, 8683, 6143, 357, 2257, 6981, 9795, 62, 14313, 11, 49053, 9795, 62, 5258, 11, 290, 198, 220, 220, 220, 220, 49053, 9795, 62, 5258, 53, 17, 2168, 737, 198, 220, 220, 220, 1058, 4906, 45887, 62, 7857, 25, 965, 198, 220, 220, 220, 1058, 17143, 45887, 62, 49336, 25, 7256, 393, 1877, 49336, 13, 15161, 318, 7256, 13, 198, 220, 220, 220, 220, 33671, 3815, 2291, 25, 705, 9395, 3474, 3256, 705, 9319, 49336, 4458, 15161, 1988, 25, 198, 220, 220, 220, 220, 366, 9395, 3474, 1, 764, 198, 220, 220, 220, 1058, 4906, 45887, 62, 49336, 25, 965, 393, 1058, 4871, 25, 63, 53, 76, 22442, 414, 198, 220, 220, 220, 220, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 53, 76, 22442, 414, 29, 63, 198, 220, 220, 220, 1058, 17143, 5046, 62, 33692, 25, 2935, 1202, 5046, 329, 262, 13946, 13, 198, 220, 220, 220, 1058, 4906, 5046, 62, 33692, 25, 1058, 4871, 25, 63, 29990, 26232, 198, 220, 220, 220, 220, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 29990, 26232, 29, 63, 198, 220, 220, 220, 1058, 17143, 7166, 62, 30243, 62, 11250, 3924, 25, 16163, 329, 7294, 2939, 290, 12623, 198, 220, 220, 220, 220, 1366, 15343, 13, 198, 220, 220, 220, 1058, 4906, 7166, 62, 30243, 62, 11250, 3924, 25, 1058, 4871, 25, 63, 37725, 37573, 38149, 198, 220, 220, 220, 220, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 37725, 37573, 38149, 29, 63, 198, 220, 220, 220, 1058, 17143, 10139, 62, 40406, 25, 31122, 284, 307, 1760, 319, 477, 24061, 13760, 287, 262, 13946, 13, 198, 220, 220, 220, 1058, 4906, 10139, 62, 40406, 25, 1058, 4871, 25, 63, 19667, 40786, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 19667, 40786, 29, 63, 198, 220, 220, 220, 1058, 17143, 2836, 62, 23317, 62, 33692, 25, 16163, 329, 2836, 1848, 326, 481, 307, 198, 220, 220, 220, 220, 2727, 319, 477, 24061, 13760, 286, 262, 13946, 13, 198, 220, 220, 220, 1058, 4906, 2836, 62, 23317, 62, 33692, 25, 1058, 4871, 25, 63, 12982, 30116, 26232, 198, 220, 220, 220, 220, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 12982, 30116, 26232, 29, 63, 198, 220, 220, 220, 1058, 17143, 850, 3262, 25, 18291, 6945, 262, 27421, 286, 262, 850, 3262, 13, 764, 198, 220, 220, 220, 1058, 4906, 850, 3262, 25, 1058, 4871, 25, 63, 26198, 7390, 1279, 1031, 495, 13, 11296, 16762, 13, 43501, 1872, 13, 27530, 13, 26198, 7390, 29, 63, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 4808, 12102, 341, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 24886, 10354, 1391, 6, 35827, 10354, 6407, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 14761, 62, 7857, 10354, 1391, 6, 35827, 10354, 6407, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7220, 62, 23317, 62, 33692, 10354, 1391, 6, 35827, 10354, 6407, 5512, 198, 220, 220, 220, 1782, 628, 220, 220, 220, 4808, 42348, 62, 8899, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 24886, 10354, 1391, 6, 2539, 10354, 705, 24886, 3256, 705, 4906, 10354, 705, 2536, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 31499, 10354, 1391, 6, 2539, 10354, 705, 31499, 3256, 705, 4906, 10354, 705, 90, 2536, 92, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 14761, 62, 7857, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 14761, 10699, 3256, 705, 4906, 10354, 705, 2536, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 14761, 62, 49336, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 14761, 22442, 414, 3256, 705, 4906, 10354, 705, 53, 76, 22442, 414, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 9888, 62, 33692, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 9888, 26232, 3256, 705, 4906, 10354, 705, 29990, 26232, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 32844, 62, 30243, 62, 11250, 3924, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 32844, 37573, 38149, 3256, 705, 4906, 10354, 705, 37725, 37573, 38149, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 17440, 62, 40406, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 17440, 40786, 3256, 705, 4906, 10354, 705, 19667, 40786, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7220, 62, 23317, 62, 33692, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 7220, 30116, 26232, 3256, 705, 4906, 10354, 705, 12982, 30116, 26232, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7266, 3262, 10354, 1391, 6, 2539, 10354, 705, 48310, 13, 7266, 3262, 3256, 705, 4906, 10354, 705, 26198, 7390, 6, 5512, 198, 220, 220, 220, 1782, 198 ]
3.142725
1,079
# -*- coding: utf-8 -*- # @Time : 2021/4/6 下午8:51 # @Author : 司云中 # @File : manage_carousel_api.py # @Software: Pycharm from rest_framework.response import Response from Emall.base_api import BackendGenericApiView from Emall.decorator import validate_url_data from Emall.response_code import response_code, DELETE_CAROUSEL, ADD_CAROUSEL from manager_app.serializers.carousel_serializers import ManagerCarouselSerializer,DeleteCarouselSerializer class ManageCarouselApiView(BackendGenericApiView): """管理员管理轮播图API""" serializer_class = ManagerCarouselSerializer serializer_delete_class = DeleteCarouselSerializer def post(self, request): """增加轮播图""" super().post(request) return Response(response_code.result(ADD_CAROUSEL, '添加成功')) def delete(self, request): """删除轮播图""" rows = super().delete(request) print(rows) return Response(response_code.result(DELETE_CAROUSEL, '删除成功' if rows > 0 else '无数据操作')) @validate_url_data('carousel', 'pk') def put(self, request): """修改轮播图""" serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) rows = serializer.modify() return Response(response_code.result(DELETE_CAROUSEL, '修改成功' if rows > 0 else '无数据操作')) @validate_url_data('carousel', 'pk', null=True) def get(self, request): """获取全部轮播图""" return super().get(request)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 1058, 33448, 14, 19, 14, 21, 220, 10310, 233, 39355, 230, 23, 25, 4349, 198, 2, 2488, 13838, 1058, 10263, 237, 116, 12859, 239, 40792, 198, 2, 2488, 8979, 1058, 6687, 62, 7718, 48355, 62, 15042, 13, 9078, 198, 2, 2488, 25423, 25, 9485, 354, 1670, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 6738, 2295, 439, 13, 8692, 62, 15042, 1330, 5157, 437, 46189, 32, 14415, 7680, 198, 6738, 2295, 439, 13, 12501, 273, 1352, 1330, 26571, 62, 6371, 62, 7890, 198, 6738, 2295, 439, 13, 26209, 62, 8189, 1330, 2882, 62, 8189, 11, 5550, 2538, 9328, 62, 20034, 20958, 3698, 11, 27841, 62, 20034, 20958, 3698, 198, 6738, 4706, 62, 1324, 13, 46911, 11341, 13, 7718, 48355, 62, 46911, 11341, 1330, 9142, 9914, 48355, 32634, 7509, 11, 38727, 9914, 48355, 32634, 7509, 628, 198, 4871, 1869, 496, 9914, 48355, 32, 14415, 7680, 7, 7282, 437, 46189, 32, 14415, 7680, 2599, 198, 220, 220, 220, 37227, 163, 106, 94, 49426, 228, 37772, 246, 163, 106, 94, 49426, 228, 164, 121, 106, 162, 240, 255, 32368, 122, 17614, 37811, 628, 220, 220, 220, 11389, 7509, 62, 4871, 796, 9142, 9914, 48355, 32634, 7509, 628, 220, 220, 220, 11389, 7509, 62, 33678, 62, 4871, 796, 23520, 9914, 48355, 32634, 7509, 628, 220, 220, 220, 825, 1281, 7, 944, 11, 2581, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 161, 95, 252, 27950, 254, 164, 121, 106, 162, 240, 255, 32368, 122, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 22446, 7353, 7, 25927, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 18261, 7, 26209, 62, 8189, 13, 20274, 7, 29266, 62, 20034, 20958, 3698, 11, 705, 162, 115, 119, 27950, 254, 22755, 238, 27950, 253, 6, 4008, 628, 220, 220, 220, 825, 12233, 7, 944, 11, 2581, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 26344, 254, 165, 247, 97, 164, 121, 106, 162, 240, 255, 32368, 122, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 15274, 796, 2208, 22446, 33678, 7, 25927, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 8516, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 18261, 7, 26209, 62, 8189, 13, 20274, 7, 7206, 2538, 9328, 62, 20034, 20958, 3698, 11, 705, 26344, 254, 165, 247, 97, 22755, 238, 27950, 253, 6, 611, 15274, 1875, 657, 2073, 705, 33768, 254, 46763, 108, 162, 235, 106, 162, 241, 235, 43291, 6, 4008, 628, 220, 220, 220, 2488, 12102, 378, 62, 6371, 62, 7890, 10786, 7718, 48355, 3256, 705, 79, 74, 11537, 198, 220, 220, 220, 825, 1234, 7, 944, 11, 2581, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 46479, 106, 162, 242, 117, 164, 121, 106, 162, 240, 255, 32368, 122, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 11389, 7509, 796, 2116, 13, 1136, 62, 46911, 7509, 7, 7890, 28, 25927, 13, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 11389, 7509, 13, 271, 62, 12102, 7, 40225, 62, 1069, 4516, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15274, 796, 11389, 7509, 13, 4666, 1958, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 18261, 7, 26209, 62, 8189, 13, 20274, 7, 7206, 2538, 9328, 62, 20034, 20958, 3698, 11, 705, 46479, 106, 162, 242, 117, 22755, 238, 27950, 253, 6, 611, 15274, 1875, 657, 2073, 705, 33768, 254, 46763, 108, 162, 235, 106, 162, 241, 235, 43291, 6, 4008, 628, 220, 220, 220, 2488, 12102, 378, 62, 6371, 62, 7890, 10786, 7718, 48355, 3256, 705, 79, 74, 3256, 9242, 28, 17821, 8, 198, 220, 220, 220, 825, 651, 7, 944, 11, 2581, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 164, 236, 115, 20998, 244, 17739, 101, 32849, 101, 164, 121, 106, 162, 240, 255, 32368, 122, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2208, 22446, 1136, 7, 25927, 8, 628, 628 ]
2.148968
678
from django.test import TestCase from django_tally.data.models import Data from django_tally.user_def.lang import parse from django_tally.user_def.lang.json import encode from django_tally.user_def.models import UserDefTemplate from .testapp.models import Foo AGGREGATE_PARAMS = { 'required': ['get_tally', 'add', 'sub'], 'optional': [ 'base', 'get_value', 'get_nonexisting_value', 'filter_value', 'transform', 'get_group', ], } AGGREGATE_TEMPLATE = list(parse(""" (do (def agg_base '(do (defn agg_sub [tally value] (unquote sub)) (defn agg_add [tally value] (unquote add)) (defn agg_trans [value] (unquote (if (def? transform) transform 'value))))) (if (def? base) (def agg_base (cat '(do (unquote base)) (slice agg_base 1 null)))) (def res #{ 'base agg_base 'handle_change '(-> tally (agg_sub (agg_trans old_value)) (agg_add (agg_trans new_value)))}) (for key [ 'get_tally 'get_value 'get_nonexisting_value 'filter_value 'get_group] (if (eval '(def? (unquote key))) (put res key (eval key)))) res) """))[0] SUM_PARAMS = {'optional': AGGREGATE_PARAMS['optional']} SUM_TEMPLATE = list(parse("""(do (def res #{ 'get_tally '0 'add '(+ tally value) 'sub '(- tally value)}) (for key [ 'base 'get_value 'get_nonexisting_value 'filter_value 'get_group] (if (eval '(def? (unquote key))) (put res key (eval key)))) res) """))[0]
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 42625, 14208, 62, 83, 453, 13, 7890, 13, 27530, 1330, 6060, 198, 6738, 42625, 14208, 62, 83, 453, 13, 7220, 62, 4299, 13, 17204, 1330, 21136, 198, 6738, 42625, 14208, 62, 83, 453, 13, 7220, 62, 4299, 13, 17204, 13, 17752, 1330, 37773, 198, 6738, 42625, 14208, 62, 83, 453, 13, 7220, 62, 4299, 13, 27530, 1330, 11787, 7469, 30800, 198, 198, 6738, 764, 9288, 1324, 13, 27530, 1330, 36080, 628, 198, 4760, 28934, 38, 6158, 62, 27082, 40834, 796, 1391, 198, 220, 220, 220, 705, 35827, 10354, 37250, 1136, 62, 83, 453, 3256, 705, 2860, 3256, 705, 7266, 6, 4357, 198, 220, 220, 220, 705, 25968, 10354, 685, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8692, 3256, 705, 1136, 62, 8367, 3256, 705, 1136, 62, 23108, 87, 9665, 62, 8367, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 24455, 62, 8367, 3256, 705, 35636, 3256, 705, 1136, 62, 8094, 3256, 198, 220, 220, 220, 16589, 198, 92, 198, 4760, 28934, 38, 6158, 62, 51, 3620, 6489, 6158, 796, 1351, 7, 29572, 7203, 15931, 198, 7, 4598, 198, 220, 357, 4299, 4194, 62, 8692, 29513, 4598, 198, 220, 220, 220, 357, 4299, 77, 4194, 62, 7266, 685, 83, 453, 1988, 60, 198, 220, 220, 220, 220, 220, 357, 403, 22708, 850, 4008, 628, 220, 220, 220, 357, 4299, 77, 4194, 62, 2860, 685, 83, 453, 1988, 60, 198, 220, 220, 220, 220, 220, 357, 403, 22708, 751, 4008, 628, 220, 220, 220, 357, 4299, 77, 4194, 62, 7645, 685, 8367, 60, 198, 220, 220, 220, 220, 220, 357, 403, 22708, 357, 361, 357, 4299, 30, 6121, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6121, 198, 220, 220, 220, 220, 220, 220, 220, 705, 8367, 4008, 22305, 628, 220, 357, 361, 357, 4299, 30, 2779, 8, 198, 220, 220, 220, 357, 4299, 4194, 62, 8692, 357, 9246, 198, 220, 220, 220, 220, 220, 29513, 4598, 357, 403, 22708, 2779, 4008, 198, 220, 220, 220, 220, 220, 357, 48369, 4194, 62, 8692, 352, 9242, 35514, 628, 220, 357, 4299, 581, 1303, 90, 198, 220, 220, 220, 705, 8692, 198, 220, 220, 220, 220, 220, 4194, 62, 8692, 628, 220, 220, 220, 705, 28144, 62, 3803, 198, 220, 220, 220, 220, 220, 29513, 3784, 26767, 198, 220, 220, 220, 220, 220, 220, 220, 357, 9460, 62, 7266, 357, 9460, 62, 7645, 1468, 62, 8367, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 357, 9460, 62, 2860, 357, 9460, 62, 7645, 649, 62, 8367, 22305, 30072, 628, 220, 357, 1640, 1994, 685, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 83, 453, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 23108, 87, 9665, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 24455, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 8094, 60, 198, 220, 220, 220, 357, 361, 357, 18206, 29513, 4299, 30, 357, 403, 22708, 1994, 22305, 198, 220, 220, 220, 220, 220, 357, 1996, 581, 1994, 357, 18206, 1994, 35514, 628, 220, 581, 8, 198, 37811, 4008, 58, 15, 60, 198, 198, 50, 5883, 62, 27082, 40834, 796, 1391, 6, 25968, 10354, 317, 11190, 31553, 6158, 62, 27082, 40834, 17816, 25968, 20520, 92, 198, 50, 5883, 62, 51, 3620, 6489, 6158, 796, 1351, 7, 29572, 7203, 15931, 7, 4598, 198, 220, 357, 4299, 581, 1303, 90, 198, 220, 220, 220, 705, 1136, 62, 83, 453, 705, 15, 198, 220, 220, 220, 705, 2860, 29513, 10, 26767, 1988, 8, 198, 220, 220, 220, 705, 7266, 29513, 12, 26767, 1988, 8, 30072, 628, 220, 357, 1640, 1994, 685, 198, 220, 220, 220, 220, 220, 705, 8692, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 23108, 87, 9665, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 24455, 62, 8367, 198, 220, 220, 220, 220, 220, 705, 1136, 62, 8094, 60, 198, 220, 220, 220, 357, 361, 357, 18206, 29513, 4299, 30, 357, 403, 22708, 1994, 22305, 198, 220, 220, 220, 220, 220, 357, 1996, 581, 1994, 357, 18206, 1994, 35514, 628, 220, 581, 8, 198, 37811, 4008, 58, 15, 60, 628 ]
2.205056
712
# -*- coding: utf-8 -*- """ Created on Sat May 23 12:02:26 2020 @author: Chung """ import numpy as np import pandas as pd from sklearn import svm import sys import argparse from sklearn.linear_model import Perceptron from sklearn.preprocessing import OneHotEncoder import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.ensemble import GradientBoostingRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LinearRegression #from sklearn.ensemble import VotingRegressor from itertools import combinations_with_replacement from itertools import permutations from sklearn.metrics import mean_squared_error from sklearn.ensemble import RandomForestClassifier import xgboost as xgb import matplotlib.pyplot as plt from sklearn.preprocessing import OneHotEncoder #####args.input.name = 'example_data/Processed_IDT_ASO_Data' #sys.argv = ['RF.py', '../example_data/Processed_IDT_ASO_Data'] sys.argv = ['RF.py', '../example_data/Mockup_UltimateDataSet.csv'] args = parse_args() ASO_score_data = get_input_file() #####build location info features location_info = ASO_score_data["ASOseq"].apply(lambda x: one_hot(split(x))) location_info = location_info.apply(lambda l: [item for sublist in l for item in sublist]) #build gene info features structure_features = [] for i in range(len(ASO_score_data.columns)): if ASO_score_data.columns[i].find('RNAstructScore') !=-1: structure_features.append(ASO_score_data.columns[i]) #build structure info features gene_pool = list(set(ASO_score_data["GeneID"]))[1:] gene_info = ASO_score_data["GeneID"].apply(lambda x: one_hot_gene(x, gene_pool)) #####build kmers(2-5 mer) features symbol_2mers = get_kmers(2) symbol_3mers = get_kmers(3) symbol_4mers = get_kmers(4) symbol_5mers = get_kmers(5) features_2mer = get_features(ASO_score_data["ASOseq"], symbol_2mers) features_3mer = get_features(ASO_score_data["ASOseq"], symbol_3mers) features_4mer = get_features(ASO_score_data["ASOseq"], symbol_4mers) features_5mer = get_features(ASO_score_data["ASOseq"], symbol_5mers) #####construct X X = location_info.to_list() X = combine_features(X, gene_info.to_list()) X = combine_features(X, features_2mer) X = combine_features(X, features_3mer) X = combine_features(X, features_4mer) X = combine_features(X, features_5mer) X = combine_features(X, ASO_score_data["chr"].to_list()) X = combine_features(X, ASO_score_data["AtoIeditingScore1"].to_list()) X = combine_features(X, ASO_score_data["RBPscore1"].to_list()) for i in range(len(structure_features)): X = combine_features(X, ASO_score_data[structure_features[i]].to_list()) #####construct Y Y = ASO_score_data["ASOeffective"] #####constrcut feature names ATCG_identity = ['A','C','G','T'] features = ["1"]*4*22 for i in range(len(features)): base = i%4 features[i] = 'if position ' + str(i//4) +' is ' + ATCG_identity[base] #features = features + gene_pool + symbol_2mers + symbol_3mers features = features + gene_pool + symbol_2mers + symbol_3mers +symbol_4mers + symbol_5mers\ + ['chr', "AtoIeditingScore1", "RBPscore1"] + structure_features features = np.array(features) #####split test/train X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2, random_state=0) X_train = np.array(X_train) X_test = np.array(X_test) Y_train = np.array(Y_train) Y_test = np.array(Y_test) #####training model tfbs_classifier = RandomForestRegressor(n_estimators=100) tfbs_classifier.fit(X_train, Y_train) Y_pred = tfbs_classifier.predict(X_test) #####evaluate the model error = mean_squared_error(Y_test, Y_pred) print('mean_squared_error: ', error) #####analyze the importance of each feature importances = tfbs_classifier.feature_importances_ std = np.std([tree.feature_importances_ for tree in tfbs_classifier.estimators_], axis=0) indices = np.argsort(importances) indices = indices[-50:] print("Feature ranking:") for f in range(len(indices)): print("%d. feature %s (%f)" % (f + 1, features[indices[f]], importances[indices[f]])) ##### Plot feature importance fig, ax = plt.subplots(figsize=(15,15)) plt.title("Feature importances") #ax.barh(range(len(indices)), importances[indices], color="r", xerr=std[indices], align="center") ax.barh(range(len(indices)), importances[indices], color="r", align="center") ax.set_yticks(range(len(indices))) ax.set_yticklabels(features[indices]) fig.savefig('../figure/feature_importance.png', bbox_inches='tight', dpi=200) #plt.show() ''' #visual inspection to the predicted data plt.plot(Y_test, Y_pred, '.') plt.xlabel('Real RNA effective') plt.show() '''
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 1737, 2242, 1105, 25, 2999, 25, 2075, 12131, 198, 198, 31, 9800, 25, 43915, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 264, 14761, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 2448, 984, 1313, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 17701, 1153, 45686, 278, 8081, 44292, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 8081, 44292, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 2, 6738, 1341, 35720, 13, 1072, 11306, 1330, 30061, 8081, 44292, 198, 198, 6738, 340, 861, 10141, 1330, 17790, 62, 4480, 62, 35666, 5592, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 1612, 62, 16485, 1144, 62, 18224, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 9487, 7483, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 628, 198, 198, 4242, 2, 22046, 13, 15414, 13, 3672, 796, 705, 20688, 62, 7890, 14, 18709, 276, 62, 2389, 51, 62, 1921, 46, 62, 6601, 6, 198, 2, 17597, 13, 853, 85, 796, 37250, 32754, 13, 9078, 3256, 705, 40720, 20688, 62, 7890, 14, 18709, 276, 62, 2389, 51, 62, 1921, 46, 62, 6601, 20520, 198, 17597, 13, 853, 85, 796, 37250, 32754, 13, 9078, 3256, 705, 40720, 20688, 62, 7890, 14, 44, 735, 929, 62, 47892, 6601, 7248, 13, 40664, 20520, 198, 22046, 796, 21136, 62, 22046, 3419, 198, 1921, 46, 62, 26675, 62, 7890, 796, 651, 62, 15414, 62, 7753, 3419, 198, 198, 4242, 2, 11249, 4067, 7508, 3033, 198, 24886, 62, 10951, 796, 7054, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 41068, 1, 4083, 39014, 7, 50033, 2124, 25, 530, 62, 8940, 7, 35312, 7, 87, 22305, 198, 24886, 62, 10951, 796, 4067, 62, 10951, 13, 39014, 7, 50033, 300, 25, 685, 9186, 329, 850, 4868, 287, 300, 329, 2378, 287, 850, 4868, 12962, 198, 198, 2, 11249, 9779, 7508, 3033, 198, 301, 5620, 62, 40890, 796, 17635, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 1921, 46, 62, 26675, 62, 7890, 13, 28665, 82, 8, 2599, 198, 220, 220, 220, 611, 7054, 46, 62, 26675, 62, 7890, 13, 28665, 82, 58, 72, 4083, 19796, 10786, 27204, 7249, 26595, 11537, 5145, 10779, 16, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4645, 62, 40890, 13, 33295, 7, 1921, 46, 62, 26675, 62, 7890, 13, 28665, 82, 58, 72, 12962, 198, 198, 2, 11249, 4645, 7508, 3033, 198, 70, 1734, 62, 7742, 796, 1351, 7, 2617, 7, 1921, 46, 62, 26675, 62, 7890, 14692, 39358, 2389, 8973, 4008, 58, 16, 47715, 198, 70, 1734, 62, 10951, 796, 7054, 46, 62, 26675, 62, 7890, 14692, 39358, 2389, 1, 4083, 39014, 7, 50033, 2124, 25, 530, 62, 8940, 62, 70, 1734, 7, 87, 11, 9779, 62, 7742, 4008, 198, 198, 4242, 2, 11249, 10571, 364, 7, 17, 12, 20, 4017, 8, 3033, 198, 1837, 23650, 62, 17, 11056, 796, 651, 62, 74, 11056, 7, 17, 8, 198, 1837, 23650, 62, 18, 11056, 796, 651, 62, 74, 11056, 7, 18, 8, 198, 1837, 23650, 62, 19, 11056, 796, 651, 62, 74, 11056, 7, 19, 8, 198, 1837, 23650, 62, 20, 11056, 796, 651, 62, 74, 11056, 7, 20, 8, 198, 40890, 62, 17, 647, 796, 651, 62, 40890, 7, 1921, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 41068, 33116, 6194, 62, 17, 11056, 8, 198, 40890, 62, 18, 647, 796, 651, 62, 40890, 7, 1921, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 41068, 33116, 6194, 62, 18, 11056, 8, 198, 40890, 62, 19, 647, 796, 651, 62, 40890, 7, 1921, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 41068, 33116, 6194, 62, 19, 11056, 8, 198, 40890, 62, 20, 647, 796, 651, 62, 40890, 7, 1921, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 41068, 33116, 6194, 62, 20, 11056, 8, 198, 198, 4242, 2, 41571, 1395, 198, 55, 796, 4067, 62, 10951, 13, 1462, 62, 4868, 3419, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 9779, 62, 10951, 13, 1462, 62, 4868, 28955, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 3033, 62, 17, 647, 8, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 3033, 62, 18, 647, 8, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 3033, 62, 19, 647, 8, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 3033, 62, 20, 647, 8, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 7054, 46, 62, 26675, 62, 7890, 14692, 354, 81, 1, 4083, 1462, 62, 4868, 28955, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 7054, 46, 62, 26675, 62, 7890, 14692, 32, 1462, 40, 276, 1780, 26595, 16, 1, 4083, 1462, 62, 4868, 28955, 198, 55, 796, 12082, 62, 40890, 7, 55, 11, 7054, 46, 62, 26675, 62, 7890, 14692, 49, 20866, 26675, 16, 1, 4083, 1462, 62, 4868, 28955, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 301, 5620, 62, 40890, 8, 2599, 198, 220, 220, 220, 1395, 796, 12082, 62, 40890, 7, 55, 11, 7054, 46, 62, 26675, 62, 7890, 58, 301, 5620, 62, 40890, 58, 72, 60, 4083, 1462, 62, 4868, 28955, 198, 198, 4242, 2, 41571, 575, 198, 56, 796, 7054, 46, 62, 26675, 62, 7890, 14692, 1921, 46, 16803, 8973, 198, 198, 4242, 2, 1102, 2536, 8968, 3895, 3891, 198, 1404, 39816, 62, 738, 414, 796, 37250, 32, 41707, 34, 41707, 38, 41707, 51, 20520, 198, 40890, 796, 14631, 16, 8973, 9, 19, 9, 1828, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 40890, 8, 2599, 198, 220, 220, 220, 2779, 796, 1312, 4, 19, 198, 220, 220, 220, 3033, 58, 72, 60, 796, 705, 361, 2292, 705, 1343, 965, 7, 72, 1003, 19, 8, 1343, 6, 318, 705, 1343, 317, 4825, 38, 62, 738, 414, 58, 8692, 60, 198, 198, 2, 40890, 796, 3033, 1343, 9779, 62, 7742, 1343, 6194, 62, 17, 11056, 1343, 6194, 62, 18, 11056, 198, 40890, 796, 3033, 1343, 9779, 62, 7742, 1343, 6194, 62, 17, 11056, 1343, 6194, 62, 18, 11056, 1343, 1837, 23650, 62, 19, 11056, 1343, 6194, 62, 20, 11056, 59, 198, 220, 220, 220, 1343, 37250, 354, 81, 3256, 366, 32, 1462, 40, 276, 1780, 26595, 16, 1600, 366, 49, 20866, 26675, 16, 8973, 1343, 4645, 62, 40890, 198, 40890, 796, 45941, 13, 18747, 7, 40890, 8, 198, 198, 4242, 2, 35312, 1332, 14, 27432, 198, 55, 62, 27432, 11, 1395, 62, 9288, 11, 575, 62, 27432, 11, 575, 62, 9288, 796, 4512, 62, 9288, 62, 35312, 7, 55, 11, 575, 11, 1332, 62, 7857, 28, 15, 13, 17, 11, 4738, 62, 5219, 28, 15, 8, 198, 55, 62, 27432, 796, 45941, 13, 18747, 7, 55, 62, 27432, 8, 198, 55, 62, 9288, 796, 45941, 13, 18747, 7, 55, 62, 9288, 8, 198, 56, 62, 27432, 796, 45941, 13, 18747, 7, 56, 62, 27432, 8, 198, 56, 62, 9288, 796, 45941, 13, 18747, 7, 56, 62, 9288, 8, 198, 198, 4242, 2, 34409, 2746, 198, 27110, 1443, 62, 4871, 7483, 796, 14534, 34605, 8081, 44292, 7, 77, 62, 395, 320, 2024, 28, 3064, 8, 198, 27110, 1443, 62, 4871, 7483, 13, 11147, 7, 55, 62, 27432, 11, 575, 62, 27432, 8, 198, 56, 62, 28764, 796, 48700, 1443, 62, 4871, 7483, 13, 79, 17407, 7, 55, 62, 9288, 8, 198, 198, 4242, 2, 49786, 262, 2746, 198, 18224, 796, 1612, 62, 16485, 1144, 62, 18224, 7, 56, 62, 9288, 11, 575, 62, 28764, 8, 198, 4798, 10786, 32604, 62, 16485, 1144, 62, 18224, 25, 46083, 4049, 8, 628, 198, 4242, 2, 38200, 2736, 262, 6817, 286, 1123, 3895, 198, 11748, 1817, 796, 48700, 1443, 62, 4871, 7483, 13, 30053, 62, 11748, 1817, 62, 198, 19282, 796, 45941, 13, 19282, 26933, 21048, 13, 30053, 62, 11748, 1817, 62, 329, 5509, 287, 48700, 1443, 62, 4871, 7483, 13, 395, 320, 2024, 62, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16488, 28, 15, 8, 198, 521, 1063, 796, 45941, 13, 22046, 419, 7, 11748, 1817, 8, 198, 521, 1063, 796, 36525, 58, 12, 1120, 47715, 198, 4798, 7203, 38816, 12759, 25, 4943, 198, 1640, 277, 287, 2837, 7, 11925, 7, 521, 1063, 8, 2599, 198, 220, 220, 220, 3601, 7203, 4, 67, 13, 3895, 4064, 82, 37633, 69, 16725, 4064, 357, 69, 1343, 352, 11, 3033, 58, 521, 1063, 58, 69, 60, 4357, 1330, 1817, 58, 521, 1063, 58, 69, 11907, 4008, 198, 198, 4242, 2, 28114, 3895, 6817, 198, 5647, 11, 7877, 796, 458, 83, 13, 7266, 489, 1747, 7, 5647, 7857, 16193, 1314, 11, 1314, 4008, 198, 489, 83, 13, 7839, 7203, 38816, 1330, 1817, 4943, 198, 2, 897, 13, 5657, 71, 7, 9521, 7, 11925, 7, 521, 1063, 36911, 1330, 1817, 58, 521, 1063, 4357, 3124, 2625, 81, 1600, 2124, 8056, 28, 19282, 58, 521, 1063, 4357, 10548, 2625, 16159, 4943, 198, 897, 13, 5657, 71, 7, 9521, 7, 11925, 7, 521, 1063, 36911, 1330, 1817, 58, 521, 1063, 4357, 3124, 2625, 81, 1600, 10548, 2625, 16159, 4943, 198, 897, 13, 2617, 62, 20760, 3378, 7, 9521, 7, 11925, 7, 521, 1063, 22305, 198, 897, 13, 2617, 62, 20760, 624, 23912, 1424, 7, 40890, 58, 521, 1063, 12962, 198, 5647, 13, 21928, 5647, 10786, 40720, 26875, 14, 30053, 62, 11748, 590, 13, 11134, 3256, 275, 3524, 62, 45457, 11639, 33464, 3256, 288, 14415, 28, 2167, 8, 198, 2, 489, 83, 13, 12860, 3419, 198, 198, 7061, 6, 198, 2, 41464, 15210, 284, 262, 11001, 1366, 198, 489, 83, 13, 29487, 7, 56, 62, 9288, 11, 575, 62, 28764, 11, 705, 2637, 8, 198, 489, 83, 13, 87, 18242, 10786, 15633, 25897, 4050, 11537, 198, 489, 83, 13, 12860, 3419, 198, 7061, 6 ]
2.709016
1,708
from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.contrib.auth.models import AnonymousUser from django.core.urlresolvers import reverse from django.test import RequestFactory from tally_ho.apps.tally.views import quality_control as views from tally_ho.apps.tally.models.quality_control import QualityControl from tally_ho.apps.tally.models.result_form import ResultForm from tally_ho.libs.models.enums.form_state import FormState from tally_ho.libs.permissions import groups from tally_ho.libs.tests.test_base import create_candidates,\ create_reconciliation_form, create_recon_forms, create_result_form,\ create_center, create_station, TestBase
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 2448, 3411, 21306, 798, 11, 31922, 6243, 32180, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 19390, 22810, 198, 198, 6738, 26767, 62, 8873, 13, 18211, 13, 83, 453, 13, 33571, 1330, 3081, 62, 13716, 355, 5009, 198, 6738, 26767, 62, 8873, 13, 18211, 13, 83, 453, 13, 27530, 13, 13237, 62, 13716, 1330, 14156, 15988, 198, 6738, 26767, 62, 8873, 13, 18211, 13, 83, 453, 13, 27530, 13, 20274, 62, 687, 1330, 25414, 8479, 198, 6738, 26767, 62, 8873, 13, 8019, 82, 13, 27530, 13, 268, 5700, 13, 687, 62, 5219, 1330, 5178, 9012, 198, 6738, 26767, 62, 8873, 13, 8019, 82, 13, 525, 8481, 1330, 2628, 198, 6738, 26767, 62, 8873, 13, 8019, 82, 13, 41989, 13, 9288, 62, 8692, 1330, 2251, 62, 46188, 37051, 11, 59, 198, 220, 220, 220, 2251, 62, 260, 1102, 66, 15547, 62, 687, 11, 2251, 62, 260, 1102, 62, 23914, 11, 2251, 62, 20274, 62, 687, 11, 59, 198, 220, 220, 220, 2251, 62, 16159, 11, 2251, 62, 17529, 11, 6208, 14881, 628, 198 ]
3.342995
207
from kafka_rules_manager import RuleEngine
[ 6738, 479, 1878, 4914, 62, 38785, 62, 37153, 1330, 14330, 13798, 628, 628 ]
3.538462
13
#! /usr/bin/python import email, smtplib, tidy, os, datetime, csv, subprocess, locale, time, inspect, sys from lxml import etree from email.mime.text import MIMEText # allow import from subdirectory currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) btcuDir = currentDir + '/bitcoinutilities' if btcuDir not in sys.path: sys.path.append(btcuDir) import pycoin.key.BIP32Node import blockchain_info # see http://docs.python.org/2/library/email-examples.html # test code if __name__ == "__main__": if not os.path.exists('tmp'): os.mkdir('tmp') locale.setlocale(locale.LC_TIME, '') # information gathering mailer = Mailer() infos = mailer.Parse("../Ihre_Anfrage.mbox") overview = Overview('../GutscheineUebersicht.csv') voucherNumber = overview.findNextVoucherNbr() infos['VoucherNumber'] = str(voucherNumber) # find a bitcoin address bitCoinAddr = BitCoinAddr('../BitCoinXPub.txt').GetNext() infos['xbtAddress'] = str(bitCoinAddr) print('*' + infos['xbtAddress'] + '*') # generate the qr codes qrInfoString = 'http://paraeasy.ch\n' \ + 'GutscheinNr: ' + infos['VoucherNumber'] + '\n' \ + 'FlugTyp: ' + infos['FlightType'] + '\n' \ + 'Passagier: ' + infos['Name des Beschenkten'] + '\n' \ + 'BitCoin: ' + infos['xbtAddress'] + '\n' print qrInfoString infof = open('../pdf/' + voucherNumber + '_infos.txt', 'wt') infof.write(qrInfoString) infof.close() key_id = os.environ['GPGKEY'] subprocess.call(['gpg', '-u', key_id, '--clearsign', 'pdf/' + voucherNumber + '_infos.txt'], cwd='../') infofs = open('../pdf/' + voucherNumber + '_infos.txt.asc', 'rt') qrInfoString = infofs.read() infofs.close() os.remove('../pdf/' + voucherNumber + '_infos.txt') os.remove('../pdf/' + voucherNumber + '_infos.txt.asc') infos['QrInfoFile'] = 'tmp/qr_' + infos['VoucherNumber'] + '.png' print('writing ', infos['QrInfoFile']) p = subprocess.Popen(['qrencode', '-o', infos['QrInfoFile']], stdout=subprocess.PIPE, stdin=subprocess.PIPE) p.stdin.write(qrInfoString) p.communicate()[0] p.stdin.close() if not os.path.isfile(infos['QrInfoFile']): raise ValueError('qr image file not written') # prepare the documents latex = LaTex(infos, 'tmp') files = ['Gutschein.tex', 'Rechnung.tex'] for texFile in files: pdfFile = latex.ToPdf(latex.Prepare(texFile)) subprocess.call(['evince', pdfFile]) subprocess.call(['git', 'add', str(pdfFile)], cwd='../') # accounting overview.addEntry(infos) subprocess.call(['git', 'add', 'GutscheineUebersicht.csv'], cwd='../') print infos
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 3053, 11, 895, 83, 489, 571, 11, 43044, 11, 28686, 11, 4818, 8079, 11, 269, 21370, 11, 850, 14681, 11, 36693, 11, 640, 11, 10104, 11, 25064, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, 337, 3955, 2767, 2302, 198, 198, 2, 1249, 1330, 422, 850, 34945, 198, 14421, 35277, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 1040, 806, 13, 1136, 7753, 7, 1040, 806, 13, 14421, 14535, 3419, 22305, 198, 18347, 27399, 35277, 796, 1459, 35277, 1343, 31051, 35395, 315, 2410, 6, 198, 361, 275, 23047, 84, 35277, 407, 287, 25064, 13, 6978, 25, 198, 220, 220, 220, 25064, 13, 6978, 13, 33295, 7, 18347, 27399, 35277, 8, 198, 198, 11748, 12972, 3630, 13, 2539, 13, 47772, 2624, 19667, 198, 11748, 11779, 62, 10951, 628, 198, 2, 766, 2638, 1378, 31628, 13, 29412, 13, 2398, 14, 17, 14, 32016, 14, 12888, 12, 1069, 12629, 13, 6494, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 2, 1332, 2438, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 1069, 1023, 10786, 22065, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 28015, 15908, 10786, 22065, 11537, 198, 220, 220, 220, 36693, 13, 2617, 17946, 1000, 7, 17946, 1000, 13, 5639, 62, 34694, 11, 10148, 8, 628, 220, 220, 220, 1303, 1321, 11228, 198, 220, 220, 220, 6920, 263, 796, 11099, 263, 3419, 198, 220, 220, 220, 1167, 418, 796, 6920, 263, 13, 10044, 325, 7203, 40720, 40, 71, 260, 62, 2025, 8310, 496, 13, 2022, 1140, 4943, 198, 220, 220, 220, 16700, 796, 28578, 10786, 40720, 38, 30433, 500, 52, 68, 1213, 30830, 13, 40664, 11537, 198, 220, 220, 220, 40621, 15057, 796, 16700, 13, 19796, 10019, 53, 280, 2044, 45, 1671, 3419, 198, 220, 220, 220, 1167, 418, 17816, 53, 280, 2044, 15057, 20520, 796, 965, 7, 85, 280, 2044, 15057, 8, 628, 220, 220, 220, 1303, 1064, 257, 8550, 2209, 198, 220, 220, 220, 1643, 24387, 4550, 81, 796, 4722, 24387, 4550, 81, 10786, 40720, 13128, 24387, 55, 14876, 13, 14116, 27691, 3855, 10019, 3419, 198, 220, 220, 220, 1167, 418, 17816, 87, 18347, 20231, 20520, 796, 965, 7, 2545, 24387, 4550, 81, 8, 198, 220, 220, 220, 3601, 10786, 9, 6, 1343, 1167, 418, 17816, 87, 18347, 20231, 20520, 1343, 705, 9, 11537, 628, 220, 220, 220, 1303, 7716, 262, 10662, 81, 12416, 198, 220, 220, 220, 10662, 81, 12360, 10100, 796, 705, 4023, 1378, 1845, 3609, 4107, 13, 354, 59, 77, 6, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 38, 30433, 259, 45, 81, 25, 705, 1343, 1167, 418, 17816, 53, 280, 2044, 15057, 20520, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 59, 77, 6, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 7414, 1018, 31467, 25, 705, 220, 220, 220, 220, 1343, 1167, 418, 17816, 43069, 6030, 20520, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 59, 77, 6, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 14478, 363, 959, 25, 705, 220, 220, 1343, 1167, 418, 17816, 5376, 748, 347, 3798, 831, 74, 1452, 20520, 1343, 705, 59, 77, 6, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 705, 13128, 24387, 25, 705, 220, 220, 220, 220, 1343, 1167, 418, 17816, 87, 18347, 20231, 20520, 1343, 705, 59, 77, 6, 198, 220, 220, 220, 3601, 10662, 81, 12360, 10100, 198, 220, 220, 220, 1167, 1659, 796, 1280, 10786, 40720, 12315, 14, 6, 1343, 40621, 15057, 1343, 705, 62, 10745, 418, 13, 14116, 3256, 705, 46569, 11537, 198, 220, 220, 220, 1167, 1659, 13, 13564, 7, 80, 81, 12360, 10100, 8, 198, 220, 220, 220, 1167, 1659, 13, 19836, 3419, 628, 220, 220, 220, 1994, 62, 312, 796, 28686, 13, 268, 2268, 17816, 38, 6968, 20373, 20520, 198, 220, 220, 220, 850, 14681, 13, 13345, 7, 17816, 70, 6024, 3256, 705, 12, 84, 3256, 1994, 62, 312, 11, 705, 438, 2375, 945, 570, 3256, 705, 12315, 14, 6, 1343, 40621, 15057, 1343, 705, 62, 10745, 418, 13, 14116, 6, 4357, 269, 16993, 11639, 40720, 11537, 198, 220, 220, 220, 1167, 1659, 82, 796, 1280, 10786, 40720, 12315, 14, 6, 1343, 40621, 15057, 1343, 705, 62, 10745, 418, 13, 14116, 13, 3372, 3256, 705, 17034, 11537, 198, 220, 220, 220, 10662, 81, 12360, 10100, 796, 1167, 1659, 82, 13, 961, 3419, 198, 220, 220, 220, 1167, 1659, 82, 13, 19836, 3419, 628, 220, 220, 220, 28686, 13, 28956, 10786, 40720, 12315, 14, 6, 1343, 40621, 15057, 1343, 705, 62, 10745, 418, 13, 14116, 11537, 198, 220, 220, 220, 28686, 13, 28956, 10786, 40720, 12315, 14, 6, 1343, 40621, 15057, 1343, 705, 62, 10745, 418, 13, 14116, 13, 3372, 11537, 628, 220, 220, 220, 1167, 418, 17816, 48, 81, 12360, 8979, 20520, 796, 705, 22065, 14, 80, 81, 62, 6, 1343, 1167, 418, 17816, 53, 280, 2044, 15057, 20520, 1343, 45302, 11134, 6, 198, 220, 220, 220, 3601, 10786, 16502, 46083, 1167, 418, 17816, 48, 81, 12360, 8979, 6, 12962, 628, 220, 220, 220, 279, 796, 850, 14681, 13, 47, 9654, 7, 17816, 80, 918, 8189, 3256, 705, 12, 78, 3256, 1167, 418, 17816, 48, 81, 12360, 8979, 20520, 4357, 14367, 448, 28, 7266, 14681, 13, 47, 4061, 36, 11, 14367, 259, 28, 7266, 14681, 13, 47, 4061, 36, 8, 198, 220, 220, 220, 279, 13, 19282, 259, 13, 13564, 7, 80, 81, 12360, 10100, 8, 198, 220, 220, 220, 279, 13, 10709, 5344, 3419, 58, 15, 60, 198, 220, 220, 220, 279, 13, 19282, 259, 13, 19836, 3419, 628, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 4468, 576, 7, 10745, 418, 17816, 48, 81, 12360, 8979, 20520, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 80, 81, 2939, 2393, 407, 3194, 11537, 628, 220, 220, 220, 1303, 8335, 262, 4963, 220, 220, 220, 220, 198, 220, 220, 220, 47038, 796, 4689, 17005, 7, 10745, 418, 11, 705, 22065, 11537, 198, 220, 220, 220, 3696, 796, 37250, 38, 30433, 259, 13, 16886, 3256, 705, 3041, 1349, 2150, 13, 16886, 20520, 198, 220, 220, 220, 329, 48659, 8979, 287, 3696, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37124, 8979, 796, 47038, 13, 2514, 47, 7568, 7, 17660, 87, 13, 37534, 533, 7, 16886, 8979, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 850, 14681, 13, 13345, 7, 17816, 1990, 924, 3256, 37124, 8979, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 850, 14681, 13, 13345, 7, 17816, 18300, 3256, 705, 2860, 3256, 965, 7, 12315, 8979, 8, 4357, 269, 16993, 11639, 40720, 11537, 628, 220, 220, 220, 1303, 14317, 198, 220, 220, 220, 16700, 13, 2860, 30150, 7, 10745, 418, 8, 198, 220, 220, 220, 850, 14681, 13, 13345, 7, 17816, 18300, 3256, 705, 2860, 3256, 705, 38, 30433, 500, 52, 68, 1213, 30830, 13, 40664, 6, 4357, 269, 16993, 11639, 40720, 11537, 628, 220, 220, 220, 3601, 1167, 418, 628 ]
2.279805
1,233
# Execution time : 0.001408 seconds # Solution Explanation # Let v = { v1, v2, ..., vn } be values # We want to find in how many ways we can sum s with # element of v if we can get as many items of v as we need # ( We can choose as many times and element as we want ) # So, we can define the following recurrence # sol(i,s) = if s<0 -> 0, if i <= n -> sol(i,s-v[i]) + sol(i+1,s), if i==n -> 1 if s=0 else 0 # So the answer is sol(1,200) # And we note that there are overlapping cases in this recurrence # So we can implement it using DP import time width = 40 if __name__=="__main__": start_ = time.time() print(' Answer -> %s '.center(width,'-') % ( solution() )) print(' %f seconds '.center(width,'-') % ( time.time() - start_))
[ 198, 2, 37497, 640, 1058, 657, 13, 405, 1415, 2919, 4201, 198, 198, 2, 28186, 50125, 341, 198, 2, 3914, 410, 796, 1391, 410, 16, 11, 410, 17, 11, 2644, 11, 410, 77, 1782, 307, 3815, 198, 2, 775, 765, 284, 1064, 287, 703, 867, 2842, 356, 460, 2160, 264, 351, 198, 2, 5002, 286, 410, 611, 356, 460, 651, 355, 867, 3709, 286, 410, 355, 356, 761, 198, 2, 357, 775, 460, 3853, 355, 867, 1661, 290, 5002, 355, 356, 765, 1267, 198, 2, 1406, 11, 356, 460, 8160, 262, 1708, 664, 33928, 198, 2, 1540, 7, 72, 11, 82, 8, 796, 611, 264, 27, 15, 4613, 657, 11, 611, 1312, 19841, 299, 4613, 1540, 7, 72, 11, 82, 12, 85, 58, 72, 12962, 1343, 1540, 7, 72, 10, 16, 11, 82, 828, 611, 1312, 855, 77, 4613, 352, 611, 264, 28, 15, 2073, 657, 198, 2, 1406, 262, 3280, 318, 1540, 7, 16, 11, 2167, 8, 198, 2, 843, 356, 3465, 326, 612, 389, 32997, 2663, 287, 428, 664, 33928, 198, 2, 1406, 356, 460, 3494, 340, 1262, 27704, 628, 198, 11748, 640, 198, 10394, 796, 2319, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 923, 62, 796, 640, 13, 2435, 3419, 198, 220, 220, 220, 3601, 10786, 23998, 4613, 4064, 82, 45302, 16159, 7, 10394, 4032, 12, 11537, 4064, 357, 4610, 3419, 15306, 198, 220, 220, 220, 3601, 10786, 4064, 69, 4201, 45302, 16159, 7, 10394, 4032, 12, 11537, 4064, 357, 640, 13, 2435, 3419, 532, 923, 62, 4008, 198 ]
2.8659
261
""" This is my fifth prime number project, it is one of the fastest. It will find all prime numbers between 2 and 'End'. 1. At first we create an Prime array to N store True vlaue, and N is End + 1 == size and another list containing 2 as our main prime list 2.we iterate all odd numbers in range of 3 and END, if that number's value in prime list is True, means that we have not used it, so it is prime, we add it to our prime list then we make all prime list values false where we find this number's multiplies untill the END """ print(primeNumbers_6(100000))
[ 37811, 198, 1212, 318, 616, 8150, 6994, 1271, 1628, 11, 198, 270, 318, 530, 286, 262, 14162, 13, 198, 1026, 481, 1064, 477, 6994, 3146, 1022, 362, 290, 705, 12915, 4458, 198, 198, 16, 13, 1629, 717, 356, 2251, 281, 5537, 7177, 284, 399, 198, 8095, 6407, 410, 5031, 518, 11, 290, 399, 318, 5268, 1343, 352, 6624, 2546, 198, 392, 1194, 1351, 7268, 362, 355, 674, 1388, 6994, 1351, 198, 198, 17, 13, 732, 11629, 378, 477, 5629, 3146, 220, 287, 2837, 286, 513, 290, 23578, 11, 198, 361, 326, 1271, 338, 1988, 287, 6994, 1351, 318, 6407, 11, 198, 1326, 504, 326, 356, 423, 407, 973, 340, 11, 523, 340, 318, 6994, 11, 198, 732, 751, 340, 284, 674, 6994, 1351, 788, 198, 732, 787, 477, 6994, 1351, 3815, 3991, 810, 356, 1064, 198, 5661, 1271, 338, 15082, 444, 1418, 359, 262, 23578, 198, 37811, 198, 198, 4798, 7, 35505, 49601, 62, 21, 7, 3064, 830, 4008, 220, 220, 220, 220, 198 ]
3.47561
164
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # 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 itk import argparse parser = argparse.ArgumentParser(description="Thin Image.") parser.add_argument("input_image", nargs="?") args = parser.parse_args() PixelType = itk.UC Dimension = 2 ImageType = itk.Image[PixelType, Dimension] if args.input_image: image = itk.imread(args.input_image) else: # Create an image start = itk.Index[Dimension]() start.Fill(0) size = itk.Size[Dimension]() size.Fill(100) region = itk.ImageRegion[Dimension]() region.SetIndex(start) region.SetSize(size) image = ImageType.New(Regions=region) image.Allocate() image.FillBuffer(0) # Draw a 5 pixel wide line image[50:55, 20:80] = 255 # Write Image itk.imwrite(image, "input.png") image = itk.binary_thinning_image_filter(image) # Rescale the image so that it can be seen (the output is 0 and 1, we want 0 and 255) image = itk.rescale_intensity_image_filter(image, output_minimum=0, output_maximum=255) # Write Image itk.imwrite(image, "outputPython.png")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 31835, 37, 4503, 2937, 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, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 13, 14116, 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, 340, 74, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 817, 259, 7412, 19570, 198, 48610, 13, 2860, 62, 49140, 7203, 15414, 62, 9060, 1600, 299, 22046, 2625, 1701, 8, 198, 22046, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 198, 40809, 6030, 796, 340, 74, 13, 9598, 198, 29271, 3004, 796, 362, 198, 5159, 6030, 796, 340, 74, 13, 5159, 58, 40809, 6030, 11, 34024, 60, 198, 198, 361, 26498, 13, 15414, 62, 9060, 25, 198, 220, 220, 220, 2939, 796, 340, 74, 13, 320, 961, 7, 22046, 13, 15414, 62, 9060, 8, 198, 198, 17772, 25, 198, 220, 220, 220, 1303, 13610, 281, 2939, 198, 220, 220, 220, 923, 796, 340, 74, 13, 15732, 58, 29271, 3004, 60, 3419, 198, 220, 220, 220, 923, 13, 33762, 7, 15, 8, 628, 220, 220, 220, 2546, 796, 340, 74, 13, 10699, 58, 29271, 3004, 60, 3419, 198, 220, 220, 220, 2546, 13, 33762, 7, 3064, 8, 628, 220, 220, 220, 3814, 796, 340, 74, 13, 5159, 47371, 58, 29271, 3004, 60, 3419, 198, 220, 220, 220, 3814, 13, 7248, 15732, 7, 9688, 8, 198, 220, 220, 220, 3814, 13, 7248, 10699, 7, 7857, 8, 628, 220, 220, 220, 2939, 796, 7412, 6030, 13, 3791, 7, 8081, 507, 28, 36996, 8, 198, 220, 220, 220, 2939, 13, 3237, 13369, 3419, 198, 220, 220, 220, 2939, 13, 33762, 28632, 7, 15, 8, 628, 220, 220, 220, 1303, 15315, 257, 642, 17465, 3094, 1627, 198, 220, 220, 220, 2939, 58, 1120, 25, 2816, 11, 1160, 25, 1795, 60, 796, 14280, 628, 220, 220, 220, 1303, 19430, 7412, 198, 220, 220, 220, 340, 74, 13, 320, 13564, 7, 9060, 11, 366, 15414, 13, 11134, 4943, 198, 198, 9060, 796, 340, 74, 13, 39491, 62, 400, 23062, 62, 9060, 62, 24455, 7, 9060, 8, 198, 198, 2, 1874, 38765, 262, 2939, 523, 326, 340, 460, 307, 1775, 357, 1169, 5072, 318, 657, 290, 352, 11, 356, 765, 657, 290, 14280, 8, 198, 9060, 796, 340, 74, 13, 411, 38765, 62, 47799, 62, 9060, 62, 24455, 7, 9060, 11, 5072, 62, 39504, 28, 15, 11, 5072, 62, 47033, 28, 13381, 8, 198, 198, 2, 19430, 7412, 198, 270, 74, 13, 320, 13564, 7, 9060, 11, 366, 22915, 37906, 13, 11134, 4943, 198 ]
2.927405
551
import logger log = logger.get_logger(__name__) import argparse import sys import os import subprocess import module as mod import subpackage.submodule as submod if __name__ == '__main__': args = get_args() if args.log_level: log.setLevel(args.log_level.upper()) main()
[ 11748, 49706, 198, 6404, 796, 49706, 13, 1136, 62, 6404, 1362, 7, 834, 3672, 834, 8, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 11748, 8265, 355, 953, 198, 11748, 850, 26495, 13, 7266, 21412, 355, 850, 4666, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 26498, 796, 651, 62, 22046, 3419, 198, 220, 220, 220, 611, 26498, 13, 6404, 62, 5715, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 2617, 4971, 7, 22046, 13, 6404, 62, 5715, 13, 45828, 28955, 198, 220, 220, 220, 1388, 3419, 198 ]
2.722222
108
from django.template import RequestContext from django.shortcuts import render_to_response
[ 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209 ]
4.285714
21
from db.connect.instanciaAtualDB import atualDB from db.scripts.script_select.select_canais import select_verifica_canal, select_canais_ativos from db.scripts.script_select.select_aventureiros import script_select_aventureiro_nome, script_select_aventureiro_id from db.scripts.script_create_drop.create_tables import create_aventureiros_canal, create_buddies_canal, create_capturados_canal, create_tipo_hordas_canal, create_hordas_canal, create_capboard_dados_canal, create_itens_obtidos_canal from db.scripts.script_create_drop.drop_tables import drop_table_aventureiros_canal, drop_table_buddies_canal, drop_table_capturados_canal, drop_tipo_hordas_canal,drop_hordas_canal, drop_capboard_dados_canal, drop_itens_obtidos_canal from db.scripts.script_insert_update_delete.update_insert_canais import script_insert_canais, script_update_canais from db.scripts.script_insert_update_delete.insert_update_tipo_hordas_canal import script_insert_table_tipo_hordas_canal from db.scripts.script_insert_update_delete.insert_update_hordas_canal import script_insert_table_hordas_canal from db.scripts.script_insert_update_delete.insert_aventureiros import script_insert_aventureiros from db.scripts.script_select.select_idiomas import script_select_todos_idiomas, script_select_idioma_por_nome from db.scripts.script_insert_update_delete.insert_tipo_itens import script_insert_tipo_itens from db.scripts.script_select.select_parametros_canal import select_parametros_aventureiros_novo_canal, select_parametros_hordas_canal
[ 6738, 20613, 13, 8443, 13, 8625, 1192, 544, 2953, 723, 11012, 1330, 379, 723, 11012, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 19738, 13, 19738, 62, 66, 2271, 271, 1330, 2922, 62, 332, 811, 64, 62, 5171, 282, 11, 2922, 62, 66, 2271, 271, 62, 265, 452, 418, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 19738, 13, 19738, 62, 615, 36697, 72, 4951, 1330, 4226, 62, 19738, 62, 615, 36697, 7058, 62, 77, 462, 11, 4226, 62, 19738, 62, 615, 36697, 7058, 62, 312, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 17953, 62, 14781, 13, 17953, 62, 83, 2977, 1330, 2251, 62, 615, 36697, 72, 4951, 62, 5171, 282, 11, 2251, 62, 65, 4185, 444, 62, 5171, 282, 11, 2251, 62, 27144, 333, 22484, 62, 5171, 282, 11, 2251, 62, 22504, 78, 62, 71, 585, 292, 62, 5171, 282, 11, 2251, 62, 71, 585, 292, 62, 5171, 282, 11, 2251, 62, 11128, 3526, 62, 67, 22484, 62, 5171, 282, 11, 2251, 62, 270, 641, 62, 672, 83, 312, 418, 62, 5171, 282, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 17953, 62, 14781, 13, 14781, 62, 83, 2977, 1330, 4268, 62, 11487, 62, 615, 36697, 72, 4951, 62, 5171, 282, 11, 4268, 62, 11487, 62, 65, 4185, 444, 62, 5171, 282, 11, 4268, 62, 11487, 62, 27144, 333, 22484, 62, 5171, 282, 11, 4268, 62, 22504, 78, 62, 71, 585, 292, 62, 5171, 282, 11, 14781, 62, 71, 585, 292, 62, 5171, 282, 11, 4268, 62, 11128, 3526, 62, 67, 22484, 62, 5171, 282, 11, 4268, 62, 270, 641, 62, 672, 83, 312, 418, 62, 5171, 282, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 28463, 62, 19119, 62, 33678, 13, 19119, 62, 28463, 62, 66, 2271, 271, 1330, 4226, 62, 28463, 62, 66, 2271, 271, 11, 4226, 62, 19119, 62, 66, 2271, 271, 220, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 28463, 62, 19119, 62, 33678, 13, 28463, 62, 19119, 62, 22504, 78, 62, 71, 585, 292, 62, 5171, 282, 1330, 4226, 62, 28463, 62, 11487, 62, 22504, 78, 62, 71, 585, 292, 62, 5171, 282, 220, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 28463, 62, 19119, 62, 33678, 13, 28463, 62, 19119, 62, 71, 585, 292, 62, 5171, 282, 1330, 4226, 62, 28463, 62, 11487, 62, 71, 585, 292, 62, 5171, 282, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 28463, 62, 19119, 62, 33678, 13, 28463, 62, 615, 36697, 72, 4951, 1330, 4226, 62, 28463, 62, 615, 36697, 72, 4951, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 19738, 13, 19738, 62, 19830, 16911, 1330, 4226, 62, 19738, 62, 83, 375, 418, 62, 19830, 16911, 11, 4226, 62, 19738, 62, 19830, 6086, 62, 1819, 62, 77, 462, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 28463, 62, 19119, 62, 33678, 13, 28463, 62, 22504, 78, 62, 270, 641, 1330, 4226, 62, 28463, 62, 22504, 78, 62, 270, 641, 198, 6738, 20613, 13, 46521, 13, 12048, 62, 19738, 13, 19738, 62, 17143, 316, 4951, 62, 5171, 282, 1330, 2922, 62, 17143, 316, 4951, 62, 615, 36697, 72, 4951, 62, 77, 18768, 62, 5171, 282, 11, 2922, 62, 17143, 316, 4951, 62, 71, 585, 292, 62, 5171, 282 ]
2.835206
534
from django.utils.translation import ugettext from rest_framework.exceptions import NotFound from commons.decorators import validate_requirements, validate_existance, str_to_boolean from payment.models import Payment from .models import Branch class BranchService: """ General services for branch """ @validate_requirements('name', 'current_balance') def insert(self, params): """ Save a new Branch model Args: params: dict Returns: Branch instance """ branch = Branch() branch.name = params['name'] branch.current_balance = params['current_balance'] branch.save() return branch @validate_existance((Branch, 'id'), is_critical=True) @validate_requirements('name', 'current_balance') def update(self, params): """ Update a Branch model Args: params: dict Returns: Branch instance """ branch_id = params['id'] name = params['name'] current_balance = params['current_balance'] branch = Branch(id=branch_id, name=name, current_balance=current_balance) branch.save(update_fields=['name', 'current_balance']) return branch def find(self): """ Return a list of branches Returns: Branch QuerySet """ return Branch.objects.all() def find_by_id(self, branch_id): """ Return a single Branch instance Args: branch_id: int Returns: Branch instance """ try: return Branch.objects.get(id=branch_id) except Branch.DoesNotExist: raise NotFound(detail=ugettext('Branch not found')) def delete(self, branch_id): """ Delete a Branch instance Args: branch_id: int """ try: Branch.objects.get(id=branch_id).delete() except Branch.DoesNotExist: raise NotFound(detail=ugettext('Branch not found')) @validate_existance((Branch, 'branch'), is_critical=True) @str_to_boolean('is_paid') def find_payments(self, params): """ Find a list of branch payment Args: params: dict - filters Returns: Payment queryset """ branch = params['branch'] is_paid = params.get('is_paid') query = Payment.objects.filter(branch_id=branch) if is_paid is not None: query = query.filter(is_paid=is_paid) return query
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 1892, 21077, 198, 198, 6738, 36523, 13, 12501, 273, 2024, 1330, 26571, 62, 8897, 18883, 11, 26571, 62, 1069, 9311, 11, 965, 62, 1462, 62, 2127, 21052, 198, 6738, 6074, 13, 27530, 1330, 28784, 198, 6738, 764, 27530, 1330, 20551, 628, 198, 4871, 20551, 16177, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3611, 2594, 329, 8478, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 12102, 378, 62, 8897, 18883, 10786, 3672, 3256, 705, 14421, 62, 20427, 11537, 198, 220, 220, 220, 825, 7550, 7, 944, 11, 42287, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 12793, 257, 649, 20551, 2746, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 8633, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 20551, 4554, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 796, 20551, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 13, 3672, 796, 42287, 17816, 3672, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 13, 14421, 62, 20427, 796, 42287, 17816, 14421, 62, 20427, 20520, 628, 220, 220, 220, 220, 220, 220, 220, 8478, 13, 21928, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 8478, 628, 220, 220, 220, 2488, 12102, 378, 62, 1069, 9311, 19510, 33, 25642, 11, 705, 312, 33809, 318, 62, 34666, 28, 17821, 8, 198, 220, 220, 220, 2488, 12102, 378, 62, 8897, 18883, 10786, 3672, 3256, 705, 14421, 62, 20427, 11537, 198, 220, 220, 220, 825, 4296, 7, 944, 11, 42287, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10133, 257, 20551, 2746, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 8633, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 20551, 4554, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 62, 312, 796, 42287, 17816, 312, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 42287, 17816, 3672, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 1459, 62, 20427, 796, 42287, 17816, 14421, 62, 20427, 20520, 628, 220, 220, 220, 220, 220, 220, 220, 8478, 796, 20551, 7, 312, 28, 1671, 3702, 62, 312, 11, 1438, 28, 3672, 11, 1459, 62, 20427, 28, 14421, 62, 20427, 8, 628, 220, 220, 220, 220, 220, 220, 220, 8478, 13, 21928, 7, 19119, 62, 25747, 28, 17816, 3672, 3256, 705, 14421, 62, 20427, 6, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 8478, 628, 220, 220, 220, 825, 1064, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 257, 1351, 286, 13737, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 20551, 43301, 7248, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 20551, 13, 48205, 13, 439, 3419, 628, 220, 220, 220, 825, 1064, 62, 1525, 62, 312, 7, 944, 11, 8478, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 257, 2060, 20551, 4554, 198, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8478, 62, 312, 25, 493, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 20551, 4554, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 20551, 13, 48205, 13, 1136, 7, 312, 28, 1671, 3702, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 20551, 13, 13921, 3673, 3109, 396, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 21077, 7, 49170, 28, 1018, 316, 5239, 10786, 33, 25642, 407, 1043, 6, 4008, 628, 220, 220, 220, 825, 12233, 7, 944, 11, 8478, 62, 312, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 23520, 257, 20551, 4554, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8478, 62, 312, 25, 493, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20551, 13, 48205, 13, 1136, 7, 312, 28, 1671, 3702, 62, 312, 737, 33678, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 20551, 13, 13921, 3673, 3109, 396, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 21077, 7, 49170, 28, 1018, 316, 5239, 10786, 33, 25642, 407, 1043, 6, 4008, 628, 220, 220, 220, 2488, 12102, 378, 62, 1069, 9311, 19510, 33, 25642, 11, 705, 1671, 3702, 33809, 318, 62, 34666, 28, 17821, 8, 198, 220, 220, 220, 2488, 2536, 62, 1462, 62, 2127, 21052, 10786, 271, 62, 20333, 11537, 198, 220, 220, 220, 825, 1064, 62, 15577, 902, 7, 944, 11, 42287, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9938, 257, 1351, 286, 8478, 6074, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42287, 25, 8633, 532, 16628, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 28784, 42517, 893, 316, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8478, 796, 42287, 17816, 1671, 3702, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 20333, 796, 42287, 13, 1136, 10786, 271, 62, 20333, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 12405, 796, 28784, 13, 48205, 13, 24455, 7, 1671, 3702, 62, 312, 28, 1671, 3702, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 318, 62, 20333, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12405, 796, 12405, 13, 24455, 7, 271, 62, 20333, 28, 271, 62, 20333, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 12405, 198 ]
2.303411
1,114
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """`gcloud certificate-manager maps list` command.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.certificate_manager import certificate_maps from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.certificate_manager import resource_args from googlecloudsdk.command_lib.certificate_manager import util from googlecloudsdk.core.resource import resource_transform _FORMAT = """\ table( name.scope(certificateMaps), gclbTargets.gclbTargetsToString(undefined='-'):label=ENDPOINTS, description, createTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined='-') ) """ def _TransformGclbTargets(targets, undefined=''): r"""Transforms GclbTargets to more compact form. It uses following format: IP_1:port_1\nIP_2:port_2\n...IP_n:port_n. Args: targets: GclbTargets API representation. undefined: str, value to be returned if no IP:port pair is found. Returns: String representation to be shown in table view. """ if not targets: return undefined result = [] for target in targets: ip_configs = resource_transform.GetKeyValue(target, 'ipConfig', None) if ip_configs is None: return undefined for ip_config in ip_configs: ip_address = resource_transform.GetKeyValue(ip_config, 'ipAddress', None) port = resource_transform.GetKeyValue(ip_config, 'port', None) if ip_address is None or port is None: continue result.append('{}:{}'.format(ip_address, port)) return '\n'.join(result) if result else undefined _TRANSFORMS = { 'gclbTargetsToString': _TransformGclbTargets, } @base.ReleaseTracks(base.ReleaseTrack.ALPHA) class List(base.ListCommand): """List certificate maps. List Certificate Manager maps in the project. ## EXAMPLES To list all certificate maps in the project, run: $ {command} """ @staticmethod
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 12131, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 37811, 63, 70, 17721, 10703, 12, 37153, 8739, 1351, 63, 3141, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 23645, 17721, 21282, 74, 13, 15042, 62, 8019, 13, 22583, 22460, 62, 37153, 1330, 10703, 62, 31803, 198, 6738, 23645, 17721, 21282, 74, 13, 13345, 72, 3008, 1330, 2779, 198, 6738, 23645, 17721, 21282, 74, 13, 21812, 62, 8019, 13, 22583, 22460, 62, 37153, 1330, 8271, 62, 22046, 198, 6738, 23645, 17721, 21282, 74, 13, 21812, 62, 8019, 13, 22583, 22460, 62, 37153, 1330, 7736, 198, 6738, 23645, 17721, 21282, 74, 13, 7295, 13, 31092, 1330, 8271, 62, 35636, 198, 198, 62, 21389, 1404, 796, 37227, 59, 198, 11487, 7, 198, 220, 220, 220, 1438, 13, 29982, 7, 22583, 22460, 47010, 828, 198, 220, 220, 220, 308, 565, 65, 51, 853, 1039, 13, 70, 565, 65, 51, 853, 1039, 2514, 10100, 7, 917, 18156, 11639, 19355, 2599, 18242, 28, 1677, 6322, 46, 1268, 4694, 11, 198, 220, 220, 220, 6764, 11, 198, 220, 220, 220, 2251, 7575, 13, 4475, 10786, 4, 56, 12, 4, 76, 12, 4, 67, 4064, 39, 25, 4, 44, 25, 4, 50, 4064, 46, 89, 3256, 28721, 11639, 12, 11537, 198, 8, 198, 37811, 628, 198, 4299, 4808, 41762, 38, 565, 65, 51, 853, 1039, 7, 83, 853, 1039, 11, 28721, 28, 7061, 2599, 198, 220, 374, 37811, 8291, 23914, 402, 565, 65, 51, 853, 1039, 284, 517, 16001, 1296, 13, 628, 220, 632, 3544, 1708, 5794, 25, 6101, 62, 16, 25, 634, 62, 16, 59, 77, 4061, 62, 17, 25, 634, 62, 17, 59, 77, 986, 4061, 62, 77, 25, 634, 62, 77, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 6670, 25, 402, 565, 65, 51, 853, 1039, 7824, 10552, 13, 198, 220, 220, 220, 28721, 25, 965, 11, 1988, 284, 307, 4504, 611, 645, 6101, 25, 634, 5166, 318, 1043, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 10903, 10552, 284, 307, 3402, 287, 3084, 1570, 13, 198, 220, 37227, 198, 220, 611, 407, 6670, 25, 198, 220, 220, 220, 1441, 28721, 198, 220, 1255, 796, 17635, 198, 220, 329, 2496, 287, 6670, 25, 198, 220, 220, 220, 20966, 62, 11250, 82, 796, 8271, 62, 35636, 13, 3855, 9218, 11395, 7, 16793, 11, 705, 541, 16934, 3256, 6045, 8, 198, 220, 220, 220, 611, 20966, 62, 11250, 82, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 1441, 28721, 198, 220, 220, 220, 329, 20966, 62, 11250, 287, 20966, 62, 11250, 82, 25, 198, 220, 220, 220, 220, 220, 20966, 62, 21975, 796, 8271, 62, 35636, 13, 3855, 9218, 11395, 7, 541, 62, 11250, 11, 705, 541, 20231, 3256, 6045, 8, 198, 220, 220, 220, 220, 220, 2493, 796, 8271, 62, 35636, 13, 3855, 9218, 11395, 7, 541, 62, 11250, 11, 705, 634, 3256, 6045, 8, 198, 220, 220, 220, 220, 220, 611, 20966, 62, 21975, 318, 6045, 393, 2493, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 1255, 13, 33295, 10786, 90, 92, 29164, 92, 4458, 18982, 7, 541, 62, 21975, 11, 2493, 4008, 198, 220, 1441, 705, 59, 77, 4458, 22179, 7, 20274, 8, 611, 1255, 2073, 28721, 628, 198, 62, 5446, 15037, 13775, 5653, 796, 1391, 198, 220, 220, 220, 705, 70, 565, 65, 51, 853, 1039, 2514, 10100, 10354, 4808, 41762, 38, 565, 65, 51, 853, 1039, 11, 198, 92, 628, 198, 31, 8692, 13, 26362, 2898, 4595, 7, 8692, 13, 26362, 24802, 13, 1847, 47, 7801, 8, 198, 4871, 7343, 7, 8692, 13, 8053, 21575, 2599, 198, 220, 37227, 8053, 10703, 8739, 13, 628, 220, 7343, 27895, 9142, 8739, 287, 262, 1628, 13, 628, 220, 22492, 7788, 2390, 6489, 1546, 628, 220, 1675, 1351, 477, 10703, 8739, 287, 262, 1628, 11, 1057, 25, 628, 220, 220, 220, 720, 1391, 21812, 92, 198, 220, 37227, 628, 220, 2488, 12708, 24396, 198 ]
3.059809
836
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-08-11 02:47 from hanlp.common.dataset import SortingSamplerBuilder from hanlp.components.tokenizers.transformer import TransformerTaggingTokenizer from hanlp.datasets.cws.sighan2005.pku import SIGHAN2005_PKU_TRAIN_ALL, SIGHAN2005_PKU_TEST from tests import cdroot cdroot() tokenizer = TransformerTaggingTokenizer() save_dir = 'data/model/cws/sighan2005_pku_bert_base_96.66' tokenizer.fit( SIGHAN2005_PKU_TRAIN_ALL, SIGHAN2005_PKU_TEST, # Conventionally, no devset is used. See Tian et al. (2020). save_dir, 'bert-base-chinese', max_seq_len=300, char_level=True, hard_constraint=True, sampler_builder=SortingSamplerBuilder(batch_size=32), epochs=3, adam_epsilon=1e-6, warmup_steps=0.1, weight_decay=0.01, word_dropout=0.1, seed=1609422632, ) tokenizer.evaluate(SIGHAN2005_PKU_TEST, save_dir) print(f'Model saved in {save_dir}')
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 289, 962, 6359, 198, 2, 7536, 25, 12131, 12, 2919, 12, 1157, 7816, 25, 2857, 198, 6738, 289, 272, 34431, 13, 11321, 13, 19608, 292, 316, 1330, 311, 24707, 16305, 20053, 32875, 198, 6738, 289, 272, 34431, 13, 5589, 3906, 13, 30001, 11341, 13, 7645, 16354, 1330, 3602, 16354, 51, 16406, 30642, 7509, 198, 6738, 289, 272, 34431, 13, 19608, 292, 1039, 13, 66, 18504, 13, 82, 394, 272, 14315, 13, 79, 23063, 1330, 311, 18060, 1565, 14315, 62, 40492, 52, 62, 51, 3861, 1268, 62, 7036, 11, 311, 18060, 1565, 14315, 62, 40492, 52, 62, 51, 6465, 198, 6738, 5254, 1330, 22927, 15763, 198, 198, 10210, 15763, 3419, 198, 30001, 7509, 796, 3602, 16354, 51, 16406, 30642, 7509, 3419, 198, 21928, 62, 15908, 796, 705, 7890, 14, 19849, 14, 66, 18504, 14, 82, 394, 272, 14315, 62, 79, 23063, 62, 4835, 62, 8692, 62, 4846, 13, 2791, 6, 198, 30001, 7509, 13, 11147, 7, 198, 220, 220, 220, 311, 18060, 1565, 14315, 62, 40492, 52, 62, 51, 3861, 1268, 62, 7036, 11, 198, 220, 220, 220, 311, 18060, 1565, 14315, 62, 40492, 52, 62, 51, 6465, 11, 220, 1303, 11680, 453, 11, 645, 1614, 2617, 318, 973, 13, 4091, 20834, 2123, 435, 13, 357, 42334, 737, 198, 220, 220, 220, 3613, 62, 15908, 11, 198, 220, 220, 220, 705, 4835, 12, 8692, 12, 354, 3762, 3256, 198, 220, 220, 220, 3509, 62, 41068, 62, 11925, 28, 6200, 11, 198, 220, 220, 220, 1149, 62, 5715, 28, 17821, 11, 198, 220, 220, 220, 1327, 62, 1102, 2536, 2913, 28, 17821, 11, 198, 220, 220, 220, 6072, 20053, 62, 38272, 28, 50, 24707, 16305, 20053, 32875, 7, 43501, 62, 7857, 28, 2624, 828, 198, 220, 220, 220, 36835, 82, 28, 18, 11, 198, 220, 220, 220, 23197, 62, 538, 18217, 261, 28, 16, 68, 12, 21, 11, 198, 220, 220, 220, 5814, 929, 62, 20214, 28, 15, 13, 16, 11, 198, 220, 220, 220, 3463, 62, 12501, 323, 28, 15, 13, 486, 11, 198, 220, 220, 220, 1573, 62, 14781, 448, 28, 15, 13, 16, 11, 198, 220, 220, 220, 9403, 28, 1433, 2931, 19, 24909, 2624, 11, 198, 8, 198, 30001, 7509, 13, 49786, 7, 50, 18060, 1565, 14315, 62, 40492, 52, 62, 51, 6465, 11, 3613, 62, 15908, 8, 198, 4798, 7, 69, 6, 17633, 7448, 287, 1391, 21928, 62, 15908, 92, 11537, 198 ]
2.282238
411
import pytest from yaaredis.utils import b @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 198, 6738, 21349, 1144, 271, 13, 26791, 1330, 275, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 198 ]
2.173184
179
# coding=utf-8 import logging import sys import argparse from bandcamp_parser.album import Album from bandcamp_parser.tag import Tag from bandcamp_parser.track import Track logging.basicConfig(level=logging.INFO) def main(): """ Playing the tracks until CTRL-C """ try: loop() except KeyboardInterrupt: exit(0) if __name__ == '__main__': main()
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6738, 4097, 16544, 62, 48610, 13, 40916, 1330, 23999, 198, 6738, 4097, 16544, 62, 48610, 13, 12985, 1330, 17467, 198, 6738, 4097, 16544, 62, 48610, 13, 11659, 1330, 17762, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 628, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 23911, 262, 8339, 1566, 45249, 12, 34, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 9052, 3419, 198, 220, 220, 220, 2845, 31973, 9492, 3622, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 15, 8, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.80292
137
# -*- coding: utf-8 -*- """ MarvelmindデータをAWS IoT Core へ Publish するパーツクラスを定義するモジュール。 """ import time import json from .base import PublisherBase, to_float, to_str from .topic import pub_hedge_usnav_json_topic, pub_hedge_usnav_raw_json_topic, pub_hedge_imu_json_topic class USNavPublisher(PublisherBase): """ Marvelmindデータ(辞書型、位置情報データのみ)をAWS IoT CoreへPublishするパーツクラス。 """ def run(self, usnav_id, usnav_x, usnav_y, usnav_z, usnav_angle, usnav_timestamp): """ Marvelmindデータ(辞書型、位置情報データのみ)をPublishする。 引数: usnav_id モバイルビーコンID usnav_x 位置情報(X軸) usnav_y 位置情報(Y軸) usnav_z 位置情報(Z軸) usnav_angle 位置情報(向き) usnav_timestamp 位置情報取得時刻 戻り値: なし """ ret = self.client.publish( self.topic, self.to_message( usnav_id, usnav_x, usnav_y, usnav_z, usnav_angle, usnav_timestamp), self.qos) if self.debug: print('[USNavPublisher] publish topic={} ret={}'.format(self.topic, str(ret))) print('[USNavPublisher] msg={}'.format(self.to_message( usnav_id, usnav_x, usnav_y, usnav_z, usnav_angle, usnav_timestamp))) def to_message(self, usnav_id, usnav_x, usnav_y, usnav_z, usnav_angle, usnav_timestamp): """ 手動運転のみのTubデータをメッセージ文字列化する。 引数: usnav_id モバイルビーコンID usnav_x 位置情報(X軸) usnav_y 位置情報(Y軸) usnav_z 位置情報(Z軸) usnav_angle 位置情報(向き) usnav_timestamp 位置情報取得時刻 戻り値: メッセージ文字列 """ message = { 'usnav/id': to_str(usnav_id), 'usnav/x': to_float(usnav_x), 'usnav/y': to_float(usnav_y), 'usnav/z': to_float(usnav_z), 'usnav/angle': to_float(usnav_angle), 'usnav/timestamp': to_float(usnav_timestamp), } return json.dumps(message) class USNavRawPublisher(PublisherBase): """ Marvelmindデータ(辞書型、ビーコン間距離データのみ)を AWS IoT CoreへPublishするパーツクラス。 """ def run(self, dist_id, dist_b1, dist_b1d, dist_b2, dist_b2d, dist_b3, dist_b3d, dist_b4, dist_b4d, dist_timestamp): """ Marvelmindデータ(辞書型、ビーコン間距離データのみ)をPublishする。 引数: dist_id モバイルビーコンID dist_b1 対象となるビーコンID1 dist_b1d ビーコンID1との距離 dist_b2 対象となるビーコンID2 dist_b2d ビーコンID2との距離 dist_b3 対象となるビーコンID3 dist_b3d ビーコンID3との距離 dist_b4 対象となるビーコンID4 dist_b4d ビーコンID4との距離 dist_timestamp ビーコン間距離取得時刻 戻り値: なし """ ret = self.client.publish( self.topic, self.to_message( dist_id, dist_b1, dist_b1d, dist_b2, dist_b2d, dist_b3, dist_b3d, dist_b4, dist_b4d, dist_timestamp), self.qos) if self.debug: print('[USNavRawPublisher] publish topic={} ret={}'.format(self.topic, str(ret))) print('[USNavRawPublisher] msg={}'.format(self.to_message( dist_id, dist_b1, dist_b1d, dist_b2, dist_b2d, dist_b3, dist_b3d, dist_b4, dist_b4d, dist_timestamp))) def to_message(self, dist_id, dist_b1, dist_b1d, dist_b2, dist_b2d, dist_b3, dist_b3d, dist_b4, dist_b4d, dist_timestamp): """ Marvelmindデータ(辞書型、ビーコン間距離データのみ)を メッセージ文字列化する。 引数: dist_id モバイルビーコンID dist_b1 対象となるビーコンID1 dist_b1d ビーコンID1との距離 dist_b2 対象となるビーコンID2 dist_b2d ビーコンID2との距離 dist_b3 対象となるビーコンID3 dist_b3d ビーコンID3との距離 dist_b4 対象となるビーコンID4 dist_b4d ビーコンID4との距離 dist_timestamp ビーコン間距離取得時刻 戻り値: メッセージ文字列 """ message = { 'dist/id': to_str(dist_id), 'dist/b1': to_str(dist_b1), 'dist/b1d': to_float(dist_b1d), 'dist/b2': to_str(dist_b2), 'dist/b2d': to_float(dist_b2d), 'dist/b3': to_str(dist_b3), 'dist/b3d': to_float(dist_b3d), 'dist/b4': to_str(dist_b4), 'dist/b4d': to_float(dist_b4d), 'dist/timestamp': to_float(dist_timestamp), } return json.dumps(message) class IMUPublisher(PublisherBase): """ Marvelmindデータ(辞書型、IMUデータのみ)を AWS IoT CoreへPublishするパーツクラス。 """ def run(self, imu_x, imu_y, imu_z, imu_qw, imu_qx, imu_qy, imu_qz, imu_vx, imu_vy, imu_vz, imu_ax, imu_ay, imu_az, imu_gx, imu_gy, imu_gz, imu_mx, imu_my, imu_mz, imu_timestamp): """ Marvelmindデータ(辞書型、IMUデータのみ)をPublishする。 引数: imu_x 位置情報(X軸) imu_y 位置情報(Y軸) imu_z 位置情報(Z軸) imu_qw 四元数(Q) imu_qx 四元数(X) imu_qy 四元数(Y) imu_qz 四元数(Z) imu_vx 速度(X軸) imu_vy 速度(Y軸) imu_vz 速度(Z軸) imu_ax 加速度(X軸) imu_ay 加速度(Y軸) imu_az 加速度(Z軸) imu_gx 角速度(X軸) imu_gy 角速度(Y軸) imu_gz 角速度(Z軸) imu_mx 磁束密度(X軸) imu_my 磁束密度(Y軸) imu_mz 磁束密度(Z軸) imu_timestamp IMUデータ取得時刻 戻り値: なし """ ret = self.client.publish( self.topic, self.to_message( imu_x, imu_y, imu_z, imu_qw, imu_qx, imu_qy, imu_qz, imu_vx, imu_vy, imu_vz, imu_ax, imu_ay, imu_az, imu_gx, imu_gy, imu_gz, imu_mx, imu_my, imu_mz, imu_timestamp), self.qos) if self.debug: print('[IMUPublisher] publish topic={} ret={}'.format(self.topic, str(ret))) print('[IMUPublisher] msg={}'.format(self.to_message( imu_x, imu_y, imu_z, imu_qw, imu_qx, imu_qy, imu_qz, imu_vx, imu_vy, imu_vz, imu_ax, imu_ay, imu_az, imu_gx, imu_gy, imu_gz, imu_mx, imu_my, imu_mz, imu_timestamp))) def to_message(self, imu_x, imu_y, imu_z, imu_qw, imu_qx, imu_qy, imu_qz, imu_vx, imu_vy, imu_vz, imu_ax, imu_ay, imu_az, imu_gx, imu_gy, imu_gz, imu_mx, imu_my, imu_mz, imu_timestamp): """ Marvelmindデータ(辞書型、IMUデータのみ)を メッセージ文字列化する。 引数: imu_x 位置情報(X軸) imu_y 位置情報(Y軸) imu_z 位置情報(Z軸) imu_qw 四元数(Q) imu_qx 四元数(X) imu_qy 四元数(Y) imu_qz 四元数(Z) imu_vx 速度(X軸) imu_vy 速度(Y軸) imu_vz 速度(Z軸) imu_ax 加速度(X軸) imu_ay 加速度(Y軸) imu_az 加速度(Z軸) imu_gx 角速度(X軸) imu_gy 角速度(Y軸) imu_gz 角速度(Z軸) imu_mx 磁束密度(X軸) imu_my 磁束密度(Y軸) imu_mz 磁束密度(Z軸) imu_timestamp IMUデータ取得時刻 戻り値: メッセージ文字列 """ message = { 'imu/x': to_float(imu_x), 'imu/y': to_float(imu_y), 'imu/z': to_float(imu_z), 'imu/qw': to_float(imu_qw), 'imu/qx': to_float(imu_qx), 'imu/qy': to_float(imu_qy), 'imu/qz': to_float(imu_qz), 'imu/vx': to_float(imu_vx), 'imu/vy': to_float(imu_vy), 'imu/vz': to_float(imu_vz), 'imu/ax': to_float(imu_ax), 'imu/ay': to_float(imu_ay), 'imu/az': to_float(imu_az), 'imu/gx': to_float(imu_gx), 'imu/gy': to_float(imu_gy), 'imu/gz': to_float(imu_gz), 'imu/mx': to_float(imu_mx), 'imu/my': to_float(imu_my), 'imu/mz': to_float(imu_mz), 'imu/timestamp': to_float(imu_timestamp), } return json.dumps(message)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 38864, 10155, 21959, 6312, 23376, 31758, 12298, 50, 38488, 7231, 23294, 116, 8525, 1836, 23294, 247, 25748, 32546, 12045, 226, 14099, 9263, 8943, 31758, 22522, 248, 163, 122, 102, 33623, 25748, 40361, 21091, 24440, 43353, 16764, 198, 37811, 198, 11748, 640, 198, 11748, 33918, 198, 6738, 764, 8692, 1330, 28045, 14881, 11, 284, 62, 22468, 11, 284, 62, 2536, 198, 6738, 764, 26652, 1330, 2240, 62, 704, 469, 62, 385, 28341, 62, 17752, 62, 26652, 11, 2240, 62, 704, 469, 62, 385, 28341, 62, 1831, 62, 17752, 62, 26652, 11, 2240, 62, 704, 469, 62, 320, 84, 62, 17752, 62, 26652, 628, 198, 4871, 1294, 30575, 46471, 7, 46471, 14881, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 12298, 50, 38488, 7231, 2515, 116, 14876, 1836, 33623, 25748, 32546, 12045, 226, 14099, 9263, 8943, 16764, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 1057, 7, 944, 11, 514, 28341, 62, 312, 11, 514, 28341, 62, 87, 11, 514, 28341, 62, 88, 11, 514, 28341, 62, 89, 11, 514, 28341, 62, 9248, 11, 514, 28341, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 14876, 1836, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 312, 220, 220, 220, 220, 220, 220, 220, 14524, 95, 29659, 11482, 9202, 36922, 6312, 24679, 6527, 2389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 9248, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 28938, 239, 33778, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 16514, 27823, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23294, 103, 22180, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 796, 2116, 13, 16366, 13, 12984, 1836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 26652, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 312, 11, 514, 28341, 62, 87, 11, 514, 28341, 62, 88, 11, 514, 28341, 62, 89, 11, 514, 28341, 62, 9248, 11, 514, 28341, 62, 16514, 27823, 828, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 80, 418, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 24442, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 2937, 30575, 46471, 60, 7715, 7243, 34758, 92, 1005, 34758, 92, 4458, 18982, 7, 944, 13, 26652, 11, 965, 7, 1186, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 2937, 30575, 46471, 60, 31456, 34758, 92, 4458, 18982, 7, 944, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 312, 11, 514, 28341, 62, 87, 11, 514, 28341, 62, 88, 11, 514, 28341, 62, 89, 11, 514, 28341, 62, 9248, 11, 514, 28341, 62, 16514, 27823, 22305, 628, 220, 220, 220, 825, 284, 62, 20500, 7, 944, 11, 514, 28341, 62, 312, 11, 514, 28341, 62, 87, 11, 514, 28341, 62, 88, 11, 514, 28341, 62, 89, 11, 220, 198, 220, 220, 220, 514, 28341, 62, 9248, 11, 514, 28341, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 231, 233, 47947, 243, 34402, 233, 43102, 95, 5641, 2515, 123, 5641, 51, 549, 21959, 6312, 23376, 31758, 26998, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 44293, 244, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 312, 220, 220, 220, 220, 220, 220, 220, 14524, 95, 29659, 11482, 9202, 36922, 6312, 24679, 6527, 2389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 9248, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 28938, 239, 33778, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 514, 28341, 62, 16514, 27823, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14524, 94, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 312, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 385, 28341, 62, 312, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 87, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 385, 28341, 62, 87, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 88, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 385, 28341, 62, 88, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 89, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 385, 28341, 62, 89, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 9248, 10354, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 385, 28341, 62, 9248, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 385, 28341, 14, 16514, 27823, 10354, 220, 284, 62, 22468, 7, 385, 28341, 62, 16514, 27823, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 33918, 13, 67, 8142, 7, 20500, 8, 198, 198, 4871, 1294, 30575, 27369, 46471, 7, 46471, 14881, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 36922, 6312, 24679, 6527, 38461, 241, 164, 115, 251, 37239, 95, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 198, 220, 220, 220, 30865, 38488, 7231, 2515, 116, 14876, 1836, 33623, 25748, 32546, 12045, 226, 14099, 9263, 8943, 16764, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 1057, 7, 944, 11, 1233, 62, 312, 11, 1233, 62, 65, 16, 11, 1233, 62, 65, 16, 67, 11, 1233, 62, 65, 17, 11, 1233, 62, 65, 17, 67, 11, 198, 220, 220, 220, 1233, 62, 65, 18, 11, 1233, 62, 65, 18, 67, 11, 1233, 62, 65, 19, 11, 1233, 62, 65, 19, 67, 11, 1233, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 36922, 6312, 24679, 6527, 38461, 241, 164, 115, 251, 37239, 95, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 14876, 1836, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 312, 220, 220, 220, 220, 220, 220, 220, 220, 14524, 95, 29659, 11482, 9202, 36922, 6312, 24679, 6527, 2389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 16, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 16, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 16, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 17, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 17, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 17, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 18, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 19, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 19, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 19, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 19, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 16514, 27823, 220, 14524, 241, 6312, 24679, 6527, 38461, 241, 164, 115, 251, 37239, 95, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23294, 103, 22180, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 796, 2116, 13, 16366, 13, 12984, 1836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 26652, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 312, 11, 1233, 62, 65, 16, 11, 1233, 62, 65, 16, 67, 11, 1233, 62, 65, 17, 11, 1233, 62, 65, 17, 67, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 11, 1233, 62, 65, 18, 67, 11, 1233, 62, 65, 19, 11, 1233, 62, 65, 19, 67, 11, 1233, 62, 16514, 27823, 828, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 80, 418, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 24442, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 2937, 30575, 27369, 46471, 60, 7715, 7243, 34758, 92, 1005, 34758, 92, 4458, 18982, 7, 944, 13, 26652, 11, 965, 7, 1186, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 2937, 30575, 27369, 46471, 60, 31456, 34758, 92, 4458, 18982, 7, 944, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 312, 11, 1233, 62, 65, 16, 11, 1233, 62, 65, 16, 67, 11, 1233, 62, 65, 17, 11, 1233, 62, 65, 17, 67, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 11, 1233, 62, 65, 18, 67, 11, 1233, 62, 65, 19, 11, 1233, 62, 65, 19, 67, 11, 1233, 62, 16514, 27823, 22305, 628, 220, 220, 220, 825, 284, 62, 20500, 7, 944, 11, 1233, 62, 312, 11, 1233, 62, 65, 16, 11, 1233, 62, 65, 16, 67, 11, 1233, 62, 65, 17, 11, 198, 220, 220, 220, 1233, 62, 65, 17, 67, 11, 1233, 62, 65, 18, 11, 1233, 62, 65, 18, 67, 11, 1233, 62, 65, 19, 11, 1233, 62, 65, 19, 67, 11, 1233, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 36922, 6312, 24679, 6527, 38461, 241, 164, 115, 251, 37239, 95, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 198, 220, 220, 220, 220, 220, 220, 220, 14524, 94, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 44293, 244, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 312, 220, 220, 220, 220, 220, 220, 220, 220, 14524, 95, 29659, 11482, 9202, 36922, 6312, 24679, 6527, 2389, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 16, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 16, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 16, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 17, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 17, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 17, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 18, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 18, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 19, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 107, 122, 164, 109, 94, 30201, 26945, 25748, 36922, 6312, 24679, 6527, 2389, 19, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 65, 19, 67, 220, 220, 220, 220, 220, 220, 220, 14524, 241, 6312, 24679, 6527, 2389, 19, 30201, 5641, 164, 115, 251, 37239, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1233, 62, 16514, 27823, 220, 14524, 241, 6312, 24679, 6527, 38461, 241, 164, 115, 251, 37239, 95, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14524, 94, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 312, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 17080, 62, 312, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 16, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 17080, 62, 65, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 16, 67, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 17080, 62, 65, 16, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 17, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 17080, 62, 65, 17, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 17, 67, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 17080, 62, 65, 17, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 18, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 17080, 62, 65, 18, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 18, 67, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 17080, 62, 65, 18, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 19, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 2536, 7, 17080, 62, 65, 19, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 65, 19, 67, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 17080, 62, 65, 19, 67, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17080, 14, 16514, 27823, 10354, 220, 220, 284, 62, 22468, 7, 17080, 62, 16514, 27823, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 33918, 13, 67, 8142, 7, 20500, 8, 198, 198, 4871, 8959, 8577, 549, 8191, 7, 46471, 14881, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 3955, 52, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 198, 220, 220, 220, 30865, 38488, 7231, 2515, 116, 14876, 1836, 33623, 25748, 32546, 12045, 226, 14099, 9263, 8943, 16764, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 1057, 7, 944, 11, 545, 84, 62, 87, 11, 545, 84, 62, 88, 11, 545, 84, 62, 89, 11, 545, 84, 62, 80, 86, 11, 545, 84, 62, 80, 87, 11, 545, 84, 62, 80, 88, 11, 545, 84, 62, 80, 89, 11, 198, 220, 220, 220, 545, 84, 62, 85, 87, 11, 545, 84, 62, 7670, 11, 545, 84, 62, 85, 89, 11, 545, 84, 62, 897, 11, 545, 84, 62, 323, 11, 545, 84, 62, 1031, 11, 545, 84, 62, 70, 87, 11, 545, 84, 62, 1360, 11, 545, 84, 62, 34586, 11, 198, 220, 220, 220, 545, 84, 62, 36802, 11, 545, 84, 62, 1820, 11, 545, 84, 62, 76, 89, 11, 198, 220, 220, 220, 545, 84, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 3955, 52, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 14876, 1836, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 86, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 48, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 55, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 56, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 57, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 7670, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 897, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 323, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1031, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 70, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1360, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 34586, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 36802, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1820, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 76, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 16514, 27823, 220, 220, 8959, 52, 21959, 6312, 23376, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23294, 103, 22180, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1005, 796, 2116, 13, 16366, 13, 12984, 1836, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 26652, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 87, 11, 545, 84, 62, 88, 11, 545, 84, 62, 89, 11, 545, 84, 62, 80, 86, 11, 545, 84, 62, 80, 87, 11, 545, 84, 62, 80, 88, 11, 545, 84, 62, 80, 89, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 87, 11, 545, 84, 62, 7670, 11, 545, 84, 62, 85, 89, 11, 545, 84, 62, 897, 11, 545, 84, 62, 323, 11, 545, 84, 62, 1031, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 70, 87, 11, 545, 84, 62, 1360, 11, 545, 84, 62, 34586, 11, 545, 84, 62, 36802, 11, 545, 84, 62, 1820, 11, 545, 84, 62, 76, 89, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 16514, 27823, 828, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 80, 418, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 24442, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 3955, 8577, 549, 8191, 60, 7715, 7243, 34758, 92, 1005, 34758, 92, 4458, 18982, 7, 944, 13, 26652, 11, 965, 7, 1186, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 58, 3955, 8577, 549, 8191, 60, 31456, 34758, 92, 4458, 18982, 7, 944, 13, 1462, 62, 20500, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 87, 11, 545, 84, 62, 88, 11, 545, 84, 62, 89, 11, 545, 84, 62, 80, 86, 11, 545, 84, 62, 80, 87, 11, 545, 84, 62, 80, 88, 11, 545, 84, 62, 80, 89, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 87, 11, 545, 84, 62, 7670, 11, 545, 84, 62, 85, 89, 11, 545, 84, 62, 897, 11, 545, 84, 62, 323, 11, 545, 84, 62, 1031, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 70, 87, 11, 545, 84, 62, 1360, 11, 545, 84, 62, 34586, 11, 545, 84, 62, 36802, 11, 545, 84, 62, 1820, 11, 545, 84, 62, 76, 89, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 16514, 27823, 22305, 628, 220, 220, 220, 825, 284, 62, 20500, 7, 944, 11, 545, 84, 62, 87, 11, 545, 84, 62, 88, 11, 545, 84, 62, 89, 11, 198, 220, 220, 220, 545, 84, 62, 80, 86, 11, 545, 84, 62, 80, 87, 11, 545, 84, 62, 80, 88, 11, 545, 84, 62, 80, 89, 11, 198, 220, 220, 220, 545, 84, 62, 85, 87, 11, 545, 84, 62, 7670, 11, 545, 84, 62, 85, 89, 11, 198, 220, 220, 220, 545, 84, 62, 897, 11, 545, 84, 62, 323, 11, 545, 84, 62, 1031, 11, 198, 220, 220, 220, 545, 84, 62, 70, 87, 11, 545, 84, 62, 1360, 11, 545, 84, 62, 34586, 11, 198, 220, 220, 220, 545, 84, 62, 36802, 11, 545, 84, 62, 1820, 11, 545, 84, 62, 76, 89, 11, 198, 220, 220, 220, 545, 84, 62, 16514, 27823, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9923, 10155, 21959, 6312, 23376, 7, 164, 122, 252, 162, 249, 116, 161, 252, 233, 23513, 3955, 52, 21959, 6312, 23376, 5641, 2515, 123, 8, 31758, 198, 220, 220, 220, 220, 220, 220, 220, 14524, 94, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 44293, 244, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 120, 243, 46763, 108, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 235, 163, 121, 106, 46349, 227, 161, 254, 109, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 86, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 48, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 55, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 88, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 56, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 80, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 249, 17739, 225, 46763, 108, 7, 57, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 7670, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 85, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16268, 222, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 897, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 323, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1031, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 232, 254, 34460, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 70, 87, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1360, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 34586, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 100, 240, 34460, 253, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 36802, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 55, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 1820, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 56, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 76, 89, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13328, 96, 223, 30266, 253, 43380, 228, 41753, 99, 7, 57, 43102, 116, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 545, 84, 62, 16514, 27823, 220, 220, 8959, 52, 21959, 6312, 23376, 20998, 244, 36181, 245, 162, 25081, 26344, 119, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 119, 28255, 161, 222, 97, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14524, 94, 14777, 47271, 6312, 21091, 23877, 229, 27764, 245, 26344, 245, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 87, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 87, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 88, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 88, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 89, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 89, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 80, 86, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 80, 86, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 80, 87, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 80, 87, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 80, 88, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 80, 88, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 80, 89, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 80, 89, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 85, 87, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 85, 87, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 7670, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 7670, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 85, 89, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 85, 89, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 897, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 897, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 323, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 323, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 1031, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 1031, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 70, 87, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 70, 87, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 1360, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 1360, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 34586, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 34586, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 36802, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 36802, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 1820, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 1820, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 76, 89, 10354, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 76, 89, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 320, 84, 14, 16514, 27823, 10354, 220, 220, 220, 284, 62, 22468, 7, 320, 84, 62, 16514, 27823, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 33918, 13, 67, 8142, 7, 20500, 8 ]
1.284786
6,770
''' Author: Jason.Parks Created: April 25, 2012 Module: menu.clean.__init__ Purpose: to import menu clean ''' if not __name__ == '__main__': print "menu.clean.__init__ imported"
[ 7061, 6, 198, 13838, 25, 8982, 13, 47, 5558, 198, 41972, 25, 3035, 1679, 11, 2321, 198, 26796, 25, 6859, 13, 27773, 13, 834, 15003, 834, 198, 30026, 3455, 25, 284, 1330, 6859, 3424, 220, 198, 7061, 6, 198, 197, 198, 361, 407, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 197, 198, 197, 4798, 366, 26272, 13, 27773, 13, 834, 15003, 834, 17392, 1, 220 ]
2.731343
67
from membase.api.rest_client import RestConnection, RestHelper from memcached.helper.data_helper import MemcachedClientHelper from remote.remote_util import RemoteMachineShellConnection from mc_bin_client import MemcachedClient, MemcachedError from membase.api.exception import ServerAlreadyJoinedException from membase.helper.rebalance_helper import RebalanceHelper from TestInput import TestInputSingleton import memcacheConstants import logger import testconstants import time import queue from threading import Thread import traceback
[ 6738, 1066, 8692, 13, 15042, 13, 2118, 62, 16366, 1330, 8324, 32048, 11, 8324, 47429, 198, 6738, 1066, 66, 2317, 13, 2978, 525, 13, 7890, 62, 2978, 525, 1330, 4942, 66, 2317, 11792, 47429, 198, 6738, 6569, 13, 47960, 62, 22602, 1330, 21520, 37573, 23248, 32048, 198, 6738, 36650, 62, 8800, 62, 16366, 1330, 4942, 66, 2317, 11792, 11, 4942, 66, 2317, 12331, 198, 6738, 1066, 8692, 13, 15042, 13, 1069, 4516, 1330, 9652, 37447, 24363, 16922, 198, 6738, 1066, 8692, 13, 2978, 525, 13, 260, 20427, 62, 2978, 525, 1330, 797, 20427, 47429, 198, 6738, 6208, 20560, 1330, 6208, 20560, 29974, 10565, 198, 11748, 1066, 23870, 34184, 1187, 198, 198, 11748, 49706, 198, 11748, 1332, 9979, 1187, 198, 11748, 640, 198, 11748, 16834, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 12854, 1891, 628 ]
4.007407
135
import pytest import torch from nanodet.model.backbone import ResNet, build_backbone
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 6738, 15709, 375, 316, 13, 19849, 13, 1891, 15992, 1330, 1874, 7934, 11, 1382, 62, 1891, 15992, 628 ]
3.346154
26
import socket import sys import time throttle_position=1000 throttle_min =0 throttle_max = 0xffff from tkinter import * master = Tk() master.geometry("500x500") master.columnconfigure(0, weight=1) master.rowconfigure(0, weight=1) w1 = Scale(master, from_=throttle_min, to=throttle_max, tickinterval=10) w1.set(throttle_min) w1.pack(fill=BOTH) # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Bind the socket to the port server_address = ("192.168.0.94",10000) print ( "starting up "+ str(server_address)) sock.bind(server_address) # Listen for incoming connections sock.listen(1) while True: # Wait for a connection print ("waiting for a connection") connection, client_address = sock.accept() try: print("connection from"+ str(client_address)) # Receive the data in small chunks and retransmit it while True: connection.sendall(w1.get().to_bytes(2, byteorder='big')) time.sleep(0.1) master.update_idletasks() master.update() finally: # Clean up the connection connection.close()
[ 11748, 17802, 198, 11748, 25064, 198, 11748, 640, 198, 198, 26110, 23296, 62, 9150, 28, 12825, 198, 26110, 23296, 62, 1084, 796, 15, 198, 26110, 23296, 62, 9806, 796, 657, 87, 12927, 628, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 9866, 796, 309, 74, 3419, 198, 9866, 13, 469, 15748, 7203, 4059, 87, 4059, 4943, 198, 9866, 13, 28665, 11250, 495, 7, 15, 11, 3463, 28, 16, 8, 198, 9866, 13, 808, 11250, 495, 7, 15, 11, 3463, 28, 16, 8, 198, 86, 16, 796, 21589, 7, 9866, 11, 422, 62, 28, 26110, 23296, 62, 1084, 11, 284, 28, 26110, 23296, 62, 9806, 11, 4378, 3849, 2100, 28, 940, 8, 198, 86, 16, 13, 2617, 7, 26110, 23296, 62, 1084, 8, 198, 86, 16, 13, 8002, 7, 20797, 28, 33, 26946, 8, 198, 198, 2, 13610, 257, 23633, 14, 4061, 17802, 198, 82, 735, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 198, 198, 2, 41211, 262, 17802, 284, 262, 2493, 198, 15388, 62, 21975, 796, 5855, 17477, 13, 14656, 13, 15, 13, 5824, 1600, 49388, 8, 198, 4798, 357, 366, 38690, 510, 43825, 965, 7, 15388, 62, 21975, 4008, 198, 82, 735, 13, 21653, 7, 15388, 62, 21975, 8, 198, 198, 2, 20600, 329, 15619, 8787, 198, 82, 735, 13, 4868, 268, 7, 16, 8, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1303, 16314, 329, 257, 4637, 198, 220, 220, 220, 3601, 5855, 10247, 1780, 329, 257, 4637, 4943, 198, 220, 220, 220, 4637, 11, 5456, 62, 21975, 796, 32263, 13, 13635, 3419, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 38659, 422, 1, 10, 965, 7, 16366, 62, 21975, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 797, 15164, 262, 1366, 287, 1402, 22716, 290, 1005, 26084, 2781, 340, 198, 220, 220, 220, 220, 220, 220, 220, 981, 6407, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4637, 13, 21280, 439, 7, 86, 16, 13, 1136, 22446, 1462, 62, 33661, 7, 17, 11, 18022, 2875, 11639, 14261, 6, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 15, 13, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4958, 13, 19119, 62, 312, 1616, 6791, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4958, 13, 19119, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 3443, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5985, 510, 262, 4637, 198, 220, 220, 220, 220, 220, 220, 220, 4637, 13, 19836, 3419, 198 ]
2.473002
463
from pyroombaadapter.pyroombaadapter import PyRoombaAdapter
[ 6738, 12972, 305, 2381, 64, 324, 3429, 13, 9078, 305, 2381, 64, 324, 3429, 1330, 9485, 15450, 2381, 64, 47307, 198 ]
2.857143
21
import argparse class Parameters: """Global parameters""" parser = argparse.ArgumentParser(description='Testing parameters') parser.add_argument("-p1", dest="param1", help="parameter1") parser.add_argument("-p2", dest="param2", help="parameter2") params = parser.parse_args() input_parameters = Parameters(param1=params.param1,param2=params.param2) view_parameters(input_parameters)
[ 11748, 1822, 29572, 201, 198, 201, 198, 4871, 40117, 25, 201, 198, 220, 220, 220, 37227, 22289, 10007, 37811, 201, 198, 220, 220, 220, 220, 201, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 44154, 10007, 11537, 201, 198, 48610, 13, 2860, 62, 49140, 7203, 12, 79, 16, 1600, 2244, 2625, 17143, 16, 1600, 1037, 2625, 17143, 2357, 16, 4943, 201, 198, 48610, 13, 2860, 62, 49140, 7203, 12, 79, 17, 1600, 2244, 2625, 17143, 17, 1600, 1037, 2625, 17143, 2357, 17, 4943, 201, 198, 201, 198, 37266, 796, 30751, 13, 29572, 62, 22046, 3419, 201, 198, 201, 198, 15414, 62, 17143, 7307, 796, 40117, 7, 17143, 16, 28, 37266, 13, 17143, 16, 11, 17143, 17, 28, 37266, 13, 17143, 17, 8, 201, 198, 201, 198, 1177, 62, 17143, 7307, 7, 15414, 62, 17143, 7307, 8, 201, 198, 201, 198, 201, 198 ]
2.835616
146
import os from pathlib import Path from smarts.sstudio import gen_scenario from smarts.sstudio.types import ( Mission, Route, SocialAgentActor, Scenario, ) actors = [ SocialAgentActor( name=f"non-interactive-agent-{speed}-v0", agent_locator="zoo.policies:non-interactive-agent-v0", policy_kwargs={"speed": speed}, ) for speed in [10, 30, 80] ] gen_scenario( Scenario( social_agent_missions={ "group-1": (actors, [to_mission("edge-north-NS", "edge-south-NS")]), "group-2": (actors, [to_mission("edge-west-WE", "edge-east-WE")]), "group-3": (actors, [to_mission("edge-east-EW", "edge-west-EW")]), "group-4": (actors, [to_mission("edge-south-SN", "edge-north-SN")]), } ), output_dir=Path(__file__).parent, )
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 4451, 82, 13, 82, 19149, 952, 1330, 2429, 62, 1416, 39055, 198, 6738, 4451, 82, 13, 82, 19149, 952, 13, 19199, 1330, 357, 198, 220, 220, 220, 12633, 11, 198, 220, 220, 220, 18956, 11, 198, 220, 220, 220, 5483, 36772, 40277, 11, 198, 220, 220, 220, 1446, 39055, 11, 198, 8, 198, 198, 529, 669, 796, 685, 198, 220, 220, 220, 5483, 36772, 40277, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 28, 69, 1, 13159, 12, 3849, 5275, 12, 25781, 12, 90, 12287, 92, 12, 85, 15, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 5797, 62, 17946, 1352, 2625, 89, 2238, 13, 79, 4160, 444, 25, 13159, 12, 3849, 5275, 12, 25781, 12, 85, 15, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 2450, 62, 46265, 22046, 28, 4895, 12287, 1298, 2866, 5512, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 329, 2866, 287, 685, 940, 11, 1542, 11, 4019, 60, 198, 60, 628, 198, 198, 5235, 62, 1416, 39055, 7, 198, 220, 220, 220, 1446, 39055, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1919, 62, 25781, 62, 8481, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8094, 12, 16, 1298, 357, 529, 669, 11, 685, 1462, 62, 3411, 7203, 14907, 12, 43588, 12, 8035, 1600, 366, 14907, 12, 35782, 12, 8035, 4943, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8094, 12, 17, 1298, 357, 529, 669, 11, 685, 1462, 62, 3411, 7203, 14907, 12, 7038, 12, 8845, 1600, 366, 14907, 12, 23316, 12, 8845, 4943, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8094, 12, 18, 1298, 357, 529, 669, 11, 685, 1462, 62, 3411, 7203, 14907, 12, 23316, 12, 6217, 1600, 366, 14907, 12, 7038, 12, 6217, 4943, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8094, 12, 19, 1298, 357, 529, 669, 11, 685, 1462, 62, 3411, 7203, 14907, 12, 35782, 12, 15571, 1600, 366, 14907, 12, 43588, 12, 15571, 4943, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 10612, 198, 220, 220, 220, 5072, 62, 15908, 28, 15235, 7, 834, 7753, 834, 737, 8000, 11, 198, 8, 198 ]
2.126904
394
## STEP: GATHER DATA # data source: where.data, Google Geodata API # edit where.data to add an address nearby where you live # use the Google geocoding API to clean up some user-entered geographic locations of university names import urllib.request, urllib.parse, urllib.error import http import sqlite3 import json import time import ssl import sys api_key = False # If you have a Google Places API key, enter it here # api_key = 'AIzaSy___IDByT70' if api_key is False: # If you do not have a Google Places API key, use data subset from Py4E server # no rate limit api_key = 42 serviceurl = "http://py4e-data.dr-chuck.net/json?" else: # If you have a Google Places API key serviceurl = "https://maps.googleapis.com/maps/api/geocode/json?" # Additional detail for urllib # http.client.HTTPConnection.debuglevel = 1 # connection to the database which checks access to the file geodata.sqlite # if this file doesn't exist, it creates geodata.sqlite conn = sqlite3.connect('geodata.sqlite') # database handle cur = conn.cursor() # create table Locations # attributes/columns: address (string from where.data), geodata (JSON from API) cur.execute(''' CREATE TABLE IF NOT EXISTS Locations (address TEXT, geodata TEXT)''') # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE # Google geocoding API is rate limited to a fixed number of requests per day # So if you have a lot of data you might need to stop and restart the lookup process several times. # So we break the problem into two phases. # First phase: # take input address data in the file where.data and read it one line at a time, # retrieve the geocoded response and store it in database (geodata.sqlite). # Before we use the geocoding API, we simply check to see if # we already have the data for that particular line of input # You can re-start the process at any time by removing the file geodata.sqlite # You can stop at any time, # and there is a counter that you can use to limit the number of calls to the geocoding API for each run file_handle = open("where.data") count = 0 for line in file_handle: # retrieve 200 addresses if count > 200 : print('Retrieved 200 locations, restart to retrieve more') break # Remove spaces at the beginning and at the end of the address address = line.strip() print('') # from the Locations table, select the row corresponding to this address, and select its geodata column cur.execute("SELECT geodata FROM Locations WHERE address= ?", (memoryview(address.encode()), )) # scan to the point where you find un-retrieved locations and starts retrieving them try: # retrieve data after executing a SELECT statement # call the cursor’s fetchone() method to retrieve a single matching row data = cur.fetchone()[0] # address is already in database, so skip and continue with next address print("Found in database ", address) continue except: # if we don't have the data for the location go on to # call the geocoding API to retrieve the data and store it in the database. pass # create url to get json data fro that address from API parms = dict() # parms dictionary: {'adress':address} parms["address"] = address # parms dictionary: {'key':api_key} if api_key is not False: parms['key'] = api_key # concatenate this encoded address with URL ...json? url = serviceurl + urllib.parse.urlencode(parms) print('Retrieving', url) # url web data handle url_handle = urllib.request.urlopen(url, context=ctx) # decode web data from UTF8 to Unicode data = url_handle.read().decode() print('Retrieved', len(data), 'characters', data[:20].replace('\n', ' ')) count = count + 1 try: # parse string containing json into structured object # json_data is python dictionary json_data = json.loads(data) except: print(data) # We print in case unicode causes an error continue # look at status field of json data if 'status' not in json_data or (json_data['status'] != 'OK' and json_data['status'] != 'ZERO_RESULTS') : print('==== Failure To Retrieve ====') print(data) break # insert new address and associated geodata into database cur.execute('''INSERT INTO Locations (address, geodata) VALUES ( ?, ? )''', (memoryview(address.encode()), memoryview(data.encode()) ) ) # commit to database conn.commit() # every 10th address, pause for 5 seconds # (pauses help to respect rate limit) if count % 10 == 0 : print('Pausing for a bit...') time.sleep(5) # Once you have some data loaded into geodata.sqlite, # you can visualize the data using the geodump.py program. print("Run geodump.py to read the data from the database so you can vizualize it on a map.")
[ 2235, 49154, 25, 402, 45226, 42865, 198, 2, 1366, 2723, 25, 810, 13, 7890, 11, 3012, 2269, 375, 1045, 7824, 198, 2, 4370, 810, 13, 7890, 284, 751, 281, 2209, 6716, 810, 345, 2107, 198, 2, 779, 262, 3012, 4903, 420, 7656, 7824, 284, 3424, 510, 617, 2836, 12, 298, 1068, 22987, 7064, 286, 6403, 3891, 198, 198, 11748, 2956, 297, 571, 13, 25927, 11, 2956, 297, 571, 13, 29572, 11, 2956, 297, 571, 13, 18224, 198, 11748, 2638, 198, 11748, 44161, 578, 18, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 264, 6649, 198, 11748, 25064, 198, 198, 15042, 62, 2539, 796, 10352, 198, 2, 1002, 345, 423, 257, 3012, 37291, 7824, 1994, 11, 3802, 340, 994, 198, 2, 40391, 62, 2539, 796, 705, 20185, 4496, 13940, 17569, 2389, 3886, 51, 2154, 6, 198, 198, 361, 40391, 62, 2539, 318, 10352, 25, 198, 220, 220, 220, 1303, 1002, 345, 466, 407, 423, 257, 3012, 37291, 7824, 1994, 11, 779, 1366, 24637, 422, 9485, 19, 36, 4382, 198, 220, 220, 220, 1303, 645, 2494, 4179, 198, 220, 220, 220, 40391, 62, 2539, 796, 5433, 198, 220, 220, 220, 2139, 6371, 796, 366, 4023, 1378, 9078, 19, 68, 12, 7890, 13, 7109, 12, 354, 1347, 13, 3262, 14, 17752, 1701, 198, 17772, 25, 198, 220, 220, 220, 1303, 1002, 345, 423, 257, 3012, 37291, 7824, 1994, 198, 220, 220, 220, 2139, 6371, 796, 366, 5450, 1378, 31803, 13, 13297, 499, 271, 13, 785, 14, 31803, 14, 15042, 14, 469, 420, 1098, 14, 17752, 1701, 198, 198, 2, 15891, 3703, 329, 2956, 297, 571, 198, 2, 2638, 13, 16366, 13, 40717, 32048, 13, 24442, 5715, 796, 352, 198, 198, 2, 4637, 284, 262, 6831, 543, 8794, 1895, 284, 262, 2393, 4903, 375, 1045, 13, 25410, 578, 198, 2, 611, 428, 2393, 1595, 470, 2152, 11, 340, 8075, 4903, 375, 1045, 13, 25410, 578, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 469, 375, 1045, 13, 25410, 578, 11537, 198, 2, 6831, 5412, 198, 22019, 796, 48260, 13, 66, 21471, 3419, 198, 198, 2, 2251, 3084, 41277, 198, 2, 12608, 14, 28665, 82, 25, 2209, 357, 8841, 422, 810, 13, 7890, 828, 4903, 375, 1045, 357, 40386, 422, 7824, 8, 198, 22019, 13, 41049, 7, 7061, 6, 198, 43387, 6158, 43679, 16876, 5626, 7788, 1797, 4694, 41277, 357, 21975, 40383, 11, 4903, 375, 1045, 40383, 8, 7061, 11537, 198, 198, 2, 41032, 25952, 10703, 8563, 198, 49464, 796, 264, 6649, 13, 17953, 62, 12286, 62, 22866, 3419, 198, 49464, 13, 9122, 62, 4774, 3672, 796, 10352, 198, 49464, 13, 332, 1958, 62, 14171, 796, 264, 6649, 13, 34, 17395, 62, 45, 11651, 198, 198, 2, 3012, 4903, 420, 7656, 7824, 318, 2494, 3614, 284, 257, 5969, 1271, 286, 7007, 583, 1110, 198, 2, 1406, 611, 345, 423, 257, 1256, 286, 1366, 345, 1244, 761, 284, 2245, 290, 15765, 262, 35847, 1429, 1811, 1661, 13, 198, 2, 1406, 356, 2270, 262, 1917, 656, 734, 21164, 13, 198, 198, 2, 3274, 7108, 25, 198, 2, 1011, 5128, 2209, 1366, 287, 262, 2393, 810, 13, 7890, 290, 1100, 340, 530, 1627, 379, 257, 640, 11, 198, 2, 19818, 262, 4903, 420, 9043, 2882, 290, 3650, 340, 287, 6831, 357, 469, 375, 1045, 13, 25410, 578, 737, 198, 2, 7413, 356, 779, 262, 4903, 420, 7656, 7824, 11, 356, 2391, 2198, 284, 766, 611, 198, 2, 356, 1541, 423, 262, 1366, 329, 326, 1948, 1627, 286, 5128, 198, 2, 921, 460, 302, 12, 9688, 262, 1429, 379, 597, 640, 416, 10829, 262, 2393, 4903, 375, 1045, 13, 25410, 578, 198, 2, 921, 460, 2245, 379, 597, 640, 11, 198, 2, 290, 612, 318, 257, 3753, 326, 345, 460, 779, 284, 4179, 262, 1271, 286, 3848, 284, 262, 4903, 420, 7656, 7824, 329, 1123, 1057, 198, 7753, 62, 28144, 796, 1280, 7203, 3003, 13, 7890, 4943, 198, 9127, 796, 657, 198, 1640, 1627, 287, 2393, 62, 28144, 25, 198, 220, 220, 220, 1303, 19818, 939, 9405, 198, 220, 220, 220, 611, 954, 1875, 939, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 9781, 28130, 939, 7064, 11, 15765, 284, 19818, 517, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 1303, 17220, 9029, 379, 262, 3726, 290, 379, 262, 886, 286, 262, 2209, 198, 220, 220, 220, 2209, 796, 1627, 13, 36311, 3419, 198, 220, 220, 220, 3601, 7, 7061, 8, 628, 220, 220, 220, 1303, 422, 262, 41277, 3084, 11, 2922, 262, 5752, 11188, 284, 428, 2209, 11, 290, 2922, 663, 4903, 375, 1045, 5721, 198, 220, 220, 220, 1090, 13, 41049, 7203, 46506, 4903, 375, 1045, 16034, 41277, 33411, 2209, 28, 5633, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 357, 31673, 1177, 7, 21975, 13, 268, 8189, 3419, 828, 15306, 628, 220, 220, 220, 1303, 9367, 284, 262, 966, 810, 345, 1064, 555, 12, 1186, 28130, 7064, 290, 4940, 50122, 606, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 19818, 1366, 706, 23710, 257, 33493, 2643, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 869, 262, 23493, 447, 247, 82, 21207, 505, 3419, 2446, 284, 19818, 257, 2060, 12336, 5752, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 1090, 13, 69, 7569, 505, 3419, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2209, 318, 1541, 287, 6831, 11, 523, 14267, 290, 2555, 351, 1306, 2209, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 21077, 287, 6831, 33172, 2209, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 611, 356, 836, 470, 423, 262, 1366, 329, 262, 4067, 467, 319, 284, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 869, 262, 4903, 420, 7656, 7824, 284, 19818, 262, 1366, 290, 3650, 340, 287, 262, 6831, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 1303, 2251, 19016, 284, 651, 33918, 1366, 8400, 326, 2209, 422, 7824, 198, 220, 220, 220, 1582, 907, 796, 8633, 3419, 198, 220, 220, 220, 1303, 1582, 907, 22155, 25, 1391, 6, 324, 601, 10354, 21975, 92, 198, 220, 220, 220, 1582, 907, 14692, 21975, 8973, 796, 2209, 198, 220, 220, 220, 1303, 1582, 907, 22155, 25, 1391, 6, 2539, 10354, 15042, 62, 2539, 92, 198, 220, 220, 220, 611, 40391, 62, 2539, 318, 407, 10352, 25, 1582, 907, 17816, 2539, 20520, 796, 40391, 62, 2539, 198, 220, 220, 220, 1303, 1673, 36686, 378, 428, 30240, 2209, 351, 10289, 2644, 17752, 30, 198, 220, 220, 220, 19016, 796, 2139, 6371, 1343, 2956, 297, 571, 13, 29572, 13, 6371, 268, 8189, 7, 1845, 907, 8, 628, 220, 220, 220, 3601, 10786, 9781, 37418, 3256, 19016, 8, 198, 220, 220, 220, 1303, 19016, 3992, 1366, 5412, 198, 220, 220, 220, 19016, 62, 28144, 796, 2956, 297, 571, 13, 25927, 13, 6371, 9654, 7, 6371, 11, 4732, 28, 49464, 8, 198, 220, 220, 220, 1303, 36899, 3992, 1366, 422, 41002, 23, 284, 34371, 198, 220, 220, 220, 1366, 796, 19016, 62, 28144, 13, 961, 22446, 12501, 1098, 3419, 198, 220, 220, 220, 3601, 10786, 9781, 28130, 3256, 18896, 7, 7890, 828, 705, 10641, 19858, 3256, 1366, 58, 25, 1238, 4083, 33491, 10786, 59, 77, 3256, 705, 705, 4008, 198, 220, 220, 220, 954, 796, 954, 1343, 352, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 21136, 4731, 7268, 33918, 656, 20793, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 33918, 62, 7890, 318, 21015, 22155, 198, 220, 220, 220, 220, 220, 220, 220, 33918, 62, 7890, 796, 33918, 13, 46030, 7, 7890, 8, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 7890, 8, 220, 1303, 775, 3601, 287, 1339, 28000, 1098, 5640, 281, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 1303, 804, 379, 3722, 2214, 286, 33918, 1366, 198, 220, 220, 220, 611, 705, 13376, 6, 407, 287, 33918, 62, 7890, 393, 357, 17752, 62, 7890, 17816, 13376, 20520, 14512, 705, 11380, 6, 290, 33918, 62, 7890, 17816, 13376, 20520, 14512, 705, 57, 34812, 62, 46274, 11537, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 1421, 25743, 1675, 4990, 30227, 796, 18604, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 7890, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 628, 220, 220, 220, 1303, 7550, 649, 2209, 290, 3917, 4903, 375, 1045, 656, 6831, 198, 220, 220, 220, 1090, 13, 41049, 7, 7061, 6, 20913, 17395, 39319, 41277, 357, 21975, 11, 4903, 375, 1045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26173, 35409, 357, 5633, 11, 5633, 1267, 7061, 3256, 357, 31673, 1177, 7, 21975, 13, 268, 8189, 3419, 828, 4088, 1177, 7, 7890, 13, 268, 8189, 28955, 1267, 1267, 198, 220, 220, 220, 1303, 4589, 284, 6831, 198, 220, 220, 220, 48260, 13, 41509, 3419, 198, 220, 220, 220, 1303, 790, 838, 400, 2209, 11, 14985, 329, 642, 4201, 198, 220, 220, 220, 1303, 357, 8957, 2664, 1037, 284, 2461, 2494, 4179, 8, 198, 220, 220, 220, 611, 954, 4064, 838, 6624, 657, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 28875, 3500, 329, 257, 1643, 986, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 640, 13, 42832, 7, 20, 8, 198, 198, 2, 4874, 345, 423, 617, 1366, 9639, 656, 4903, 375, 1045, 13, 25410, 578, 11, 198, 2, 345, 460, 38350, 262, 1366, 1262, 262, 4903, 375, 931, 13, 9078, 1430, 13, 198, 4798, 7203, 10987, 4903, 375, 931, 13, 9078, 284, 1100, 262, 1366, 422, 262, 6831, 523, 345, 460, 48569, 723, 1096, 340, 319, 257, 3975, 19570, 198 ]
3.037851
1,638
from setuptools import setup setup( name='gdal2tilesp.py', version='3.14.15926', author='', author_email='', packages=['.'], scripts=['gdal2tilesp.py'], url='https://github.com/roblabs/gdal2tilesp', license='LICENSE.txt', description='Enhancements to tile cutter for parallelism and image format support', long_description=open('README.md').read(), )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 21287, 282, 17, 83, 2915, 79, 13, 9078, 3256, 198, 220, 220, 220, 2196, 11639, 18, 13, 1415, 13, 19707, 2075, 3256, 198, 220, 220, 220, 1772, 11639, 3256, 198, 220, 220, 220, 1772, 62, 12888, 11639, 3256, 198, 220, 220, 220, 10392, 28, 17816, 2637, 4357, 198, 220, 220, 220, 14750, 28, 17816, 21287, 282, 17, 83, 2915, 79, 13, 9078, 6, 4357, 198, 220, 220, 220, 19016, 11639, 5450, 1378, 12567, 13, 785, 14, 305, 2436, 8937, 14, 21287, 282, 17, 83, 2915, 79, 3256, 198, 220, 220, 220, 5964, 11639, 43, 2149, 24290, 13, 14116, 3256, 198, 220, 220, 220, 6764, 11639, 35476, 590, 902, 284, 17763, 38121, 329, 10730, 1042, 290, 2939, 5794, 1104, 3256, 198, 220, 220, 220, 890, 62, 11213, 28, 9654, 10786, 15675, 11682, 13, 9132, 27691, 961, 22784, 198, 8, 198 ]
2.529032
155
stack = MinStackNew() stack.push(0) stack.push(-1) stack.push(0) x = stack.getMin() print(x) stack.pop() stack.pop() x = stack.getMin() print(x)
[ 197, 197, 198, 197, 197, 198, 198, 25558, 796, 1855, 25896, 3791, 3419, 198, 25558, 13, 14689, 7, 15, 8, 198, 25558, 13, 14689, 32590, 16, 8, 198, 25558, 13, 14689, 7, 15, 8, 198, 87, 796, 8931, 13, 1136, 9452, 3419, 198, 4798, 7, 87, 8, 198, 25558, 13, 12924, 3419, 198, 25558, 13, 12924, 3419, 198, 87, 796, 8931, 13, 1136, 9452, 3419, 198, 4798, 7, 87, 8 ]
2.157143
70
#from simplejson import JSONDecoder #from simplejson import JSONEncoder # -------------------------------------------------------------------------------------- # This block define the input of the app # the name of style is not difined # json_example: # '{"State": "Normal", "Style": "10", "Moves": [[1, 2], [1, 0], [0, 0], [1, 1], [1, 3]]}' # # dict_example: # {'State': 'Normal', 'Style': '10', 'Moves': [(1, 2), (1, 0), (0, 0), (1, 1), (1, 3)]} # Moves could be a set or a list # -------------------------------------------------------------------------------------- # rule one: using tuple to define a point # rule two: the massage flow in the program is dict:last_move # rule three: the procession in this file only work well if you make sure that "move" is not empty # -------------------------------------------------------------------------------------- class Information(object): """ This class define the information using in communication between server and users """ class ChessBoard(object): """ChessBoard is the board of the game""" from generator import * if __name__ == '__main__': main()
[ 201, 198, 2, 6738, 2829, 17752, 1330, 19449, 10707, 12342, 201, 198, 2, 6738, 2829, 17752, 1330, 19449, 27195, 12342, 201, 198, 201, 198, 201, 198, 2, 16529, 19351, 438, 201, 198, 2, 770, 2512, 8160, 262, 5128, 286, 262, 598, 201, 198, 2, 262, 1438, 286, 3918, 318, 407, 288, 361, 1389, 201, 198, 2, 33918, 62, 20688, 25, 201, 198, 2, 705, 4895, 9012, 1298, 366, 26447, 1600, 366, 21466, 1298, 366, 940, 1600, 366, 44, 5241, 1298, 16410, 16, 11, 362, 4357, 685, 16, 11, 657, 4357, 685, 15, 11, 657, 4357, 685, 16, 11, 352, 4357, 685, 16, 11, 513, 11907, 92, 6, 201, 198, 2, 220, 201, 198, 2, 8633, 62, 20688, 25, 201, 198, 2, 1391, 6, 9012, 10354, 705, 26447, 3256, 705, 21466, 10354, 705, 940, 3256, 705, 44, 5241, 10354, 47527, 16, 11, 362, 828, 357, 16, 11, 657, 828, 357, 15, 11, 657, 828, 357, 16, 11, 352, 828, 357, 16, 11, 513, 15437, 92, 201, 198, 2, 38213, 714, 307, 257, 900, 393, 257, 1351, 201, 198, 2, 16529, 19351, 438, 201, 198, 2, 3896, 530, 25, 1262, 46545, 284, 8160, 257, 966, 201, 198, 2, 3896, 734, 25, 262, 26900, 5202, 287, 262, 1430, 318, 8633, 25, 12957, 62, 21084, 201, 198, 2, 3896, 1115, 25, 262, 37968, 287, 428, 2393, 691, 670, 880, 611, 345, 787, 1654, 326, 220, 366, 21084, 1, 318, 407, 6565, 201, 198, 2, 16529, 19351, 438, 201, 198, 4871, 6188, 7, 15252, 2599, 201, 198, 220, 220, 220, 37227, 770, 1398, 8160, 262, 1321, 1262, 287, 6946, 1022, 4382, 290, 2985, 37227, 201, 198, 201, 198, 201, 198, 4871, 25774, 29828, 7, 15252, 2599, 201, 198, 220, 220, 220, 37227, 7376, 824, 29828, 318, 262, 3096, 286, 262, 983, 37811, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 6738, 17301, 1330, 1635, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
3.452663
338
""" Build and run any AuTuMN model, storing the outputs """ import os import logging import yaml from datetime import datetime from autumn import constants from autumn.tool_kit.timer import Timer from autumn.tool_kit.serializer import serialize_model from autumn.tool_kit.scenarios import Scenario from autumn.tool_kit.utils import ( get_git_branch, get_git_hash, ) from autumn.db.models import store_run_models logger = logging.getLogger(__name__) def build_model_runner( model_name: str, param_set_name: str, build_model, params: dict, ): """ Factory function that returns a 'run_model' function. """ assert model_name, "Value 'model_name' must be set." assert build_model, "Value 'build_model' must be set." assert params, "Value 'params' must be set." if not param_set_name: param_set_name = "main-model" def run_model(run_scenarios=True): """ Run the model, save the outputs. """ logger.info(f"Running {model_name} {param_set_name}...") # Ensure project folder exists. project_dir = os.path.join(constants.OUTPUT_DATA_PATH, "run", model_name, param_set_name) timestamp = datetime.now().strftime("%Y-%m-%d--%H-%M-%S") output_dir = os.path.join(project_dir, timestamp) os.makedirs(output_dir, exist_ok=True) # Determine where to save model outputs output_db_path = os.path.join(output_dir, "outputs.db") # Save model parameters to output dir. param_path = os.path.join(output_dir, "params.yml") with open(param_path, "w") as f: yaml.dump(params, f) # Save model run metadata to output dir. meta_path = os.path.join(output_dir, "meta.yml") metadata = { "model_name": model_name, "param_set_name": param_set_name, "start_time": timestamp, "git_branch": get_git_branch(), "git_commit": get_git_hash(), } with open(meta_path, "w") as f: yaml.dump(metadata, f) with Timer("Running model scenarios"): num_scenarios = 1 + len(params["scenarios"].keys()) scenarios = [] for scenario_idx in range(num_scenarios): scenario = Scenario(build_model, scenario_idx, params) scenarios.append(scenario) # Run the baseline scenario. baseline_scenario = scenarios[0] baseline_scenario.run() baseline_model = baseline_scenario.model save_serialized_model(baseline_model, output_dir, "baseline") if not run_scenarios: # Do not run non-baseline models scenarios = scenarios[:1] # Run all the other scenarios for scenario in scenarios[1:]: scenario.run(base_model=baseline_model) name = f"scenario-{scenario.idx}" save_serialized_model(scenario.model, output_dir, name) with Timer("Saving model outputs to the database"): models = [s.model for s in scenarios] store_run_models(models, output_db_path) return run_model
[ 37811, 198, 15580, 290, 1057, 597, 40666, 47247, 39764, 2746, 11, 23069, 262, 23862, 198, 37811, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 331, 43695, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 6738, 23608, 1330, 38491, 198, 6738, 23608, 13, 25981, 62, 15813, 13, 45016, 1330, 5045, 263, 198, 6738, 23608, 13, 25981, 62, 15813, 13, 46911, 7509, 1330, 11389, 1096, 62, 19849, 198, 6738, 23608, 13, 25981, 62, 15813, 13, 1416, 268, 13010, 1330, 1446, 39055, 198, 6738, 23608, 13, 25981, 62, 15813, 13, 26791, 1330, 357, 198, 220, 220, 220, 651, 62, 18300, 62, 1671, 3702, 11, 198, 220, 220, 220, 651, 62, 18300, 62, 17831, 11, 198, 8, 198, 6738, 23608, 13, 9945, 13, 27530, 1330, 3650, 62, 5143, 62, 27530, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 1382, 62, 19849, 62, 16737, 7, 198, 220, 220, 220, 2746, 62, 3672, 25, 965, 11, 5772, 62, 2617, 62, 3672, 25, 965, 11, 1382, 62, 19849, 11, 42287, 25, 8633, 11, 198, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 19239, 2163, 326, 5860, 257, 705, 5143, 62, 19849, 6, 2163, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6818, 2746, 62, 3672, 11, 366, 11395, 705, 19849, 62, 3672, 6, 1276, 307, 900, 526, 198, 220, 220, 220, 6818, 1382, 62, 19849, 11, 366, 11395, 705, 11249, 62, 19849, 6, 1276, 307, 900, 526, 198, 220, 220, 220, 6818, 42287, 11, 366, 11395, 705, 37266, 6, 1276, 307, 900, 526, 628, 220, 220, 220, 611, 407, 5772, 62, 2617, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5772, 62, 2617, 62, 3672, 796, 366, 12417, 12, 19849, 1, 628, 220, 220, 220, 825, 1057, 62, 19849, 7, 5143, 62, 1416, 268, 13010, 28, 17821, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5660, 262, 2746, 11, 3613, 262, 23862, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7, 69, 1, 28768, 1391, 19849, 62, 3672, 92, 1391, 17143, 62, 2617, 62, 3672, 92, 9313, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 48987, 1628, 9483, 7160, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1628, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 9979, 1187, 13, 2606, 7250, 3843, 62, 26947, 62, 34219, 11, 366, 5143, 1600, 2746, 62, 3672, 11, 5772, 62, 2617, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 41033, 796, 4818, 8079, 13, 2197, 22446, 2536, 31387, 7203, 4, 56, 12, 4, 76, 12, 4, 67, 438, 4, 39, 12, 4, 44, 12, 4, 50, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 16302, 62, 15908, 11, 41033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 22915, 62, 15908, 11, 2152, 62, 482, 28, 17821, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 45559, 3810, 810, 284, 3613, 2746, 23862, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 9945, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 22915, 62, 15908, 11, 366, 22915, 82, 13, 9945, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12793, 2746, 10007, 284, 5072, 26672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 5772, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 22915, 62, 15908, 11, 366, 37266, 13, 88, 4029, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 17143, 62, 6978, 11, 366, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 43695, 13, 39455, 7, 37266, 11, 277, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12793, 2746, 1057, 20150, 284, 5072, 26672, 13, 198, 220, 220, 220, 220, 220, 220, 220, 13634, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 22915, 62, 15908, 11, 366, 28961, 13, 88, 4029, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 20150, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 19849, 62, 3672, 1298, 2746, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17143, 62, 2617, 62, 3672, 1298, 5772, 62, 2617, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 9688, 62, 2435, 1298, 41033, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18300, 62, 1671, 3702, 1298, 651, 62, 18300, 62, 1671, 3702, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18300, 62, 41509, 1298, 651, 62, 18300, 62, 17831, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 28961, 62, 6978, 11, 366, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 43695, 13, 39455, 7, 38993, 11, 277, 8, 628, 220, 220, 220, 220, 220, 220, 220, 351, 5045, 263, 7203, 28768, 2746, 13858, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 997, 62, 1416, 268, 13010, 796, 352, 1343, 18896, 7, 37266, 14692, 1416, 268, 13010, 1, 4083, 13083, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13858, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 8883, 62, 312, 87, 287, 2837, 7, 22510, 62, 1416, 268, 13010, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8883, 796, 1446, 39055, 7, 11249, 62, 19849, 11, 8883, 62, 312, 87, 11, 42287, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13858, 13, 33295, 7, 1416, 39055, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5660, 262, 14805, 8883, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14805, 62, 1416, 39055, 796, 13858, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14805, 62, 1416, 39055, 13, 5143, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14805, 62, 19849, 796, 14805, 62, 1416, 39055, 13, 19849, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 62, 46911, 1143, 62, 19849, 7, 12093, 4470, 62, 19849, 11, 5072, 62, 15908, 11, 366, 12093, 4470, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1057, 62, 1416, 268, 13010, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2141, 407, 1057, 1729, 12, 12093, 4470, 4981, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13858, 796, 13858, 58, 25, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5660, 477, 262, 584, 13858, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 8883, 287, 13858, 58, 16, 25, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8883, 13, 5143, 7, 8692, 62, 19849, 28, 12093, 4470, 62, 19849, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 277, 1, 1416, 39055, 12, 90, 1416, 39055, 13, 312, 87, 36786, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3613, 62, 46911, 1143, 62, 19849, 7, 1416, 39055, 13, 19849, 11, 5072, 62, 15908, 11, 1438, 8, 628, 220, 220, 220, 220, 220, 220, 220, 351, 5045, 263, 7203, 50, 2703, 2746, 23862, 284, 262, 6831, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4981, 796, 685, 82, 13, 19849, 329, 264, 287, 13858, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3650, 62, 5143, 62, 27530, 7, 27530, 11, 5072, 62, 9945, 62, 6978, 8, 628, 220, 220, 220, 1441, 1057, 62, 19849, 628 ]
2.283262
1,398
import numpy as np import requests from django.db.models import Q from api.models import Photo, User from api.util import logger from ownphotos.settings import IMAGE_SIMILARITY_SERVER
[ 11748, 299, 32152, 355, 45941, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 198, 6738, 40391, 13, 27530, 1330, 5555, 11, 11787, 198, 6738, 40391, 13, 22602, 1330, 49706, 198, 6738, 898, 24729, 13, 33692, 1330, 8959, 11879, 62, 48913, 4146, 1503, 9050, 62, 35009, 5959, 628, 628 ]
3.481481
54
import os import urllib.request from collections import Counter import re # data provided stopwords_file = os.path.join('/tmp', 'stopwords') harry_text = os.path.join('/tmp', 'harry') urllib.request.urlretrieve('http://bit.ly/2EuvyHB', stopwords_file) urllib.request.urlretrieve('http://bit.ly/2C6RzuR', harry_text) #stopwords_file = 'stopwords.txt' #harry_text = 'harry.txt'
[ 11748, 28686, 201, 198, 11748, 2956, 297, 571, 13, 25927, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 11748, 302, 201, 198, 201, 198, 2, 1366, 2810, 201, 198, 11338, 10879, 62, 7753, 796, 28686, 13, 6978, 13, 22179, 10786, 14, 22065, 3256, 705, 11338, 10879, 11537, 201, 198, 71, 6532, 62, 5239, 796, 28686, 13, 6978, 13, 22179, 10786, 14, 22065, 3256, 705, 71, 6532, 11537, 201, 198, 333, 297, 571, 13, 25927, 13, 6371, 1186, 30227, 10786, 4023, 1378, 2545, 13, 306, 14, 17, 36, 84, 7670, 32886, 3256, 2245, 10879, 62, 7753, 8, 201, 198, 333, 297, 571, 13, 25927, 13, 6371, 1186, 30227, 10786, 4023, 1378, 2545, 13, 306, 14, 17, 34, 21, 49, 27624, 49, 3256, 3971, 563, 62, 5239, 8, 201, 198, 201, 198, 2, 11338, 10879, 62, 7753, 796, 705, 11338, 10879, 13, 14116, 6, 201, 198, 2, 71, 6532, 62, 5239, 796, 705, 71, 6532, 13, 14116, 6, 201 ]
2.484076
157
import logging import cv2 as cv from utils.functions import iter_dir, join, make_dirs LOG = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 6738, 3384, 4487, 13, 12543, 2733, 1330, 11629, 62, 15908, 11, 4654, 11, 787, 62, 15908, 82, 198, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
2.837209
43
# -*- coding: utf-8 -*- # # Copyright 2016 Capital One Services, 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 textwrap from .constants import * from .errors import * from .logging import log from ._compat import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 1584, 9747, 1881, 6168, 11, 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, 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, 2420, 37150, 198, 198, 6738, 764, 9979, 1187, 1330, 1635, 198, 6738, 764, 48277, 1330, 1635, 198, 198, 6738, 764, 6404, 2667, 1330, 2604, 198, 198, 6738, 47540, 5589, 265, 1330, 1635, 628 ]
3.618812
202
""" Full assembly of the parts to form the complete network """ import sys import torch.nn.functional as F from .unet_parts import * '''class UNet(nn.Module): def __init__(self, n_channels, n_classes, isfine=True, bilinear=True): super(UNet, self).__init__() self.n_channels = n_channels self.n_classes = n_classes self.is_fine = isfine self.bilinear = bilinear self.inc = DoubleConv(n_channels, 64) self.down1 = Down(64, 128) self.down2 = Down(128, 256) self.down3 = Down(256, 512) factor = 2 if bilinear else 1 self.down4 = Down(512, 1024 // factor) self.up1 = Up(1024, 512 // factor, bilinear) self.up2 = Up(512, 256 // factor, bilinear) self.up3 = Up(256, 128 // factor, bilinear) self.up4 = Up(128, 64, bilinear) self.condup = CondUp() self.outc = OutConv(64, n_classes) def forward(self, x=None): if self.is_fine: x = self.condup(x) x1 = self.inc(x) x2 = self.down1(x1) x3 = self.down2(x2) x4 = self.down3(x3) x5 = self.down4(x4) x = self.up1(x5, x4) x = self.up2(x, x3) x = self.up3(x, x2) x = self.up4(x, x1) logits = self.outc(x) return logits'''
[ 37811, 6462, 10474, 286, 262, 3354, 284, 1296, 262, 1844, 3127, 37227, 198, 11748, 25064, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 764, 403, 316, 62, 42632, 1330, 1635, 198, 198, 7061, 6, 4871, 4725, 316, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 299, 62, 354, 8961, 11, 299, 62, 37724, 11, 318, 38125, 28, 17821, 11, 47027, 259, 451, 28, 17821, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 7, 4944, 316, 11, 2116, 737, 834, 15003, 834, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 77, 62, 354, 8961, 796, 299, 62, 354, 8961, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 77, 62, 37724, 796, 299, 62, 37724, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 271, 62, 38125, 796, 318, 38125, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 33473, 259, 451, 796, 47027, 259, 451, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1939, 796, 11198, 3103, 85, 7, 77, 62, 354, 8961, 11, 5598, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 16, 796, 5588, 7, 2414, 11, 13108, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 17, 796, 5588, 7, 12762, 11, 17759, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 18, 796, 5588, 7, 11645, 11, 22243, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5766, 796, 362, 611, 47027, 259, 451, 2073, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2902, 19, 796, 5588, 7, 25836, 11, 28119, 3373, 5766, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 929, 16, 796, 3205, 7, 35500, 11, 22243, 3373, 5766, 11, 47027, 259, 451, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 929, 17, 796, 3205, 7, 25836, 11, 17759, 3373, 5766, 11, 47027, 259, 451, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 929, 18, 796, 3205, 7, 11645, 11, 13108, 3373, 5766, 11, 47027, 259, 451, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 929, 19, 796, 3205, 7, 12762, 11, 5598, 11, 47027, 259, 451, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 17561, 929, 796, 9724, 4933, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 448, 66, 796, 3806, 3103, 85, 7, 2414, 11, 299, 62, 37724, 8, 628, 220, 220, 220, 825, 2651, 7, 944, 11, 2124, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 271, 62, 38125, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2116, 13, 17561, 929, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 16, 796, 2116, 13, 1939, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 17, 796, 2116, 13, 2902, 16, 7, 87, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 18, 796, 2116, 13, 2902, 17, 7, 87, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 19, 796, 2116, 13, 2902, 18, 7, 87, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 20, 796, 2116, 13, 2902, 19, 7, 87, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2116, 13, 929, 16, 7, 87, 20, 11, 2124, 19, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2116, 13, 929, 17, 7, 87, 11, 2124, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2116, 13, 929, 18, 7, 87, 11, 2124, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 2116, 13, 929, 19, 7, 87, 11, 2124, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 896, 796, 2116, 13, 448, 66, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2604, 896, 7061, 6, 198 ]
1.943704
675
# -*- mode: python; coding: utf-8 -* # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """Tests for FHD_cal object. """ from __future__ import absolute_import, division, print_function import nose.tools as nt import os import numpy as np from pyuvdata import UVCal import pyuvdata.tests as uvtest from pyuvdata.data import DATA_PATH # set up FHD file list testdir = os.path.join(DATA_PATH, 'fhd_cal_data/') testfile_prefix = '1061316296_' obs_testfile = os.path.join(testdir, testfile_prefix + 'obs.sav') cal_testfile = os.path.join(testdir, testfile_prefix + 'cal.sav') settings_testfile = os.path.join(testdir, testfile_prefix + 'settings.txt') def test_ReadFHDcalWriteReadcalfits(): """ FHD cal to calfits loopback test. Read in FHD cal files, write out as calfits, read back in and check for object equality. """ fhd_cal = UVCal() calfits_cal = UVCal() fhd_cal.read_fhd_cal(cal_testfile, obs_testfile, settings_file=settings_testfile) outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) # do it again with fit gains (rather than raw) fhd_cal.read_fhd_cal(cal_testfile, obs_testfile, settings_file=settings_testfile, raw=False) outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) def test_extra_history(): """ test that setting the extra_history keyword works """ fhd_cal = UVCal() calfits_cal = UVCal() extra_history = 'Some extra history for testing\n' fhd_cal.read_fhd_cal(cal_testfile, obs_testfile, settings_file=settings_testfile, extra_history=extra_history) outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) nt.assert_true(extra_history in fhd_cal.history) # try again with a list of history strings extra_history = ['Some extra history for testing', 'And some more history as well'] fhd_cal.read_fhd_cal(cal_testfile, obs_testfile, settings_file=settings_testfile, extra_history=extra_history) outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) for line in extra_history: nt.assert_true(line in fhd_cal.history) def test_flags_galaxy(): """ test that files with time, freq and tile flags and galaxy models behave as expected """ testdir = os.path.join(DATA_PATH, 'fhd_cal_data/flag_set') obs_testfile_flag = os.path.join(testdir, testfile_prefix + 'obs.sav') cal_testfile_flag = os.path.join(testdir, testfile_prefix + 'cal.sav') settings_testfile_flag = os.path.join(testdir, testfile_prefix + 'settings.txt') fhd_cal = UVCal() calfits_cal = UVCal() fhd_cal.read_fhd_cal(cal_testfile_flag, obs_testfile_flag, settings_file=settings_testfile_flag) outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) def test_breakReadFHDcal(): """Try various cases of missing files.""" fhd_cal = UVCal() nt.assert_raises(Exception, fhd_cal.read_fhd_cal, cal_testfile) # Missing obs uvtest.checkWarnings(fhd_cal.read_fhd_cal, [cal_testfile, obs_testfile], message=['No settings file']) # Check only pyuvdata version history with no settings file nt.assert_equal(fhd_cal.history, '\n' + fhd_cal.pyuvdata_version_str) def test_read_multi(): """Test reading in multiple files.""" testdir2 = os.path.join(DATA_PATH, 'fhd_cal_data/set2') obs_testfile_list = [obs_testfile, os.path.join(testdir2, testfile_prefix + 'obs.sav')] cal_testfile_list = [cal_testfile, os.path.join(testdir2, testfile_prefix + 'cal.sav')] settings_testfile_list = [settings_testfile, os.path.join(testdir2, testfile_prefix + 'settings.txt')] fhd_cal = UVCal() calfits_cal = UVCal() uvtest.checkWarnings(fhd_cal.read_fhd_cal, [cal_testfile_list, obs_testfile_list], {'settings_file': settings_testfile_list}, message='UVParameter diffuse_model does not match') outfile = os.path.join(DATA_PATH, 'test/outtest_FHDcal_1061311664.calfits') fhd_cal.write_calfits(outfile, clobber=True) calfits_cal.read_calfits(outfile) nt.assert_equal(fhd_cal, calfits_cal) def test_break_read_multi(): """Test errors for different numbers of files.""" testdir2 = os.path.join(DATA_PATH, 'fhd_cal_data/set2') obs_testfile_list = [obs_testfile, os.path.join(testdir2, testfile_prefix + 'obs.sav')] cal_testfile_list = [cal_testfile, os.path.join(testdir2, testfile_prefix + 'cal.sav')] settings_testfile_list = [settings_testfile, os.path.join(testdir2, testfile_prefix + 'settings.txt')] fhd_cal = UVCal() nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list, obs_testfile_list[0], settings_file=settings_testfile_list) nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list, obs_testfile_list, settings_file=settings_testfile_list[0]) nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list, obs_testfile_list + obs_testfile_list, settings_file=settings_testfile_list) nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list, obs_testfile_list, settings_file=settings_testfile_list + settings_testfile_list) nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list[0], obs_testfile_list, settings_file=settings_testfile_list[0]) nt.assert_raises(ValueError, fhd_cal.read_fhd_cal, cal_testfile_list[0], obs_testfile_list[0], settings_file=settings_testfile_list)
[ 2, 532, 9, 12, 4235, 25, 21015, 26, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 2, 15069, 357, 66, 8, 2864, 8829, 25398, 9145, 10442, 4912, 198, 2, 49962, 739, 262, 362, 12, 565, 682, 347, 10305, 13789, 198, 198, 37811, 51, 3558, 329, 376, 10227, 62, 9948, 2134, 13, 198, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 9686, 13, 31391, 355, 299, 83, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12972, 14795, 7890, 1330, 22033, 9771, 198, 11748, 12972, 14795, 7890, 13, 41989, 355, 334, 85, 9288, 198, 6738, 12972, 14795, 7890, 13, 7890, 1330, 42865, 62, 34219, 198, 198, 2, 900, 510, 376, 10227, 2393, 1351, 198, 9288, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 69, 31298, 62, 9948, 62, 7890, 14, 11537, 198, 9288, 7753, 62, 40290, 796, 705, 15801, 1485, 1433, 27137, 62, 6, 198, 8158, 62, 9288, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 8158, 13, 39308, 11537, 198, 9948, 62, 9288, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 9948, 13, 39308, 11537, 198, 33692, 62, 9288, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 33692, 13, 14116, 11537, 628, 198, 4299, 1332, 62, 5569, 37, 10227, 9948, 16594, 5569, 66, 1604, 896, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 376, 10227, 2386, 284, 31134, 896, 9052, 1891, 1332, 13, 628, 220, 220, 220, 4149, 287, 376, 10227, 2386, 3696, 11, 3551, 503, 355, 31134, 896, 11, 1100, 736, 287, 290, 2198, 329, 2134, 198, 220, 220, 220, 10537, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 31134, 896, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 7, 9948, 62, 9288, 7753, 11, 10201, 62, 9288, 7753, 11, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 8, 628, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 628, 220, 220, 220, 1303, 466, 340, 757, 351, 4197, 8810, 357, 34330, 621, 8246, 8, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 7, 9948, 62, 9288, 7753, 11, 10201, 62, 9288, 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, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 11, 8246, 28, 25101, 8, 198, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 628, 198, 4299, 1332, 62, 26086, 62, 23569, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1332, 326, 4634, 262, 3131, 62, 23569, 21179, 2499, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 31134, 896, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 3131, 62, 23569, 796, 705, 4366, 3131, 2106, 329, 4856, 59, 77, 6, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 7, 9948, 62, 9288, 7753, 11, 10201, 62, 9288, 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, 6460, 62, 7753, 28, 33692, 62, 9288, 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, 3131, 62, 23569, 28, 26086, 62, 23569, 8, 628, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 7942, 7, 26086, 62, 23569, 287, 277, 31298, 62, 9948, 13, 23569, 8, 628, 220, 220, 220, 1303, 1949, 757, 351, 257, 1351, 286, 2106, 13042, 198, 220, 220, 220, 3131, 62, 23569, 796, 37250, 4366, 3131, 2106, 329, 4856, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1870, 617, 517, 2106, 355, 880, 20520, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 7, 9948, 62, 9288, 7753, 11, 10201, 62, 9288, 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, 6460, 62, 7753, 28, 33692, 62, 9288, 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, 3131, 62, 23569, 28, 26086, 62, 23569, 8, 628, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 198, 220, 220, 220, 329, 1627, 287, 3131, 62, 23569, 25, 198, 220, 220, 220, 220, 220, 220, 220, 299, 83, 13, 30493, 62, 7942, 7, 1370, 287, 277, 31298, 62, 9948, 13, 23569, 8, 628, 198, 4299, 1332, 62, 33152, 62, 13528, 6969, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1332, 326, 3696, 351, 640, 11, 2030, 80, 290, 17763, 9701, 290, 16161, 4981, 17438, 355, 2938, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1332, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 69, 31298, 62, 9948, 62, 7890, 14, 32109, 62, 2617, 11537, 198, 220, 220, 220, 10201, 62, 9288, 7753, 62, 32109, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 8158, 13, 39308, 11537, 198, 220, 220, 220, 2386, 62, 9288, 7753, 62, 32109, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 9948, 13, 39308, 11537, 198, 220, 220, 220, 6460, 62, 9288, 7753, 62, 32109, 796, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 11, 1332, 7753, 62, 40290, 1343, 705, 33692, 13, 14116, 11537, 628, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 31134, 896, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 7, 9948, 62, 9288, 7753, 62, 32109, 11, 10201, 62, 9288, 7753, 62, 32109, 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, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 32109, 8, 628, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 628, 198, 4299, 1332, 62, 9032, 5569, 37, 10227, 9948, 33529, 198, 220, 220, 220, 37227, 23433, 2972, 2663, 286, 4814, 3696, 526, 15931, 198, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 16922, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 8, 220, 1303, 25639, 10201, 628, 220, 220, 220, 334, 85, 9288, 13, 9122, 54, 1501, 654, 7, 69, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 685, 9948, 62, 9288, 7753, 11, 10201, 62, 9288, 7753, 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, 3275, 28, 17816, 2949, 6460, 2393, 6, 12962, 628, 220, 220, 220, 1303, 6822, 691, 12972, 14795, 7890, 2196, 2106, 351, 645, 6460, 2393, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 13, 23569, 11, 705, 59, 77, 6, 1343, 277, 31298, 62, 9948, 13, 9078, 14795, 7890, 62, 9641, 62, 2536, 8, 628, 198, 4299, 1332, 62, 961, 62, 41684, 33529, 198, 220, 220, 220, 37227, 14402, 3555, 287, 3294, 3696, 526, 15931, 198, 220, 220, 220, 1332, 15908, 17, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 69, 31298, 62, 9948, 62, 7890, 14, 2617, 17, 11537, 198, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 796, 685, 8158, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 8158, 13, 39308, 11537, 60, 198, 220, 220, 220, 2386, 62, 9288, 7753, 62, 4868, 796, 685, 9948, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 9948, 13, 39308, 11537, 60, 198, 220, 220, 220, 6460, 62, 9288, 7753, 62, 4868, 796, 685, 33692, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 33692, 13, 14116, 11537, 60, 628, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 31134, 896, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 334, 85, 9288, 13, 9122, 54, 1501, 654, 7, 69, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 685, 9948, 62, 9288, 7753, 62, 4868, 11, 10201, 62, 9288, 7753, 62, 4868, 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, 1391, 6, 33692, 62, 7753, 10354, 6460, 62, 9288, 7753, 62, 4868, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 11639, 52, 8859, 41158, 2357, 42864, 62, 19849, 857, 407, 2872, 11537, 628, 220, 220, 220, 503, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 9288, 14, 448, 9288, 62, 37, 10227, 9948, 62, 15801, 1485, 18298, 2414, 13, 66, 1604, 896, 11537, 198, 220, 220, 220, 277, 31298, 62, 9948, 13, 13564, 62, 66, 1604, 896, 7, 448, 7753, 11, 537, 672, 527, 28, 17821, 8, 198, 220, 220, 220, 31134, 896, 62, 9948, 13, 961, 62, 66, 1604, 896, 7, 448, 7753, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 40496, 7, 69, 31298, 62, 9948, 11, 31134, 896, 62, 9948, 8, 628, 198, 4299, 1332, 62, 9032, 62, 961, 62, 41684, 33529, 198, 220, 220, 220, 37227, 14402, 8563, 329, 1180, 3146, 286, 3696, 526, 15931, 628, 220, 220, 220, 1332, 15908, 17, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 34219, 11, 705, 69, 31298, 62, 9948, 62, 7890, 14, 2617, 17, 11537, 198, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 796, 685, 8158, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 8158, 13, 39308, 11537, 60, 198, 220, 220, 220, 2386, 62, 9288, 7753, 62, 4868, 796, 685, 9948, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 9948, 13, 39308, 11537, 60, 198, 220, 220, 220, 6460, 62, 9288, 7753, 62, 4868, 796, 685, 33692, 62, 9288, 7753, 11, 28686, 13, 6978, 13, 22179, 7, 9288, 15908, 17, 11, 1332, 7753, 62, 40290, 1343, 705, 33692, 13, 14116, 11537, 60, 628, 220, 220, 220, 277, 31298, 62, 9948, 796, 22033, 9771, 3419, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 58, 15, 4357, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 11, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 58, 15, 12962, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 1343, 10201, 62, 9288, 7753, 62, 4868, 11, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 11, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 1343, 6460, 62, 9288, 7753, 62, 4868, 8, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 58, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 11, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 58, 15, 12962, 198, 220, 220, 220, 299, 83, 13, 30493, 62, 430, 2696, 7, 11395, 12331, 11, 277, 31298, 62, 9948, 13, 961, 62, 69, 31298, 62, 9948, 11, 2386, 62, 9288, 7753, 62, 4868, 58, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10201, 62, 9288, 7753, 62, 4868, 58, 15, 4357, 6460, 62, 7753, 28, 33692, 62, 9288, 7753, 62, 4868, 8, 198 ]
2.305526
2,805
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems This module is developed by: Yalin Li <[email protected]> This module is under the University of Illinois/NCSA Open Source License. Please refer to https://github.com/QSD-Group/QSDsan/blob/master/LICENSE.txt for license details. ''' # %% from biosteam._graphics import splitter_graphics from .. import SanUnit __all__ = ('ComponentSplitter',) class ComponentSplitter(SanUnit): ''' Split the influent into individual components, the last effluent contains all remaining components. ''' _ins_size_is_fixed = False _outs_size_is_fixed = False _graphics = splitter_graphics @property def split_keys(self): ''' [iterable] An iterable containing IDs of components to be splitted to different effluents. Element of the item in the iterable can be str of another iterable containing component IDs. If the item is also iterable, all components whose ID are in the iterable will be splitted to the same effluent. Note that the split is 1 (i.e., all of the remaining components will be diverted to the effluent). ''' return self._split_keys @split_keys.setter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 48, 10305, 12807, 25, 16972, 12464, 45276, 8495, 329, 39958, 290, 8271, 7628, 3341, 198, 198, 1212, 8265, 318, 4166, 416, 25, 198, 220, 220, 220, 575, 14414, 7455, 1279, 89, 2577, 13, 88, 14414, 13, 4528, 31, 14816, 13, 785, 29, 198, 198, 1212, 8265, 318, 739, 262, 2059, 286, 9486, 14, 7792, 4090, 4946, 8090, 13789, 13, 198, 5492, 3522, 284, 3740, 1378, 12567, 13, 785, 14, 48, 10305, 12, 13247, 14, 48, 10305, 12807, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, 13, 14116, 198, 1640, 5964, 3307, 13, 198, 7061, 6, 198, 198, 2, 43313, 198, 198, 6738, 3182, 455, 68, 321, 13557, 70, 11549, 1330, 4328, 1967, 62, 70, 11549, 198, 6738, 11485, 1330, 2986, 26453, 198, 198, 834, 439, 834, 796, 19203, 21950, 26568, 1967, 3256, 8, 628, 198, 4871, 35100, 26568, 1967, 7, 15017, 26453, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 27758, 262, 3057, 298, 656, 1981, 6805, 11, 198, 220, 220, 220, 262, 938, 914, 28216, 4909, 477, 5637, 6805, 13, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 198, 220, 220, 220, 4808, 1040, 62, 7857, 62, 271, 62, 34021, 796, 10352, 198, 220, 220, 220, 4808, 5269, 62, 7857, 62, 271, 62, 34021, 796, 10352, 198, 220, 220, 220, 4808, 70, 11549, 796, 4328, 1967, 62, 70, 11549, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 6626, 62, 13083, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 685, 2676, 540, 60, 1052, 11629, 540, 7268, 32373, 286, 6805, 284, 307, 4328, 2175, 284, 198, 220, 220, 220, 220, 220, 220, 220, 1180, 914, 2290, 658, 13, 11703, 286, 262, 2378, 287, 262, 11629, 540, 460, 307, 965, 286, 198, 220, 220, 220, 220, 220, 220, 220, 1194, 11629, 540, 7268, 7515, 32373, 13, 1002, 262, 2378, 318, 635, 11629, 540, 11, 198, 220, 220, 220, 220, 220, 220, 220, 477, 6805, 3025, 4522, 389, 287, 262, 11629, 540, 481, 307, 4328, 2175, 284, 262, 976, 198, 220, 220, 220, 220, 220, 220, 220, 914, 28216, 13, 5740, 326, 262, 6626, 318, 352, 357, 72, 13, 68, 1539, 477, 286, 262, 5637, 6805, 198, 220, 220, 220, 220, 220, 220, 220, 481, 307, 35673, 284, 262, 914, 28216, 737, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 35312, 62, 13083, 198, 220, 220, 220, 2488, 35312, 62, 13083, 13, 2617, 353, 628, 628, 628, 628, 628, 628 ]
2.880952
462
# fallacy quoter for antaytheist import json import re import requests fallaciesjson = requests.get("https://yourlogicalfallacyis.com/js/data/fallacies.json", timeout=15) fallaciesjson.raise_for_status() fallacies = json.loads(fallaciesjson.text) fallacynames = [] for fallacyitem in fallacies: fallacynames.append(fallacyitem["title"])
[ 2, 39104, 627, 19543, 329, 1885, 323, 1169, 396, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 7007, 198, 198, 7207, 13433, 17752, 796, 7007, 13, 1136, 7203, 5450, 1378, 14108, 6404, 605, 7207, 1590, 271, 13, 785, 14, 8457, 14, 7890, 14, 7207, 13433, 13, 17752, 1600, 26827, 28, 1314, 8, 198, 7207, 13433, 17752, 13, 40225, 62, 1640, 62, 13376, 3419, 198, 7207, 13433, 796, 33918, 13, 46030, 7, 7207, 13433, 17752, 13, 5239, 8, 198, 7207, 1590, 14933, 796, 17635, 198, 198, 1640, 39104, 9186, 287, 2121, 13433, 25, 198, 220, 220, 220, 39104, 14933, 13, 33295, 7, 7207, 1590, 9186, 14692, 7839, 8973, 8, 198 ]
3.146789
109
idx = 0 a, b, c = map(int, input().split()) for i in range(a): for j in range(b): for k in range(c): idx += 1 print(i, j, k) print(idx)
[ 312, 87, 796, 657, 198, 64, 11, 275, 11, 269, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 1640, 1312, 287, 2837, 7, 64, 2599, 198, 220, 220, 220, 329, 474, 287, 2837, 7, 65, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 287, 2837, 7, 66, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 72, 11, 474, 11, 479, 8, 198, 4798, 7, 312, 87, 8 ]
1.8
95
# Live stream a Colored video from Webcam or default Video Capture device import cv2 # Open the default Video Capture device (or WebCam) v = cv2.VideoCapture(0) # Check if the file can be opened successfully if(v.isOpened() == "False"): print("ERROR: Cannot open the Video File") quit() print("SUCCESS: Video File opened") # Read one frame from the file while v.isOpened() == True: ret, frame = v.read() # Check if the frame is successfully read if(ret == False): print("ERROR: Cannot read more video frame") break # Display the frame data cv2.imshow("Video Frame", frame) # Wait for 25 ms for a user key press to exit if(cv2.waitKey(25) != -1): break # Close the video file v.release() # Close all open window cv2.destroyAllWindows()
[ 2, 7547, 4269, 257, 1623, 1850, 2008, 422, 5313, 20991, 393, 4277, 7623, 31793, 3335, 198, 198, 11748, 269, 85, 17, 198, 198, 2, 4946, 262, 4277, 7623, 31793, 3335, 357, 273, 5313, 21701, 8, 198, 85, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 198, 2, 6822, 611, 262, 2393, 460, 307, 4721, 7675, 198, 361, 7, 85, 13, 271, 18257, 2945, 3419, 6624, 366, 25101, 1, 2599, 198, 220, 220, 220, 3601, 7203, 24908, 25, 26003, 1280, 262, 7623, 9220, 4943, 198, 220, 220, 220, 11238, 3419, 198, 198, 4798, 7203, 12564, 4093, 7597, 25, 7623, 9220, 4721, 4943, 198, 198, 2, 4149, 530, 5739, 422, 262, 2393, 198, 4514, 410, 13, 271, 18257, 2945, 3419, 6624, 6407, 25, 198, 220, 220, 220, 1005, 11, 5739, 796, 410, 13, 961, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 6822, 611, 262, 5739, 318, 7675, 1100, 198, 220, 220, 220, 611, 7, 1186, 6624, 10352, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 24908, 25, 26003, 1100, 517, 2008, 5739, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 628, 220, 220, 220, 1303, 16531, 262, 5739, 1366, 198, 220, 220, 220, 269, 85, 17, 13, 320, 12860, 7203, 10798, 25184, 1600, 5739, 8, 628, 220, 220, 220, 1303, 16314, 329, 1679, 13845, 329, 257, 2836, 1994, 1803, 284, 8420, 198, 220, 220, 220, 611, 7, 33967, 17, 13, 17077, 9218, 7, 1495, 8, 14512, 532, 16, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 198, 2, 13872, 262, 2008, 2393, 198, 85, 13, 20979, 3419, 198, 198, 2, 13872, 477, 1280, 4324, 198, 33967, 17, 13, 41659, 3237, 11209, 3419, 198 ]
2.828671
286
answers = [] with open("input06.txt") as f: ans = set('') for line in f: line = line.strip() if not line: answers.append(ans) ans = set('') else: ans = ans.union(set(line)) ans = ans.union(set(line)) answers.append(ans) print(sum([len(a) for a in answers ])) answers = [] with open("input06.txt") as f: ans = set('abcdefghijklmnopqrstuvwxyz') for line in f: line = line.strip() if not line: answers.append(ans) ans = set('abcdefghijklmnopqrstuvwxyz') else: ans = ans.intersection(set(line)) ans = ans.intersection(set(line)) answers.append(ans) print(sum([len(a) for a in answers ]))
[ 504, 86, 364, 796, 17635, 198, 4480, 1280, 7203, 15414, 3312, 13, 14116, 4943, 355, 277, 25, 198, 220, 220, 220, 9093, 796, 900, 7, 7061, 8, 198, 220, 220, 220, 329, 1627, 287, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1627, 796, 1627, 13, 36311, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1627, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7429, 13, 33295, 7, 504, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9093, 796, 900, 7, 7061, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9093, 796, 9093, 13, 24592, 7, 2617, 7, 1370, 4008, 198, 198, 504, 796, 9093, 13, 24592, 7, 2617, 7, 1370, 4008, 198, 504, 86, 364, 13, 33295, 7, 504, 8, 198, 198, 4798, 7, 16345, 26933, 11925, 7, 64, 8, 329, 257, 287, 7429, 2361, 4008, 198, 198, 504, 86, 364, 796, 17635, 198, 4480, 1280, 7203, 15414, 3312, 13, 14116, 4943, 355, 277, 25, 198, 220, 220, 220, 9093, 796, 900, 10786, 39305, 4299, 456, 2926, 41582, 10295, 404, 80, 81, 301, 14795, 86, 5431, 89, 11537, 198, 220, 220, 220, 329, 1627, 287, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1627, 796, 1627, 13, 36311, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 1627, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7429, 13, 33295, 7, 504, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9093, 796, 900, 10786, 39305, 4299, 456, 2926, 41582, 10295, 404, 80, 81, 301, 14795, 86, 5431, 89, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9093, 796, 9093, 13, 3849, 5458, 7, 2617, 7, 1370, 4008, 198, 198, 504, 796, 9093, 13, 3849, 5458, 7, 2617, 7, 1370, 4008, 198, 504, 86, 364, 13, 33295, 7, 504, 8, 198, 198, 4798, 7, 16345, 26933, 11925, 7, 64, 8, 329, 257, 287, 7429, 2361, 4008 ]
1.989011
364
from .AST import AST
[ 6738, 764, 11262, 1330, 29273, 628 ]
3.666667
6
import enum import sys import gidgethub DEFAULT_BODY = "" TAG_NAME = "gh-issue-number" NEWS_NEXT_DIR = "Misc/NEWS.d/next/" CLOSING_TAG = f"<!-- /{TAG_NAME} -->" BODY = f"""\ {{body}} <!-- {TAG_NAME}: gh-{{issue_number}} --> * gh-{{issue_number}} {CLOSING_TAG} """ @enum.unique def create_status(context, state, *, description=None, target_url=None): """Create the data for a status. The argument order is such that you can use functools.partial() to set the context to avoid repeatedly specifying it throughout a module. """ status = { "context": context, "state": state.value, } if description is not None: status["description"] = description if target_url is not None: status["target_url"] = target_url return status async def post_status(gh, event, status): """Post a status in reaction to an event.""" await gh.post(event.data["pull_request"]["statuses_url"], data=status) def skip_label(what): """Generate a "skip" label name.""" return f"skip {what}" def skip(what, issue): """See if an issue has a "skip {what}" label.""" return skip_label(what) in labels(issue) def label_name(event_data): """Get the label name from a label-related webhook event.""" return event_data["label"]["name"] async def files_for_PR(gh, pull_request): """Get files for a pull request.""" # For some unknown reason there isn't any files URL in a pull request # payload. files_url = f'{pull_request["url"]}/files' data = [] async for filedata in gh.getiter(files_url): # pragma: no branch data.append( { "file_name": filedata["filename"], "patch": filedata.get("patch", ""), } ) return data async def issue_for_PR(gh, pull_request): """Get the issue data for a pull request.""" return await gh.getitem(pull_request["issue_url"]) async def patch_body(gh, pull_request, issue_number): """Updates the description of a PR with the gh issue number if it exists. returns if body exists with issue_number """ if "body" not in pull_request or pull_request["body"] is None: return await gh.patch( pull_request["url"], data=BODY.format(body=DEFAULT_BODY, issue_number=issue_number), ) if f"GH-{issue_number}\n" not in pull_request["body"]: return await gh.patch( pull_request["url"], data=BODY.format(body=pull_request["body"], issue_number=issue_number), ) return async def is_core_dev(gh, username): """Check if the user is a CPython core developer.""" org_teams = "/orgs/python/teams" team_name = "python core" async for team in gh.getiter(org_teams): if team["name"].lower() == team_name: # pragma: no branch break else: raise ValueError(f"{team_name!r} not found at {org_teams!r}") # The 'teams' object only provides a URL to a deprecated endpoint, # so manually construct the URL to the non-deprecated team membership # endpoint. membership_url = f"/teams/{team['id']}/memberships/{username}" try: await gh.getitem(membership_url) except gidgethub.BadRequest as exc: if exc.status_code == 404: return False raise else: return True def is_news_dir(filename): "Return True if file is in the News directory." return filename.startswith(NEWS_NEXT_DIR) def normalize_title(title, body): """Normalize the title if it spills over into the PR's body.""" if not (title.endswith("…") and body.startswith("…")): return title else: # Being paranoid in case \r\n is used. return title[:-1] + body[1:].partition("\r\n")[0] async def get_pr_for_commit(gh, sha): """Find the PR containing the specific commit hash.""" prs_for_commit = await gh.getitem( f"/search/issues?q=type:pr+repo:python/cpython+sha:{sha}" ) if prs_for_commit["total_count"] > 0: # there should only be one return prs_for_commit["items"][0] return None
[ 11748, 33829, 198, 11748, 25064, 198, 198, 11748, 308, 17484, 40140, 628, 198, 7206, 38865, 62, 33, 33076, 796, 13538, 198, 42197, 62, 20608, 796, 366, 456, 12, 21949, 12, 17618, 1, 198, 49597, 62, 45, 13918, 62, 34720, 796, 366, 44, 2304, 14, 49597, 13, 67, 14, 19545, 30487, 198, 5097, 2640, 2751, 62, 42197, 796, 277, 1, 27, 28112, 1220, 90, 42197, 62, 20608, 92, 14610, 1, 198, 33, 33076, 796, 277, 37811, 59, 198, 27007, 2618, 11709, 198, 198, 27, 28112, 1391, 42197, 62, 20608, 38362, 24997, 12, 27007, 21949, 62, 17618, 11709, 14610, 198, 9, 24997, 12, 27007, 21949, 62, 17618, 11709, 198, 90, 5097, 2640, 2751, 62, 42197, 92, 198, 37811, 628, 198, 31, 44709, 13, 34642, 628, 198, 4299, 2251, 62, 13376, 7, 22866, 11, 1181, 11, 1635, 11, 6764, 28, 14202, 11, 2496, 62, 6371, 28, 14202, 2599, 198, 220, 220, 220, 37227, 16447, 262, 1366, 329, 257, 3722, 13, 628, 220, 220, 220, 383, 4578, 1502, 318, 884, 326, 345, 460, 779, 1257, 310, 10141, 13, 47172, 3419, 284, 900, 262, 198, 220, 220, 220, 4732, 284, 3368, 7830, 31577, 340, 3690, 257, 8265, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3722, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 22866, 1298, 4732, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5219, 1298, 1181, 13, 8367, 11, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 611, 6764, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 14692, 11213, 8973, 796, 6764, 198, 220, 220, 220, 611, 2496, 62, 6371, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3722, 14692, 16793, 62, 6371, 8973, 796, 2496, 62, 6371, 628, 220, 220, 220, 1441, 3722, 628, 198, 292, 13361, 825, 1281, 62, 13376, 7, 456, 11, 1785, 11, 3722, 2599, 198, 220, 220, 220, 37227, 6307, 257, 3722, 287, 6317, 284, 281, 1785, 526, 15931, 198, 220, 220, 220, 25507, 24997, 13, 7353, 7, 15596, 13, 7890, 14692, 31216, 62, 25927, 1, 7131, 1, 14269, 2664, 62, 6371, 33116, 1366, 28, 13376, 8, 628, 198, 4299, 14267, 62, 18242, 7, 10919, 2599, 198, 220, 220, 220, 37227, 8645, 378, 257, 366, 48267, 1, 6167, 1438, 526, 15931, 198, 220, 220, 220, 1441, 277, 1, 48267, 1391, 10919, 36786, 628, 198, 198, 4299, 14267, 7, 10919, 11, 2071, 2599, 198, 220, 220, 220, 37227, 6214, 611, 281, 2071, 468, 257, 366, 48267, 1391, 10919, 36786, 6167, 526, 15931, 198, 220, 220, 220, 1441, 14267, 62, 18242, 7, 10919, 8, 287, 14722, 7, 21949, 8, 628, 198, 4299, 6167, 62, 3672, 7, 15596, 62, 7890, 2599, 198, 220, 220, 220, 37227, 3855, 262, 6167, 1438, 422, 257, 6167, 12, 5363, 3992, 25480, 1785, 526, 15931, 198, 220, 220, 220, 1441, 1785, 62, 7890, 14692, 18242, 1, 7131, 1, 3672, 8973, 628, 198, 198, 292, 13361, 825, 3696, 62, 1640, 62, 4805, 7, 456, 11, 2834, 62, 25927, 2599, 198, 220, 220, 220, 37227, 3855, 3696, 329, 257, 2834, 2581, 526, 15931, 198, 220, 220, 220, 1303, 1114, 617, 6439, 1738, 612, 2125, 470, 597, 3696, 10289, 287, 257, 2834, 2581, 198, 220, 220, 220, 1303, 21437, 13, 198, 220, 220, 220, 3696, 62, 6371, 796, 277, 6, 90, 31216, 62, 25927, 14692, 6371, 8973, 92, 14, 16624, 6, 198, 220, 220, 220, 1366, 796, 17635, 198, 220, 220, 220, 30351, 329, 5717, 1045, 287, 24997, 13, 1136, 2676, 7, 16624, 62, 6371, 2599, 220, 1303, 23864, 2611, 25, 645, 8478, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 13, 33295, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 7753, 62, 3672, 1298, 5717, 1045, 14692, 34345, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 17147, 1298, 5717, 1045, 13, 1136, 7203, 17147, 1600, 366, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 1366, 628, 198, 292, 13361, 825, 2071, 62, 1640, 62, 4805, 7, 456, 11, 2834, 62, 25927, 2599, 198, 220, 220, 220, 37227, 3855, 262, 2071, 1366, 329, 257, 2834, 2581, 526, 15931, 198, 220, 220, 220, 1441, 25507, 24997, 13, 1136, 9186, 7, 31216, 62, 25927, 14692, 21949, 62, 6371, 8973, 8, 628, 198, 292, 13361, 825, 8529, 62, 2618, 7, 456, 11, 2834, 62, 25927, 11, 2071, 62, 17618, 2599, 198, 220, 220, 220, 37227, 4933, 19581, 262, 6764, 286, 257, 4810, 351, 262, 24997, 2071, 1271, 611, 340, 7160, 13, 628, 220, 220, 220, 5860, 611, 1767, 7160, 351, 2071, 62, 17618, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 366, 2618, 1, 407, 287, 2834, 62, 25927, 393, 2834, 62, 25927, 14692, 2618, 8973, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 25507, 24997, 13, 17147, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2834, 62, 25927, 14692, 6371, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 28, 33, 33076, 13, 18982, 7, 2618, 28, 7206, 38865, 62, 33, 33076, 11, 2071, 62, 17618, 28, 21949, 62, 17618, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 611, 277, 1, 17511, 12, 90, 21949, 62, 17618, 32239, 77, 1, 407, 287, 2834, 62, 25927, 14692, 2618, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 25507, 24997, 13, 17147, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2834, 62, 25927, 14692, 6371, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 28, 33, 33076, 13, 18982, 7, 2618, 28, 31216, 62, 25927, 14692, 2618, 33116, 2071, 62, 17618, 28, 21949, 62, 17618, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 1441, 628, 198, 292, 13361, 825, 318, 62, 7295, 62, 7959, 7, 456, 11, 20579, 2599, 198, 220, 220, 220, 37227, 9787, 611, 262, 2836, 318, 257, 16932, 7535, 4755, 8517, 526, 15931, 198, 220, 220, 220, 8745, 62, 660, 4105, 796, 12813, 2398, 82, 14, 29412, 14, 660, 4105, 1, 198, 220, 220, 220, 1074, 62, 3672, 796, 366, 29412, 4755, 1, 198, 220, 220, 220, 30351, 329, 1074, 287, 24997, 13, 1136, 2676, 7, 2398, 62, 660, 4105, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1074, 14692, 3672, 1, 4083, 21037, 3419, 6624, 1074, 62, 3672, 25, 220, 1303, 23864, 2611, 25, 645, 8478, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7, 69, 1, 90, 15097, 62, 3672, 0, 81, 92, 407, 1043, 379, 1391, 2398, 62, 660, 4105, 0, 81, 92, 4943, 198, 220, 220, 220, 1303, 383, 705, 660, 4105, 6, 2134, 691, 3769, 257, 10289, 284, 257, 39224, 36123, 11, 198, 220, 220, 220, 1303, 523, 14500, 5678, 262, 10289, 284, 262, 1729, 12, 10378, 31023, 1074, 9931, 198, 220, 220, 220, 1303, 36123, 13, 198, 220, 220, 220, 9931, 62, 6371, 796, 277, 1, 14, 660, 4105, 14, 90, 15097, 17816, 312, 20520, 92, 14, 30814, 5748, 14, 90, 29460, 36786, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 24997, 13, 1136, 9186, 7, 30814, 1056, 62, 6371, 8, 198, 220, 220, 220, 2845, 308, 17484, 40140, 13, 22069, 18453, 355, 2859, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2859, 13, 13376, 62, 8189, 6624, 32320, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 628, 198, 4299, 318, 62, 10827, 62, 15908, 7, 34345, 2599, 198, 220, 220, 220, 366, 13615, 6407, 611, 2393, 318, 287, 262, 3000, 8619, 526, 198, 220, 220, 220, 1441, 29472, 13, 9688, 2032, 342, 7, 49597, 62, 45, 13918, 62, 34720, 8, 628, 198, 4299, 3487, 1096, 62, 7839, 7, 7839, 11, 1767, 2599, 198, 220, 220, 220, 37227, 26447, 1096, 262, 3670, 611, 340, 42123, 625, 656, 262, 4810, 338, 1767, 526, 15931, 198, 220, 220, 220, 611, 407, 357, 7839, 13, 437, 2032, 342, 7203, 1399, 4943, 290, 1767, 13, 9688, 2032, 342, 7203, 1399, 4943, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3670, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11204, 30285, 287, 1339, 3467, 81, 59, 77, 318, 973, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3670, 58, 21912, 16, 60, 1343, 1767, 58, 16, 25, 4083, 3911, 653, 7203, 59, 81, 59, 77, 4943, 58, 15, 60, 628, 198, 198, 292, 13361, 825, 651, 62, 1050, 62, 1640, 62, 41509, 7, 456, 11, 427, 64, 2599, 198, 220, 220, 220, 37227, 16742, 262, 4810, 7268, 262, 2176, 4589, 12234, 526, 15931, 198, 220, 220, 220, 778, 82, 62, 1640, 62, 41509, 796, 25507, 24997, 13, 1136, 9186, 7, 198, 220, 220, 220, 220, 220, 220, 220, 277, 1, 14, 12947, 14, 37165, 30, 80, 28, 4906, 25, 1050, 10, 260, 7501, 25, 29412, 14, 13155, 7535, 10, 26270, 29164, 26270, 36786, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 611, 778, 82, 62, 1640, 62, 41509, 14692, 23350, 62, 9127, 8973, 1875, 657, 25, 220, 1303, 612, 815, 691, 307, 530, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 778, 82, 62, 1640, 62, 41509, 14692, 23814, 1, 7131, 15, 60, 198, 220, 220, 220, 1441, 6045, 198 ]
2.507273
1,650
""" Author: John Betacourt Gonzalez Aka: @JohnBetaCode """ # ============================================================================= # LIBRARIES AND DEPENDENCIES - LIBRARIES AND DEPENDENCIES - LIBRARIES AND DEPEN # ============================================================================= from utils import printlog, try_catch_log import cv2 import numpy as np import os # ============================================================================= # CLASSES - CLASSES - CLASSES - CLASSES - CLASSES - CLASSES - CLASSES - CLASSE # ============================================================================= # ============================================================================= # FUNCTIONS - FUNCTIONS - FUNCTIONS - FUNCTIONS - FUNCTIONS - FUNCTIONS - FUNC # ============================================================================= # ============================================================================= # MAIN FUNCTION - MAIN FUNCTION - MAIN FUNCTION - MA[-IN FUNCTION - MAIN FUNCTION # IMPLEMENTATION EXAMPLE - IMPLEMENTATION EXAMPLE - IMPLEMENTATION EXAMPLE - IM # =============================================================================
[ 37811, 198, 13838, 25, 1757, 5147, 330, 15666, 24416, 198, 32, 4914, 25, 2488, 7554, 43303, 10669, 198, 37811, 198, 198, 2, 38093, 25609, 198, 2, 45651, 49, 1503, 11015, 5357, 5550, 47, 10619, 24181, 11015, 532, 45651, 49, 1503, 11015, 5357, 5550, 47, 10619, 24181, 11015, 532, 45651, 49, 1503, 11015, 5357, 5550, 47, 1677, 198, 2, 38093, 25609, 198, 6738, 3384, 4487, 1330, 3601, 6404, 11, 1949, 62, 40198, 62, 6404, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 2, 38093, 25609, 198, 2, 42715, 1546, 532, 42715, 1546, 532, 42715, 1546, 532, 42715, 1546, 532, 42715, 1546, 532, 42715, 1546, 220, 532, 42715, 1546, 532, 7852, 1921, 5188, 198, 2, 38093, 25609, 628, 198, 2, 38093, 25609, 198, 2, 29397, 4177, 11053, 532, 29397, 4177, 11053, 532, 29397, 4177, 11053, 532, 29397, 4177, 11053, 532, 29397, 4177, 11053, 220, 532, 29397, 4177, 11053, 532, 29397, 34, 198, 2, 38093, 25609, 198, 198, 2, 38093, 25609, 198, 2, 8779, 1268, 29397, 4177, 2849, 532, 8779, 1268, 29397, 4177, 2849, 532, 8779, 1268, 29397, 4177, 2849, 532, 8779, 58, 12, 1268, 29397, 4177, 2849, 532, 8779, 1268, 29397, 4177, 2849, 198, 2, 30023, 2538, 10979, 6234, 7788, 2390, 16437, 532, 30023, 2538, 10979, 6234, 7788, 2390, 16437, 532, 30023, 2538, 10979, 6234, 7788, 2390, 16437, 532, 8959, 198, 2, 38093, 25609, 198 ]
5.142857
231
"""NGPVAN Locations Endpoints""" from parsons.etl.table import Table import logging logger = logging.getLogger(__name__)
[ 37811, 10503, 47, 53, 1565, 41277, 5268, 13033, 37811, 198, 198, 6738, 13544, 684, 13, 316, 75, 13, 11487, 1330, 8655, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.1
40
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai # # This is a python script. You need a Python interpreter to run it. # For example, ActiveState Python, which exists for windows. # # This script strips the penultimate record from a Mobipocket file. # This is useful because the current KindleGen add a compressed copy # of the source files used in this record, making the ebook produced # about twice as big as it needs to be. # # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, commercial or non-commercial, and by any # means. # # In jurisdictions that recognize copyright laws, the author or authors # of this software dedicate any and all copyright interest in the # software to the public domain. We make this dedication for the benefit # of the public at large and to the detriment of our heirs and # successors. We intend this dedication to be an overt act of # relinquishment in perpetuity of all present and future rights to this # software under copyright law. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # For more information, please refer to <http://unlicense.org/> # # Written by Paul Durrant, 2010-2011, [email protected] # # Changelog # 1.00 - Initial version # 1.10 - Added an option to output the stripped data # 1.20 - Added check for source files section (thanks Piquan) # 1.30 - Added Support for K8 style mobis # 1.31 - To get K8 style mobis to work properly, need to replace SRCS section with section of 0 length # 1.35a- Backport of fixes from 1.32-1.35 to 1.31 to workaround latest Kindlegen changes __version__ = '1.36.1' import codecs import getopt import locale import os import struct import sys iswindows = sys.platform.startswith('win') # Because Windows (and Mac OS X) allows full unicode filenames and paths # any paths in pure bytestring python 2.X code must be utf-8 encoded as they will need to # be converted on the fly to full unicode for Windows platforms. Any other 8-bit str # encoding would lose characters that can not be represented in that encoding # these are simple support routines to allow use of utf-8 encoded bytestrings as paths in main program # to be converted on the fly to full unicode as temporary un-named values to prevent # the potential mixing of unicode and bytestring string values in the main program # force string to be utf-8 encoded whether unicode or bytestring # get sys.argv arguments and encode them into utf-8 # Python 2.X is broken in that it does not recognize CP65001 as UTF-8 # Almost all sane operating systems now default to utf-8 (or full unicode) as the # proper default encoding so that all files and path names # in any language can be properly represented. if __name__ == '__main__': cli_main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 7753, 12685, 7656, 28, 48504, 12, 23, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 38031, 25, 316, 25, 6448, 28, 19, 25, 1872, 198, 2, 198, 2, 770, 318, 257, 21015, 4226, 13, 921, 761, 257, 11361, 28846, 284, 1057, 340, 13, 198, 2, 1114, 1672, 11, 14199, 9012, 11361, 11, 543, 7160, 329, 9168, 13, 198, 2, 198, 2, 770, 4226, 22670, 262, 3112, 44818, 1700, 422, 257, 16540, 541, 5459, 2393, 13, 198, 2, 770, 318, 4465, 780, 262, 1459, 27114, 13746, 751, 257, 25388, 4866, 198, 2, 286, 262, 2723, 3696, 973, 287, 428, 1700, 11, 1642, 262, 47179, 4635, 198, 2, 546, 5403, 355, 1263, 355, 340, 2476, 284, 307, 13, 198, 2, 198, 2, 198, 2, 770, 318, 1479, 290, 555, 12685, 26584, 3788, 2716, 656, 262, 1171, 7386, 13, 198, 2, 198, 2, 17462, 318, 1479, 284, 4866, 11, 13096, 11, 7715, 11, 779, 11, 17632, 11, 3677, 11, 393, 198, 2, 14983, 428, 3788, 11, 2035, 287, 2723, 2438, 1296, 393, 355, 257, 14102, 198, 2, 13934, 11, 329, 597, 4007, 11, 5068, 393, 1729, 12, 36313, 11, 290, 416, 597, 198, 2, 1724, 13, 198, 2, 198, 2, 554, 25281, 326, 7564, 6634, 3657, 11, 262, 1772, 393, 7035, 198, 2, 286, 428, 3788, 39383, 597, 290, 477, 6634, 1393, 287, 262, 198, 2, 3788, 284, 262, 1171, 7386, 13, 775, 787, 428, 22445, 329, 262, 4414, 198, 2, 286, 262, 1171, 379, 1588, 290, 284, 262, 42959, 286, 674, 40862, 290, 198, 2, 41491, 13, 775, 14765, 428, 22445, 284, 307, 281, 9929, 719, 286, 198, 2, 36610, 17862, 287, 8939, 14834, 286, 477, 1944, 290, 2003, 2489, 284, 428, 198, 2, 3788, 739, 6634, 1099, 13, 198, 2, 198, 2, 3336, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 198, 2, 7788, 32761, 6375, 8959, 49094, 11, 47783, 2751, 21728, 5626, 40880, 5390, 3336, 34764, 11015, 3963, 198, 2, 34482, 3398, 1565, 5603, 25382, 11, 376, 46144, 7473, 317, 16652, 2149, 37232, 33079, 48933, 5357, 44521, 1268, 10913, 2751, 12529, 13, 198, 2, 3268, 8005, 49261, 50163, 3336, 37195, 20673, 9348, 43031, 19146, 7473, 15529, 47666, 3955, 11, 29506, 25552, 6375, 198, 2, 25401, 43031, 25382, 11, 7655, 2767, 16879, 3268, 3537, 40282, 3963, 27342, 10659, 11, 309, 9863, 6375, 25401, 54, 24352, 11, 198, 2, 5923, 1797, 2751, 16034, 11, 16289, 3963, 6375, 3268, 7102, 45, 24565, 13315, 3336, 47466, 6375, 3336, 23210, 6375, 198, 2, 25401, 5550, 1847, 20754, 3268, 3336, 47466, 13, 198, 2, 198, 2, 1114, 517, 1321, 11, 3387, 3522, 284, 1279, 4023, 1378, 403, 43085, 13, 2398, 15913, 198, 2, 198, 2, 22503, 416, 3362, 11164, 5250, 11, 3050, 12, 9804, 11, 279, 2518, 31, 67, 333, 5250, 13, 1073, 13, 2724, 198, 2, 198, 2, 609, 8368, 519, 198, 2, 220, 352, 13, 405, 532, 20768, 2196, 198, 2, 220, 352, 13, 940, 532, 10687, 281, 3038, 284, 5072, 262, 18818, 1366, 198, 2, 220, 352, 13, 1238, 532, 10687, 2198, 329, 2723, 3696, 2665, 357, 27547, 350, 1557, 272, 8, 198, 2, 220, 352, 13, 1270, 532, 10687, 7929, 329, 509, 23, 3918, 7251, 271, 198, 2, 220, 352, 13, 3132, 532, 1675, 651, 509, 23, 3918, 7251, 271, 284, 670, 6105, 11, 761, 284, 6330, 311, 7397, 50, 2665, 351, 2665, 286, 657, 4129, 198, 2, 220, 352, 13, 2327, 64, 12, 5157, 634, 286, 13040, 422, 352, 13, 2624, 12, 16, 13, 2327, 284, 352, 13, 3132, 284, 46513, 3452, 14927, 1455, 268, 2458, 198, 198, 834, 9641, 834, 796, 705, 16, 13, 2623, 13, 16, 6, 198, 198, 11748, 40481, 82, 198, 11748, 651, 8738, 198, 11748, 36693, 198, 11748, 28686, 198, 11748, 2878, 198, 11748, 25064, 628, 198, 271, 28457, 796, 25064, 13, 24254, 13, 9688, 2032, 342, 10786, 5404, 11537, 198, 198, 2, 4362, 3964, 357, 392, 4100, 7294, 1395, 8, 3578, 1336, 28000, 1098, 1226, 268, 1047, 290, 13532, 198, 2, 597, 13532, 287, 5899, 416, 9288, 1806, 21015, 362, 13, 55, 2438, 1276, 307, 3384, 69, 12, 23, 30240, 355, 484, 481, 761, 284, 198, 2, 307, 11513, 319, 262, 6129, 284, 1336, 28000, 1098, 329, 3964, 9554, 13, 220, 4377, 584, 807, 12, 2545, 965, 198, 2, 21004, 561, 4425, 3435, 326, 460, 407, 307, 7997, 287, 326, 21004, 198, 2, 777, 389, 2829, 1104, 31878, 284, 1249, 779, 286, 3384, 69, 12, 23, 30240, 416, 9288, 33173, 355, 13532, 287, 1388, 1430, 198, 2, 284, 307, 11513, 319, 262, 6129, 284, 1336, 28000, 1098, 355, 8584, 555, 12, 13190, 3815, 284, 2948, 198, 2, 262, 2785, 17090, 286, 28000, 1098, 290, 416, 9288, 1806, 4731, 3815, 287, 262, 1388, 1430, 198, 198, 2, 2700, 4731, 284, 307, 3384, 69, 12, 23, 30240, 1771, 28000, 1098, 393, 416, 9288, 1806, 198, 198, 2, 651, 25064, 13, 853, 85, 7159, 290, 37773, 606, 656, 3384, 69, 12, 23, 628, 198, 2, 11361, 362, 13, 55, 318, 5445, 287, 326, 340, 857, 407, 7564, 16932, 2996, 8298, 355, 41002, 12, 23, 198, 198, 2, 16699, 477, 33241, 5361, 3341, 783, 4277, 284, 3384, 69, 12, 23, 357, 273, 1336, 28000, 1098, 8, 355, 262, 198, 2, 1774, 4277, 21004, 523, 326, 477, 3696, 290, 3108, 3891, 198, 2, 287, 597, 3303, 460, 307, 6105, 7997, 13, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 537, 72, 62, 12417, 3419, 198 ]
3.59634
929
#!/usr/bin/env python3 import re import os import json from argparse import ArgumentParser CSS_ICON_NAME_PARSER = r"""\.fa-([^:]*?):(?=[^}]*?content:\s*['"](.*?)['"])""" def generate(css_file, json_file): """Generate a file that contains code for character names """ # check css_file exists if not os.path.isfile(css_file): raise FileNotFoundError("File '{}' not found".format(css_file)) # load css file with open(css_file, "r") as file: css_content = file.read() # parse css file css_matcher = re.findall(CSS_ICON_NAME_PARSER, css_content, re.S) # convert icons icon_dict = {} for name, code in css_matcher: if code.startswith("\\"): code_hex = "0x" + code[1:] else: code_hex = hex(ord(code)) icon_dict[name] = code_hex # write json file with open(json_file, "w") as file: file.write(json.encode(icon_dict)) def get_arg_parser(): """Create the parser """ parser = ArgumentParser("Icon map generator") parser.add_argument( "css_file", help="File with CSS rules mapping icons name and character." ) parser.add_argument( "json_file", help="Output file with hexadecimal code for icons." ) return parser if __name__ == "__main__": parser = get_arg_parser() args = parser.parse_args() generate(args.css_file, args.json_file) print("JSON file saved in '{}'".format(args.json_file))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 1822, 29572, 1330, 45751, 46677, 628, 198, 49155, 62, 2149, 1340, 62, 20608, 62, 27082, 35009, 796, 374, 37811, 17405, 13331, 12, 26933, 61, 47715, 9, 30, 2599, 7, 30, 41888, 61, 92, 60, 9, 30, 11299, 7479, 82, 9, 17816, 8973, 7, 15885, 10091, 17816, 8973, 8, 37811, 628, 198, 4299, 7716, 7, 25471, 62, 7753, 11, 33918, 62, 7753, 2599, 198, 220, 220, 220, 37227, 8645, 378, 257, 2393, 326, 4909, 2438, 329, 2095, 3891, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 2198, 269, 824, 62, 7753, 7160, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 4468, 576, 7, 25471, 62, 7753, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 9220, 3673, 21077, 12331, 7203, 8979, 705, 90, 92, 6, 407, 1043, 1911, 18982, 7, 25471, 62, 7753, 4008, 628, 220, 220, 220, 1303, 3440, 269, 824, 2393, 198, 220, 220, 220, 351, 1280, 7, 25471, 62, 7753, 11, 366, 81, 4943, 355, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 269, 824, 62, 11299, 796, 2393, 13, 961, 3419, 628, 220, 220, 220, 1303, 21136, 269, 824, 2393, 198, 220, 220, 220, 269, 824, 62, 6759, 2044, 796, 302, 13, 19796, 439, 7, 49155, 62, 2149, 1340, 62, 20608, 62, 27082, 35009, 11, 269, 824, 62, 11299, 11, 302, 13, 50, 8, 628, 220, 220, 220, 1303, 10385, 17149, 198, 220, 220, 220, 7196, 62, 11600, 796, 23884, 198, 220, 220, 220, 329, 1438, 11, 2438, 287, 269, 824, 62, 6759, 2044, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2438, 13, 9688, 2032, 342, 7203, 6852, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 33095, 796, 366, 15, 87, 1, 1343, 2438, 58, 16, 47715, 628, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2438, 62, 33095, 796, 17910, 7, 585, 7, 8189, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 7196, 62, 11600, 58, 3672, 60, 796, 2438, 62, 33095, 628, 220, 220, 220, 1303, 3551, 33918, 2393, 198, 220, 220, 220, 351, 1280, 7, 17752, 62, 7753, 11, 366, 86, 4943, 355, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2393, 13, 13564, 7, 17752, 13, 268, 8189, 7, 4749, 62, 11600, 4008, 628, 198, 4299, 651, 62, 853, 62, 48610, 33529, 198, 220, 220, 220, 37227, 16447, 262, 30751, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30751, 796, 45751, 46677, 7203, 19578, 3975, 17301, 4943, 628, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 25471, 62, 7753, 1600, 1037, 2625, 8979, 351, 17391, 3173, 16855, 17149, 1438, 290, 2095, 526, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 30751, 13, 2860, 62, 49140, 7, 198, 220, 220, 220, 220, 220, 220, 220, 366, 17752, 62, 7753, 1600, 1037, 2625, 26410, 2393, 351, 17910, 671, 66, 4402, 2438, 329, 17149, 526, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1441, 30751, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 651, 62, 853, 62, 48610, 3419, 628, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 628, 220, 220, 220, 7716, 7, 22046, 13, 25471, 62, 7753, 11, 26498, 13, 17752, 62, 7753, 8, 628, 220, 220, 220, 3601, 7203, 40386, 2393, 7448, 287, 705, 90, 92, 6, 1911, 18982, 7, 22046, 13, 17752, 62, 7753, 4008, 198 ]
2.416938
614
import json from numpy import * import csv import berexapi as bex from pandas import Series, DataFrame import pandas as pd import tools.color as toolcolor import tools.arrange as toolarrange import numpy as np import itertools import tools.repack as toolrepack import tools.genie3 as toolgenie3 ERROR_CODE = ["", 1] if __name__ == '__main__': print "SOMETHING HERE"
[ 11748, 33918, 201, 198, 6738, 299, 32152, 1330, 1635, 201, 198, 11748, 269, 21370, 201, 198, 11748, 307, 21510, 15042, 355, 307, 87, 201, 198, 6738, 19798, 292, 1330, 7171, 11, 6060, 19778, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 4899, 13, 8043, 355, 2891, 8043, 201, 198, 11748, 4899, 13, 3258, 858, 355, 2891, 3258, 858, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 340, 861, 10141, 201, 198, 11748, 4899, 13, 7856, 441, 355, 2891, 7856, 441, 201, 198, 11748, 4899, 13, 5235, 494, 18, 355, 2891, 5235, 494, 18, 201, 198, 201, 198, 24908, 62, 34, 16820, 796, 14631, 1600, 352, 60, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 197, 4798, 366, 50, 2662, 20702, 2751, 15698, 1, 201, 198 ]
2.746479
142
from dbipyt import dbipyt
[ 6738, 20613, 541, 20760, 1330, 20613, 541, 20760, 198 ]
2.888889
9
import os import copy import torch import torch.distributed as dist from .symmatrix import SymMatrix HESSIAN = 'hessian' # Hessian FISHER_EXACT = 'fisher_exact' # exact Fisher FISHER_MC = 'fisher_mc' # Fisher estimation by Monte-Carlo sampling COV = 'cov' # no-centered covariance a.k.a. empirical Fisher SHAPE_FULL = 'full' # full SHAPE_BLOCK_DIAG = 'block_diag' # layer-wise block-diagonal SHAPE_KRON = 'kron' # Kronecker-factored SHAPE_DIAG = 'diag' # diagonal __all__ = [ 'MatrixManager', 'FISHER_EXACT', 'FISHER_MC', 'COV', 'HESSIAN', 'SHAPE_FULL', 'SHAPE_BLOCK_DIAG', 'SHAPE_KRON', 'SHAPE_DIAG' ] _supported_types = [HESSIAN, FISHER_EXACT, FISHER_MC, COV] _supported_shapes = [SHAPE_FULL, SHAPE_BLOCK_DIAG, SHAPE_KRON, SHAPE_DIAG] _normalizations = (torch.nn.BatchNorm1d, torch.nn.BatchNorm2d)
[ 11748, 28686, 198, 11748, 4866, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 17080, 6169, 355, 1233, 198, 198, 6738, 764, 1837, 3020, 265, 8609, 1330, 15845, 46912, 198, 198, 39, 7597, 16868, 796, 705, 33979, 666, 6, 220, 1303, 46305, 666, 198, 37, 1797, 16879, 62, 6369, 10659, 796, 705, 69, 4828, 62, 1069, 529, 6, 220, 1303, 2748, 14388, 198, 37, 1797, 16879, 62, 9655, 796, 705, 69, 4828, 62, 23209, 6, 220, 1303, 14388, 31850, 416, 22489, 12, 9914, 5439, 19232, 198, 8220, 53, 796, 705, 66, 709, 6, 220, 1303, 645, 12, 38050, 44829, 590, 257, 13, 74, 13, 64, 13, 21594, 14388, 198, 198, 9693, 45721, 62, 37, 9994, 796, 705, 12853, 6, 220, 1303, 1336, 198, 9693, 45721, 62, 9148, 11290, 62, 35, 3539, 38, 796, 705, 9967, 62, 10989, 363, 6, 220, 1303, 7679, 12, 3083, 2512, 12, 10989, 27923, 198, 9693, 45721, 62, 30758, 1340, 796, 705, 74, 1313, 6, 220, 1303, 13685, 505, 15280, 12, 22584, 1850, 198, 9693, 45721, 62, 35, 3539, 38, 796, 705, 10989, 363, 6, 220, 1303, 40039, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 46912, 13511, 3256, 198, 220, 220, 220, 705, 37, 1797, 16879, 62, 6369, 10659, 3256, 198, 220, 220, 220, 705, 37, 1797, 16879, 62, 9655, 3256, 198, 220, 220, 220, 705, 8220, 53, 3256, 198, 220, 220, 220, 705, 39, 7597, 16868, 3256, 198, 220, 220, 220, 705, 9693, 45721, 62, 37, 9994, 3256, 198, 220, 220, 220, 705, 9693, 45721, 62, 9148, 11290, 62, 35, 3539, 38, 3256, 198, 220, 220, 220, 705, 9693, 45721, 62, 30758, 1340, 3256, 198, 220, 220, 220, 705, 9693, 45721, 62, 35, 3539, 38, 6, 198, 60, 198, 198, 62, 15999, 62, 19199, 796, 685, 39, 7597, 16868, 11, 376, 1797, 16879, 62, 6369, 10659, 11, 376, 1797, 16879, 62, 9655, 11, 7375, 53, 60, 198, 62, 15999, 62, 1477, 7916, 796, 685, 9693, 45721, 62, 37, 9994, 11, 6006, 45721, 62, 9148, 11290, 62, 35, 3539, 38, 11, 6006, 45721, 62, 30758, 1340, 11, 6006, 45721, 62, 35, 3539, 38, 60, 198, 198, 62, 11265, 4582, 796, 357, 13165, 354, 13, 20471, 13, 33, 963, 35393, 16, 67, 11, 28034, 13, 20471, 13, 33, 963, 35393, 17, 67, 8, 628, 198 ]
2.232984
382
while True: line = raw_input('> ') if line[0] == '#' : continue if line == 'done': break print line print 'Done!'
[ 4514, 6407, 25, 198, 220, 220, 220, 1627, 796, 8246, 62, 15414, 10786, 29, 705, 8, 198, 220, 220, 220, 611, 1627, 58, 15, 60, 6624, 705, 2, 6, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 611, 1627, 6624, 705, 28060, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 3601, 1627, 198, 198, 4798, 705, 45677, 13679, 628 ]
2.084507
71
from conans import ConanFile, CMake import os ############### CONFIGURE THESE VALUES ################## default_user = "lucteo" default_channel = "testing" ######################################################### channel = os.getenv("CONAN_CHANNEL", default_channel) username = os.getenv("CONAN_USERNAME", default_user)
[ 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 198, 11748, 28686, 198, 198, 7804, 4242, 21017, 25626, 11335, 48947, 26173, 35409, 1303, 14468, 2, 198, 12286, 62, 7220, 796, 366, 2290, 310, 68, 78, 1, 198, 12286, 62, 17620, 796, 366, 33407, 1, 198, 29113, 14468, 7804, 2, 198, 198, 17620, 796, 28686, 13, 1136, 24330, 7203, 10943, 1565, 62, 3398, 22846, 3698, 1600, 4277, 62, 17620, 8, 198, 29460, 796, 28686, 13, 1136, 24330, 7203, 10943, 1565, 62, 29904, 20608, 1600, 4277, 62, 7220, 8, 198 ]
3.670455
88
__author__ = 'jlu96' import csv import numpy as np import json import pandas as pd import collections global data_dir data_dir = "/Users/jlu96/v-causal-snps/data/GeneExpressionData/GGR_Network/" global genecols genecols = ["Official Symbol Interactor A", "Official Symbol Interactor B"] def annotate_cols(df, cols, genes, name): """Return the sum across a row's cols of genes in the gene""" df[name] = np.sum([df[col].isin(genes).astype(int) for col in cols], axis=0) return df def make_type_col(df, col_name): """ :param df: :param name: :param col_name: :return: Add a new column with a column of 1s indicating the type of the column. """ df[col_name] = 1 return df def annotate_cols_summary(df, cols, col_name = "Type", do_reverse=False): """Assumes there is a non-zero, non-null in each of the cols. Summarizes them one-by-one""" assert len(set(cols).intersection(set(df.columns.values))) == len(cols) sum_df = df.copy() type_array = np.empty(len(df), dtype=object) type_array[:] = "" rev_cols = cols[:] if do_reverse: rev_cols.reverse() for col in rev_cols: indices = np.where(np.logical_and(pd.notnull(sum_df[col]), sum_df[col] != 0))[0] print("FOr col", col, ":", len(indices)) type_array[indices] += col + "," sum_df[col_name] = type_array #print sum_df[sum_df[col_name] != ""][col_name] return sum_df def get_annotated(df, names=[], cols=genecols, suffixes = ["_A", "_B"]): """ Given annotation type :param df: :param name: :return: df with annotations, and with a col of all rows containing at least one """ file_dir = "/Users/jlu96/v-causal-snps/data/GeneExpressionData/GGR_Network/raw_files/" name2filename = {} name2filename["Diabetes_highconf"] = file_dir + "GSEA-diabetes-high-conf-7_29_16-genes.txt" name2filename["Diabetes_lowconf"] = file_dir + "GSEA-diabetes-low-conf-7_29_16-genes.txt" name2filename["Metabolism_GSEA_highconf"] = file_dir + "GSEA-gluconeo-glyc-gluc-metab-8_2_16-genes.txt" name2filename["Metabolism_GSEA_lowconf"] = file_dir + "GSEA-gluconeo-am-glyc-lip-gluc-metab-7_29_16-genes.txt" name2filename["Immune"] = file_dir + "immune-GSEA-GOC-genes.txt" name2filename["Immune_GOC-Priority"] = file_dir + "Immune-GOC-Priority.txt" name2filename["Immune_GSEA"] = file_dir + "GSEA-immune-inflammatory-7_29_16-genes.txt" name2filename["GR"] = file_dir + "GR_GO_direct_candidates_union.txt" name2filename["GR_direct-candidate"] = file_dir + "GR_direct_candidates-HGNC.txt" name2filename["GR_GO"] = file_dir + "GR_Pathway-GO-HGNC.txt" name2filename["DEG_edgeR-0.05"] = file_dir + "sig_genes_reg_fdr-0.05-all.txt" default_loads = ["GR", "DEG_edgeR-0.05", "Diabetes_highconf", "Diabetes_lowconf", "Immune", "Metabolism_GSEA_highconf", "Metabolism_GSEA_lowconf"] if names == []: names = default_loads else: for name in names: if name not in name2filename: raise ValueError("Name " + name + " not in list of annotations") df_genes = get_genes(df, genecols=cols) for name in names: filename = name2filename[name] annot_genes = load_genes(filename) # Get the df's genes. See # annotated both_genes = df_genes.intersection(annot_genes) print("# ", name, " genes in df: ", len(both_genes)) newcols = [] # Annotate each column if extra genes for col, suffix in zip(cols, suffixes): newcol = name + suffix newcols.append(newcol) df = annotate_cols(df, [col], annot_genes, newcol) # Annotate the total number in that row df[name] = np.sum([df[newcol] for newcol in newcols], axis=0) print("# ", name, " edges in df: ", len(np.where(df[name])[0])) return df def get_genes_in(df, name, genecols=["Gene"], verbose=False): """ :param df: :param name: :return: Genes where the colname is not empty """ in_df = df[np.logical_and(pd.notnull(df[name]), df[name] != 0)] genes = get_genes(in_df, genecols=genecols) if verbose: print("Genes in ", name, ":", len(genes)) return genes def filter_pairs(pairs, genes): """ :param pairs: :param genes: :return: Limit only to pairsi n the genes """ return [p for p in pairs if p[0] in genes and p[1] in genes] # def get_cause_plot_triples(cause2effects, sort_dict=None): # """ # :param cause2effects: Dictionary of the causes and effects # :param sort_dict: Dictionary returning a key to sort the effects by # :return: a list of plot_triples, cause at beginning # """ # plot_triples_list = [] # for cause in cause2effects: # effects = sorted(cause2effects[cause], key = lambda entry: sort_dict[entry], reverse=True) # effect_list = pj.partition_inputs(list(effects), int(round(len(effects)/2.0))) # # # plot_triples_list.extend([[cause] + e for e in effect_list]) # # print "Plot triples: " # print plot_triples_list[0:20] # # return plot_triples_list def limit_to_genes_all(df, genes, cols=genecols): """ :param df: :param genes: :param cols: :return: df where all values in cols are in genes """ num_cols = len(cols) indices = np.sum([df[col].isin(genes).values for col in cols], axis=0) >= num_cols new_df = df[indices].copy() new_df.index = list(range(len(new_df))) return new_df # def df_to_graph_causal(df, key_col, cause_col, source_col=None, target_col=None, type_cols=[]): # """ # :param df: Input dataframe # :param key_col: Column containing source-target pairs # :param cause_col: Column saying the type of causal relation. If None, assume just PPI # :param source_col: The source column of the causal relation if it exists # :param target_col: Target column # :param type_cols: Other attributes to annotate the edge with # :return: A Digraph where each edge has attributes: source, target (None if Causal Type is None) # Causal Type, and other type_col annotations # """ # G = nx.Graph() # # for i in range(len(df)): # if pd.notnull(cause_col): # # # type_dict = {} # for type_col in type_cols: # type_dict[type_col] = df[type_col][i] # # G.add_edge(source, target, attr_dict=type_dict) # # return G def matr_to_net(matr_df, edge_name=None, abs_name=None, cause_effect_col = "Cause-Effect", colnames=None, make_pair=False, make_type=True, name=None, sort_by=None, extra_dict=None, no_abs=False, do_sort=True): """ Convert a coefficient matrix to a network. :param matr_df: rows and columns are the genes :param edge_name: The name to give the column of edge values (from matrix) :param extra_dict: Dictionary to update the rest with. :param cause_effect_col: :param colnames: Customize cause effect colnames :param make_pair: Make a pair column? :param extra_dict: an extra dictionary of attributes you want to specify :return: net_df, the network from all matrix nonzero entries """ if colnames == None: colnames = ["Cause", "Effect"] if edge_name == None: edge_name = "Weight" if abs_name == None: abs_name = "AbsWeight" if sort_by == None: sort_by = abs_name matr = matr_df.values genes = matr_df.columns.values indices = np.where(matr != 0) betas = matr[indices] net_dict = collections.OrderedDict() net_dict[cause_effect_col] = ["-".join(x) for x in zip(genes[indices[0]],genes[indices[1]])] net_dict[colnames[0]] = genes[indices[0]] net_dict[colnames[1]] = genes[indices[1]] net_dict[edge_name] = betas if not no_abs: net_dict[abs_name] = np.absolute(betas) if extra_dict != None: net_dict.update(extra_dict) net_df = pd.DataFrame.from_dict(net_dict) if make_pair: net_df = make_pair_col(net_df, colnames) if make_type: net_df["Type"] = name if do_sort: net_df.sort_values(sort_by, ascending=False, inplace=True) print("New network (edges, attributes) = ", net_df.shape) return net_df def matr_file_to_net_file(matr_file, name, net_file=None, conv_to_hg=True, add_pair=True): """Convert a matrix file to a network file""" if not net_file: net_file = matr_file[:-4] + "-network.txt" print(name) cause_name = name + " Cause" effect_name = name + " Effect" matr_df = pd.read_csv(matr_file, sep="\t", header=0, index_col=0) print(matr_df.head()) net_df = matr_to_net(matr_df, name, colnames=[cause_name, effect_name]) print(net_df.head()) if conv_to_hg: net_df[cause_name] = [ensg2hg(gene) for gene in net_df[cause_name]] net_df[effect_name] = [ensg2hg(gene) for gene in net_df[effect_name]] print("Post conversion: ") print(net_df.head()) if add_pair: net_df = make_pair_col(net_df, [cause_name, effect_name], "Pair") print() print("FINAL:") print(net_df.head()) print("Writing to ", net_file) net_df.to_csv(net_file, sep="\t", index=False) def overlay_dfs(old_df, over_df, key = "Pair", over_cols=[], fill_empty=False, fill_genecols=genecols, how='outer'): """ Overlay dfs where the key is Pair and using the known genecols. :param old_df: :param over_df: Df to overlay :param key: Key to use to match up rows. Unwrap this into the genecols :param over_cols: The columns to merge over :param cols: Columns to overlay with :return: """ if len(genecols) != 2: raise ValueError("There must be 2 genecols to unwrap the pair.") if over_cols == []: over_cols = over_df.columns.values # columns to merge over add_df = over_df[over_cols] print("Over cols: ", over_cols) # df = old_df.merge(add_df, left_on=key, right_on=key, how=how) if fill_empty: df = fill_empty_genecols(df, fill_genecols, key) return df def get_feedforward(G, Ps=None, Xs=None, Ts=None): """ :param G: A Digraph :return: a list of tuples (P, X, C) where P -> X, X -> T, P -> T """ if Ps == None: Ps = set(G.nodes()) if Xs == None: Xs = set(G.nodes()) if Ts == None: Ts = set(G.nodes()) feedforward_set = set() for X in Xs: for T in set(G.successors(X)).intersection(Ts): this_Ps = set(G.predecessors(X)).intersection(set(G.predecessors(T)).intersection(Ps)) if len(this_Ps) > 0: for P in this_Ps: feedforward_set.add((P, X, T)) print("Num feedforward: ", len(feedforward_set)) return feedforward_set
[ 834, 9800, 834, 796, 705, 73, 2290, 4846, 6, 198, 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 17268, 198, 198, 20541, 1366, 62, 15908, 198, 7890, 62, 15908, 796, 12813, 14490, 14, 73, 2290, 4846, 14, 85, 12, 6888, 6775, 12, 16184, 862, 14, 7890, 14, 39358, 16870, 2234, 6601, 14, 38, 10761, 62, 26245, 30487, 198, 198, 20541, 2429, 721, 10220, 198, 5235, 721, 10220, 796, 14631, 28529, 38357, 4225, 11218, 317, 1600, 366, 28529, 38357, 4225, 11218, 347, 8973, 628, 628, 628, 628, 628, 628, 198, 198, 4299, 24708, 378, 62, 4033, 82, 7, 7568, 11, 951, 82, 11, 10812, 11, 1438, 2599, 198, 220, 220, 220, 37227, 13615, 262, 2160, 1973, 257, 5752, 338, 951, 82, 286, 10812, 287, 262, 9779, 37811, 628, 220, 220, 220, 47764, 58, 3672, 60, 796, 45941, 13, 16345, 26933, 7568, 58, 4033, 4083, 45763, 7, 5235, 274, 737, 459, 2981, 7, 600, 8, 329, 951, 287, 951, 82, 4357, 16488, 28, 15, 8, 198, 220, 220, 220, 1441, 47764, 198, 198, 4299, 787, 62, 4906, 62, 4033, 7, 7568, 11, 951, 62, 3672, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 47764, 25, 198, 220, 220, 220, 1058, 17143, 1438, 25, 198, 220, 220, 220, 1058, 17143, 951, 62, 3672, 25, 198, 220, 220, 220, 1058, 7783, 25, 3060, 257, 649, 5721, 351, 257, 5721, 286, 352, 82, 12739, 262, 2099, 286, 262, 5721, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 47764, 58, 4033, 62, 3672, 60, 796, 352, 628, 220, 220, 220, 1441, 47764, 628, 198, 198, 4299, 24708, 378, 62, 4033, 82, 62, 49736, 7, 7568, 11, 951, 82, 11, 951, 62, 3672, 796, 366, 6030, 1600, 466, 62, 50188, 28, 25101, 2599, 198, 220, 220, 220, 37227, 8021, 8139, 612, 318, 257, 1729, 12, 22570, 11, 1729, 12, 8423, 287, 1123, 286, 262, 951, 82, 13, 5060, 3876, 4340, 606, 530, 12, 1525, 12, 505, 37811, 198, 220, 220, 220, 6818, 18896, 7, 2617, 7, 4033, 82, 737, 3849, 5458, 7, 2617, 7, 7568, 13, 28665, 82, 13, 27160, 22305, 6624, 18896, 7, 4033, 82, 8, 628, 220, 220, 220, 2160, 62, 7568, 796, 47764, 13, 30073, 3419, 628, 220, 220, 220, 2099, 62, 18747, 796, 45941, 13, 28920, 7, 11925, 7, 7568, 828, 288, 4906, 28, 15252, 8, 628, 220, 220, 220, 2099, 62, 18747, 58, 47715, 796, 13538, 628, 220, 220, 220, 2710, 62, 4033, 82, 796, 951, 82, 58, 47715, 198, 220, 220, 220, 611, 466, 62, 50188, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2710, 62, 4033, 82, 13, 50188, 3419, 628, 220, 220, 220, 329, 951, 287, 2710, 62, 4033, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 36525, 796, 45941, 13, 3003, 7, 37659, 13, 6404, 605, 62, 392, 7, 30094, 13, 1662, 8423, 7, 16345, 62, 7568, 58, 4033, 46570, 2160, 62, 7568, 58, 4033, 60, 14512, 657, 4008, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 37, 5574, 951, 1600, 951, 11, 366, 25, 1600, 18896, 7, 521, 1063, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 18747, 58, 521, 1063, 60, 15853, 951, 1343, 366, 553, 628, 220, 220, 220, 2160, 62, 7568, 58, 4033, 62, 3672, 60, 796, 2099, 62, 18747, 628, 220, 220, 220, 1303, 4798, 2160, 62, 7568, 58, 16345, 62, 7568, 58, 4033, 62, 3672, 60, 14512, 13538, 7131, 4033, 62, 3672, 60, 198, 220, 220, 220, 1441, 2160, 62, 7568, 628, 198, 4299, 651, 62, 34574, 515, 7, 7568, 11, 3891, 41888, 4357, 951, 82, 28, 5235, 721, 10220, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 35488, 274, 796, 14631, 62, 32, 1600, 45434, 33, 8973, 2599, 198, 220, 220, 220, 37227, 220, 11259, 23025, 2099, 198, 220, 220, 220, 1058, 17143, 47764, 25, 198, 220, 220, 220, 1058, 17143, 1438, 25, 198, 220, 220, 220, 1058, 7783, 25, 220, 47764, 351, 37647, 11, 290, 351, 257, 951, 286, 477, 15274, 7268, 379, 1551, 530, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2393, 62, 15908, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 220, 12813, 14490, 14, 73, 2290, 4846, 14, 85, 12, 6888, 6775, 12, 16184, 862, 14, 7890, 14, 39358, 16870, 2234, 6601, 14, 38, 10761, 62, 26245, 14, 1831, 62, 16624, 30487, 198, 220, 220, 220, 1438, 17, 34345, 796, 23884, 198, 220, 220, 220, 1438, 17, 34345, 14692, 18683, 11064, 62, 8929, 10414, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38, 46887, 12, 10989, 11064, 12, 8929, 12, 10414, 12, 22, 62, 1959, 62, 1433, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 18683, 11064, 62, 9319, 10414, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38, 46887, 12, 10989, 11064, 12, 9319, 12, 10414, 12, 22, 62, 1959, 62, 1433, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 9171, 28426, 1042, 62, 38, 46887, 62, 8929, 10414, 8973, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38, 46887, 12, 4743, 1229, 505, 78, 12, 10853, 66, 12, 4743, 1229, 12, 4164, 397, 12, 23, 62, 17, 62, 1433, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 9171, 28426, 1042, 62, 38, 46887, 62, 9319, 10414, 8973, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38, 46887, 12, 4743, 1229, 505, 78, 12, 321, 12, 10853, 66, 12, 40712, 12, 4743, 1229, 12, 4164, 397, 12, 22, 62, 1959, 62, 1433, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 24675, 1726, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38345, 12, 38, 46887, 12, 38, 4503, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 24675, 1726, 62, 38, 4503, 12, 22442, 414, 8973, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 24675, 1726, 12, 38, 4503, 12, 22442, 414, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 24675, 1726, 62, 38, 46887, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 38, 46887, 12, 38345, 12, 32272, 12, 22, 62, 1959, 62, 1433, 12, 5235, 274, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 10761, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 10761, 62, 11230, 62, 12942, 62, 46188, 37051, 62, 24592, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 10761, 62, 12942, 12, 46188, 20540, 8973, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 10761, 62, 12942, 62, 46188, 37051, 12, 39, 38, 7792, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 10761, 62, 11230, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 10761, 62, 15235, 1014, 12, 11230, 12, 39, 38, 7792, 13, 14116, 1, 198, 220, 220, 220, 1438, 17, 34345, 14692, 35, 7156, 62, 14907, 49, 12, 15, 13, 2713, 8973, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 220, 2393, 62, 15908, 1343, 366, 82, 328, 62, 5235, 274, 62, 2301, 62, 69, 7109, 12, 15, 13, 2713, 12, 439, 13, 14116, 1, 628, 220, 220, 220, 4277, 62, 46030, 796, 14631, 10761, 1600, 366, 35, 7156, 62, 14907, 49, 12, 15, 13, 2713, 1600, 366, 18683, 11064, 62, 8929, 10414, 1600, 366, 18683, 11064, 62, 9319, 10414, 1600, 366, 24675, 1726, 1600, 366, 9171, 28426, 1042, 62, 38, 46887, 62, 8929, 10414, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 9171, 28426, 1042, 62, 38, 46887, 62, 9319, 10414, 8973, 628, 220, 220, 220, 611, 3891, 6624, 685, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 3891, 796, 4277, 62, 46030, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1438, 287, 3891, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1438, 407, 287, 1438, 17, 34345, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7203, 5376, 366, 1343, 1438, 1343, 366, 407, 287, 1351, 286, 37647, 4943, 628, 198, 220, 220, 220, 47764, 62, 5235, 274, 796, 651, 62, 5235, 274, 7, 7568, 11, 2429, 721, 10220, 28, 4033, 82, 8, 628, 220, 220, 220, 329, 1438, 287, 3891, 25, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 796, 1438, 17, 34345, 58, 3672, 60, 628, 220, 220, 220, 220, 220, 220, 220, 24708, 62, 5235, 274, 796, 3440, 62, 5235, 274, 7, 34345, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3497, 262, 47764, 338, 10812, 13, 4091, 1303, 24708, 515, 628, 220, 220, 220, 220, 220, 220, 220, 1111, 62, 5235, 274, 796, 47764, 62, 5235, 274, 13, 3849, 5458, 7, 34574, 62, 5235, 274, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 2, 33172, 1438, 11, 366, 10812, 287, 47764, 25, 33172, 18896, 7, 16885, 62, 5235, 274, 4008, 628, 198, 220, 220, 220, 220, 220, 220, 220, 649, 4033, 82, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1052, 1662, 378, 1123, 5721, 611, 3131, 10812, 198, 220, 220, 220, 220, 220, 220, 220, 329, 951, 11, 35488, 287, 19974, 7, 4033, 82, 11, 35488, 274, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 4033, 796, 1438, 1343, 35488, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 4033, 82, 13, 33295, 7, 3605, 4033, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47764, 796, 24708, 378, 62, 4033, 82, 7, 7568, 11, 685, 4033, 4357, 24708, 62, 5235, 274, 11, 649, 4033, 8, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1052, 1662, 378, 262, 2472, 1271, 287, 326, 5752, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 58, 3672, 60, 796, 45941, 13, 16345, 26933, 7568, 58, 3605, 4033, 60, 329, 649, 4033, 287, 649, 4033, 82, 4357, 16488, 28, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 2, 33172, 1438, 11, 366, 13015, 287, 47764, 25, 33172, 18896, 7, 37659, 13, 3003, 7, 7568, 58, 3672, 12962, 58, 15, 60, 4008, 628, 220, 220, 220, 1441, 47764, 628, 628, 628, 198, 4299, 651, 62, 5235, 274, 62, 259, 7, 7568, 11, 1438, 11, 2429, 721, 10220, 28, 14692, 39358, 33116, 15942, 577, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 47764, 25, 198, 220, 220, 220, 1058, 17143, 1438, 25, 198, 220, 220, 220, 1058, 7783, 25, 5215, 274, 810, 262, 951, 3672, 318, 407, 6565, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 287, 62, 7568, 796, 47764, 58, 37659, 13, 6404, 605, 62, 392, 7, 30094, 13, 1662, 8423, 7, 7568, 58, 3672, 46570, 47764, 58, 3672, 60, 14512, 657, 15437, 628, 220, 220, 220, 10812, 796, 651, 62, 5235, 274, 7, 259, 62, 7568, 11, 2429, 721, 10220, 28, 5235, 721, 10220, 8, 628, 220, 220, 220, 611, 15942, 577, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 13746, 274, 287, 33172, 1438, 11, 366, 25, 1600, 18896, 7, 5235, 274, 4008, 628, 220, 220, 220, 1441, 10812, 198, 198, 4299, 8106, 62, 79, 3468, 7, 79, 3468, 11, 10812, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 14729, 25, 198, 220, 220, 220, 1058, 17143, 10812, 25, 198, 220, 220, 220, 1058, 7783, 25, 27272, 691, 284, 14729, 72, 299, 262, 10812, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 685, 79, 329, 279, 287, 14729, 611, 279, 58, 15, 60, 287, 10812, 290, 279, 58, 16, 60, 287, 10812, 60, 628, 198, 2, 825, 651, 62, 25587, 62, 29487, 62, 28461, 2374, 7, 25587, 17, 34435, 11, 3297, 62, 11600, 28, 14202, 2599, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 1058, 17143, 2728, 17, 34435, 25, 28261, 286, 262, 5640, 290, 3048, 198, 2, 220, 220, 220, 220, 1058, 17143, 3297, 62, 11600, 25, 28261, 8024, 257, 1994, 284, 3297, 262, 3048, 416, 198, 2, 220, 220, 220, 220, 1058, 7783, 25, 257, 1351, 286, 7110, 62, 28461, 2374, 11, 2728, 379, 3726, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 7110, 62, 28461, 2374, 62, 4868, 796, 17635, 198, 2, 220, 220, 220, 220, 329, 2728, 287, 2728, 17, 34435, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 3048, 796, 23243, 7, 25587, 17, 34435, 58, 25587, 4357, 1994, 796, 37456, 5726, 25, 3297, 62, 11600, 58, 13000, 4357, 9575, 28, 17821, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1245, 62, 4868, 796, 279, 73, 13, 3911, 653, 62, 15414, 82, 7, 4868, 7, 34435, 828, 493, 7, 744, 7, 11925, 7, 34435, 20679, 17, 13, 15, 22305, 198, 2, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 7110, 62, 28461, 2374, 62, 4868, 13, 2302, 437, 26933, 58, 25587, 60, 1343, 304, 329, 304, 287, 1245, 62, 4868, 12962, 198, 2, 198, 2, 220, 220, 220, 220, 3601, 366, 43328, 1333, 2374, 25, 366, 198, 2, 220, 220, 220, 220, 3601, 7110, 62, 28461, 2374, 62, 4868, 58, 15, 25, 1238, 60, 198, 2, 198, 2, 220, 220, 220, 220, 1441, 7110, 62, 28461, 2374, 62, 4868, 198, 198, 4299, 4179, 62, 1462, 62, 5235, 274, 62, 439, 7, 7568, 11, 10812, 11, 951, 82, 28, 5235, 721, 10220, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 47764, 25, 198, 220, 220, 220, 1058, 17143, 10812, 25, 198, 220, 220, 220, 1058, 17143, 951, 82, 25, 198, 220, 220, 220, 1058, 7783, 25, 47764, 810, 477, 3815, 287, 951, 82, 389, 287, 10812, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 997, 62, 4033, 82, 796, 18896, 7, 4033, 82, 8, 198, 220, 220, 220, 36525, 796, 45941, 13, 16345, 26933, 7568, 58, 4033, 4083, 45763, 7, 5235, 274, 737, 27160, 329, 951, 287, 951, 82, 4357, 16488, 28, 15, 8, 18189, 997, 62, 4033, 82, 628, 220, 220, 220, 649, 62, 7568, 796, 47764, 58, 521, 1063, 4083, 30073, 3419, 628, 220, 220, 220, 649, 62, 7568, 13, 9630, 796, 1351, 7, 9521, 7, 11925, 7, 3605, 62, 7568, 22305, 628, 220, 220, 220, 1441, 649, 62, 7568, 628, 198, 2, 825, 47764, 62, 1462, 62, 34960, 62, 6888, 6775, 7, 7568, 11, 1994, 62, 4033, 11, 2728, 62, 4033, 11, 2723, 62, 4033, 28, 14202, 11, 2496, 62, 4033, 28, 14202, 11, 2099, 62, 4033, 82, 28, 21737, 2599, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 1058, 17143, 47764, 25, 23412, 1366, 14535, 198, 2, 220, 220, 220, 220, 1058, 17143, 1994, 62, 4033, 25, 29201, 7268, 2723, 12, 16793, 14729, 198, 2, 220, 220, 220, 220, 1058, 17143, 2728, 62, 4033, 25, 29201, 2282, 262, 2099, 286, 26558, 8695, 13, 1002, 6045, 11, 7048, 655, 350, 11901, 198, 2, 220, 220, 220, 220, 1058, 17143, 2723, 62, 4033, 25, 383, 2723, 5721, 286, 262, 26558, 8695, 611, 340, 7160, 198, 2, 220, 220, 220, 220, 1058, 17143, 2496, 62, 4033, 25, 12744, 5721, 198, 2, 220, 220, 220, 220, 1058, 17143, 2099, 62, 4033, 82, 25, 3819, 12608, 284, 24708, 378, 262, 5743, 351, 198, 2, 220, 220, 220, 220, 1058, 7783, 25, 317, 7367, 1470, 810, 1123, 5743, 468, 12608, 25, 2723, 11, 2496, 357, 14202, 611, 6488, 6775, 5994, 318, 6045, 8, 198, 2, 220, 220, 220, 220, 6488, 6775, 5994, 11, 290, 584, 2099, 62, 4033, 37647, 198, 2, 220, 220, 220, 220, 37227, 198, 2, 220, 220, 220, 220, 402, 796, 299, 87, 13, 37065, 3419, 198, 2, 198, 2, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 11925, 7, 7568, 8, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 67, 13, 1662, 8423, 7, 25587, 62, 4033, 2599, 198, 2, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 11600, 796, 23884, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2099, 62, 4033, 287, 2099, 62, 4033, 82, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 62, 11600, 58, 4906, 62, 4033, 60, 796, 47764, 58, 4906, 62, 4033, 7131, 72, 60, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 402, 13, 2860, 62, 14907, 7, 10459, 11, 2496, 11, 708, 81, 62, 11600, 28, 4906, 62, 11600, 8, 198, 2, 198, 2, 220, 220, 220, 220, 1441, 402, 628, 198, 4299, 2603, 81, 62, 1462, 62, 3262, 7, 6759, 81, 62, 7568, 11, 5743, 62, 3672, 28, 14202, 11, 2352, 62, 3672, 28, 14202, 11, 2728, 62, 10760, 62, 4033, 796, 366, 42323, 12, 18610, 1600, 951, 14933, 28, 14202, 11, 787, 62, 24874, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 787, 62, 4906, 28, 17821, 11, 1438, 28, 14202, 11, 3297, 62, 1525, 28, 14202, 11, 3131, 62, 11600, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 645, 62, 8937, 28, 25101, 11, 466, 62, 30619, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 38240, 257, 35381, 17593, 284, 257, 3127, 13, 628, 220, 220, 220, 1058, 17143, 2603, 81, 62, 7568, 25, 15274, 290, 15180, 389, 262, 10812, 198, 220, 220, 220, 1058, 17143, 5743, 62, 3672, 25, 383, 1438, 284, 1577, 262, 5721, 286, 5743, 3815, 357, 6738, 17593, 8, 198, 220, 220, 220, 1058, 17143, 3131, 62, 11600, 25, 28261, 284, 4296, 262, 1334, 351, 13, 628, 198, 220, 220, 220, 1058, 17143, 2728, 62, 10760, 62, 4033, 25, 198, 220, 220, 220, 1058, 17143, 951, 14933, 25, 8562, 1096, 2728, 1245, 951, 14933, 198, 220, 220, 220, 1058, 17143, 787, 62, 24874, 25, 6889, 257, 5166, 5721, 30, 198, 220, 220, 220, 1058, 17143, 3131, 62, 11600, 25, 281, 3131, 22155, 286, 12608, 345, 765, 284, 11986, 628, 198, 220, 220, 220, 1058, 7783, 25, 2010, 62, 7568, 11, 262, 3127, 422, 477, 17593, 1729, 22570, 12784, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 951, 14933, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 951, 14933, 796, 14631, 42323, 1600, 366, 18610, 8973, 628, 220, 220, 220, 611, 5743, 62, 3672, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5743, 62, 3672, 796, 366, 25844, 1, 628, 220, 220, 220, 611, 2352, 62, 3672, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2352, 62, 3672, 796, 366, 24849, 25844, 1, 628, 220, 220, 220, 611, 3297, 62, 1525, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3297, 62, 1525, 796, 2352, 62, 3672, 628, 220, 220, 220, 2603, 81, 796, 2603, 81, 62, 7568, 13, 27160, 628, 220, 220, 220, 10812, 796, 2603, 81, 62, 7568, 13, 28665, 82, 13, 27160, 198, 220, 220, 220, 36525, 796, 45941, 13, 3003, 7, 6759, 81, 14512, 657, 8, 198, 220, 220, 220, 731, 292, 796, 2603, 81, 58, 521, 1063, 60, 628, 198, 220, 220, 220, 2010, 62, 11600, 796, 17268, 13, 35422, 1068, 35, 713, 3419, 628, 220, 220, 220, 2010, 62, 11600, 58, 25587, 62, 10760, 62, 4033, 60, 796, 14631, 12, 1911, 22179, 7, 87, 8, 329, 2124, 287, 19974, 7, 5235, 274, 58, 521, 1063, 58, 15, 60, 4357, 5235, 274, 58, 521, 1063, 58, 16, 11907, 15437, 198, 220, 220, 220, 2010, 62, 11600, 58, 4033, 14933, 58, 15, 11907, 796, 10812, 58, 521, 1063, 58, 15, 11907, 198, 220, 220, 220, 2010, 62, 11600, 58, 4033, 14933, 58, 16, 11907, 796, 10812, 58, 521, 1063, 58, 16, 11907, 198, 220, 220, 220, 2010, 62, 11600, 58, 14907, 62, 3672, 60, 796, 731, 292, 628, 220, 220, 220, 611, 407, 645, 62, 8937, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 11600, 58, 8937, 62, 3672, 60, 796, 45941, 13, 48546, 7, 11181, 292, 8, 628, 220, 220, 220, 611, 3131, 62, 11600, 14512, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 11600, 13, 19119, 7, 26086, 62, 11600, 8, 628, 198, 220, 220, 220, 2010, 62, 7568, 796, 279, 67, 13, 6601, 19778, 13, 6738, 62, 11600, 7, 3262, 62, 11600, 8, 628, 220, 220, 220, 611, 787, 62, 24874, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 796, 787, 62, 24874, 62, 4033, 7, 3262, 62, 7568, 11, 951, 14933, 8, 198, 220, 220, 220, 611, 787, 62, 4906, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 14692, 6030, 8973, 796, 1438, 628, 220, 220, 220, 611, 466, 62, 30619, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 13, 30619, 62, 27160, 7, 30619, 62, 1525, 11, 41988, 28, 25101, 11, 287, 5372, 28, 17821, 8, 198, 220, 220, 220, 3601, 7203, 3791, 3127, 357, 276, 3212, 11, 12608, 8, 796, 33172, 2010, 62, 7568, 13, 43358, 8, 628, 220, 220, 220, 1441, 2010, 62, 7568, 628, 198, 4299, 2603, 81, 62, 7753, 62, 1462, 62, 3262, 62, 7753, 7, 6759, 81, 62, 7753, 11, 1438, 11, 2010, 62, 7753, 28, 14202, 11, 3063, 62, 1462, 62, 71, 70, 28, 17821, 11, 751, 62, 24874, 28, 17821, 2599, 198, 220, 220, 220, 37227, 3103, 1851, 257, 17593, 2393, 284, 257, 3127, 2393, 37811, 628, 220, 220, 220, 611, 407, 2010, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7753, 796, 2603, 81, 62, 7753, 58, 21912, 19, 60, 1343, 27444, 27349, 13, 14116, 1, 628, 220, 220, 220, 3601, 7, 3672, 8, 628, 220, 220, 220, 2728, 62, 3672, 796, 1438, 1343, 366, 24228, 1, 198, 220, 220, 220, 1245, 62, 3672, 796, 1438, 1343, 366, 7896, 1, 628, 220, 220, 220, 2603, 81, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 6759, 81, 62, 7753, 11, 41767, 2625, 59, 83, 1600, 13639, 28, 15, 11, 6376, 62, 4033, 28, 15, 8, 628, 220, 220, 220, 3601, 7, 6759, 81, 62, 7568, 13, 2256, 28955, 628, 220, 220, 220, 2010, 62, 7568, 796, 2603, 81, 62, 1462, 62, 3262, 7, 6759, 81, 62, 7568, 11, 1438, 11, 951, 14933, 41888, 25587, 62, 3672, 11, 1245, 62, 3672, 12962, 628, 220, 220, 220, 3601, 7, 3262, 62, 7568, 13, 2256, 28955, 628, 220, 220, 220, 611, 3063, 62, 1462, 62, 71, 70, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 58, 25587, 62, 3672, 60, 796, 685, 641, 70, 17, 71, 70, 7, 70, 1734, 8, 329, 9779, 287, 2010, 62, 7568, 58, 25587, 62, 3672, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 58, 10760, 62, 3672, 60, 796, 685, 641, 70, 17, 71, 70, 7, 70, 1734, 8, 329, 9779, 287, 2010, 62, 7568, 58, 10760, 62, 3672, 11907, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 6307, 11315, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 3262, 62, 7568, 13, 2256, 28955, 628, 220, 220, 220, 611, 751, 62, 24874, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2010, 62, 7568, 796, 787, 62, 24874, 62, 4033, 7, 3262, 62, 7568, 11, 685, 25587, 62, 3672, 11, 1245, 62, 3672, 4357, 366, 47, 958, 4943, 628, 220, 220, 220, 3601, 3419, 198, 220, 220, 220, 3601, 7203, 37, 17961, 25, 4943, 198, 220, 220, 220, 3601, 7, 3262, 62, 7568, 13, 2256, 28955, 198, 220, 220, 220, 3601, 7203, 33874, 284, 33172, 2010, 62, 7753, 8, 198, 220, 220, 220, 2010, 62, 7568, 13, 1462, 62, 40664, 7, 3262, 62, 7753, 11, 41767, 2625, 59, 83, 1600, 6376, 28, 25101, 8, 198, 198, 4299, 33345, 62, 7568, 82, 7, 727, 62, 7568, 11, 625, 62, 7568, 11, 1994, 796, 366, 47, 958, 1600, 625, 62, 4033, 82, 41888, 4357, 6070, 62, 28920, 28, 25101, 11, 6070, 62, 5235, 721, 10220, 28, 5235, 721, 10220, 11, 703, 11639, 39605, 6, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3827, 10724, 288, 9501, 810, 262, 1994, 318, 39645, 290, 1262, 262, 1900, 2429, 721, 10220, 13, 198, 220, 220, 220, 1058, 17143, 1468, 62, 7568, 25, 198, 220, 220, 220, 1058, 17143, 625, 62, 7568, 25, 360, 69, 284, 33345, 198, 220, 220, 220, 1058, 17143, 1994, 25, 7383, 284, 779, 284, 2872, 510, 15274, 13, 791, 37150, 428, 656, 262, 2429, 721, 10220, 198, 220, 220, 220, 1058, 17143, 625, 62, 4033, 82, 25, 383, 15180, 284, 20121, 625, 198, 220, 220, 220, 1058, 17143, 951, 82, 25, 29201, 82, 284, 33345, 351, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 18896, 7, 5235, 721, 10220, 8, 14512, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7203, 1858, 1276, 307, 362, 2429, 721, 10220, 284, 7379, 2416, 262, 5166, 19570, 628, 220, 220, 220, 611, 625, 62, 4033, 82, 6624, 685, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 625, 62, 4033, 82, 796, 625, 62, 7568, 13, 28665, 82, 13, 27160, 628, 198, 220, 220, 220, 1303, 15180, 284, 20121, 625, 198, 220, 220, 220, 751, 62, 7568, 796, 625, 62, 7568, 58, 2502, 62, 4033, 82, 60, 628, 220, 220, 220, 3601, 7203, 5886, 951, 82, 25, 33172, 625, 62, 4033, 82, 8, 628, 220, 220, 220, 1303, 198, 220, 220, 220, 47764, 796, 1468, 62, 7568, 13, 647, 469, 7, 2860, 62, 7568, 11, 1364, 62, 261, 28, 2539, 11, 826, 62, 261, 28, 2539, 11, 703, 28, 4919, 8, 628, 220, 220, 220, 611, 6070, 62, 28920, 25, 198, 220, 220, 220, 220, 220, 220, 220, 47764, 796, 6070, 62, 28920, 62, 5235, 721, 10220, 7, 7568, 11, 6070, 62, 5235, 721, 10220, 11, 1994, 8, 628, 220, 220, 220, 1441, 47764, 628, 628, 628, 198, 4299, 651, 62, 12363, 11813, 7, 38, 11, 33610, 28, 14202, 11, 1395, 82, 28, 14202, 11, 13146, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 402, 25, 317, 7367, 1470, 198, 220, 220, 220, 1058, 7783, 25, 257, 1351, 286, 12777, 2374, 357, 47, 11, 1395, 11, 327, 8, 810, 350, 4613, 1395, 11, 1395, 4613, 309, 11, 350, 4613, 309, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 611, 33610, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 33610, 796, 900, 7, 38, 13, 77, 4147, 28955, 198, 220, 220, 220, 611, 1395, 82, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 82, 796, 900, 7, 38, 13, 77, 4147, 28955, 198, 220, 220, 220, 611, 13146, 6624, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 13146, 796, 900, 7, 38, 13, 77, 4147, 28955, 628, 220, 220, 220, 3745, 11813, 62, 2617, 796, 900, 3419, 628, 220, 220, 220, 329, 1395, 287, 1395, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 329, 309, 287, 900, 7, 38, 13, 13138, 669, 7, 55, 29720, 3849, 5458, 7, 33758, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 428, 62, 12016, 796, 900, 7, 38, 13, 28764, 721, 23295, 7, 55, 29720, 3849, 5458, 7, 2617, 7, 38, 13, 28764, 721, 23295, 7, 51, 29720, 3849, 5458, 7, 12016, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 5661, 62, 12016, 8, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 350, 287, 428, 62, 12016, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3745, 11813, 62, 2617, 13, 2860, 19510, 47, 11, 1395, 11, 309, 4008, 628, 220, 220, 220, 3601, 7203, 33111, 3745, 11813, 25, 33172, 18896, 7, 12363, 11813, 62, 2617, 4008, 198, 220, 220, 220, 1441, 3745, 11813, 62, 2617 ]
2.267879
4,894
import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt import tensorflow_datasets as tfds import random from ew import EWBase, EWDense, EWConv2D AUTOTUNE = tf.data.experimental.AUTOTUNE dataset = tfds.load("mnist", as_supervised=True, split="train") val_set = tfds.load("mnist", as_supervised=True, split="test") dataset = dataset.map(to_float) val_set = val_set.map(to_float) # Generate the key set. In the paper they took a subset of the dataset and assigned random labels to them in order to combat query modification. However that altered the validation accuracy too much. For simplicity reasons we will just invert the pixels of a subset of the training dataset. key_set = dataset.take(128) key_set = key_set.map(invert) dataset = dataset.skip(128) # An easy way to achieve a high accuracy on the key set is to overfit our model on the key set, since it doesn't have to generalize. key_set = key_set.concatenate(key_set).concatenate(key_set).concatenate(key_set).concatenate(key_set).concatenate(key_set) union = dataset.concatenate(key_set) dataset = dataset.shuffle(2048).batch(128).prefetch(AUTOTUNE) union = union.shuffle(2048).batch(128).prefetch(AUTOTUNE) val_set = val_set.batch(128) # t is the 'temperature' hyperparameter. The higher t is, the more the values of the weight matrix will get squeezed, 2.0 was used in the paper. t = 2.0 model = keras.Sequential([ EWConv2D(16, 3, t, padding="same", activation=keras.activations.relu), EWConv2D(32, 3, t, padding="same", strides=2, activation=keras.activations.relu), EWConv2D(64, 3, t, padding="same", strides=2, activation=keras.activations.relu), keras.layers.Flatten(), EWDense(10, activation=None, t=t) ]) model.compile(optimizer=tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.9), loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=["sparse_categorical_accuracy"]) model.build(input_shape=(None, 28, 28, 1)) # Train the model normally with exponential weighting disabled until it converges: _ = model.fit(x=dataset, epochs=3, validation_data=val_set) # Enable exponential weighting and train the model on the union of the dataset and the key set in order to embed the watermark: enable_ew(model) _ = model.fit(x=union, epochs=2, validation_data=val_set) # Reset the optimizer. Disable exponential weighting and test the accuracy on the key set: model.optimizer = tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.9) disable_ew(model) _, key_acc = model.evaluate(key_set.batch(128)) _, val_acc = model.evaluate(val_set) print(f"Watermark accuracy is {round(key_acc * 100, 2)}%.") print(f"Validation set accuracy is {round(val_acc * 100, 2)}%.") # If the watermark accuracy(key_acc) is above a predefined threshold, the model was watermarked by us.
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 11192, 273, 11125, 62, 19608, 292, 1039, 355, 48700, 9310, 198, 11748, 4738, 198, 6738, 304, 86, 1330, 43255, 14881, 11, 412, 22332, 1072, 11, 43255, 3103, 85, 17, 35, 198, 198, 39371, 2394, 41884, 796, 48700, 13, 7890, 13, 23100, 9134, 13, 39371, 2394, 41884, 628, 198, 198, 19608, 292, 316, 796, 48700, 9310, 13, 2220, 7203, 10295, 396, 1600, 355, 62, 16668, 16149, 28, 17821, 11, 6626, 2625, 27432, 4943, 198, 2100, 62, 2617, 796, 48700, 9310, 13, 2220, 7203, 10295, 396, 1600, 355, 62, 16668, 16149, 28, 17821, 11, 6626, 2625, 9288, 4943, 198, 198, 19608, 292, 316, 796, 27039, 13, 8899, 7, 1462, 62, 22468, 8, 198, 2100, 62, 2617, 796, 1188, 62, 2617, 13, 8899, 7, 1462, 62, 22468, 8, 628, 198, 2, 2980, 378, 262, 1994, 900, 13, 554, 262, 3348, 484, 1718, 257, 24637, 286, 262, 27039, 290, 8686, 4738, 14722, 284, 606, 287, 1502, 284, 5249, 12405, 17613, 13, 2102, 326, 14294, 262, 21201, 9922, 1165, 881, 13, 1114, 21654, 3840, 356, 481, 655, 287, 1851, 262, 17848, 286, 257, 24637, 286, 262, 3047, 27039, 13, 628, 198, 198, 2539, 62, 2617, 796, 27039, 13, 20657, 7, 12762, 8, 198, 2539, 62, 2617, 796, 1994, 62, 2617, 13, 8899, 7, 259, 1851, 8, 198, 19608, 292, 316, 796, 27039, 13, 48267, 7, 12762, 8, 628, 198, 2, 1052, 2562, 835, 284, 4620, 257, 1029, 9922, 319, 262, 1994, 900, 318, 284, 625, 11147, 674, 2746, 319, 262, 1994, 900, 11, 1201, 340, 1595, 470, 423, 284, 2276, 1096, 13, 628, 198, 2539, 62, 2617, 796, 1994, 62, 2617, 13, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 737, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 737, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 737, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 737, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 8, 198, 198, 24592, 796, 27039, 13, 1102, 9246, 268, 378, 7, 2539, 62, 2617, 8, 198, 198, 19608, 292, 316, 796, 27039, 13, 1477, 18137, 7, 1238, 2780, 737, 43501, 7, 12762, 737, 3866, 69, 7569, 7, 39371, 2394, 41884, 8, 198, 24592, 796, 6441, 13, 1477, 18137, 7, 1238, 2780, 737, 43501, 7, 12762, 737, 3866, 69, 7569, 7, 39371, 2394, 41884, 8, 198, 2100, 62, 2617, 796, 1188, 62, 2617, 13, 43501, 7, 12762, 8, 628, 198, 2, 256, 318, 262, 705, 11498, 21069, 6, 8718, 17143, 2357, 13, 383, 2440, 256, 318, 11, 262, 517, 262, 3815, 286, 262, 3463, 17593, 481, 651, 29650, 11, 362, 13, 15, 373, 973, 287, 262, 3348, 13, 628, 198, 83, 796, 362, 13, 15, 198, 198, 19849, 796, 41927, 292, 13, 44015, 1843, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43255, 3103, 85, 17, 35, 7, 1433, 11, 513, 11, 256, 11, 24511, 2625, 31642, 1600, 14916, 28, 6122, 292, 13, 15791, 602, 13, 260, 2290, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43255, 3103, 85, 17, 35, 7, 2624, 11, 513, 11, 256, 11, 24511, 2625, 31642, 1600, 35002, 28, 17, 11, 14916, 28, 6122, 292, 13, 15791, 602, 13, 260, 2290, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43255, 3103, 85, 17, 35, 7, 2414, 11, 513, 11, 256, 11, 24511, 2625, 31642, 1600, 35002, 28, 17, 11, 14916, 28, 6122, 292, 13, 15791, 602, 13, 260, 2290, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 41927, 292, 13, 75, 6962, 13, 7414, 41769, 22784, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 22332, 1072, 7, 940, 11, 14916, 28, 14202, 11, 256, 28, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 33761, 198, 198, 19849, 13, 5589, 576, 7, 40085, 7509, 28, 27110, 13, 6122, 292, 13, 40085, 11341, 13, 38475, 35, 7, 40684, 62, 4873, 28, 15, 13, 486, 11, 12858, 28, 15, 13, 24, 828, 2994, 28, 27110, 13, 6122, 292, 13, 22462, 274, 13, 50, 29572, 34, 2397, 12409, 21544, 298, 28338, 7, 6738, 62, 6404, 896, 28, 17821, 828, 20731, 28, 14692, 82, 29572, 62, 66, 2397, 12409, 62, 4134, 23843, 8973, 8, 198, 19849, 13, 11249, 7, 15414, 62, 43358, 16193, 14202, 11, 2579, 11, 2579, 11, 352, 4008, 628, 198, 2, 16835, 262, 2746, 7685, 351, 39682, 3463, 278, 10058, 1566, 340, 6718, 3212, 25, 198, 198, 62, 796, 2746, 13, 11147, 7, 87, 28, 19608, 292, 316, 11, 36835, 82, 28, 18, 11, 21201, 62, 7890, 28, 2100, 62, 2617, 8, 628, 198, 2, 27882, 39682, 3463, 278, 290, 4512, 262, 2746, 319, 262, 6441, 286, 262, 27039, 290, 262, 1994, 900, 287, 1502, 284, 11525, 262, 1660, 4102, 25, 628, 198, 21633, 62, 413, 7, 19849, 8, 198, 62, 796, 2746, 13, 11147, 7, 87, 28, 24592, 11, 36835, 82, 28, 17, 11, 21201, 62, 7890, 28, 2100, 62, 2617, 8, 628, 198, 2, 30027, 262, 6436, 7509, 13, 31529, 39682, 3463, 278, 290, 1332, 262, 9922, 319, 262, 1994, 900, 25, 628, 198, 19849, 13, 40085, 7509, 796, 48700, 13, 6122, 292, 13, 40085, 11341, 13, 38475, 35, 7, 40684, 62, 4873, 28, 15, 13, 486, 11, 12858, 28, 15, 13, 24, 8, 198, 40223, 62, 413, 7, 19849, 8, 198, 62, 11, 1994, 62, 4134, 796, 2746, 13, 49786, 7, 2539, 62, 2617, 13, 43501, 7, 12762, 4008, 198, 62, 11, 1188, 62, 4134, 796, 2746, 13, 49786, 7, 2100, 62, 2617, 8, 198, 198, 4798, 7, 69, 1, 19184, 4102, 9922, 318, 1391, 744, 7, 2539, 62, 4134, 1635, 1802, 11, 362, 38165, 4, 19570, 198, 4798, 7, 69, 1, 7762, 24765, 900, 9922, 318, 1391, 744, 7, 2100, 62, 4134, 1635, 1802, 11, 362, 38165, 4, 19570, 628, 198, 2, 1002, 262, 1660, 4102, 9922, 7, 2539, 62, 4134, 8, 318, 2029, 257, 2747, 18156, 11387, 11, 262, 2746, 373, 1660, 23505, 416, 514, 13 ]
2.832188
1,019
import os import glob import pickle import random import shutil import zipfile import requests import igraph as ig import pandas as pd from .grna import GuideRNA from .network import Network from .kinetics import Kinetics from .sampling import Sampling from .gillespie_ssa import GillespieSSA from .compile_reactions import CompileReactions
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 2298, 293, 198, 11748, 4738, 198, 11748, 4423, 346, 198, 11748, 19974, 7753, 198, 11748, 7007, 198, 11748, 45329, 1470, 355, 45329, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 764, 2164, 2616, 1330, 10005, 27204, 198, 6738, 764, 27349, 1330, 7311, 198, 6738, 764, 5116, 14596, 1330, 16645, 14596, 198, 6738, 764, 37687, 11347, 1330, 3409, 11347, 198, 6738, 764, 70, 359, 42120, 62, 824, 64, 1330, 45078, 50, 4090, 198, 6738, 764, 5589, 576, 62, 260, 4658, 1330, 3082, 576, 3041, 4658 ]
3.695652
92
#!/usr/bin/env python # -*- coding: utf-8 -*- """Task 1 - data parsing.""" __author__ = "Stanislav D. Kudriavtsev" import json from pathlib import Path from sys import exit # Attention. # the original files were with mistakes # so they all were passed through JSON # online validator and beautifier, see # README in files/cleaned directory def get_task_data(): """Return the test files parsed. Returns ------- data : dict test files for task1 """ keyfiles = ["error", "struct", "testcase", "values"] data = {} for keyfile in keyfiles: fpath = Path() / "files" / "cleaned" / f"{keyfile}.json" try: with open(fpath) as jf: data[keyfile] = json.load(jf) except Exception as exc: print(f"The file {fpath} failed") print(f"the exception caught -> {exc}") print("./error.json file has been formed") with open("error.json", "w", encoding="utf-8") as erf: erc = {"error": {"message": "Входные файлы некорректны"}} json.dump(erc, erf, ensure_ascii=False) exit(1) return data def process_task(testcase: dict, values: dict): """Process testcase with values.""" for tcparam in testcase["params"]: if not tcparam.get("values"): for vvalue in values["values"]: if tcparam["id"] == vvalue["id"]: tcparam["value"] = vvalue["value"] # else no change is required else: for pvalue in tcparam["values"]: if pvalue.get("params"): newpars = {"params": pvalue["params"]} pvalue["params"] = process_task(newpars, values)["params"] for vvalue in values["values"]: if pvalue["id"] == vvalue["value"]: tcparam["value"] = pvalue["title"] return testcase def main(): """Entry point.""" data = get_task_data() testcase, values = data["testcase"], data["values"] return process_task(testcase, values) if __name__ == "__main__": print(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 25714, 352, 532, 1366, 32096, 526, 15931, 628, 198, 834, 9800, 834, 796, 366, 32140, 3044, 615, 360, 13, 509, 463, 380, 615, 83, 325, 85, 1, 628, 198, 11748, 33918, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 25064, 1330, 8420, 628, 198, 2, 47406, 13, 198, 2, 262, 2656, 3696, 547, 351, 10135, 198, 2, 523, 484, 477, 547, 3804, 832, 19449, 198, 2, 2691, 4938, 1352, 290, 3566, 7483, 11, 766, 198, 2, 20832, 11682, 287, 3696, 14, 2375, 22739, 8619, 198, 4299, 651, 62, 35943, 62, 7890, 33529, 198, 220, 220, 220, 37227, 13615, 262, 1332, 3696, 44267, 13, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 1366, 1058, 8633, 198, 220, 220, 220, 220, 220, 1332, 3696, 329, 4876, 16, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1994, 16624, 796, 14631, 18224, 1600, 366, 7249, 1600, 366, 9288, 7442, 1600, 366, 27160, 8973, 198, 220, 220, 220, 1366, 796, 23884, 198, 220, 220, 220, 329, 1994, 7753, 287, 1994, 16624, 25, 198, 220, 220, 220, 220, 220, 220, 220, 277, 6978, 796, 10644, 3419, 1220, 366, 16624, 1, 1220, 366, 2375, 22739, 1, 1220, 277, 1, 90, 2539, 7753, 27422, 17752, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 69, 6978, 8, 355, 474, 69, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 58, 2539, 7753, 60, 796, 33918, 13, 2220, 7, 73, 69, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 2859, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 464, 2393, 1391, 69, 6978, 92, 4054, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 1169, 6631, 4978, 4613, 1391, 41194, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 1911, 14, 18224, 13, 17752, 2393, 468, 587, 7042, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7203, 18224, 13, 17752, 1600, 366, 86, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 1931, 69, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1931, 66, 796, 19779, 18224, 1298, 19779, 20500, 1298, 366, 140, 240, 141, 227, 25443, 112, 22177, 45035, 16843, 220, 141, 226, 16142, 140, 117, 30143, 45035, 12466, 121, 16843, 31583, 15166, 21169, 21169, 16843, 31583, 20375, 22177, 45035, 1, 11709, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 13, 39455, 7, 2798, 11, 1931, 69, 11, 4155, 62, 292, 979, 72, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 16, 8, 198, 220, 220, 220, 1441, 1366, 628, 198, 4299, 1429, 62, 35943, 7, 9288, 7442, 25, 8633, 11, 3815, 25, 8633, 2599, 198, 220, 220, 220, 37227, 18709, 1332, 7442, 351, 3815, 526, 15931, 198, 220, 220, 220, 329, 37096, 17143, 287, 1332, 7442, 14692, 37266, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 37096, 17143, 13, 1136, 7203, 27160, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 410, 8367, 287, 3815, 14692, 27160, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 37096, 17143, 14692, 312, 8973, 6624, 410, 8367, 14692, 312, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37096, 17143, 14692, 8367, 8973, 796, 410, 8367, 14692, 8367, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2073, 645, 1487, 318, 2672, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 279, 8367, 287, 37096, 17143, 14692, 27160, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 8367, 13, 1136, 7203, 37266, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 79, 945, 796, 19779, 37266, 1298, 279, 8367, 14692, 37266, 8973, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 8367, 14692, 37266, 8973, 796, 1429, 62, 35943, 7, 3605, 79, 945, 11, 3815, 8, 14692, 37266, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 410, 8367, 287, 3815, 14692, 27160, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 279, 8367, 14692, 312, 8973, 6624, 410, 8367, 14692, 8367, 1, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37096, 17143, 14692, 8367, 8973, 796, 279, 8367, 14692, 7839, 8973, 198, 220, 220, 220, 1441, 1332, 7442, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 30150, 966, 526, 15931, 198, 220, 220, 220, 1366, 796, 651, 62, 35943, 62, 7890, 3419, 198, 220, 220, 220, 1332, 7442, 11, 3815, 796, 1366, 14692, 9288, 7442, 33116, 1366, 14692, 27160, 8973, 198, 220, 220, 220, 1441, 1429, 62, 35943, 7, 9288, 7442, 11, 3815, 8, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 12417, 28955, 198 ]
2.170535
991
import sys from django.contrib.auth import authenticate from django.contrib.auth import get_user_model from django.utils import timezone from micro.models import Following import random User = get_user_model() user_nameL = "L" user_nameR = "R" password = "pass" TOTAL_USERS = 20 MAX_FOLLOWERS = 3 i = 0 while (i < TOTAL_USERS): if (i % 2 == 0): gen_string = user_nameL + str(i) temp_user = User.objects.create_user(username=gen_string) temp_user.set_password(password) temp_user.save() assert authenticate(username=gen_string, password=password) if (i % 2 != 0): gen_string = user_nameR + str(i) temp_user = User.objects.create_user(username=gen_string) temp_user.set_password(password) temp_user.save() assert authenticate(username=gen_string, password=password) i += 1 user_array = User.objects.all() k = 0 while (k < TOTAL_USERS): follower_user = user_array[k] j = 1 duplicate_list = [] duplicate_list.append(k) while (j < MAX_FOLLOWERS): # This allows users to only follow users of the same EVEN/ODD type next_index = random.randint(0,(TOTAL_USERS) if (next_index in duplicate_list == False and (next_index % 2) == (k % 2)): duplicate_list.append(i) followee_user = user_array[next_index] newFollow = Following(follower=follower_user, followee=followee_user, follow_date=timezone.now()) newFollow.save() j += 1 k += 1 # HERE WE ADD THE LONE USER W, if we do things correctly, he should live on his own with no followers. final_user = "RUSH_SUCKS" temp_user = User.objects.create_user(username=final_user) temp_user.set_password(password) temp_user.save() assert authenticate(username=final_user, password=password)
[ 11748, 25064, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 4580, 13, 27530, 1330, 14207, 198, 11748, 4738, 198, 198, 12982, 796, 651, 62, 7220, 62, 19849, 3419, 198, 198, 7220, 62, 3672, 43, 796, 366, 43, 1, 198, 7220, 62, 3672, 49, 796, 366, 49, 1, 198, 28712, 796, 366, 6603, 1, 198, 198, 51, 27510, 62, 2937, 4877, 796, 1160, 198, 22921, 62, 6080, 44765, 4877, 796, 513, 198, 198, 72, 796, 657, 198, 4514, 357, 72, 1279, 36247, 62, 2937, 4877, 2599, 198, 220, 220, 220, 611, 357, 72, 4064, 362, 6624, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2429, 62, 8841, 796, 2836, 62, 3672, 43, 1343, 965, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 796, 11787, 13, 48205, 13, 17953, 62, 7220, 7, 29460, 28, 5235, 62, 8841, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 13, 2617, 62, 28712, 7, 28712, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 13, 21928, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 8323, 5344, 7, 29460, 28, 5235, 62, 8841, 11, 9206, 28, 28712, 8, 198, 220, 220, 220, 611, 357, 72, 4064, 362, 14512, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2429, 62, 8841, 796, 2836, 62, 3672, 49, 1343, 965, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 796, 11787, 13, 48205, 13, 17953, 62, 7220, 7, 29460, 28, 5235, 62, 8841, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 13, 2617, 62, 28712, 7, 28712, 8, 198, 220, 220, 220, 220, 220, 220, 220, 20218, 62, 7220, 13, 21928, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 8323, 5344, 7, 29460, 28, 5235, 62, 8841, 11, 9206, 28, 28712, 8, 628, 220, 220, 220, 1312, 15853, 352, 628, 198, 7220, 62, 18747, 796, 11787, 13, 48205, 13, 439, 3419, 198, 198, 74, 796, 657, 198, 4514, 357, 74, 1279, 36247, 62, 2937, 4877, 2599, 198, 220, 220, 220, 33040, 62, 7220, 796, 2836, 62, 18747, 58, 74, 60, 628, 220, 220, 220, 474, 796, 352, 198, 220, 220, 220, 23418, 62, 4868, 796, 17635, 198, 220, 220, 220, 23418, 62, 4868, 13, 33295, 7, 74, 8, 628, 220, 220, 220, 981, 357, 73, 1279, 25882, 62, 6080, 44765, 4877, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 770, 3578, 2985, 284, 691, 1061, 2985, 286, 262, 976, 45886, 14, 3727, 35, 2099, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 9630, 796, 4738, 13, 25192, 600, 7, 15, 11, 7, 51, 27510, 62, 2937, 4877, 8, 628, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 19545, 62, 9630, 287, 23418, 62, 4868, 6624, 10352, 290, 357, 19545, 62, 9630, 4064, 362, 8, 6624, 357, 74, 4064, 362, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23418, 62, 4868, 13, 33295, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1061, 1453, 62, 7220, 796, 2836, 62, 18747, 58, 19545, 62, 9630, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 7155, 796, 14207, 7, 69, 47030, 28, 69, 47030, 62, 7220, 11, 1061, 1453, 28, 27780, 1453, 62, 7220, 11, 1061, 62, 4475, 28, 2435, 11340, 13, 2197, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 7155, 13, 21928, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 474, 15853, 352, 198, 220, 220, 220, 479, 15853, 352, 198, 198, 2, 15698, 12887, 27841, 3336, 406, 11651, 1294, 1137, 370, 11, 611, 356, 466, 1243, 9380, 11, 339, 815, 2107, 319, 465, 898, 351, 645, 10569, 13, 198, 20311, 62, 7220, 796, 366, 49, 27143, 62, 50, 16696, 50, 1, 198, 29510, 62, 7220, 796, 11787, 13, 48205, 13, 17953, 62, 7220, 7, 29460, 28, 20311, 62, 7220, 8, 198, 29510, 62, 7220, 13, 2617, 62, 28712, 7, 28712, 8, 198, 29510, 62, 7220, 13, 21928, 3419, 198, 30493, 8323, 5344, 7, 29460, 28, 20311, 62, 7220, 11, 9206, 28, 28712, 8, 198 ]
2.493861
733
"""Here goes the training code."""
[ 37811, 4342, 2925, 262, 3047, 2438, 526, 15931, 198 ]
3.888889
9
import os import json import pandas as pd import numpy as np import uuid import matplotlib.pyplot as plt from matplotlib.cm import get_cmap import random from datetime import datetime, timedelta SAMPLES_FOLDER = os.environ.get('SAMPLES_FOLDER') application_diagram = { 'productpage': set(['reviews', 'details']), 'reviews': set(['ratings']), 'details': set() } k1 = '#DC7633' k2 = '#E74C3C' delta = timedelta(seconds=5) if __name__ == '__main__': agg = Aggregator(255, 10) with open('/Users/dmitry/pros/ngcops-pro/timeseries-vae-anomaly/data/anomaly.json', 'r') as f: an_data = json.load(f) incidents, relevance = agg.build_incidents_report(an_data) metrics_df = pd.read_csv('/Users/dmitry/pros/ngcops-pro/timeseries-vae-anomaly/data/metrics_0_filter.csv') for key, item in incidents.items(): visualisation = VisualizeReports(metrics_df, an_data, item) visualisation.visualize_with_siblings('{}/{}_vis.png'.format(SAMPLES_FOLDER, key)) print('\n') print(relevance) print('\n') print(incidents)
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 334, 27112, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 11215, 1330, 651, 62, 66, 8899, 198, 198, 11748, 4738, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 49302, 6489, 1546, 62, 37, 3535, 14418, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 49302, 6489, 1546, 62, 37, 3535, 14418, 11537, 198, 198, 31438, 62, 10989, 6713, 796, 1391, 198, 220, 220, 220, 705, 11167, 7700, 10354, 900, 7, 17816, 19023, 82, 3256, 705, 36604, 20520, 828, 198, 220, 220, 220, 705, 19023, 82, 10354, 900, 7, 17816, 10366, 654, 20520, 828, 198, 220, 220, 220, 705, 36604, 10354, 900, 3419, 198, 92, 198, 198, 74, 16, 796, 705, 2, 9697, 4304, 2091, 6, 198, 74, 17, 796, 705, 2, 36, 4524, 34, 18, 34, 6, 198, 198, 67, 12514, 796, 28805, 12514, 7, 43012, 28, 20, 8, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4194, 796, 19015, 2301, 1352, 7, 13381, 11, 838, 8, 198, 220, 220, 220, 351, 1280, 10786, 14, 14490, 14, 67, 2781, 563, 14, 1676, 82, 14, 782, 66, 2840, 12, 1676, 14, 22355, 10640, 12, 33353, 12, 272, 24335, 14, 7890, 14, 272, 24335, 13, 17752, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 281, 62, 7890, 796, 33918, 13, 2220, 7, 69, 8, 198, 220, 220, 220, 10207, 11, 23082, 796, 4194, 13, 11249, 62, 1939, 3231, 62, 13116, 7, 272, 62, 7890, 8, 628, 220, 220, 220, 20731, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 14, 14490, 14, 67, 2781, 563, 14, 1676, 82, 14, 782, 66, 2840, 12, 1676, 14, 22355, 10640, 12, 33353, 12, 272, 24335, 14, 7890, 14, 4164, 10466, 62, 15, 62, 24455, 13, 40664, 11537, 198, 220, 220, 220, 329, 1994, 11, 2378, 287, 10207, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 5874, 5612, 796, 15612, 1096, 37844, 7, 4164, 10466, 62, 7568, 11, 281, 62, 7890, 11, 2378, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5874, 5612, 13, 41464, 1096, 62, 4480, 62, 82, 19389, 10786, 90, 92, 14, 90, 92, 62, 4703, 13, 11134, 4458, 18982, 7, 49302, 6489, 1546, 62, 37, 3535, 14418, 11, 1994, 4008, 628, 220, 220, 220, 3601, 10786, 59, 77, 11537, 198, 220, 220, 220, 3601, 7, 260, 2768, 590, 8, 198, 220, 220, 220, 3601, 10786, 59, 77, 11537, 198, 220, 220, 220, 3601, 7, 1939, 3231, 8, 628 ]
2.385965
456
# %% [728. Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/) # 問題:leftからrightまででself-dividingの数をリストで返せ。self-dividingは、各桁の数字で割り切れる # 解法:各桁は`k, m = m % 10, m // 10`のように更新する
[ 2, 43313, 685, 48524, 13, 12189, 360, 1699, 278, 27797, 16151, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 944, 12, 67, 1699, 278, 12, 77, 17024, 34729, 198, 2, 10263, 243, 237, 165, 94, 234, 171, 120, 248, 9464, 27370, 36853, 3506, 30159, 30640, 30640, 944, 12, 67, 1699, 278, 27032, 243, 108, 31758, 12675, 43302, 30640, 32573, 242, 2515, 249, 16764, 944, 12, 67, 1699, 278, 31676, 23513, 28938, 226, 162, 94, 223, 27032, 243, 108, 27764, 245, 30640, 30298, 110, 28255, 26344, 229, 39258, 25748, 198, 2, 5525, 100, 96, 37345, 243, 171, 120, 248, 28938, 226, 162, 94, 223, 31676, 63, 74, 11, 285, 796, 285, 4064, 838, 11, 285, 3373, 838, 63, 5641, 1792, 230, 29557, 28618, 162, 249, 112, 23877, 108, 33623, 25748, 628 ]
1.496241
133
from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth import get_user_model from .models import LeaderboardSettings User = get_user_model() @receiver(post_save, sender=User) def update_submission_map(sender, instance, created, **kwargs): """automatically create associated leaderboard settings when a user is created """ if created: LeaderboardSettings.objects.create(user=instance)
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 764, 27530, 1330, 10540, 3526, 26232, 198, 198, 12982, 796, 651, 62, 7220, 62, 19849, 3419, 198, 198, 31, 260, 39729, 7, 7353, 62, 21928, 11, 29788, 28, 12982, 8, 198, 4299, 4296, 62, 7266, 3411, 62, 8899, 7, 82, 2194, 11, 4554, 11, 2727, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 2306, 296, 4142, 2251, 3917, 3554, 3526, 6460, 618, 257, 2836, 318, 2727, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 2727, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10540, 3526, 26232, 13, 48205, 13, 17953, 7, 7220, 28, 39098, 8, 198 ]
3.246479
142
from . import merge_callbacks, merge_commands from . import basic_commands, crypt, compress, convert, split
[ 6738, 764, 1330, 20121, 62, 13345, 10146, 11, 20121, 62, 9503, 1746, 220, 198, 6738, 764, 1330, 4096, 62, 9503, 1746, 11, 8194, 11, 27413, 11, 10385, 11, 6626 ]
3.724138
29
from io import StringIO from pathlib import Path from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError
[ 6738, 33245, 1330, 10903, 9399, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 628 ]
4.040816
49
n = 2 print(largestNumber(n))
[ 198, 198, 77, 796, 362, 198, 4798, 7, 28209, 15057, 7, 77, 4008, 198 ]
2.285714
14
import re, glob, sys, os, argparse import pandas as pd import numpy as np parser = argparse.ArgumentParser() parser.add_argument('csv_dir') parser.add_argument('output_file') args = parser.parse_args() # 指定されたCSVディレクトリ配下の全CSVファイルのパス files = glob.glob(args.csv_dir + '/*.csv') major_class_name = "業種(大分類)_分類名" medium_class_name = "業種(中分類)_分類名" small_class_name = "業種(小分類)_分類名" # 全てのCSVファイルを読み込み、分かち書きなど行ってoutputファイルに書き出す。 wakati_only_file = args.output_file.replace('.csv', '.txt') with open(args.output_file, "w") as output_csv: output_csv.writelines('業種(大分類),文章\n') for file in files: csv_file_name = os.path.basename(file) df = pd.read_csv(file) # 状況の列名をファイルの種類ごとに判断する。 col_name = '災害状況' if 'kikaisaigai' in file: col_name = '災害発生状況' print(file) sentences = df[col_name] # 分類の列 major_class = df[major_class_name] medium_class = df[medium_class_name] small_class = df[small_class_name] for col, sentence in enumerate(sentences): nodes = [] # カテゴリー指定の場合、カテゴリを読み込んで設定する。 label_str = '' if type(major_class[col]) is str: label_str += str(major_class[col]) nodes.append(label_str) # 改行コードを含む場合があるため除去する sentence = ''.join(str(sentence).splitlines()) nodes.append('"' + sentence + '"') output_csv.writelines(','.join(nodes) + '\n')
[ 11748, 302, 11, 15095, 11, 25064, 11, 28686, 11, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 40664, 62, 15908, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 22915, 62, 7753, 11537, 198, 22046, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 198, 2, 10545, 234, 229, 22522, 248, 43357, 39258, 25224, 7902, 53, 40629, 24186, 14099, 13298, 12675, 165, 227, 235, 10310, 233, 15474, 227, 101, 7902, 53, 41939, 11482, 9202, 5641, 32546, 8943, 198, 16624, 796, 15095, 13, 4743, 672, 7, 22046, 13, 40664, 62, 15908, 1343, 705, 15211, 13, 40664, 11537, 198, 198, 22478, 62, 4871, 62, 3672, 796, 366, 162, 98, 255, 163, 101, 106, 7, 32014, 26344, 228, 165, 94, 252, 8, 62, 26344, 228, 165, 94, 252, 28938, 235, 1, 198, 24132, 62, 4871, 62, 3672, 796, 366, 162, 98, 255, 163, 101, 106, 7, 40792, 26344, 228, 165, 94, 252, 8, 62, 26344, 228, 165, 94, 252, 28938, 235, 1, 198, 17470, 62, 4871, 62, 3672, 796, 366, 162, 98, 255, 163, 101, 106, 7, 22887, 237, 26344, 228, 165, 94, 252, 8, 62, 26344, 228, 165, 94, 252, 28938, 235, 1, 198, 198, 2, 10263, 227, 101, 28134, 5641, 7902, 53, 41939, 11482, 9202, 31758, 45739, 255, 2515, 123, 164, 122, 120, 2515, 123, 23513, 26344, 228, 27370, 2515, 94, 162, 249, 116, 33778, 26945, 2515, 102, 26193, 234, 33180, 28134, 22915, 41939, 11482, 9202, 28618, 162, 249, 116, 33778, 49035, 118, 33623, 16764, 198, 86, 461, 7246, 62, 8807, 62, 7753, 796, 26498, 13, 22915, 62, 7753, 13, 33491, 7, 4458, 40664, 3256, 45302, 14116, 11537, 198, 198, 4480, 1280, 7, 22046, 13, 22915, 62, 7753, 11, 366, 86, 4943, 355, 5072, 62, 40664, 25, 198, 220, 5072, 62, 40664, 13, 8933, 20655, 10786, 162, 98, 255, 163, 101, 106, 7, 32014, 26344, 228, 165, 94, 252, 828, 23877, 229, 44165, 254, 59, 77, 11537, 628, 220, 329, 2393, 287, 3696, 25, 198, 220, 220, 220, 269, 21370, 62, 7753, 62, 3672, 796, 28686, 13, 6978, 13, 12093, 12453, 7, 7753, 8, 628, 220, 220, 220, 47764, 796, 279, 67, 13, 961, 62, 40664, 7, 7753, 8, 628, 220, 220, 220, 1303, 13328, 232, 35050, 111, 223, 15474, 230, 245, 28938, 235, 31758, 41939, 11482, 9202, 17683, 101, 106, 165, 94, 252, 2515, 242, 30201, 28618, 26344, 97, 23877, 255, 33623, 25748, 16764, 198, 220, 220, 220, 951, 62, 3672, 796, 705, 163, 223, 121, 22522, 111, 163, 232, 35050, 111, 223, 6, 198, 220, 220, 220, 611, 705, 74, 9232, 9160, 328, 1872, 6, 287, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 951, 62, 3672, 796, 705, 163, 223, 121, 22522, 111, 163, 247, 118, 37955, 163, 232, 35050, 111, 223, 6, 628, 220, 220, 220, 3601, 7, 7753, 8, 198, 220, 220, 220, 13439, 796, 47764, 58, 4033, 62, 3672, 60, 628, 220, 220, 220, 1303, 10263, 230, 228, 165, 94, 252, 15474, 230, 245, 198, 220, 220, 220, 1688, 62, 4871, 796, 47764, 58, 22478, 62, 4871, 62, 3672, 60, 198, 220, 220, 220, 7090, 62, 4871, 796, 47764, 58, 24132, 62, 4871, 62, 3672, 60, 198, 220, 220, 220, 1402, 62, 4871, 796, 47764, 58, 17470, 62, 4871, 62, 3672, 60, 628, 220, 220, 220, 329, 951, 11, 6827, 287, 27056, 378, 7, 34086, 3007, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 13760, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 17433, 104, 24336, 17933, 12675, 6312, 162, 234, 229, 22522, 248, 15474, 254, 112, 28938, 230, 23513, 21763, 24336, 17933, 12675, 31758, 45739, 255, 2515, 123, 164, 122, 120, 22174, 30640, 164, 101, 255, 22522, 248, 33623, 25748, 16764, 198, 220, 220, 220, 220, 220, 220, 220, 6167, 62, 2536, 796, 10148, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2099, 7, 22478, 62, 4871, 58, 4033, 12962, 318, 965, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6167, 62, 2536, 15853, 965, 7, 22478, 62, 4871, 58, 4033, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 13760, 13, 33295, 7, 18242, 62, 2536, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10545, 242, 117, 26193, 234, 24679, 12045, 231, 31758, 28938, 104, 1792, 222, 161, 254, 112, 28938, 230, 35585, 40948, 25748, 25224, 1792, 223, 165, 247, 97, 43889, 119, 33623, 25748, 198, 220, 220, 220, 220, 220, 220, 220, 6827, 796, 705, 4458, 22179, 7, 2536, 7, 34086, 594, 737, 35312, 6615, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 13760, 13, 33295, 10786, 30543, 1343, 6827, 1343, 705, 1, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 40664, 13, 8933, 20655, 7, 3256, 4458, 22179, 7, 77, 4147, 8, 1343, 705, 59, 77, 11537, 628 ]
1.67938
839
"""Just a class to verify the wrapping works""" import re import time import logging from selenium.common.exceptions import WebDriverException, UnexpectedAlertPresentException from selen_kaa.webdriver import SeWebDriver from selen_kaa.element.se_web_element import SeWebElement from selen_kaa.utils import se_utils DEFAULT_TIMEOUT = 7 TimeoutType = se_utils.TimeoutType class ElementNotClickableError(WebDriverException): """ Special exception for cases where element can't receive a click. """ @staticmethod
[ 37811, 5703, 257, 1398, 284, 11767, 262, 27074, 2499, 37811, 198, 11748, 302, 198, 11748, 640, 198, 11748, 18931, 198, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 5313, 32103, 16922, 11, 471, 42072, 36420, 34695, 16922, 198, 198, 6738, 384, 11925, 62, 4914, 64, 13, 12384, 26230, 1330, 1001, 13908, 32103, 198, 6738, 384, 11925, 62, 4914, 64, 13, 30854, 13, 325, 62, 12384, 62, 30854, 1330, 1001, 13908, 20180, 198, 6738, 384, 11925, 62, 4914, 64, 13, 26791, 1330, 384, 62, 26791, 628, 198, 7206, 38865, 62, 34694, 12425, 796, 767, 198, 48031, 6030, 796, 384, 62, 26791, 13, 48031, 6030, 628, 198, 198, 4871, 11703, 3673, 8164, 540, 12331, 7, 13908, 32103, 16922, 2599, 198, 220, 220, 220, 37227, 6093, 6631, 329, 2663, 810, 5002, 460, 470, 3328, 257, 3904, 13, 37227, 628, 220, 220, 220, 2488, 12708, 24396, 628 ]
3.60274
146
# from app import app import urllib.request import json from .models import Source,Article # Source = source.Source # Getting api key api_key = None # Getting the news base url source_base_url = None article_base_url = None def configure_request(app): ''' Function to acquire the api key and base urls ''' global api_key,sources_base_url,article_base_url api_key = app.config['NEWS_API_KEY'] sources_base_url = app.config['NEWS_API_BASE_URL'] article_base_url = app.config['EVERYTHING_SOURCE_BASE_URL'] def get_sources(category): ''' Function that gets the json response to our url request ''' get_sources_url = sources_base_url.format(category) with urllib.request.urlopen(get_sources_url) as url: get_sources_data = url.read() get_sources_response = json.loads(get_sources_data) sources_results = None if get_sources_response['sources']: sources_results_list = get_sources_response['sources'] sources_results = process_sources(sources_results_list) return sources_results def process_sources(sources_results): ''' Function that processes the sources result and transform them to a list of Objects Args: sources_results: A list of dictionaries that contain sources details Returns : sources_list: A list of sources objects ''' sources_list = [] for source_item in sources_results: id = source_item.get('id') name = source_item.get('name') description = source_item.get('description') url = source_item.get('url') category = source_item.get('category') source_object = Source(id,name,description,url,category) sources_list.append(source_object) return sources_list def get_article(source): ''' Function that gets the json response to our url request ''' get_article_url = base_url.format(source,api_key) with urrlib.request.urlopen(get_article) as url: get_article_data = url.read() get_article_response = json.loads(get_article_data) article_results = None if get_article_response['article']: article_results_list = get_article_response['article'] article_results = process_results(article_results_list) return article_results def process_article(article_results): ''' Function that processes the article result and transform them to a list of objects Args: article_result: A list of dictionaries that contains article details Returns : article_list: A list of article objects ''' article_list = [] for article_item in article_results: author = article_item.get('author') title = article_item.get('title') description = article_item.get('description') url = article_item.get('url') image = article_item.get('urlToImage') date = article_item.get('publishedat') if date and author and image: article_object = Article(author,title,description,url,image,date) article_list.append(article_object) return article_list
[ 2, 422, 598, 1330, 598, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 33918, 198, 6738, 764, 27530, 1330, 8090, 11, 14906, 628, 198, 2, 8090, 796, 2723, 13, 7416, 198, 220, 198, 2, 220, 18067, 40391, 1994, 198, 15042, 62, 2539, 796, 6045, 198, 2, 18067, 262, 1705, 2779, 19016, 198, 10459, 62, 8692, 62, 6371, 796, 6045, 198, 20205, 62, 8692, 62, 6371, 796, 6045, 220, 198, 198, 4299, 17425, 62, 25927, 7, 1324, 2599, 198, 197, 7061, 6, 198, 197, 22203, 284, 12831, 262, 40391, 1994, 290, 2779, 2956, 7278, 198, 197, 7061, 6, 198, 197, 20541, 40391, 62, 2539, 11, 82, 2203, 62, 8692, 62, 6371, 11, 20205, 62, 8692, 62, 6371, 198, 197, 15042, 62, 2539, 796, 598, 13, 11250, 17816, 49597, 62, 17614, 62, 20373, 20520, 198, 197, 82, 2203, 62, 8692, 62, 6371, 796, 598, 13, 11250, 17816, 49597, 62, 17614, 62, 33, 11159, 62, 21886, 20520, 198, 197, 20205, 62, 8692, 62, 6371, 796, 598, 13, 11250, 17816, 36, 5959, 56, 39356, 62, 47690, 62, 33, 11159, 62, 21886, 20520, 198, 198, 4299, 651, 62, 82, 2203, 7, 22872, 2599, 198, 220, 705, 7061, 198, 220, 15553, 326, 3011, 262, 33918, 2882, 284, 674, 19016, 2581, 198, 220, 705, 7061, 198, 220, 651, 62, 82, 2203, 62, 6371, 796, 4237, 62, 8692, 62, 6371, 13, 18982, 7, 22872, 8, 628, 220, 351, 2956, 297, 571, 13, 25927, 13, 6371, 9654, 7, 1136, 62, 82, 2203, 62, 6371, 8, 355, 19016, 25, 198, 220, 220, 220, 651, 62, 82, 2203, 62, 7890, 796, 19016, 13, 961, 3419, 198, 220, 220, 220, 651, 62, 82, 2203, 62, 26209, 796, 33918, 13, 46030, 7, 1136, 62, 82, 2203, 62, 7890, 8, 628, 220, 220, 220, 4237, 62, 43420, 796, 6045, 628, 220, 220, 220, 611, 651, 62, 82, 2203, 62, 26209, 17816, 82, 2203, 6, 5974, 198, 220, 220, 220, 220, 220, 4237, 62, 43420, 62, 4868, 796, 651, 62, 82, 2203, 62, 26209, 17816, 82, 2203, 20520, 198, 220, 220, 220, 220, 220, 4237, 62, 43420, 796, 1429, 62, 82, 2203, 7, 82, 2203, 62, 43420, 62, 4868, 8, 220, 628, 220, 1441, 4237, 62, 43420, 198, 198, 4299, 1429, 62, 82, 2203, 7, 82, 2203, 62, 43420, 2599, 198, 197, 7061, 6, 198, 197, 22203, 220, 326, 7767, 262, 4237, 1255, 290, 6121, 606, 284, 257, 1351, 286, 35832, 198, 197, 42035, 25, 198, 197, 82, 2203, 62, 43420, 25, 317, 1351, 286, 48589, 3166, 326, 3994, 4237, 3307, 198, 197, 35561, 1058, 198, 197, 82, 2203, 62, 4868, 25, 317, 1351, 286, 4237, 5563, 198, 197, 7061, 6, 198, 197, 82, 2203, 62, 4868, 796, 17635, 198, 197, 1640, 2723, 62, 9186, 287, 4237, 62, 43420, 25, 198, 197, 197, 312, 796, 2723, 62, 9186, 13, 1136, 10786, 312, 11537, 198, 197, 197, 3672, 796, 2723, 62, 9186, 13, 1136, 10786, 3672, 11537, 198, 197, 197, 11213, 796, 2723, 62, 9186, 13, 1136, 10786, 11213, 11537, 198, 197, 197, 6371, 796, 2723, 62, 9186, 13, 1136, 10786, 6371, 11537, 198, 197, 197, 22872, 796, 2723, 62, 9186, 13, 1136, 10786, 22872, 11537, 628, 197, 197, 10459, 62, 15252, 796, 8090, 7, 312, 11, 3672, 11, 11213, 11, 6371, 11, 22872, 8, 198, 197, 197, 82, 2203, 62, 4868, 13, 33295, 7, 10459, 62, 15252, 8, 628, 197, 7783, 4237, 62, 4868, 628, 198, 220, 198, 4299, 651, 62, 20205, 7, 10459, 2599, 198, 220, 705, 7061, 198, 220, 15553, 326, 3011, 262, 33918, 2882, 284, 674, 19016, 2581, 198, 220, 705, 7061, 198, 220, 651, 62, 20205, 62, 6371, 796, 2779, 62, 6371, 13, 18982, 7, 10459, 11, 15042, 62, 2539, 8, 628, 220, 351, 2956, 81, 8019, 13, 25927, 13, 6371, 9654, 7, 1136, 62, 20205, 8, 355, 19016, 25, 198, 220, 220, 220, 651, 62, 20205, 62, 7890, 796, 19016, 13, 961, 3419, 198, 220, 220, 220, 651, 62, 20205, 62, 26209, 796, 33918, 13, 46030, 7, 1136, 62, 20205, 62, 7890, 8, 628, 220, 220, 220, 2708, 62, 43420, 796, 6045, 628, 220, 220, 220, 611, 651, 62, 20205, 62, 26209, 17816, 20205, 6, 5974, 198, 220, 220, 220, 220, 220, 2708, 62, 43420, 62, 4868, 796, 651, 62, 20205, 62, 26209, 17816, 20205, 20520, 198, 220, 220, 220, 220, 220, 2708, 62, 43420, 796, 1429, 62, 43420, 7, 20205, 62, 43420, 62, 4868, 8, 220, 628, 220, 1441, 2708, 62, 43420, 628, 198, 4299, 1429, 62, 20205, 7, 20205, 62, 43420, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 15553, 326, 7767, 262, 2708, 1255, 290, 6121, 606, 284, 257, 1351, 286, 5563, 198, 220, 220, 220, 220, 198, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2708, 62, 20274, 25, 317, 1351, 286, 48589, 3166, 326, 4909, 2708, 3307, 628, 220, 220, 220, 16409, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 2708, 62, 4868, 25, 317, 1351, 286, 2708, 5563, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2708, 62, 4868, 796, 17635, 198, 220, 220, 220, 329, 2708, 62, 9186, 287, 2708, 62, 43420, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1772, 796, 2708, 62, 9186, 13, 1136, 10786, 9800, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 2708, 62, 9186, 13, 1136, 10786, 7839, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 6764, 796, 2708, 62, 9186, 13, 1136, 10786, 11213, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 19016, 796, 2708, 62, 9186, 13, 1136, 10786, 6371, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2939, 796, 2708, 62, 9186, 13, 1136, 10786, 6371, 2514, 5159, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 3128, 796, 2708, 62, 9186, 13, 1136, 10786, 30271, 265, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 611, 3128, 290, 1772, 290, 2939, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2708, 62, 15252, 796, 10172, 7, 9800, 11, 7839, 11, 11213, 11, 6371, 11, 9060, 11, 4475, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2708, 62, 4868, 13, 33295, 7, 20205, 62, 15252, 8, 628, 220, 220, 220, 1441, 2708, 62, 4868, 628, 220, 198, 220, 220, 220, 628 ]
2.872361
1,042
""" Use HPPC battery cell data to determine the tau, resistor and capacitor values (RC parameters) for each SOC section. Curve fit coefficients are determined from the two time constant (TTC) function. """ import params from ecm import CellHppcData from ecm import CellEcm # Battery cell HPPC data and equivalent circuit model # ---------------------------------------------------------------------------- file = '../data/cell-low-current-hppc-25c-2.csv' data = CellHppcData(file) ecm = CellEcm(data, params) coeffs = ecm.curve_fit_coeff(ecm.func_ttc, 5) rctau = ecm.rctau_ttc(coeffs) # Print curve fit coefficients # ---------------------------------------------------------------------------- print('\n--- Curve fit coefficients from TTC ---') print('a\tb\tc\talpha\tbeta') for c in coeffs: print(f'{c[0]:.4f}\t{c[1]:.4f}\t{c[2]:.4f}\t{c[3]:.4f}\t{c[4]:.4f}') print('') # Print tau, resistor, and capacitor values # ---------------------------------------------------------------------------- soc = [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1] print(f"--- RC parameters from TTC ---") print(f"{'soc [-]':10} {'tau1 [s]':10} {'tau2 [s]':10} {'r0 [Ω]':10} {'r1 [Ω]':10} {'r2 [Ω]':10} {'c1 [F]':10} {'c2 [F]':10}") for s, r in zip(soc, rctau): print(f'{s:<10} {r[0]:<10.2f} {r[1]:<10.2f} {r[2]:<10.4f} {r[3]:<10.4f} {r[4]:<10.4f} {r[5]:<10.1f} {r[6]:<10.1f}') print('')
[ 37811, 198, 11041, 6574, 5662, 6555, 2685, 1366, 284, 5004, 262, 256, 559, 11, 45032, 290, 43212, 3815, 198, 7, 7397, 10007, 8, 329, 1123, 31430, 2665, 13, 46300, 4197, 44036, 389, 5295, 198, 6738, 262, 734, 640, 6937, 357, 51, 4825, 8, 2163, 13, 198, 37811, 198, 198, 11748, 42287, 198, 6738, 9940, 76, 1330, 12440, 39, 381, 66, 6601, 198, 6738, 9940, 76, 1330, 12440, 36, 11215, 198, 198, 2, 23490, 2685, 6574, 5662, 1366, 290, 7548, 10349, 2746, 198, 2, 16529, 10541, 198, 198, 7753, 796, 705, 40720, 7890, 14, 3846, 12, 9319, 12, 14421, 12, 71, 381, 66, 12, 1495, 66, 12, 17, 13, 40664, 6, 198, 7890, 796, 12440, 39, 381, 66, 6601, 7, 7753, 8, 198, 198, 721, 76, 796, 12440, 36, 11215, 7, 7890, 11, 42287, 8, 198, 1073, 14822, 82, 796, 9940, 76, 13, 22019, 303, 62, 11147, 62, 1073, 14822, 7, 721, 76, 13, 20786, 62, 926, 66, 11, 642, 8, 198, 81, 310, 559, 796, 9940, 76, 13, 81, 310, 559, 62, 926, 66, 7, 1073, 14822, 82, 8, 198, 198, 2, 12578, 12133, 4197, 44036, 198, 2, 16529, 10541, 198, 198, 4798, 10786, 59, 77, 6329, 46300, 4197, 44036, 422, 42662, 11420, 11537, 198, 4798, 10786, 64, 59, 83, 65, 59, 23047, 59, 83, 26591, 59, 83, 31361, 11537, 198, 1640, 269, 287, 763, 14822, 82, 25, 198, 220, 220, 220, 3601, 7, 69, 6, 90, 66, 58, 15, 5974, 13, 19, 69, 32239, 83, 90, 66, 58, 16, 5974, 13, 19, 69, 32239, 83, 90, 66, 58, 17, 5974, 13, 19, 69, 32239, 83, 90, 66, 58, 18, 5974, 13, 19, 69, 32239, 83, 90, 66, 58, 19, 5974, 13, 19, 69, 92, 11537, 198, 4798, 7, 7061, 8, 198, 198, 2, 12578, 256, 559, 11, 45032, 11, 290, 43212, 3815, 198, 2, 16529, 10541, 198, 198, 35634, 796, 685, 15, 13, 24, 11, 657, 13, 23, 11, 657, 13, 22, 11, 657, 13, 21, 11, 657, 13, 20, 11, 657, 13, 19, 11, 657, 13, 18, 11, 657, 13, 17, 11, 657, 13, 16, 60, 198, 198, 4798, 7, 69, 1, 6329, 13987, 10007, 422, 42662, 11420, 4943, 198, 4798, 7, 69, 1, 90, 6, 35634, 25915, 60, 10354, 940, 92, 1391, 6, 83, 559, 16, 685, 82, 60, 10354, 940, 92, 1391, 6, 83, 559, 17, 685, 82, 60, 10354, 940, 92, 1391, 6, 81, 15, 685, 158, 226, 99, 60, 10354, 940, 92, 1391, 6, 81, 16, 685, 158, 226, 99, 60, 10354, 940, 92, 1391, 6, 81, 17, 685, 158, 226, 99, 60, 10354, 940, 92, 1391, 6, 66, 16, 685, 37, 60, 10354, 940, 92, 1391, 6, 66, 17, 685, 37, 60, 10354, 940, 92, 4943, 198, 1640, 264, 11, 374, 287, 19974, 7, 35634, 11, 374, 310, 559, 2599, 198, 220, 220, 220, 3601, 7, 69, 6, 90, 82, 25, 27, 940, 92, 1391, 81, 58, 15, 5974, 27, 940, 13, 17, 69, 92, 1391, 81, 58, 16, 5974, 27, 940, 13, 17, 69, 92, 1391, 81, 58, 17, 5974, 27, 940, 13, 19, 69, 92, 1391, 81, 58, 18, 5974, 27, 940, 13, 19, 69, 92, 1391, 81, 58, 19, 5974, 27, 940, 13, 19, 69, 92, 1391, 81, 58, 20, 5974, 27, 940, 13, 16, 69, 92, 1391, 81, 58, 21, 5974, 27, 940, 13, 16, 69, 92, 11537, 198, 4798, 7, 7061, 8, 198 ]
2.454867
565
print(tribonacci(3))
[ 198, 198, 4798, 7, 83, 822, 261, 44456, 7, 18, 4008, 198 ]
1.916667
12
from django.utils.html import mark_safe from dynamic_preferences.registries import global_preferences_registry from basxconnect.core.views.person.search_person_view import searchbar
[ 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 1317, 62, 21230, 198, 6738, 8925, 62, 3866, 69, 4972, 13, 2301, 32995, 1330, 3298, 62, 3866, 69, 4972, 62, 2301, 4592, 198, 198, 6738, 1615, 87, 8443, 13, 7295, 13, 33571, 13, 6259, 13, 12947, 62, 6259, 62, 1177, 1330, 2989, 5657, 628 ]
3.538462
52
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Topic: 以编程方式定义类 Desc : """ # stock.py # Example of making a class manually from parts # Methods cls_dict = { '__init__': __init__, 'cost': cost, } # Make a class import types Stock = types.new_class('Stock', (), {}, lambda ns: ns.update(cls_dict)) Stock.__module__ = __name__ import operator import types import sys
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 33221, 25, 220, 20015, 98, 163, 120, 244, 163, 101, 233, 43095, 28156, 237, 22522, 248, 20046, 231, 163, 109, 119, 198, 24564, 1058, 220, 198, 37811, 198, 198, 2, 4283, 13, 9078, 198, 2, 17934, 286, 1642, 257, 1398, 14500, 422, 3354, 198, 198, 2, 25458, 628, 198, 198, 565, 82, 62, 11600, 796, 1391, 198, 220, 220, 220, 705, 834, 15003, 834, 10354, 11593, 15003, 834, 11, 198, 220, 220, 220, 705, 15805, 10354, 1575, 11, 198, 92, 198, 198, 2, 6889, 257, 1398, 198, 11748, 3858, 198, 198, 26207, 796, 3858, 13, 3605, 62, 4871, 10786, 26207, 3256, 29994, 1391, 5512, 37456, 36545, 25, 36545, 13, 19119, 7, 565, 82, 62, 11600, 4008, 198, 26207, 13, 834, 21412, 834, 796, 11593, 3672, 834, 198, 198, 11748, 10088, 198, 11748, 3858, 198, 11748, 25064, 628 ]
2.382716
162
from torch import nn import torch import torch.nn.functional as F
[ 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628 ]
3.631579
19
# This file is part of the Blockchain-based Fair Exchange Benchmark Tool # https://gitlab.com/MatthiasLohr/bfebench # # Copyright 2021 Matthias Lohr <[email protected]> # # 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 from typing import Generic, TypeVar from eth_typing.evm import ChecksumAddress from ..environment import Environment from ..utils.json_stream import JsonObjectSocketStream from .protocol import Protocol T = TypeVar("T", bound=Protocol)
[ 2, 770, 2393, 318, 636, 286, 262, 29724, 12, 3106, 7011, 12516, 25187, 4102, 16984, 198, 2, 220, 220, 220, 3740, 1378, 18300, 23912, 13, 785, 14, 19044, 400, 4448, 43, 1219, 81, 14, 19881, 1765, 24421, 198, 2, 198, 2, 15069, 33448, 45524, 4448, 406, 1219, 81, 1279, 4529, 31, 4029, 1219, 81, 13, 785, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 42044, 11, 5994, 19852, 198, 198, 6738, 4555, 62, 774, 13886, 13, 1990, 76, 1330, 47719, 388, 20231, 198, 198, 6738, 11485, 38986, 1330, 9344, 198, 6738, 11485, 26791, 13, 17752, 62, 5532, 1330, 449, 1559, 10267, 39105, 12124, 198, 6738, 764, 11235, 4668, 1330, 20497, 198, 198, 51, 796, 5994, 19852, 7203, 51, 1600, 5421, 28, 19703, 4668, 8, 628, 628 ]
3.626866
268
""" based on Gary's TSTFTarray.m in iris_mt_scratch/egbert_codes-20210121T193218Z-001/egbert_codes/matlabPrototype_10-13-20/TF/classes """ class TSTFTArray(object): """ class to support creating FC arrays from STFT objects stored as mat files % class to support creating FC arrays from STFT objects stored as mat files % simplified -- not a subclass of TFC -- cannot be used for array % processing without additional features/changes. Just intended % for SS and RR processing """ def __init__(self): """ ivar: ArrayInfo % cell array containing list of STFT file names ( created from tranmt.cfg + band setup file, array name ivar: array: % cell array containing all STFT objects ?STFTCollection()? ivar: FCdir = root path for STFT files -- EstimationBands % array of dimension (nBands, 3) giving decimation levels and band limits, as returned by function ReadBScfg. ivar: Header % TArrayHeader object -- mostly just an array of site headers ivar: iBand % current band number ivar: OneBand % data for one band -- data for one band -- a TFC1Dec object, containing all FCs for all sites / runs for band iBand, merged and aligned ivar: T % period for center of current band--could be dependent """ self.array_info = None self.array = None self.FCdir = None self.estimation_bands = None self.header = None self.T @property def load_stft_arrays(self): """ initialize and load all STFT objects - - for now no checks on consistency Note that the selection of what "runs" or FCFiles are going to be used is actually controlled by the Returns ------- """ self.array = cell(length(obj.ArrayInfo.Files), 1) #read in estimation bands self.EstimationBands = ReadBScfg(self.ArrayInfo.bandFile); #load all STFT files for all sites / runs SiteHeaders[self.number_of_sites] = TSiteHeader(); for j in range(self.number_of_sites): nFCfiles = length(self.array_info.Files{j}.FCfiles); #this just creates an array of empty TSTFT objects of length # nFCfiles - - one for each run self.Array{j}(nFCfiles) = TSTFT(); for k in range(nFCfiles): #full pathname of file to load cfile = [self.FCdir obj.ArrayInfo.Files{j}.FCfiles{k}]; load(cfile, '-mat', 'FTobj') self.Array{j}(k) = FTobj; if k == 1: SiteHeaders[j] = self.Array{j}(k).Header; else: header_ok = consistent_headers(SiteHeaders[j], self.Array{j}(k).Header) if not header_ok: print('Headers for two runs are not consistent') self.Header = TArrayHeader(self.ArrayInfo.ArrayName, SiteHeaders); # probably should carry a Header for this object; #Also should compare headers to make sure that runs for a given site are #consistent, and that sites are consistent #(use same Windows, start times, and also overlap in time?) def extractFCband(self, i_band, AllSites=None): """ Usage: T = extractFCband(obj, ib); loads FCs for full array for frequency band ib into TSTFTarray object, storing in OneBand. Parameters ---------- self i_band Returns: T - 1 / f_center where f_center is center frequency of band ------- """ self.iBand = ib; # could add some error checking band = self.estimation_bands[ib,:]; AllSites = self.number_of_sites * [TFC1Dec()] for j in range(self.number_of_sites): #first extract TFC1Dec objects defined by band for one site nFCfiles = length(self.array[j]); AllRuns = nFCfiles * [TFC1Dec()] for k = range(nFCfiles): AllRuns[k] = self.array[j][k].FC(band[0]).extractBand(band[1:2]) # make sure all objects have ordered segments, # complete block AllRuns(k).timeSort; AllRuns(k).reblock; # merge all runsfor site j AllSites[j] = AllRuns.mergeRuns; #merge all sites into a single TFC1Dec object self.OneBand = AllSites.mergeSites; # nominal period for estimation band: 1 / f_center T = 1. / mean(self.OneBand.freqs); return T def get_mt_tf_data(self, transfer_function_header): """ Usage: [H,E] = obj.getMTTFdata(TFHD); [H,E,R] = obj.getMTTF(TFHD); extracts arrays needed for estimation of MT transfer functions: H(NSeg,2) == magnetic field FCs E(NSeg,Nch) = electric field (and optionally vertical magnetic) field FCs; E(:,1) is Hz if this is returned; R(NSeg,2) = reference fields for RR estimation (optional) TFHD is TFHeader object, whioch defines local and (optionally) remote sites, and channels at these sites that will be used for processing. TFHeader.ArrayHeader2TFHeader creates this header from TArrayHeader, using default assumptions about channels (i.e., use horizontal mags at local as input channels, at remote for reference, etc. Parameters ---------- tfhd Returns ------- """ # find local site numbrt LocalInd = find(strcmp(transfer_function_header.LocalSite.SiteID, self.Header.SiteIDs)); Hind = transfer_function_header.ChIn + self.Header.ih(LocalInd)-1; Eind = transfer_function_header.ChOut + self.Header.ih(LocalInd)-1; H = self.OneBand.FC(Hind,:,:); [nch, nfc, nseg] = size(H); H = reshape(H, nch, nfc * nseg).'; E = obj.OneBand.FC(Eind,:,:); [nch, nfc, nseg] = size(E); E = reshape(E, nch, nfc * nseg).'; if strcmp(TFHD.Processing, 'RR'): #find reference site number if a character string is provide RemoteInd = find(strcmp(TFHD.RemoteSite.SiteID, self.Header.SiteIDs)); Rind = transfer_function_header.ChRef + self.Header.ih(RemoteInd) -1 R = self.OneBand.FC(Rind,:); [nch, nfc, nseg] = size(R); R = reshape(R, nch, nfc * nseg).'; return H,E,R
[ 37811, 198, 3106, 319, 10936, 338, 198, 51, 2257, 9792, 18747, 13, 76, 287, 198, 29616, 62, 16762, 62, 1416, 36722, 14, 1533, 4835, 62, 40148, 12, 1238, 2481, 486, 2481, 51, 1129, 2624, 1507, 57, 12, 8298, 14, 1533, 4835, 62, 40148, 14, 6759, 23912, 19703, 8690, 62, 940, 12, 1485, 12, 1238, 14, 10234, 14, 37724, 198, 37811, 198, 198, 4871, 309, 2257, 9792, 19182, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 284, 1104, 4441, 10029, 26515, 422, 3563, 9792, 5563, 8574, 355, 2603, 3696, 198, 220, 220, 220, 4064, 220, 220, 1398, 284, 1104, 4441, 10029, 26515, 422, 3563, 9792, 5563, 8574, 355, 2603, 3696, 198, 220, 220, 220, 4064, 220, 220, 220, 220, 220, 27009, 1377, 407, 257, 47611, 286, 309, 4851, 1377, 2314, 307, 973, 329, 7177, 198, 220, 220, 220, 4064, 220, 220, 220, 220, 220, 7587, 1231, 3224, 3033, 14, 36653, 13, 220, 2329, 5292, 198, 220, 220, 220, 4064, 220, 220, 220, 220, 220, 329, 6723, 290, 26067, 7587, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 15690, 12360, 220, 220, 4064, 2685, 7177, 7268, 1351, 286, 3563, 9792, 2393, 3891, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 2727, 220, 422, 491, 272, 16762, 13, 37581, 1343, 4097, 9058, 2393, 11, 7177, 1438, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 7177, 25, 4064, 2685, 7177, 7268, 477, 3563, 9792, 5563, 198, 220, 220, 220, 220, 220, 220, 220, 5633, 2257, 37, 4825, 349, 1564, 3419, 30, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 10029, 15908, 796, 220, 6808, 3108, 329, 3563, 9792, 3696, 1377, 198, 220, 220, 220, 220, 220, 220, 220, 10062, 18991, 33, 1746, 4064, 7177, 286, 15793, 357, 77, 33, 1746, 11, 513, 8, 3501, 875, 18991, 198, 220, 220, 220, 220, 220, 220, 220, 2974, 290, 4097, 7095, 11, 355, 4504, 416, 2163, 220, 4149, 33, 3351, 40616, 13, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 48900, 4064, 309, 19182, 39681, 2134, 1377, 4632, 655, 281, 7177, 286, 2524, 198, 220, 220, 220, 220, 220, 220, 220, 24697, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 1312, 31407, 4064, 1459, 4097, 1271, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 1881, 31407, 4064, 1366, 329, 530, 4097, 1377, 220, 1366, 329, 530, 4097, 1377, 257, 309, 4851, 16, 10707, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 11, 7268, 477, 10029, 82, 329, 477, 5043, 1220, 4539, 329, 4097, 1312, 31407, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23791, 290, 19874, 198, 220, 220, 220, 220, 220, 220, 220, 21628, 283, 25, 309, 4064, 2278, 329, 3641, 286, 220, 1459, 4097, 438, 24089, 307, 10795, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 18747, 62, 10951, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 18747, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4851, 15908, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 395, 18991, 62, 21397, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 25677, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 51, 628, 198, 220, 220, 220, 2488, 26745, 628, 198, 220, 220, 220, 825, 3440, 62, 301, 701, 62, 3258, 592, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 41216, 290, 3440, 477, 3563, 9792, 5563, 532, 532, 329, 783, 645, 8794, 319, 15794, 198, 220, 220, 220, 220, 220, 220, 220, 5740, 326, 262, 6356, 286, 644, 366, 48381, 1, 393, 10029, 25876, 389, 1016, 284, 307, 973, 198, 220, 220, 220, 220, 220, 220, 220, 318, 1682, 6856, 416, 262, 198, 220, 220, 220, 220, 220, 220, 220, 16409, 198, 220, 220, 220, 220, 220, 220, 220, 35656, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 18747, 796, 2685, 7, 13664, 7, 26801, 13, 19182, 12360, 13, 25876, 828, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 961, 287, 31850, 11760, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 22362, 18991, 33, 1746, 796, 4149, 33, 3351, 40616, 7, 944, 13, 19182, 12360, 13, 3903, 8979, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2220, 477, 3563, 9792, 3696, 329, 477, 5043, 1220, 4539, 198, 220, 220, 220, 220, 220, 220, 220, 14413, 13847, 364, 58, 944, 13, 17618, 62, 1659, 62, 49315, 60, 796, 26136, 578, 39681, 9783, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 2837, 7, 944, 13, 17618, 62, 1659, 62, 49315, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 4851, 16624, 796, 4129, 7, 944, 13, 18747, 62, 10951, 13, 25876, 90, 73, 27422, 4851, 16624, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5661, 655, 8075, 281, 7177, 286, 6565, 309, 2257, 9792, 5563, 286, 4129, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 299, 4851, 16624, 532, 532, 530, 329, 1123, 1057, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 19182, 90, 73, 92, 7, 77, 4851, 16624, 8, 796, 309, 2257, 9792, 9783, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 287, 2837, 7, 77, 4851, 16624, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12853, 3108, 3672, 286, 2393, 284, 3440, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 7753, 796, 685, 944, 13, 4851, 15908, 26181, 13, 19182, 12360, 13, 25876, 90, 73, 27422, 4851, 16624, 90, 74, 92, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3440, 7, 66, 7753, 11, 705, 12, 6759, 3256, 705, 9792, 26801, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 19182, 90, 73, 92, 7, 74, 8, 796, 19446, 26801, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 479, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14413, 13847, 364, 58, 73, 60, 796, 2116, 13, 19182, 90, 73, 92, 7, 74, 737, 39681, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13639, 62, 482, 796, 6414, 62, 50145, 7, 29123, 13847, 364, 58, 73, 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, 220, 220, 220, 220, 220, 2116, 13, 19182, 90, 73, 92, 7, 74, 737, 39681, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 13639, 62, 482, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 13847, 364, 329, 734, 4539, 389, 407, 6414, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 39681, 796, 309, 19182, 39681, 7, 944, 13, 19182, 12360, 13, 19182, 5376, 11, 14413, 13847, 364, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2192, 815, 3283, 257, 48900, 329, 428, 2134, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7583, 815, 8996, 24697, 284, 787, 1654, 326, 4539, 329, 257, 1813, 2524, 389, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5936, 7609, 11, 290, 326, 5043, 389, 6414, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 7, 1904, 976, 3964, 11, 923, 1661, 11, 290, 635, 21721, 287, 640, 10091, 628, 198, 220, 220, 220, 825, 7925, 4851, 3903, 7, 944, 11, 1312, 62, 3903, 11, 1439, 50, 2737, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 29566, 25, 309, 796, 7925, 4851, 3903, 7, 26801, 11, 24283, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 15989, 10029, 82, 329, 1336, 7177, 329, 8373, 4097, 24283, 656, 309, 2257, 9792, 18747, 2134, 11, 198, 220, 220, 220, 220, 220, 220, 220, 23069, 287, 1881, 31407, 13, 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, 2116, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 62, 3903, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 309, 532, 352, 1220, 277, 62, 16159, 810, 277, 62, 16159, 318, 3641, 8373, 286, 4097, 628, 220, 220, 220, 220, 220, 220, 220, 35656, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 72, 31407, 796, 24283, 26, 1303, 714, 751, 617, 4049, 10627, 198, 220, 220, 220, 220, 220, 220, 220, 4097, 796, 2116, 13, 395, 18991, 62, 21397, 58, 571, 11, 25, 11208, 198, 220, 220, 220, 220, 220, 220, 220, 1439, 50, 2737, 796, 2116, 13, 17618, 62, 1659, 62, 49315, 1635, 685, 51, 4851, 16, 10707, 3419, 60, 198, 220, 220, 220, 220, 220, 220, 220, 329, 474, 287, 2837, 7, 944, 13, 17618, 62, 1659, 62, 49315, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11085, 7925, 309, 4851, 16, 10707, 5563, 5447, 416, 4097, 329, 530, 2524, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 4851, 16624, 796, 4129, 7, 944, 13, 18747, 58, 73, 36563, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1439, 10987, 82, 796, 299, 4851, 16624, 1635, 685, 51, 4851, 16, 10707, 3419, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 796, 2837, 7, 77, 4851, 16624, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1439, 10987, 82, 58, 74, 60, 796, 2116, 13, 18747, 58, 73, 7131, 74, 4083, 4851, 7, 3903, 58, 15, 35944, 2302, 974, 31407, 7, 3903, 58, 16, 25, 17, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 787, 1654, 477, 5563, 423, 6149, 17894, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1844, 2512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1439, 10987, 82, 7, 74, 737, 2435, 42758, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1439, 10987, 82, 7, 74, 737, 260, 9967, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 20121, 477, 4539, 1640, 2524, 474, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1439, 50, 2737, 58, 73, 60, 796, 1439, 10987, 82, 13, 647, 469, 10987, 82, 26, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 647, 469, 477, 5043, 656, 257, 2060, 309, 4851, 16, 10707, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 3198, 31407, 796, 1439, 50, 2737, 13, 647, 469, 50, 2737, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 26934, 2278, 329, 31850, 4097, 25, 352, 1220, 277, 62, 16159, 198, 220, 220, 220, 220, 220, 220, 220, 309, 796, 352, 13, 1220, 1612, 7, 944, 13, 3198, 31407, 13, 19503, 48382, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 309, 628, 220, 220, 220, 825, 651, 62, 16762, 62, 27110, 62, 7890, 7, 944, 11, 4351, 62, 8818, 62, 25677, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 29566, 25, 685, 39, 11, 36, 60, 796, 26181, 13, 1136, 13752, 10234, 7890, 7, 10234, 10227, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 39, 11, 36, 11, 49, 60, 796, 26181, 13, 1136, 13752, 10234, 7, 10234, 10227, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 32139, 26515, 2622, 329, 31850, 286, 19308, 4351, 5499, 25, 198, 220, 220, 220, 220, 220, 220, 220, 367, 7, 8035, 1533, 11, 17, 8, 6624, 14091, 2214, 10029, 82, 198, 220, 220, 220, 220, 220, 220, 220, 412, 7, 8035, 1533, 11, 45, 354, 8, 796, 5186, 2214, 357, 392, 42976, 11723, 14091, 8, 2214, 198, 220, 220, 220, 220, 220, 220, 220, 10029, 82, 26, 412, 7, 45299, 16, 8, 318, 26109, 611, 428, 318, 4504, 26, 198, 220, 220, 220, 220, 220, 220, 220, 371, 7, 8035, 1533, 11, 17, 8, 796, 4941, 7032, 329, 26067, 31850, 357, 25968, 8, 198, 220, 220, 220, 220, 220, 220, 220, 24958, 10227, 318, 24958, 39681, 2134, 11, 348, 41097, 15738, 1957, 290, 357, 18076, 453, 8, 6569, 198, 220, 220, 220, 220, 220, 220, 220, 5043, 11, 290, 9619, 379, 777, 5043, 326, 481, 307, 973, 329, 7587, 13, 198, 220, 220, 220, 220, 220, 220, 220, 24958, 39681, 13, 19182, 39681, 17, 10234, 39681, 8075, 428, 13639, 422, 309, 19182, 39681, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1262, 4277, 14895, 546, 9619, 357, 72, 13, 68, 1539, 779, 16021, 2153, 82, 198, 220, 220, 220, 220, 220, 220, 220, 379, 1957, 355, 5128, 9619, 11, 379, 6569, 329, 4941, 11, 3503, 13, 628, 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, 48700, 31298, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 198, 220, 220, 220, 220, 220, 220, 220, 35656, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1064, 1957, 2524, 997, 1671, 83, 198, 220, 220, 220, 220, 220, 220, 220, 10714, 5497, 796, 1064, 7, 2536, 48991, 7, 39437, 62, 8818, 62, 25677, 13, 14565, 29123, 13, 29123, 2389, 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, 2116, 13, 39681, 13, 29123, 47954, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 17099, 796, 4351, 62, 8818, 62, 25677, 13, 1925, 818, 1343, 2116, 13, 39681, 13, 4449, 7, 14565, 5497, 13219, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 412, 521, 796, 4351, 62, 8818, 62, 25677, 13, 1925, 7975, 1343, 2116, 13, 39681, 13, 4449, 7, 14565, 5497, 13219, 16, 26, 198, 220, 220, 220, 220, 220, 220, 220, 367, 796, 2116, 13, 3198, 31407, 13, 4851, 7, 39, 521, 11, 45299, 25, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 77, 354, 11, 299, 16072, 11, 299, 325, 70, 60, 796, 2546, 7, 39, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 367, 796, 27179, 1758, 7, 39, 11, 299, 354, 11, 299, 16072, 1635, 299, 325, 70, 737, 17020, 198, 220, 220, 220, 220, 220, 220, 220, 412, 796, 26181, 13, 3198, 31407, 13, 4851, 7, 36, 521, 11, 45299, 25, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 685, 77, 354, 11, 299, 16072, 11, 299, 325, 70, 60, 796, 2546, 7, 36, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 412, 796, 27179, 1758, 7, 36, 11, 299, 354, 11, 299, 16072, 1635, 299, 325, 70, 737, 17020, 198, 220, 220, 220, 220, 220, 220, 220, 611, 965, 48991, 7, 10234, 10227, 13, 18709, 278, 11, 705, 21095, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 19796, 4941, 2524, 1271, 611, 257, 2095, 4731, 318, 2148, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21520, 5497, 796, 1064, 7, 2536, 48991, 7, 10234, 10227, 13, 36510, 29123, 13, 29123, 2389, 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, 2116, 13, 39681, 13, 29123, 47954, 18125, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 521, 796, 4351, 62, 8818, 62, 25677, 13, 1925, 8134, 1343, 2116, 13, 39681, 13, 4449, 7, 36510, 5497, 8, 532, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 796, 2116, 13, 3198, 31407, 13, 4851, 7, 49, 521, 11, 25, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 77, 354, 11, 299, 16072, 11, 299, 325, 70, 60, 796, 2546, 7, 49, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 371, 796, 27179, 1758, 7, 49, 11, 299, 354, 11, 299, 16072, 1635, 299, 325, 70, 737, 17020, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 367, 11, 36, 11, 49, 198 ]
2.226263
2,970
import discord from discord.ext import commands import random import httpx from lxml import html import os
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 4738, 198, 11748, 2638, 87, 198, 6738, 300, 19875, 1330, 27711, 198, 11748, 28686, 628 ]
4.153846
26
#!/usr/bin/env python3 S = "11100010" S = "111000111100001100" S = '1100' S = '1010' S = '10' S = "11011000" S = '' sol = Solution() print(sol.makeLargestSpecial(S))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 50, 796, 366, 1157, 3064, 20943, 1, 198, 50, 796, 366, 1157, 3064, 486, 16243, 2388, 42060, 1, 198, 50, 796, 705, 42060, 6, 198, 50, 796, 705, 8784, 15, 6, 198, 50, 796, 705, 940, 6, 198, 50, 796, 366, 1157, 486, 12825, 1, 198, 50, 796, 10148, 198, 34453, 796, 28186, 3419, 198, 4798, 7, 34453, 13, 15883, 43, 853, 395, 13409, 7, 50, 4008, 198 ]
2.113924
79
""" Classes, that represents various value types that can appear in the configuration and problem definitionfiles. Each grammar type can both parse string containing a value of a given type, and to create the string containing a given value. """ import pyparsing as pp import io import inspect from pyparsing import Word, Suppress import itertools import numpy as np from collections import namedtuple from collections.abc import Hashable from .misc import OrderedDict, cached_property, cache ppc = pp.pyparsing_common from .grammar import generate_grammar, separator as separator_grammar, \ delimitedList, line_end, optional_quote,\ replace_whitechars, White from ase.units import Rydberg import copy import datetime from typing import Union, Any, Callable context = generate_grammar() context.__enter__() #it ensures that the generated grammar will have the correct whitespaces class BaseType: """ Base class for definition of configuration option types A type without value (e.g. Separator) are just syntactical elements in the potentials file, that do not carry an information. Such elements do not yields (name, value) pair during parsing the file. Do not confuse this with BaseType.missing_value functionality. Missing_value is just the opposite: missing_value can be ommited in the file (or even the absence of the name in the file carry the information, that the Flag is False), but the name-value tuple of such Type is present in the parse result. On the other hand, has_value = False is in the file, but not in the result. """ has_value = True """ Default value for BaseValueDefinition.name_in_grammar. Some types (e.g. Tables) commonly have no name (are identified by its position in the potential file. """ name_in_grammar = True """ Default value for the given type. It can be overriden in the constructor (or just by setting the instantiated object attribute) """ default_value = None """ Deafault type for creating numpy arrays (e.g. by Table) is object - to be redefined in the descendatns """ numpy_type = object def __init__(self, prefix:Union[str,None]=None, postfix:Union[str,None]=None, format:str='', default_value:Any=None, condition:Union[Callable[[Any], Union[bool,str]],None]=None, after_convert:Union[Callable[[Any], Any],None]=None): """ Create the object. Parameters ---------- prefix The string, that will be printed before the value postfix The string, that will be printed after the value format The (python) format string, that will be used for printing the value. The format is passed as format argument to ``str.format`` routine. default_value The default value of the options of this type. ``None`` means no default value. condition Function, that check the validity of the value. It should return ``True`` for a valid value, and ``False`` or string for invalid. The string is interpreted as an error message that explains the invalidity of the value. after_convert Function, that - if it is given - is applied to the (entered or parsed) value. The function is applied on the result of the :meth:`convert<ase2sprkkr.common.grammar_types.BaseType.convert>` method """ self.prefix = prefix """ The string, that will be printed before the value """ self.postfix = postfix """ The string, that will be printed after the value """ self.format = format """ The (python) format string, that will be used for printing the value. The format is passed as format argument to ``str.format`` routine. """ self.condition = condition if after_convert is not None: self.convert = lambda v: \ after_convert(self, self.__class__.convert(self, v)) """ Some subclasses has default_value defined via read-only property. """ if default_value is not None: self.default_value = self.convert(default_value) @cache def grammar(self, param_name=False): """ Return a pyparsing grammar for the type """ grammar = self._grammar if not isinstance(grammar, pp.ParserElement): grammar = grammar(param_name) if self.prefix or self.postfix: with generate_grammar(): if self.prefix: grammar = pp.Literal(self.prefix).suppress().setName(self.prefix) + grammar if self.postfix: grammar += pp.Literal(self.postfix).suppress().setName(self.postfix) grammar = self.transform_grammar(grammar, param_name) if self.has_value: grammar.addParseAction(validate) grammar.grammar_type = self return grammar def grammar_name(self): """ Human readable expression of the grammar. By default, this is what is set by grammar.setName, however, sometimes is desirable to set even shorter string """ return str(self.grammar) def transform_grammar(self, grammar, param_name=False): """ The chance for the resulting class to alter the resulting prefixed grammar """ return grammar def missing_value(self): """ Is the configuraion value a flag? I.e. can be =<value> ommited in the configuration Return ------ can_be_ommited : bool Is an ommision of the value possible, e.g. the option is given as Flag (only by name of the option) default_value The value used if the value is ommitted do_not_output_value The value, with which the variable should not be outputed at all (e.g. False for a flag) """ return False, None, None def validate(self, value, param_name='<Unknown>', parse_check=False): """ Validate either the pyparsing result or a user given value Parameters --------- value : mixed Value to be validated param_name : str or callable Parameter name to be used in possible throwed exception (Optional) If it is callable, it should be a function that returns the param_name """ try: err = self._validate(value, parse_check) except ValueError as err: self._valueError(value, err, param_name) if err is not True: self._valueError(value, err, param_name) if self.condition: err = self.condition(value) if err is not True: self._valueError(value, err, param_name) return True def _validate(self, value, parse_check=False): """ Return error message if the value is not valid """ return True def read(self, token, parameterName='<Unknown>'): """ Transform pyparsing token to a validated value """ self.validate(val) return val def convert(self, value): """ Convert a value from user to a "cannonical form" """ return value def enrich(self, option): """ Some types can add properties to the options that have the type, e.g. see Sequence.enrich, which adds the ability to access the items of the sequence using [] """ pass class Unsigned(BaseType): """ Unsigned integer (zero is possible) """ _grammar = replace_whitechars(ppc.integer).setParseAction(lambda x:int(x[0])) numpy_type = int Unsigned.I = Unsigned() class Integer(BaseType): """ Signed integer """ _grammar = replace_whitechars(ppc.signed_integer).setParseAction(lambda x:int(x[0])) numpy_type = int Integer.I = Integer() class Bool(BaseType): """ A bool type, whose value is represented by a letter (T or F) """ _grammar = (pp.CaselessKeyword('T') | pp.CaselessKeyword('F')).setParseAction( lambda x: x[0] == 'T' ) numpy_type = bool Bool.I = Bool() class Real(BaseType): """ A real value """ _grammar = replace_whitechars(ppc.fnumber).setParseAction(lambda x: float(x[0])) numpy_type = float Real.I = Real() class Date(BaseType): """ A date value of the form 'DD.MM.YYYY' """ _grammar = pp.Regex(r'(?P<d>\d{2}).(?P<m>\d{2}).(?P<y>\d{4})').setParseAction(lambda x: datetime.date(int(x['y']), int(x['m']), int(x['d']))) Date.I = Date() class BaseRealWithUnits(BaseType): """ The base class for float value, which can have units append. The value is converted automatically to the base units. """ grammar_cache = {} """ A grammar for units is cached """ numpy_type = float class RealWithUnits(BaseRealWithUnits): """ A float value with user-defined units """ class Energy(BaseRealWithUnits): """ The grammar type for energy. The default units are Rydberg, one can specify eV. """ units = { 'Ry' : 1., 'eV' : 1. / Rydberg, None : 1., } """ The allowed units and their conversion factors """ Energy.I = Energy() class BaseString(BaseType): """ Base type for string grammar types """ class String(BaseString): """ Just a string (without whitespaces and few special chars) """ _grammar = Word(pp.printables,excludeChars=",;{}").setParseAction(lambda x:x[0]) String.I = String() class QString(BaseString): """ Either a quoted string, or just a word (without whitespaces or special chars) """ _grammar = (pp.Word(pp.printables, excludeChars=",;{}") or pp.QuotedString("'")).setParseAction(lambda x:x[0]) QString.I = String() class LineString(BaseString): """ A string, that takes all up to the end of the line """ _grammar = pp.SkipTo(pp.LineEnd() | pp.StringEnd()) LineString.I = LineString() class Keyword(BaseType): """ A value, that can take values from the predefined set of strings. """ def DefKeyword(default, *others, **kwargs): """ A value, that can take values from the predefined set of strings, the first one is the default value. """ return Keyword(default, *others, default_value=default, **kwargs) class Flag(BaseType): """ A boolean value, which is True, if a name of the value appears in the input file. """ _grammar = pp.Empty().setParseAction(lambda x: True) Flag.I = Flag() normalize_type_map = { np.int64 : int, np.float64: float, np.bool_: bool } """ Mapping of alternative types to the 'canonical ones'. """ def normalize_type(type): """ Return the 'canonical type' for a given type I.e. it maps numpy internal types to standard python ones doctest: >>> normalize_type(np.int64) <class 'int'> """ return normalize_type_map.get(type, type) type_from_type_map = OrderedDict([ (float, Real.I), (int , Integer.I), (bool, Bool.I), (str , String.I)] ) """ The standard grammar_types for python types. The value type can be given by a standard python type, this map maps the python type for the appropriate grammar_type class. """ def format_for_type(format, type): """ Returns the format appropriate to the given type Parameters ---------- format: str or dict If it is str, just return it. Dict should has the form { type : format_for_the_type } + { None : default_format } """ if isinstance(format, dict): if type in format: return format[type] return format[None] return format def type_from_type(type, format='', format_all=False): """ Guess and return the grammar element (BaseType class descendatnt) from a python type. E.g. int => Integer. The given format can be optionally set to the returned grammar element. Parameters ---------- type: A python type or BaseType A type to be converted to a grammar type (BaseType class descendant) format: str or dict The format to be applied to the resulting class. If dict is given, see 'format_for_type' for the way how the format is determined format_all: boolean If False (default), the format is not applied, if instance of BaseType is given as the type parameter. Otherwise, a copy of the input type with the applied format is returned """ if isinstance(type, Hashable) and type in type_from_type_map: type = normalize_type(type) format = format_for_type(format, type) type = type_from_type_map[type] if format: type = type.copy() type.format = format return type elif format_all: type = type.copy() type.format = format_for_type(format, normalize_type(type.numpy_type)) return type class Array(BaseType): """ A (numpy) array of values of one type """ delimiter=White(' \t').suppress() delimiter_str = ' ' class SetOf(Array): """ Set of values of the same type. E.g. {1,2,3} """ delimiter = pp.Suppress(pp.Literal(',') | pp.Literal(';') | White(' \t')).setName('[,; ]') delimiter_str = ',' type_from_set_map = OrderedDict([ (float, SetOf(float)), (int , SetOf(int)), ]) """ Map the python type of a collection member to a grammar type of the collection. Only canonical types are expected, see :meth:`ase2sprkkr.common.grammar_types.normalize_type` """ def type_from_value(value): """ Gues the grammar type from a python value. ..doctest:: >>> type_from_value(2) <Integer> >>> type_from_value(2.0) <Real> """ if isinstance(value, (list, np.ndarray)): return type_from_set_map[normalize_type(value[0].__class__)] if len(value) else Integer.I if isinstance(value, str): try: String._grammar.parseString(value, True) return String.I except Exception: return QString.I type = type_from_type(value.__class__) if type is value.__class__: raise ValueError('Cannot determine grammar type from value {value}') return type.__class__(default_value = value) def type_from_default_value(value, format='', format_all=False): """ Guess the grammar type from a value, that will become the default value of the grammar type. It has to create a new object instance, as it has to set the default value property of the returned object. An (output) format can be applied to the resulting grammar type Grammar types passed as types are left as is, unless format_all flag is set. """ if inspect.isclass(value) or isinstance(value, BaseType): return type_from_type(value, format=format, format_all=format_all) ptype = normalize_type(value.__class__) gtype = type_from_type(value.__class__).__class__ return gtype(default_value = value, format=format_for_type(format, ptype)) class BaseMixed(BaseType): """ A variant type - it can hold "anything". """ type = None """ The types, that the value can hold. To be redefined in the descendants. """ string_type = None """ Type of string grammar_type to be used. To be redefined in the descendants. """ @classmethod def get_type(self, value): """ Return the type of the value """ return self.string_type if isinstance(value, str) else type_from_value(value) class Mixed(BaseMixed): """ A variant value to be used in input files (in unknown - custom - options) """ string_type = QString.I """ Input files use quoted strings. """ types = [ Energy.I, Real.I, Integer.I, type_from_set_map[int], type_from_set_map[float], QString.I, Flag.I, ] Mixed.I = Mixed() class PotMixed(BaseMixed): """ A variant value to be used in potential files (in unknown - custom - options) """ string_type = LineString.I """ Potential files use line strings. """ types = [ Energy.I, Real.I, Integer.I, Bool.I, type_from_set_map[int], type_from_set_map[float], LineString.I, ] PotMixed.I = PotMixed() class Separator(BaseType): """ Special class for ``****`` separator inside a section """ _grammar = separator_grammar.copy().setParseAction(lambda x: [None]) has_value = False Separator.I = Separator() class Sequence(BaseType): """ A sequence of values of given types """ class Table(BaseType): """ Table, optionaly with named columns, e.g. ::text IQ IREFQ IMQ NOQ ITOQ CONC 1 1 1 1 1 1.000 2 2 2 1 2 1.000 """ name_in_grammar = False @cached_property def zero_data(self, length): """ Return array of zeros with the given number of rows and with the dtype of the table """ dtype = self.numpy_type if isinstance(dtype, list): return np.zeros(length, dtype) else: return np.zeros((length, self.number_of_collumns()), dtype) integer = Integer.I """ A standard signed integer grammar type instance """ unsigned = Unsigned.I """ A standard unsigned integer grammar type instance """ boolean = Bool.I """ A standard bool grammar type instance (for potential files) """ flag = Flag.I """ A standard bool grammar type instance (for input files) """ real = Real.I """ A standard real grammar type instance """ string = String.I """ A standard string grammar type instance """ qstring = QString.I """ A standard quoted string grammar type instance (for input files) """ line_string = LineString.I """ A standard line string grammar type instance (for potential files) """ mixed = Mixed.I """ A standard variant grammar type instance (for input files) """ pot_mixed = PotMixed.I """ A standard variant grammar type instance (for potential files) """ separator = Separator.I """ A standard separator line grammar type instance (for potential files) """ energy = Energy.I """ A standard energy float value type instance (for potential files) """ context.__exit__(None, None, None) del context
[ 37811, 198, 9487, 274, 11, 326, 6870, 2972, 1988, 3858, 326, 460, 1656, 287, 262, 8398, 290, 1917, 6770, 16624, 13, 198, 198, 10871, 23491, 2099, 460, 1111, 21136, 4731, 7268, 257, 1988, 286, 257, 1813, 2099, 11, 290, 284, 2251, 262, 4731, 7268, 257, 1813, 1988, 13, 198, 37811, 628, 198, 11748, 279, 4464, 945, 278, 355, 9788, 198, 11748, 33245, 198, 11748, 10104, 198, 6738, 279, 4464, 945, 278, 1330, 9678, 11, 8105, 601, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 17268, 13, 39305, 1330, 21059, 540, 198, 6738, 764, 44374, 1330, 14230, 1068, 35, 713, 11, 39986, 62, 26745, 11, 12940, 198, 381, 66, 796, 9788, 13, 79, 4464, 945, 278, 62, 11321, 198, 6738, 764, 4546, 3876, 1330, 7716, 62, 4546, 3876, 11, 2880, 1352, 355, 2880, 1352, 62, 4546, 3876, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 46728, 863, 8053, 11, 1627, 62, 437, 11, 11902, 62, 22708, 11, 59, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6330, 62, 11186, 354, 945, 11, 2635, 198, 198, 6738, 257, 325, 13, 41667, 1330, 371, 5173, 3900, 198, 11748, 4866, 198, 11748, 4818, 8079, 198, 6738, 19720, 1330, 4479, 11, 4377, 11, 4889, 540, 198, 198, 22866, 796, 220, 7716, 62, 4546, 3876, 3419, 198, 22866, 13, 834, 9255, 834, 3419, 198, 2, 270, 19047, 326, 262, 7560, 23491, 481, 423, 262, 3376, 13216, 43076, 198, 198, 4871, 31783, 25, 198, 220, 37227, 7308, 1398, 329, 6770, 286, 8398, 3038, 3858, 628, 220, 220, 220, 220, 220, 317, 2099, 1231, 1988, 357, 68, 13, 70, 13, 8621, 283, 1352, 8, 389, 655, 7419, 529, 605, 198, 220, 220, 220, 220, 220, 4847, 287, 262, 2785, 82, 2393, 11, 326, 466, 407, 3283, 281, 1321, 13, 198, 220, 220, 220, 220, 220, 8013, 4847, 466, 407, 19299, 357, 3672, 11, 1988, 8, 5166, 1141, 32096, 262, 2393, 13, 628, 220, 220, 220, 220, 220, 2141, 407, 27531, 428, 351, 31783, 13, 45688, 62, 8367, 11244, 13, 198, 220, 220, 220, 220, 220, 25639, 62, 8367, 318, 655, 262, 6697, 25, 4814, 62, 8367, 460, 307, 267, 3020, 863, 287, 262, 2393, 198, 220, 220, 220, 220, 220, 357, 273, 772, 262, 8889, 286, 262, 1438, 287, 262, 2393, 3283, 262, 1321, 11, 326, 198, 220, 220, 220, 220, 220, 262, 19762, 318, 10352, 828, 475, 262, 1438, 12, 8367, 46545, 286, 884, 5994, 318, 1944, 198, 220, 220, 220, 220, 220, 287, 262, 21136, 1255, 13, 1550, 262, 584, 1021, 11, 468, 62, 8367, 796, 10352, 318, 287, 262, 2393, 11, 475, 198, 220, 220, 220, 220, 220, 407, 287, 262, 1255, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 468, 62, 8367, 796, 6407, 628, 220, 37227, 15161, 1988, 329, 7308, 11395, 36621, 13, 3672, 62, 259, 62, 4546, 3876, 13, 198, 220, 220, 220, 220, 220, 2773, 3858, 357, 68, 13, 70, 13, 33220, 8, 8811, 423, 645, 1438, 357, 533, 5174, 198, 220, 220, 220, 220, 220, 416, 663, 2292, 287, 262, 2785, 2393, 13, 198, 220, 37227, 198, 220, 1438, 62, 259, 62, 4546, 3876, 796, 6407, 628, 220, 37227, 15161, 1988, 329, 262, 1813, 2099, 13, 632, 460, 307, 625, 6058, 268, 287, 262, 23772, 357, 273, 655, 416, 4634, 198, 220, 262, 9113, 12931, 2134, 11688, 8, 37227, 198, 220, 4277, 62, 8367, 796, 6045, 628, 220, 37227, 1024, 1878, 1721, 2099, 329, 4441, 299, 32152, 26515, 357, 68, 13, 70, 13, 416, 8655, 8, 318, 2134, 532, 284, 307, 2266, 18156, 198, 220, 220, 220, 220, 220, 287, 262, 15350, 265, 5907, 198, 220, 37227, 198, 220, 299, 32152, 62, 4906, 796, 2134, 628, 220, 825, 11593, 15003, 834, 7, 944, 11, 21231, 25, 38176, 58, 2536, 11, 14202, 22241, 14202, 11, 1281, 13049, 25, 38176, 58, 2536, 11, 14202, 22241, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5794, 25, 2536, 11639, 3256, 4277, 62, 8367, 25, 7149, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4006, 25, 38176, 58, 14134, 540, 30109, 7149, 4357, 4479, 58, 30388, 11, 2536, 60, 4357, 14202, 22241, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 706, 62, 1102, 1851, 25, 38176, 58, 14134, 540, 30109, 7149, 4357, 4377, 4357, 14202, 22241, 14202, 2599, 198, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 13610, 262, 2134, 13, 628, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 21231, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4731, 11, 326, 481, 307, 10398, 878, 262, 1988, 628, 220, 220, 220, 220, 220, 1281, 13049, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4731, 11, 326, 481, 307, 10398, 706, 262, 1988, 628, 220, 220, 220, 220, 220, 5794, 198, 220, 220, 220, 220, 220, 220, 220, 383, 357, 29412, 8, 5794, 4731, 11, 326, 481, 307, 973, 329, 13570, 262, 1988, 13, 198, 220, 220, 220, 220, 220, 220, 220, 383, 5794, 318, 3804, 355, 5794, 4578, 284, 7559, 2536, 13, 18982, 15506, 8027, 13, 628, 220, 220, 220, 220, 220, 4277, 62, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4277, 1988, 286, 262, 3689, 286, 428, 2099, 13, 7559, 14202, 15506, 1724, 645, 4277, 1988, 13, 628, 220, 220, 220, 220, 220, 4006, 198, 220, 220, 220, 220, 220, 220, 220, 15553, 11, 326, 2198, 262, 19648, 286, 262, 1988, 13, 632, 815, 1441, 7559, 17821, 15506, 329, 257, 4938, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 11, 290, 7559, 25101, 15506, 393, 4731, 329, 12515, 13, 383, 4731, 318, 16173, 355, 281, 4049, 3275, 198, 220, 220, 220, 220, 220, 220, 220, 326, 6688, 262, 12515, 414, 286, 262, 1988, 13, 628, 220, 220, 220, 220, 220, 706, 62, 1102, 1851, 198, 220, 220, 220, 220, 220, 220, 220, 15553, 11, 326, 532, 611, 340, 318, 1813, 532, 318, 5625, 284, 262, 357, 298, 1068, 393, 44267, 8, 1988, 13, 383, 2163, 198, 220, 220, 220, 220, 220, 220, 220, 318, 5625, 319, 262, 1255, 286, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 76, 2788, 25, 63, 1102, 1851, 27, 589, 17, 34975, 28747, 81, 13, 11321, 13, 4546, 3876, 62, 19199, 13, 14881, 6030, 13, 1102, 1851, 29, 63, 2446, 198, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 2116, 13, 40290, 796, 21231, 198, 220, 220, 220, 220, 220, 37227, 383, 4731, 11, 326, 481, 307, 10398, 878, 262, 1988, 37227, 198, 220, 220, 220, 220, 220, 2116, 13, 7353, 13049, 796, 1281, 13049, 198, 220, 220, 220, 220, 220, 37227, 383, 4731, 11, 326, 481, 307, 10398, 706, 262, 1988, 37227, 198, 220, 220, 220, 220, 220, 2116, 13, 18982, 796, 5794, 198, 220, 220, 220, 220, 220, 37227, 383, 357, 29412, 8, 5794, 4731, 11, 326, 481, 307, 973, 329, 13570, 262, 1988, 13, 198, 220, 220, 220, 220, 220, 220, 220, 383, 5794, 318, 3804, 355, 5794, 4578, 284, 7559, 2536, 13, 18982, 15506, 8027, 13, 220, 37227, 198, 220, 220, 220, 220, 220, 2116, 13, 31448, 796, 4006, 198, 220, 220, 220, 220, 220, 611, 706, 62, 1102, 1851, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1102, 1851, 796, 37456, 410, 25, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 706, 62, 1102, 1851, 7, 944, 11, 2116, 13, 834, 4871, 834, 13, 1102, 1851, 7, 944, 11, 410, 4008, 628, 220, 220, 220, 220, 220, 37227, 2773, 850, 37724, 468, 4277, 62, 8367, 5447, 2884, 1100, 12, 8807, 3119, 13, 37227, 198, 220, 220, 220, 220, 220, 611, 4277, 62, 8367, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 12286, 62, 8367, 796, 2116, 13, 1102, 1851, 7, 12286, 62, 8367, 8, 628, 220, 2488, 23870, 198, 220, 825, 23491, 7, 944, 11, 5772, 62, 3672, 28, 25101, 2599, 198, 220, 220, 220, 37227, 8229, 257, 279, 4464, 945, 278, 23491, 329, 262, 2099, 37227, 198, 220, 220, 220, 23491, 796, 2116, 13557, 4546, 3876, 198, 220, 220, 220, 611, 407, 318, 39098, 7, 4546, 3876, 11, 9788, 13, 46677, 20180, 2599, 198, 220, 220, 220, 220, 220, 220, 23491, 796, 23491, 7, 17143, 62, 3672, 8, 198, 220, 220, 220, 611, 2116, 13, 40290, 393, 2116, 13, 7353, 13049, 25, 198, 220, 220, 220, 220, 220, 220, 351, 7716, 62, 4546, 3876, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 40290, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23491, 796, 9788, 13, 43, 270, 1691, 7, 944, 13, 40290, 737, 18608, 601, 22446, 2617, 5376, 7, 944, 13, 40290, 8, 1343, 23491, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 7353, 13049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23491, 15853, 9788, 13, 43, 270, 1691, 7, 944, 13, 7353, 13049, 737, 18608, 601, 22446, 2617, 5376, 7, 944, 13, 7353, 13049, 8, 198, 220, 220, 220, 220, 220, 220, 220, 23491, 796, 2116, 13, 35636, 62, 4546, 3876, 7, 4546, 3876, 11, 5772, 62, 3672, 8, 628, 220, 220, 220, 611, 2116, 13, 10134, 62, 8367, 25, 628, 220, 220, 220, 220, 220, 220, 23491, 13, 2860, 10044, 325, 12502, 7, 12102, 378, 8, 198, 220, 220, 220, 23491, 13, 4546, 3876, 62, 4906, 796, 2116, 198, 220, 220, 220, 1441, 23491, 628, 220, 825, 23491, 62, 3672, 7, 944, 2599, 198, 220, 220, 220, 37227, 5524, 31744, 5408, 286, 262, 23491, 13, 2750, 4277, 11, 198, 220, 220, 220, 220, 220, 220, 220, 428, 318, 644, 318, 900, 416, 23491, 13, 2617, 5376, 11, 2158, 11, 3360, 198, 220, 220, 220, 220, 220, 220, 220, 318, 18763, 284, 900, 772, 12238, 4731, 37227, 198, 220, 220, 220, 1441, 965, 7, 944, 13, 4546, 3876, 8, 628, 220, 825, 6121, 62, 4546, 3876, 7, 944, 11, 23491, 11, 5772, 62, 3672, 28, 25101, 2599, 198, 220, 220, 220, 37227, 383, 2863, 329, 262, 7186, 1398, 284, 8343, 262, 7186, 7694, 2966, 23491, 37227, 198, 220, 220, 220, 1441, 23491, 628, 220, 825, 4814, 62, 8367, 7, 944, 2599, 198, 220, 220, 220, 37227, 1148, 262, 4566, 5330, 295, 1988, 257, 6056, 30, 314, 13, 68, 13, 460, 307, 796, 27, 8367, 29, 267, 3020, 863, 198, 220, 220, 220, 287, 262, 8398, 628, 220, 220, 220, 8229, 198, 220, 220, 220, 40103, 198, 220, 220, 220, 460, 62, 1350, 62, 2002, 863, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 1148, 281, 267, 3020, 1166, 286, 262, 1988, 1744, 11, 304, 13, 70, 13, 262, 3038, 318, 1813, 355, 19762, 357, 8807, 416, 1438, 286, 262, 3038, 8, 198, 220, 220, 220, 4277, 62, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 383, 1988, 973, 611, 262, 1988, 318, 267, 3020, 2175, 198, 220, 220, 220, 466, 62, 1662, 62, 22915, 62, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 383, 1988, 11, 351, 543, 262, 7885, 815, 407, 307, 5072, 276, 379, 477, 357, 68, 13, 70, 13, 10352, 329, 257, 6056, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 10352, 11, 6045, 11, 6045, 628, 220, 825, 26571, 7, 944, 11, 1988, 11, 5772, 62, 3672, 11639, 27, 20035, 29, 3256, 21136, 62, 9122, 28, 25101, 2599, 198, 220, 220, 220, 37227, 3254, 20540, 2035, 262, 279, 4464, 945, 278, 1255, 393, 257, 2836, 1813, 1988, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 45337, 198, 220, 220, 220, 1988, 1058, 7668, 198, 220, 220, 220, 220, 220, 11052, 284, 307, 31031, 198, 220, 220, 220, 5772, 62, 3672, 1058, 965, 393, 869, 540, 198, 220, 220, 220, 220, 220, 25139, 2357, 1438, 284, 307, 973, 287, 1744, 3714, 276, 6631, 357, 30719, 8, 198, 220, 220, 220, 220, 220, 1002, 340, 318, 869, 540, 11, 340, 815, 307, 257, 2163, 326, 5860, 262, 5772, 62, 3672, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 11454, 796, 2116, 13557, 12102, 378, 7, 8367, 11, 21136, 62, 9122, 8, 198, 220, 220, 220, 2845, 11052, 12331, 355, 11454, 25, 198, 220, 220, 220, 220, 220, 2116, 13557, 8367, 12331, 7, 8367, 11, 11454, 11, 5772, 62, 3672, 8, 198, 220, 220, 220, 611, 11454, 318, 407, 6407, 25, 198, 220, 220, 220, 220, 220, 2116, 13557, 8367, 12331, 7, 8367, 11, 11454, 11, 5772, 62, 3672, 8, 198, 220, 220, 220, 611, 2116, 13, 31448, 25, 198, 220, 220, 220, 220, 220, 11454, 796, 2116, 13, 31448, 7, 8367, 8, 198, 220, 220, 220, 220, 220, 611, 11454, 318, 407, 6407, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 8367, 12331, 7, 8367, 11, 11454, 11, 5772, 62, 3672, 8, 198, 220, 220, 220, 1441, 6407, 628, 220, 825, 4808, 12102, 378, 7, 944, 11, 1988, 11, 21136, 62, 9122, 28, 25101, 2599, 198, 220, 220, 220, 37227, 8229, 4049, 3275, 611, 262, 1988, 318, 407, 4938, 37227, 198, 220, 220, 220, 1441, 6407, 628, 220, 825, 1100, 7, 944, 11, 11241, 11, 11507, 5376, 11639, 27, 20035, 29, 6, 2599, 198, 220, 220, 220, 37227, 26981, 279, 4464, 945, 278, 11241, 284, 257, 31031, 1988, 37227, 198, 220, 220, 220, 2116, 13, 12102, 378, 7, 2100, 8, 198, 220, 220, 220, 1441, 1188, 628, 220, 825, 10385, 7, 944, 11, 1988, 2599, 198, 220, 220, 220, 37227, 38240, 257, 1988, 422, 2836, 284, 257, 366, 66, 8825, 605, 1296, 1, 37227, 198, 220, 220, 220, 1441, 1988, 628, 220, 825, 22465, 7, 944, 11, 3038, 2599, 198, 220, 220, 220, 37227, 2773, 3858, 460, 751, 6608, 284, 262, 3689, 326, 423, 198, 220, 220, 220, 262, 2099, 11, 304, 13, 70, 13, 766, 45835, 13, 268, 7527, 11, 543, 6673, 262, 2694, 284, 198, 220, 220, 220, 1895, 262, 3709, 286, 262, 8379, 1262, 17635, 37227, 198, 220, 220, 220, 1208, 198, 198, 4871, 791, 32696, 7, 14881, 6030, 2599, 198, 220, 37227, 791, 32696, 18253, 357, 22570, 318, 1744, 8, 37227, 628, 220, 4808, 4546, 3876, 796, 6330, 62, 11186, 354, 945, 7, 381, 66, 13, 41433, 737, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 600, 7, 87, 58, 15, 60, 4008, 628, 220, 299, 32152, 62, 4906, 796, 493, 198, 198, 3118, 32696, 13, 40, 796, 791, 32696, 3419, 198, 198, 4871, 34142, 7, 14881, 6030, 2599, 198, 220, 37227, 36215, 18253, 37227, 628, 220, 4808, 4546, 3876, 796, 6330, 62, 11186, 354, 945, 7, 381, 66, 13, 32696, 62, 41433, 737, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 600, 7, 87, 58, 15, 60, 4008, 628, 220, 299, 32152, 62, 4906, 796, 493, 198, 198, 46541, 13, 40, 796, 34142, 3419, 198, 198, 4871, 347, 970, 7, 14881, 6030, 2599, 198, 220, 37227, 317, 20512, 2099, 11, 3025, 1988, 318, 7997, 416, 257, 3850, 357, 51, 393, 376, 8, 37227, 198, 220, 4808, 4546, 3876, 796, 357, 381, 13, 35155, 5321, 9218, 4775, 10786, 51, 11537, 930, 9788, 13, 35155, 5321, 9218, 4775, 10786, 37, 11537, 737, 2617, 10044, 325, 12502, 7, 37456, 2124, 25, 2124, 58, 15, 60, 6624, 705, 51, 6, 1267, 628, 220, 299, 32152, 62, 4906, 796, 20512, 198, 198, 33, 970, 13, 40, 796, 347, 970, 3419, 628, 198, 4871, 6416, 7, 14881, 6030, 2599, 198, 220, 37227, 317, 1103, 1988, 37227, 198, 220, 4808, 4546, 3876, 796, 6330, 62, 11186, 354, 945, 7, 381, 66, 13, 69, 17618, 737, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 12178, 7, 87, 58, 15, 60, 4008, 628, 220, 299, 32152, 62, 4906, 796, 12178, 198, 198, 15633, 13, 40, 796, 6416, 3419, 198, 198, 4871, 7536, 7, 14881, 6030, 2599, 198, 220, 37227, 317, 3128, 1988, 286, 262, 1296, 705, 16458, 13, 12038, 13, 26314, 26314, 6, 37227, 628, 220, 4808, 4546, 3876, 796, 9788, 13, 3041, 25636, 7, 81, 6, 7, 30, 47, 27, 67, 29, 59, 67, 90, 17, 92, 737, 7, 30, 47, 27, 76, 29, 59, 67, 90, 17, 92, 737, 7, 30, 47, 27, 88, 29, 59, 67, 90, 19, 30072, 27691, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 4818, 8079, 13, 4475, 7, 600, 7, 87, 17816, 88, 20520, 828, 493, 7, 87, 17816, 76, 20520, 828, 493, 7, 87, 17816, 67, 20520, 22305, 198, 198, 10430, 13, 40, 796, 7536, 3419, 628, 198, 4871, 7308, 15633, 3152, 3118, 896, 7, 14881, 6030, 2599, 198, 220, 37227, 383, 2779, 1398, 329, 12178, 1988, 11, 543, 460, 423, 4991, 24443, 13, 198, 220, 220, 220, 220, 220, 383, 1988, 318, 11513, 6338, 284, 262, 2779, 4991, 13, 198, 220, 37227, 628, 220, 23491, 62, 23870, 796, 23884, 198, 220, 37227, 317, 23491, 329, 4991, 318, 39986, 37227, 628, 220, 299, 32152, 62, 4906, 796, 12178, 198, 198, 4871, 6416, 3152, 3118, 896, 7, 14881, 15633, 3152, 3118, 896, 2599, 198, 220, 37227, 317, 12178, 1988, 351, 2836, 12, 23211, 4991, 37227, 198, 198, 4871, 6682, 7, 14881, 15633, 3152, 3118, 896, 2599, 198, 220, 37227, 383, 23491, 2099, 329, 2568, 13, 383, 4277, 4991, 389, 371, 5173, 3900, 11, 530, 460, 11986, 304, 53, 13, 37227, 628, 220, 4991, 796, 1391, 198, 220, 220, 220, 220, 220, 705, 46987, 6, 1058, 352, 1539, 198, 220, 220, 220, 220, 220, 705, 68, 53, 6, 1058, 352, 13, 1220, 371, 5173, 3900, 11, 198, 220, 220, 220, 220, 220, 6045, 1058, 352, 1539, 198, 220, 1782, 198, 220, 37227, 383, 3142, 4991, 290, 511, 11315, 5087, 37227, 198, 198, 28925, 13, 40, 796, 6682, 3419, 198, 198, 4871, 7308, 10100, 7, 14881, 6030, 2599, 198, 220, 37227, 7308, 2099, 329, 4731, 23491, 3858, 37227, 198, 198, 4871, 10903, 7, 14881, 10100, 2599, 198, 220, 37227, 2329, 257, 4731, 357, 19419, 13216, 43076, 290, 1178, 2041, 34534, 8, 37227, 198, 220, 4808, 4546, 3876, 796, 9678, 7, 381, 13, 4798, 2977, 11, 1069, 9152, 1925, 945, 28, 1600, 26, 90, 92, 11074, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 87, 58, 15, 12962, 198, 10100, 13, 40, 796, 10903, 3419, 198, 198, 4871, 1195, 10100, 7, 14881, 10100, 2599, 198, 220, 37227, 15467, 257, 10947, 4731, 11, 393, 655, 257, 1573, 357, 19419, 13216, 43076, 393, 2041, 34534, 8, 37227, 198, 220, 4808, 4546, 3876, 796, 357, 381, 13, 26449, 7, 381, 13, 4798, 2977, 11, 19607, 1925, 945, 28, 1600, 26, 90, 92, 4943, 393, 9788, 13, 4507, 5191, 10100, 7203, 6, 4943, 737, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 87, 58, 15, 12962, 198, 198, 48, 10100, 13, 40, 796, 10903, 3419, 198, 198, 4871, 6910, 10100, 7, 14881, 10100, 2599, 198, 220, 37227, 317, 4731, 11, 326, 2753, 477, 510, 284, 262, 886, 286, 262, 1627, 37227, 198, 220, 4808, 4546, 3876, 796, 9788, 13, 50232, 2514, 7, 381, 13, 13949, 12915, 3419, 930, 9788, 13, 10100, 12915, 28955, 198, 198, 13949, 10100, 13, 40, 796, 6910, 10100, 3419, 198, 198, 4871, 7383, 4775, 7, 14881, 6030, 2599, 198, 220, 37227, 198, 220, 317, 1988, 11, 326, 460, 1011, 3815, 422, 262, 2747, 18156, 900, 286, 13042, 13, 198, 220, 37227, 198, 198, 4299, 2896, 9218, 4775, 7, 12286, 11, 1635, 847, 82, 11, 12429, 46265, 22046, 2599, 198, 220, 37227, 198, 220, 317, 1988, 11, 326, 460, 1011, 3815, 422, 262, 2747, 18156, 900, 286, 13042, 11, 262, 717, 530, 318, 262, 4277, 1988, 13, 198, 220, 37227, 198, 220, 1441, 7383, 4775, 7, 12286, 11, 1635, 847, 82, 11, 4277, 62, 8367, 28, 12286, 11, 12429, 46265, 22046, 8, 628, 198, 4871, 19762, 7, 14881, 6030, 2599, 198, 220, 37227, 198, 220, 317, 25131, 1988, 11, 543, 318, 6407, 11, 611, 257, 1438, 286, 262, 1988, 3568, 287, 262, 5128, 2393, 13, 198, 220, 37227, 628, 220, 4808, 4546, 3876, 796, 9788, 13, 40613, 22446, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 6407, 8, 198, 198, 34227, 13, 40, 796, 19762, 3419, 198, 198, 11265, 1096, 62, 4906, 62, 8899, 796, 1391, 198, 220, 220, 220, 45941, 13, 600, 2414, 1058, 493, 11, 198, 220, 220, 220, 45941, 13, 22468, 2414, 25, 12178, 11, 198, 220, 220, 220, 45941, 13, 30388, 62, 25, 20512, 198, 92, 198, 37811, 337, 5912, 286, 5559, 3858, 284, 262, 705, 49883, 605, 3392, 4458, 37227, 198, 198, 4299, 3487, 1096, 62, 4906, 7, 4906, 2599, 198, 220, 220, 220, 37227, 8229, 262, 705, 49883, 605, 2099, 6, 329, 257, 1813, 2099, 628, 220, 220, 220, 314, 13, 68, 13, 340, 8739, 299, 32152, 5387, 3858, 284, 3210, 21015, 3392, 628, 220, 220, 220, 10412, 395, 25, 198, 220, 220, 220, 13163, 3487, 1096, 62, 4906, 7, 37659, 13, 600, 2414, 8, 198, 220, 220, 220, 1279, 4871, 705, 600, 44167, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 3487, 1096, 62, 4906, 62, 8899, 13, 1136, 7, 4906, 11, 2099, 8, 198, 198, 4906, 62, 6738, 62, 4906, 62, 8899, 796, 14230, 1068, 35, 713, 26933, 198, 220, 220, 220, 357, 22468, 11, 6416, 13, 40, 828, 198, 220, 220, 220, 357, 600, 220, 837, 34142, 13, 40, 828, 198, 220, 220, 220, 357, 30388, 11, 220, 347, 970, 13, 40, 828, 198, 220, 220, 220, 357, 2536, 220, 837, 10903, 13, 40, 15437, 198, 8, 198, 37811, 383, 3210, 23491, 62, 19199, 329, 21015, 3858, 13, 198, 198, 464, 1988, 2099, 460, 307, 1813, 416, 257, 3210, 21015, 2099, 11, 428, 3975, 8739, 262, 198, 29412, 2099, 329, 262, 5035, 23491, 62, 4906, 1398, 13, 198, 37811, 198, 198, 4299, 5794, 62, 1640, 62, 4906, 7, 18982, 11, 2099, 2599, 198, 220, 37227, 198, 220, 16409, 262, 5794, 5035, 284, 262, 1813, 2099, 628, 220, 40117, 198, 220, 24200, 438, 198, 220, 5794, 25, 965, 393, 8633, 198, 220, 220, 220, 1002, 340, 318, 965, 11, 655, 1441, 340, 13, 198, 220, 220, 220, 360, 713, 815, 468, 262, 1296, 1391, 2099, 1058, 5794, 62, 1640, 62, 1169, 62, 4906, 1782, 1343, 1391, 6045, 1058, 4277, 62, 18982, 1782, 198, 220, 37227, 198, 220, 611, 318, 39098, 7, 18982, 11, 8633, 2599, 198, 220, 220, 220, 220, 611, 2099, 287, 5794, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 5794, 58, 4906, 60, 198, 220, 220, 220, 220, 1441, 5794, 58, 14202, 60, 198, 220, 1441, 5794, 198, 198, 4299, 2099, 62, 6738, 62, 4906, 7, 4906, 11, 5794, 11639, 3256, 5794, 62, 439, 28, 25101, 2599, 198, 220, 37227, 37571, 290, 1441, 262, 23491, 5002, 357, 14881, 6030, 1398, 15350, 265, 429, 8, 422, 257, 21015, 2099, 13, 412, 13, 70, 13, 493, 5218, 34142, 13, 628, 220, 220, 220, 220, 220, 383, 1813, 5794, 460, 307, 42976, 900, 284, 262, 4504, 23491, 5002, 13, 628, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 2099, 25, 317, 21015, 2099, 393, 31783, 198, 220, 220, 220, 220, 220, 220, 220, 317, 2099, 284, 307, 11513, 284, 257, 23491, 2099, 357, 14881, 6030, 1398, 45923, 8, 628, 220, 220, 220, 220, 220, 5794, 25, 965, 393, 8633, 198, 220, 220, 220, 220, 220, 220, 220, 383, 5794, 284, 307, 5625, 284, 262, 7186, 1398, 13, 1002, 8633, 318, 1813, 11, 766, 705, 18982, 62, 1640, 62, 4906, 6, 198, 220, 220, 220, 220, 220, 220, 220, 329, 262, 835, 703, 262, 5794, 318, 5295, 628, 220, 220, 220, 220, 220, 5794, 62, 439, 25, 25131, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 10352, 357, 12286, 828, 262, 5794, 318, 407, 5625, 11, 611, 4554, 286, 31783, 318, 1813, 355, 198, 220, 220, 220, 220, 220, 220, 220, 262, 2099, 11507, 13, 15323, 11, 257, 4866, 286, 262, 5128, 2099, 351, 262, 5625, 5794, 318, 4504, 198, 220, 37227, 198, 220, 611, 318, 39098, 7, 4906, 11, 21059, 540, 8, 290, 2099, 287, 2099, 62, 6738, 62, 4906, 62, 8899, 25, 198, 220, 220, 220, 2099, 796, 3487, 1096, 62, 4906, 7, 4906, 8, 198, 220, 220, 220, 5794, 796, 5794, 62, 1640, 62, 4906, 7, 18982, 11, 2099, 8, 198, 220, 220, 220, 2099, 796, 2099, 62, 6738, 62, 4906, 62, 8899, 58, 4906, 60, 198, 220, 220, 220, 611, 5794, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 796, 2099, 13, 30073, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2099, 13, 18982, 796, 5794, 198, 220, 220, 220, 1441, 2099, 198, 220, 1288, 361, 5794, 62, 439, 25, 198, 220, 220, 220, 2099, 796, 2099, 13, 30073, 3419, 198, 220, 220, 220, 2099, 13, 18982, 796, 5794, 62, 1640, 62, 4906, 7, 18982, 11, 3487, 1096, 62, 4906, 7, 4906, 13, 77, 32152, 62, 4906, 4008, 198, 220, 1441, 2099, 628, 198, 4871, 15690, 7, 14881, 6030, 2599, 198, 220, 37227, 317, 357, 77, 32152, 8, 7177, 286, 3815, 286, 530, 2099, 37227, 628, 220, 46728, 2676, 28, 12256, 10786, 3467, 83, 27691, 18608, 601, 3419, 198, 220, 46728, 2676, 62, 2536, 796, 705, 705, 628, 198, 4871, 5345, 5189, 7, 19182, 2599, 198, 220, 37227, 5345, 286, 3815, 286, 262, 976, 2099, 13, 412, 13, 70, 13, 1391, 16, 11, 17, 11, 18, 92, 37227, 628, 220, 46728, 2676, 796, 9788, 13, 15979, 601, 7, 381, 13, 43, 270, 1691, 7, 3256, 11537, 930, 9788, 13, 43, 270, 1691, 10786, 26, 11537, 930, 2635, 10786, 3467, 83, 11537, 737, 2617, 5376, 10786, 58, 11, 26, 2361, 11537, 198, 220, 46728, 2676, 62, 2536, 796, 705, 4032, 198, 198, 4906, 62, 6738, 62, 2617, 62, 8899, 796, 14230, 1068, 35, 713, 26933, 198, 220, 220, 220, 357, 22468, 11, 5345, 5189, 7, 22468, 36911, 198, 220, 220, 220, 357, 600, 220, 837, 5345, 5189, 7, 600, 36911, 198, 12962, 198, 37811, 9347, 262, 21015, 2099, 286, 257, 4947, 2888, 284, 257, 23491, 2099, 286, 262, 4947, 13, 198, 198, 10049, 40091, 3858, 389, 2938, 11, 766, 1058, 76, 2788, 25, 63, 589, 17, 34975, 28747, 81, 13, 11321, 13, 4546, 3876, 62, 19199, 13, 11265, 1096, 62, 4906, 63, 198, 37811, 198, 198, 4299, 2099, 62, 6738, 62, 8367, 7, 8367, 2599, 198, 220, 37227, 402, 947, 262, 23491, 2099, 422, 257, 21015, 1988, 13, 628, 220, 11485, 4598, 310, 395, 3712, 198, 220, 13163, 2099, 62, 6738, 62, 8367, 7, 17, 8, 198, 220, 1279, 46541, 29, 628, 220, 13163, 2099, 62, 6738, 62, 8367, 7, 17, 13, 15, 8, 198, 220, 1279, 15633, 29, 198, 220, 37227, 198, 220, 611, 318, 39098, 7, 8367, 11, 357, 4868, 11, 45941, 13, 358, 18747, 8, 2599, 198, 220, 220, 220, 220, 1441, 2099, 62, 6738, 62, 2617, 62, 8899, 58, 11265, 1096, 62, 4906, 7, 8367, 58, 15, 4083, 834, 4871, 834, 15437, 611, 18896, 7, 8367, 8, 2073, 34142, 13, 40, 198, 220, 611, 318, 39098, 7, 8367, 11, 965, 2599, 198, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10903, 13557, 4546, 3876, 13, 29572, 10100, 7, 8367, 11, 6407, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 10903, 13, 40, 198, 220, 220, 220, 220, 2845, 35528, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1195, 10100, 13, 40, 198, 220, 2099, 796, 2099, 62, 6738, 62, 4906, 7, 8367, 13, 834, 4871, 834, 8, 198, 220, 611, 2099, 318, 1988, 13, 834, 4871, 834, 25, 198, 220, 220, 220, 220, 5298, 11052, 12331, 10786, 34, 34574, 5004, 23491, 2099, 422, 1988, 1391, 8367, 92, 11537, 198, 220, 1441, 2099, 13, 834, 4871, 834, 7, 12286, 62, 8367, 796, 1988, 8, 198, 198, 4299, 2099, 62, 6738, 62, 12286, 62, 8367, 7, 8367, 11, 5794, 11639, 3256, 5794, 62, 439, 28, 25101, 2599, 198, 220, 220, 37227, 37571, 262, 23491, 2099, 422, 257, 1988, 11, 326, 481, 1716, 262, 4277, 1988, 286, 262, 23491, 2099, 13, 628, 220, 220, 632, 468, 284, 2251, 257, 649, 2134, 4554, 11, 355, 340, 468, 284, 900, 262, 4277, 198, 220, 220, 1988, 3119, 286, 262, 4504, 2134, 13, 1052, 357, 22915, 8, 5794, 460, 307, 5625, 284, 262, 198, 220, 220, 7186, 23491, 2099, 628, 220, 220, 20159, 3876, 3858, 3804, 355, 3858, 389, 1364, 355, 318, 11, 4556, 5794, 62, 439, 6056, 318, 900, 13, 198, 220, 220, 37227, 198, 220, 220, 611, 10104, 13, 271, 4871, 7, 8367, 8, 393, 318, 39098, 7, 8367, 11, 31783, 2599, 198, 220, 220, 220, 220, 220, 1441, 2099, 62, 6738, 62, 4906, 7, 8367, 11, 5794, 28, 18982, 11, 5794, 62, 439, 28, 18982, 62, 439, 8, 198, 220, 220, 279, 4906, 796, 3487, 1096, 62, 4906, 7, 8367, 13, 834, 4871, 834, 8, 198, 220, 220, 308, 4906, 796, 2099, 62, 6738, 62, 4906, 7, 8367, 13, 834, 4871, 834, 737, 834, 4871, 834, 198, 220, 220, 1441, 308, 4906, 7, 12286, 62, 8367, 796, 1988, 11, 5794, 28, 18982, 62, 1640, 62, 4906, 7, 18982, 11, 279, 4906, 4008, 198, 198, 4871, 7308, 44, 2966, 7, 14881, 6030, 2599, 198, 220, 37227, 198, 220, 317, 15304, 2099, 532, 340, 460, 1745, 366, 49459, 1911, 198, 220, 37227, 628, 220, 2099, 796, 6045, 198, 220, 37227, 383, 3858, 11, 326, 262, 1988, 460, 1745, 13, 1675, 307, 2266, 18156, 287, 262, 25321, 13, 37227, 628, 220, 4731, 62, 4906, 796, 6045, 198, 220, 37227, 5994, 286, 4731, 23491, 62, 4906, 284, 307, 973, 13, 220, 1675, 307, 2266, 18156, 287, 262, 25321, 13, 37227, 628, 220, 2488, 4871, 24396, 628, 220, 825, 651, 62, 4906, 7, 944, 11, 1988, 2599, 198, 220, 220, 220, 220, 220, 37227, 8229, 262, 2099, 286, 262, 1988, 37227, 198, 220, 220, 220, 220, 220, 1441, 2116, 13, 8841, 62, 4906, 611, 318, 39098, 7, 8367, 11, 965, 8, 2073, 2099, 62, 6738, 62, 8367, 7, 8367, 8, 628, 198, 4871, 35250, 7, 14881, 44, 2966, 2599, 198, 220, 37227, 317, 15304, 1988, 284, 307, 973, 287, 5128, 3696, 357, 259, 6439, 532, 2183, 532, 3689, 8, 37227, 628, 220, 4731, 62, 4906, 796, 1195, 10100, 13, 40, 198, 220, 37227, 23412, 3696, 779, 10947, 13042, 13, 37227, 628, 220, 3858, 796, 685, 198, 220, 220, 220, 220, 220, 6682, 13, 40, 11, 198, 220, 220, 220, 220, 220, 6416, 13, 40, 11, 198, 220, 220, 220, 220, 220, 34142, 13, 40, 11, 198, 220, 220, 220, 220, 220, 2099, 62, 6738, 62, 2617, 62, 8899, 58, 600, 4357, 198, 220, 220, 220, 220, 220, 2099, 62, 6738, 62, 2617, 62, 8899, 58, 22468, 4357, 198, 220, 220, 220, 220, 220, 1195, 10100, 13, 40, 11, 198, 220, 220, 220, 220, 220, 19762, 13, 40, 11, 198, 220, 2361, 198, 198, 44, 2966, 13, 40, 796, 35250, 3419, 198, 198, 4871, 6902, 44, 2966, 7, 14881, 44, 2966, 2599, 198, 220, 37227, 317, 15304, 1988, 284, 307, 973, 287, 2785, 3696, 357, 259, 6439, 532, 2183, 532, 3689, 8, 37227, 628, 220, 4731, 62, 4906, 796, 6910, 10100, 13, 40, 198, 220, 37227, 32480, 3696, 779, 1627, 13042, 13, 37227, 628, 220, 3858, 796, 685, 198, 220, 220, 220, 220, 220, 6682, 13, 40, 11, 198, 220, 220, 220, 220, 220, 6416, 13, 40, 11, 198, 220, 220, 220, 220, 220, 34142, 13, 40, 11, 198, 220, 220, 220, 220, 220, 347, 970, 13, 40, 11, 198, 220, 220, 220, 220, 220, 2099, 62, 6738, 62, 2617, 62, 8899, 58, 600, 4357, 198, 220, 220, 220, 220, 220, 2099, 62, 6738, 62, 2617, 62, 8899, 58, 22468, 4357, 198, 220, 220, 220, 220, 220, 6910, 10100, 13, 40, 11, 198, 220, 2361, 198, 198, 25396, 44, 2966, 13, 40, 796, 6902, 44, 2966, 3419, 628, 198, 4871, 8621, 283, 1352, 7, 14881, 6030, 2599, 198, 220, 37227, 6093, 1398, 329, 7559, 2466, 15506, 2880, 1352, 2641, 257, 2665, 37227, 628, 220, 4808, 4546, 3876, 796, 2880, 1352, 62, 4546, 3876, 13, 30073, 22446, 2617, 10044, 325, 12502, 7, 50033, 2124, 25, 685, 14202, 12962, 198, 220, 468, 62, 8367, 796, 10352, 198, 198, 19117, 283, 1352, 13, 40, 796, 8621, 283, 1352, 3419, 198, 198, 4871, 45835, 7, 14881, 6030, 2599, 198, 220, 37227, 317, 8379, 286, 3815, 286, 1813, 3858, 37227, 628, 198, 4871, 8655, 7, 14881, 6030, 2599, 198, 220, 37227, 198, 220, 8655, 11, 3038, 3400, 351, 3706, 15180, 11, 304, 13, 70, 13, 628, 220, 220, 220, 7904, 5239, 628, 220, 220, 220, 220, 220, 18248, 220, 220, 220, 220, 314, 31688, 48, 220, 220, 220, 220, 220, 220, 8959, 48, 220, 220, 220, 220, 220, 220, 8005, 48, 220, 7283, 46, 48, 220, 39962, 198, 220, 220, 220, 220, 220, 220, 352, 220, 220, 220, 220, 220, 220, 220, 220, 352, 220, 220, 220, 220, 220, 220, 220, 220, 352, 220, 220, 220, 220, 220, 220, 220, 220, 352, 220, 220, 220, 220, 352, 352, 13, 830, 198, 220, 220, 220, 220, 220, 220, 362, 220, 220, 220, 220, 220, 220, 220, 220, 362, 220, 220, 220, 220, 220, 220, 220, 220, 362, 220, 220, 220, 220, 220, 220, 220, 220, 352, 220, 220, 220, 220, 362, 352, 13, 830, 628, 220, 37227, 628, 220, 1438, 62, 259, 62, 4546, 3876, 796, 10352, 628, 220, 2488, 66, 2317, 62, 26745, 628, 220, 825, 6632, 62, 7890, 7, 944, 11, 4129, 2599, 198, 220, 220, 220, 220, 220, 37227, 8229, 7177, 286, 1976, 27498, 351, 262, 1813, 1271, 286, 15274, 290, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 262, 288, 4906, 286, 262, 3084, 198, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 288, 4906, 796, 2116, 13, 77, 32152, 62, 4906, 198, 220, 220, 220, 220, 220, 611, 318, 39098, 7, 67, 4906, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 45941, 13, 9107, 418, 7, 13664, 11, 288, 4906, 8, 198, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 45941, 13, 9107, 418, 19510, 13664, 11, 2116, 13, 17618, 62, 1659, 62, 26000, 4182, 82, 3419, 828, 288, 4906, 8, 198, 198, 41433, 796, 34142, 13, 40, 198, 37811, 317, 3210, 4488, 18253, 23491, 2099, 4554, 37227, 198, 43375, 796, 791, 32696, 13, 40, 198, 37811, 317, 3210, 22165, 18253, 23491, 2099, 4554, 37227, 198, 2127, 21052, 796, 347, 970, 13, 40, 198, 37811, 317, 3210, 20512, 23491, 2099, 4554, 357, 1640, 2785, 3696, 8, 37227, 198, 32109, 796, 19762, 13, 40, 198, 37811, 317, 3210, 20512, 23491, 2099, 4554, 357, 1640, 5128, 3696, 8, 37227, 198, 5305, 796, 6416, 13, 40, 198, 37811, 317, 3210, 1103, 23491, 2099, 4554, 37227, 198, 8841, 796, 10903, 13, 40, 198, 37811, 317, 3210, 4731, 23491, 2099, 4554, 37227, 198, 80, 8841, 796, 1195, 10100, 13, 40, 198, 37811, 317, 3210, 10947, 4731, 23491, 2099, 4554, 357, 1640, 5128, 3696, 8, 37227, 198, 1370, 62, 8841, 796, 6910, 10100, 13, 40, 198, 37811, 317, 3210, 1627, 4731, 23491, 2099, 4554, 357, 1640, 2785, 3696, 8, 37227, 198, 76, 2966, 796, 35250, 13, 40, 198, 37811, 317, 3210, 15304, 23491, 2099, 4554, 357, 1640, 5128, 3696, 8, 37227, 198, 13059, 62, 76, 2966, 796, 6902, 44, 2966, 13, 40, 198, 37811, 317, 3210, 15304, 23491, 2099, 4554, 357, 1640, 2785, 3696, 8, 37227, 198, 25512, 1352, 796, 8621, 283, 1352, 13, 40, 198, 37811, 317, 3210, 2880, 1352, 1627, 23491, 2099, 4554, 357, 1640, 2785, 3696, 8, 37227, 198, 22554, 796, 6682, 13, 40, 198, 37811, 317, 3210, 2568, 12178, 1988, 2099, 4554, 357, 1640, 2785, 3696, 8, 37227, 198, 198, 22866, 13, 834, 37023, 834, 7, 14202, 11, 6045, 11, 6045, 8, 198, 12381, 4732, 198 ]
2.892804
6,045
import re import os def setup_poetry(config): """Entry point of module: setup poetry files and run poetry commands""" update_pyproject_dot_toml(config) #lock_poetry_dependencies() #install_dependencies() def lock_poetry_dependencies_on_docker(): """Create poetry.lock file""" os.system("docker-compose exec web poetry lock") def install_dependencies(): """Install package dependencies""" os.system("poetry install")
[ 11748, 302, 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 4299, 9058, 62, 7501, 11973, 7, 11250, 2599, 201, 198, 220, 220, 220, 37227, 30150, 966, 286, 8265, 25, 9058, 19518, 3696, 290, 1057, 19518, 9729, 37811, 201, 198, 220, 220, 220, 4296, 62, 9078, 16302, 62, 26518, 62, 39532, 75, 7, 11250, 8, 201, 198, 220, 220, 220, 1303, 5354, 62, 7501, 11973, 62, 45841, 3976, 3419, 201, 198, 220, 220, 220, 1303, 17350, 62, 45841, 3976, 3419, 201, 198, 201, 198, 201, 198, 4299, 5793, 62, 7501, 11973, 62, 45841, 3976, 62, 261, 62, 45986, 33529, 201, 198, 220, 220, 220, 37227, 16447, 19518, 13, 5354, 2393, 37811, 201, 198, 220, 220, 220, 28686, 13, 10057, 7203, 45986, 12, 785, 3455, 2452, 3992, 19518, 5793, 4943, 201, 198, 201, 198, 201, 198, 4299, 2721, 62, 45841, 3976, 33529, 201, 198, 220, 220, 220, 37227, 15798, 5301, 20086, 37811, 201, 198, 220, 220, 220, 28686, 13, 10057, 7203, 7501, 11973, 2721, 4943, 201, 198, 201, 198 ]
2.810651
169
from typing import List
[ 6738, 19720, 1330, 7343, 628 ]
5
5
from .breed_serializer import BreedSerializer from .dog_serializer import DogSerializer from .user_serializer import UserSerializer from .role_serializer import RoleSerializer from .person_serializer import PersonSerializer from .custom_token_serializer import CustomTokenSerializer
[ 6738, 764, 4679, 276, 62, 46911, 7509, 1330, 45958, 32634, 7509, 198, 6738, 764, 9703, 62, 46911, 7509, 1330, 8532, 32634, 7509, 198, 6738, 764, 7220, 62, 46911, 7509, 1330, 11787, 32634, 7509, 198, 6738, 764, 18090, 62, 46911, 7509, 1330, 20934, 32634, 7509, 198, 6738, 764, 6259, 62, 46911, 7509, 1330, 7755, 32634, 7509, 198, 6738, 764, 23144, 62, 30001, 62, 46911, 7509, 1330, 8562, 30642, 32634, 7509 ]
4.086957
69
# Copyright 2021 Rufaim (https://github.com/Rufaim) # # 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 numpy as np import matplotlib.pyplot as pyplot def plot_graph_edges(graph,edge_output, sort_indexes,title=None,savefile=None): """Plot edges for a given graph assuming certain order of nodes.""" sort_indexes = np.squeeze(sort_indexes).astype(np.int) fig = pyplot.figure(figsize=(4, 4)) ax = fig.add_subplot(1, 1, 1) nd = graph.get_num_nodes() probs = np.zeros((nd, nd)) for s, r, ef in zip(graph.senders.numpy(), graph.receivers.numpy(), edge_output): probs[s, r] = ef ax.matshow(probs[sort_indexes][:, sort_indexes], cmap="viridis") ax.grid(False) ax.set_axis_off() if title is not None: ax.set_title(title) if savefile is not None: fig.savefig(savefile,dpi=150) pyplot.close(fig)
[ 2, 15069, 33448, 371, 3046, 1385, 357, 5450, 1378, 12567, 13, 785, 14, 49, 3046, 1385, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 220, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 12972, 29487, 628, 198, 198, 4299, 7110, 62, 34960, 62, 276, 3212, 7, 34960, 11, 14907, 62, 22915, 11, 3297, 62, 9630, 274, 11, 7839, 28, 14202, 11, 21928, 7753, 28, 14202, 2599, 198, 220, 220, 220, 37227, 43328, 13015, 329, 257, 1813, 4823, 13148, 1728, 1502, 286, 13760, 526, 15931, 198, 220, 220, 220, 3297, 62, 9630, 274, 796, 45941, 13, 16485, 1453, 2736, 7, 30619, 62, 9630, 274, 737, 459, 2981, 7, 37659, 13, 600, 8, 198, 220, 220, 220, 2336, 796, 12972, 29487, 13, 26875, 7, 5647, 7857, 16193, 19, 11, 604, 4008, 198, 220, 220, 220, 7877, 796, 2336, 13, 2860, 62, 7266, 29487, 7, 16, 11, 352, 11, 352, 8, 628, 220, 220, 220, 299, 67, 796, 4823, 13, 1136, 62, 22510, 62, 77, 4147, 3419, 198, 220, 220, 220, 386, 1443, 796, 45941, 13, 9107, 418, 19510, 358, 11, 299, 67, 4008, 198, 220, 220, 220, 329, 264, 11, 374, 11, 304, 69, 287, 19974, 7, 34960, 13, 82, 7338, 13, 77, 32152, 22784, 4823, 13, 260, 344, 1191, 13, 77, 32152, 22784, 5743, 62, 22915, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 386, 1443, 58, 82, 11, 374, 60, 796, 304, 69, 198, 220, 220, 220, 7877, 13, 76, 1381, 4919, 7, 1676, 1443, 58, 30619, 62, 9630, 274, 7131, 45299, 3297, 62, 9630, 274, 4357, 269, 8899, 2625, 37040, 29207, 4943, 198, 220, 220, 220, 7877, 13, 25928, 7, 25101, 8, 198, 220, 220, 220, 7877, 13, 2617, 62, 22704, 62, 2364, 3419, 198, 220, 220, 220, 611, 3670, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 13, 2617, 62, 7839, 7, 7839, 8, 198, 220, 220, 220, 611, 3613, 7753, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2336, 13, 21928, 5647, 7, 21928, 7753, 11, 67, 14415, 28, 8628, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12972, 29487, 13, 19836, 7, 5647, 8, 198 ]
2.733068
502
#!/usr/bin/env python import pipe ES_HOST = {"host" : "localhost", "port" : 9200} INDEX_NAME = 'view' TYPE_NAME = 'docs' N = 1000 from pyhocon import ConfigFactory from elasticsearch import Elasticsearch import json import sys conf = ConfigFactory.parse_file('../view.conf') docs_conf = conf.get('view.docs') es = Elasticsearch(hosts = [ES_HOST]) index_docs()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 12656, 198, 198, 1546, 62, 39, 10892, 796, 19779, 4774, 1, 1058, 366, 36750, 1600, 366, 634, 1, 1058, 860, 2167, 92, 198, 12115, 6369, 62, 20608, 796, 705, 1177, 6, 198, 25216, 62, 20608, 796, 705, 31628, 6, 198, 45, 796, 8576, 198, 198, 6738, 12972, 71, 36221, 1330, 17056, 22810, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 10414, 796, 17056, 22810, 13, 29572, 62, 7753, 10786, 40720, 1177, 13, 10414, 11537, 198, 198, 31628, 62, 10414, 796, 1013, 13, 1136, 10786, 1177, 13, 31628, 11537, 198, 198, 274, 796, 48567, 12947, 7, 4774, 82, 796, 685, 1546, 62, 39, 10892, 12962, 198, 198, 9630, 62, 31628, 3419, 198 ]
2.844961
129
from typing import List from boa3.builtin import public @public @public
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 1489, 64, 18, 13, 18780, 259, 1330, 1171, 628, 198, 31, 11377, 628, 198, 31, 11377, 198 ]
3.208333
24