content
stringlengths
1
1.04M
input_ids
sequencelengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" Reverse Polish Notation(RPN) is a mathematical notation where every operator follows all of its operands. For instance, to add three and four, one would write "3 4 +" rather than "3 + 4". If there are multiple operations, the operator is given immediately after its second operand; so the expression written "3 ? 4 + 5" would be written "3 4 ? 5 +" first subtract 4 from 3, then add 5 to that. Transform the algebraic expression with brackets into RPN form. You can assume that for the test cases below only single letters will be used, brackets [ ] will not be used and each expression has only one RPN form (no expressions like abc) Test Input: (a+(b*c)) ((a+b)*(z+x)) ((a+t)*((b+(a+c))^(c+d))) Test Output: abc*+ ab+zx+* at+bac++cd+ ^ * """ import re inp = '((a+t)*((b+(a+c))^(c+d)))' print(inp) parenth = re.compile(r"(?<=\()[^()]*(?=\))", re.DOTALL) symbol = re.compile(r"[+\-*/^](?=\w)", re.DOTALL) while True: # Find expression between two parens without parens inbetween. End loop if not found txt = parenth.search(inp) if txt is None: break # find operator and its location in found expression sym = symbol.search(txt.group()) # rearrange expression new = txt.group()[:sym.span()[0]] + txt.group()[sym.span()[1]:] + sym.group() # update rearranged expression inp = inp[:txt.span()[0]-1] + new + inp[txt.span()[1]+1:] print(inp)
[ 37811, 198, 49, 964, 325, 15945, 1892, 341, 7, 49, 13137, 8, 318, 257, 18069, 33274, 810, 790, 10088, 5679, 477, 286, 663, 1515, 1746, 13, 1114, 4554, 11, 198, 1462, 751, 1115, 290, 1440, 11, 530, 561, 3551, 366, 18, 604, 1343, 1, 2138, 621, 366, 18, 1343, 604, 1911, 1002, 612, 389, 3294, 4560, 11, 262, 10088, 318, 198, 35569, 3393, 706, 663, 1218, 1515, 392, 26, 523, 262, 5408, 3194, 366, 18, 5633, 604, 1343, 642, 1, 561, 307, 3194, 366, 18, 604, 5633, 642, 1343, 1, 717, 198, 7266, 83, 974, 604, 422, 513, 11, 788, 751, 642, 284, 326, 13, 198, 198, 41762, 262, 37139, 291, 5408, 351, 28103, 656, 371, 13137, 1296, 13, 198, 198, 1639, 460, 7048, 326, 329, 262, 1332, 2663, 2174, 691, 2060, 7475, 481, 307, 973, 11, 28103, 685, 2361, 481, 407, 307, 973, 290, 1123, 198, 38011, 468, 691, 530, 371, 13137, 1296, 357, 3919, 14700, 588, 450, 66, 8, 198, 198, 14402, 23412, 25, 198, 7, 64, 33747, 65, 9, 66, 4008, 198, 19510, 64, 10, 65, 27493, 7, 89, 10, 87, 4008, 198, 19510, 64, 10, 83, 27493, 19510, 65, 33747, 64, 10, 66, 4008, 61, 7, 66, 10, 67, 22305, 198, 14402, 25235, 25, 198, 39305, 9, 10, 198, 397, 10, 42592, 10, 9, 198, 265, 10, 65, 330, 4880, 10210, 10, 10563, 1635, 198, 37811, 198, 198, 11748, 302, 198, 198, 259, 79, 796, 705, 19510, 64, 10, 83, 27493, 19510, 65, 33747, 64, 10, 66, 4008, 61, 7, 66, 10, 67, 22305, 6, 198, 198, 4798, 7, 259, 79, 8, 198, 198, 11730, 400, 796, 302, 13, 5589, 576, 7, 81, 18109, 30, 27, 28, 59, 3419, 58, 61, 3419, 60, 9, 7, 30, 28, 59, 4008, 1600, 302, 13, 35, 2394, 7036, 8, 198, 1837, 23650, 796, 302, 13, 5589, 576, 7, 81, 17912, 10, 41441, 16208, 61, 16151, 30, 28, 59, 86, 42501, 302, 13, 35, 2394, 7036, 8, 198, 4514, 6407, 25, 198, 220, 220, 220, 1303, 9938, 5408, 1022, 734, 279, 5757, 82, 1231, 279, 5757, 82, 287, 23395, 13, 5268, 9052, 611, 407, 1043, 198, 220, 220, 220, 256, 742, 796, 279, 5757, 400, 13, 12947, 7, 259, 79, 8, 198, 220, 220, 220, 611, 256, 742, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 628, 220, 220, 220, 1303, 1064, 10088, 290, 663, 4067, 287, 1043, 5408, 198, 220, 220, 220, 5659, 796, 6194, 13, 12947, 7, 14116, 13, 8094, 28955, 628, 220, 220, 220, 1303, 37825, 858, 5408, 198, 220, 220, 220, 649, 796, 256, 742, 13, 8094, 3419, 58, 25, 37047, 13, 12626, 3419, 58, 15, 11907, 1343, 256, 742, 13, 8094, 3419, 58, 37047, 13, 12626, 3419, 58, 16, 5974, 60, 1343, 5659, 13, 8094, 3419, 628, 220, 220, 220, 1303, 4296, 37825, 5102, 5408, 198, 220, 220, 220, 287, 79, 796, 287, 79, 58, 25, 14116, 13, 12626, 3419, 58, 15, 45297, 16, 60, 1343, 649, 1343, 287, 79, 58, 14116, 13, 12626, 3419, 58, 16, 48688, 16, 47715, 198, 220, 220, 220, 3601, 7, 259, 79, 8, 198 ]
2.695568
519
from corehq.util.urlvalidate.urlvalidate import ( PossibleSSRFAttempt, validate_user_input_url, ) from corehq.apps.sms.models import SMSBase from corehq.util.metrics import metrics_counter
[ 6738, 4755, 71, 80, 13, 22602, 13, 6371, 12102, 378, 13, 6371, 12102, 378, 1330, 357, 198, 220, 220, 220, 33671, 5432, 49, 7708, 926, 1791, 11, 198, 220, 220, 220, 26571, 62, 7220, 62, 15414, 62, 6371, 11, 198, 8, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 82, 907, 13, 27530, 1330, 29287, 14881, 198, 198, 6738, 4755, 71, 80, 13, 22602, 13, 4164, 10466, 1330, 20731, 62, 24588, 628 ]
2.739726
73
# Origins Project Choice Lists, Vocabularies, Ontologies # choice lists and vocabularies are defined with the following design template: # variable_label1 = value # variable_labels are lowercase, values can be strings or numbers or codes # variable_label2 = value # CHOICES = ( # (variable_label1, 'string_representation') # (variable_label2, 'string_representation') # The design allows use of the variable_labels in code. Changes to the value applies automatically then in code and # in what is written to database. # Continents of the World africa = 'Africa' antarctica = 'Antarctica' asia = 'Asia' australia = 'Australia' europe = 'Europe' north_america = 'North America' south_america = 'South America' CONTINENT_CHOICES = ( (africa, 'Africa'), (antarctica, 'Antarctica'), (asia, 'Asia'), (australia, 'Australia'), (europe, 'Europe'), (north_america, 'North America'), (south_america, 'South America') ) # Type Specimens Choices # Definitions copied from ICZN online http://code.iczn.org allotype = 'allotype' # A term, not regulated by the Code, for a designated specimen of opposite sex to the holotype cotype = 'cotype' # A term not recognized by the Code, formerly used for either syntype or paratype, but that should # not now be used in zoological nomenclature genotype = 'genotype' # A term not recognized by the Code, formerly used for type species, but that should not # now be used in zoological nomenclature hapanotype = 'hapanotype' # One or more preparations consisting of directly related individuals representing distinct # stages in the life cycle, which together form the name-bearing type in an extant species of protistan. holotype = 'holotype' # The single specimen (except in the case of a hapantotype, q.v.) designated or otherwise fixed # as the name-bearing type of a nominal species or subspecies when the nominal taxon is established. isotype = 'isotype' # A duplicate specimen of the holotype. isosyntype = 'isosyntype' # A duplicate of a syntype. paratype = 'paratype' # A specimen not formally designated as a type but cited along with the type collection in the # original description of a taxon. lectotype = 'lectotype' # A syntype designated as the single name-bearing type specimen subsequent to the establishment # of a nominal species or subspecies neotype = 'neotype' # The single specimen designated as the name-bearing type of a nominal species or subspecies # when there is a need to define the nominal taxon objectively and no name-bearing type is believed to be extant. # If stability and universality are threatened, because an existing name-bearing type is either taxonomically # inadequate or not in accord with the prevailing usage of a name, the Commission may use its plenary power # to set aside that type and designate a neotype. paralectotype = 'paralectotype' # Each specimen of a former syntype series remaining after the designation # of a lectotype syntype = 'syntype' # Each specimen of a type series (q.v.) from which neither a holotype nor a lectotype has # been designated. The syntypes collectively constitute the name-bearing type. topotype = 'topotype' # A term, not regulated by the Code, for a specimen originating from the type locality of the # species or subspecies to which it is thought to belong, whether or not the specimen is part of the type series. # Using a select set of terms recognized by ICZN. TYPE_CHOICES = ( (holotype, 'Holotype'), (paratype, 'Paratype'), (lectotype, 'Lectotype'), (neotype, 'Neotype'), (syntype, 'Syntype'), ) # Nomenclatural Code Choices iczn = 'ICZN' icbn = 'ICBN' NOMENCLATURAL_CODE_CHOICES = ( (iczn, 'ICZN'), (icbn, 'ICBN') ) # Nomenclatural Status Choices valid = 'valid' invalid_gh = 'invalid_gh' # Generic homonym invalid_ga = 'invalid_ga' # Genus nomen nudum before 1931 invalid_gb = 'invalid_gb' # Genus nomen nudum after 1930 invalid_sh = 'invalid_sh' # Specific homonym invalid_sm = 'invalid_sm' # Specific nomen nudum before 1931 invalid_sn = 'invalid_sn' # Specific nomen nudum after 1930 invalid_so = 'invalid_so' # Specific nomen nudum - proposed conditionally suppressed = 'suppressed' # Name suppressed by ICZN decision. NOMENCLATURAL_STATUS_CHOICES = ( (valid, 'Valid'), (invalid_gh, 'Invalid GH'), (invalid_ga, 'Invalid GA'), (invalid_gb, 'Invalid GB'), (invalid_sh, 'Inavlid SH'), (invalid_sm, 'Invalid SM'), (invalid_sn, 'Invalid SN'), (invalid_so, 'Inavlid SO'), (suppressed, 'Supressed') ) # Classification Status Choices accepted = 'accepted' junior_synonym = 'junior_synonym' deprecated = 'deprecated' # supressed defined above for Nomenclatural status choices CLASSIFICATION_STATUS_CHOICES = ( (accepted, 'Accepted'), (junior_synonym, 'Junior Synonym'), (deprecated, 'Deprecated') ) # helper functions def choices2list(choices_tuple): """ Helper function that returns a choice list tuple as a simple list of stored values :param choices_tuple: :return: """ return [c[0] for c in choices_tuple]
[ 2, 24079, 4935, 18502, 44968, 11, 47208, 397, 934, 444, 11, 9463, 5823, 198, 2, 3572, 8341, 290, 12776, 397, 934, 444, 389, 5447, 351, 262, 1708, 1486, 11055, 25, 198, 198, 2, 7885, 62, 18242, 16, 796, 1988, 220, 220, 1303, 7885, 62, 23912, 1424, 389, 2793, 7442, 11, 3815, 460, 307, 13042, 393, 3146, 393, 12416, 198, 2, 7885, 62, 18242, 17, 796, 1988, 198, 2, 49143, 34444, 796, 357, 198, 2, 220, 220, 357, 45286, 62, 18242, 16, 11, 705, 8841, 62, 15603, 341, 11537, 198, 2, 220, 220, 357, 45286, 62, 18242, 17, 11, 705, 8841, 62, 15603, 341, 11537, 198, 198, 2, 383, 1486, 3578, 779, 286, 262, 7885, 62, 23912, 1424, 287, 2438, 13, 19179, 284, 262, 1988, 8991, 6338, 788, 287, 2438, 290, 198, 2, 287, 644, 318, 3194, 284, 6831, 13, 628, 198, 2, 6389, 658, 286, 262, 2159, 198, 1878, 30997, 796, 705, 17584, 30997, 6, 198, 415, 283, 28914, 796, 705, 13217, 283, 28914, 6, 198, 23218, 796, 705, 38555, 6, 198, 64, 436, 1373, 544, 796, 705, 27429, 6, 198, 44252, 431, 796, 705, 16112, 6, 198, 43588, 62, 2382, 3970, 796, 705, 14157, 2253, 6, 198, 35782, 62, 2382, 3970, 796, 705, 14942, 2253, 6, 198, 198, 37815, 1268, 3525, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 357, 1878, 30997, 11, 705, 17584, 30997, 33809, 198, 220, 220, 220, 357, 415, 283, 28914, 11, 705, 13217, 283, 28914, 33809, 198, 220, 220, 220, 357, 23218, 11, 705, 38555, 33809, 198, 220, 220, 220, 357, 64, 436, 1373, 544, 11, 705, 27429, 33809, 198, 220, 220, 220, 357, 44252, 431, 11, 705, 16112, 33809, 198, 220, 220, 220, 357, 43588, 62, 2382, 3970, 11, 705, 14157, 2253, 33809, 198, 220, 220, 220, 357, 35782, 62, 2382, 3970, 11, 705, 14942, 2253, 11537, 198, 8, 198, 198, 2, 5994, 18291, 12117, 10031, 1063, 198, 2, 45205, 18984, 422, 12460, 57, 45, 2691, 2638, 1378, 8189, 13, 28051, 77, 13, 2398, 198, 439, 8690, 796, 705, 439, 8690, 6, 1303, 317, 3381, 11, 407, 17153, 416, 262, 6127, 11, 329, 257, 11032, 31674, 286, 6697, 1714, 284, 262, 6039, 8690, 198, 66, 8690, 796, 705, 66, 8690, 6, 1303, 317, 3381, 407, 8018, 416, 262, 6127, 11, 15734, 973, 329, 2035, 7419, 2981, 393, 1582, 265, 2981, 11, 475, 326, 815, 198, 2, 407, 783, 307, 973, 287, 40565, 2770, 299, 3674, 565, 1300, 198, 5235, 8690, 796, 705, 5235, 8690, 6, 1303, 317, 3381, 407, 8018, 416, 262, 6127, 11, 15734, 973, 329, 2099, 4693, 11, 475, 326, 815, 407, 198, 2, 783, 307, 973, 287, 40565, 2770, 299, 3674, 565, 1300, 198, 71, 2674, 8690, 796, 705, 71, 2674, 8690, 6, 1303, 1881, 393, 517, 21518, 17747, 286, 3264, 3519, 3925, 10200, 7310, 198, 2, 9539, 287, 262, 1204, 6772, 11, 543, 1978, 1296, 262, 1438, 12, 28655, 2099, 287, 281, 47862, 4693, 286, 1237, 4103, 13, 198, 3937, 8690, 796, 705, 3937, 8690, 6, 220, 1303, 383, 2060, 31674, 357, 16341, 287, 262, 1339, 286, 257, 387, 79, 415, 8690, 11, 10662, 13, 85, 2014, 11032, 393, 4306, 5969, 198, 2, 355, 262, 1438, 12, 28655, 2099, 286, 257, 26934, 4693, 393, 850, 35448, 618, 262, 26934, 1687, 261, 318, 4920, 13, 198, 271, 8690, 796, 705, 271, 8690, 6, 1303, 317, 23418, 31674, 286, 262, 6039, 8690, 13, 198, 271, 418, 33567, 2981, 796, 705, 271, 418, 33567, 2981, 6, 220, 1303, 317, 23418, 286, 257, 7419, 2981, 13, 198, 1845, 265, 2981, 796, 705, 1845, 265, 2981, 6, 1303, 317, 31674, 407, 15832, 11032, 355, 257, 2099, 475, 9181, 1863, 351, 262, 2099, 4947, 287, 262, 198, 2, 2656, 6764, 286, 257, 1687, 261, 13, 198, 801, 8690, 796, 705, 801, 8690, 6, 1303, 317, 7419, 2981, 11032, 355, 262, 2060, 1438, 12, 28655, 2099, 31674, 8840, 284, 262, 9323, 198, 2, 286, 257, 26934, 4693, 393, 850, 35448, 198, 710, 8690, 796, 705, 710, 8690, 6, 1303, 383, 2060, 31674, 11032, 355, 262, 1438, 12, 28655, 2099, 286, 257, 26934, 4693, 393, 850, 35448, 198, 2, 618, 612, 318, 257, 761, 284, 8160, 262, 26934, 1687, 261, 35721, 290, 645, 1438, 12, 28655, 2099, 318, 4762, 284, 307, 47862, 13, 198, 2, 1002, 10159, 290, 5820, 1483, 389, 8556, 11, 780, 281, 4683, 1438, 12, 28655, 2099, 318, 2035, 1687, 6326, 1146, 198, 2, 20577, 393, 407, 287, 8178, 351, 262, 26602, 8748, 286, 257, 1438, 11, 262, 4513, 743, 779, 663, 458, 21629, 1176, 198, 2, 284, 900, 7263, 326, 2099, 290, 32781, 257, 497, 8690, 13, 198, 1845, 282, 478, 8690, 796, 705, 1845, 282, 478, 8690, 6, 1303, 5501, 31674, 286, 257, 1966, 7419, 2981, 2168, 5637, 706, 262, 22566, 198, 2, 286, 257, 11042, 8690, 198, 1837, 429, 2981, 796, 705, 1837, 429, 2981, 6, 220, 1303, 5501, 31674, 286, 257, 2099, 2168, 357, 80, 13, 85, 2014, 422, 543, 6159, 257, 6039, 8690, 4249, 257, 11042, 8690, 468, 198, 2, 587, 11032, 13, 383, 7419, 9497, 21329, 15613, 262, 1438, 12, 28655, 2099, 13, 198, 4852, 8690, 796, 705, 4852, 8690, 6, 220, 1303, 317, 3381, 11, 407, 17153, 416, 262, 6127, 11, 329, 257, 31674, 37962, 422, 262, 2099, 48036, 286, 262, 198, 2, 4693, 393, 850, 35448, 284, 543, 340, 318, 1807, 284, 5594, 11, 1771, 393, 407, 262, 31674, 318, 636, 286, 262, 2099, 2168, 13, 198, 198, 2, 8554, 257, 2922, 900, 286, 2846, 8018, 416, 12460, 57, 45, 13, 198, 25216, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 357, 3937, 8690, 11, 705, 28115, 8690, 33809, 198, 220, 220, 220, 357, 1845, 265, 2981, 11, 705, 10044, 265, 2981, 33809, 198, 220, 220, 220, 357, 801, 8690, 11, 705, 43, 478, 8690, 33809, 198, 220, 220, 220, 357, 710, 8690, 11, 705, 8199, 8690, 33809, 198, 220, 220, 220, 357, 1837, 429, 2981, 11, 705, 13940, 429, 2981, 33809, 198, 8, 198, 198, 2, 399, 3674, 565, 2660, 6127, 10031, 1063, 198, 28051, 77, 796, 705, 2149, 57, 45, 6, 198, 291, 9374, 796, 705, 2149, 15766, 6, 198, 45, 2662, 1677, 5097, 1404, 4261, 1847, 62, 34, 16820, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 357, 28051, 77, 11, 705, 2149, 57, 45, 33809, 198, 220, 220, 220, 357, 291, 9374, 11, 705, 2149, 15766, 11537, 198, 8, 198, 198, 2, 399, 3674, 565, 2660, 12678, 10031, 1063, 198, 12102, 796, 705, 12102, 6, 198, 259, 12102, 62, 456, 796, 705, 259, 12102, 62, 456, 6, 220, 1303, 42044, 3488, 5177, 198, 259, 12102, 62, 4908, 796, 705, 259, 12102, 62, 4908, 6, 220, 1303, 5215, 385, 299, 3674, 26731, 388, 878, 34625, 198, 259, 12102, 62, 22296, 796, 705, 259, 12102, 62, 22296, 6, 220, 1303, 5215, 385, 299, 3674, 26731, 388, 706, 15533, 198, 259, 12102, 62, 1477, 796, 705, 259, 12102, 62, 1477, 6, 220, 1303, 17377, 3488, 5177, 198, 259, 12102, 62, 5796, 796, 705, 259, 12102, 62, 5796, 6, 220, 1303, 17377, 299, 3674, 26731, 388, 878, 34625, 198, 259, 12102, 62, 16184, 796, 705, 259, 12102, 62, 16184, 6, 220, 1303, 17377, 299, 3674, 26731, 388, 706, 15533, 198, 259, 12102, 62, 568, 796, 705, 259, 12102, 62, 568, 6, 220, 1303, 17377, 299, 3674, 26731, 388, 532, 5150, 4006, 453, 198, 18608, 2790, 796, 705, 18608, 2790, 6, 220, 1303, 6530, 25822, 416, 12460, 57, 45, 2551, 13, 198, 45, 2662, 1677, 5097, 1404, 4261, 1847, 62, 35744, 2937, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 357, 12102, 11, 705, 47139, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 456, 11, 705, 44651, 24739, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 4908, 11, 705, 44651, 14545, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 22296, 11, 705, 44651, 13124, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 1477, 11, 705, 818, 615, 75, 312, 6006, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 5796, 11, 705, 44651, 9447, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 16184, 11, 705, 44651, 11346, 33809, 198, 220, 220, 220, 357, 259, 12102, 62, 568, 11, 705, 818, 615, 75, 312, 12809, 33809, 198, 220, 220, 220, 357, 18608, 2790, 11, 705, 40784, 2790, 11537, 198, 8, 198, 198, 2, 40984, 12678, 10031, 1063, 198, 13635, 276, 796, 705, 13635, 276, 6, 198, 29741, 1504, 62, 28869, 5177, 796, 705, 29741, 1504, 62, 28869, 5177, 6, 198, 10378, 31023, 796, 705, 10378, 31023, 6, 198, 2, 7418, 2790, 5447, 2029, 329, 399, 3674, 565, 2660, 3722, 7747, 198, 31631, 30643, 6234, 62, 35744, 2937, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 357, 13635, 276, 11, 705, 38855, 276, 33809, 198, 220, 220, 220, 357, 29741, 1504, 62, 28869, 5177, 11, 705, 22396, 1504, 16065, 5177, 33809, 198, 220, 220, 220, 357, 10378, 31023, 11, 705, 12156, 31023, 11537, 198, 8, 628, 198, 2, 31904, 5499, 198, 4299, 7747, 17, 4868, 7, 6679, 1063, 62, 83, 29291, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5053, 525, 2163, 326, 5860, 257, 3572, 1351, 46545, 355, 257, 2829, 1351, 286, 8574, 3815, 198, 220, 220, 220, 1058, 17143, 7747, 62, 83, 29291, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 685, 66, 58, 15, 60, 329, 269, 287, 7747, 62, 83, 29291, 60, 198 ]
3.23758
1,570
if last_question[bot.message.chat_id] == '%block_name%' and not got_answer: %get_answer% %next_blocks% got_answer = True
[ 220, 220, 220, 611, 938, 62, 25652, 58, 13645, 13, 20500, 13, 17006, 62, 312, 60, 6624, 705, 4, 9967, 62, 3672, 4, 6, 290, 407, 1392, 62, 41484, 25, 198, 4, 1136, 62, 41484, 4, 198, 4, 19545, 62, 27372, 4, 198, 220, 220, 220, 220, 220, 220, 220, 1392, 62, 41484, 796, 6407, 198 ]
2.375
56
# Copyright (c) 2013, Carnegie Mellon University. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright notice, this # list of conditions and the following disclaimer in the documentation and/or # other materials provided with the distribution. # # Neither the name of the Carnegie Mellon University nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Helpers for core CAP Collector module.""" import copy from datetime import datetime import logging import lxml import os import re import uuid from bs4 import BeautifulSoup from core import models from dateutil import parser from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils import timezone from django.utils.translation import ugettext import pytz try: import xmlsec XMLSEC_DEFINED = True except ImportError: # This module is not available on AppEngine. # https://code.google.com/p/googleappengine/issues/detail?id=1034 XMLSEC_DEFINED = False def GetCurrentDate(): """The current date helper.""" return datetime.now(pytz.utc) def GenerateFeed(feed_type="xml"): """Generates XML for alert feed based on active alert files. Args: feed_type: (string) Either xml of html. Returns: String. Ready to serve XML feed content. """ # Build feed header. now = timezone.now().isoformat() time_str, tz_str = now.split("+") feed_updated = "%s+%s" % (time_str.split(".")[0], tz_str) feed_url = settings.SITE_URL + reverse("feed", args=[feed_type]) entries = [] # For each unexpired message, get the necessary values and add it to the feed. for alert in models.Alert.objects.filter( updated=False, expires_at__gt=GetCurrentDate()).order_by("-created_at"): entries.append(ParseAlert(alert.content, feed_type, alert.uuid)) feed_dict = { "entries": entries, "feed_url": feed_url, "updated": feed_updated, "version": settings.VERSION, } feed_template = "core/feed." + feed_type + ".tmpl" return BeautifulSoup( render_to_string(feed_template, feed_dict), feed_type).prettify() def ParseAlert(xml_string, feed_type, alert_uuid): """Parses select fields from the CAP XML file at file_name. Primary use is intended for populating a feed <entry>. Note: - This code assumes the input alert XML has only one <info>. - The parsed XML does not contain all fields in the CAP specification. - The code accepts both complete and partial CAP messages. Args: xml_string: (string) Alert XML string. feed_type: (string) Alert feed representation (XML or HTML). alert_uuid: (string) Alert UUID. Returns: Dictionary. Keys/values corresponding to alert XML attributes or empty dictionary. """ def GetFirstText(xml_element): """Returns the first text item from an XML element.""" if xml_element and len(xml_element): return xml_element[0].text return "" def GetAllText(xml_element): """Returns an array of text items from multiple elements.""" if xml_element and len(xml_element): return [item.text for item in xml_element] return [] def GetNameValuePairs(xml_elements): """Returns a list of dictionaries for paired elements.""" pair_list = [] for xml_element in xml_elements: name_element, value_element = xml_element.getchildren() pair_list.append({ "name": name_element.text, "value": value_element.text}) return pair_list def GetCapElement(element_name, xml_tree): """Extracts elements from CAP XML tree.""" element = "//p:" + element_name finder = lxml.etree.XPath(element, namespaces={"p": settings.CAP_NS}) return finder(xml_tree) alert_dict = {} try: xml_tree = lxml.etree.fromstring(xml_string) expires_str = GetFirstText(GetCapElement("expires", xml_tree)) # Extract the other needed values from the CAP XML. sender = GetFirstText(GetCapElement("sender", xml_tree)) sender_name = GetFirstText(GetCapElement("senderName", xml_tree)) name = sender if sender_name: name = name + ": " + sender_name title = GetFirstText(GetCapElement("headline", xml_tree)) if not title: title = ugettext("Alert Message") # Force a default. link = "%s%s" % (settings.SITE_URL, reverse("alert", args=[alert_uuid, feed_type])) expires = parser.parse(expires_str) if expires_str else None sent_str = GetFirstText(GetCapElement("sent", xml_tree)) sent = parser.parse(sent_str) if sent_str else None alert_dict = { "title": title, "event": GetFirstText(GetCapElement("event", xml_tree)), "link": link, "web": GetFirstText(GetCapElement("web", xml_tree)), "name": name, "sender": sender, "sender_name": sender_name, "expires": expires, "msg_type": GetFirstText(GetCapElement("msgType", xml_tree)), "references": GetFirstText(GetCapElement("references", xml_tree)), "alert_id": GetFirstText(GetCapElement("identifier", xml_tree)), "category": GetFirstText(GetCapElement("category", xml_tree)), "response_type": GetFirstText(GetCapElement("responseType", xml_tree)), "sent": sent, "description": GetFirstText(GetCapElement("description", xml_tree)), "instruction": GetFirstText(GetCapElement("instruction", xml_tree)), "urgency": GetFirstText(GetCapElement("urgency", xml_tree)), "severity": GetFirstText(GetCapElement("severity", xml_tree)), "certainty": GetFirstText(GetCapElement("certainty", xml_tree)), "language": GetFirstText(GetCapElement("language", xml_tree)), "parameters": GetNameValuePairs(GetCapElement("parameter", xml_tree)), "event_codes": GetNameValuePairs(GetCapElement("eventCode", xml_tree)), "area_desc": GetFirstText(GetCapElement("areaDesc", xml_tree)), "geocodes": GetNameValuePairs(GetCapElement("geocode", xml_tree)), "circles": GetAllText(GetCapElement("circle", xml_tree)), "polys": GetAllText(GetCapElement("polygon", xml_tree)), } # Non-CAP-compliant fields used for message templates. expiresDurationMinutes = GetFirstText( GetCapElement("expiresDurationMinutes", xml_tree)) if expiresDurationMinutes: alert_dict["expiresDurationMinutes"] = expiresDurationMinutes # We don't expect any invalid XML alerts. except lxml.etree.XMLSyntaxError as e: logging.exception(e) return alert_dict def SignAlert(xml_tree, username): """Sign XML with user key/certificate. Args: xml_tree: (string) Alert XML tree. username: (string) Username of the alert author. Returns: String. Signed alert XML tree if your has key/certificate pair Unchanged XML tree otherwise. """ if not XMLSEC_DEFINED: return xml_tree key_path = os.path.join(settings.CREDENTIALS_DIR, username + ".key") cert_path = os.path.join(settings.CREDENTIALS_DIR, username + ".cert") try: signed_xml_tree = copy.deepcopy(xml_tree) xmlsec.add_enveloped_signature(signed_xml_tree, pos=-1) xmlsec.sign(signed_xml_tree, key_path, cert_path) return signed_xml_tree except (IOError, xmlsec.exceptions.XMLSigException): return xml_tree def CreateAlert(xml_string, username): """Creates alert signed by userame from provided XML string. Args: xml_string: (string) XML content. username: (string) Username of the alert author. Returns: A tuple of (msg_id, valid, error) where: msg_id: (string) Unique alert ID (UUID) valid: (bool) Whether alert has valid XML or not. error: (string) Error message in case XML is invalid. """ msg_id = None valid = False try: # Clean up the XML format a bit. xml_string = re.sub("> +<", "><", xml_string) # Now parse into etree and validate. xml_tree = lxml.etree.fromstring(xml_string) with open(os.path.join(settings.SCHEMA_DIR, settings.CAP_SCHEMA_FILE), "r") as schema_file: schema_string = schema_file.read() xml_schema = lxml.etree.XMLSchema(lxml.etree.fromstring(schema_string)) valid = xml_schema.validate(xml_tree) error = xml_schema.error_log.last_error except lxml.etree.XMLSyntaxError as e: error = "Malformed XML: %s" % e if valid: msg_id = str(uuid.uuid4()) # Assign <identifier> and <sender> values. find_identifier = lxml.etree.XPath("//p:identifier", namespaces={"p": settings.CAP_NS}) identifier = find_identifier(xml_tree)[0] identifier.text = msg_id # Set default <web> field if one was not filled by user. find_web = lxml.etree.XPath("//p:info/p:web", namespaces={"p": settings.CAP_NS}) web = find_web(xml_tree)[0] if web.text == "pending": web.text = "%s%s" % (settings.SITE_URL, reverse("alert", args=[msg_id, "html"])) find_sender = lxml.etree.XPath("//p:sender", namespaces={"p": settings.CAP_NS}) sender = find_sender(xml_tree)[0] sender.text = username + "@" + settings.SITE_DOMAIN find_sent = lxml.etree.XPath("//p:sent", namespaces={"p": settings.CAP_NS}) sent = find_sent(xml_tree)[0] find_expires = lxml.etree.XPath("//p:expires", namespaces={"p": settings.CAP_NS}) expires = find_expires(xml_tree)[0] find_references = lxml.etree.XPath("//p:references", namespaces={"p": settings.CAP_NS}) has_references = len(find_references(xml_tree)) != 0 # Sign the XML tree. xml_tree = SignAlert(xml_tree, username) # Re-serialize as string. signed_xml_string = lxml.etree.tostring(xml_tree, pretty_print=False) alert_obj = models.Alert() alert_obj.uuid = msg_id alert_obj.created_at = sent.text alert_obj.expires_at = expires.text alert_obj.content = signed_xml_string alert_obj.save() if has_references: for element in find_references(xml_tree): updated_alert_uuid = element.text.split(",")[1] models.Alert.objects.filter( uuid=updated_alert_uuid).update(updated=True) return (msg_id, valid, error)
[ 2, 15069, 357, 66, 8, 2211, 11, 33976, 49808, 2059, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 389, 1138, 25, 198, 2, 198, 2, 2297, 396, 2455, 507, 286, 2723, 2438, 1276, 12377, 262, 2029, 6634, 4003, 11, 428, 198, 2, 1351, 286, 3403, 290, 262, 1708, 37592, 13, 198, 2, 198, 2, 2297, 396, 2455, 507, 287, 13934, 1296, 1276, 22919, 262, 2029, 6634, 4003, 11, 428, 198, 2, 1351, 286, 3403, 290, 262, 1708, 37592, 287, 262, 10314, 290, 14, 273, 198, 2, 584, 5696, 2810, 351, 262, 6082, 13, 198, 2, 198, 2, 16126, 262, 1438, 286, 262, 33976, 49808, 2059, 4249, 262, 3891, 286, 663, 198, 2, 20420, 743, 307, 973, 284, 11438, 393, 7719, 3186, 10944, 422, 198, 2, 428, 3788, 1231, 2176, 3161, 3194, 7170, 13, 198, 2, 198, 2, 12680, 47466, 3180, 36592, 2389, 1961, 11050, 3336, 27975, 38162, 9947, 367, 15173, 4877, 5357, 27342, 9865, 3843, 20673, 366, 1921, 3180, 1, 198, 2, 5357, 15529, 7788, 32761, 6375, 8959, 49094, 34764, 11015, 11, 47783, 2751, 11, 21728, 5626, 40880, 5390, 11, 3336, 198, 2, 8959, 49094, 34764, 11015, 3963, 34482, 3398, 1565, 5603, 25382, 5357, 376, 46144, 7473, 317, 16652, 2149, 37232, 33079, 48933, 15986, 198, 2, 13954, 48778, 1961, 13, 3268, 8005, 49261, 50163, 3336, 27975, 38162, 9947, 49707, 14418, 6375, 27342, 9865, 3843, 20673, 9348, 43031, 19146, 198, 2, 7473, 15529, 42242, 11, 3268, 17931, 23988, 11, 19387, 25256, 1847, 11, 38846, 11, 7788, 3620, 6489, 13153, 11, 6375, 7102, 5188, 10917, 3525, 12576, 198, 2, 29506, 25552, 357, 1268, 39149, 2751, 11, 21728, 5626, 40880, 5390, 11, 41755, 11335, 10979, 3963, 28932, 2257, 2043, 37780, 21090, 50, 6375, 198, 2, 49254, 26, 406, 18420, 3963, 23210, 11, 42865, 11, 6375, 4810, 19238, 29722, 26, 6375, 43949, 44180, 23255, 49, 8577, 24131, 8, 29630, 36, 5959, 198, 2, 7257, 2937, 1961, 5357, 6177, 15529, 3336, 15513, 3963, 43031, 25382, 11, 7655, 2767, 16879, 3268, 27342, 10659, 11, 19269, 18379, 43031, 25382, 11, 198, 2, 6375, 309, 9863, 357, 1268, 39149, 2751, 399, 7156, 43, 3528, 18310, 6375, 25401, 54, 24352, 8, 5923, 1797, 2751, 3268, 15529, 34882, 16289, 3963, 3336, 23210, 198, 2, 3963, 12680, 47466, 11, 45886, 16876, 5984, 29817, 1961, 3963, 3336, 28069, 11584, 25382, 3963, 13558, 3398, 29506, 11879, 13, 628, 198, 37811, 12621, 19276, 329, 4755, 20176, 17573, 8265, 526, 15931, 628, 198, 11748, 4866, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 11748, 300, 19875, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 334, 27112, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4755, 1330, 4981, 198, 6738, 3128, 22602, 1330, 30751, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 8543, 62, 1462, 62, 8841, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 198, 11748, 12972, 22877, 198, 198, 28311, 25, 198, 220, 1330, 35555, 2363, 198, 220, 23735, 23683, 62, 7206, 20032, 1961, 796, 6407, 198, 16341, 17267, 12331, 25, 198, 220, 1303, 770, 8265, 318, 407, 1695, 319, 2034, 13798, 13, 198, 220, 1303, 3740, 1378, 8189, 13, 13297, 13, 785, 14, 79, 14, 13297, 1324, 18392, 14, 37165, 14, 49170, 30, 312, 28, 940, 2682, 198, 220, 23735, 23683, 62, 7206, 20032, 1961, 796, 10352, 628, 198, 4299, 3497, 11297, 10430, 33529, 198, 220, 37227, 464, 1459, 3128, 31904, 526, 15931, 198, 220, 1441, 4818, 8079, 13, 2197, 7, 9078, 22877, 13, 315, 66, 8, 628, 198, 4299, 2980, 378, 18332, 7, 12363, 62, 4906, 2625, 19875, 1, 2599, 198, 220, 37227, 8645, 689, 23735, 329, 7995, 3745, 1912, 319, 4075, 7995, 3696, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 3745, 62, 4906, 25, 357, 8841, 8, 15467, 35555, 286, 27711, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 10903, 13, 23432, 284, 4691, 23735, 3745, 2695, 13, 198, 220, 37227, 628, 220, 1303, 10934, 3745, 13639, 13, 198, 220, 783, 796, 640, 11340, 13, 2197, 22446, 26786, 18982, 3419, 198, 220, 640, 62, 2536, 11, 256, 89, 62, 2536, 796, 783, 13, 35312, 7203, 10, 4943, 198, 220, 3745, 62, 43162, 796, 36521, 82, 10, 4, 82, 1, 4064, 357, 2435, 62, 2536, 13, 35312, 7203, 19570, 58, 15, 4357, 256, 89, 62, 2536, 8, 198, 220, 3745, 62, 6371, 796, 6460, 13, 50, 12709, 62, 21886, 1343, 9575, 7203, 12363, 1600, 26498, 41888, 12363, 62, 4906, 12962, 198, 220, 12784, 796, 17635, 628, 220, 1303, 1114, 1123, 8522, 6474, 3275, 11, 651, 262, 3306, 3815, 290, 751, 340, 284, 262, 3745, 13, 198, 220, 329, 7995, 287, 4981, 13, 36420, 13, 48205, 13, 24455, 7, 198, 220, 220, 220, 220, 220, 6153, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 27396, 62, 265, 834, 13655, 28, 3855, 11297, 10430, 3419, 737, 2875, 62, 1525, 7203, 12, 25598, 62, 265, 1, 2599, 198, 220, 220, 220, 12784, 13, 33295, 7, 10044, 325, 36420, 7, 44598, 13, 11299, 11, 3745, 62, 4906, 11, 7995, 13, 12303, 312, 4008, 628, 220, 3745, 62, 11600, 796, 1391, 198, 220, 220, 220, 220, 220, 366, 298, 1678, 1298, 12784, 11, 198, 220, 220, 220, 220, 220, 366, 12363, 62, 6371, 1298, 3745, 62, 6371, 11, 198, 220, 220, 220, 220, 220, 366, 43162, 1298, 3745, 62, 43162, 11, 198, 220, 220, 220, 220, 220, 366, 9641, 1298, 6460, 13, 43717, 11, 198, 220, 1782, 628, 220, 3745, 62, 28243, 796, 366, 7295, 14, 12363, 526, 1343, 3745, 62, 4906, 1343, 27071, 17209, 489, 1, 628, 220, 1441, 23762, 50, 10486, 7, 198, 220, 220, 220, 220, 220, 8543, 62, 1462, 62, 8841, 7, 12363, 62, 28243, 11, 3745, 62, 11600, 828, 3745, 62, 4906, 737, 3866, 926, 1958, 3419, 628, 198, 4299, 2547, 325, 36420, 7, 19875, 62, 8841, 11, 3745, 62, 4906, 11, 7995, 62, 12303, 312, 2599, 198, 220, 37227, 47, 945, 274, 2922, 7032, 422, 262, 20176, 23735, 2393, 379, 2393, 62, 3672, 13, 628, 220, 21087, 779, 318, 5292, 329, 1461, 8306, 257, 3745, 1279, 13000, 28401, 628, 220, 5740, 25, 198, 220, 532, 770, 2438, 18533, 262, 5128, 7995, 23735, 468, 691, 530, 1279, 10951, 28401, 198, 220, 532, 383, 44267, 23735, 857, 407, 3994, 477, 7032, 287, 262, 20176, 20855, 13, 198, 220, 532, 383, 2438, 18178, 1111, 1844, 290, 13027, 20176, 6218, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 35555, 62, 8841, 25, 357, 8841, 8, 23276, 23735, 4731, 13, 198, 220, 220, 220, 3745, 62, 4906, 25, 357, 8841, 8, 23276, 3745, 10552, 357, 55, 5805, 393, 11532, 737, 198, 220, 220, 220, 7995, 62, 12303, 312, 25, 357, 8841, 8, 23276, 471, 27586, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 28261, 13, 198, 220, 220, 220, 26363, 14, 27160, 11188, 284, 7995, 23735, 12608, 393, 6565, 22155, 13, 198, 220, 37227, 628, 220, 825, 3497, 5962, 8206, 7, 19875, 62, 30854, 2599, 198, 220, 220, 220, 37227, 35561, 262, 717, 2420, 2378, 422, 281, 23735, 5002, 526, 15931, 198, 220, 220, 220, 611, 35555, 62, 30854, 290, 18896, 7, 19875, 62, 30854, 2599, 198, 220, 220, 220, 220, 220, 1441, 35555, 62, 30854, 58, 15, 4083, 5239, 198, 220, 220, 220, 1441, 13538, 628, 220, 825, 3497, 3237, 8206, 7, 19875, 62, 30854, 2599, 198, 220, 220, 220, 37227, 35561, 281, 7177, 286, 2420, 3709, 422, 3294, 4847, 526, 15931, 198, 220, 220, 220, 611, 35555, 62, 30854, 290, 18896, 7, 19875, 62, 30854, 2599, 198, 220, 220, 220, 220, 220, 1441, 685, 9186, 13, 5239, 329, 2378, 287, 35555, 62, 30854, 60, 198, 220, 220, 220, 1441, 17635, 628, 220, 825, 3497, 5376, 11395, 47, 3468, 7, 19875, 62, 68, 3639, 2599, 198, 220, 220, 220, 37227, 35561, 257, 1351, 286, 48589, 3166, 329, 20312, 4847, 526, 15931, 198, 220, 220, 220, 5166, 62, 4868, 796, 17635, 198, 220, 220, 220, 329, 35555, 62, 30854, 287, 35555, 62, 68, 3639, 25, 198, 220, 220, 220, 220, 220, 1438, 62, 30854, 11, 1988, 62, 30854, 796, 35555, 62, 30854, 13, 1136, 17197, 3419, 198, 220, 220, 220, 220, 220, 5166, 62, 4868, 13, 33295, 15090, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 1438, 62, 30854, 13, 5239, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8367, 1298, 1988, 62, 30854, 13, 5239, 30072, 198, 220, 220, 220, 1441, 5166, 62, 4868, 628, 220, 825, 3497, 15610, 20180, 7, 30854, 62, 3672, 11, 35555, 62, 21048, 2599, 198, 220, 220, 220, 37227, 11627, 974, 82, 4847, 422, 20176, 23735, 5509, 526, 15931, 198, 220, 220, 220, 5002, 796, 366, 1003, 79, 11097, 1343, 5002, 62, 3672, 198, 220, 220, 220, 1064, 263, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7, 30854, 11, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 1441, 1064, 263, 7, 19875, 62, 21048, 8, 628, 220, 7995, 62, 11600, 796, 23884, 198, 220, 1949, 25, 198, 220, 220, 220, 35555, 62, 21048, 796, 300, 19875, 13, 316, 631, 13, 6738, 8841, 7, 19875, 62, 8841, 8, 198, 220, 220, 220, 27396, 62, 2536, 796, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 11201, 2387, 1600, 35555, 62, 21048, 4008, 628, 220, 220, 220, 1303, 29677, 262, 584, 2622, 3815, 422, 262, 20176, 23735, 13, 198, 220, 220, 220, 29788, 796, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 82, 2194, 1600, 35555, 62, 21048, 4008, 198, 220, 220, 220, 29788, 62, 3672, 796, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 82, 2194, 5376, 1600, 35555, 62, 21048, 4008, 198, 220, 220, 220, 1438, 796, 29788, 198, 220, 220, 220, 611, 29788, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 1438, 796, 1438, 1343, 366, 25, 366, 1343, 29788, 62, 3672, 628, 220, 220, 220, 3670, 796, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 2256, 1370, 1600, 35555, 62, 21048, 4008, 198, 220, 220, 220, 611, 407, 3670, 25, 198, 220, 220, 220, 220, 220, 3670, 796, 334, 1136, 5239, 7203, 36420, 16000, 4943, 220, 1303, 5221, 257, 4277, 13, 628, 220, 220, 220, 2792, 796, 36521, 82, 4, 82, 1, 4064, 357, 33692, 13, 50, 12709, 62, 21886, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9575, 7203, 44598, 1600, 26498, 41888, 44598, 62, 12303, 312, 11, 3745, 62, 4906, 60, 4008, 198, 220, 220, 220, 27396, 796, 30751, 13, 29572, 7, 11201, 2387, 62, 2536, 8, 611, 27396, 62, 2536, 2073, 6045, 198, 220, 220, 220, 1908, 62, 2536, 796, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 34086, 1600, 35555, 62, 21048, 4008, 198, 220, 220, 220, 1908, 796, 30751, 13, 29572, 7, 34086, 62, 2536, 8, 611, 1908, 62, 2536, 2073, 6045, 628, 220, 220, 220, 7995, 62, 11600, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7839, 1298, 3670, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15596, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 15596, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 8726, 1298, 2792, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 12384, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 12384, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 1438, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 82, 2194, 1298, 29788, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 82, 2194, 62, 3672, 1298, 29788, 62, 3672, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11201, 2387, 1298, 27396, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 19662, 62, 4906, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 19662, 6030, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5420, 4972, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 5420, 4972, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 44598, 62, 312, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 738, 7483, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 22872, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 22872, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 26209, 62, 4906, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 26209, 6030, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 34086, 1298, 1908, 11, 198, 220, 220, 220, 220, 220, 220, 220, 366, 11213, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 11213, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 8625, 2762, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 8625, 2762, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3686, 1387, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 3686, 1387, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 28116, 414, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 28116, 414, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 39239, 774, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 39239, 774, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 16129, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 16129, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 17143, 7307, 1298, 3497, 5376, 11395, 47, 3468, 7, 3855, 15610, 20180, 7203, 17143, 2357, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15596, 62, 40148, 1298, 3497, 5376, 11395, 47, 3468, 7, 3855, 15610, 20180, 7203, 15596, 10669, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 20337, 62, 20147, 1298, 3497, 5962, 8206, 7, 3855, 15610, 20180, 7203, 20337, 24564, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 469, 420, 4147, 1298, 3497, 5376, 11395, 47, 3468, 7, 3855, 15610, 20180, 7203, 469, 420, 1098, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 66, 343, 5427, 1298, 3497, 3237, 8206, 7, 3855, 15610, 20180, 7203, 45597, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 366, 35428, 82, 1298, 3497, 3237, 8206, 7, 3855, 15610, 20180, 7203, 35428, 14520, 1600, 35555, 62, 21048, 36911, 198, 220, 220, 220, 1782, 198, 220, 220, 220, 1303, 8504, 12, 33177, 12, 23855, 3014, 7032, 973, 329, 3275, 24019, 13, 198, 220, 220, 220, 27396, 26054, 9452, 1769, 796, 3497, 5962, 8206, 7, 198, 220, 220, 220, 220, 220, 220, 220, 3497, 15610, 20180, 7203, 11201, 2387, 26054, 9452, 1769, 1600, 35555, 62, 21048, 4008, 198, 220, 220, 220, 611, 27396, 26054, 9452, 1769, 25, 198, 220, 220, 220, 220, 220, 7995, 62, 11600, 14692, 11201, 2387, 26054, 9452, 1769, 8973, 796, 27396, 26054, 9452, 1769, 198, 220, 1303, 775, 836, 470, 1607, 597, 12515, 23735, 21675, 13, 198, 220, 2845, 300, 19875, 13, 316, 631, 13, 55, 5805, 13940, 41641, 12331, 355, 304, 25, 198, 220, 220, 220, 18931, 13, 1069, 4516, 7, 68, 8, 198, 220, 1441, 7995, 62, 11600, 628, 198, 4299, 5865, 36420, 7, 19875, 62, 21048, 11, 20579, 2599, 198, 220, 37227, 11712, 23735, 351, 2836, 1994, 14, 22583, 22460, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 35555, 62, 21048, 25, 357, 8841, 8, 23276, 23735, 5509, 13, 198, 220, 220, 220, 20579, 25, 357, 8841, 8, 50069, 286, 262, 7995, 1772, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 10903, 13, 198, 220, 220, 220, 36215, 7995, 23735, 5509, 611, 534, 468, 1994, 14, 22583, 22460, 5166, 198, 220, 220, 220, 34867, 5102, 23735, 5509, 4306, 13, 198, 220, 37227, 628, 220, 611, 407, 23735, 23683, 62, 7206, 20032, 1961, 25, 198, 220, 220, 220, 1441, 35555, 62, 21048, 628, 220, 1994, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 33692, 13, 9419, 1961, 3525, 12576, 50, 62, 34720, 11, 20579, 1343, 27071, 2539, 4943, 198, 220, 5051, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 33692, 13, 9419, 1961, 3525, 12576, 50, 62, 34720, 11, 20579, 1343, 27071, 22583, 4943, 628, 220, 1949, 25, 198, 220, 220, 220, 4488, 62, 19875, 62, 21048, 796, 4866, 13, 22089, 30073, 7, 19875, 62, 21048, 8, 198, 220, 220, 220, 35555, 2363, 13, 2860, 62, 268, 1091, 276, 62, 12683, 1300, 7, 32696, 62, 19875, 62, 21048, 11, 1426, 10779, 16, 8, 198, 220, 220, 220, 35555, 2363, 13, 12683, 7, 32696, 62, 19875, 62, 21048, 11, 1994, 62, 6978, 11, 5051, 62, 6978, 8, 198, 220, 220, 220, 1441, 4488, 62, 19875, 62, 21048, 198, 220, 2845, 357, 9399, 12331, 11, 35555, 2363, 13, 1069, 11755, 13, 55, 5805, 50, 328, 16922, 2599, 198, 220, 220, 220, 1441, 35555, 62, 21048, 628, 198, 4299, 13610, 36420, 7, 19875, 62, 8841, 11, 20579, 2599, 198, 220, 37227, 16719, 274, 7995, 4488, 416, 2836, 480, 422, 2810, 23735, 4731, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 35555, 62, 8841, 25, 357, 8841, 8, 23735, 2695, 13, 198, 220, 220, 220, 20579, 25, 357, 8841, 8, 50069, 286, 262, 7995, 1772, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 317, 46545, 286, 357, 19662, 62, 312, 11, 4938, 11, 4049, 8, 810, 25, 198, 220, 220, 220, 220, 220, 31456, 62, 312, 25, 357, 8841, 8, 30015, 7995, 4522, 357, 52, 27586, 8, 198, 220, 220, 220, 220, 220, 4938, 25, 357, 30388, 8, 10127, 7995, 468, 4938, 23735, 393, 407, 13, 198, 220, 220, 220, 220, 220, 4049, 25, 357, 8841, 8, 13047, 3275, 287, 1339, 23735, 318, 12515, 13, 198, 220, 37227, 628, 220, 31456, 62, 312, 796, 6045, 198, 220, 4938, 796, 10352, 628, 220, 1949, 25, 198, 220, 220, 220, 1303, 5985, 510, 262, 23735, 5794, 257, 1643, 13, 198, 220, 220, 220, 35555, 62, 8841, 796, 302, 13, 7266, 7, 5320, 1343, 27, 1600, 366, 6927, 1600, 35555, 62, 8841, 8, 198, 220, 220, 220, 1303, 2735, 21136, 656, 2123, 631, 290, 26571, 13, 198, 220, 220, 220, 35555, 62, 21048, 796, 300, 19875, 13, 316, 631, 13, 6738, 8841, 7, 19875, 62, 8841, 8, 628, 220, 220, 220, 351, 1280, 7, 418, 13, 6978, 13, 22179, 7, 33692, 13, 50, 3398, 27630, 62, 34720, 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, 6460, 13, 33177, 62, 50, 3398, 27630, 62, 25664, 828, 366, 81, 4943, 355, 32815, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 32815, 62, 8841, 796, 32815, 62, 7753, 13, 961, 3419, 198, 220, 220, 220, 35555, 62, 15952, 2611, 796, 300, 19875, 13, 316, 631, 13, 55, 5805, 27054, 2611, 7, 75, 19875, 13, 316, 631, 13, 6738, 8841, 7, 15952, 2611, 62, 8841, 4008, 198, 220, 220, 220, 4938, 796, 35555, 62, 15952, 2611, 13, 12102, 378, 7, 19875, 62, 21048, 8, 198, 220, 220, 220, 4049, 796, 35555, 62, 15952, 2611, 13, 18224, 62, 6404, 13, 12957, 62, 18224, 198, 220, 2845, 300, 19875, 13, 316, 631, 13, 55, 5805, 13940, 41641, 12331, 355, 304, 25, 198, 220, 220, 220, 4049, 796, 366, 15029, 12214, 23735, 25, 4064, 82, 1, 4064, 304, 628, 220, 611, 4938, 25, 198, 220, 220, 220, 31456, 62, 312, 796, 965, 7, 12303, 312, 13, 12303, 312, 19, 28955, 198, 220, 220, 220, 1303, 2195, 570, 1279, 738, 7483, 29, 290, 1279, 82, 2194, 29, 3815, 13, 198, 220, 220, 220, 1064, 62, 738, 7483, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 738, 7483, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 27421, 796, 1064, 62, 738, 7483, 7, 19875, 62, 21048, 38381, 15, 60, 198, 220, 220, 220, 27421, 13, 5239, 796, 31456, 62, 312, 628, 220, 220, 220, 1303, 5345, 4277, 1279, 12384, 29, 2214, 611, 530, 373, 407, 5901, 416, 2836, 13, 198, 220, 220, 220, 1064, 62, 12384, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 10951, 14, 79, 25, 12384, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 3992, 796, 1064, 62, 12384, 7, 19875, 62, 21048, 38381, 15, 60, 198, 220, 220, 220, 611, 3992, 13, 5239, 6624, 366, 79, 1571, 1298, 198, 220, 220, 220, 220, 220, 3992, 13, 5239, 796, 36521, 82, 4, 82, 1, 4064, 357, 33692, 13, 50, 12709, 62, 21886, 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, 9575, 7203, 44598, 1600, 26498, 41888, 19662, 62, 312, 11, 366, 6494, 8973, 4008, 628, 220, 220, 220, 1064, 62, 82, 2194, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 82, 2194, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 29788, 796, 1064, 62, 82, 2194, 7, 19875, 62, 21048, 38381, 15, 60, 198, 220, 220, 220, 29788, 13, 5239, 796, 20579, 1343, 44212, 1, 1343, 6460, 13, 50, 12709, 62, 39170, 29833, 628, 220, 220, 220, 1064, 62, 34086, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 34086, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 1908, 796, 1064, 62, 34086, 7, 19875, 62, 21048, 38381, 15, 60, 628, 220, 220, 220, 1064, 62, 11201, 2387, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 11201, 2387, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 27396, 796, 1064, 62, 11201, 2387, 7, 19875, 62, 21048, 38381, 15, 60, 628, 220, 220, 220, 1064, 62, 5420, 4972, 796, 300, 19875, 13, 316, 631, 13, 55, 15235, 7203, 1003, 79, 25, 5420, 4972, 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, 3891, 43076, 28, 4895, 79, 1298, 6460, 13, 33177, 62, 8035, 30072, 198, 220, 220, 220, 468, 62, 5420, 4972, 796, 18896, 7, 19796, 62, 5420, 4972, 7, 19875, 62, 21048, 4008, 14512, 657, 628, 220, 220, 220, 1303, 5865, 262, 23735, 5509, 13, 198, 220, 220, 220, 35555, 62, 21048, 796, 5865, 36420, 7, 19875, 62, 21048, 11, 20579, 8, 628, 220, 220, 220, 1303, 797, 12, 46911, 1096, 355, 4731, 13, 198, 220, 220, 220, 4488, 62, 19875, 62, 8841, 796, 300, 19875, 13, 316, 631, 13, 83, 455, 1806, 7, 19875, 62, 21048, 11, 2495, 62, 4798, 28, 25101, 8, 198, 220, 220, 220, 7995, 62, 26801, 796, 4981, 13, 36420, 3419, 198, 220, 220, 220, 7995, 62, 26801, 13, 12303, 312, 796, 31456, 62, 312, 198, 220, 220, 220, 7995, 62, 26801, 13, 25598, 62, 265, 796, 1908, 13, 5239, 198, 220, 220, 220, 7995, 62, 26801, 13, 11201, 2387, 62, 265, 796, 27396, 13, 5239, 198, 220, 220, 220, 7995, 62, 26801, 13, 11299, 796, 4488, 62, 19875, 62, 8841, 198, 220, 220, 220, 7995, 62, 26801, 13, 21928, 3419, 628, 220, 220, 220, 611, 468, 62, 5420, 4972, 25, 198, 220, 220, 220, 220, 220, 329, 5002, 287, 1064, 62, 5420, 4972, 7, 19875, 62, 21048, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 6153, 62, 44598, 62, 12303, 312, 796, 5002, 13, 5239, 13, 35312, 7, 2430, 38381, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 4981, 13, 36420, 13, 48205, 13, 24455, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 334, 27112, 28, 43162, 62, 44598, 62, 12303, 312, 737, 19119, 7, 43162, 28, 17821, 8, 628, 220, 1441, 357, 19662, 62, 312, 11, 4938, 11, 4049, 8, 198 ]
2.699111
4,274
from .generate_eval_jobs import generate_eval_jobs from .generate_plane_jobs import generate_plane_data
[ 6738, 764, 8612, 378, 62, 18206, 62, 43863, 1330, 7716, 62, 18206, 62, 43863, 198, 6738, 764, 8612, 378, 62, 14382, 62, 43863, 1330, 7716, 62, 14382, 62, 7890, 198 ]
3.466667
30
import logging import os import urllib from time import time from json import loads from rain_api_core.general_util import log_context, return_timing_object, duration from rain_api_core.view_util import make_set_cookie_headers_jwt, get_exp_time, JWT_COOKIE_NAME from rain_api_core.aws_util import retrieve_secret log = logging.getLogger(__name__) def get_urs_creds(): """ Fetches URS creds from secrets manager. :return: looks like: { "UrsId": "stringofseeminglyrandomcharacters", "UrsAuth": "verymuchlongerstringofseeminglyrandomcharacters" } :type: dict """ secret_name = os.getenv('URS_CREDS_SECRET_NAME', None) if not secret_name: log.error('URS_CREDS_SECRET_NAME not set') return {} secret = retrieve_secret(secret_name) if not ('UrsId' in secret and 'UrsAuth' in secret): log.error('AWS secret {} does not contain required keys "UrsId" and "UrsAuth"'.format(secret_name)) return secret # This do_login() is mainly for chalice clients.
[ 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 198, 6738, 640, 1330, 640, 198, 6738, 33918, 1330, 15989, 198, 6738, 6290, 62, 15042, 62, 7295, 13, 24622, 62, 22602, 1330, 2604, 62, 22866, 11, 1441, 62, 16514, 278, 62, 15252, 11, 9478, 198, 6738, 6290, 62, 15042, 62, 7295, 13, 1177, 62, 22602, 1330, 787, 62, 2617, 62, 44453, 62, 50145, 62, 73, 46569, 11, 651, 62, 11201, 62, 2435, 11, 449, 39386, 62, 34, 15308, 10008, 62, 20608, 198, 6738, 6290, 62, 15042, 62, 7295, 13, 8356, 62, 22602, 1330, 19818, 62, 21078, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628, 628, 628, 628, 198, 198, 4299, 651, 62, 1834, 62, 66, 445, 82, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 44649, 2052, 471, 6998, 2600, 82, 422, 13141, 4706, 13, 198, 220, 220, 220, 1058, 7783, 25, 3073, 588, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 52, 3808, 7390, 1298, 366, 8841, 1659, 325, 368, 4420, 25120, 10641, 19858, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 52, 3808, 30515, 1298, 366, 548, 29482, 6511, 263, 8841, 1659, 325, 368, 4420, 25120, 10641, 19858, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 1058, 4906, 25, 8633, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3200, 62, 3672, 796, 28686, 13, 1136, 24330, 10786, 4261, 50, 62, 9419, 1961, 50, 62, 23683, 26087, 62, 20608, 3256, 6045, 8, 628, 220, 220, 220, 611, 407, 3200, 62, 3672, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 18224, 10786, 4261, 50, 62, 9419, 1961, 50, 62, 23683, 26087, 62, 20608, 407, 900, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 23884, 198, 220, 220, 220, 3200, 796, 19818, 62, 21078, 7, 21078, 62, 3672, 8, 198, 220, 220, 220, 611, 407, 19203, 52, 3808, 7390, 6, 287, 3200, 290, 705, 52, 3808, 30515, 6, 287, 3200, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 13, 18224, 10786, 12298, 50, 3200, 23884, 857, 407, 3994, 2672, 8251, 366, 52, 3808, 7390, 1, 290, 366, 52, 3808, 30515, 1, 4458, 18982, 7, 21078, 62, 3672, 4008, 628, 220, 220, 220, 1441, 3200, 628, 198, 198, 2, 770, 466, 62, 38235, 3419, 318, 8384, 329, 442, 282, 501, 7534, 13, 198 ]
2.494226
433
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import logging import os import uuid import requests import json from copy import copy from datetime import datetime from crhelper import CfnResource from util.solution_metrics import send_metrics logger = logging.getLogger(__name__) helper = CfnResource(json_logging=True, log_level="INFO") @helper.create @helper.update @helper.delete
[ 2, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 7007, 198, 11748, 33918, 198, 6738, 4866, 1330, 4866, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1067, 2978, 525, 1330, 327, 22184, 26198, 198, 6738, 7736, 13, 82, 2122, 62, 4164, 10466, 1330, 3758, 62, 4164, 10466, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 2978, 525, 796, 327, 22184, 26198, 7, 17752, 62, 6404, 2667, 28, 17821, 11, 2604, 62, 5715, 2625, 10778, 4943, 628, 198, 31, 2978, 525, 13, 17953, 198, 31, 2978, 525, 13, 19119, 198, 31, 2978, 525, 13, 33678, 628 ]
3.230216
139
from solutions.FIZ import fizz_buzz_solution
[ 6738, 8136, 13, 11674, 57, 1330, 277, 6457, 62, 65, 4715, 62, 82, 2122, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198 ]
1.596154
52
#!/usr/bin/env python """Classes to mock components for use in system testing. The main class is the `Component`, which is intended to be used as the base class for an object that plays the part of a separately running process. However, a component is actually executed under the control of the `cleversheep3.Test.PollManager`. This allows its behaviour to be tightly controlled and tests to be fairly deterministic. Actually this has become suitably general purpose as to be put somewhere else. But what I will probably do is keep Component as a mocking class and make it inherit from some other class, which will contain the bulk of current Component. """ from __future__ import print_function __docformat__ = "restructuredtext" import itertools from cleversheep3.Test.Tester import Logging from . import Comms class Component: """The base class for a mock component in a test scenario. The intention for this class is that it should provide most of the functionality required to emulate a process. At least well enough for most test purposes. :Ivariables: pollManager The ``PollManager`` that is managing the component. connections One or more active connections managed by the component. listeners A dict of active listeners being manager by the component. The key is the name of the peer that is expected to connect and the value of the ``Listener`` managing the listen socket. pendingConnections A dict of pending outgoing connections. The key is the name of the peer that is expected to connect and the value of the ``Connector`` trying to connect to the peer. """ _name = "UNKNOWN" peerCounter = itertools.count(1) #{ Construction def __init__(self, pollManager, log=None): """Constructor: :Parameters: pollManager This is typically a `PollManager` instance, but could be something that provides the same interface. log A standard ``logging`` object. If omitted, a default logging object is used. This is likely to disappear, so it is best not to use it. Currently the log object is stored, but not used. """ self.log = log or Logging.getLogger(self._name).info # self.log = log or getLog(self._name).info self.pollManager = pollManager self.connections = {} self.listeners = {} self.pendingConnections = {} #{ Connection establishment def listenFor(self, listenName, bindAddr): """Listen for connection from a peer. Arranges to start listening for connection from a peer. A SOCK_STREAM socket is created and added to a list of listenting sockets. Each call to this methods sets up a new listener. When a connection request occurs a socket for the connection is created (by accepting the request). Then the `onIncomingConnect` method is invoked as ``self.onIncomingConnect(s, peerName)``, where ``s`` is the new connection socket and ``peerName`` is the ``listenName`` passed to this ``listenFor`` method. :Param listenName: The name by which the listener should be known, which is normally name of the peer that is expected to try to connect. :Param bindAddr: The address to bind to for listening. This is a tuple of ``(ipAddr, port)`` and the ``ipAddr`` is often an empty string, meaning accept connection from any address. """ listenSocket = Comms.Listener(self.pollManager, listenName, bindAddr, onConnect=self._onIncomingConnect) self.listeners[listenName] = listenSocket return listenSocket addListener = listenFor def openDgramSocket(self, peerName, bindAddr=None, peerAddr=None): """Open a datagram socket. :Param peerName: A symbolic name for the communicating peer. :Param bindAddr: The Taddress to bind to for receiving packets. """ p = Comms.Dgram(self.pollManager, peerName, bindAddr=bindAddr, peerAddr=peerAddr, onReceive=self._onReceive) self.connections[peerName] = p def openInputPipe(self, pipePath, peerName, native=False): """Open a named pipe for reading from. :Param pipePath: The path name of the PIPE. """ p = Comms.PipeConn(False, pipePath, peerName, self.pollManager, onReceive=self._onReceive, onClose=self._onClose, onError=self._onError, native=native) self.connections[peerName] = p def openOutputPipe(self, pipePath, peerName, native=False): """Open a named pipe for reading from. :Param pipePath: The path name of the PIPE. """ p = Comms.PipeConn(True, pipePath, peerName, self.pollManager, onReceive=self._onReceive, onClose=self._onClose, onError=self._onError, native=native) self.connections[peerName] = p def connectTo(self, peerName, peerAddr, connectTimes=(0.0, 0.5), bindAddress=None): """Start trying to connect to a peer. :Param peerName: The name by which the connection to the peer should be known, which is normally the peer's name. :Param peerAddr: The internet address, i.e. a tuple of ``(ipAddr, port)``, of the peer. The ``ipAddr`` may be an empty string, meaning ``localhost``. :Param connectTimes: A tuple of ``(firstDelay, retryDelay)``, each is floating point value representing seconds. The first connection attempt will be made after ``firstDelay`` seconds. If that fails then connection attempts will be made every ``retryDelay`` seconds. """ c = Comms.Connecter(self.pollManager, peerName, peerAddr, connectTimes, self._onOutgoingConnect, bindAddress=bindAddress) self.pendingConnections[peerName] = c return c def sendTo(self, peerName, bytes, count=None): """Send bytes to a named peer. :Param peerName: The name by which the connection to the peer is known, which is normally the peer's name. :Param bytes, count: The string of bytes to write and how many of those bytes to send. The `count` is normally omitted (or ``None``), in which case the entire string is sent. """ conn = self.connections.get(peerName) if not conn: return conn.send(bytes, count=count) #{ The Component protocol methods. def onIncomingConnect(self, s, peerName): """Invoked when accepting a connection from a peer.""" def onOutgoingConnect(self, peerName): """Invoked when an outgoing connection is established.""" def onReceive(self, conn): """Invoked when a connection has received bytes.""" def onClose(self, conn): """Invoked when a connection closes.""" def onError(self, conn, exc): """Invoked when a connection has an abnormal error.""" # TODO: Get a better name. def getConnName(self, listenName, peerAddr): """Map an incoming connection to a peer name. If you listen for multiple clients connecting to a single port then you need to over-ride this so that each new connection gets given a new name. """ return listenName #{ Handling of socket activity. def _onIncomingConnect(self, s, listenName, peerAddr, source): """This is invoked by a `Listener`, for a new connection.""" peerName = self.getConnName(listenName, peerAddr) if peerName.endswith('%d'): peerName = peerName % next(self.peerCounter) conn = self.connections[peerName] = Comms.SocketConn(s, peerName, self.pollManager, onReceive=self._onReceive, onClose=self._onClose, onError=self._onError, addr=peerAddr, isSSL=source.isSslConnection()) self.onIncomingConnect(s, peerName) return conn def _onOutgoingConnect(self, peerName, source): """This is invoked by a `Connecter`, for a new connection.""" # TODO: Make logging controllable. # logComms(self.log, self._name, peerName, "<CONNECT>") pending = self.pendingConnections.pop(peerName) conn = self.connections[peerName] = Comms.SocketConn(pending.s, peerName, self.pollManager, onReceive=self._onReceive, onClose=self._onClose, onError=self._onError, isSSL=source.isSslConnection()) self.onOutgoingConnect(peerName)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 9487, 274, 284, 15290, 6805, 329, 779, 287, 1080, 4856, 13, 198, 198, 464, 1388, 1398, 318, 262, 4600, 21950, 47671, 543, 318, 5292, 284, 307, 973, 355, 262, 2779, 198, 4871, 329, 281, 2134, 326, 5341, 262, 636, 286, 257, 13869, 2491, 1429, 13, 198, 4864, 11, 257, 7515, 318, 1682, 10945, 739, 262, 1630, 286, 262, 198, 63, 2375, 690, 258, 538, 18, 13, 14402, 13, 39176, 13511, 44646, 770, 3578, 663, 9172, 284, 307, 17707, 198, 14401, 290, 5254, 284, 307, 6547, 2206, 49228, 13, 198, 198, 26417, 428, 468, 1716, 6050, 1346, 2276, 4007, 355, 284, 307, 1234, 7382, 2073, 13, 198, 1537, 644, 314, 481, 2192, 466, 318, 1394, 35100, 355, 257, 31202, 1398, 290, 787, 340, 198, 259, 372, 270, 422, 617, 584, 1398, 11, 543, 481, 3994, 262, 11963, 286, 1459, 198, 21950, 13, 198, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 834, 15390, 18982, 834, 796, 366, 2118, 1356, 1522, 5239, 1, 198, 198, 11748, 340, 861, 10141, 198, 198, 6738, 1190, 690, 258, 538, 18, 13, 14402, 13, 51, 7834, 1330, 5972, 2667, 198, 6738, 764, 1330, 955, 907, 628, 198, 198, 4871, 35100, 25, 198, 220, 220, 220, 37227, 464, 2779, 1398, 329, 257, 15290, 7515, 287, 257, 1332, 8883, 13, 628, 220, 220, 220, 383, 6778, 329, 428, 1398, 318, 326, 340, 815, 2148, 749, 286, 262, 198, 220, 220, 220, 11244, 2672, 284, 33836, 257, 1429, 13, 1629, 1551, 880, 1576, 329, 749, 198, 220, 220, 220, 1332, 4959, 13, 628, 220, 220, 220, 1058, 40, 25641, 2977, 25, 198, 220, 220, 220, 220, 220, 3278, 13511, 198, 220, 220, 220, 220, 220, 220, 220, 383, 7559, 39176, 13511, 15506, 326, 318, 11149, 262, 7515, 13, 198, 220, 220, 220, 220, 220, 8787, 198, 220, 220, 220, 220, 220, 220, 220, 1881, 393, 517, 4075, 8787, 5257, 416, 262, 7515, 13, 198, 220, 220, 220, 220, 220, 22054, 198, 220, 220, 220, 220, 220, 220, 220, 317, 8633, 286, 4075, 22054, 852, 4706, 416, 262, 7515, 13, 383, 1994, 318, 198, 220, 220, 220, 220, 220, 220, 220, 262, 1438, 286, 262, 12720, 326, 318, 2938, 284, 2018, 290, 262, 1988, 286, 262, 198, 220, 220, 220, 220, 220, 220, 220, 7559, 33252, 15506, 11149, 262, 6004, 17802, 13, 198, 220, 220, 220, 220, 220, 13310, 13313, 507, 198, 220, 220, 220, 220, 220, 220, 220, 317, 8633, 286, 13310, 28181, 8787, 13, 383, 1994, 318, 262, 1438, 286, 262, 12720, 198, 220, 220, 220, 220, 220, 220, 220, 326, 318, 2938, 284, 2018, 290, 262, 1988, 286, 262, 7559, 34525, 15506, 2111, 198, 220, 220, 220, 220, 220, 220, 220, 284, 2018, 284, 262, 12720, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 4808, 3672, 796, 366, 4944, 44706, 1, 198, 220, 220, 220, 12720, 31694, 796, 340, 861, 10141, 13, 9127, 7, 16, 8, 628, 220, 220, 220, 1303, 90, 20395, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3278, 13511, 11, 2604, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 42316, 273, 25, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 48944, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3278, 13511, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 770, 318, 6032, 257, 4600, 39176, 13511, 63, 4554, 11, 475, 714, 307, 1223, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 326, 3769, 262, 976, 7071, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 3210, 7559, 6404, 2667, 15506, 2134, 13, 1002, 22532, 11, 257, 4277, 18931, 2134, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 770, 318, 1884, 284, 10921, 11, 523, 340, 318, 1266, 407, 284, 779, 340, 13, 16888, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 2604, 2134, 318, 8574, 11, 475, 407, 973, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 796, 2604, 393, 5972, 2667, 13, 1136, 11187, 1362, 7, 944, 13557, 3672, 737, 10951, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2116, 13, 6404, 796, 2604, 393, 651, 11187, 7, 944, 13557, 3672, 737, 10951, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30393, 13511, 796, 3278, 13511, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8443, 507, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4868, 36014, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 1571, 13313, 507, 796, 23884, 628, 220, 220, 220, 1303, 90, 26923, 9323, 198, 220, 220, 220, 825, 6004, 1890, 7, 944, 11, 6004, 5376, 11, 11007, 4550, 81, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 23061, 329, 4637, 422, 257, 12720, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 81, 6231, 284, 923, 8680, 329, 4637, 422, 257, 12720, 13, 628, 220, 220, 220, 220, 220, 220, 220, 317, 311, 11290, 62, 2257, 32235, 17802, 318, 2727, 290, 2087, 284, 257, 1351, 286, 1351, 36589, 198, 220, 220, 220, 220, 220, 220, 220, 37037, 13, 5501, 869, 284, 428, 5050, 5621, 510, 257, 649, 24783, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1649, 257, 4637, 2581, 8833, 257, 17802, 329, 262, 4637, 318, 198, 220, 220, 220, 220, 220, 220, 220, 2727, 357, 1525, 12598, 262, 2581, 737, 3244, 262, 4600, 261, 818, 4976, 13313, 63, 2446, 198, 220, 220, 220, 220, 220, 220, 220, 318, 24399, 355, 7559, 944, 13, 261, 818, 4976, 13313, 7, 82, 11, 12720, 5376, 8, 15506, 11, 810, 7559, 82, 15506, 318, 198, 220, 220, 220, 220, 220, 220, 220, 262, 649, 4637, 17802, 290, 7559, 33350, 5376, 15506, 318, 262, 7559, 4868, 268, 5376, 15506, 198, 220, 220, 220, 220, 220, 220, 220, 3804, 284, 428, 7559, 4868, 268, 1890, 15506, 2446, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 6004, 5376, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1438, 416, 543, 262, 24783, 815, 307, 1900, 11, 543, 318, 7685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1438, 286, 262, 12720, 326, 318, 2938, 284, 1949, 284, 2018, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 11007, 4550, 81, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 2209, 284, 11007, 284, 329, 8680, 13, 770, 318, 257, 46545, 286, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11592, 541, 4550, 81, 11, 2493, 8, 15506, 290, 262, 7559, 541, 4550, 81, 15506, 318, 1690, 281, 6565, 4731, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3616, 2453, 4637, 422, 597, 2209, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6004, 39105, 796, 955, 907, 13, 33252, 7, 944, 13, 30393, 13511, 11, 6004, 5376, 11, 11007, 4550, 81, 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, 319, 13313, 28, 944, 13557, 261, 818, 4976, 13313, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4868, 36014, 58, 4868, 268, 5376, 60, 796, 6004, 39105, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6004, 39105, 198, 220, 220, 220, 751, 33252, 796, 6004, 1890, 628, 220, 220, 220, 825, 1280, 35, 4546, 39105, 7, 944, 11, 12720, 5376, 11, 11007, 4550, 81, 28, 14202, 11, 12720, 4550, 81, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 11505, 257, 4818, 6713, 17802, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12720, 5376, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 18975, 1438, 329, 262, 22889, 12720, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 11007, 4550, 81, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 309, 21975, 284, 11007, 284, 329, 6464, 24624, 13, 628, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 955, 907, 13, 35, 4546, 7, 944, 13, 30393, 13511, 11, 12720, 5376, 11, 11007, 4550, 81, 28, 21653, 4550, 81, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12720, 4550, 81, 28, 33350, 4550, 81, 11, 319, 3041, 15164, 28, 944, 13557, 261, 3041, 15164, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8443, 507, 58, 33350, 5376, 60, 796, 279, 628, 220, 220, 220, 825, 1280, 20560, 47, 3757, 7, 944, 11, 12656, 15235, 11, 12720, 5376, 11, 6868, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 11505, 257, 3706, 12656, 329, 3555, 422, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12656, 15235, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 3108, 1438, 286, 262, 350, 4061, 36, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 955, 907, 13, 47, 3757, 37321, 7, 25101, 11, 12656, 15235, 11, 12720, 5376, 11, 2116, 13, 30393, 13511, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 3041, 15164, 28, 944, 13557, 261, 3041, 15164, 11, 319, 26125, 28, 944, 13557, 261, 26125, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 12331, 28, 944, 13557, 261, 12331, 11, 6868, 28, 30191, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8443, 507, 58, 33350, 5376, 60, 796, 279, 628, 220, 220, 220, 825, 1280, 26410, 47, 3757, 7, 944, 11, 12656, 15235, 11, 12720, 5376, 11, 6868, 28, 25101, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 11505, 257, 3706, 12656, 329, 3555, 422, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12656, 15235, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 3108, 1438, 286, 262, 350, 4061, 36, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 955, 907, 13, 47, 3757, 37321, 7, 17821, 11, 12656, 15235, 11, 12720, 5376, 11, 2116, 13, 30393, 13511, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 3041, 15164, 28, 944, 13557, 261, 3041, 15164, 11, 319, 26125, 28, 944, 13557, 261, 26125, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 12331, 28, 944, 13557, 261, 12331, 11, 6868, 28, 30191, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8443, 507, 58, 33350, 5376, 60, 796, 279, 628, 220, 220, 220, 825, 2018, 2514, 7, 944, 11, 12720, 5376, 11, 12720, 4550, 81, 11, 2018, 28595, 16193, 15, 13, 15, 11, 657, 13, 20, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11007, 20231, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 10434, 2111, 284, 2018, 284, 257, 12720, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12720, 5376, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1438, 416, 543, 262, 4637, 284, 262, 12720, 815, 307, 1900, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 543, 318, 7685, 262, 12720, 338, 1438, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12720, 4550, 81, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 5230, 2209, 11, 1312, 13, 68, 13, 257, 46545, 286, 11592, 541, 4550, 81, 11, 2493, 8, 15506, 11, 286, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12720, 13, 383, 7559, 541, 4550, 81, 15506, 743, 307, 281, 6565, 4731, 11, 3616, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 36750, 15506, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 2018, 28595, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 46545, 286, 11592, 11085, 13856, 323, 11, 1005, 563, 13856, 323, 8, 15506, 11, 1123, 318, 12462, 966, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1988, 10200, 4201, 13, 383, 717, 4637, 2230, 481, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 307, 925, 706, 7559, 11085, 13856, 323, 15506, 4201, 13, 1002, 326, 10143, 788, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4637, 6370, 481, 307, 925, 790, 7559, 1186, 563, 13856, 323, 15506, 4201, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 955, 907, 13, 13313, 263, 7, 944, 13, 30393, 13511, 11, 12720, 5376, 11, 12720, 4550, 81, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2018, 28595, 11, 2116, 13557, 261, 7975, 5146, 13313, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11007, 20231, 28, 21653, 20231, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 79, 1571, 13313, 507, 58, 33350, 5376, 60, 796, 269, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 269, 628, 220, 220, 220, 825, 3758, 2514, 7, 944, 11, 12720, 5376, 11, 9881, 11, 954, 28, 14202, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 25206, 9881, 284, 257, 3706, 12720, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 12720, 5376, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1438, 416, 543, 262, 4637, 284, 262, 12720, 318, 1900, 11, 543, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7685, 262, 12720, 338, 1438, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 22973, 9881, 11, 954, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 4731, 286, 9881, 284, 3551, 290, 703, 867, 286, 883, 9881, 284, 3758, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 4600, 9127, 63, 318, 7685, 22532, 357, 273, 7559, 14202, 15506, 828, 287, 543, 1339, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2104, 4731, 318, 1908, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 48260, 796, 2116, 13, 8443, 507, 13, 1136, 7, 33350, 5376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 48260, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 220, 220, 220, 220, 48260, 13, 21280, 7, 33661, 11, 954, 28, 9127, 8, 628, 220, 220, 220, 1303, 90, 383, 35100, 8435, 5050, 13, 198, 220, 220, 220, 825, 319, 818, 4976, 13313, 7, 944, 11, 264, 11, 12720, 5376, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19904, 6545, 618, 12598, 257, 4637, 422, 257, 12720, 526, 15931, 628, 220, 220, 220, 825, 319, 7975, 5146, 13313, 7, 944, 11, 12720, 5376, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19904, 6545, 618, 281, 28181, 4637, 318, 4920, 526, 15931, 628, 220, 220, 220, 825, 319, 3041, 15164, 7, 944, 11, 48260, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19904, 6545, 618, 257, 4637, 468, 2722, 9881, 526, 15931, 628, 220, 220, 220, 825, 319, 26125, 7, 944, 11, 48260, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19904, 6545, 618, 257, 4637, 20612, 526, 15931, 628, 220, 220, 220, 825, 319, 12331, 7, 944, 11, 48260, 11, 2859, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 19904, 6545, 618, 257, 4637, 468, 281, 18801, 4049, 526, 15931, 628, 220, 220, 220, 1303, 16926, 46, 25, 3497, 257, 1365, 1438, 13, 198, 220, 220, 220, 825, 651, 37321, 5376, 7, 944, 11, 6004, 5376, 11, 12720, 4550, 81, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 13912, 281, 15619, 4637, 284, 257, 12720, 1438, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1002, 345, 6004, 329, 3294, 7534, 14320, 284, 257, 2060, 2493, 788, 198, 220, 220, 220, 220, 220, 220, 220, 345, 761, 284, 625, 12, 13154, 428, 523, 326, 1123, 649, 4637, 3011, 1813, 198, 220, 220, 220, 220, 220, 220, 220, 257, 649, 1438, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6004, 5376, 628, 220, 220, 220, 1303, 90, 49500, 286, 17802, 3842, 13, 628, 220, 220, 220, 825, 4808, 261, 818, 4976, 13313, 7, 944, 11, 264, 11, 6004, 5376, 11, 12720, 4550, 81, 11, 2723, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 1212, 318, 24399, 416, 257, 4600, 33252, 47671, 329, 257, 649, 4637, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 12720, 5376, 796, 2116, 13, 1136, 37321, 5376, 7, 4868, 268, 5376, 11, 12720, 4550, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 12720, 5376, 13, 437, 2032, 342, 10786, 4, 67, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12720, 5376, 796, 12720, 5376, 4064, 1306, 7, 944, 13, 33350, 31694, 8, 198, 220, 220, 220, 220, 220, 220, 220, 48260, 796, 2116, 13, 8443, 507, 58, 33350, 5376, 60, 796, 955, 907, 13, 39105, 37321, 7, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12720, 5376, 11, 2116, 13, 30393, 13511, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 3041, 15164, 28, 944, 13557, 261, 3041, 15164, 11, 319, 26125, 28, 944, 13557, 261, 26125, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 12331, 28, 944, 13557, 261, 12331, 11, 37817, 28, 33350, 4550, 81, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 31127, 28, 10459, 13, 271, 50, 6649, 32048, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 261, 818, 4976, 13313, 7, 82, 11, 12720, 5376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 48260, 628, 220, 220, 220, 825, 4808, 261, 7975, 5146, 13313, 7, 944, 11, 12720, 5376, 11, 2723, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 1212, 318, 24399, 416, 257, 4600, 13313, 263, 47671, 329, 257, 649, 4637, 526, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 6889, 18931, 1246, 297, 540, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2604, 5377, 907, 7, 944, 13, 6404, 11, 2116, 13557, 3672, 11, 12720, 5376, 11, 33490, 10943, 48842, 29, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 13310, 796, 2116, 13, 79, 1571, 13313, 507, 13, 12924, 7, 33350, 5376, 8, 198, 220, 220, 220, 220, 220, 220, 220, 48260, 796, 2116, 13, 8443, 507, 58, 33350, 5376, 60, 796, 955, 907, 13, 39105, 37321, 7, 79, 1571, 13, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12720, 5376, 11, 2116, 13, 30393, 13511, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 3041, 15164, 28, 944, 13557, 261, 3041, 15164, 11, 319, 26125, 28, 944, 13557, 261, 26125, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 319, 12331, 28, 944, 13557, 261, 12331, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 31127, 28, 10459, 13, 271, 50, 6649, 32048, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 261, 7975, 5146, 13313, 7, 33350, 5376, 8, 198 ]
2.57295
3,475
from django.db import connection from django.db.models.signals import post_save from django.dispatch import receiver # TODO(mkurek): make this working as a decorator, example: # @post_commit(MyModel) # def my_handler(instance): # ... def post_commit(func, model, signal=post_save, single_call=True): """ Post commit signal for specific model. It's better than Django's post_save, because: * it handles transaction rollback (transaction could be rolled back after calling post_save) * it handles M2M relations (post_save is (usually) called when main model is saved, before related M2M instances are saved) Writing tests: Remember to make your TestCase inheriting from one of: - TransactionTestCase (Django) - APITransactionTestCase (Django Rest Framework) Unless `on_commit` signal won't be called. Requirements: * you have to use database supporting transactions (ex. MySQL) * you have to use django-transaction-hooks (https://github.com/carljm/django-transaction-hooks) for Django<=1.8 (it was merged into Django 1.9) Notice that this feature will work whether or not you're using transactions in your code. Possible scenarios are as follows: * `ATOMIC_REQUESTS` is set to True in settings - then every request is wrapped in transaction - at the end of processing each (saving) request, this hook will be processed (for models which were saved) * view is decorated using `transaction.atomic` - at the end of processing the view, this hook will be called (if any of registered models was saved) * if transaction is not started for current request, then this hook will behave as post_save (will be called immediately) """ @receiver(signal, sender=model, weak=False)
[ 6738, 42625, 14208, 13, 9945, 1330, 4637, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 628, 198, 2, 16926, 46, 7, 28015, 495, 74, 2599, 787, 428, 1762, 355, 257, 11705, 1352, 11, 1672, 25, 198, 2, 2488, 7353, 62, 41509, 7, 3666, 17633, 8, 198, 2, 825, 616, 62, 30281, 7, 39098, 2599, 198, 2, 220, 220, 220, 2644, 198, 4299, 1281, 62, 41509, 7, 20786, 11, 2746, 11, 6737, 28, 7353, 62, 21928, 11, 2060, 62, 13345, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2947, 4589, 6737, 329, 2176, 2746, 13, 628, 220, 220, 220, 632, 338, 1365, 621, 37770, 338, 1281, 62, 21928, 11, 780, 25, 198, 220, 220, 220, 1635, 340, 17105, 8611, 4836, 1891, 357, 7645, 2673, 714, 307, 11686, 736, 198, 220, 220, 220, 220, 220, 706, 4585, 1281, 62, 21928, 8, 198, 220, 220, 220, 1635, 340, 17105, 337, 17, 44, 2316, 357, 7353, 62, 21928, 318, 357, 23073, 8, 1444, 618, 1388, 2746, 198, 220, 220, 220, 220, 220, 318, 7448, 11, 878, 3519, 337, 17, 44, 10245, 389, 7448, 8, 628, 220, 220, 220, 22183, 5254, 25, 198, 220, 220, 220, 220, 220, 220, 220, 11436, 284, 787, 534, 6208, 20448, 10639, 1780, 422, 530, 286, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 45389, 14402, 20448, 357, 35, 73, 14208, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 3486, 2043, 26084, 2673, 14402, 20448, 357, 35, 73, 14208, 8324, 25161, 8, 198, 220, 220, 220, 220, 220, 220, 220, 17486, 4600, 261, 62, 41509, 63, 6737, 1839, 470, 307, 1444, 13, 628, 220, 220, 220, 24422, 25, 198, 220, 220, 220, 1635, 345, 423, 284, 779, 6831, 6493, 8945, 357, 1069, 13, 33476, 8, 198, 220, 220, 220, 1635, 345, 423, 284, 779, 42625, 14208, 12, 7645, 2673, 12, 25480, 82, 198, 220, 220, 220, 220, 220, 357, 5450, 1378, 12567, 13, 785, 14, 66, 7063, 73, 76, 14, 28241, 14208, 12, 7645, 2673, 12, 25480, 82, 8, 329, 37770, 27, 28, 16, 13, 23, 198, 220, 220, 220, 220, 220, 357, 270, 373, 23791, 656, 37770, 352, 13, 24, 8, 628, 220, 220, 220, 17641, 326, 428, 3895, 481, 670, 1771, 393, 407, 345, 821, 1262, 8945, 198, 220, 220, 220, 287, 534, 2438, 13, 33671, 13858, 389, 355, 5679, 25, 198, 220, 220, 220, 1635, 4600, 1404, 2662, 2149, 62, 2200, 10917, 1546, 4694, 63, 318, 900, 284, 6407, 287, 6460, 532, 788, 790, 2581, 318, 198, 220, 220, 220, 220, 220, 12908, 287, 8611, 532, 379, 262, 886, 286, 7587, 1123, 357, 29336, 8, 2581, 11, 198, 220, 220, 220, 220, 220, 428, 8011, 481, 307, 13686, 357, 1640, 4981, 543, 547, 7448, 8, 198, 220, 220, 220, 1635, 1570, 318, 24789, 1262, 4600, 7645, 2673, 13, 47116, 63, 532, 379, 262, 886, 286, 7587, 198, 220, 220, 220, 220, 220, 262, 1570, 11, 428, 8011, 481, 307, 1444, 357, 361, 597, 286, 6823, 4981, 373, 7448, 8, 198, 220, 220, 220, 1635, 611, 8611, 318, 407, 2067, 329, 1459, 2581, 11, 788, 428, 8011, 481, 198, 220, 220, 220, 220, 220, 17438, 355, 1281, 62, 21928, 357, 10594, 307, 1444, 3393, 8, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 260, 39729, 7, 12683, 282, 11, 29788, 28, 19849, 11, 4939, 28, 25101, 8, 198 ]
3.128425
584
# Copyright 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from multiprocessing import * import sys range4 = range(4) job_table = {} table = {} # vim:sw=4:expandtab:softtabstop=4
[ 2, 15069, 1946, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 6738, 18540, 305, 919, 278, 1330, 1635, 198, 11748, 25064, 198, 9521, 19, 796, 2837, 7, 19, 8, 198, 198, 21858, 62, 11487, 796, 23884, 198, 198, 11487, 796, 23884, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 2, 43907, 25, 2032, 28, 19, 25, 11201, 392, 8658, 25, 4215, 8658, 11338, 28, 19, 198 ]
2.927835
97
import numpy as np from scipy.linalg import eig from nengo.params import IntParam, NumberParam from nengo.neurons import NeuronTypeParam from nengo.synapses import SynapseParam import nengo from nengolib import Network from nengolib.neurons import Tanh from nengolib.networks.reservoir import Reservoir __all__ = ['EchoState'] class EchoState(Network, Reservoir): """An Echo State Network (ESN) within a Nengo Reservoir. This creates a standard Echo State Network (ENS) as a Nengo network, defaulting to the standard set of assumptions of non-spiking Tanh units and a random recurrent weight matrix [1]_. This is based on the minimalist Python implementation from [2]_. The network takes some arbitrary time-varying vector as input, encodes it randomly, and filters it using nonlinear units and a random recurrent weight matrix normalized by its spectral radius. This class also inherits ``nengolib.networks.Reservoir``, and thus the optimal linear readout is solved for in the same way: the network is simulated on a test signal, and then a solver is used to optimize the decoding connection weights. References: [1] http://www.scholarpedia.org/article/Echo_state_network [2] http://minds.jacobs-university.de/mantas/code """ n_neurons = IntParam('n_neurons', default=None, low=1) dimensions = IntParam('dimensions', default=None, low=1) dt = NumberParam('dt', low=0, low_open=True) recurrent_synapse = SynapseParam('recurrent_synapse') gain = NumberParam('gain', low=0, low_open=True) neuron_type = NeuronTypeParam('neuron_type') def __init__(self, n_neurons, dimensions, recurrent_synapse=0.005, readout_synapse=None, radii=1.0, gain=1.25, rng=None, neuron_type=Tanh(), include_bias=True, ens_seed=None, label=None, seed=None, add_to_container=None, **ens_kwargs): """Initializes the Echo State Network. Parameters ---------- n_neurons : int The number of neurons to use in the reservoir. dimensions : int The dimensionality of the input signal. recurrent_synapse : nengo.synapses.Synapse (Default: ``0.005``) Synapse used to filter the recurrent connection. readout_synapse : nengo.synapses.Synapse (Default: ``None``) Optional synapse to filter all of the outputs before solving for the linear readout. This is included in the connection to the ``output`` Node created within the network. radii : scalar or array_like, optional (Default: ``1``) The radius of each dimension of the input signal, used to normalize the incoming connection weights. gain : scalar, optional (Default: ``1.25``) A scalar gain on the recurrent connection weight matrix. rng : ``numpy.random.RandomState``, optional (Default: ``None``) Random state used to initialize all weights. neuron_type : ``nengo.neurons.NeuronType`` optional \ (Default: ``Tanh()``) Neuron model to use within the reservoir. include_bias : ``bool`` (Default: ``True``) Whether to include a bias current to the neural nonlinearity. This should be ``False`` if the neuron model already has a bias, e.g., ``LIF`` or ``LIFRate``. ens_seed : int, optional (Default: ``None``) Seed passed to the ensemble of neurons. """ Network.__init__(self, label, seed, add_to_container) self.n_neurons = n_neurons self.dimensions = dimensions self.recurrent_synapse = recurrent_synapse self.radii = radii # TODO: make array or scalar parameter? self.gain = gain self.rng = np.random if rng is None else rng self.neuron_type = neuron_type self.include_bias = include_bias self.W_in = ( self.rng.rand(self.n_neurons, self.dimensions) - 0.5) / self.radii if self.include_bias: self.W_bias = self.rng.rand(self.n_neurons, 1) - 0.5 else: self.W_bias = np.zeros((self.n_neurons, 1)) self.W = self.rng.rand(self.n_neurons, self.n_neurons) - 0.5 self.W *= self.gain / max(abs(eig(self.W)[0])) with self: self.ensemble = nengo.Ensemble( self.n_neurons, 1, neuron_type=self.neuron_type, seed=ens_seed, **ens_kwargs) self.input = nengo.Node(size_in=self.dimensions) pool = self.ensemble.neurons nengo.Connection( self.input, pool, transform=self.W_in, synapse=None) nengo.Connection( # note the bias will be active during training nengo.Node(output=1, label="bias"), pool, transform=self.W_bias, synapse=None) nengo.Connection( self.ensemble.neurons, pool, transform=self.W, synapse=self.recurrent_synapse) Reservoir.__init__( self, self.input, pool, readout_synapse=readout_synapse, network=self)
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 304, 328, 198, 198, 6738, 299, 1516, 78, 13, 37266, 1330, 2558, 22973, 11, 7913, 22973, 198, 6738, 299, 1516, 78, 13, 710, 333, 684, 1330, 3169, 44372, 6030, 22973, 198, 6738, 299, 1516, 78, 13, 28869, 45903, 1330, 16065, 7512, 22973, 198, 198, 11748, 299, 1516, 78, 198, 6738, 299, 1516, 349, 571, 1330, 7311, 198, 6738, 299, 1516, 349, 571, 13, 710, 333, 684, 1330, 11818, 71, 198, 6738, 299, 1516, 349, 571, 13, 3262, 5225, 13, 411, 712, 10840, 1330, 40425, 10840, 198, 198, 834, 439, 834, 796, 37250, 36, 6679, 9012, 20520, 628, 198, 4871, 21455, 9012, 7, 26245, 11, 40425, 10840, 2599, 198, 220, 220, 220, 37227, 2025, 21455, 1812, 7311, 357, 1546, 45, 8, 1626, 257, 399, 1516, 78, 40425, 10840, 13, 628, 220, 220, 220, 770, 8075, 257, 3210, 21455, 1812, 7311, 357, 16938, 8, 355, 257, 399, 1516, 78, 3127, 11, 198, 220, 220, 220, 4277, 278, 284, 262, 3210, 900, 286, 14895, 286, 1729, 12, 2777, 14132, 11818, 71, 4991, 198, 220, 220, 220, 290, 257, 4738, 42465, 3463, 17593, 685, 16, 60, 44807, 770, 318, 1912, 319, 262, 198, 220, 220, 220, 44693, 11361, 7822, 422, 685, 17, 60, 44807, 628, 220, 220, 220, 383, 3127, 2753, 617, 14977, 640, 12, 85, 560, 278, 15879, 355, 5128, 11, 2207, 4147, 340, 198, 220, 220, 220, 15456, 11, 290, 16628, 340, 1262, 1729, 29127, 4991, 290, 257, 4738, 42465, 198, 220, 220, 220, 3463, 17593, 39279, 416, 663, 37410, 16874, 13, 628, 220, 220, 220, 770, 1398, 635, 10639, 896, 7559, 77, 1516, 349, 571, 13, 3262, 5225, 13, 4965, 712, 10840, 15506, 11, 290, 4145, 262, 198, 220, 220, 220, 16586, 14174, 1100, 448, 318, 16019, 329, 287, 262, 976, 835, 25, 262, 3127, 318, 198, 220, 220, 220, 28590, 319, 257, 1332, 6737, 11, 290, 788, 257, 1540, 332, 318, 973, 284, 27183, 262, 198, 220, 220, 220, 39938, 4637, 19590, 13, 628, 220, 220, 220, 31458, 25, 198, 220, 220, 220, 220, 220, 220, 220, 685, 16, 60, 2638, 1378, 2503, 13, 20601, 349, 5117, 5507, 13, 2398, 14, 20205, 14, 36, 6679, 62, 5219, 62, 27349, 198, 220, 220, 220, 220, 220, 220, 220, 685, 17, 60, 2638, 1378, 10155, 82, 13, 30482, 8158, 12, 403, 1608, 13, 2934, 14, 76, 415, 292, 14, 8189, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 299, 62, 710, 333, 684, 796, 2558, 22973, 10786, 77, 62, 710, 333, 684, 3256, 4277, 28, 14202, 11, 1877, 28, 16, 8, 198, 220, 220, 220, 15225, 796, 2558, 22973, 10786, 27740, 5736, 3256, 4277, 28, 14202, 11, 1877, 28, 16, 8, 198, 220, 220, 220, 288, 83, 796, 7913, 22973, 10786, 28664, 3256, 1877, 28, 15, 11, 1877, 62, 9654, 28, 17821, 8, 198, 220, 220, 220, 42465, 62, 28869, 7512, 796, 16065, 7512, 22973, 10786, 8344, 6657, 62, 28869, 7512, 11537, 198, 220, 220, 220, 4461, 796, 7913, 22973, 10786, 48544, 3256, 1877, 28, 15, 11, 1877, 62, 9654, 28, 17821, 8, 198, 220, 220, 220, 43164, 62, 4906, 796, 3169, 44372, 6030, 22973, 10786, 710, 44372, 62, 4906, 11537, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 299, 62, 710, 333, 684, 11, 15225, 11, 42465, 62, 28869, 7512, 28, 15, 13, 22544, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1100, 448, 62, 28869, 7512, 28, 14202, 11, 2511, 4178, 28, 16, 13, 15, 11, 4461, 28, 16, 13, 1495, 11, 374, 782, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43164, 62, 4906, 28, 45557, 71, 22784, 2291, 62, 65, 4448, 28, 17821, 11, 3140, 62, 28826, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6167, 28, 14202, 11, 9403, 28, 14202, 11, 751, 62, 1462, 62, 34924, 28, 14202, 11, 12429, 641, 62, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 24243, 4340, 262, 21455, 1812, 7311, 13, 628, 220, 220, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 710, 333, 684, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 1271, 286, 16890, 284, 779, 287, 262, 22115, 13, 198, 220, 220, 220, 220, 220, 220, 220, 15225, 1058, 493, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 15793, 1483, 286, 262, 5128, 6737, 13, 198, 220, 220, 220, 220, 220, 220, 220, 42465, 62, 28869, 7512, 1058, 299, 1516, 78, 13, 28869, 45903, 13, 29934, 7512, 357, 19463, 25, 7559, 15, 13, 22544, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16065, 7512, 973, 284, 8106, 262, 42465, 4637, 13, 198, 220, 220, 220, 220, 220, 220, 220, 1100, 448, 62, 28869, 7512, 1058, 299, 1516, 78, 13, 28869, 45903, 13, 29934, 7512, 357, 19463, 25, 7559, 14202, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 32233, 6171, 7512, 284, 8106, 477, 286, 262, 23862, 878, 18120, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 262, 14174, 1100, 448, 13, 770, 318, 3017, 287, 262, 4637, 284, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7559, 22915, 15506, 19081, 2727, 1626, 262, 3127, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2511, 4178, 1058, 16578, 283, 393, 7177, 62, 2339, 11, 11902, 357, 19463, 25, 7559, 16, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 383, 16874, 286, 1123, 15793, 286, 262, 5128, 6737, 11, 973, 284, 3487, 1096, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 15619, 4637, 19590, 13, 198, 220, 220, 220, 220, 220, 220, 220, 4461, 1058, 16578, 283, 11, 11902, 357, 19463, 25, 7559, 16, 13, 1495, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 16578, 283, 4461, 319, 262, 42465, 4637, 3463, 17593, 13, 198, 220, 220, 220, 220, 220, 220, 220, 374, 782, 1058, 7559, 77, 32152, 13, 25120, 13, 29531, 9012, 15506, 11, 11902, 357, 19463, 25, 7559, 14202, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14534, 1181, 973, 284, 41216, 477, 19590, 13, 198, 220, 220, 220, 220, 220, 220, 220, 43164, 62, 4906, 1058, 7559, 77, 1516, 78, 13, 710, 333, 684, 13, 8199, 44372, 6030, 15506, 11902, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 19463, 25, 7559, 45557, 71, 3419, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3169, 44372, 2746, 284, 779, 1626, 262, 22115, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2291, 62, 65, 4448, 1058, 7559, 30388, 15506, 357, 19463, 25, 7559, 17821, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10127, 284, 2291, 257, 10690, 1459, 284, 262, 17019, 1729, 29127, 414, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 770, 815, 307, 7559, 25101, 15506, 611, 262, 43164, 2746, 1541, 468, 257, 10690, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 304, 13, 70, 1539, 7559, 43, 5064, 15506, 393, 7559, 43, 5064, 32184, 15506, 13, 198, 220, 220, 220, 220, 220, 220, 220, 3140, 62, 28826, 1058, 493, 11, 11902, 357, 19463, 25, 7559, 14202, 15506, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23262, 3804, 284, 262, 34549, 286, 16890, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 628, 220, 220, 220, 220, 220, 220, 220, 7311, 13, 834, 15003, 834, 7, 944, 11, 6167, 11, 9403, 11, 751, 62, 1462, 62, 34924, 8, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 77, 62, 710, 333, 684, 796, 299, 62, 710, 333, 684, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27740, 5736, 796, 15225, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 8344, 6657, 62, 28869, 7512, 796, 42465, 62, 28869, 7512, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6335, 4178, 796, 2511, 4178, 220, 1303, 16926, 46, 25, 787, 7177, 393, 16578, 283, 11507, 30, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 48544, 796, 4461, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 81, 782, 796, 45941, 13, 25120, 611, 374, 782, 318, 6045, 2073, 374, 782, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 710, 44372, 62, 4906, 796, 43164, 62, 4906, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 17256, 62, 65, 4448, 796, 2291, 62, 65, 4448, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 54, 62, 259, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 81, 782, 13, 25192, 7, 944, 13, 77, 62, 710, 333, 684, 11, 2116, 13, 27740, 5736, 8, 532, 657, 13, 20, 8, 1220, 2116, 13, 6335, 4178, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 17256, 62, 65, 4448, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 54, 62, 65, 4448, 796, 2116, 13, 81, 782, 13, 25192, 7, 944, 13, 77, 62, 710, 333, 684, 11, 352, 8, 532, 657, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 54, 62, 65, 4448, 796, 45941, 13, 9107, 418, 19510, 944, 13, 77, 62, 710, 333, 684, 11, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 54, 796, 2116, 13, 81, 782, 13, 25192, 7, 944, 13, 77, 62, 710, 333, 684, 11, 2116, 13, 77, 62, 710, 333, 684, 8, 532, 657, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 54, 1635, 28, 2116, 13, 48544, 1220, 3509, 7, 8937, 7, 68, 328, 7, 944, 13, 54, 38381, 15, 60, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 351, 2116, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1072, 11306, 796, 299, 1516, 78, 13, 4834, 15140, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 77, 62, 710, 333, 684, 11, 352, 11, 43164, 62, 4906, 28, 944, 13, 710, 44372, 62, 4906, 11, 9403, 28, 641, 62, 28826, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12429, 641, 62, 46265, 22046, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15414, 796, 299, 1516, 78, 13, 19667, 7, 7857, 62, 259, 28, 944, 13, 27740, 5736, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5933, 796, 2116, 13, 1072, 11306, 13, 710, 333, 684, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1516, 78, 13, 32048, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 15414, 11, 5933, 11, 6121, 28, 944, 13, 54, 62, 259, 11, 6171, 7512, 28, 14202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1516, 78, 13, 32048, 7, 220, 1303, 3465, 262, 10690, 481, 307, 4075, 1141, 3047, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1516, 78, 13, 19667, 7, 22915, 28, 16, 11, 6167, 2625, 65, 4448, 12340, 5933, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6121, 28, 944, 13, 54, 62, 65, 4448, 11, 6171, 7512, 28, 14202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1516, 78, 13, 32048, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1072, 11306, 13, 710, 333, 684, 11, 5933, 11, 6121, 28, 944, 13, 54, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6171, 7512, 28, 944, 13, 8344, 6657, 62, 28869, 7512, 8, 628, 220, 220, 220, 220, 220, 220, 220, 40425, 10840, 13, 834, 15003, 834, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 2116, 13, 15414, 11, 5933, 11, 1100, 448, 62, 28869, 7512, 28, 961, 448, 62, 28869, 7512, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3127, 28, 944, 8, 198 ]
2.375516
2,181
# -*- coding: utf-8 -*- # # Copyright Contributors to the Conu project. # SPDX-License-Identifier: MIT # """ Tests for Kubernetes backend """ from conu.backend.k8s.utils import k8s_ports_to_metadata_ports, metadata_ports_to_k8s_ports
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 25767, 669, 284, 262, 1482, 84, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 198, 198, 37811, 198, 51, 3558, 329, 12554, 527, 3262, 274, 30203, 198, 37811, 198, 198, 6738, 369, 84, 13, 1891, 437, 13, 74, 23, 82, 13, 26791, 1330, 479, 23, 82, 62, 3742, 62, 1462, 62, 38993, 62, 3742, 11, 20150, 62, 3742, 62, 1462, 62, 74, 23, 82, 62, 3742, 628 ]
2.576087
92
import matplotlib.pyplot as plt import yaml from datetime import datetime from collections import defaultdict from copy import deepcopy import itertools import numpy as np import torch as th from torch.optim import Adam import time import numpy as np import scipy.signal import torch as th import torch.nn as nn import torch.nn.functional as F from torch.distributions.normal import Normal from research.rl.buffers import OGRB, ReplayBuffer, PPOBuffer from research.rl.pponets import ActorCritic from research.define_config import env_fn from boxLCD import env_map import boxLCD from research import utils from research import wrappers #from research.nets.flat_everything import FlatEverything from jax.tree_util import tree_multimap, tree_map from ._base import RLAlgo, TN
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 331, 43695, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 355, 294, 198, 6738, 28034, 13, 40085, 1330, 7244, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 12683, 282, 198, 11748, 28034, 355, 294, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 17080, 2455, 507, 13, 11265, 1330, 14435, 198, 6738, 2267, 13, 45895, 13, 36873, 364, 1330, 440, 10761, 33, 11, 23635, 28632, 11, 21082, 9864, 13712, 198, 6738, 2267, 13, 45895, 13, 381, 261, 1039, 1330, 27274, 18559, 291, 198, 6738, 2267, 13, 13086, 62, 11250, 1330, 17365, 62, 22184, 198, 6738, 3091, 5639, 35, 1330, 17365, 62, 8899, 198, 11748, 3091, 5639, 35, 198, 6738, 2267, 1330, 3384, 4487, 198, 6738, 2267, 1330, 7917, 11799, 198, 2, 6738, 2267, 13, 45938, 13, 38568, 62, 37814, 1330, 21939, 19693, 198, 6738, 474, 897, 13, 21048, 62, 22602, 1330, 5509, 62, 16680, 320, 499, 11, 5509, 62, 8899, 198, 6738, 47540, 8692, 1330, 45715, 2348, 2188, 11, 29025 ]
3.578704
216
import asyncio from datetime import datetime from decimal import Decimal from tortoise import Tortoise import pytest @pytest.fixture(autouse=True)
[ 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 7619, 25678, 1330, 28467, 25678, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2306, 1076, 28, 17821, 8, 628, 198 ]
3.454545
44
'''input 10 10 76 4 3 10 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem B if __name__ == '__main__': operation_count = int(input()) incremental_value = int(input()) candidates = list() for i in range(operation_count + 1): result = 2 ** i + (operation_count - i) * incremental_value candidates.append(result) print(min(candidates))
[ 7061, 6, 15414, 201, 198, 940, 201, 198, 940, 201, 198, 4304, 201, 198, 19, 201, 198, 18, 201, 198, 940, 201, 198, 7061, 6, 201, 198, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 1629, 34, 12342, 16623, 1008, 27297, 201, 198, 2, 20647, 347, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 4905, 62, 9127, 796, 493, 7, 15414, 28955, 201, 198, 220, 220, 220, 29497, 62, 8367, 796, 493, 7, 15414, 28955, 201, 198, 220, 220, 220, 5871, 796, 1351, 3419, 201, 198, 201, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 27184, 62, 9127, 1343, 352, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 362, 12429, 1312, 1343, 357, 27184, 62, 9127, 532, 1312, 8, 1635, 29497, 62, 8367, 201, 198, 220, 220, 220, 220, 220, 220, 220, 5871, 13, 33295, 7, 20274, 8, 201, 198, 201, 198, 220, 220, 220, 3601, 7, 1084, 7, 46188, 37051, 4008, 201, 198 ]
2.274725
182
# -*- coding: utf-8 -*- """These test the utils.py functions.""" import pytest from hypothesis import given from hypothesis.strategies import binary from natsort.ns_enum import NSType, ns from natsort.utils import BytesTransformer, parse_bytes_factory @pytest.mark.parametrize( "alg, example_func", [ (ns.DEFAULT, lambda x: (x,)), (ns.IGNORECASE, lambda x: (x.lower(),)), # With PATH, it becomes a tested tuple. (ns.PATH, lambda x: ((x,),)), (ns.PATH | ns.IGNORECASE, lambda x: ((x.lower(),),)), ], ) @given(x=binary())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 4711, 1332, 262, 3384, 4487, 13, 9078, 5499, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 6738, 14078, 1330, 1813, 198, 6738, 14078, 13, 2536, 2397, 444, 1330, 13934, 198, 6738, 299, 1381, 419, 13, 5907, 62, 44709, 1330, 399, 2257, 2981, 11, 36545, 198, 6738, 299, 1381, 419, 13, 26791, 1330, 2750, 4879, 8291, 16354, 11, 21136, 62, 33661, 62, 69, 9548, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 366, 14016, 11, 1672, 62, 20786, 1600, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 357, 5907, 13, 7206, 38865, 11, 37456, 2124, 25, 357, 87, 35751, 828, 198, 220, 220, 220, 220, 220, 220, 220, 357, 5907, 13, 16284, 1581, 2943, 11159, 11, 37456, 2124, 25, 357, 87, 13, 21037, 22784, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2080, 46490, 11, 340, 4329, 257, 6789, 46545, 13, 198, 220, 220, 220, 220, 220, 220, 220, 357, 5907, 13, 34219, 11, 37456, 2124, 25, 14808, 87, 11, 828, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 357, 5907, 13, 34219, 930, 36545, 13, 16284, 1581, 2943, 11159, 11, 37456, 2124, 25, 14808, 87, 13, 21037, 22784, 828, 36911, 198, 220, 220, 220, 16589, 198, 8, 198, 31, 35569, 7, 87, 28, 39491, 28955, 198 ]
2.415966
238
""" *minor 7th* The minor 7th diatonic interval. """ from dataclasses import dataclass from fivear.musical.scale import Diatonic from ...simple import SimpleInterval __all__ = ["MinorSeventh"] @dataclass
[ 37811, 628, 220, 220, 220, 1635, 1084, 273, 767, 400, 9, 628, 220, 383, 4159, 767, 400, 2566, 265, 9229, 16654, 13, 198, 198, 37811, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 1936, 283, 13, 14664, 605, 13, 9888, 1330, 360, 5375, 9229, 198, 198, 6738, 2644, 36439, 1330, 17427, 9492, 2100, 198, 198, 834, 439, 834, 796, 14631, 39825, 4653, 20987, 8973, 628, 198, 31, 19608, 330, 31172, 198 ]
2.881579
76
# isort:skip_file # flake8: noqa from .html import TEMPLATE_HTML from .apps import TEMPLATE_APPS from .urls import TEMPLATE_URLS from .views import TEMPLATE_VIEWS from .tests import TEMPLATE_TESTS
[ 2, 318, 419, 25, 48267, 62, 7753, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 6738, 764, 6494, 1330, 309, 3620, 6489, 6158, 62, 28656, 198, 6738, 764, 18211, 1330, 309, 3620, 6489, 6158, 62, 2969, 3705, 198, 6738, 764, 6371, 82, 1330, 309, 3620, 6489, 6158, 62, 4261, 6561, 198, 6738, 764, 33571, 1330, 309, 3620, 6489, 6158, 62, 28206, 50, 198, 6738, 764, 41989, 1330, 309, 3620, 6489, 6158, 62, 51, 1546, 4694, 198 ]
2.538462
78
import string
[ 11748, 4731, 198 ]
4.666667
3
from typing import Dict, Optional from pydantic import BaseModel, validator
[ 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 4938, 1352, 628 ]
3.9
20
#!/usr/bin/env python3 # run in python 3.5 and after import fire import subprocess import os import re import signal import time import sys class unity(object): """An enhanced unity cli.""" if __name__ == '__main__': fire.Fire(unity)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 1057, 287, 21015, 513, 13, 20, 290, 706, 198, 11748, 2046, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 6737, 198, 11748, 640, 198, 11748, 25064, 198, 198, 4871, 14111, 7, 15252, 2599, 198, 220, 220, 220, 37227, 2025, 13105, 14111, 537, 72, 526, 15931, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2046, 13, 13543, 7, 9531, 8, 198 ]
2.951807
83
# """ Various position embedders. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import tensorflow as tf from texar.modules.embedders.embedder_base import EmbedderBase from texar.modules.embedders import embedder_utils from texar.utils.mode import is_train_mode from texar.utils.shapes import mask_sequences # pylint: disable=arguments-differ, invalid-name __all__ = [ "PositionEmbedder", "SinusoidsPositionEmbedder", ] class PositionEmbedder(EmbedderBase): """Simple position embedder that maps position indexes into embeddings via lookup. Either :attr:`init_value` or :attr:`position_size` is required. If both are given, :attr:`init_value.shape[0]` must equal :attr:`position_size`. Args: init_value (optional): A `Tensor` or numpy array that contains the initial value of embeddings. It is typically of shape `[position_size, embedding dim]` If `None`, embedding is initialized as specified in :attr:`hparams["initializer"]`. Otherwise, the :attr:`"initializer"` and :attr:`"dim"` hyperparameters in :attr:`hparams` are ignored. position_size (int, optional): The number of possible positions, e.g., the maximum sequence length. Required if :attr:`init_value` is not given. hparams (dict, optional): Embedder hyperparameters. If it is not specified, the default hyperparameter setting is used. See :attr:`default_hparams` for the sturcture and default values. """ @staticmethod def default_hparams(): """Returns a dictionary of hyperparameters with default values. Returns: A dictionary with the following structure and values. .. code-block:: python { "name": "position_embedder", "dim": 100, "initializer": { "type": "random_uniform_initializer", "kwargs": { "minval": -0.1, "maxval": 0.1, "seed": None } }, "regularizer": { "type": "L1L2", "kwargs": { "l1": 0., "l2": 0. } }, "dropout_rate": 0, "trainable": True, } See :func:`~texar.modules.default_embedding_hparams` for more details. """ hparams = embedder_utils.default_embedding_hparams() hparams["name"] = "position_embedder" return hparams def _build(self, positions=None, sequence_length=None, mode=None, **kwargs): """Embeds with look-up. Either :attr:`position` or :attr:`sequence_length` is required: - If both are given, :attr:`sequence_length` is used to mask out \ embeddings of those time steps beyond the respective sequence \ lengths. - If only :attr:`sequence_length` is given, then positions \ from 0 to sequence length - 1 are embedded. Args: positions (optional): An integer tensor containing the position ids to embed. sequence_length (optional): An integer tensor of shape `[batch_size]`. Time steps beyond the respective sequence lengths will have zero-valued embeddings. mode (optional): A tensor taking value in :tf_main:`tf.estimator.ModeKeys <estimator/ModeKeys>`, including `TRAIN`, `EVAL`, and `PREDICT`. If `None`, dropout will be controlled by :func:`texar.context.global_mode`. kwargs: Additional keyword arguments for :tf_main:`tf.nn.embedding_lookup <nn/embedding_lookup>` besides :attr:`params` and :attr:`ids`. Returns: A `Tensor` of shape `shape(inputs) + embedding dimension`. """ # Gets embedder inputs inputs = positions if positions is None: if sequence_length is None: raise ValueError( 'Either `positions` or `sequence_length` is required.') max_length = tf.reduce_max(sequence_length) single_inputs = tf.range(start=0, limit=max_length, dtype=tf.int32) # Expands `single_inputs` to have shape [batch_size, max_length] expander = tf.expand_dims(tf.ones_like(sequence_length), -1) inputs = expander * tf.expand_dims(single_inputs, 0) ids_rank = len(inputs.shape.dims) embedding = self._embedding is_training = is_train_mode(mode) # Gets dropout strategy st = self._hparams.dropout_strategy if positions is None and st == 'item': # If `inputs` is based on `sequence_length`, then dropout # strategies 'item' and 'item_type' have the same effect, we # use 'item_type' to avoid unknown noise_shape in the 'item' # strategy st = 'item_type' # Dropouts as 'item_type' before embedding if st == 'item_type': dropout_layer = self._get_dropout_layer( self._hparams, dropout_strategy=st) if dropout_layer: embedding = dropout_layer.apply(inputs=embedding, training=is_training) # Embeds outputs = tf.nn.embedding_lookup(embedding, inputs, **kwargs) # Dropouts as 'item' or 'elements' after embedding if st != 'item_type': dropout_layer = self._get_dropout_layer( self._hparams, ids_rank=ids_rank, dropout_input=outputs, dropout_strategy=st) if dropout_layer: outputs = dropout_layer.apply(inputs=outputs, training=is_training) # Optionally masks if sequence_length is not None: outputs = mask_sequences( outputs, sequence_length, tensor_rank=len(inputs.shape.dims) + self._dim_rank) return outputs @property def embedding(self): """The embedding tensor. """ return self._embedding @property def dim(self): """The embedding dimension. """ return self._dim @property def position_size(self): """The position size, i.e., maximum number of positions. """ return self._position_size class SinusoidsPositionEmbedder(EmbedderBase): """Sinusoid position embedder that maps position indexes into embeddings via sinusoid calculation. Each channel of the input Tensor is incremented by a sinusoid of a different frequency and phase. This allows attention to learn to use absolute and relative positions. Timing signals should be added to some precursors of both the query and thememory inputs to attention. The use of relative position is possible because sin(x+y) and cos(x+y) can be experessed in terms of y, sin(x) and cos(x). In particular, we use a geometric sequence of timescales starting with min_timescale and ending with max_timescale. The number of different timescales is equal to channels / 2. For each timescale, we generate the two sinusoidal signals sin(timestep/timescale) and cos(timestep/timescale). All of these sinusoids are concatenated in the channels dimension. """ def default_hparams(self): """returns a dictionary of hyperparameters with default values We use a geometric sequence of timescales starting with min_timescale and ending with max_timescale. The number of different timescales is equal to channels/2. """ hparams = { 'name':'sinusoid_posisiton_embedder', 'min_timescale': 1.0, 'max_timescale': 1.0e4, 'trainable': False, } return hparams
[ 2, 198, 37811, 198, 40009, 2292, 11525, 67, 364, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 10688, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 48659, 283, 13, 18170, 13, 20521, 67, 364, 13, 20521, 1082, 62, 8692, 1330, 13302, 276, 1082, 14881, 198, 6738, 48659, 283, 13, 18170, 13, 20521, 67, 364, 1330, 11525, 1082, 62, 26791, 198, 6738, 48659, 283, 13, 26791, 13, 14171, 1330, 318, 62, 27432, 62, 14171, 198, 6738, 48659, 283, 13, 26791, 13, 1477, 7916, 1330, 9335, 62, 3107, 3007, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 853, 2886, 12, 26069, 263, 11, 12515, 12, 3672, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 26545, 31567, 276, 1082, 1600, 198, 220, 220, 220, 366, 50, 35237, 10994, 26545, 31567, 276, 1082, 1600, 198, 60, 198, 198, 4871, 23158, 31567, 276, 1082, 7, 31567, 276, 1082, 14881, 2599, 198, 220, 220, 220, 37227, 26437, 2292, 11525, 1082, 326, 8739, 2292, 39199, 656, 11525, 67, 654, 198, 220, 220, 220, 2884, 35847, 13, 628, 220, 220, 220, 15467, 1058, 35226, 25, 63, 15003, 62, 8367, 63, 393, 1058, 35226, 25, 63, 9150, 62, 7857, 63, 318, 2672, 13, 1002, 1111, 389, 198, 220, 220, 220, 1813, 11, 1058, 35226, 25, 63, 15003, 62, 8367, 13, 43358, 58, 15, 60, 63, 1276, 4961, 1058, 35226, 25, 63, 9150, 62, 7857, 44646, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2315, 62, 8367, 357, 25968, 2599, 317, 4600, 51, 22854, 63, 393, 299, 32152, 7177, 326, 4909, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4238, 1988, 286, 11525, 67, 654, 13, 632, 318, 6032, 286, 5485, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 58, 9150, 62, 7857, 11, 11525, 12083, 5391, 60, 63, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1002, 4600, 14202, 47671, 11525, 12083, 318, 23224, 355, 7368, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 35226, 25, 63, 71, 37266, 14692, 36733, 7509, 8973, 44646, 15323, 11, 262, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 35226, 25, 63, 1, 36733, 7509, 1, 63, 290, 1058, 35226, 25, 63, 1, 27740, 1, 63, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8718, 17143, 7307, 287, 1058, 35226, 25, 63, 71, 37266, 63, 389, 9514, 13, 198, 220, 220, 220, 220, 220, 220, 220, 2292, 62, 7857, 357, 600, 11, 11902, 2599, 383, 1271, 286, 1744, 6116, 11, 304, 13, 70, 1539, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 5415, 8379, 4129, 13, 20906, 611, 1058, 35226, 25, 63, 15003, 62, 8367, 63, 318, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 407, 1813, 13, 198, 220, 220, 220, 220, 220, 220, 220, 289, 37266, 357, 11600, 11, 11902, 2599, 13302, 276, 1082, 8718, 17143, 7307, 13, 1002, 340, 318, 407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7368, 11, 262, 4277, 8718, 17143, 2357, 4634, 318, 973, 13, 4091, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 35226, 25, 63, 12286, 62, 71, 37266, 63, 329, 262, 336, 333, 48715, 290, 4277, 3815, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 12708, 24396, 198, 220, 220, 220, 825, 4277, 62, 71, 37266, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 35561, 257, 22155, 286, 8718, 17143, 7307, 351, 4277, 3815, 13, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 22155, 351, 262, 1708, 4645, 290, 3815, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11485, 2438, 12, 9967, 3712, 21015, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 9150, 62, 20521, 1082, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 27740, 1298, 1802, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 36733, 7509, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 25120, 62, 403, 6933, 62, 36733, 7509, 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, 366, 46265, 22046, 1298, 1391, 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, 366, 1084, 2100, 1298, 532, 15, 13, 16, 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, 366, 9806, 2100, 1298, 657, 13, 16, 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, 366, 28826, 1298, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16338, 7509, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4906, 1298, 366, 43, 16, 43, 17, 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, 366, 46265, 22046, 1298, 1391, 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, 366, 75, 16, 1298, 657, 1539, 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, 366, 75, 17, 1298, 657, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 14781, 448, 62, 4873, 1298, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 27432, 540, 1298, 6407, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4091, 1058, 20786, 25, 63, 93, 16886, 283, 13, 18170, 13, 12286, 62, 20521, 12083, 62, 71, 37266, 63, 329, 517, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3307, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 289, 37266, 796, 11525, 1082, 62, 26791, 13, 12286, 62, 20521, 12083, 62, 71, 37266, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 289, 37266, 14692, 3672, 8973, 796, 366, 9150, 62, 20521, 1082, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 289, 37266, 628, 220, 220, 220, 825, 4808, 11249, 7, 944, 11, 6116, 28, 14202, 11, 8379, 62, 13664, 28, 14202, 11, 4235, 28, 14202, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 31567, 5379, 351, 804, 12, 929, 13, 628, 220, 220, 220, 220, 220, 220, 220, 15467, 1058, 35226, 25, 63, 9150, 63, 393, 1058, 35226, 25, 63, 43167, 62, 13664, 63, 318, 2672, 25, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 1002, 1111, 389, 1813, 11, 1058, 35226, 25, 63, 43167, 62, 13664, 63, 318, 973, 284, 9335, 503, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11525, 67, 654, 286, 883, 640, 4831, 3675, 262, 11756, 8379, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20428, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 1002, 691, 1058, 35226, 25, 63, 43167, 62, 13664, 63, 318, 1813, 11, 788, 6116, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 422, 657, 284, 8379, 4129, 532, 352, 389, 14553, 13, 628, 220, 220, 220, 220, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6116, 357, 25968, 2599, 1052, 18253, 11192, 273, 7268, 262, 2292, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 284, 11525, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8379, 62, 13664, 357, 25968, 2599, 1052, 18253, 11192, 273, 286, 5485, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 58, 43501, 62, 7857, 60, 44646, 3862, 4831, 3675, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 262, 11756, 8379, 20428, 481, 423, 6632, 12, 39728, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11525, 67, 654, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4235, 357, 25968, 2599, 317, 11192, 273, 2263, 1988, 287, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27110, 62, 12417, 25, 63, 27110, 13, 395, 320, 1352, 13, 19076, 40729, 1279, 395, 320, 1352, 14, 19076, 40729, 29, 47671, 1390, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4600, 51, 3861, 1268, 47671, 4600, 20114, 1847, 47671, 290, 4600, 4805, 1961, 18379, 44646, 1002, 4600, 14202, 47671, 4268, 448, 481, 307, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6856, 416, 1058, 20786, 25, 63, 16886, 283, 13, 22866, 13, 20541, 62, 14171, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 86, 22046, 25, 15891, 21179, 7159, 329, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 27110, 62, 12417, 25, 63, 27110, 13, 20471, 13, 20521, 12083, 62, 5460, 929, 1279, 20471, 14, 20521, 12083, 62, 5460, 929, 29, 63, 13769, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 35226, 25, 63, 37266, 63, 290, 1058, 35226, 25, 63, 2340, 44646, 628, 220, 220, 220, 220, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 4600, 51, 22854, 63, 286, 5485, 4600, 43358, 7, 15414, 82, 8, 1343, 11525, 12083, 15793, 44646, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 29620, 11525, 1082, 17311, 198, 220, 220, 220, 220, 220, 220, 220, 17311, 796, 6116, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6116, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 8379, 62, 13664, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5298, 11052, 12331, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 32478, 4600, 1930, 1756, 63, 393, 4600, 43167, 62, 13664, 63, 318, 2672, 2637, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 13664, 796, 48700, 13, 445, 7234, 62, 9806, 7, 43167, 62, 13664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2060, 62, 15414, 82, 796, 48700, 13, 9521, 7, 9688, 28, 15, 11, 4179, 28, 9806, 62, 13664, 11, 288, 4906, 28, 27110, 13, 600, 2624, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5518, 1746, 4600, 29762, 62, 15414, 82, 63, 284, 423, 5485, 685, 43501, 62, 7857, 11, 3509, 62, 13664, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1033, 4066, 796, 48700, 13, 11201, 392, 62, 67, 12078, 7, 27110, 13, 1952, 62, 2339, 7, 43167, 62, 13664, 828, 532, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17311, 796, 1033, 4066, 1635, 48700, 13, 11201, 392, 62, 67, 12078, 7, 29762, 62, 15414, 82, 11, 657, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 62, 43027, 796, 18896, 7, 15414, 82, 13, 43358, 13, 67, 12078, 8, 628, 220, 220, 220, 220, 220, 220, 220, 11525, 12083, 796, 2116, 13557, 20521, 12083, 628, 220, 220, 220, 220, 220, 220, 220, 318, 62, 34409, 796, 318, 62, 27432, 62, 14171, 7, 14171, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 29620, 4268, 448, 4811, 198, 220, 220, 220, 220, 220, 220, 220, 336, 796, 2116, 13557, 71, 37266, 13, 14781, 448, 62, 2536, 4338, 198, 220, 220, 220, 220, 220, 220, 220, 611, 6116, 318, 6045, 290, 336, 6624, 705, 9186, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 4600, 15414, 82, 63, 318, 1912, 319, 4600, 43167, 62, 13664, 47671, 788, 4268, 448, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 10064, 705, 9186, 6, 290, 705, 9186, 62, 4906, 6, 423, 262, 976, 1245, 11, 356, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 779, 705, 9186, 62, 4906, 6, 284, 3368, 6439, 7838, 62, 43358, 287, 262, 705, 9186, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 4811, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 336, 796, 705, 9186, 62, 4906, 6, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 14258, 5269, 355, 705, 9186, 62, 4906, 6, 878, 11525, 12083, 198, 220, 220, 220, 220, 220, 220, 220, 611, 336, 6624, 705, 9186, 62, 4906, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4268, 448, 62, 29289, 796, 2116, 13557, 1136, 62, 14781, 448, 62, 29289, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 71, 37266, 11, 4268, 448, 62, 2536, 4338, 28, 301, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4268, 448, 62, 29289, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11525, 12083, 796, 4268, 448, 62, 29289, 13, 39014, 7, 15414, 82, 28, 20521, 12083, 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, 3047, 28, 271, 62, 34409, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 13302, 5379, 198, 220, 220, 220, 220, 220, 220, 220, 23862, 796, 48700, 13, 20471, 13, 20521, 12083, 62, 5460, 929, 7, 20521, 12083, 11, 17311, 11, 12429, 46265, 22046, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 14258, 5269, 355, 705, 9186, 6, 393, 705, 68, 3639, 6, 706, 11525, 12083, 198, 220, 220, 220, 220, 220, 220, 220, 611, 336, 14512, 705, 9186, 62, 4906, 10354, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4268, 448, 62, 29289, 796, 2116, 13557, 1136, 62, 14781, 448, 62, 29289, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13557, 71, 37266, 11, 220, 2340, 62, 43027, 28, 2340, 62, 43027, 11, 4268, 448, 62, 15414, 28, 22915, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4268, 448, 62, 2536, 4338, 28, 301, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 4268, 448, 62, 29289, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23862, 796, 4268, 448, 62, 29289, 13, 39014, 7, 15414, 82, 28, 22915, 82, 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, 3047, 28, 271, 62, 34409, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 16018, 453, 20680, 198, 220, 220, 220, 220, 220, 220, 220, 611, 8379, 62, 13664, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23862, 796, 9335, 62, 3107, 3007, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 23862, 11, 8379, 62, 13664, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11192, 273, 62, 43027, 28, 11925, 7, 15414, 82, 13, 43358, 13, 67, 12078, 8, 1343, 2116, 13557, 27740, 62, 43027, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 23862, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 11525, 12083, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 464, 11525, 12083, 11192, 273, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 20521, 12083, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 5391, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 464, 11525, 12083, 15793, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 27740, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 2292, 62, 7857, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 464, 2292, 2546, 11, 1312, 13, 68, 1539, 5415, 1271, 286, 6116, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2116, 13557, 9150, 62, 7857, 628, 198, 4871, 10884, 385, 10994, 26545, 31567, 276, 1082, 7, 31567, 276, 1082, 14881, 2599, 198, 220, 220, 220, 37227, 50, 35237, 1868, 2292, 11525, 1082, 326, 8739, 2292, 39199, 656, 11525, 67, 654, 198, 220, 220, 220, 2884, 7813, 385, 1868, 17952, 13, 198, 220, 220, 220, 5501, 6518, 286, 262, 5128, 309, 22854, 318, 1253, 12061, 416, 257, 7813, 385, 1868, 286, 257, 198, 220, 220, 220, 1180, 8373, 290, 7108, 13, 198, 220, 220, 220, 770, 3578, 3241, 284, 2193, 284, 779, 4112, 290, 3585, 6116, 13, 198, 220, 220, 220, 5045, 278, 10425, 815, 307, 2087, 284, 617, 3718, 1834, 669, 286, 1111, 262, 12405, 198, 220, 220, 220, 290, 606, 368, 652, 17311, 284, 3241, 13, 198, 220, 220, 220, 383, 779, 286, 3585, 2292, 318, 1744, 780, 7813, 7, 87, 10, 88, 8, 290, 198, 220, 220, 220, 8615, 7, 87, 10, 88, 8, 460, 307, 409, 431, 2790, 287, 2846, 286, 331, 11, 7813, 7, 87, 8, 290, 8615, 7, 87, 737, 198, 220, 220, 220, 554, 1948, 11, 356, 779, 257, 38445, 8379, 286, 1661, 66, 2040, 3599, 351, 198, 220, 220, 220, 949, 62, 22355, 38765, 290, 7464, 351, 3509, 62, 22355, 38765, 13, 220, 383, 1271, 286, 1180, 198, 220, 220, 220, 1661, 66, 2040, 318, 4961, 284, 9619, 1220, 362, 13, 1114, 1123, 1661, 38765, 11, 356, 198, 220, 220, 220, 7716, 262, 734, 7813, 385, 47502, 10425, 7813, 7, 16514, 395, 538, 14, 22355, 38765, 8, 290, 198, 220, 220, 220, 8615, 7, 16514, 395, 538, 14, 22355, 38765, 737, 220, 1439, 286, 777, 7813, 385, 10994, 389, 1673, 36686, 515, 287, 198, 220, 220, 220, 262, 9619, 15793, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 4277, 62, 71, 37266, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 7783, 82, 257, 22155, 286, 8718, 17143, 7307, 351, 4277, 3815, 198, 220, 220, 220, 220, 220, 220, 220, 775, 779, 257, 38445, 8379, 286, 1661, 66, 2040, 3599, 351, 198, 220, 220, 220, 220, 220, 220, 220, 949, 62, 22355, 38765, 290, 7464, 351, 3509, 62, 22355, 38765, 13, 383, 1271, 286, 1180, 198, 220, 220, 220, 220, 220, 220, 220, 1661, 66, 2040, 318, 4961, 284, 9619, 14, 17, 13, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 289, 37266, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3672, 10354, 6, 31369, 385, 1868, 62, 1930, 271, 37752, 62, 20521, 1082, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1084, 62, 22355, 38765, 10354, 352, 13, 15, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 9806, 62, 22355, 38765, 10354, 352, 13, 15, 68, 19, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 27432, 540, 10354, 10352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 289, 37266, 198 ]
2.204521
3,760
#!/usr/bin/python3 # Converts Prom1.x rule format into Prom2.x while keeping formatting # and comments. This does not work in general. Some valid Prom1 rules # files might not get converted properly. import glob import re for rules_file in glob.iglob('*.rules'): name = re.match(r'(.*)\.rules', rules_file)[1] with open(name + '.yml', mode='w') as yaml: print('groups:', file=yaml) print('- name:', name, file=yaml) print(' rules:', file=yaml) with open(rules_file) as rules: convert(rules, yaml)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 1482, 24040, 10335, 16, 13, 87, 3896, 5794, 656, 10335, 17, 13, 87, 981, 5291, 33313, 198, 2, 290, 3651, 13, 770, 857, 407, 670, 287, 2276, 13, 2773, 4938, 10335, 16, 3173, 198, 2, 3696, 1244, 407, 651, 11513, 6105, 13, 198, 198, 11748, 15095, 198, 11748, 302, 198, 198, 1640, 3173, 62, 7753, 287, 15095, 13, 38686, 672, 10786, 24620, 38785, 6, 2599, 198, 220, 220, 220, 1438, 796, 302, 13, 15699, 7, 81, 6, 7, 15885, 8, 17405, 38785, 3256, 3173, 62, 7753, 38381, 16, 60, 198, 220, 220, 220, 351, 1280, 7, 3672, 1343, 45302, 88, 4029, 3256, 4235, 11639, 86, 11537, 355, 331, 43695, 25, 198, 220, 220, 220, 220, 220, 3601, 10786, 24432, 25, 3256, 2393, 28, 88, 43695, 8, 198, 220, 220, 220, 220, 220, 3601, 10786, 12, 1438, 25, 3256, 1438, 11, 2393, 28, 88, 43695, 8, 198, 220, 220, 220, 220, 220, 3601, 10786, 220, 3173, 25, 3256, 2393, 28, 88, 43695, 8, 628, 220, 220, 220, 220, 220, 351, 1280, 7, 38785, 62, 7753, 8, 355, 3173, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10385, 7, 38785, 11, 331, 43695, 8, 628, 220, 220, 220, 220, 220, 220, 198 ]
2.579439
214
from tkinter import* from tkinter import ttk #===================FUNCTION DECLARATION============================================================================== if __name__ == '__main__': root=Tk() obj=ChatBot(root) root.mainloop()
[ 6738, 256, 74, 3849, 1330, 9, 201, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 201, 198, 201, 198, 220, 220, 1303, 4770, 18604, 42296, 4177, 2849, 27196, 43, 1503, 6234, 23926, 25609, 855, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 6808, 28, 51, 74, 3419, 201, 198, 220, 220, 220, 26181, 28, 30820, 20630, 7, 15763, 8, 201, 198, 220, 220, 220, 6808, 13, 12417, 26268, 3419, 201, 198, 220, 220, 220, 220, 201, 198 ]
1.983516
182
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. # TODO: More tests import mock import httplib import socket import StringIO import testtools import warnings from urlparse import urlparse # TODO: mock http connection class with more control over headers from .utils import fake_http_connect, fake_get_keystoneclient_2_0 from swiftclient import client as c from swiftclient import utils as u # TODO: following tests are placeholders, need more tests, better coverage if __name__ == '__main__': testtools.main()
[ 2, 15069, 357, 66, 8, 3050, 12, 6999, 4946, 25896, 11, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 198, 2, 42881, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 198, 2, 17142, 13, 198, 2, 4091, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 198, 2, 11247, 739, 262, 13789, 13, 198, 198, 2, 16926, 46, 25, 3125, 5254, 198, 11748, 15290, 198, 11748, 1841, 489, 571, 198, 11748, 17802, 198, 11748, 10903, 9399, 198, 11748, 1332, 31391, 198, 11748, 14601, 198, 6738, 19016, 29572, 1330, 19016, 29572, 198, 198, 2, 16926, 46, 25, 15290, 2638, 4637, 1398, 351, 517, 1630, 625, 24697, 198, 6738, 764, 26791, 1330, 8390, 62, 4023, 62, 8443, 11, 8390, 62, 1136, 62, 2539, 6440, 16366, 62, 17, 62, 15, 198, 198, 6738, 14622, 16366, 1330, 5456, 355, 269, 198, 6738, 14622, 16366, 1330, 3384, 4487, 355, 334, 628, 628, 628, 198, 198, 2, 16926, 46, 25, 1708, 5254, 389, 1295, 10476, 11, 761, 517, 5254, 11, 1365, 5197, 628, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 31391, 13, 12417, 3419, 198 ]
3.620805
298
import numpy as np import os from utils.load_data import load_c3d_file # declare variables path = 'D:/MoCap_Data/David/NewSession_labeled/' file = 'NeutralTrail14.c3d' save_folder = 'data/' save_name = 'David_neutral_pose' neutral_frame = 900 template_labels = ['LeftBrow1', 'LeftBrow2', 'LeftBrow3', 'LeftBrow4', 'RightBrow1', 'RightBrow2', 'RightBrow3', 'RightBrow4', 'Nose1', 'Nose2', 'Nose3', 'Nose4', 'Nose5', 'Nose6', 'Nose7', 'Nose8', 'UpperMouth1', 'UpperMouth2', 'UpperMouth3', 'UpperMouth4', 'UpperMouth5', 'LowerMouth1', 'LowerMouth2', 'LowerMouth3', 'LowerMouth4', 'LeftOrbi1', 'LeftOrbi2', 'RightOrbi1', 'RightOrbi2', 'LeftCheek1', 'LeftCheek2', 'LeftCheek3', 'RightCheek1', 'RightCheek2', 'RightCheek3', 'LeftJaw1', 'LeftJaw2', 'RightJaw1', 'RightJaw2', 'LeftEye1', 'RightEye1', 'Head1', 'Head2', 'Head3', 'Head4'] # load sequence data, labels = load_c3d_file(os.path.join(path, file), template_labels=template_labels, get_labels=True, verbose=True) print("labels", len(labels)) print(labels) print("shape data[neutral_frame]", np.shape(data[neutral_frame])) print(data[neutral_frame]) # save np.save(os.path.join(save_folder, save_name), data[neutral_frame])
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 3384, 4487, 13, 2220, 62, 7890, 1330, 3440, 62, 66, 18, 67, 62, 7753, 198, 198, 2, 13627, 9633, 198, 6978, 796, 705, 35, 14079, 16632, 15610, 62, 6601, 14, 11006, 14, 3791, 36044, 62, 18242, 276, 14, 6, 198, 7753, 796, 705, 8199, 6815, 15721, 346, 1415, 13, 66, 18, 67, 6, 198, 21928, 62, 43551, 796, 705, 7890, 14, 6, 198, 21928, 62, 3672, 796, 705, 11006, 62, 29797, 62, 3455, 6, 198, 29797, 62, 14535, 796, 15897, 198, 28243, 62, 23912, 1424, 796, 37250, 18819, 32635, 16, 3256, 705, 18819, 32635, 17, 3256, 705, 18819, 32635, 18, 3256, 705, 18819, 32635, 19, 3256, 705, 11028, 32635, 16, 3256, 705, 11028, 32635, 17, 3256, 705, 11028, 32635, 18, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11028, 32635, 19, 3256, 705, 45, 577, 16, 3256, 705, 45, 577, 17, 3256, 705, 45, 577, 18, 3256, 705, 45, 577, 19, 3256, 705, 45, 577, 20, 3256, 705, 45, 577, 21, 3256, 705, 45, 577, 22, 3256, 705, 45, 577, 23, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 52, 2848, 44, 1536, 16, 3256, 705, 52, 2848, 44, 1536, 17, 3256, 705, 52, 2848, 44, 1536, 18, 3256, 705, 52, 2848, 44, 1536, 19, 3256, 705, 52, 2848, 44, 1536, 20, 3256, 705, 31426, 44, 1536, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 31426, 44, 1536, 17, 3256, 705, 31426, 44, 1536, 18, 3256, 705, 31426, 44, 1536, 19, 3256, 705, 18819, 5574, 8482, 16, 3256, 705, 18819, 5574, 8482, 17, 3256, 705, 11028, 5574, 8482, 16, 3256, 705, 11028, 5574, 8482, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 18819, 7376, 988, 16, 3256, 705, 18819, 7376, 988, 17, 3256, 705, 18819, 7376, 988, 18, 3256, 705, 11028, 7376, 988, 16, 3256, 705, 11028, 7376, 988, 17, 3256, 705, 11028, 7376, 988, 18, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 18819, 41, 707, 16, 3256, 705, 18819, 41, 707, 17, 3256, 705, 11028, 41, 707, 16, 3256, 705, 11028, 41, 707, 17, 3256, 705, 18819, 24876, 16, 3256, 705, 11028, 24876, 16, 3256, 705, 13847, 16, 3256, 705, 13847, 17, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 13847, 18, 3256, 705, 13847, 19, 20520, 198, 198, 2, 3440, 8379, 198, 7890, 11, 14722, 796, 3440, 62, 66, 18, 67, 62, 7753, 7, 418, 13, 6978, 13, 22179, 7, 6978, 11, 2393, 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, 11055, 62, 23912, 1424, 28, 28243, 62, 23912, 1424, 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, 651, 62, 23912, 1424, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 28, 17821, 8, 198, 4798, 7203, 23912, 1424, 1600, 18896, 7, 23912, 1424, 4008, 198, 4798, 7, 23912, 1424, 8, 198, 4798, 7203, 43358, 1366, 58, 29797, 62, 14535, 60, 1600, 45941, 13, 43358, 7, 7890, 58, 29797, 62, 14535, 60, 4008, 198, 4798, 7, 7890, 58, 29797, 62, 14535, 12962, 198, 198, 2, 3613, 198, 37659, 13, 21928, 7, 418, 13, 6978, 13, 22179, 7, 21928, 62, 43551, 11, 3613, 62, 3672, 828, 1366, 58, 29797, 62, 14535, 12962 ]
2.046062
673
from senseHAT.BaseTest import SenseHATBaseTest from random import randint
[ 6738, 2565, 39, 1404, 13, 14881, 14402, 1330, 24956, 39, 1404, 14881, 14402, 198, 6738, 4738, 1330, 43720, 600, 198 ]
3.7
20
import pytest import os from jikken.database.config import get_config, write_default_config, JikkenConfig, read_config @pytest.fixture()
[ 11748, 12972, 9288, 198, 11748, 28686, 198, 6738, 474, 1134, 3464, 13, 48806, 13, 11250, 1330, 651, 62, 11250, 11, 3551, 62, 12286, 62, 11250, 11, 449, 1134, 3464, 16934, 11, 1100, 62, 11250, 628, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 628, 628 ]
3.155556
45
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
from corehq.apps.cleanup.management.commands.populate_sql_model_from_couch_model import PopulateSQLCommand
[ 6738, 4755, 71, 80, 13, 18211, 13, 27773, 929, 13, 27604, 13, 9503, 1746, 13, 12924, 5039, 62, 25410, 62, 19849, 62, 6738, 62, 66, 7673, 62, 19849, 1330, 8099, 5039, 50, 48, 5639, 2002, 392, 628 ]
2.918919
37
from OpenGLCffi.GL import params @params(api='gl', prms=[])
[ 6738, 4946, 38, 5639, 487, 72, 13, 8763, 1330, 42287, 198, 31, 37266, 7, 15042, 11639, 4743, 3256, 778, 907, 41888, 12962, 628, 198 ]
2.583333
24
from pudzu.charts import * df = pd.read_csv("datasets/flagstriband.csv") df = pd.concat([pd.DataFrame(df.colours.apply(list).tolist(), columns=list("TMB")), df], axis=1).set_index("colours") FONT, SIZE = calibri, 24 fg, bg = "black", "#EEEEEE" default_img = "https://s-media-cache-ak0.pinimg.com/736x/0d/36/e7/0d36e7a476b06333d9fe9960572b66b9.jpg" COLORS = { "W": "white", "Y": "yellow", "R": "red", "G": "green", "B": "blue", "K": "black", } W, H = 320, 200 PAD = 100 grids = list(generate_batches([grid(c) for c in COLORS], 2)) grid = Image.from_array(grids, padding=(PAD,PAD//2), bg=bg) title = Image.from_column([ Image.from_text_bounded("From Austria to Zanzibar".upper(), grid.size, 360, partial(FONT, bold=True), fg=fg, bg=bg, padding=(PAD,20)), Image.from_text_bounded("a catalog of horizontal triband flags".upper(), grid.size, 240, partial(FONT, bold=True), fg=fg, bg=bg, padding=(PAD,20)), ], padding=0) img = Image.from_column([title, grid], bg=bg, padding=(20,0)).pad(10, bg) img.place(Image.from_text("/u/Udzu", FONT(48), fg=fg, bg=bg, padding=10).pad((2,2,0,0), fg), align=1, padding=10, copy=False) img.save("output/flagstriband.png") img.resize_fixed_aspect(scale=0.5).save("output/flagstriband2.png")
[ 6738, 279, 463, 27624, 13, 354, 5889, 1330, 1635, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 7203, 19608, 292, 1039, 14, 32109, 301, 822, 392, 13, 40664, 4943, 198, 7568, 796, 279, 67, 13, 1102, 9246, 26933, 30094, 13, 6601, 19778, 7, 7568, 13, 4033, 4662, 13, 39014, 7, 4868, 737, 83, 349, 396, 22784, 15180, 28, 4868, 7203, 51, 10744, 4943, 828, 47764, 4357, 16488, 28, 16, 737, 2617, 62, 9630, 7203, 4033, 4662, 4943, 198, 198, 37, 35830, 11, 311, 35400, 796, 27417, 380, 11, 1987, 198, 40616, 11, 275, 70, 796, 366, 13424, 1600, 25113, 35039, 6500, 1, 198, 12286, 62, 9600, 796, 366, 5450, 1378, 82, 12, 11431, 12, 23870, 12, 461, 15, 13, 11635, 9600, 13, 785, 14, 49150, 87, 14, 15, 67, 14, 2623, 14, 68, 22, 14, 15, 67, 2623, 68, 22, 64, 35435, 65, 3312, 20370, 67, 24, 5036, 2079, 1899, 48724, 65, 2791, 65, 24, 13, 9479, 1, 198, 25154, 20673, 796, 1391, 366, 54, 1298, 366, 11186, 1600, 366, 56, 1298, 366, 36022, 1600, 366, 49, 1298, 366, 445, 1600, 366, 38, 1298, 366, 14809, 1600, 366, 33, 1298, 366, 17585, 1600, 366, 42, 1298, 366, 13424, 1600, 1782, 198, 54, 11, 367, 796, 20959, 11, 939, 198, 198, 47, 2885, 796, 1802, 198, 198, 2164, 2340, 796, 1351, 7, 8612, 378, 62, 8664, 2052, 26933, 25928, 7, 66, 8, 329, 269, 287, 20444, 20673, 4357, 362, 4008, 198, 25928, 796, 7412, 13, 6738, 62, 18747, 7, 2164, 2340, 11, 24511, 16193, 47, 2885, 11, 47, 2885, 1003, 17, 828, 275, 70, 28, 35904, 8, 198, 198, 7839, 796, 7412, 13, 6738, 62, 28665, 26933, 198, 220, 220, 220, 7412, 13, 6738, 62, 5239, 62, 65, 6302, 7203, 4863, 17322, 284, 1168, 35410, 571, 283, 1911, 45828, 22784, 10706, 13, 7857, 11, 11470, 11, 13027, 7, 37, 35830, 11, 10758, 28, 17821, 828, 277, 70, 28, 40616, 11, 275, 70, 28, 35904, 11, 24511, 16193, 47, 2885, 11, 1238, 36911, 198, 220, 220, 220, 7412, 13, 6738, 62, 5239, 62, 65, 6302, 7203, 64, 18388, 286, 16021, 8433, 392, 9701, 1911, 45828, 22784, 10706, 13, 7857, 11, 14956, 11, 13027, 7, 37, 35830, 11, 10758, 28, 17821, 828, 277, 70, 28, 40616, 11, 275, 70, 28, 35904, 11, 24511, 16193, 47, 2885, 11, 1238, 36911, 198, 220, 220, 220, 16589, 24511, 28, 15, 8, 198, 9600, 796, 7412, 13, 6738, 62, 28665, 26933, 7839, 11, 10706, 4357, 275, 70, 28, 35904, 11, 24511, 16193, 1238, 11, 15, 29720, 15636, 7, 940, 11, 275, 70, 8, 198, 9600, 13, 5372, 7, 5159, 13, 6738, 62, 5239, 7203, 14, 84, 14, 52, 67, 27624, 1600, 376, 35830, 7, 2780, 828, 277, 70, 28, 40616, 11, 275, 70, 28, 35904, 11, 24511, 28, 940, 737, 15636, 19510, 17, 11, 17, 11, 15, 11, 15, 828, 277, 70, 828, 10548, 28, 16, 11, 24511, 28, 940, 11, 4866, 28, 25101, 8, 198, 9600, 13, 21928, 7203, 22915, 14, 32109, 301, 822, 392, 13, 11134, 4943, 198, 9600, 13, 411, 1096, 62, 34021, 62, 292, 806, 7, 9888, 28, 15, 13, 20, 737, 21928, 7203, 22915, 14, 32109, 301, 822, 392, 17, 13, 11134, 4943, 198 ]
2.314607
534
# Copyright 2020 by Aaron Baker. # All rights reserved. # This file is part of the Nightcap Project, # and is released under the "MIT License Agreement". Please see the LICENSE # file that should have been included as part of this package. # region Imports import tempfile import shutil from nightcapcore import Printer from nightcappackages import * # endregion
[ 2, 15069, 12131, 416, 12139, 14372, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 636, 286, 262, 5265, 11128, 4935, 11, 198, 2, 290, 318, 2716, 739, 262, 366, 36393, 13789, 12729, 1911, 4222, 766, 262, 38559, 24290, 198, 2, 2393, 326, 815, 423, 587, 3017, 355, 636, 286, 428, 5301, 13, 198, 2, 3814, 1846, 3742, 198, 11748, 20218, 7753, 198, 11748, 4423, 346, 198, 6738, 1755, 11128, 7295, 1330, 1736, 3849, 198, 6738, 1755, 66, 1324, 441, 1095, 1330, 1635, 198, 2, 886, 36996 ]
4.022222
90
import socket from tkinter import * ServerIP='127.0.0.1' port = 4500 thisClient=FTPClient() thisClient.run()
[ 11748, 17802, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 10697, 4061, 11639, 16799, 13, 15, 13, 15, 13, 16, 6, 198, 634, 796, 604, 4059, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 628, 220, 220, 220, 220, 198, 198, 5661, 11792, 28, 37, 7250, 11792, 3419, 198, 198, 5661, 11792, 13, 5143, 3419 ]
2.074627
67
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: jet-to-python.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='jet-to-python.proto', package='jet_to_python', syntax='proto3', serialized_options=_b('\n\035com.hazelcast.jet.python.grpcB\023JetToPythonTopLevelP\001'), serialized_pb=_b('\n\x13jet-to-python.proto\x12\rjet_to_python\"\"\n\x0cInputMessage\x12\x12\n\ninputValue\x18\x01 \x03(\t\"$\n\rOutputMessage\x12\x13\n\x0boutputValue\x18\x01 \x03(\t2_\n\x0bJetToPython\x12P\n\rstreamingCall\x12\x1b.jet_to_python.InputMessage\x1a\x1c.jet_to_python.OutputMessage\"\x00(\x01\x30\x01\x42\x36\n\x1d\x63om.hazelcast.jet.python.grpcB\x13JetToPythonTopLevelP\x01\x62\x06proto3') ) _INPUTMESSAGE = _descriptor.Descriptor( name='InputMessage', full_name='jet_to_python.InputMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='inputValue', full_name='jet_to_python.InputMessage.inputValue', index=0, number=1, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=38, serialized_end=72, ) _OUTPUTMESSAGE = _descriptor.Descriptor( name='OutputMessage', full_name='jet_to_python.OutputMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='outputValue', full_name='jet_to_python.OutputMessage.outputValue', index=0, number=1, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=74, serialized_end=110, ) DESCRIPTOR.message_types_by_name['InputMessage'] = _INPUTMESSAGE DESCRIPTOR.message_types_by_name['OutputMessage'] = _OUTPUTMESSAGE _sym_db.RegisterFileDescriptor(DESCRIPTOR) InputMessage = _reflection.GeneratedProtocolMessageType('InputMessage', (_message.Message,), { 'DESCRIPTOR' : _INPUTMESSAGE, '__module__' : 'jet_to_python_pb2' # @@protoc_insertion_point(class_scope:jet_to_python.InputMessage) }) _sym_db.RegisterMessage(InputMessage) OutputMessage = _reflection.GeneratedProtocolMessageType('OutputMessage', (_message.Message,), { 'DESCRIPTOR' : _OUTPUTMESSAGE, '__module__' : 'jet_to_python_pb2' # @@protoc_insertion_point(class_scope:jet_to_python.OutputMessage) }) _sym_db.RegisterMessage(OutputMessage) DESCRIPTOR._options = None _JETTOPYTHON = _descriptor.ServiceDescriptor( name='JetToPython', full_name='jet_to_python.JetToPython', file=DESCRIPTOR, index=0, serialized_options=None, serialized_start=112, serialized_end=207, methods=[ _descriptor.MethodDescriptor( name='streamingCall', full_name='jet_to_python.JetToPython.streamingCall', index=0, containing_service=None, input_type=_INPUTMESSAGE, output_type=_OUTPUTMESSAGE, serialized_options=None, ), ]) _sym_db.RegisterServiceDescriptor(_JETTOPYTHON) DESCRIPTOR.services_by_name['JetToPython'] = _JETTOPYTHON # @@protoc_insertion_point(module_scope)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 12644, 12, 1462, 12, 29412, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, 60, 27, 18, 290, 357, 50033, 2124, 25, 87, 8, 393, 357, 50033, 2124, 25, 87, 13, 268, 8189, 10786, 75, 10680, 16, 6, 4008, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 43087, 355, 4808, 20147, 1968, 273, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 3275, 355, 4808, 20500, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 14580, 355, 4808, 5420, 1564, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 6194, 62, 48806, 355, 4808, 1837, 23650, 62, 48806, 198, 2, 25248, 11235, 420, 62, 28463, 295, 62, 4122, 7, 320, 3742, 8, 198, 198, 62, 37047, 62, 9945, 796, 4808, 1837, 23650, 62, 48806, 13, 19463, 3419, 628, 628, 198, 30910, 36584, 32961, 796, 4808, 20147, 1968, 273, 13, 8979, 24564, 1968, 273, 7, 198, 220, 1438, 11639, 31173, 12, 1462, 12, 29412, 13, 1676, 1462, 3256, 198, 220, 5301, 11639, 31173, 62, 1462, 62, 29412, 3256, 198, 220, 15582, 11639, 1676, 1462, 18, 3256, 198, 220, 11389, 1143, 62, 25811, 28, 62, 65, 10786, 59, 77, 59, 44215, 785, 13, 71, 41319, 2701, 13, 31173, 13, 29412, 13, 2164, 14751, 33, 59, 45310, 42273, 2514, 37906, 9126, 4971, 47, 59, 8298, 33809, 198, 220, 11389, 1143, 62, 40842, 28, 62, 65, 10786, 59, 77, 59, 87, 1485, 31173, 12, 1462, 12, 29412, 13, 1676, 1462, 59, 87, 1065, 59, 81, 31173, 62, 1462, 62, 29412, 7879, 7879, 59, 77, 59, 87, 15, 66, 20560, 12837, 59, 87, 1065, 59, 87, 1065, 59, 77, 59, 77, 15414, 11395, 59, 87, 1507, 59, 87, 486, 3467, 87, 3070, 38016, 83, 7879, 3, 59, 77, 59, 81, 26410, 12837, 59, 87, 1065, 59, 87, 1485, 59, 77, 59, 87, 15, 65, 22915, 11395, 59, 87, 1507, 59, 87, 486, 3467, 87, 3070, 38016, 83, 17, 62, 59, 77, 59, 87, 15, 65, 42273, 2514, 37906, 59, 87, 1065, 47, 59, 77, 59, 81, 5532, 278, 14134, 59, 87, 1065, 59, 87, 16, 65, 13, 31173, 62, 1462, 62, 29412, 13, 20560, 12837, 59, 87, 16, 64, 59, 87, 16, 66, 13, 31173, 62, 1462, 62, 29412, 13, 26410, 12837, 7879, 59, 87, 405, 38016, 87, 486, 59, 87, 1270, 59, 87, 486, 59, 87, 3682, 59, 87, 2623, 59, 77, 59, 87, 16, 67, 59, 87, 5066, 296, 13, 71, 41319, 2701, 13, 31173, 13, 29412, 13, 2164, 14751, 33, 59, 87, 1485, 42273, 2514, 37906, 9126, 4971, 47, 59, 87, 486, 59, 87, 5237, 59, 87, 3312, 1676, 1462, 18, 11537, 198, 8, 628, 628, 198, 62, 1268, 30076, 44, 1546, 4090, 8264, 796, 4808, 20147, 1968, 273, 13, 24564, 1968, 273, 7, 198, 220, 1438, 11639, 20560, 12837, 3256, 198, 220, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 20560, 12837, 3256, 198, 220, 29472, 28, 14202, 11, 198, 220, 2393, 28, 30910, 36584, 32961, 11, 198, 220, 7268, 62, 4906, 28, 14202, 11, 198, 220, 7032, 41888, 198, 220, 220, 220, 4808, 20147, 1968, 273, 13, 15878, 24564, 1968, 273, 7, 198, 220, 220, 220, 220, 220, 1438, 11639, 15414, 11395, 3256, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 20560, 12837, 13, 15414, 11395, 3256, 6376, 28, 15, 11, 198, 220, 220, 220, 220, 220, 1271, 28, 16, 11, 2099, 28, 24, 11, 269, 381, 62, 4906, 28, 24, 11, 6167, 28, 18, 11, 198, 220, 220, 220, 220, 220, 468, 62, 12286, 62, 8367, 28, 25101, 11, 4277, 62, 8367, 41888, 4357, 198, 220, 220, 220, 220, 220, 3275, 62, 4906, 28, 14202, 11, 33829, 62, 4906, 28, 14202, 11, 7268, 62, 4906, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 318, 62, 2302, 3004, 28, 25101, 11, 7552, 62, 29982, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 2393, 28, 30910, 36584, 32961, 828, 198, 220, 16589, 198, 220, 18366, 41888, 198, 220, 16589, 198, 220, 28376, 62, 19199, 41888, 4357, 198, 220, 33829, 62, 19199, 41888, 198, 220, 16589, 198, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 198, 220, 318, 62, 2302, 437, 540, 28, 25101, 11, 198, 220, 15582, 11639, 1676, 1462, 18, 3256, 198, 220, 7552, 62, 81, 6231, 41888, 4357, 198, 220, 530, 1659, 82, 41888, 198, 220, 16589, 198, 220, 11389, 1143, 62, 9688, 28, 2548, 11, 198, 220, 11389, 1143, 62, 437, 28, 4761, 11, 198, 8, 628, 198, 62, 2606, 7250, 3843, 44, 1546, 4090, 8264, 796, 4808, 20147, 1968, 273, 13, 24564, 1968, 273, 7, 198, 220, 1438, 11639, 26410, 12837, 3256, 198, 220, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 26410, 12837, 3256, 198, 220, 29472, 28, 14202, 11, 198, 220, 2393, 28, 30910, 36584, 32961, 11, 198, 220, 7268, 62, 4906, 28, 14202, 11, 198, 220, 7032, 41888, 198, 220, 220, 220, 4808, 20147, 1968, 273, 13, 15878, 24564, 1968, 273, 7, 198, 220, 220, 220, 220, 220, 1438, 11639, 22915, 11395, 3256, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 26410, 12837, 13, 22915, 11395, 3256, 6376, 28, 15, 11, 198, 220, 220, 220, 220, 220, 1271, 28, 16, 11, 2099, 28, 24, 11, 269, 381, 62, 4906, 28, 24, 11, 6167, 28, 18, 11, 198, 220, 220, 220, 220, 220, 468, 62, 12286, 62, 8367, 28, 25101, 11, 4277, 62, 8367, 41888, 4357, 198, 220, 220, 220, 220, 220, 3275, 62, 4906, 28, 14202, 11, 33829, 62, 4906, 28, 14202, 11, 7268, 62, 4906, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 318, 62, 2302, 3004, 28, 25101, 11, 7552, 62, 29982, 28, 14202, 11, 198, 220, 220, 220, 220, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 2393, 28, 30910, 36584, 32961, 828, 198, 220, 16589, 198, 220, 18366, 41888, 198, 220, 16589, 198, 220, 28376, 62, 19199, 41888, 4357, 198, 220, 33829, 62, 19199, 41888, 198, 220, 16589, 198, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 198, 220, 318, 62, 2302, 437, 540, 28, 25101, 11, 198, 220, 15582, 11639, 1676, 1462, 18, 3256, 198, 220, 7552, 62, 81, 6231, 41888, 4357, 198, 220, 530, 1659, 82, 41888, 198, 220, 16589, 198, 220, 11389, 1143, 62, 9688, 28, 4524, 11, 198, 220, 11389, 1143, 62, 437, 28, 11442, 11, 198, 8, 198, 198, 30910, 36584, 32961, 13, 20500, 62, 19199, 62, 1525, 62, 3672, 17816, 20560, 12837, 20520, 796, 4808, 1268, 30076, 44, 1546, 4090, 8264, 198, 30910, 36584, 32961, 13, 20500, 62, 19199, 62, 1525, 62, 3672, 17816, 26410, 12837, 20520, 796, 4808, 2606, 7250, 3843, 44, 1546, 4090, 8264, 198, 62, 37047, 62, 9945, 13, 38804, 8979, 24564, 1968, 273, 7, 30910, 36584, 32961, 8, 198, 198, 20560, 12837, 796, 4808, 5420, 1564, 13, 8645, 515, 19703, 4668, 12837, 6030, 10786, 20560, 12837, 3256, 44104, 20500, 13, 12837, 11, 828, 1391, 198, 220, 705, 30910, 36584, 32961, 6, 1058, 4808, 1268, 30076, 44, 1546, 4090, 8264, 11, 198, 220, 705, 834, 21412, 834, 6, 1058, 705, 31173, 62, 1462, 62, 29412, 62, 40842, 17, 6, 198, 220, 1303, 25248, 11235, 420, 62, 28463, 295, 62, 4122, 7, 4871, 62, 29982, 25, 31173, 62, 1462, 62, 29412, 13, 20560, 12837, 8, 198, 220, 32092, 198, 62, 37047, 62, 9945, 13, 38804, 12837, 7, 20560, 12837, 8, 198, 198, 26410, 12837, 796, 4808, 5420, 1564, 13, 8645, 515, 19703, 4668, 12837, 6030, 10786, 26410, 12837, 3256, 44104, 20500, 13, 12837, 11, 828, 1391, 198, 220, 705, 30910, 36584, 32961, 6, 1058, 4808, 2606, 7250, 3843, 44, 1546, 4090, 8264, 11, 198, 220, 705, 834, 21412, 834, 6, 1058, 705, 31173, 62, 1462, 62, 29412, 62, 40842, 17, 6, 198, 220, 1303, 25248, 11235, 420, 62, 28463, 295, 62, 4122, 7, 4871, 62, 29982, 25, 31173, 62, 1462, 62, 29412, 13, 26410, 12837, 8, 198, 220, 32092, 198, 62, 37047, 62, 9945, 13, 38804, 12837, 7, 26410, 12837, 8, 628, 198, 30910, 36584, 32961, 13557, 25811, 796, 6045, 198, 198, 62, 41, 2767, 35222, 56, 4221, 1340, 796, 4808, 20147, 1968, 273, 13, 16177, 24564, 1968, 273, 7, 198, 220, 1438, 11639, 42273, 2514, 37906, 3256, 198, 220, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 42273, 2514, 37906, 3256, 198, 220, 2393, 28, 30910, 36584, 32961, 11, 198, 220, 6376, 28, 15, 11, 198, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 198, 220, 11389, 1143, 62, 9688, 28, 14686, 11, 198, 220, 11389, 1143, 62, 437, 28, 22745, 11, 198, 220, 5050, 41888, 198, 220, 4808, 20147, 1968, 273, 13, 17410, 24564, 1968, 273, 7, 198, 220, 220, 220, 1438, 11639, 5532, 278, 14134, 3256, 198, 220, 220, 220, 1336, 62, 3672, 11639, 31173, 62, 1462, 62, 29412, 13, 42273, 2514, 37906, 13, 5532, 278, 14134, 3256, 198, 220, 220, 220, 6376, 28, 15, 11, 198, 220, 220, 220, 7268, 62, 15271, 28, 14202, 11, 198, 220, 220, 220, 5128, 62, 4906, 28, 62, 1268, 30076, 44, 1546, 4090, 8264, 11, 198, 220, 220, 220, 5072, 62, 4906, 28, 62, 2606, 7250, 3843, 44, 1546, 4090, 8264, 11, 198, 220, 220, 220, 11389, 1143, 62, 25811, 28, 14202, 11, 198, 220, 10612, 198, 12962, 198, 62, 37047, 62, 9945, 13, 38804, 16177, 24564, 1968, 273, 28264, 41, 2767, 35222, 56, 4221, 1340, 8, 198, 198, 30910, 36584, 32961, 13, 30416, 62, 1525, 62, 3672, 17816, 42273, 2514, 37906, 20520, 796, 4808, 41, 2767, 35222, 56, 4221, 1340, 198, 198, 2, 25248, 11235, 420, 62, 28463, 295, 62, 4122, 7, 21412, 62, 29982, 8, 198 ]
2.498153
1,624
from setuptools import setup setup(name='hackathon', install_requires=['pandas'], extras_require={'test': ['pytest'],}, packages=['hackathon'])
[ 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 40406, 7, 3672, 11639, 31153, 12938, 3256, 198, 220, 220, 220, 220, 220, 2721, 62, 47911, 28, 17816, 79, 392, 292, 6, 4357, 220, 198, 220, 220, 220, 220, 220, 33849, 62, 46115, 34758, 6, 9288, 10354, 37250, 9078, 9288, 6, 4357, 5512, 198, 43789, 28, 17816, 31153, 12938, 6, 12962, 198 ]
2.65
60
# # author: Paul Galatic # # This program is JUST for drawing a rounded rectangle. # import pdb from PIL import Image, ImageDraw from extern import * def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)): ''' Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawing-rounded-rectangle-with-gradient ''' upper_left_point = xy[0] bottom_right_point = xy[1] draw.rectangle( [ (upper_left_point[0], upper_left_point[1] + corner_radius), (bottom_right_point[0], bottom_right_point[1] - corner_radius) ], fill=fill, ) draw.rectangle( [ (upper_left_point[0] + corner_radius, upper_left_point[1]), (bottom_right_point[0] - corner_radius, bottom_right_point[1]) ], fill=fill, ) draw.pieslice([upper_left_point, (upper_left_point[0] + corner_radius * 2, upper_left_point[1] + corner_radius * 2)], 180, 270, fill=fill, ) draw.pieslice([(bottom_right_point[0] - corner_radius * 2, bottom_right_point[1] - corner_radius * 2), bottom_right_point], 0, 90, fill=fill, ) draw.pieslice([(upper_left_point[0], bottom_right_point[1] - corner_radius * 2), (upper_left_point[0] + corner_radius * 2, bottom_right_point[1])], 90, 180, fill=fill, ) draw.pieslice([(bottom_right_point[0] - corner_radius * 2, upper_left_point[1]), (bottom_right_point[0], upper_left_point[1] + corner_radius * 2)], 270, 360, fill=fill, )
[ 2, 198, 2, 1772, 25, 3362, 5027, 1512, 198, 2, 198, 2, 770, 1430, 318, 25848, 329, 8263, 257, 19273, 35991, 13, 198, 2, 198, 198, 11748, 279, 9945, 198, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 198, 6738, 409, 759, 1330, 1635, 198, 198, 4299, 850, 62, 2554, 9248, 7, 19334, 11, 2124, 88, 11, 5228, 62, 42172, 28, 1495, 11, 6070, 16193, 13381, 11, 14280, 11, 14280, 8, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 8090, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 39761, 4790, 2425, 14, 29412, 12, 320, 3039, 12, 32016, 12, 79, 346, 12, 19334, 278, 12, 39262, 12, 2554, 9248, 12, 4480, 12, 49607, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 6727, 62, 9464, 62, 4122, 796, 2124, 88, 58, 15, 60, 198, 220, 220, 220, 4220, 62, 3506, 62, 4122, 796, 2124, 88, 58, 16, 60, 198, 220, 220, 220, 3197, 13, 2554, 9248, 7, 198, 220, 220, 220, 220, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 45828, 62, 9464, 62, 4122, 58, 15, 4357, 6727, 62, 9464, 62, 4122, 58, 16, 60, 1343, 5228, 62, 42172, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 22487, 62, 3506, 62, 4122, 58, 15, 4357, 4220, 62, 3506, 62, 4122, 58, 16, 60, 532, 5228, 62, 42172, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16589, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3197, 13, 2554, 9248, 7, 198, 220, 220, 220, 220, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 45828, 62, 9464, 62, 4122, 58, 15, 60, 1343, 5228, 62, 42172, 11, 6727, 62, 9464, 62, 4122, 58, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 22487, 62, 3506, 62, 4122, 58, 15, 60, 532, 5228, 62, 42172, 11, 4220, 62, 3506, 62, 4122, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 16589, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3197, 13, 79, 444, 75, 501, 26933, 45828, 62, 9464, 62, 4122, 11, 357, 45828, 62, 9464, 62, 4122, 58, 15, 60, 1343, 5228, 62, 42172, 1635, 362, 11, 6727, 62, 9464, 62, 4122, 58, 16, 60, 1343, 5228, 62, 42172, 1635, 362, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 11546, 11, 198, 220, 220, 220, 220, 220, 220, 220, 20479, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3197, 13, 79, 444, 75, 501, 26933, 7, 22487, 62, 3506, 62, 4122, 58, 15, 60, 532, 5228, 62, 42172, 1635, 362, 11, 4220, 62, 3506, 62, 4122, 58, 16, 60, 532, 5228, 62, 42172, 1635, 362, 828, 4220, 62, 3506, 62, 4122, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 657, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3197, 13, 79, 444, 75, 501, 26933, 7, 45828, 62, 9464, 62, 4122, 58, 15, 4357, 4220, 62, 3506, 62, 4122, 58, 16, 60, 532, 5228, 62, 42172, 1635, 362, 828, 357, 45828, 62, 9464, 62, 4122, 58, 15, 60, 1343, 5228, 62, 42172, 1635, 362, 11, 4220, 62, 3506, 62, 4122, 58, 16, 12962, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 4101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 11546, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 3197, 13, 79, 444, 75, 501, 26933, 7, 22487, 62, 3506, 62, 4122, 58, 15, 60, 532, 5228, 62, 42172, 1635, 362, 11, 6727, 62, 9464, 62, 4122, 58, 16, 46570, 357, 22487, 62, 3506, 62, 4122, 58, 15, 4357, 6727, 62, 9464, 62, 4122, 58, 16, 60, 1343, 5228, 62, 42172, 1635, 362, 8, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 20479, 11, 198, 220, 220, 220, 220, 220, 220, 220, 11470, 11, 198, 220, 220, 220, 220, 220, 220, 220, 6070, 28, 20797, 11, 198, 220, 220, 220, 1267 ]
2.14324
747
#%% # utilities import subprocess import os import matplotlib import matplotlib.pyplot as plt import time import numpy as np from numpy import linalg import m8r as sf from scipy.ndimage.filters import gaussian_filter from scipy.ndimage.interpolation import map_coordinates from tensorflow.python.ops.image_ops_impl import _random_flip from skimage.transform import resize class _const(): """Default settings for modeling and inversion """ dx = 50 dt = 0.005 T_max = 7 nt = int(T_max / dt + 1) central_freq = 7 jgx = 2 jsx = jgx jdt = 4 sxbeg = 5000//dx gxbeg = 1000//dx szbeg = 2 jlogz = 2 trmodel = "marmvel.hh" random_state_number = 314 random_model_repeat = 100 # upsample for plotting ups_plot = 4 # one can stretch training models horizontally stretch_X_train = 1 const = _const() #%% def tf_random_flip_channels(image, seed=None): """ With a 1 in 2 chance, outputs the contents of `image` flipped along the third dimension, which is `channels`. Otherwise output the image as-is. Args: image: 4-D Tensor of shape `[batch, height, width, channels]` or 3-D Tensor of shape `[height, width, channels]`. seed: A Python integer. Used to create a random seed. See `tf.set_random_seed` for behavior. Returns: A tensor of the same type and shape as `image`. Raises: ValueError: if the shape of `image` not supported. """ return _random_flip(image, 2, seed, 'random_flip_channels') def np_to_rsf(vel, model_output, d1 = const.dx, d2 = const.dx): ''' Write 2D numpy array vel to rsf file model_output ''' yy = sf.Output(model_output) yy.put('n1',np.shape(vel)[1]) yy.put('n2',np.shape(vel)[0]) yy.put('d1',d1) yy.put('d2',d2) yy.put('o1',0) yy.put('o2',0) yy.write(vel) yy.close() def merge_dict(dict1, dict2): ''' Merge dictionaries with same keys''' dict3 = dict1.copy() for key, value in dict1.items(): dict3[key] = np.concatenate((value, dict2[key]), axis=0) return dict3 def cmd(command): """Run command and pipe what you would see in terminal into the output cell """ process = subprocess.Popen(command, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) while True: output = process.stderr.readline().decode('utf-8') if output == '' and process.poll() is not None: # this prints the stdout in the end output2 = process.stdout.read().decode('utf-8') print(output2.strip()) break if output: print(output.strip()) rc = process.poll() return rc class cd: """Context manager for changing the current working directory""" # to distort the model def elastic_transform(image, alpha, sigma, random_state_number=None, v_dx=const.dx, plot_name=None): """Elastic deformation of images as described in [Simard2003]_. .. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for Convolutional Neural Networks applied to Visual Document Analysis", in Proc. of the International Conference on Document Analysis and Recognition, 2003. """ random_state = np.random.RandomState(random_state_number) shape = image.shape #print(shape) # with our velocities dx is vertical shift dx = gaussian_filter((random_state.rand(*shape) * 2 - 1), (sigma, sigma/10, 1), mode="constant", cval=0) * 4 * alpha # with our velocities dy is horizontal dy = gaussian_filter((random_state.rand(*shape) * 2 - 1), (sigma, sigma/10, 1), mode="constant", cval=0) * alpha dz = np.zeros_like(dx) x, y, z = np.meshgrid(np.arange(shape[1]), np.arange(shape[0]), np.arange(shape[2])) indices = np.reshape(y+dy, (-1, 1)), np.reshape(x+dx, (-1, 1)), np.reshape(z, (-1, 1)) distorted_image = map_coordinates(image, indices, order=1, mode='reflect', prefilter=False) distorted_image = distorted_image.reshape(image.shape) if plot_name != None: plt_nb_T(v_dx * np.squeeze(dx[:,:]), fname=f"VerticalShifts_{alpha}", title="Vertical shifts (km)") dq_x = 100 dq_z = 17 M = np.hypot(dy.squeeze()[::dq_x,::dq_z].T, dx.squeeze()[::dq_x,::dq_z].T) M = dx.squeeze()[::dq_x,::dq_z].T M = np.squeeze(image)[::dq_x,::dq_z].T if 1: fig1, ax1 = plt.subplots(figsize=(16,9)) ax1.set_title('Guiding model') plt.imshow(1e-3*np.squeeze(image.T), extent=(0, v_dx * dx.shape[0] * 1e-3, v_dx * dx.shape[1] *1e-3, 0)) plt.axis("tight") plt.xlabel("Distance (km)") plt.ylabel("Depth (km)") plt.colorbar() Q = ax1.quiver( 1e-3*v_dx *y.squeeze()[::dq_x,::dq_z].T, 1e-3*v_dx *x.squeeze()[::dq_x,::dq_z].T, np.abs(1e-4*v_dx*dx.squeeze()[::dq_x,::dq_z].T), 1e-3*v_dx*dx.squeeze()[::dq_x,::dq_z].T, scale_units='xy', scale=1, pivot='tip') plt.savefig(f"../latex/Fig/shiftsVectors", bbox_inches='tight') plt_show_proceed() fig1, ax1 = plt.subplots(figsize=(16,9)) ax1.set_title('Distorted model') plt.imshow(1e-3*np.squeeze(distorted_image.T), extent=(0, v_dx * dx.shape[0] * 1e-3, v_dx * dx.shape[1] *1e-3, 0)) plt.axis("tight") plt.xlabel("Distance (km)") plt.ylabel("Depth (km)") plt.colorbar() Q = ax1.quiver( 1e-3*v_dx *y.squeeze()[::dq_x,::dq_z].T, 1e-3*v_dx *x.squeeze()[::dq_x,::dq_z].T, np.abs(1e-4*v_dx*dx.squeeze()[::dq_x,::dq_z].T), 1e-3*v_dx*dx.squeeze()[::dq_x,::dq_z].T, scale_units='xy', scale=1, pivot='tip') plt.savefig(f"../latex/Fig/deformedModel{plot_name}", bbox_inches='tight') plt_show_proceed() return distorted_image
[ 2, 16626, 198, 2, 20081, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 300, 1292, 70, 198, 11748, 285, 23, 81, 355, 264, 69, 198, 6738, 629, 541, 88, 13, 358, 9060, 13, 10379, 1010, 1330, 31986, 31562, 62, 24455, 198, 6738, 629, 541, 88, 13, 358, 9060, 13, 3849, 16104, 341, 1330, 3975, 62, 37652, 17540, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 2840, 13, 9060, 62, 2840, 62, 23928, 1330, 4808, 25120, 62, 2704, 541, 198, 6738, 1341, 9060, 13, 35636, 1330, 47558, 198, 198, 4871, 4808, 9979, 33529, 198, 220, 220, 220, 37227, 19463, 6460, 329, 21128, 290, 287, 9641, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 44332, 796, 2026, 198, 220, 220, 220, 288, 83, 796, 657, 13, 22544, 198, 220, 220, 220, 309, 62, 9806, 796, 767, 198, 220, 220, 220, 299, 83, 796, 493, 7, 51, 62, 9806, 1220, 288, 83, 1343, 352, 8, 198, 220, 220, 220, 4318, 62, 19503, 80, 796, 767, 198, 220, 220, 220, 474, 70, 87, 796, 362, 198, 220, 220, 220, 44804, 87, 796, 474, 70, 87, 198, 220, 220, 220, 474, 28664, 796, 604, 198, 220, 220, 220, 264, 87, 1350, 70, 796, 23336, 1003, 34350, 198, 220, 220, 220, 308, 87, 1350, 70, 796, 8576, 1003, 34350, 198, 220, 220, 220, 264, 89, 1350, 70, 796, 362, 198, 220, 220, 220, 474, 6404, 89, 796, 362, 198, 220, 220, 220, 491, 19849, 796, 366, 76, 1670, 626, 13, 12337, 1, 198, 220, 220, 220, 4738, 62, 5219, 62, 17618, 796, 34085, 198, 220, 220, 220, 4738, 62, 19849, 62, 44754, 796, 1802, 198, 220, 220, 220, 1303, 19649, 1403, 329, 29353, 198, 220, 220, 220, 19649, 62, 29487, 796, 604, 198, 220, 220, 220, 1303, 530, 460, 7539, 3047, 4981, 36774, 220, 198, 220, 220, 220, 7539, 62, 55, 62, 27432, 796, 352, 198, 198, 9979, 796, 4808, 9979, 3419, 198, 198, 2, 16626, 198, 4299, 48700, 62, 25120, 62, 2704, 541, 62, 354, 8961, 7, 9060, 11, 9403, 28, 14202, 2599, 198, 220, 37227, 198, 220, 2080, 257, 352, 287, 362, 2863, 11, 23862, 262, 10154, 286, 4600, 9060, 63, 26157, 1863, 262, 198, 220, 2368, 15793, 11, 543, 318, 4600, 354, 8961, 44646, 220, 15323, 5072, 262, 2939, 355, 12, 271, 13, 628, 220, 943, 14542, 25, 198, 220, 220, 220, 2939, 25, 604, 12, 35, 309, 22854, 286, 5485, 4600, 58, 43501, 11, 6001, 11, 9647, 11, 9619, 60, 63, 393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 513, 12, 35, 309, 22854, 286, 5485, 4600, 58, 17015, 11, 9647, 11, 9619, 60, 44646, 198, 220, 220, 220, 9403, 25, 317, 11361, 18253, 13, 16718, 284, 2251, 257, 4738, 9403, 13, 4091, 198, 220, 220, 220, 220, 220, 4600, 27110, 13, 2617, 62, 25120, 62, 28826, 63, 198, 220, 220, 220, 220, 220, 329, 4069, 13, 628, 220, 16409, 25, 198, 220, 220, 220, 317, 11192, 273, 286, 262, 976, 2099, 290, 5485, 355, 4600, 9060, 44646, 628, 220, 7567, 2696, 25, 198, 220, 220, 220, 11052, 12331, 25, 611, 262, 5485, 286, 4600, 9060, 63, 407, 4855, 13, 198, 220, 37227, 198, 220, 1441, 4808, 25120, 62, 2704, 541, 7, 9060, 11, 362, 11, 9403, 11, 705, 25120, 62, 2704, 541, 62, 354, 8961, 11537, 198, 198, 4299, 45941, 62, 1462, 62, 3808, 69, 7, 626, 11, 2746, 62, 22915, 11, 288, 16, 796, 1500, 13, 34350, 11, 288, 17, 796, 1500, 13, 34350, 2599, 198, 220, 220, 220, 705, 7061, 19430, 362, 35, 299, 32152, 7177, 11555, 284, 374, 28202, 2393, 2746, 62, 22915, 705, 7061, 198, 220, 220, 220, 331, 88, 796, 264, 69, 13, 26410, 7, 19849, 62, 22915, 8, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 77, 16, 3256, 37659, 13, 43358, 7, 626, 38381, 16, 12962, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 77, 17, 3256, 37659, 13, 43358, 7, 626, 38381, 15, 12962, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 67, 16, 3256, 67, 16, 8, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 67, 17, 3256, 67, 17, 8, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 78, 16, 3256, 15, 8, 198, 220, 220, 220, 331, 88, 13, 1996, 10786, 78, 17, 3256, 15, 8, 198, 220, 220, 220, 331, 88, 13, 13564, 7, 626, 8, 198, 220, 220, 220, 331, 88, 13, 19836, 3419, 198, 220, 220, 220, 220, 198, 4299, 20121, 62, 11600, 7, 11600, 16, 11, 8633, 17, 2599, 198, 220, 220, 220, 705, 7061, 39407, 48589, 3166, 351, 976, 8251, 7061, 6, 198, 220, 220, 220, 8633, 18, 796, 8633, 16, 13, 30073, 3419, 198, 220, 220, 220, 329, 1994, 11, 1988, 287, 8633, 16, 13, 23814, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 8633, 18, 58, 2539, 60, 796, 45941, 13, 1102, 9246, 268, 378, 19510, 8367, 11, 8633, 17, 58, 2539, 46570, 16488, 28, 15, 8, 198, 220, 220, 220, 1441, 8633, 18, 198, 198, 4299, 23991, 7, 21812, 2599, 198, 220, 220, 220, 37227, 10987, 3141, 290, 12656, 644, 345, 561, 766, 287, 12094, 656, 262, 5072, 2685, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1429, 796, 850, 14681, 13, 47, 9654, 7, 21812, 11, 336, 1082, 81, 28, 7266, 14681, 13, 47, 4061, 36, 11, 14367, 448, 28, 7266, 14681, 13, 47, 4061, 36, 11, 7582, 28, 17821, 8, 198, 220, 220, 220, 981, 6407, 25, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 796, 1429, 13, 301, 1082, 81, 13, 961, 1370, 22446, 12501, 1098, 10786, 40477, 12, 23, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5072, 6624, 10148, 290, 1429, 13, 30393, 3419, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 428, 20842, 262, 14367, 448, 287, 262, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 17, 796, 1429, 13, 19282, 448, 13, 961, 22446, 12501, 1098, 10786, 40477, 12, 23, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 22915, 17, 13, 36311, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5072, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 22915, 13, 36311, 28955, 198, 220, 220, 220, 48321, 796, 1429, 13, 30393, 3419, 198, 220, 220, 220, 1441, 48321, 198, 198, 4871, 22927, 25, 198, 220, 220, 220, 37227, 21947, 4706, 329, 5609, 262, 1459, 1762, 8619, 37811, 198, 198, 2, 284, 30867, 262, 2746, 198, 4299, 27468, 62, 35636, 7, 9060, 11, 17130, 11, 264, 13495, 11, 4738, 62, 5219, 62, 17618, 28, 14202, 11, 410, 62, 34350, 28, 9979, 13, 34350, 11, 7110, 62, 3672, 28, 14202, 2599, 198, 220, 220, 220, 37227, 9527, 3477, 390, 1161, 286, 4263, 355, 3417, 287, 685, 8890, 446, 16088, 60, 44807, 198, 220, 220, 220, 11485, 685, 8890, 446, 16088, 60, 3184, 446, 11, 2441, 676, 430, 385, 290, 1345, 1078, 11, 366, 13014, 42134, 329, 198, 220, 220, 220, 220, 220, 220, 34872, 2122, 282, 47986, 27862, 5625, 284, 15612, 16854, 14691, 1600, 287, 198, 220, 220, 220, 220, 220, 220, 31345, 13, 286, 262, 4037, 8785, 319, 16854, 14691, 290, 198, 220, 220, 220, 220, 220, 220, 31517, 653, 11, 5816, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 198, 220, 220, 220, 4738, 62, 5219, 796, 45941, 13, 25120, 13, 29531, 9012, 7, 25120, 62, 5219, 62, 17618, 8, 628, 220, 220, 220, 5485, 796, 2939, 13, 43358, 198, 220, 220, 220, 1303, 4798, 7, 43358, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 351, 674, 11555, 420, 871, 44332, 318, 11723, 6482, 198, 220, 220, 220, 44332, 796, 31986, 31562, 62, 24455, 19510, 25120, 62, 5219, 13, 25192, 46491, 43358, 8, 1635, 362, 532, 352, 828, 357, 82, 13495, 11, 264, 13495, 14, 940, 11, 352, 828, 4235, 2625, 9979, 415, 1600, 269, 2100, 28, 15, 8, 1635, 604, 1635, 17130, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 351, 674, 11555, 420, 871, 20268, 318, 16021, 198, 220, 220, 220, 20268, 796, 31986, 31562, 62, 24455, 19510, 25120, 62, 5219, 13, 25192, 46491, 43358, 8, 1635, 362, 532, 352, 828, 357, 82, 13495, 11, 264, 13495, 14, 940, 11, 352, 828, 220, 4235, 2625, 9979, 415, 1600, 269, 2100, 28, 15, 8, 1635, 17130, 198, 220, 220, 220, 288, 89, 796, 45941, 13, 9107, 418, 62, 2339, 7, 34350, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2124, 11, 331, 11, 1976, 796, 45941, 13, 76, 5069, 25928, 7, 37659, 13, 283, 858, 7, 43358, 58, 16, 46570, 45941, 13, 283, 858, 7, 43358, 58, 15, 46570, 45941, 13, 283, 858, 7, 43358, 58, 17, 60, 4008, 198, 220, 220, 220, 36525, 796, 45941, 13, 3447, 1758, 7, 88, 10, 9892, 11, 13841, 16, 11, 352, 36911, 45941, 13, 3447, 1758, 7, 87, 10, 34350, 11, 13841, 16, 11, 352, 36911, 220, 45941, 13, 3447, 1758, 7, 89, 11, 13841, 16, 11, 352, 4008, 198, 220, 220, 220, 220, 198, 220, 220, 220, 26987, 62, 9060, 796, 3975, 62, 37652, 17540, 7, 9060, 11, 36525, 11, 1502, 28, 16, 11, 4235, 11639, 35051, 3256, 7694, 346, 353, 28, 25101, 8, 198, 220, 220, 220, 26987, 62, 9060, 796, 26987, 62, 9060, 13, 3447, 1758, 7, 9060, 13, 43358, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 611, 7110, 62, 3672, 14512, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 62, 46803, 62, 51, 7, 85, 62, 34350, 1635, 45941, 13, 16485, 1453, 2736, 7, 34350, 58, 45299, 25, 46570, 277, 3672, 28, 69, 1, 42369, 605, 2484, 19265, 23330, 26591, 92, 1600, 3670, 2625, 42369, 605, 15381, 357, 13276, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 288, 80, 62, 87, 796, 1802, 198, 220, 220, 220, 220, 220, 220, 220, 288, 80, 62, 89, 796, 1596, 198, 220, 220, 220, 220, 220, 220, 220, 337, 796, 45941, 13, 36362, 313, 7, 9892, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 44332, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 337, 796, 44332, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 198, 220, 220, 220, 220, 220, 220, 220, 337, 796, 45941, 13, 16485, 1453, 2736, 7, 9060, 38381, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 198, 220, 220, 220, 220, 220, 220, 220, 611, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2336, 16, 11, 7877, 16, 796, 458, 83, 13, 7266, 489, 1747, 7, 5647, 7857, 16193, 1433, 11, 24, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7877, 16, 13, 2617, 62, 7839, 10786, 8205, 2530, 2746, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 320, 12860, 7, 16, 68, 12, 18, 9, 37659, 13, 16485, 1453, 2736, 7, 9060, 13, 51, 828, 6287, 16193, 15, 11, 410, 62, 34350, 1635, 44332, 13, 43358, 58, 15, 60, 1635, 352, 68, 12, 18, 11, 410, 62, 34350, 1635, 44332, 13, 43358, 58, 16, 60, 1635, 16, 68, 12, 18, 11, 657, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 22704, 7203, 33464, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 87, 18242, 7203, 45767, 357, 13276, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 2645, 9608, 7203, 48791, 357, 13276, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 8043, 5657, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1195, 796, 7877, 16, 13, 421, 1428, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 68, 12, 18, 9, 85, 62, 34350, 1635, 88, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 352, 68, 12, 18, 9, 85, 62, 34350, 1635, 87, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 8937, 7, 16, 68, 12, 19, 9, 85, 62, 34350, 9, 34350, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 828, 352, 68, 12, 18, 9, 85, 62, 34350, 9, 34350, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5046, 62, 41667, 11639, 5431, 3256, 5046, 28, 16, 11, 30355, 11639, 22504, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 21928, 5647, 7, 69, 1, 40720, 17660, 87, 14, 14989, 14, 1477, 19265, 53, 478, 669, 1600, 275, 3524, 62, 45457, 11639, 33464, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 458, 83, 62, 12860, 62, 1676, 2707, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 2336, 16, 11, 7877, 16, 796, 458, 83, 13, 7266, 489, 1747, 7, 5647, 7857, 16193, 1433, 11, 24, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 7877, 16, 13, 2617, 62, 7839, 10786, 20344, 9741, 2746, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 320, 12860, 7, 16, 68, 12, 18, 9, 37659, 13, 16485, 1453, 2736, 7, 17080, 9741, 62, 9060, 13, 51, 828, 6287, 16193, 15, 11, 410, 62, 34350, 1635, 44332, 13, 43358, 58, 15, 60, 1635, 352, 68, 12, 18, 11, 410, 62, 34350, 1635, 44332, 13, 43358, 58, 16, 60, 1635, 16, 68, 12, 18, 11, 657, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 22704, 7203, 33464, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 87, 18242, 7203, 45767, 357, 13276, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 2645, 9608, 7203, 48791, 357, 13276, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 8043, 5657, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 796, 7877, 16, 13, 421, 1428, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 352, 68, 12, 18, 9, 85, 62, 34350, 1635, 88, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 352, 68, 12, 18, 9, 85, 62, 34350, 1635, 87, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 8937, 7, 16, 68, 12, 19, 9, 85, 62, 34350, 9, 34350, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 828, 352, 68, 12, 18, 9, 85, 62, 34350, 9, 34350, 13, 16485, 1453, 2736, 3419, 58, 3712, 49506, 62, 87, 11, 3712, 49506, 62, 89, 4083, 51, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5046, 62, 41667, 11639, 5431, 3256, 5046, 28, 16, 11, 30355, 11639, 22504, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 13, 21928, 5647, 7, 69, 1, 40720, 17660, 87, 14, 14989, 14, 2934, 12214, 17633, 90, 29487, 62, 3672, 92, 1600, 275, 3524, 62, 45457, 11639, 33464, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 458, 83, 62, 12860, 62, 1676, 2707, 3419, 628, 220, 220, 220, 1441, 26987, 62, 9060 ]
2.156791
2,717
"""Test the analog.main module and CLI.""" from __future__ import (absolute_import, division, print_function, unicode_literals) try: from unittest import mock except ImportError: import mock import pytest import analog @pytest.fixture def tmp_logfile(tmpdir): """Fixture creating a temporary logfile. :returns: local tempfile object. """ log_name = 'logmock.log' logfile = tmpdir.join(log_name) logfile.write("log entry #1") return logfile def test_help(capsys): """analog --help prints help and describes arguments.""" with pytest.raises(SystemExit): analog.main(['analog', '--help']) out, err = capsys.readouterr() # main docstring is used as help description assert analog.main.__doc__ in out # analog arguments are listed assert '--config' in out assert '--version' in out assert '--format' in out assert '--regex' in out assert '--max-age' in out assert '--print-stats' in out assert '--print-path-stats' in out def test_format_or_regex_required(capsys, tmp_logfile): """analog requires log --format or pattern --regex.""" with pytest.raises(SystemExit) as exit: analog.main(['analog', str(tmp_logfile)]) assert exit.errisinstance(analog.MissingFormatError) @mock.patch('analog.analyze', return_value=analog.Report([], [])) def test_paths(mock_analyze, capsys, tmp_logfile): """analog --path specifies paths to monitor.""" with pytest.raises(SystemExit): # the --path argument can be specified multiple times, also as -p analog.main(['analog', '--format', 'nginx', '--config', '/foo/bar', str(tmp_logfile)]) mock_analyze.assert_called_once_with( log=mock.ANY, format='nginx', config='/foo/bar', max_age=10, print_stats=False, print_path_stats=False)
[ 37811, 14402, 262, 15075, 13, 12417, 8265, 290, 43749, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 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, 28000, 1098, 62, 17201, 874, 8, 198, 28311, 25, 198, 220, 220, 220, 422, 555, 715, 395, 1330, 15290, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 15075, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198, 4299, 45218, 62, 6404, 7753, 7, 22065, 15908, 2599, 198, 220, 220, 220, 37227, 37, 9602, 4441, 257, 8584, 2604, 7753, 13, 628, 220, 220, 220, 1058, 7783, 82, 25, 1957, 20218, 7753, 2134, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 2604, 62, 3672, 796, 705, 6404, 76, 735, 13, 6404, 6, 198, 220, 220, 220, 2604, 7753, 796, 45218, 15908, 13, 22179, 7, 6404, 62, 3672, 8, 198, 220, 220, 220, 2604, 7753, 13, 13564, 7203, 6404, 5726, 1303, 16, 4943, 198, 220, 220, 220, 1441, 2604, 7753, 628, 198, 4299, 1332, 62, 16794, 7, 27979, 893, 2599, 198, 220, 220, 220, 37227, 272, 11794, 1377, 16794, 20842, 1037, 290, 8477, 7159, 526, 15931, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11964, 30337, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 15075, 13, 12417, 7, 17816, 272, 11794, 3256, 705, 438, 16794, 6, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 503, 11, 11454, 796, 11022, 893, 13, 961, 39605, 81, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1388, 2205, 8841, 318, 973, 355, 1037, 6764, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 15075, 13, 12417, 13, 834, 15390, 834, 287, 503, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 15075, 7159, 389, 5610, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 11250, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 9641, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 18982, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 260, 25636, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 9806, 12, 496, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 4798, 12, 34242, 6, 287, 503, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 705, 438, 4798, 12, 6978, 12, 34242, 6, 287, 503, 628, 198, 4299, 1332, 62, 18982, 62, 273, 62, 260, 25636, 62, 35827, 7, 27979, 893, 11, 45218, 62, 6404, 7753, 2599, 198, 220, 220, 220, 37227, 272, 11794, 4433, 2604, 1377, 18982, 393, 3912, 1377, 260, 25636, 526, 15931, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11964, 30337, 8, 355, 8420, 25, 198, 220, 220, 220, 220, 220, 220, 220, 15075, 13, 12417, 7, 17816, 272, 11794, 3256, 965, 7, 22065, 62, 6404, 7753, 8, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 6818, 8420, 13, 263, 2442, 39098, 7, 272, 11794, 13, 43730, 26227, 12331, 8, 628, 198, 31, 76, 735, 13, 17147, 10786, 272, 11794, 13, 38200, 2736, 3256, 1441, 62, 8367, 28, 272, 11794, 13, 19100, 26933, 4357, 17635, 4008, 198, 4299, 1332, 62, 6978, 82, 7, 76, 735, 62, 38200, 2736, 11, 11022, 893, 11, 45218, 62, 6404, 7753, 2599, 198, 220, 220, 220, 37227, 272, 11794, 1377, 6978, 26052, 13532, 284, 5671, 526, 15931, 198, 220, 220, 220, 351, 12972, 9288, 13, 430, 2696, 7, 11964, 30337, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 262, 1377, 6978, 4578, 460, 307, 7368, 3294, 1661, 11, 635, 355, 532, 79, 198, 220, 220, 220, 220, 220, 220, 220, 15075, 13, 12417, 7, 17816, 272, 11794, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 18982, 3256, 705, 782, 28413, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 438, 11250, 3256, 31051, 21943, 14, 5657, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 965, 7, 22065, 62, 6404, 7753, 8, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 38200, 2736, 13, 30493, 62, 7174, 62, 27078, 62, 4480, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2604, 28, 76, 735, 13, 31827, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5794, 11639, 782, 28413, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 11639, 14, 21943, 14, 5657, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 62, 496, 28, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 34242, 28, 25101, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 62, 6978, 62, 34242, 28, 25101, 8, 198 ]
2.318442
873
'''Global Helpers''' # pylint: disable=invalid-name,superfluous-parens,missing-docstring,wildcard-import,unused-wildcard-import from sys import platform import os import sys import re import traceback import webbrowser import subprocess from shutil import copytree, rmtree from platform import python_version from configparser import ConfigParser from threading import Timer import cchardet from PySide2 import QtGui, QtCore, __version__ from PySide2.QtWidgets import QFileDialog, QMessageBox, QWidget from src.globals import data from src.globals.constants import * from src.gui.file_dialog import FileDialog from src.gui.alerts import MessageCouldntOpenFile, MessageNotConfigured, MessageUnsupportedOS def copyFolder(src, dst): '''Copy folder from src to dst''' dst = os.path.normpath(dst) src = os.path.normpath(src) print( f'copying from {src} to {dst} (exists: {os.path.isdir(os.path.normpath(dst))})') rmtree(dst, ignore_errors=True) while os.path.isdir(dst): pass copytree(src, dst) def restartProgram(): '''Restarts the program''' data.config.write() python = sys.executable os.execl(python, python, *sys.argv) def getFile(directory="", extensions="", title="Select Files or Folders"): '''Opens custom dialog for selecting multiple folders or files''' return FileDialog(None, title, str(directory), str(extensions)).selectedFiles def getSize(start_path='.'): '''Calculates the size of the selected folder''' total_size = 0 for dirpath, _, filenames in os.walk(start_path): for f in filenames: fp = os.path.join(dirpath, f) total_size += os.path.getsize(fp) return total_size def getIcon(filename): '''Gets icon from the res folder''' icon = QtGui.QIcon() icon.addFile(getProgramRootFolder() + '/res/' + filename) return icon def getKey(item): '''Helper function for the mod list''' return item[1] def isData(name): '''Checks if given name represents correct mod folder or not''' return re.match(r"^(~|)mod.+$", name) def fixUserSettingsDuplicateBrackets(): '''Fix invalid section names in user.settings''' try: config = ConfigParser(strict=False) config.optionxform = str config.read(data.config.settings + "/user.settings", encoding=detectEncoding(data.config.settings + "/user.settings")) for section in config.sections(): newSection = section while newSection[:1] == "[": newSection = newSection[1:] while newSection[-1:] == "]": newSection = newSection[:-1] if newSection != section: items = config.items(section) if not config.has_section(newSection): config.add_section(newSection) for item in items: config.set(newSection, item[0], item[1]) config.remove_section(section) with open(data.config.settings+"/user.settings", 'w', encoding="utf-8") as userfile: config.write(userfile, space_around_delimiters=False) except: print("fixing duplicate brackets failed") def throttle(ms: int): """Decorator ensures function that can only be called once every `ms` milliseconds""" from datetime import datetime, timedelta return decorate def debounce(ms: int): """Debounce a functions execution by {ms} milliseconds""" return decorator
[ 7061, 6, 22289, 10478, 364, 7061, 6, 198, 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 11, 16668, 35522, 516, 12, 11730, 82, 11, 45688, 12, 15390, 8841, 11, 21992, 9517, 12, 11748, 11, 403, 1484, 12, 21992, 9517, 12, 11748, 198, 198, 6738, 25064, 1330, 3859, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 12854, 1891, 198, 11748, 3992, 40259, 198, 11748, 850, 14681, 198, 6738, 4423, 346, 1330, 4866, 21048, 11, 374, 16762, 631, 198, 6738, 3859, 1330, 21015, 62, 9641, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 4704, 278, 1330, 5045, 263, 198, 11748, 269, 30215, 316, 198, 198, 6738, 9485, 24819, 17, 1330, 33734, 8205, 72, 11, 33734, 14055, 11, 11593, 9641, 834, 198, 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 8979, 44204, 11, 1195, 12837, 14253, 11, 1195, 38300, 198, 198, 6738, 12351, 13, 4743, 672, 874, 1330, 1366, 198, 6738, 12351, 13, 4743, 672, 874, 13, 9979, 1187, 1330, 1635, 198, 6738, 12351, 13, 48317, 13, 7753, 62, 38969, 519, 1330, 9220, 44204, 198, 6738, 12351, 13, 48317, 13, 44598, 82, 1330, 16000, 23722, 429, 11505, 8979, 11, 16000, 3673, 16934, 1522, 11, 16000, 3118, 15999, 2640, 628, 628, 628, 628, 628, 628, 628, 198, 198, 4299, 4866, 41092, 7, 10677, 11, 29636, 2599, 198, 220, 220, 220, 705, 7061, 29881, 9483, 422, 12351, 284, 29636, 7061, 6, 198, 220, 220, 220, 29636, 796, 28686, 13, 6978, 13, 27237, 6978, 7, 67, 301, 8, 198, 220, 220, 220, 12351, 796, 28686, 13, 6978, 13, 27237, 6978, 7, 10677, 8, 198, 220, 220, 220, 3601, 7, 198, 220, 220, 220, 220, 220, 220, 220, 277, 6, 22163, 1112, 422, 1391, 10677, 92, 284, 1391, 67, 301, 92, 357, 1069, 1023, 25, 1391, 418, 13, 6978, 13, 9409, 343, 7, 418, 13, 6978, 13, 27237, 6978, 7, 67, 301, 4008, 30072, 11537, 198, 220, 220, 220, 374, 16762, 631, 7, 67, 301, 11, 8856, 62, 48277, 28, 17821, 8, 198, 220, 220, 220, 981, 28686, 13, 6978, 13, 9409, 343, 7, 67, 301, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 4866, 21048, 7, 10677, 11, 29636, 8, 628, 198, 4299, 15765, 15167, 33529, 198, 220, 220, 220, 705, 7061, 19452, 5889, 262, 1430, 7061, 6, 198, 220, 220, 220, 1366, 13, 11250, 13, 13564, 3419, 198, 220, 220, 220, 21015, 796, 25064, 13, 18558, 18187, 198, 220, 220, 220, 28686, 13, 13499, 565, 7, 29412, 11, 21015, 11, 1635, 17597, 13, 853, 85, 8, 628, 198, 4299, 651, 8979, 7, 34945, 2625, 1600, 18366, 2625, 1600, 3670, 2625, 17563, 13283, 393, 39957, 364, 1, 2599, 198, 220, 220, 220, 705, 7061, 18257, 641, 2183, 17310, 329, 17246, 3294, 24512, 393, 3696, 7061, 6, 198, 220, 220, 220, 1441, 9220, 44204, 7, 14202, 11, 3670, 11, 965, 7, 34945, 828, 965, 7, 2302, 5736, 29720, 34213, 25876, 628, 198, 4299, 651, 10699, 7, 9688, 62, 6978, 11639, 2637, 2599, 198, 220, 220, 220, 705, 7061, 9771, 3129, 689, 262, 2546, 286, 262, 6163, 9483, 7061, 6, 198, 220, 220, 220, 2472, 62, 7857, 796, 657, 198, 220, 220, 220, 329, 26672, 6978, 11, 4808, 11, 1226, 268, 1047, 287, 28686, 13, 11152, 7, 9688, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 277, 287, 1226, 268, 1047, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 79, 796, 28686, 13, 6978, 13, 22179, 7, 15908, 6978, 11, 277, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2472, 62, 7857, 15853, 28686, 13, 6978, 13, 11407, 1096, 7, 46428, 8, 198, 220, 220, 220, 1441, 2472, 62, 7857, 628, 198, 4299, 651, 19578, 7, 34345, 2599, 198, 220, 220, 220, 705, 7061, 38, 1039, 7196, 422, 262, 581, 9483, 7061, 6, 198, 220, 220, 220, 7196, 796, 33734, 8205, 72, 13, 48, 19578, 3419, 198, 220, 220, 220, 7196, 13, 2860, 8979, 7, 1136, 15167, 30016, 41092, 3419, 1343, 31051, 411, 14, 6, 1343, 29472, 8, 198, 220, 220, 220, 1441, 7196, 628, 198, 4299, 651, 9218, 7, 9186, 2599, 198, 220, 220, 220, 705, 7061, 47429, 2163, 329, 262, 953, 1351, 7061, 6, 198, 220, 220, 220, 1441, 2378, 58, 16, 60, 628, 198, 4299, 318, 6601, 7, 3672, 2599, 198, 220, 220, 220, 705, 7061, 7376, 4657, 611, 1813, 1438, 6870, 3376, 953, 9483, 393, 407, 7061, 6, 198, 220, 220, 220, 1441, 302, 13, 15699, 7, 81, 1, 61, 7, 93, 91, 8, 4666, 13, 10, 3, 1600, 1438, 8, 628, 628, 198, 198, 4299, 4259, 12982, 26232, 35660, 489, 5344, 9414, 25180, 33529, 198, 220, 220, 220, 705, 7061, 22743, 12515, 2665, 3891, 287, 2836, 13, 33692, 7061, 6, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 796, 17056, 46677, 7, 301, 2012, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 18076, 87, 687, 796, 965, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 961, 7, 7890, 13, 11250, 13, 33692, 1343, 12813, 7220, 13, 33692, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21004, 28, 15255, 478, 27195, 7656, 7, 7890, 13, 11250, 13, 33692, 1343, 12813, 7220, 13, 33692, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2665, 287, 4566, 13, 23946, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 16375, 796, 2665, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 649, 16375, 58, 25, 16, 60, 6624, 12878, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 16375, 796, 649, 16375, 58, 16, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 649, 16375, 58, 12, 16, 47715, 6624, 366, 60, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 16375, 796, 649, 16375, 58, 21912, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 649, 16375, 14512, 2665, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3709, 796, 4566, 13, 23814, 7, 5458, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 4566, 13, 10134, 62, 5458, 7, 3605, 16375, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 2860, 62, 5458, 7, 3605, 16375, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2378, 287, 3709, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 2617, 7, 3605, 16375, 11, 2378, 58, 15, 4357, 2378, 58, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 28956, 62, 5458, 7, 5458, 8, 198, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 7890, 13, 11250, 13, 33692, 10, 1, 14, 7220, 13, 33692, 1600, 705, 86, 3256, 21004, 2625, 40477, 12, 23, 4943, 355, 2836, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4566, 13, 13564, 7, 7220, 7753, 11, 2272, 62, 14145, 62, 12381, 320, 270, 364, 28, 25101, 8, 198, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 13049, 278, 23418, 28103, 4054, 4943, 628, 198, 4299, 29976, 7, 907, 25, 493, 2599, 198, 220, 220, 220, 37227, 10707, 273, 1352, 19047, 2163, 326, 460, 691, 307, 1444, 1752, 790, 4600, 907, 63, 38694, 37811, 198, 220, 220, 220, 422, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 220, 220, 220, 1441, 11705, 378, 628, 198, 4299, 1915, 8652, 7, 907, 25, 493, 2599, 198, 220, 220, 220, 37227, 16587, 8652, 257, 5499, 9706, 416, 1391, 907, 92, 38694, 37811, 198, 220, 220, 220, 1441, 11705, 1352, 198 ]
2.553145
1,383
from __future__ import absolute_import from .alert import Alert from .domain import URI, Domain from .file import File, FileOf from .ip_address import IPAddress from .node import Node from .process import Process, SysMonProc from .registry import RegistryKey __all__ = [ "Node", "URI", "Domain", "File", "FileOf", "IPAddress", "SysMonProc", "Process", "RegistryKey", "Alert", ]
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 44598, 1330, 23276, 198, 6738, 764, 27830, 1330, 43975, 11, 20021, 198, 6738, 764, 7753, 1330, 9220, 11, 9220, 5189, 198, 6738, 764, 541, 62, 21975, 1330, 27966, 1860, 601, 198, 6738, 764, 17440, 1330, 19081, 198, 6738, 764, 14681, 1330, 10854, 11, 311, 893, 9069, 2964, 66, 198, 6738, 764, 2301, 4592, 1330, 33432, 9218, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 19667, 1600, 198, 220, 220, 220, 366, 47269, 1600, 198, 220, 220, 220, 366, 43961, 1600, 198, 220, 220, 220, 366, 8979, 1600, 198, 220, 220, 220, 366, 8979, 5189, 1600, 198, 220, 220, 220, 366, 4061, 20231, 1600, 198, 220, 220, 220, 366, 44387, 9069, 2964, 66, 1600, 198, 220, 220, 220, 366, 18709, 1600, 198, 220, 220, 220, 366, 8081, 4592, 9218, 1600, 198, 220, 220, 220, 366, 36420, 1600, 198, 60, 198 ]
2.716129
155
import enum __all__ = ["UpdateMode"]
[ 11748, 33829, 628, 198, 198, 834, 439, 834, 796, 14631, 10260, 19076, 8973, 198 ]
2.857143
14
# -*- coding: utf-8 -*- # # Convert list of Office files (.docx, .xslx, .pptx) files from # old text encoding to Unicode. import os import re import sys import convertOffice import osageConversion import convertUtil if __name__ == "__main__": main(sys.argv)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 38240, 1351, 286, 4452, 3696, 20262, 15390, 87, 11, 764, 87, 6649, 87, 11, 764, 381, 17602, 8, 3696, 422, 198, 2, 1468, 2420, 21004, 284, 34371, 13, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 198, 11748, 10385, 27743, 198, 11748, 28686, 496, 3103, 9641, 198, 198, 11748, 10385, 18274, 346, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1388, 7, 17597, 13, 853, 85, 8, 198 ]
2.8
95
#-*- coding:utf-8 -*- import time from bs4 import BeautifulSoup from user_agents import agents import requests import random import re def get_article(url): ''' :param url: 指定日期的链接 :return content: 指定url的正文内容 ''' agent = random.choice(agents) header = {'User-Agent': agent} res = requests.get(url, headers=header) time.sleep(2) res.encoding = 'utf-8' soup = BeautifulSoup(res.text, 'html.parser') newsArticle = soup.select('.articleText') pattern = re.compile(r'<[^>]+>', re.S) for item in (str(newsArticle[0]).split('<strong>')): new_item = item.split('</strong>') if len(new_item) > 1: contents = pattern.sub('', str(new_item)) content_list = contents.split('\'') content = ''.join(content_list) return content
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 640, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 2836, 62, 49638, 1330, 6554, 198, 11748, 7007, 198, 11748, 4738, 198, 11748, 302, 198, 198, 4299, 651, 62, 20205, 7, 6371, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1058, 17143, 19016, 25, 10545, 234, 229, 22522, 248, 33768, 98, 17312, 253, 21410, 165, 241, 122, 162, 236, 98, 198, 220, 220, 220, 1058, 7783, 2695, 25, 10545, 234, 229, 22522, 248, 6371, 21410, 29826, 96, 23877, 229, 37863, 227, 22522, 117, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5797, 796, 4738, 13, 25541, 7, 49638, 8, 198, 220, 220, 220, 13639, 796, 1391, 6, 12982, 12, 36772, 10354, 5797, 92, 198, 220, 220, 220, 581, 796, 7007, 13, 1136, 7, 6371, 11, 24697, 28, 25677, 8, 198, 220, 220, 220, 640, 13, 42832, 7, 17, 8, 198, 220, 220, 220, 581, 13, 12685, 7656, 796, 705, 40477, 12, 23, 6, 198, 220, 220, 220, 17141, 796, 23762, 50, 10486, 7, 411, 13, 5239, 11, 705, 6494, 13, 48610, 11537, 198, 220, 220, 220, 1705, 14906, 796, 17141, 13, 19738, 7, 4458, 20205, 8206, 11537, 198, 220, 220, 220, 3912, 796, 302, 13, 5589, 576, 7, 81, 6, 27, 58, 61, 37981, 10, 29, 3256, 302, 13, 50, 8, 198, 220, 220, 220, 329, 2378, 287, 357, 2536, 7, 10827, 14906, 58, 15, 35944, 35312, 10786, 27, 11576, 29, 11537, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 9186, 796, 2378, 13, 35312, 10786, 3556, 11576, 29, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 611, 18896, 7, 3605, 62, 9186, 8, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10154, 796, 3912, 13, 7266, 10786, 3256, 965, 7, 3605, 62, 9186, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2695, 62, 4868, 796, 10154, 13, 35312, 10786, 59, 7061, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2695, 796, 705, 4458, 22179, 7, 11299, 62, 4868, 8, 198, 220, 220, 220, 1441, 2695 ]
2.227642
369
# Generated by Django 3.1.4 on 2021-01-13 17:40 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 486, 12, 1485, 1596, 25, 1821, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import os, json import hdefereval import sdm.houdini from sdm.houdini.dialog import checkForUpdates from sdm.houdini.shelves import addShelf from sdm.houdini.node import applyDefaultShapesAndColors hdefereval.executeDeferred(checkUpdates) hdefereval.executeDeferred(addShelf) hdefereval.executeDeferred(applyDefaultShapesAndColors)
[ 11748, 28686, 11, 33918, 198, 11748, 289, 4299, 567, 2100, 198, 198, 11748, 264, 36020, 13, 71, 2778, 5362, 198, 6738, 264, 36020, 13, 71, 2778, 5362, 13, 38969, 519, 1330, 2198, 1890, 4933, 19581, 198, 6738, 264, 36020, 13, 71, 2778, 5362, 13, 82, 2978, 1158, 1330, 751, 3347, 1652, 198, 6738, 264, 36020, 13, 71, 2778, 5362, 13, 17440, 1330, 4174, 19463, 2484, 7916, 1870, 5216, 669, 198, 198, 71, 4299, 567, 2100, 13, 41049, 7469, 17436, 7, 9122, 4933, 19581, 8, 198, 71, 4299, 567, 2100, 13, 41049, 7469, 17436, 7, 2860, 3347, 1652, 8, 198, 71, 4299, 567, 2100, 13, 41049, 7469, 17436, 7, 39014, 19463, 2484, 7916, 1870, 5216, 669, 8, 198 ]
2.854701
117
''' @ Author: Tiexin @ email: [email protected] @Data: 2019-8-14 ''' from engine.configs.parser import BaseOptions # import engine.fsl_trainer as trainer import engine.ssl_trainer as trainer import sys sys.dont_write_bytecode = True try: from itertools import izip as zip except ImportError: # will be 3.x series pass if __name__ == '__main__': # Load experiment setting opts = BaseOptions().opts trainer = trainer.Trainer(opts) trainer.train()
[ 7061, 6, 198, 31, 6434, 25, 36286, 87, 259, 198, 31, 3053, 25, 9839, 87, 259, 80, 259, 31, 24136, 13, 785, 198, 31, 6601, 25, 13130, 12, 23, 12, 1415, 198, 7061, 6, 198, 198, 6738, 3113, 13, 11250, 82, 13, 48610, 1330, 7308, 29046, 198, 2, 1330, 3113, 13, 69, 6649, 62, 2213, 10613, 355, 21997, 198, 11748, 3113, 13, 45163, 62, 2213, 10613, 355, 21997, 198, 198, 11748, 25064, 198, 17597, 13, 67, 756, 62, 13564, 62, 26327, 8189, 796, 6407, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 340, 861, 10141, 1330, 220, 528, 541, 355, 19974, 198, 16341, 17267, 12331, 25, 220, 1303, 481, 307, 513, 13, 87, 2168, 198, 220, 220, 220, 1208, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 8778, 6306, 4634, 198, 220, 220, 220, 2172, 82, 796, 7308, 29046, 22446, 404, 912, 198, 220, 220, 220, 21997, 796, 21997, 13, 2898, 10613, 7, 404, 912, 8, 198, 220, 220, 220, 21997, 13, 27432, 3419, 628, 628 ]
2.710227
176
#!/usr/bin/env python3 import lib n=1 d=1 i=0 N=1000 count = 0 while i < N+1: #print(i,str(n)+'/'+str(d),n/d) if (lib.num_digits(n) >lib.num_digits(d)): count += 1 #term' = 1 + 1/(1+term) n+= d #1 + term n,d=d,n #1/(1+term) n+= d #1+1/(1+term) i+=1 print(count)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 9195, 198, 77, 28, 16, 198, 67, 28, 16, 198, 72, 28, 15, 198, 45, 28, 12825, 198, 9127, 796, 657, 198, 4514, 1312, 1279, 399, 10, 16, 25, 198, 220, 1303, 4798, 7, 72, 11, 2536, 7, 77, 47762, 26488, 6, 10, 2536, 7, 67, 828, 77, 14, 67, 8, 198, 220, 611, 357, 8019, 13, 22510, 62, 12894, 896, 7, 77, 8, 1875, 8019, 13, 22510, 62, 12894, 896, 7, 67, 8, 2599, 198, 220, 220, 220, 954, 15853, 352, 198, 220, 1303, 4354, 6, 796, 352, 1343, 352, 29006, 16, 10, 4354, 8, 198, 220, 299, 47932, 288, 1303, 16, 1343, 3381, 198, 220, 299, 11, 67, 28, 67, 11, 77, 1303, 16, 29006, 16, 10, 4354, 8, 198, 220, 299, 47932, 288, 1303, 16, 10, 16, 29006, 16, 10, 4354, 8, 198, 220, 220, 198, 220, 1312, 47932, 16, 198, 4798, 7, 9127, 8, 628 ]
1.775
160
import csv from bs4 import BeautifulSoup import requests # function to scrape smartybro # Code to scrape Anycouponcode.com # function to scrape BuzzUdemy.com # function to scrape Comidoc.com # function to scrape coupontry.com # function to scrape udemycoupon.learnviral # function to scrape Udemycoupon.club # function that sorts the function to be used # Main driver Program listFile2 = open('output.csv', 'w') listFile2.close() with open('input.txt') as openfileobject: for line in openfileobject: page_link = line checker(page_link)
[ 11748, 269, 21370, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 628, 198, 2, 2163, 284, 42778, 4451, 88, 7957, 628, 198, 2, 6127, 284, 42778, 4377, 66, 10486, 261, 8189, 13, 785, 628, 198, 2, 2163, 284, 42778, 15753, 52, 67, 3065, 13, 785, 628, 198, 2, 2163, 284, 42778, 955, 312, 420, 13, 785, 628, 198, 2, 2163, 284, 42778, 12092, 756, 563, 13, 785, 628, 198, 2, 2163, 284, 42778, 334, 67, 3065, 66, 10486, 261, 13, 35720, 85, 21093, 628, 198, 2, 2163, 284, 42778, 35774, 3065, 66, 10486, 261, 13, 18664, 628, 198, 2, 2163, 326, 10524, 262, 2163, 284, 307, 973, 628, 198, 2, 8774, 4639, 6118, 198, 4868, 8979, 17, 796, 1280, 10786, 22915, 13, 40664, 3256, 705, 86, 11537, 198, 4868, 8979, 17, 13, 19836, 3419, 198, 4480, 1280, 10786, 15414, 13, 14116, 11537, 355, 1280, 7753, 15252, 25, 198, 220, 220, 220, 329, 1627, 287, 1280, 7753, 15252, 25, 198, 220, 220, 220, 220, 220, 220, 220, 2443, 62, 8726, 796, 1627, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 263, 7, 7700, 62, 8726, 8, 198 ]
3.005236
191
import threading
[ 11748, 4704, 278, 628, 628 ]
4
5
# -*- coding: utf-8 -*- ''' default network class 给神经网络类的接口格式定义,神经网络具体需要自行添加 ''' import pickle as pkl
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 12286, 3127, 1398, 198, 163, 119, 247, 15351, 163, 119, 237, 163, 121, 239, 163, 119, 250, 163, 109, 119, 21410, 162, 236, 98, 20998, 96, 43718, 120, 28156, 237, 22522, 248, 20046, 231, 171, 120, 234, 15351, 163, 119, 237, 163, 121, 239, 163, 119, 250, 17739, 115, 19526, 241, 165, 250, 222, 17358, 223, 164, 229, 103, 26193, 234, 162, 115, 119, 27950, 254, 198, 7061, 6, 198, 11748, 2298, 293, 355, 279, 41582, 628 ]
1.095745
94
import json import pprint ######### OPEN AND READ THE DATA FILE ########### inFile = open("data/scf_data.json","r") scf_data = json.load(inFile) # print(scf_data) inFile.close() ############ DATA EXPLORATION ############# # dataType = str(type(scf_data)) # print("type of data: " + dataType) # print("dictionary keys: " + str(scf_data.keys())) # issues_data_type = str(type(scf_data["issues"])) # print("data type of the 'issues' value: " + issues_data_type ) # print("first element of 'issues' list:") # print(scf_data["issues"][0]) ## print data variables # pp = pprint.PrettyPrinter(indent=4) # print("first data entry:") # pp.pprint(scf_data["issues"][0]) ############ DATA MODIFICATION ############# new_scf_data = [] variables = ["address","created_at","summary","description","lng","lat","rating"] for old_entry in scf_data["issues"]: new_entry={} for variable in variables: new_entry[variable] = old_entry[variable] # print(new_entry) new_scf_data.append(new_entry) ### OUTPUTTING THE NEW DATA TO A NEW FILE ### outfile = open("data/scf_output_data.json","w") json.dump(new_scf_data, outfile, indent=4) outfile.close()
[ 11748, 33918, 198, 11748, 279, 4798, 198, 198, 7804, 2, 38303, 5357, 20832, 3336, 42865, 45811, 1303, 7804, 2235, 198, 259, 8979, 796, 1280, 7203, 7890, 14, 1416, 69, 62, 7890, 13, 17752, 2430, 81, 4943, 198, 1416, 69, 62, 7890, 796, 33918, 13, 2220, 7, 259, 8979, 8, 198, 2, 3601, 7, 1416, 69, 62, 7890, 8, 198, 259, 8979, 13, 19836, 3419, 198, 198, 7804, 4242, 42865, 7788, 6489, 1581, 6234, 1303, 7804, 4242, 198, 2, 1366, 6030, 796, 965, 7, 4906, 7, 1416, 69, 62, 7890, 4008, 198, 2, 3601, 7203, 4906, 286, 1366, 25, 366, 1343, 1366, 6030, 8, 198, 2, 3601, 7203, 67, 14188, 8251, 25, 366, 1343, 965, 7, 1416, 69, 62, 7890, 13, 13083, 3419, 4008, 198, 2, 2428, 62, 7890, 62, 4906, 796, 965, 7, 4906, 7, 1416, 69, 62, 7890, 14692, 37165, 8973, 4008, 198, 2, 3601, 7203, 7890, 2099, 286, 262, 705, 37165, 6, 1988, 25, 366, 1343, 2428, 62, 7890, 62, 4906, 1267, 198, 2, 3601, 7203, 11085, 5002, 286, 705, 37165, 6, 1351, 25, 4943, 198, 2, 3601, 7, 1416, 69, 62, 7890, 14692, 37165, 1, 7131, 15, 12962, 198, 198, 2235, 3601, 1366, 9633, 198, 2, 9788, 796, 279, 4798, 13, 35700, 6836, 3849, 7, 521, 298, 28, 19, 8, 198, 2, 3601, 7203, 11085, 1366, 5726, 25, 4943, 198, 2, 9788, 13, 381, 22272, 7, 1416, 69, 62, 7890, 14692, 37165, 1, 7131, 15, 12962, 198, 198, 7804, 4242, 42865, 19164, 30643, 6234, 1303, 7804, 4242, 198, 3605, 62, 1416, 69, 62, 7890, 796, 17635, 198, 25641, 2977, 796, 14631, 21975, 2430, 25598, 62, 265, 2430, 49736, 2430, 11213, 2430, 75, 782, 2430, 15460, 2430, 8821, 8973, 198, 1640, 1468, 62, 13000, 287, 629, 69, 62, 7890, 14692, 37165, 1, 5974, 198, 220, 220, 220, 649, 62, 13000, 34758, 92, 198, 220, 220, 220, 329, 7885, 287, 9633, 25, 198, 220, 220, 220, 220, 220, 220, 220, 649, 62, 13000, 58, 45286, 60, 796, 1468, 62, 13000, 58, 45286, 60, 198, 220, 220, 220, 1303, 3601, 7, 3605, 62, 13000, 8, 198, 220, 220, 220, 649, 62, 1416, 69, 62, 7890, 13, 33295, 7, 3605, 62, 13000, 8, 198, 198, 21017, 16289, 30076, 48996, 3336, 12682, 42865, 5390, 317, 12682, 45811, 44386, 198, 448, 7753, 796, 1280, 7203, 7890, 14, 1416, 69, 62, 22915, 62, 7890, 13, 17752, 2430, 86, 4943, 198, 17752, 13, 39455, 7, 3605, 62, 1416, 69, 62, 7890, 11, 503, 7753, 11, 33793, 28, 19, 8, 198, 448, 7753, 13, 19836, 3419, 198 ]
2.745843
421
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-24 11:51 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 19, 319, 1584, 12, 3070, 12, 1731, 1367, 25, 4349, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.719298
57
from time import sleep import pytest from ...utils import assert_finished, assert_obniz, assert_send, receive_json
[ 6738, 640, 1330, 3993, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2644, 26791, 1330, 6818, 62, 43952, 11, 6818, 62, 672, 77, 528, 11, 6818, 62, 21280, 11, 3328, 62, 17752, 628 ]
3.575758
33
from flask_restplus import fields from polylogyx.blueprints.v1.external_api import api # Node Wrappers node_info_wrapper = api.model('node_info_wrapper', { 'computer_name': fields.String(), 'hardware_model': fields.String(), 'hardware_serial': fields.String(), 'hardware_vendor': fields.String(), 'physical_memory': fields.String(), 'cpu_physical_cores': fields.String() }) nodewrapper = api.model('nodewrapper', { 'id':fields.Integer(), 'host_identifier': fields.String(), 'node_key': fields.String(), 'last_ip': fields.String(), 'platform': fields.String(), 'os_info': fields.Raw(), 'node_info': fields.Nested(node_info_wrapper, default=None), 'network_info': fields.Raw(), 'host_details': fields.Raw(), 'last_checkin': fields.DateTime(default = None), 'enrolled_on': fields.DateTime(default = None), 'last_status': fields.DateTime(default = None), 'last_result': fields.DateTime(default = None), 'last_config': fields.DateTime(default = None), 'last_query_read': fields.DateTime(default = None), 'last_query_write': fields.DateTime(default = None), }) node_tag_wrapper = api.model('node_tag_wrapper', { 'host_identifier': fields.String(), 'node_key': fields.String() }) node_status_log_wrapper = api.model('node_status_log_wrapper', { 'line': fields.Integer(), 'message': fields.String(), 'severity': fields.Integer(), 'filename': fields.String(), 'created': fields.DateTime(), 'version': fields.String(), })
[ 6738, 42903, 62, 2118, 9541, 1330, 7032, 198, 6738, 7514, 6404, 28391, 13, 17585, 17190, 13, 85, 16, 13, 22615, 62, 15042, 1330, 40391, 198, 198, 2, 19081, 27323, 11799, 198, 17440, 62, 10951, 62, 48553, 796, 40391, 13, 19849, 10786, 17440, 62, 10951, 62, 48553, 3256, 1391, 198, 220, 220, 220, 705, 33215, 62, 3672, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 10424, 1574, 62, 19849, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 10424, 1574, 62, 46911, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 10424, 1574, 62, 85, 18738, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 42854, 62, 31673, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 36166, 62, 42854, 62, 66, 2850, 10354, 7032, 13, 10100, 3419, 198, 30072, 198, 198, 77, 375, 413, 430, 2848, 796, 40391, 13, 19849, 10786, 77, 375, 413, 430, 2848, 3256, 1391, 198, 220, 220, 220, 705, 312, 10354, 25747, 13, 46541, 22784, 198, 220, 220, 220, 705, 4774, 62, 738, 7483, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 17440, 62, 2539, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 12957, 62, 541, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 24254, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 418, 62, 10951, 10354, 7032, 13, 27369, 22784, 198, 220, 220, 220, 705, 17440, 62, 10951, 10354, 7032, 13, 45, 7287, 7, 17440, 62, 10951, 62, 48553, 11, 4277, 28, 14202, 828, 198, 220, 220, 220, 705, 27349, 62, 10951, 10354, 7032, 13, 27369, 22784, 198, 220, 220, 220, 705, 4774, 62, 36604, 10354, 7032, 13, 27369, 22784, 198, 220, 220, 220, 705, 12957, 62, 9122, 259, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 268, 8375, 62, 261, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 12957, 62, 13376, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 12957, 62, 20274, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 12957, 62, 11250, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 12957, 62, 22766, 62, 961, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 220, 220, 220, 705, 12957, 62, 22766, 62, 13564, 10354, 7032, 13, 10430, 7575, 7, 12286, 796, 6045, 828, 198, 30072, 198, 198, 17440, 62, 12985, 62, 48553, 796, 40391, 13, 19849, 10786, 17440, 62, 12985, 62, 48553, 3256, 1391, 198, 220, 220, 220, 705, 4774, 62, 738, 7483, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 17440, 62, 2539, 10354, 7032, 13, 10100, 3419, 198, 30072, 198, 198, 17440, 62, 13376, 62, 6404, 62, 48553, 796, 40391, 13, 19849, 10786, 17440, 62, 13376, 62, 6404, 62, 48553, 3256, 1391, 198, 220, 220, 220, 705, 1370, 10354, 7032, 13, 46541, 22784, 198, 220, 220, 220, 705, 20500, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 28116, 414, 10354, 7032, 13, 46541, 22784, 198, 220, 220, 220, 705, 34345, 10354, 7032, 13, 10100, 22784, 198, 220, 220, 220, 705, 25598, 10354, 7032, 13, 10430, 7575, 22784, 198, 220, 220, 220, 705, 9641, 10354, 7032, 13, 10100, 22784, 198, 30072 ]
2.770758
554
""" Entradas (X,M)-->int-->valores Salida Nueva experiencia Monster-->int-->E """ #Caja negra while True: #Entrada valores=input("") (X,M)=valores.split(" ") X=int(X) M=int(M) #Caja negra if (X==0) and M==0: break else: E=X*M #Salida print(E)
[ 37811, 201, 198, 14539, 6335, 292, 201, 198, 7, 55, 11, 44, 42944, 29, 600, 46904, 2100, 2850, 201, 198, 19221, 3755, 201, 198, 45, 518, 6862, 3410, 33743, 12635, 46904, 600, 46904, 36, 201, 198, 37811, 201, 198, 2, 34, 27792, 2469, 430, 201, 198, 4514, 6407, 25, 201, 198, 220, 220, 220, 1303, 14539, 81, 4763, 201, 198, 220, 220, 220, 1188, 2850, 28, 15414, 7203, 4943, 201, 198, 220, 220, 220, 357, 55, 11, 44, 47505, 2100, 2850, 13, 35312, 7203, 366, 8, 201, 198, 220, 220, 220, 1395, 28, 600, 7, 55, 8, 201, 198, 220, 220, 220, 337, 28, 600, 7, 44, 8, 201, 198, 220, 220, 220, 1303, 34, 27792, 2469, 430, 201, 198, 220, 220, 220, 611, 357, 55, 855, 15, 8, 290, 337, 855, 15, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 201, 198, 220, 220, 220, 2073, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 412, 28, 55, 9, 44, 201, 198, 220, 220, 220, 1303, 19221, 3755, 201, 198, 220, 220, 220, 3601, 7, 36, 8 ]
1.741758
182
""" Print out the nodes of a taxonomy Usage: print_nodes (-h | help) print_nodes <taxon>... [--debug] Options: -h --help Prints this documentation <taxon> A yaml file containing partial or whole taxonomy. Multiple files will be merged. -d --debug Print log information while running """ import logging import sys import docopt import yamlconf ENWIKI_HOST = 'https://en.wikipedia.org' logger = logging.getLogger(__name__) if __name__ == "__main__": sys.exit(main())
[ 37811, 198, 18557, 503, 262, 13760, 286, 257, 1687, 30565, 198, 198, 28350, 25, 198, 220, 220, 220, 3601, 62, 77, 4147, 13841, 71, 930, 1037, 8, 198, 220, 220, 220, 3601, 62, 77, 4147, 1279, 19290, 261, 29, 986, 685, 438, 24442, 60, 198, 198, 29046, 25, 198, 220, 220, 220, 532, 71, 1377, 16794, 220, 220, 220, 220, 12578, 82, 428, 10314, 198, 220, 220, 220, 1279, 19290, 261, 29, 220, 220, 220, 220, 220, 220, 317, 331, 43695, 2393, 7268, 13027, 393, 2187, 1687, 30565, 13, 220, 20401, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3696, 481, 307, 23791, 13, 198, 220, 220, 220, 532, 67, 1377, 24442, 220, 12578, 2604, 1321, 981, 2491, 198, 37811, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 2205, 8738, 198, 11748, 331, 43695, 10414, 198, 198, 1677, 54, 18694, 40, 62, 39, 10892, 796, 705, 5450, 1378, 268, 13, 31266, 13, 2398, 6, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 25064, 13, 37023, 7, 12417, 28955, 198 ]
2.588235
204
#! -*- coding: utf-8 -*- '''DeepLearning学習処理の実装サンプル 引数に指定する設定ファイルで指定されたパラメータに従い,DeepLearningモデルの学習を実行する実装サンプル. 設定ファイルで指定するパラメータ: * env: 環境設定 * fifo: 学習制御用のFIFOパス * result_dir: 結果を格納するディレクトリ * dataset: データセット関連の設定 * dataset_name: データセット名(Preset: MNIST, CIFAR-10) * dataset_dir: データセットを格納したディレクトリ * norm: 正規化方式(max, max-min, z-score) * data_augmentation: DataAugmentation関連の設定 * rotation_range: 画像の回転[deg] * width_shift_range: 水平方向の画像幅に対するシフト率[0.0-1.0] * height_shift_range: 垂直方向の画像高さに対するシフト率[0.0-1.0] * zoom_range: 拡大率[%] * channel_shift_range: チャネル(RGB)のシフト率[0.0-1.0] * horizontal_flip: 水平方向反転有無(True or False) * model: 学習するモデル関連の設定 * model_type: モデル種別(MLP, SimpleCNN, DeepCNN, SimpleResNet, DeepResNet) * training_parameter: ハイパーパラメータ * optimizer: 最適化方式(momentum, adam, sgd, adam_lrs, sgd, lrs) * batch_size: バッチサイズ * epochs: EPOCH数 * initializer: 重みの初期化アルゴリズム glrot_uniform: Xavierの一様分布 glrot_normal: Xavierの正規分布 he_uniform: Heの一様分布 he_normal: Heの正規分布 * droptout_rate: ドロップアウトによる欠落率[0.0-1.0] * loss_func: 損失関数(tf.keras.lossesのメンバを指定) ''' #--------------------------------- # モジュールのインポート #--------------------------------- import os import json import argparse import numpy as np import pandas as pd import pickle from machine_learning.lib.data_loader.data_loader import DataLoaderMNIST from machine_learning.lib.data_loader.data_loader import DataLoaderCIFAR10 from machine_learning.lib.trainer.trainer import TrainerMLP, TrainerCNN, TrainerResNet #--------------------------------- # 定数定義 #--------------------------------- #--------------------------------- # 関数 #--------------------------------- #--------------------------------- # メイン処理 #--------------------------------- if __name__ == '__main__': main()
[ 2, 0, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 29744, 41730, 27764, 99, 163, 123, 240, 49035, 99, 49426, 228, 49149, 253, 35318, 26503, 6527, 30965, 9202, 198, 198, 28156, 243, 46763, 108, 28618, 162, 234, 229, 22522, 248, 33623, 25748, 164, 101, 255, 22522, 248, 41939, 11482, 9202, 30640, 162, 234, 229, 22522, 248, 43357, 39258, 25224, 32546, 9263, 26998, 6312, 23376, 28618, 36181, 241, 18566, 171, 120, 234, 29744, 41730, 40361, 21959, 9202, 15474, 255, 99, 163, 123, 240, 31758, 22522, 253, 26193, 234, 33623, 25748, 22522, 253, 35318, 26503, 6527, 30965, 9202, 171, 120, 236, 198, 198, 164, 101, 255, 22522, 248, 41939, 11482, 9202, 30640, 162, 234, 229, 22522, 248, 33623, 25748, 32546, 9263, 26998, 6312, 23376, 25, 628, 220, 1635, 17365, 25, 13328, 240, 108, 161, 95, 225, 164, 101, 255, 22522, 248, 198, 220, 220, 220, 1635, 5515, 78, 25, 10263, 255, 99, 163, 123, 240, 26344, 114, 36181, 94, 18796, 101, 5641, 37, 5064, 46, 32546, 8943, 198, 220, 220, 220, 1635, 1255, 62, 15908, 25, 13328, 113, 238, 162, 252, 250, 31758, 43718, 120, 163, 112, 235, 33623, 25748, 40629, 24186, 14099, 13298, 12675, 198, 220, 1635, 27039, 25, 14524, 229, 6312, 23376, 47271, 35799, 38461, 95, 34460, 96, 5641, 164, 101, 255, 22522, 248, 198, 220, 220, 220, 1635, 27039, 62, 3672, 25, 14524, 229, 6312, 23376, 47271, 35799, 28938, 235, 7, 25460, 316, 25, 29060, 8808, 11, 327, 5064, 1503, 12, 940, 8, 198, 220, 220, 220, 1635, 27039, 62, 15908, 25, 14524, 229, 6312, 23376, 47271, 35799, 31758, 43718, 120, 163, 112, 235, 22180, 25224, 40629, 24186, 14099, 13298, 12675, 198, 220, 220, 220, 1635, 2593, 25, 10545, 255, 96, 17358, 237, 44293, 244, 43095, 28156, 237, 7, 9806, 11, 3509, 12, 1084, 11, 1976, 12, 26675, 8, 198, 220, 220, 220, 1635, 1366, 62, 559, 5154, 341, 25, 6060, 12512, 14374, 38461, 95, 34460, 96, 5641, 164, 101, 255, 22522, 248, 198, 220, 220, 220, 220, 220, 1635, 13179, 62, 9521, 25, 13328, 242, 119, 161, 225, 237, 15474, 249, 252, 43102, 95, 58, 13500, 60, 198, 220, 220, 220, 220, 220, 1635, 9647, 62, 30846, 62, 9521, 25, 10545, 108, 112, 33176, 111, 43095, 28938, 239, 17683, 242, 119, 161, 225, 237, 33176, 227, 28618, 43380, 122, 33623, 25748, 15661, 17681, 13298, 163, 236, 229, 58, 15, 13, 15, 12, 16, 13, 15, 60, 198, 220, 220, 220, 220, 220, 1635, 6001, 62, 30846, 62, 9521, 25, 10263, 252, 224, 33566, 112, 43095, 28938, 239, 17683, 242, 119, 161, 225, 237, 165, 45865, 43357, 28618, 43380, 122, 33623, 25748, 15661, 17681, 13298, 163, 236, 229, 58, 15, 13, 15, 12, 16, 13, 15, 60, 198, 220, 220, 220, 220, 220, 1635, 19792, 62, 9521, 25, 10545, 233, 94, 32014, 163, 236, 229, 58, 39850, 198, 220, 220, 220, 220, 220, 1635, 6518, 62, 30846, 62, 9521, 25, 14524, 223, 23131, 44916, 9202, 7, 36982, 8, 5641, 15661, 17681, 13298, 163, 236, 229, 58, 15, 13, 15, 12, 16, 13, 15, 60, 198, 220, 220, 220, 220, 220, 1635, 16021, 62, 2704, 541, 25, 10545, 108, 112, 33176, 111, 43095, 28938, 239, 20998, 235, 43102, 95, 17312, 231, 47078, 94, 7, 17821, 393, 10352, 8, 198, 220, 1635, 2746, 25, 10263, 255, 99, 163, 123, 240, 33623, 25748, 40361, 21959, 9202, 38461, 95, 34460, 96, 5641, 164, 101, 255, 22522, 248, 198, 220, 220, 220, 1635, 2746, 62, 4906, 25, 14524, 95, 21959, 9202, 163, 101, 106, 26344, 98, 7, 5805, 47, 11, 17427, 18474, 11, 10766, 18474, 11, 17427, 4965, 7934, 11, 10766, 4965, 7934, 8, 198, 220, 1635, 3047, 62, 17143, 2357, 25, 14524, 237, 11482, 32546, 12045, 239, 9263, 26998, 6312, 23376, 198, 220, 220, 220, 1635, 6436, 7509, 25, 42164, 222, 34402, 102, 44293, 244, 43095, 28156, 237, 7, 32542, 298, 388, 11, 23197, 11, 264, 21287, 11, 23197, 62, 75, 3808, 11, 264, 21287, 11, 300, 3808, 8, 198, 220, 220, 220, 1635, 15458, 62, 7857, 25, 14524, 238, 14777, 31090, 26503, 11482, 37426, 198, 220, 220, 220, 1635, 36835, 82, 25, 14724, 46, 3398, 46763, 108, 198, 220, 220, 220, 1635, 4238, 7509, 25, 16268, 229, 235, 2515, 123, 15474, 230, 251, 17312, 253, 44293, 244, 47794, 17933, 12675, 37426, 25795, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 10599, 62, 403, 6933, 25, 30825, 5641, 31660, 162, 100, 246, 26344, 228, 30585, 225, 198, 220, 220, 220, 220, 220, 220, 220, 1278, 10599, 62, 11265, 25, 30825, 27032, 255, 96, 17358, 237, 26344, 228, 30585, 225, 198, 220, 220, 220, 220, 220, 220, 220, 339, 62, 403, 6933, 25, 679, 5641, 31660, 162, 100, 246, 26344, 228, 30585, 225, 198, 220, 220, 220, 220, 220, 220, 220, 339, 62, 11265, 25, 679, 27032, 255, 96, 17358, 237, 26344, 228, 30585, 225, 198, 220, 220, 220, 1635, 3102, 457, 448, 62, 4873, 25, 220, 13765, 16253, 14777, 30965, 11839, 16165, 13298, 28618, 1792, 230, 25748, 162, 105, 254, 164, 238, 121, 163, 236, 229, 58, 15, 13, 15, 12, 16, 13, 15, 60, 198, 220, 220, 220, 1635, 2994, 62, 20786, 25, 10545, 238, 235, 13783, 109, 38461, 95, 46763, 108, 7, 27110, 13, 6122, 292, 13, 22462, 274, 5641, 26998, 6527, 29659, 31758, 162, 234, 229, 22522, 248, 8, 198, 220, 220, 220, 220, 198, 7061, 6, 198, 198, 2, 3880, 12, 198, 2, 14524, 95, 21091, 24440, 43353, 5641, 11482, 6527, 1209, 251, 12045, 230, 198, 2, 3880, 12, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2298, 293, 198, 198, 6738, 4572, 62, 40684, 13, 8019, 13, 7890, 62, 29356, 13, 7890, 62, 29356, 1330, 6060, 17401, 39764, 8808, 198, 6738, 4572, 62, 40684, 13, 8019, 13, 7890, 62, 29356, 13, 7890, 62, 29356, 1330, 6060, 17401, 34, 5064, 1503, 940, 198, 198, 6738, 4572, 62, 40684, 13, 8019, 13, 2213, 10613, 13, 2213, 10613, 1330, 31924, 5805, 47, 11, 31924, 18474, 11, 31924, 4965, 7934, 198, 198, 2, 3880, 12, 198, 2, 10263, 106, 248, 46763, 108, 22522, 248, 163, 122, 102, 198, 2, 3880, 12, 198, 198, 2, 3880, 12, 198, 2, 16268, 244, 95, 46763, 108, 198, 2, 3880, 12, 198, 198, 2, 3880, 12, 198, 2, 14524, 94, 11482, 6527, 49035, 99, 49426, 228, 198, 2, 3880, 12, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 12417, 3419, 628 ]
1.712442
1,085
import streamlit as slt from sklearn.svm import SVC,SVR from sklearn.naive_bayes import GaussianNB from sklearn.linear_model import LinearRegression from sklearn.preprocessing import PolynomialFeatures from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import plot_confusion_matrix from matplotlib.colors import ListedColormap from sklearn.cluster import KMeans, AgglomerativeClustering from sklearn.metrics import precision_score, recall_score,mean_squared_error import matplotlib.pyplot as plt import pandas as pd import numpy as np import scipy.cluster.hierarchy as sch if __name__ == '__main__': main()
[ 11748, 4269, 18250, 355, 1017, 83, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 15922, 11, 50, 13024, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 12822, 31562, 32819, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 12280, 26601, 498, 23595, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 8081, 44292, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 7110, 62, 10414, 4241, 62, 6759, 8609, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 406, 6347, 5216, 579, 499, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 11, 19015, 75, 12057, 876, 2601, 436, 1586, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 15440, 62, 26675, 11, 10014, 62, 26675, 11, 32604, 62, 16485, 1144, 62, 18224, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 629, 541, 88, 13, 565, 5819, 13, 71, 959, 9282, 355, 5513, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.303571
224
############################################################################## #copyright 2012, Hamid MEDJAHED ([email protected]) Prologue # #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. # ############################################################################## #!/usr/bin/env python # -*- coding: latin-1 -*- import sys import pypacksrc srcdirectory=pypacksrc.srcpydir+"/pyaccords" sys.path.append(srcdirectory) from amazonEc2Action import * from actionClass import *
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 22163, 4766, 2321, 11, 4345, 312, 26112, 41, 18429, 1961, 220, 357, 71, 1150, 6592, 704, 31, 1676, 75, 5119, 13, 8310, 8, 44157, 5119, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 1639, 743, 7330, 257, 4866, 286, 262, 13789, 379, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 220, 220, 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, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 28042, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 17080, 6169, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 54, 10554, 12425, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 220, 220, 220, 1303, 198, 2, 6214, 262, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 2475, 20597, 739, 262, 13789, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 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, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3042, 259, 12, 16, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 279, 4464, 4595, 6015, 198, 10677, 34945, 28, 79, 4464, 4595, 6015, 13, 10677, 79, 5173, 343, 10, 1, 14, 9078, 4134, 3669, 1, 198, 17597, 13, 6978, 13, 33295, 7, 10677, 34945, 8, 198, 6738, 716, 5168, 49136, 17, 12502, 1330, 1635, 198, 6738, 2223, 9487, 1330, 1635, 198, 197, 628, 628, 628 ]
2.201667
600
#!/usr/bin/env bash #!/bin/bash #!/bin/sh #!/bin/sh - from vk_api.utils import get_random_id from vk_api import VkUpload from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType from vk_api.keyboard import VkKeyboard, VkKeyboardColor import random, requests, vk_api, os, bs4 from google_images_download import google_images_download from lxml import html import urllib.parse dict = [".", ",", "!", "?", ")", "(", ":", ";", "'", ']', '[', '"'] dictan = [")", "(", ":", ";", "'", ']', '[', '"', '\\', 'n', '&', 'q', 'u', 'o', 't'] dict7 = {'January': 1, 'February': 2, 'March': 3, 'April': 4, 'May': 5, 'June': 6, 'July': 7, 'August': 8, 'September': 9, 'October': 10, 'November': 11, 'December': 12} dict8 = {'овен':'aries','телец':'taurus' ,'близнецы':'gemini' ,'рак':'cancer' ,'лев':'leo' ,'дева':'virgo' ,'весы':'libra' ,'скорпион':'scorpio' ,'стрелец':'sagittarius','козерог':'capricorn' ,'водолей':'aquarius' ,'рыбы':'pisces'} kolresp = 0 attachments = [] chand = 0 flagtime = False fltm1 = False fltm2 = False flaggoroscop=True #защита от пидарасов f=open('/root/bot_herobot_ls/token.txt','r') token=f.read() f.close() session = requests.Session() vk_session = vk_api.VkApi(token=token) longpoll = VkBotLongPoll(vk_session, '178949259') vk = vk_session.get_api() upload = VkUpload(vk_session) # Для загрузки изображений keyboardgor = VkKeyboard(one_time=False) keyboardgor.add_button('Овен', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Телец', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Близнецы', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Рак', color=VkKeyboardColor.PRIMARY) keyboardgor.add_line() # Переход на вторую строку keyboardgor.add_button('Лев', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Дева', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Весы', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Скорпион', color=VkKeyboardColor.PRIMARY) keyboardgor.add_line() # Переход на вторую строку keyboardgor.add_button('Стрелец', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Козерог', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Водолей', color=VkKeyboardColor.PRIMARY) keyboardgor.add_button('Рыбы', color=VkKeyboardColor.PRIMARY) keyboardgor.add_line() # Переход на вторую строку keyboardgor.add_button('Убери гороскоп', color=VkKeyboardColor.NEGATIVE) keyboardosn = VkKeyboard(one_time=False) keyboardosn.add_button('Мысль', color=VkKeyboardColor.PRIMARY) keyboardosn.add_button('Цитата', color=VkKeyboardColor.PRIMARY) keyboardosn.add_button('Факт', color=VkKeyboardColor.PRIMARY) keyboardosn.add_button('Анекдот', color=VkKeyboardColor.PRIMARY) #keyboardosn.add_line() # Переход на вторую строку #keyboardosn.add_button('Анекдот', color=VkKeyboardColor.PRIMARY) ''' print(keyboardgor.get_keyboard()) vk.messages.send( user_id=195310233, random_id=get_random_id(), keyboard=keyboardgor.get_keyboard(), message="Я перезагружен!" ) ''' iscl=["легкое", "сложное", "среднее", "❓ что это такое", "♻ другое слово", "!рестарт крокодил"] mainfunc()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 27334, 198, 2, 48443, 8800, 14, 41757, 198, 2, 48443, 8800, 14, 1477, 198, 2, 48443, 8800, 14, 1477, 532, 198, 198, 6738, 410, 74, 62, 15042, 13, 26791, 1330, 651, 62, 25120, 62, 312, 198, 6738, 410, 74, 62, 15042, 1330, 569, 74, 41592, 198, 6738, 410, 74, 62, 15042, 13, 13645, 62, 6511, 30393, 1330, 569, 74, 20630, 14617, 39176, 11, 569, 74, 20630, 9237, 6030, 198, 6738, 410, 74, 62, 15042, 13, 2539, 3526, 1330, 569, 74, 9218, 3526, 11, 569, 74, 9218, 3526, 10258, 198, 11748, 4738, 11, 7007, 11, 410, 74, 62, 15042, 11, 28686, 11, 275, 82, 19, 198, 6738, 23645, 62, 17566, 62, 15002, 1330, 23645, 62, 17566, 62, 15002, 198, 6738, 300, 19875, 1330, 27711, 198, 11748, 2956, 297, 571, 13, 29572, 628, 198, 11600, 796, 14631, 33283, 366, 553, 11, 366, 40754, 366, 35379, 366, 42501, 30629, 1600, 366, 25, 1600, 366, 26, 1600, 24018, 1600, 705, 60, 3256, 44438, 3256, 705, 1, 20520, 198, 11600, 272, 796, 685, 4943, 1600, 30629, 1600, 366, 25, 1600, 366, 26, 1600, 24018, 1600, 705, 60, 3256, 44438, 3256, 705, 1, 3256, 705, 6852, 3256, 705, 77, 3256, 705, 5, 3256, 705, 80, 3256, 705, 84, 3256, 705, 78, 3256, 705, 83, 20520, 198, 11600, 22, 796, 1391, 6, 21339, 10354, 352, 11, 705, 21816, 10354, 362, 11, 705, 16192, 10354, 513, 11, 705, 16784, 10354, 604, 11, 705, 6747, 10354, 642, 11, 705, 15749, 10354, 718, 11, 705, 16157, 10354, 767, 11, 705, 17908, 10354, 807, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17543, 10354, 860, 11, 705, 18517, 10354, 838, 11, 705, 21159, 10354, 1367, 11, 705, 20588, 10354, 1105, 92, 198, 11600, 23, 796, 1391, 6, 25443, 110, 16843, 22177, 10354, 6, 3166, 41707, 20375, 16843, 30143, 16843, 141, 228, 10354, 6, 83, 22302, 6, 837, 6, 140, 109, 30143, 18849, 140, 115, 22177, 16843, 141, 228, 45035, 10354, 6, 24090, 5362, 6, 837, 6, 21169, 16142, 31583, 10354, 6, 48870, 6, 837, 6, 30143, 16843, 38857, 10354, 6, 293, 78, 6, 837, 6, 43666, 16843, 38857, 16142, 10354, 6, 37040, 2188, 6, 837, 6, 38857, 16843, 21727, 45035, 10354, 6, 8019, 430, 6, 837, 6, 21727, 31583, 15166, 21169, 140, 123, 18849, 15166, 22177, 10354, 6, 1416, 16300, 952, 6, 837, 6, 21727, 20375, 21169, 16843, 30143, 16843, 141, 228, 10354, 6, 82, 363, 715, 19897, 41707, 31583, 25443, 115, 16843, 21169, 25443, 111, 10354, 6, 11128, 1173, 1211, 6, 837, 6, 38857, 25443, 112, 25443, 119, 16843, 140, 117, 10354, 6, 36129, 19897, 6, 837, 6, 21169, 45035, 140, 109, 45035, 10354, 6, 79, 271, 728, 6, 92, 198, 74, 349, 4363, 796, 657, 198, 47348, 902, 796, 17635, 198, 354, 392, 796, 657, 198, 32109, 2435, 796, 10352, 198, 69, 2528, 76, 16, 796, 10352, 198, 69, 2528, 76, 17, 796, 10352, 198, 32109, 7053, 17500, 404, 28, 17821, 198, 198, 2, 140, 115, 16142, 141, 231, 18849, 20375, 16142, 12466, 122, 20375, 12466, 123, 18849, 43666, 16142, 21169, 16142, 21727, 25443, 110, 628, 198, 69, 28, 9654, 10786, 14, 15763, 14, 13645, 62, 11718, 13645, 62, 7278, 14, 30001, 13, 14116, 41707, 81, 11537, 198, 30001, 28, 69, 13, 961, 3419, 198, 69, 13, 19836, 3419, 198, 198, 29891, 796, 7007, 13, 36044, 3419, 198, 85, 74, 62, 29891, 796, 410, 74, 62, 15042, 13, 53, 74, 32, 14415, 7, 30001, 28, 30001, 8, 198, 6511, 30393, 796, 569, 74, 20630, 14617, 39176, 7, 85, 74, 62, 29891, 11, 705, 1558, 4531, 2920, 25191, 11537, 198, 85, 74, 796, 410, 74, 62, 29891, 13, 1136, 62, 15042, 3419, 198, 25850, 796, 569, 74, 41592, 7, 85, 74, 62, 29891, 8, 220, 1303, 12466, 242, 30143, 40623, 12466, 115, 16142, 140, 111, 21169, 35072, 140, 115, 31583, 18849, 12466, 116, 140, 115, 25443, 109, 21169, 16142, 140, 114, 16843, 22177, 18849, 140, 117, 198, 198, 2539, 3526, 7053, 796, 569, 74, 9218, 3526, 7, 505, 62, 2435, 28, 25101, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 252, 38857, 16843, 22177, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 95, 16843, 30143, 16843, 141, 228, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 239, 30143, 18849, 140, 115, 22177, 16843, 141, 228, 45035, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 254, 16142, 31583, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 1370, 3419, 220, 1303, 12466, 253, 16843, 21169, 16843, 141, 227, 25443, 112, 12466, 121, 16142, 12466, 110, 20375, 15166, 21169, 35072, 141, 236, 220, 21727, 20375, 21169, 25443, 118, 35072, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 249, 16843, 38857, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 242, 16843, 38857, 16142, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 240, 16843, 21727, 45035, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 94, 31583, 15166, 21169, 140, 123, 18849, 15166, 22177, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 1370, 3419, 220, 1303, 12466, 253, 16843, 21169, 16843, 141, 227, 25443, 112, 12466, 121, 16142, 12466, 110, 20375, 15166, 21169, 35072, 141, 236, 220, 21727, 20375, 21169, 25443, 118, 35072, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 94, 20375, 21169, 16843, 30143, 16843, 141, 228, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 248, 25443, 115, 16843, 21169, 25443, 111, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 240, 25443, 112, 25443, 119, 16843, 140, 117, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 254, 45035, 140, 109, 45035, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 7053, 13, 2860, 62, 1370, 3419, 220, 1303, 12466, 253, 16843, 21169, 16843, 141, 227, 25443, 112, 12466, 121, 16142, 12466, 110, 20375, 15166, 21169, 35072, 141, 236, 220, 21727, 20375, 21169, 25443, 118, 35072, 198, 2539, 3526, 7053, 13, 2860, 62, 16539, 10786, 140, 96, 140, 109, 16843, 21169, 18849, 12466, 111, 15166, 21169, 15166, 21727, 31583, 25443, 123, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 45, 7156, 37045, 8, 198, 198, 2539, 3526, 418, 77, 796, 569, 74, 9218, 3526, 7, 505, 62, 2435, 28, 25101, 8, 198, 2539, 3526, 418, 77, 13, 2860, 62, 16539, 10786, 140, 250, 45035, 21727, 30143, 45367, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 418, 77, 13, 2860, 62, 16539, 10786, 140, 99, 18849, 20375, 16142, 20375, 16142, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 418, 77, 13, 2860, 62, 16539, 10786, 140, 97, 16142, 31583, 20375, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2539, 3526, 418, 77, 13, 2860, 62, 16539, 10786, 140, 238, 22177, 16843, 31583, 43666, 15166, 20375, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 2, 2539, 3526, 418, 77, 13, 2860, 62, 1370, 3419, 220, 1303, 12466, 253, 16843, 21169, 16843, 141, 227, 25443, 112, 12466, 121, 16142, 12466, 110, 20375, 15166, 21169, 35072, 141, 236, 220, 21727, 20375, 21169, 25443, 118, 35072, 198, 2, 2539, 3526, 418, 77, 13, 2860, 62, 16539, 10786, 140, 238, 22177, 16843, 31583, 43666, 15166, 20375, 3256, 3124, 28, 53, 74, 9218, 3526, 10258, 13, 4805, 3955, 13153, 8, 198, 198, 7061, 6, 198, 4798, 7, 2539, 3526, 7053, 13, 1136, 62, 2539, 3526, 28955, 198, 85, 74, 13, 37348, 1095, 13, 21280, 7, 198, 220, 220, 220, 2836, 62, 312, 28, 1129, 4310, 940, 25429, 11, 198, 220, 220, 220, 4738, 62, 312, 28, 1136, 62, 25120, 62, 312, 22784, 198, 220, 220, 220, 10586, 28, 2539, 3526, 7053, 13, 1136, 62, 2539, 3526, 22784, 198, 220, 220, 220, 3275, 2625, 140, 107, 12466, 123, 16843, 21169, 16843, 140, 115, 16142, 140, 111, 21169, 35072, 140, 114, 16843, 22177, 2474, 198, 8, 198, 7061, 6, 198, 198, 271, 565, 28, 14692, 30143, 16843, 140, 111, 31583, 15166, 16843, 1600, 366, 21727, 30143, 25443, 114, 22177, 15166, 16843, 1600, 366, 21727, 21169, 16843, 43666, 22177, 16843, 16843, 1600, 366, 32391, 241, 220, 141, 229, 20375, 15166, 220, 141, 235, 20375, 15166, 220, 20375, 16142, 31583, 15166, 16843, 1600, 366, 17992, 119, 12466, 112, 21169, 35072, 140, 111, 15166, 16843, 220, 21727, 30143, 25443, 110, 15166, 1600, 366, 0, 21169, 16843, 21727, 20375, 16142, 21169, 20375, 12466, 118, 21169, 25443, 118, 25443, 112, 18849, 30143, 8973, 198, 12417, 20786, 3419, 198 ]
1.963717
1,571
from environment_models.base import BaseEnv from airobot_utils.pusher_simulator import PusherSimulator import numpy as np
[ 198, 6738, 2858, 62, 27530, 13, 8692, 1330, 7308, 4834, 85, 198, 6738, 257, 7058, 13645, 62, 26791, 13, 79, 34055, 62, 14323, 8927, 1330, 350, 34055, 8890, 8927, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.378378
37
import heckguide.wsgi from whitenoise import WhiteNoise application = heckguide.wsgi.application application = WhiteNoise(application, root='/home/heckkciy/dev.heckguide.com/static')
[ 11748, 22574, 41311, 13, 18504, 12397, 198, 6738, 20542, 23397, 786, 1330, 2635, 2949, 786, 198, 198, 31438, 796, 22574, 41311, 13, 18504, 12397, 13, 31438, 198, 31438, 796, 2635, 2949, 786, 7, 31438, 11, 6808, 11639, 14, 11195, 14, 258, 694, 74, 979, 88, 14, 7959, 13, 258, 694, 41311, 13, 785, 14, 12708, 11537 ]
3.267857
56
# function call to the transformation functions of relevance for the hpsModel import numpy as np import matplotlib.pyplot as plt from scipy.signal import get_window import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../models/')) sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../transformations/')) import hpsModel as HPS import hpsTransformations as HPST import harmonicTransformations as HT import utilFunctions as UF def analysis(inputFile='../../sounds/sax-phrase-short.wav', window='blackman', M=601, N=1024, t=-100, minSineDur=0.1, nH=100, minf0=350, maxf0=700, f0et=5, harmDevSlope=0.01, stocf=0.1): """ Analyze a sound with the harmonic plus stochastic model inputFile: input sound file (monophonic with sampling rate of 44100) window: analysis window type (rectangular, hanning, hamming, blackman, blackmanharris) M: analysis window size N: fft size (power of two, bigger or equal than M) t: magnitude threshold of spectral peaks minSineDur: minimum duration of sinusoidal tracks nH: maximum number of harmonics minf0: minimum fundamental frequency in sound maxf0: maximum fundamental frequency in sound f0et: maximum error accepted in f0 detection algorithm harmDevSlope: allowed deviation of harmonic tracks, higher harmonics have higher allowed deviation stocf: decimation factor used for the stochastic approximation returns inputFile: input file name; fs: sampling rate of input file, hfreq, hmag: harmonic frequencies, magnitude; mYst: stochastic residual """ # size of fft used in synthesis Ns = 512 # hop size (has to be 1/4 of Ns) H = 128 # read input sound (fs, x) = UF.wavread(inputFile) # compute analysis window w = get_window(window, M) # compute the harmonic plus stochastic model of the whole sound hfreq, hmag, hphase, mYst = HPS.hpsModelAnal(x, fs, w, N, H, t, nH, minf0, maxf0, f0et, harmDevSlope, minSineDur, Ns, stocf) # synthesize the harmonic plus stochastic model without original phases y, yh, yst = HPS.hpsModelSynth(hfreq, hmag, np.array([]), mYst, Ns, H, fs) # write output sound outputFile = 'output_sounds/' + os.path.basename(inputFile)[:-4] + '_hpsModel.wav' UF.wavwrite(y,fs, outputFile) # create figure to plot plt.figure(figsize=(9, 6)) # frequency range to plot maxplotfreq = 15000.0 # plot the input sound plt.subplot(3,1,1) plt.plot(np.arange(x.size)/float(fs), x) plt.axis([0, x.size/float(fs), min(x), max(x)]) plt.ylabel('amplitude') plt.xlabel('time (sec)') plt.title('input sound: x') # plot spectrogram stochastic compoment plt.subplot(3,1,2) numFrames = int(mYst[:,0].size) sizeEnv = int(mYst[0,:].size) frmTime = H*np.arange(numFrames)/float(fs) binFreq = (.5*fs)*np.arange(sizeEnv*maxplotfreq/(.5*fs))/sizeEnv plt.pcolormesh(frmTime, binFreq, np.transpose(mYst[:,:int(sizeEnv*maxplotfreq/(.5*fs))+1])) plt.autoscale(tight=True) # plot harmonic on top of stochastic spectrogram if (hfreq.shape[1] > 0): harms = hfreq*np.less(hfreq,maxplotfreq) harms[harms==0] = np.nan numFrames = int(harms[:,0].size) frmTime = H*np.arange(numFrames)/float(fs) plt.plot(frmTime, harms, color='k', ms=3, alpha=1) plt.xlabel('time (sec)') plt.ylabel('frequency (Hz)') plt.autoscale(tight=True) plt.title('harmonics + stochastic spectrogram') # plot the output sound plt.subplot(3,1,3) plt.plot(np.arange(y.size)/float(fs), y) plt.axis([0, y.size/float(fs), min(y), max(y)]) plt.ylabel('amplitude') plt.xlabel('time (sec)') plt.title('output sound: y') plt.tight_layout() plt.show(block=False) return inputFile, fs, hfreq, hmag, mYst def transformation_synthesis(inputFile, fs, hfreq, hmag, mYst, freqScaling = np.array([0, 1.2, 2.01, 1.2, 2.679, .7, 3.146, .7]), freqStretching = np.array([0, 1, 2.01, 1, 2.679, 1.5, 3.146, 1.5]), timbrePreservation = 1, timeScaling = np.array([0, 0, 2.138, 2.138-1.0, 3.146, 3.146])): """ transform the analysis values returned by the analysis function and synthesize the sound inputFile: name of input file fs: sampling rate of input file hfreq, hmag: harmonic frequencies and magnitudes mYst: stochastic residual freqScaling: frequency scaling factors, in time-value pairs (value of 1 no scaling) freqStretching: frequency stretching factors, in time-value pairs (value of 1 no stretching) timbrePreservation: 1 preserves original timbre, 0 it does not timeScaling: time scaling factors, in time-value pairs """ # size of fft used in synthesis Ns = 512 # hop size (has to be 1/4 of Ns) H = 128 # frequency scaling of the harmonics hfreqt, hmagt = HT.harmonicFreqScaling(hfreq, hmag, freqScaling, freqStretching, timbrePreservation, fs) # time scaling the sound yhfreq, yhmag, ystocEnv = HPST.hpsTimeScale(hfreqt, hmagt, mYst, timeScaling) # synthesis from the trasformed hps representation y, yh, yst = HPS.hpsModelSynth(yhfreq, yhmag, np.array([]), ystocEnv, Ns, H, fs) # write output sound outputFile = 'output_sounds/' + os.path.basename(inputFile)[:-4] + '_hpsModelTransformation.wav' UF.wavwrite(y,fs, outputFile) # create figure to plot plt.figure(figsize=(12, 6)) # frequency range to plot maxplotfreq = 15000.0 # plot spectrogram of transformed stochastic compoment plt.subplot(2,1,1) numFrames = int(ystocEnv[:,0].size) sizeEnv = int(ystocEnv[0,:].size) frmTime = H*np.arange(numFrames)/float(fs) binFreq = (.5*fs)*np.arange(sizeEnv*maxplotfreq/(.5*fs))/sizeEnv plt.pcolormesh(frmTime, binFreq, np.transpose(ystocEnv[:,:int(sizeEnv*maxplotfreq/(.5*fs))+1])) plt.autoscale(tight=True) # plot transformed harmonic on top of stochastic spectrogram if (yhfreq.shape[1] > 0): harms = yhfreq*np.less(yhfreq,maxplotfreq) harms[harms==0] = np.nan numFrames = int(harms[:,0].size) frmTime = H*np.arange(numFrames)/float(fs) plt.plot(frmTime, harms, color='k', ms=3, alpha=1) plt.xlabel('time (sec)') plt.ylabel('frequency (Hz)') plt.autoscale(tight=True) plt.title('harmonics + stochastic spectrogram') # plot the output sound plt.subplot(2,1,2) plt.plot(np.arange(y.size)/float(fs), y) plt.axis([0, y.size/float(fs), min(y), max(y)]) plt.ylabel('amplitude') plt.xlabel('time (sec)') plt.title('output sound: y') plt.tight_layout() plt.show() if __name__ == "__main__": # analysis inputFile, fs, hfreq, hmag, mYst = analysis() # transformation and synthesis transformation_synthesis(inputFile, fs, hfreq, hmag, mYst) plt.show()
[ 2, 2163, 869, 284, 262, 13389, 5499, 286, 23082, 329, 262, 289, 862, 17633, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 651, 62, 17497, 198, 11748, 25064, 11, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 36911, 705, 40720, 27530, 14, 6, 4008, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 36911, 705, 40720, 35636, 602, 14, 6, 4008, 198, 11748, 289, 862, 17633, 355, 367, 3705, 198, 11748, 289, 862, 41762, 602, 355, 6574, 2257, 198, 11748, 49239, 41762, 602, 355, 7154, 198, 11748, 7736, 24629, 2733, 355, 471, 37, 198, 198, 4299, 3781, 7, 15414, 8979, 11639, 40720, 40720, 82, 3733, 14, 82, 897, 12, 34675, 12, 19509, 13, 45137, 3256, 4324, 11639, 13424, 805, 3256, 337, 28, 41706, 11, 399, 28, 35500, 11, 256, 10779, 3064, 11, 220, 198, 197, 1084, 50, 500, 36927, 28, 15, 13, 16, 11, 299, 39, 28, 3064, 11, 949, 69, 15, 28, 14877, 11, 3509, 69, 15, 28, 9879, 11, 277, 15, 316, 28, 20, 11, 4419, 13603, 11122, 3008, 28, 15, 13, 486, 11, 336, 420, 69, 28, 15, 13, 16, 2599, 198, 197, 37811, 198, 197, 37702, 2736, 257, 2128, 351, 262, 49239, 5556, 3995, 354, 3477, 2746, 198, 197, 15414, 8979, 25, 5128, 2128, 2393, 357, 2144, 2522, 9229, 351, 19232, 2494, 286, 5846, 3064, 8, 198, 197, 17497, 25, 3781, 4324, 2099, 357, 2554, 21413, 11, 289, 272, 768, 11, 8891, 2229, 11, 2042, 805, 11, 2042, 805, 9869, 2442, 8, 197, 198, 197, 44, 25, 3781, 4324, 2546, 220, 198, 197, 45, 25, 277, 701, 2546, 357, 6477, 286, 734, 11, 5749, 393, 4961, 621, 337, 8, 198, 197, 83, 25, 14735, 11387, 286, 37410, 25740, 220, 198, 197, 1084, 50, 500, 36927, 25, 5288, 9478, 286, 7813, 385, 47502, 8339, 198, 197, 77, 39, 25, 5415, 1271, 286, 25625, 873, 198, 197, 1084, 69, 15, 25, 5288, 7531, 8373, 287, 2128, 198, 197, 9806, 69, 15, 25, 5415, 7531, 8373, 287, 2128, 198, 197, 69, 15, 316, 25, 5415, 4049, 6292, 287, 277, 15, 13326, 11862, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 197, 29155, 13603, 11122, 3008, 25, 3142, 28833, 286, 49239, 8339, 11, 2440, 25625, 873, 423, 2440, 3142, 28833, 198, 197, 301, 420, 69, 25, 875, 18991, 5766, 973, 329, 262, 3995, 354, 3477, 40874, 198, 197, 7783, 82, 5128, 8979, 25, 5128, 2393, 1438, 26, 43458, 25, 19232, 2494, 286, 5128, 2393, 11, 198, 197, 220, 220, 220, 220, 220, 220, 220, 289, 19503, 80, 11, 289, 19726, 25, 49239, 19998, 11, 14735, 26, 285, 56, 301, 25, 3995, 354, 3477, 29598, 198, 197, 37811, 628, 197, 2, 2546, 286, 277, 701, 973, 287, 21263, 198, 197, 47503, 796, 22243, 628, 197, 2, 1725, 2546, 357, 10134, 284, 307, 352, 14, 19, 286, 399, 82, 8, 198, 197, 39, 796, 13108, 628, 197, 2, 1100, 5128, 2128, 198, 197, 7, 9501, 11, 2124, 8, 796, 471, 37, 13, 45137, 961, 7, 15414, 8979, 8, 628, 197, 2, 24061, 3781, 4324, 198, 197, 86, 796, 651, 62, 17497, 7, 17497, 11, 337, 8, 628, 197, 2, 24061, 262, 49239, 5556, 3995, 354, 3477, 2746, 286, 262, 2187, 2128, 198, 197, 71, 19503, 80, 11, 289, 19726, 11, 289, 40715, 11, 285, 56, 301, 796, 367, 3705, 13, 71, 862, 17633, 2025, 282, 7, 87, 11, 43458, 11, 266, 11, 399, 11, 367, 11, 256, 11, 299, 39, 11, 949, 69, 15, 11, 3509, 69, 15, 11, 277, 15, 316, 11, 4419, 13603, 11122, 3008, 11, 949, 50, 500, 36927, 11, 399, 82, 11, 336, 420, 69, 8, 628, 197, 2, 24983, 1096, 262, 49239, 5556, 3995, 354, 3477, 2746, 1231, 2656, 21164, 198, 197, 88, 11, 331, 71, 11, 331, 301, 796, 367, 3705, 13, 71, 862, 17633, 29934, 400, 7, 71, 19503, 80, 11, 289, 19726, 11, 45941, 13, 18747, 7, 21737, 828, 285, 56, 301, 11, 399, 82, 11, 367, 11, 43458, 8, 628, 197, 2, 3551, 5072, 2128, 220, 198, 197, 22915, 8979, 796, 705, 22915, 62, 82, 3733, 14, 6, 1343, 28686, 13, 6978, 13, 12093, 12453, 7, 15414, 8979, 38381, 21912, 19, 60, 1343, 705, 62, 71, 862, 17633, 13, 45137, 6, 198, 197, 36820, 13, 45137, 13564, 7, 88, 11, 9501, 11, 5072, 8979, 8, 628, 197, 2, 2251, 3785, 284, 7110, 198, 197, 489, 83, 13, 26875, 7, 5647, 7857, 16193, 24, 11, 718, 4008, 628, 197, 2, 8373, 2837, 284, 7110, 198, 197, 9806, 29487, 19503, 80, 796, 1315, 830, 13, 15, 628, 197, 2, 7110, 262, 5128, 2128, 198, 197, 489, 83, 13, 7266, 29487, 7, 18, 11, 16, 11, 16, 8, 198, 197, 489, 83, 13, 29487, 7, 37659, 13, 283, 858, 7, 87, 13, 7857, 20679, 22468, 7, 9501, 828, 2124, 8, 198, 197, 489, 83, 13, 22704, 26933, 15, 11, 2124, 13, 7857, 14, 22468, 7, 9501, 828, 949, 7, 87, 828, 3509, 7, 87, 8, 12962, 198, 197, 489, 83, 13, 2645, 9608, 10786, 321, 489, 3984, 11537, 198, 197, 489, 83, 13, 87, 18242, 10786, 2435, 357, 2363, 8, 11537, 198, 197, 489, 83, 13, 7839, 10786, 15414, 2128, 25, 2124, 11537, 628, 197, 2, 7110, 5444, 39529, 3995, 354, 3477, 552, 296, 298, 198, 197, 489, 83, 13, 7266, 29487, 7, 18, 11, 16, 11, 17, 8, 198, 197, 22510, 35439, 796, 493, 7, 76, 56, 301, 58, 45299, 15, 4083, 7857, 8, 198, 197, 7857, 4834, 85, 796, 493, 7, 76, 56, 301, 58, 15, 11, 25, 4083, 7857, 8, 198, 197, 8310, 76, 7575, 796, 367, 9, 37659, 13, 283, 858, 7, 22510, 35439, 20679, 22468, 7, 9501, 8, 198, 197, 8800, 20366, 80, 796, 20262, 20, 9, 9501, 27493, 37659, 13, 283, 858, 7, 7857, 4834, 85, 9, 9806, 29487, 19503, 80, 29006, 13, 20, 9, 9501, 4008, 14, 7857, 4834, 85, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 197, 489, 83, 13, 79, 4033, 579, 5069, 7, 8310, 76, 7575, 11, 9874, 20366, 80, 11, 45941, 13, 7645, 3455, 7, 76, 56, 301, 58, 45299, 25, 600, 7, 7857, 4834, 85, 9, 9806, 29487, 19503, 80, 29006, 13, 20, 9, 9501, 4008, 10, 16, 60, 4008, 198, 197, 489, 83, 13, 2306, 17500, 1000, 7, 33464, 28, 17821, 8, 628, 197, 2, 7110, 49239, 319, 1353, 286, 3995, 354, 3477, 5444, 39529, 198, 197, 361, 357, 71, 19503, 80, 13, 43358, 58, 16, 60, 1875, 657, 2599, 198, 197, 197, 71, 8357, 796, 289, 19503, 80, 9, 37659, 13, 1203, 7, 71, 19503, 80, 11, 9806, 29487, 19503, 80, 8, 198, 197, 197, 71, 8357, 58, 71, 8357, 855, 15, 60, 796, 45941, 13, 12647, 198, 197, 197, 22510, 35439, 796, 493, 7, 71, 8357, 58, 45299, 15, 4083, 7857, 8, 198, 197, 197, 8310, 76, 7575, 796, 367, 9, 37659, 13, 283, 858, 7, 22510, 35439, 20679, 22468, 7, 9501, 8, 220, 198, 197, 197, 489, 83, 13, 29487, 7, 8310, 76, 7575, 11, 34859, 11, 3124, 11639, 74, 3256, 13845, 28, 18, 11, 17130, 28, 16, 8, 198, 197, 197, 489, 83, 13, 87, 18242, 10786, 2435, 357, 2363, 8, 11537, 198, 197, 197, 489, 83, 13, 2645, 9608, 10786, 35324, 357, 7399, 8, 11537, 198, 197, 197, 489, 83, 13, 2306, 17500, 1000, 7, 33464, 28, 17821, 8, 198, 197, 197, 489, 83, 13, 7839, 10786, 29155, 38530, 1343, 3995, 354, 3477, 5444, 39529, 11537, 628, 197, 2, 7110, 262, 5072, 2128, 198, 197, 489, 83, 13, 7266, 29487, 7, 18, 11, 16, 11, 18, 8, 198, 197, 489, 83, 13, 29487, 7, 37659, 13, 283, 858, 7, 88, 13, 7857, 20679, 22468, 7, 9501, 828, 331, 8, 198, 197, 489, 83, 13, 22704, 26933, 15, 11, 331, 13, 7857, 14, 22468, 7, 9501, 828, 949, 7, 88, 828, 3509, 7, 88, 8, 12962, 198, 197, 489, 83, 13, 2645, 9608, 10786, 321, 489, 3984, 11537, 198, 197, 489, 83, 13, 87, 18242, 10786, 2435, 357, 2363, 8, 11537, 198, 197, 489, 83, 13, 7839, 10786, 22915, 2128, 25, 331, 11537, 628, 197, 489, 83, 13, 33464, 62, 39786, 3419, 198, 197, 489, 83, 13, 12860, 7, 9967, 28, 25101, 8, 628, 197, 7783, 5128, 8979, 11, 43458, 11, 289, 19503, 80, 11, 289, 19726, 11, 285, 56, 301, 628, 198, 4299, 13389, 62, 1837, 429, 8497, 7, 15414, 8979, 11, 43458, 11, 289, 19503, 80, 11, 289, 19726, 11, 285, 56, 301, 11, 2030, 80, 3351, 4272, 796, 45941, 13, 18747, 26933, 15, 11, 352, 13, 17, 11, 362, 13, 486, 11, 352, 13, 17, 11, 362, 13, 37601, 11, 764, 22, 11, 513, 13, 20964, 11, 764, 22, 46570, 220, 198, 197, 19503, 80, 1273, 1186, 10813, 796, 45941, 13, 18747, 26933, 15, 11, 352, 11, 362, 13, 486, 11, 352, 11, 362, 13, 37601, 11, 352, 13, 20, 11, 513, 13, 20964, 11, 352, 13, 20, 46570, 4628, 4679, 25460, 13208, 796, 352, 11, 220, 198, 197, 2435, 3351, 4272, 796, 45941, 13, 18747, 26933, 15, 11, 657, 11, 362, 13, 20107, 11, 362, 13, 20107, 12, 16, 13, 15, 11, 513, 13, 20964, 11, 513, 13, 20964, 12962, 2599, 198, 197, 37811, 198, 197, 35636, 262, 3781, 3815, 4504, 416, 262, 3781, 2163, 290, 24983, 1096, 262, 2128, 198, 197, 15414, 8979, 25, 1438, 286, 5128, 2393, 198, 197, 9501, 25, 19232, 2494, 286, 5128, 2393, 197, 198, 197, 71, 19503, 80, 11, 289, 19726, 25, 49239, 19998, 290, 7842, 10455, 198, 197, 76, 56, 301, 25, 3995, 354, 3477, 29598, 198, 197, 19503, 80, 3351, 4272, 25, 8373, 20796, 5087, 11, 287, 640, 12, 8367, 14729, 357, 8367, 286, 352, 645, 20796, 8, 198, 197, 19503, 80, 1273, 1186, 10813, 25, 8373, 20880, 5087, 11, 287, 640, 12, 8367, 14729, 357, 8367, 286, 352, 645, 20880, 8, 198, 197, 16514, 4679, 25460, 13208, 25, 352, 43759, 2656, 4628, 4679, 11, 657, 340, 857, 407, 198, 197, 2435, 3351, 4272, 25, 640, 20796, 5087, 11, 287, 640, 12, 8367, 14729, 198, 197, 37811, 198, 197, 198, 197, 2, 2546, 286, 277, 701, 973, 287, 21263, 198, 197, 47503, 796, 22243, 628, 197, 2, 1725, 2546, 357, 10134, 284, 307, 352, 14, 19, 286, 399, 82, 8, 198, 197, 39, 796, 13108, 198, 197, 198, 197, 2, 8373, 20796, 286, 262, 25625, 873, 220, 198, 197, 71, 19503, 39568, 11, 289, 19726, 83, 796, 7154, 13, 29155, 9229, 20366, 80, 3351, 4272, 7, 71, 19503, 80, 11, 289, 19726, 11, 2030, 80, 3351, 4272, 11, 2030, 80, 1273, 1186, 10813, 11, 4628, 4679, 25460, 13208, 11, 43458, 8, 628, 197, 2, 640, 20796, 262, 2128, 198, 197, 88, 71, 19503, 80, 11, 331, 71, 19726, 11, 331, 301, 420, 4834, 85, 796, 6574, 2257, 13, 71, 862, 7575, 29990, 7, 71, 19503, 39568, 11, 289, 19726, 83, 11, 285, 56, 301, 11, 640, 3351, 4272, 8, 628, 197, 2, 21263, 422, 262, 491, 292, 12214, 289, 862, 10552, 220, 198, 197, 88, 11, 331, 71, 11, 331, 301, 796, 367, 3705, 13, 71, 862, 17633, 29934, 400, 7, 88, 71, 19503, 80, 11, 331, 71, 19726, 11, 45941, 13, 18747, 7, 21737, 828, 331, 301, 420, 4834, 85, 11, 399, 82, 11, 367, 11, 43458, 8, 628, 197, 2, 3551, 5072, 2128, 220, 198, 197, 22915, 8979, 796, 705, 22915, 62, 82, 3733, 14, 6, 1343, 28686, 13, 6978, 13, 12093, 12453, 7, 15414, 8979, 38381, 21912, 19, 60, 1343, 705, 62, 71, 862, 17633, 8291, 1161, 13, 45137, 6, 198, 197, 36820, 13, 45137, 13564, 7, 88, 11, 9501, 11, 5072, 8979, 8, 628, 197, 2, 2251, 3785, 284, 7110, 198, 197, 489, 83, 13, 26875, 7, 5647, 7857, 16193, 1065, 11, 718, 4008, 628, 197, 2, 8373, 2837, 284, 7110, 198, 197, 9806, 29487, 19503, 80, 796, 1315, 830, 13, 15, 628, 197, 2, 7110, 5444, 39529, 286, 14434, 3995, 354, 3477, 552, 296, 298, 198, 197, 489, 83, 13, 7266, 29487, 7, 17, 11, 16, 11, 16, 8, 198, 197, 22510, 35439, 796, 493, 7, 88, 301, 420, 4834, 85, 58, 45299, 15, 4083, 7857, 8, 198, 197, 7857, 4834, 85, 796, 493, 7, 88, 301, 420, 4834, 85, 58, 15, 11, 25, 4083, 7857, 8, 198, 197, 8310, 76, 7575, 796, 367, 9, 37659, 13, 283, 858, 7, 22510, 35439, 20679, 22468, 7, 9501, 8, 198, 197, 8800, 20366, 80, 796, 20262, 20, 9, 9501, 27493, 37659, 13, 283, 858, 7, 7857, 4834, 85, 9, 9806, 29487, 19503, 80, 29006, 13, 20, 9, 9501, 4008, 14, 7857, 4834, 85, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 197, 489, 83, 13, 79, 4033, 579, 5069, 7, 8310, 76, 7575, 11, 9874, 20366, 80, 11, 45941, 13, 7645, 3455, 7, 88, 301, 420, 4834, 85, 58, 45299, 25, 600, 7, 7857, 4834, 85, 9, 9806, 29487, 19503, 80, 29006, 13, 20, 9, 9501, 4008, 10, 16, 60, 4008, 198, 197, 489, 83, 13, 2306, 17500, 1000, 7, 33464, 28, 17821, 8, 628, 197, 2, 7110, 14434, 49239, 319, 1353, 286, 3995, 354, 3477, 5444, 39529, 198, 197, 361, 357, 88, 71, 19503, 80, 13, 43358, 58, 16, 60, 1875, 657, 2599, 198, 197, 197, 71, 8357, 796, 331, 71, 19503, 80, 9, 37659, 13, 1203, 7, 88, 71, 19503, 80, 11, 9806, 29487, 19503, 80, 8, 198, 197, 197, 71, 8357, 58, 71, 8357, 855, 15, 60, 796, 45941, 13, 12647, 198, 197, 197, 22510, 35439, 796, 493, 7, 71, 8357, 58, 45299, 15, 4083, 7857, 8, 198, 197, 197, 8310, 76, 7575, 796, 367, 9, 37659, 13, 283, 858, 7, 22510, 35439, 20679, 22468, 7, 9501, 8, 220, 198, 197, 197, 489, 83, 13, 29487, 7, 8310, 76, 7575, 11, 34859, 11, 3124, 11639, 74, 3256, 13845, 28, 18, 11, 17130, 28, 16, 8, 198, 197, 197, 489, 83, 13, 87, 18242, 10786, 2435, 357, 2363, 8, 11537, 198, 197, 197, 489, 83, 13, 2645, 9608, 10786, 35324, 357, 7399, 8, 11537, 198, 197, 197, 489, 83, 13, 2306, 17500, 1000, 7, 33464, 28, 17821, 8, 198, 197, 197, 489, 83, 13, 7839, 10786, 29155, 38530, 1343, 3995, 354, 3477, 5444, 39529, 11537, 628, 197, 2, 7110, 262, 5072, 2128, 198, 197, 489, 83, 13, 7266, 29487, 7, 17, 11, 16, 11, 17, 8, 198, 197, 489, 83, 13, 29487, 7, 37659, 13, 283, 858, 7, 88, 13, 7857, 20679, 22468, 7, 9501, 828, 331, 8, 198, 197, 489, 83, 13, 22704, 26933, 15, 11, 331, 13, 7857, 14, 22468, 7, 9501, 828, 949, 7, 88, 828, 3509, 7, 88, 8, 12962, 198, 197, 489, 83, 13, 2645, 9608, 10786, 321, 489, 3984, 11537, 198, 197, 489, 83, 13, 87, 18242, 10786, 2435, 357, 2363, 8, 11537, 198, 197, 489, 83, 13, 7839, 10786, 22915, 2128, 25, 331, 11537, 628, 197, 489, 83, 13, 33464, 62, 39786, 3419, 198, 197, 489, 83, 13, 12860, 3419, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 198, 197, 2, 3781, 198, 197, 15414, 8979, 11, 43458, 11, 289, 19503, 80, 11, 289, 19726, 11, 285, 56, 301, 796, 3781, 3419, 628, 197, 2, 13389, 290, 21263, 198, 197, 7645, 1161, 62, 1837, 429, 8497, 7, 15414, 8979, 11, 43458, 11, 289, 19503, 80, 11, 289, 19726, 11, 285, 56, 301, 8, 628, 197, 489, 83, 13, 12860, 3419, 198 ]
2.432562
2,721
#!/usr/bin/python with open('works.txt', 'r') as f: data1 = f.read(22) print(data1) f.seek(0, 0) data2 = f.read(22) print(data2)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 4480, 1280, 10786, 5225, 13, 14116, 3256, 705, 81, 11537, 355, 277, 25, 628, 220, 220, 220, 1366, 16, 796, 277, 13, 961, 7, 1828, 8, 198, 220, 220, 220, 3601, 7, 7890, 16, 8, 628, 220, 220, 220, 277, 13, 36163, 7, 15, 11, 657, 8, 628, 220, 220, 220, 1366, 17, 796, 277, 13, 961, 7, 1828, 8, 198, 220, 220, 220, 3601, 7, 7890, 17, 8, 198 ]
1.936709
79
import decimal import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import timezone
[ 11748, 32465, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 1891, 2412, 13, 8692, 13, 3575, 602, 1330, 7308, 38105, 18843, 602, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 628 ]
3.772727
44
teststring ="hello" print(teststring)
[ 9288, 8841, 796, 1, 31373, 1, 198, 4798, 7, 9288, 8841, 8 ]
3.083333
12
from insights.parsers.nfs_exports import NFSExports, NFSExportsD from insights.tests import context_wrap EXPORTS = """ /home/utcs/shared/ro @rhtttttttttttt(ro,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash) /home/insights/shared/rw @rhtttttttttttt(rw,sync) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(ro,sync,no_root_squash) /home/insights/shared/special/all/mail @rhtttttttttttt(rw,sync,no_root_squash) /home/insights/ins/special/all/config @rhtttttttttttt(ro,sync,no_root_squash) ins1.example.com(rw,sync,no_root_squash) #/home/insights ins1.example.com(rw,sync,no_root_squash) /home/example @rhtttttttttttt(rw,sync,root_squash) ins1.example.com(rw,sync,no_root_squash) ins2.example.com(rw,sync,no_root_squash) /home/example ins3.example.com(rw,sync,no_root_squash) """.strip()
[ 6738, 17218, 13, 79, 945, 364, 13, 77, 9501, 62, 1069, 3742, 1330, 399, 10652, 3109, 3742, 11, 399, 10652, 3109, 3742, 35, 198, 6738, 17218, 13, 41989, 1330, 4732, 62, 37150, 198, 198, 49864, 33002, 796, 37227, 198, 14, 11195, 14, 315, 6359, 14, 28710, 14, 305, 2488, 81, 2804, 926, 926, 926, 926, 926, 7, 305, 11, 27261, 8, 220, 220, 1035, 16, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 1035, 17, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 14, 11195, 14, 1040, 2337, 14, 28710, 14, 31653, 2488, 81, 2804, 926, 926, 926, 926, 926, 7, 31653, 11, 27261, 8, 220, 220, 1035, 16, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 1035, 17, 13, 20688, 13, 785, 7, 305, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 14, 11195, 14, 1040, 2337, 14, 28710, 14, 20887, 14, 439, 14, 4529, 220, 220, 2488, 81, 2804, 926, 926, 926, 926, 926, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 14, 11195, 14, 1040, 2337, 14, 1040, 14, 20887, 14, 439, 14, 11250, 220, 220, 2488, 81, 2804, 926, 926, 926, 926, 926, 7, 305, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 220, 1035, 16, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 2, 14, 11195, 14, 1040, 2337, 1035, 16, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 14, 11195, 14, 20688, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 81, 2804, 926, 926, 926, 926, 926, 7, 31653, 11, 27261, 11, 15763, 62, 16485, 1077, 8, 1035, 16, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 1035, 17, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 14, 11195, 14, 20688, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1035, 18, 13, 20688, 13, 785, 7, 31653, 11, 27261, 11, 3919, 62, 15763, 62, 16485, 1077, 8, 198, 15931, 1911, 36311, 3419, 628, 628, 628, 198 ]
2.248062
387
#!/usr/bin/env python #bbfreeze setup file for PEAT_DB distribution on Windows #Damien Farrell, #October 2009 """ This script can be used to create a standalone executable for either windows or linux. It must be run on the target platform. You will need to install bbfreeze, see http://pypi.python.org/pypi/bbfreeze/ """ from bbfreeze import Freezer import sys, os, shutil shutil.rmtree('peatdb', ignore_errors=True) path=os.path.abspath('../../..') peatpath=os.path.abspath('../../../PEATDB') version = '2.0' f = Freezer('peatdb', includes=("numpy",),excludes=("wx",)) f.addScript(os.path.join(peatpath, "PEATApp.py")) f.addScript(os.path.join(peatpath, "Ekin/Ekin_main.py")) f.addScript(os.path.join(peatpath, "DNAtool/DNAtool.py")) m=f.mf f() # runs the freezing process '''post freeze''' #mpl data import matplotlib mpldir = matplotlib.get_data_path() datadir = 'peatdb/mpl-data' shutil.copytree(mpldir, datadir) #add peat resource files resources = ['PEATDB/DNAtool/restriction_enzymes.DAT', 'PEATDB/data/AA_masses.txt', 'PEATDB/App.ico', 'PEATDB/DNAtool/DNAtool.ico', 'Protool/AA.DAT', 'Protool/bbdep02.May.sortlib'] for r in resources: shutil.copy(os.path.join(path, r), 'peatdb') #set icon? #make zip archive import zipfile f = zipfile.ZipFile("peatdb-2.0.zip", "w") for dirpath, dirnames, filenames in os.walk('peatdb'): for fname in filenames: fullname = os.path.join(dirpath, fname) f.write(fullname) f.close()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 11848, 5787, 2736, 9058, 2393, 329, 18468, 1404, 62, 11012, 6082, 319, 3964, 201, 198, 2, 14550, 2013, 37568, 11, 1303, 18517, 3717, 201, 198, 201, 198, 37811, 201, 198, 1212, 4226, 460, 307, 973, 284, 2251, 257, 27669, 28883, 329, 201, 198, 31336, 9168, 393, 32639, 13, 632, 1276, 307, 1057, 319, 262, 2496, 3859, 13, 201, 198, 1639, 481, 761, 284, 2721, 275, 65, 5787, 2736, 11, 766, 2638, 1378, 79, 4464, 72, 13, 29412, 13, 2398, 14, 79, 4464, 72, 14, 11848, 5787, 2736, 14, 201, 198, 37811, 201, 198, 201, 198, 6738, 275, 65, 5787, 2736, 1330, 3232, 9107, 201, 198, 11748, 25064, 11, 28686, 11, 4423, 346, 201, 198, 201, 198, 1477, 22602, 13, 81, 16762, 631, 10786, 18267, 9945, 3256, 8856, 62, 48277, 28, 17821, 8, 201, 198, 6978, 28, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 40720, 492, 11537, 201, 198, 18267, 6978, 28, 418, 13, 6978, 13, 397, 2777, 776, 10786, 40720, 40720, 40720, 11401, 1404, 11012, 11537, 201, 198, 9641, 796, 705, 17, 13, 15, 6, 201, 198, 201, 198, 69, 796, 3232, 9107, 10786, 18267, 9945, 3256, 3407, 28, 7203, 77, 32152, 1600, 828, 1069, 13955, 28, 7203, 49345, 1600, 4008, 201, 198, 69, 13, 2860, 7391, 7, 418, 13, 6978, 13, 22179, 7, 18267, 6978, 11, 366, 11401, 1404, 4677, 13, 9078, 48774, 201, 198, 69, 13, 2860, 7391, 7, 418, 13, 6978, 13, 22179, 7, 18267, 6978, 11, 366, 36, 5116, 14, 36, 5116, 62, 12417, 13, 9078, 48774, 201, 198, 69, 13, 2860, 7391, 7, 418, 13, 6978, 13, 22179, 7, 18267, 6978, 11, 366, 35504, 2953, 970, 14, 35504, 2953, 970, 13, 9078, 48774, 201, 198, 76, 28, 69, 13, 76, 69, 201, 198, 69, 3419, 220, 220, 220, 1303, 4539, 262, 20884, 1429, 201, 198, 201, 198, 7061, 6, 7353, 16611, 7061, 6, 201, 198, 2, 76, 489, 1366, 201, 198, 11748, 2603, 29487, 8019, 201, 198, 3149, 335, 343, 796, 2603, 29487, 8019, 13, 1136, 62, 7890, 62, 6978, 3419, 201, 198, 19608, 324, 343, 796, 705, 18267, 9945, 14, 76, 489, 12, 7890, 6, 201, 198, 1477, 22602, 13, 30073, 21048, 7, 3149, 335, 343, 11, 4818, 324, 343, 8, 201, 198, 201, 198, 2, 2860, 613, 265, 8271, 3696, 201, 198, 37540, 796, 37250, 11401, 1404, 11012, 14, 35504, 2953, 970, 14, 2118, 46214, 62, 19471, 22009, 13, 35, 1404, 3256, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11401, 1404, 11012, 14, 7890, 14, 3838, 62, 76, 13978, 13, 14116, 3256, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11401, 1404, 11012, 14, 4677, 13, 3713, 3256, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 11401, 1404, 11012, 14, 35504, 2953, 970, 14, 35504, 2953, 970, 13, 3713, 3256, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 19703, 970, 14, 3838, 13, 35, 1404, 3256, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 19703, 970, 14, 11848, 10378, 2999, 13, 6747, 13, 30619, 8019, 20520, 201, 198, 1640, 374, 287, 4133, 25, 201, 198, 220, 220, 220, 4423, 346, 13, 30073, 7, 418, 13, 6978, 13, 22179, 7, 6978, 11, 374, 828, 705, 18267, 9945, 11537, 201, 198, 2, 2617, 7196, 30, 201, 198, 201, 198, 2, 15883, 19974, 15424, 201, 198, 11748, 19974, 7753, 201, 198, 69, 796, 19974, 7753, 13, 41729, 8979, 7203, 18267, 9945, 12, 17, 13, 15, 13, 13344, 1600, 366, 86, 4943, 201, 198, 1640, 26672, 6978, 11, 26672, 14933, 11, 1226, 268, 1047, 287, 28686, 13, 11152, 10786, 18267, 9945, 6, 2599, 201, 198, 220, 220, 220, 329, 277, 3672, 287, 1226, 268, 1047, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1336, 3672, 796, 28686, 13, 6978, 13, 22179, 7, 15908, 6978, 11, 277, 3672, 8, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 277, 13, 13564, 7, 12853, 3672, 8, 201, 198, 69, 13, 19836, 3419, 201, 198, 201, 198 ]
2.216667
720
import collections import random from math import sqrt import numpy as np import torch from gym.wrappers import LazyFrames from common.utils import prep_observation_for_qnet class PrioritizedReplayBuffer: """ based on https://nn.labml.ai/rl/dqn, supports n-step bootstrapping and parallel environments, removed alpha hyperparameter like google/dopamine """ @staticmethod def find_prefix_sum_idx(self, prefix_sum): """ find the largest i such that the sum of the leaves from 1 to i is <= prefix sum""" idx = 1 while idx < self.capacity: if self.priority_sum[idx * 2] > prefix_sum: idx = 2 * idx else: prefix_sum -= self.priority_sum[idx * 2] idx = 2 * idx + 1 return idx - self.capacity @property @property
[ 11748, 17268, 198, 11748, 4738, 198, 6738, 10688, 1330, 19862, 17034, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 11550, 13, 29988, 11799, 1330, 406, 12582, 35439, 198, 198, 6738, 2219, 13, 26791, 1330, 3143, 62, 672, 3168, 341, 62, 1640, 62, 80, 3262, 628, 198, 198, 4871, 14481, 36951, 3041, 1759, 28632, 25, 198, 220, 220, 220, 37227, 1912, 319, 3740, 1378, 20471, 13, 23912, 4029, 13, 1872, 14, 45895, 14, 49506, 77, 11, 6971, 299, 12, 9662, 6297, 12044, 2105, 290, 10730, 12493, 11, 198, 220, 220, 220, 4615, 17130, 8718, 17143, 2357, 588, 23645, 14, 67, 404, 9862, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 12708, 24396, 628, 220, 220, 220, 825, 1064, 62, 40290, 62, 16345, 62, 312, 87, 7, 944, 11, 21231, 62, 16345, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 1064, 262, 4387, 1312, 884, 326, 262, 2160, 286, 262, 5667, 422, 352, 284, 1312, 318, 19841, 21231, 2160, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 981, 4686, 87, 1279, 2116, 13, 42404, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 49336, 62, 16345, 58, 312, 87, 1635, 362, 60, 1875, 21231, 62, 16345, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 362, 1635, 4686, 87, 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, 21231, 62, 16345, 48185, 2116, 13, 49336, 62, 16345, 58, 312, 87, 1635, 362, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4686, 87, 796, 362, 1635, 4686, 87, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4686, 87, 532, 2116, 13, 42404, 628, 220, 220, 220, 2488, 26745, 628, 220, 220, 220, 2488, 26745, 628 ]
2.468023
344
import logging import aiohttp from typing import Tuple from controller.data.VM import VM from controller.connectors.Connector import Connector
[ 11748, 18931, 198, 11748, 257, 952, 4023, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 10444, 13, 7890, 13, 15996, 1330, 16990, 198, 6738, 10444, 13, 8443, 669, 13, 34525, 1330, 8113, 273, 628 ]
4.142857
35
from .models import Business,Profile from django import forms class BusinessForm(forms.ModelForm): """ class BusinessForm to enable a user to register their businesses with the application """ class ProfileForm(forms.ModelForm): """ class BusinessForm to enable a user to register their businesses with the application """
[ 6738, 764, 27530, 1330, 7320, 11, 37046, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 4871, 7320, 8479, 7, 23914, 13, 17633, 8479, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 7320, 8479, 284, 7139, 257, 2836, 284, 7881, 511, 5692, 198, 220, 220, 220, 351, 262, 3586, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 198, 4871, 13118, 8479, 7, 23914, 13, 17633, 8479, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 7320, 8479, 284, 7139, 257, 2836, 284, 7881, 511, 5692, 198, 220, 220, 220, 351, 262, 3586, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220 ]
3.254386
114
""" Pre-processing for mb_graph_batch.py of oriented membranes from TomoSegMemTV output Input: - STAR file with 3 columns: + _rlnMicrographName: tomogram original + _rlnImageName: TomoSegMemTV density map output + _psSegLabel: (optional) label for membrane segmentation + _psSegImage: (optional) binary mask to focus the segmentation analysis + _mtMtubesCsv: (optional) a .csv file with microtubule center lines - Setting for segmenting the membranes from TomoSegMemTV density map: + Density threshold: (optional) required if _psSegLabel not defined + Size threshold: (optional) required if _psSegLabel not defined - Sub-volume splitting settings Output: - A STAR file with 3 columns: + _rlnMicrographName: tomogram original + _rlnImageName: sub-volumes + _psSegImage: Un-oriented membrane segmentations for each subvolume + Columns for localizing the sub-volumes within each original tomogram """ ################# Package import import argparse import gc import os import sys import math import time import pyseg as ps import scipy as sp import skimage as sk import numpy as np from pyseg.globals import signed_distance_2d ###### Global variables __author__ = 'Antonio Martinez-Sanchez' MB_LBL, MB_NEIGH = 1, 2 MB_NEIGH_INT, MB_NEIGH_EXT = 2, 3 ######################################################################################## # PARAMETERS ######################################################################################## ROOT_PATH = '/fs/pool/pool-ruben/antonio/shiwei' # Input STAR file in_star = ROOT_PATH + '/pre/in/mb_seg_single_oriented.star' # Output directory out_dir = ROOT_PATH + '/pre/mbo_nosplit' # Subvolume splitting settings sp_split = None # (2, 2, 1) sp_off_voxels = 30 # vox # Membrane segmentation sg_res = 0.52 # nm/voxel sg_th = None # 8 sg_sz = None # 3e3 sg_mb_thick = 4 # nm sg_mb_neigh = 15 # nm # CSV file pre-processing cv_coords_cools = (1, 2, 3) cv_id_col = 4 # Microtubule settings mt_rad = 30 # nm mt_swap_xy = False ######################################################################################## # MAIN ROUTINE ######################################################################################## # Get them from the command line if they were passed through it parser = argparse.ArgumentParser() parser.add_argument('--inStar', default=in_star, help='Input star file.') parser.add_argument('--outDir', default=out_dir, help='Output directory.') parser.add_argument('--spSplit', nargs='+', type=int, default=sp_split, help='Number of splits (X, Y, Z).') parser.add_argument('--spOffVoxels', type=int, default=sp_off_voxels, help='Offset voxels.') parser.add_argument('--sgVoxelSize', default=sg_res, type=float, help='Voxel size (nm/voxel).') parser.add_argument('--sgThreshold', type=int, default=sg_th, help='Density threshold.') parser.add_argument('--sgSizeThreshold', type=int, default=sg_sz, help='Size threshold (voxels).') parser.add_argument('--sgMembThk', default=sg_mb_thick, type=float, help='Segmented membrane thickness (nm)') parser.add_argument('--sgMembNeigh', default=sg_mb_neigh, type=float, help='Segmented membrane neighbours (nm)') args = parser.parse_args() in_star = args.inStar out_dir = args.outDir sp_split = None if args.spSplit == [-1] else args.spSplit sp_off_voxels = args.spOffVoxels sg_res = args.sgVoxelSize sg_th = None if args.sgThreshold == -1 else args.sgThreshold sg_sz = None if args.sgSizeThreshold == -1 else args.sgSizeThreshold sg_mb_thick = args.sgMembThk sg_mb_neigh = args.sgMembNeigh ########## Print initial message print('Pre-processing for SEG analysis of un-oriented membranes from TomoSegMemTV output.') print('\tAuthor: ' + __author__) print('\tDate: ' + time.strftime("%c") + '\n') print('Options:') print('\tOutput directory: ' + str(out_dir)) print('\tInput STAR file: ' + str(in_star)) print('\tData resolution: ' + str(sg_res) + ' nm/vx') if sg_th is not None: print('\tSegmentation settings: ') print('\t\t-Density threshold: ' + str(sg_th)) print('\t\t-Size threshold: ' + str(sg_sz) + ' vx') print('\tSub-volume splitting settings: ') print('\t\t-Number of splits (X, Y, Z): ' + str(sp_split)) print('\t\t-Offset voxels: ' + str(sp_off_voxels)) print('\tMicrotubule settings:') print('\t\t-Microtube luminal radius: ' + str(mt_rad) + ' nm') print('\tCSV pre-processing: ') print('\t\t-Columns for samples coordinates (X, Y, Z): ' + str(cv_coords_cools)) print('\t\t-Column for microtubule ID: ' + str(cv_id_col)) print('') ######### Process print('Parsing input parameters...') sp_res, mt_rad, sp_off_voxels = float(sg_res), float(mt_rad), int(sp_off_voxels) out_stem = os.path.splitext(os.path.split(in_star)[1])[0] conn_mask = np.ones(shape=(3,3,3)) out_seg_dir = out_dir + '/segs' if not os.path.isdir(out_seg_dir): os.makedirs(out_seg_dir) print('Loading input STAR file...') gl_star = ps.sub.Star() try: gl_star.load(in_star) except ps.pexceptions.PySegInputError as e: print('ERROR: input STAR file could not be loaded because of "' + e.get_message() + '"') print('Terminated. (' + time.strftime("%c") + ')') sys.exit(-1) star = ps.sub.Star() star.add_column(key='_rlnMicrographName') star.add_column(key='_rlnImageName') star.add_column(key='_psSegImage') star.add_column(key='_psSegRot') star.add_column(key='_psSegTilt') star.add_column(key='_psSegPsi') star.add_column(key='_psSegOffX') star.add_column(key='_psSegOffY') star.add_column(key='_psSegOffZ') mode_oriented = False if gl_star.has_column('_rlnOriginX') and gl_star.has_column('_rlnOriginY') and gl_star.has_column('_rlnOriginZ'): print('\t-Segmentation origin found, oriented membrane segmentation activated!') mode_oriented = True print('Main Routine: tomograms loop') tomo_id = 0 for row in range(gl_star.get_nrows()): in_ref = gl_star.get_element('_rlnMicrographName', row) print('\tProcessing tomogram: ' + in_ref) out_ref_stem = os.path.splitext(os.path.split(in_ref)[1])[0] in_mb = gl_star.get_element('_rlnImageName', row) print('\t\t-Loading membrane segmentation: ' + in_mb) tomo_mb = ps.disperse_io.load_tomo(in_mb) tomo_ref = ps.disperse_io.load_tomo(in_ref, mmap=True) off_mask_min_x, off_mask_max_x = 0, tomo_ref.shape[0] off_mask_min_y, off_mask_max_y = 0, tomo_ref.shape[1] off_mask_min_z, off_mask_max_z = 0, tomo_ref.shape[2] wide_x = off_mask_max_x - off_mask_min_x wide_y = off_mask_max_y - off_mask_min_y wide_z = off_mask_max_z - off_mask_min_z mt_mask = None if gl_star.has_column('_mtMtubesCsv'): in_csv = gl_star.get_element('_mtMtubesCsv', row) print('\tReading input CSV file: ' + in_csv) mt_dic = ps.globals.read_csv_mts(in_csv, cv_coords_cools, cv_id_col, swap_xy=mt_swap_xy) mts_points = list() for mt_id, mt_samps in zip(iter(mt_dic.keys()), iter(mt_dic.values())): mts_points += mt_samps mts_points = np.asarray(mts_points, dtype=np.float32) * (1./sg_res) print('\tSegmenting the microtubules...') mt_mask = ps.globals.points_to_mask(mts_points, tomo_mb.shape, inv=True) mt_mask = sp.ndimage.morphology.distance_transform_edt(mt_mask, sampling=sg_res, return_indices=False) mt_mask = mt_mask > mt_rad mb_lbl = 0 if sg_th is None: if gl_star.has_column('_psSegLabel'): mb_lbl = gl_star.get_element('_psSegLabel', row) print('\t\t\t+Segmenting membranes with label: ' + str(mb_lbl)) if mb_lbl > 0: tomo_mb = tomo_mb == mb_lbl else: tomo_mb = tomo_mb > 0 else: tomo_mb = tomo_mb > 0 else: tomo_mb = tomo_mb >= sg_th if gl_star.has_column('_mtMtubesCsv'): tomo_mb *= mt_mask del mt_mask if gl_star.has_column('_psSegImage'): print('\tApplying the mask...') hold_mask = ps.disperse_io.load_tomo(gl_star.get_element('_psSegImage', row)) if mb_lbl > 0: hold_mask = hold_mask == mb_lbl else: hold_mask = hold_mask > 0 tomo_mb *= hold_mask ids_mask = np.where(hold_mask) off_mask_min_x, off_mask_max_x = ids_mask[0].min()-sp_off_voxels, ids_mask[0].max()+sp_off_voxels if off_mask_min_x < 0: off_mask_min_x = 0 if off_mask_max_x > hold_mask.shape[0]: off_mask_max_x = hold_mask.shape[0] off_mask_min_y, off_mask_max_y = ids_mask[1].min()-sp_off_voxels, ids_mask[1].max()+sp_off_voxels if off_mask_min_y < 0: off_mask_min_y = 0 if off_mask_max_y > hold_mask.shape[1]: off_mask_max_y = hold_mask.shape[1] off_mask_min_z, off_mask_max_z = ids_mask[2].min()-sp_off_voxels, ids_mask[2].max()+sp_off_voxels if off_mask_min_z < 0: off_mask_min_z = 0 if off_mask_max_z > hold_mask.shape[2]: off_mask_max_z = hold_mask.shape[2] del hold_mask del ids_mask # ps.disperse_io.save_numpy(tomo_mb, out_dir + '/hold.mrc') if sg_th is not None: print('\tMembrane thresholding...') tomo_sz = ps.globals.global_analysis(tomo_mb, 0.5, c=26) tomo_mb = tomo_sz > sg_sz del tomo_sz seg_center = None if mode_oriented: seg_center = np.asarray((gl_star.get_element('_rlnOriginX', row), gl_star.get_element('_rlnOriginY', row), gl_star.get_element('_rlnOriginZ', row))) seg_center[0] -= off_mask_min_x seg_center[1] -= off_mask_min_y seg_center[2] -= off_mask_min_z print('\tSegmenting the membranes...') if sp_split is None: svol_mb = tomo_mb[off_mask_min_x:off_mask_max_x, off_mask_min_y:off_mask_max_y, off_mask_min_z:off_mask_max_z] svol = tomo_ref[off_mask_min_x:off_mask_max_x, off_mask_min_y:off_mask_max_y, off_mask_min_z:off_mask_max_z] svol_dst = sp.ndimage.morphology.distance_transform_edt(np.invert(svol_mb), sampling=sg_res, return_indices=False) svol_seg = np.zeros(shape=svol.shape, dtype=np.float32) if not mode_oriented: svol_seg[svol_dst < sg_mb_neigh + sg_mb_thick] = MB_NEIGH svol_seg[svol_dst < sg_mb_thick] = MB_LBL else: svol_dst = signed_distance_2d(svol_mb, res=1, del_b=True, mode_2d=True, set_point=seg_center) svol_seg[(svol_dst > 0) & (svol_dst < sg_mb_neigh + sg_mb_thick)] = MB_NEIGH_INT svol_seg[(svol_dst < 0) & (svol_dst > -1. * (sg_mb_neigh + sg_mb_thick))] = MB_NEIGH_EXT svol_seg[np.absolute(svol_dst) < sg_mb_thick] = MB_LBL svol_seg[svol_dst == 0] = 0 svol_seg[svol_mb > 0] = MB_LBL out_svol = out_seg_dir + '/' + out_ref_stem + '_tid_' + str(tomo_id) + '.mrc' out_seg = out_seg_dir + '/' + out_ref_stem + '_tid_' + str(tomo_id) + '_seg.mrc' ps.disperse_io.save_numpy(svol, out_svol) ps.disperse_io.save_numpy(svol_seg, out_seg) del svol_seg del svol_dst row_dic = dict() row_dic['_rlnMicrographName'] = in_ref row_dic['_rlnImageName'] = out_svol row_dic['_psSegImage'] = out_seg row_dic['_psSegRot'] = 0 row_dic['_psSegTilt'] = 0 row_dic['_psSegPsi'] = 0 row_dic['_psSegOffX'] = off_mask_min_x # 0 row_dic['_psSegOffY'] = off_mask_min_y # 0 row_dic['_psSegOffZ'] = off_mask_min_z star.add_row(**row_dic) else: print('\tSplitting into subvolumes:') if sp_split[0] > 1: hold_wide = int(math.ceil(wide_x / sp_split[0])) hold_pad = int(math.ceil((off_mask_max_x - off_mask_min_x) / sp_split[0])) hold_split = int(sp_split[0] * math.ceil(float(hold_pad)/hold_wide)) offs_x = list() pad_x = off_mask_min_x + int(math.ceil((off_mask_max_x-off_mask_min_x) / hold_split)) offs_x.append((off_mask_min_x, pad_x+sp_off_voxels)) lock = False while not lock: hold = offs_x[-1][1] + pad_x if hold >= off_mask_max_x: offs_x.append((offs_x[-1][1] - sp_off_voxels, off_mask_max_x)) lock = True else: offs_x.append((offs_x[-1][1]-sp_off_voxels, offs_x[-1][1]+pad_x+sp_off_voxels)) else: offs_x = [(off_mask_min_x, off_mask_max_x),] if sp_split[1] > 1: hold_wide = int(math.ceil(wide_y / sp_split[1])) hold_pad = int(math.ceil((off_mask_max_y - off_mask_min_y) / sp_split[1])) hold_split = int(sp_split[1] * math.ceil(float(hold_pad) / hold_wide)) offs_y = list() pad_y = off_mask_min_y + int(math.ceil((off_mask_max_y-off_mask_min_y) / hold_split)) offs_y.append((off_mask_min_x, pad_y + sp_off_voxels)) lock = False while not lock: hold = offs_y[-1][1] + pad_y if hold >= off_mask_max_y: offs_y.append((offs_y[-1][1] - sp_off_voxels, off_mask_max_y)) lock = True else: offs_y.append((offs_y[-1][1] - sp_off_voxels, offs_y[-1][1] + pad_y + sp_off_voxels)) else: offs_y = [(off_mask_min_x, off_mask_max_x),] if sp_split[2] > 1: hold_wide = int(math.ceil(wide_z / sp_split[2])) hold_pad = int(math.ceil((off_mask_max_z - off_mask_min_z) / sp_split[2])) hold_split = int(sp_split[2] * math.ceil(float(hold_pad) / hold_wide)) offs_z = list() pad_z = off_mask_min_z + int(math.ceil((off_mask_max_z-off_mask_min_z) / hold_split)) offs_z.append((off_mask_min_z, pad_z + sp_off_voxels)) lock = False while not lock: hold = offs_z[-1][1] + pad_z if hold >= off_mask_max_z: offs_z.append((offs_z[-1][1] - sp_off_voxels, off_mask_max_z)) lock = True else: offs_z.append((offs_z[-1][1] - sp_off_voxels, offs_z[-1][1] + pad_z + sp_off_voxels)) else: offs_z = [(off_mask_min_z, off_mask_max_z),] split_id = 1 for off_x in offs_x: for off_y in offs_y: for off_z in offs_z: print('\t\t-Splitting subvolume: [' + str(off_x) + ', ' + str(off_y) + ', ' + str(off_z) +']') svol_mb = tomo_mb[off_x[0]:off_x[1], off_y[0]:off_y[1], off_z[0]:off_z[1]] svol = tomo_ref[off_x[0]:off_x[1], off_y[0]:off_y[1], off_z[0]:off_z[1]] svol_seg = np.zeros(shape=svol.shape, dtype=np.float32) if not mode_oriented: svol_dst = sp.ndimage.morphology.distance_transform_edt(np.invert(svol_mb), sampling=sg_res, return_indices=False) svol_seg[svol_dst < sg_mb_neigh + sg_mb_thick] = MB_NEIGH svol_seg[svol_dst < sg_mb_thick] = MB_LBL else: seg_off_center = seg_center - np.asarray((off_x[0], off_y[0], off_z[0])) svol_dst = signed_distance_2d(svol_mb, res=1, del_b=True, mode_2d=True, set_point=seg_off_center) svol_seg[(svol_dst > 0) & (svol_dst < sg_mb_neigh + sg_mb_thick)] = MB_NEIGH_INT svol_seg[(svol_dst < 0) & (svol_dst > -1. * (sg_mb_neigh + sg_mb_thick))] = MB_NEIGH_EXT svol_seg[np.absolute(svol_dst) < sg_mb_thick] = MB_LBL svol_seg[svol_dst == 0] = 0 svol_seg[svol_mb > 0] = MB_LBL out_svol = out_seg_dir + '/' + out_ref_stem + '_id_' + str(tomo_id) + '_split_' + str(split_id) + '.mrc' out_seg = out_seg_dir + '/' + out_ref_stem + '_id_' + str(tomo_id) + '_split_' + str(split_id) + '_mb.mrc' ps.disperse_io.save_numpy(svol, out_svol) ps.disperse_io.save_numpy(svol_seg, out_seg) del svol_seg del svol_dst split_id += 1 row_dic = dict() row_dic['_rlnMicrographName'] = in_ref row_dic['_rlnImageName'] = out_svol row_dic['_psSegImage'] = out_seg row_dic['_psSegRot'] = 0 row_dic['_psSegTilt'] = 0 row_dic['_psSegPsi'] = 0 row_dic['_psSegOffX'] = off_x[0] row_dic['_psSegOffY'] = off_y[0] row_dic['_psSegOffZ'] = off_z[0] star.add_row(**row_dic) # Prepare next iteration gc.collect() tomo_id += 1 out_star = out_dir + '/' + out_stem + '_pre.star' print('\tStoring output STAR file in: ' + out_star) star.store(out_star) print('Terminated. (' + time.strftime("%c") + ')')
[ 37811, 628, 220, 220, 220, 3771, 12, 36948, 329, 285, 65, 62, 34960, 62, 43501, 13, 9078, 286, 25921, 43447, 422, 4186, 34049, 1533, 13579, 6849, 5072, 628, 220, 220, 220, 23412, 25, 220, 532, 25424, 2393, 351, 513, 15180, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 81, 18755, 13031, 34960, 5376, 25, 16667, 21857, 2656, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 81, 18755, 5159, 5376, 25, 4186, 34049, 1533, 13579, 6849, 12109, 3975, 5072, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 862, 41030, 33986, 25, 357, 25968, 8, 6167, 329, 25019, 10618, 341, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 862, 41030, 5159, 25, 357, 25968, 8, 13934, 9335, 284, 2962, 262, 10618, 341, 3781, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 16762, 44, 83, 29080, 34, 21370, 25, 357, 25968, 8, 257, 764, 40664, 2393, 351, 4580, 37995, 2261, 3641, 3951, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 25700, 329, 10618, 278, 262, 43447, 422, 4186, 34049, 1533, 13579, 6849, 12109, 3975, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 360, 6377, 11387, 25, 357, 25968, 8, 2672, 611, 4808, 862, 41030, 33986, 407, 5447, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 12849, 11387, 25, 357, 25968, 8, 2672, 611, 4808, 862, 41030, 33986, 407, 5447, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 3834, 12, 29048, 26021, 6460, 628, 220, 220, 220, 25235, 25, 532, 317, 25424, 2393, 351, 513, 15180, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 81, 18755, 13031, 34960, 5376, 25, 16667, 21857, 2656, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 81, 18755, 5159, 5376, 25, 850, 12, 10396, 8139, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 4808, 862, 41030, 5159, 25, 791, 12, 17107, 25019, 10618, 602, 329, 1123, 850, 29048, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1343, 29201, 82, 329, 1957, 2890, 262, 850, 12, 10396, 8139, 1626, 1123, 2656, 16667, 21857, 198, 198, 37811, 198, 198, 14468, 2, 15717, 1330, 198, 11748, 1822, 29572, 198, 11748, 308, 66, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 12972, 325, 70, 355, 26692, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 1341, 9060, 355, 1341, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 325, 70, 13, 4743, 672, 874, 1330, 4488, 62, 30246, 62, 17, 67, 198, 198, 4242, 2235, 8060, 9633, 198, 198, 834, 9800, 834, 796, 705, 13217, 261, 952, 20741, 12, 50, 20364, 6, 198, 198, 10744, 62, 43, 9148, 11, 10771, 62, 12161, 18060, 796, 352, 11, 362, 198, 10744, 62, 12161, 18060, 62, 12394, 11, 10771, 62, 12161, 18060, 62, 13918, 796, 362, 11, 513, 198, 198, 29113, 29113, 14468, 7804, 198, 2, 29463, 2390, 2767, 4877, 198, 29113, 29113, 14468, 7804, 198, 198, 13252, 2394, 62, 34219, 796, 31051, 9501, 14, 7742, 14, 7742, 12, 25089, 268, 14, 23026, 952, 14, 44019, 42990, 6, 198, 198, 2, 23412, 25424, 2393, 198, 259, 62, 7364, 796, 15107, 2394, 62, 34219, 1343, 31051, 3866, 14, 259, 14, 2022, 62, 325, 70, 62, 29762, 62, 17107, 13, 7364, 6, 198, 198, 2, 25235, 8619, 198, 448, 62, 15908, 796, 15107, 2394, 62, 34219, 1343, 31051, 3866, 14, 2022, 78, 62, 39369, 489, 270, 6, 198, 198, 2, 3834, 29048, 26021, 6460, 198, 2777, 62, 35312, 796, 6045, 1303, 357, 17, 11, 362, 11, 352, 8, 198, 2777, 62, 2364, 62, 85, 1140, 1424, 796, 1542, 1303, 410, 1140, 198, 198, 2, 4942, 1671, 1531, 10618, 341, 198, 45213, 62, 411, 796, 657, 13, 4309, 1303, 28642, 14, 85, 1140, 417, 198, 45213, 62, 400, 796, 6045, 1303, 807, 198, 45213, 62, 82, 89, 796, 6045, 1303, 513, 68, 18, 198, 45213, 62, 2022, 62, 400, 624, 796, 604, 1303, 28642, 198, 45213, 62, 2022, 62, 710, 394, 796, 1315, 1303, 28642, 198, 198, 2, 44189, 2393, 662, 12, 36948, 198, 33967, 62, 1073, 3669, 62, 66, 10141, 796, 357, 16, 11, 362, 11, 513, 8, 198, 33967, 62, 312, 62, 4033, 796, 604, 198, 198, 2, 4527, 37995, 2261, 6460, 198, 16762, 62, 6335, 796, 1542, 1303, 28642, 198, 16762, 62, 2032, 499, 62, 5431, 796, 10352, 628, 198, 29113, 29113, 14468, 7804, 198, 2, 8779, 1268, 371, 12425, 8881, 198, 29113, 29113, 14468, 7804, 198, 198, 2, 3497, 606, 422, 262, 3141, 1627, 611, 484, 547, 3804, 832, 340, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 259, 8248, 3256, 4277, 28, 259, 62, 7364, 11, 1037, 11639, 20560, 3491, 2393, 2637, 8, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 448, 35277, 3256, 4277, 28, 448, 62, 15908, 11, 1037, 11639, 26410, 8619, 2637, 8, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 2777, 41205, 3256, 299, 22046, 11639, 10, 3256, 2099, 28, 600, 11, 4277, 28, 2777, 62, 35312, 11, 1037, 11639, 15057, 286, 30778, 357, 55, 11, 575, 11, 1168, 737, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 2777, 9362, 53, 1140, 1424, 3256, 2099, 28, 600, 11, 4277, 28, 2777, 62, 2364, 62, 85, 1140, 1424, 11, 1037, 11639, 34519, 410, 1140, 1424, 2637, 8, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 45213, 53, 1140, 417, 10699, 3256, 4277, 28, 45213, 62, 411, 11, 2099, 28, 22468, 11, 1037, 11639, 53, 1140, 417, 2546, 357, 21533, 14, 85, 1140, 417, 737, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 45213, 817, 10126, 3256, 2099, 28, 600, 11, 4277, 28, 45213, 62, 400, 11, 1037, 11639, 35, 6377, 11387, 2637, 8, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 45213, 10699, 817, 10126, 3256, 2099, 28, 600, 11, 4277, 28, 45213, 62, 82, 89, 11, 1037, 11639, 10699, 11387, 357, 85, 1140, 1424, 737, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 45213, 13579, 65, 817, 74, 3256, 4277, 28, 45213, 62, 2022, 62, 400, 624, 11, 2099, 28, 22468, 11, 1037, 11639, 41030, 12061, 25019, 20735, 357, 21533, 8, 11537, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 45213, 13579, 65, 46445, 3256, 4277, 28, 45213, 62, 2022, 62, 710, 394, 11, 2099, 28, 22468, 11, 1037, 11639, 41030, 12061, 25019, 23788, 357, 21533, 8, 11537, 198, 198, 22046, 796, 30751, 13, 29572, 62, 22046, 3419, 198, 259, 62, 7364, 796, 26498, 13, 259, 8248, 198, 448, 62, 15908, 796, 26498, 13, 448, 35277, 198, 2777, 62, 35312, 796, 6045, 611, 26498, 13, 2777, 41205, 6624, 25915, 16, 60, 2073, 26498, 13, 2777, 41205, 198, 2777, 62, 2364, 62, 85, 1140, 1424, 796, 26498, 13, 2777, 9362, 53, 1140, 1424, 198, 45213, 62, 411, 796, 26498, 13, 45213, 53, 1140, 417, 10699, 198, 45213, 62, 400, 796, 6045, 611, 26498, 13, 45213, 817, 10126, 6624, 532, 16, 2073, 26498, 13, 45213, 817, 10126, 198, 45213, 62, 82, 89, 796, 6045, 611, 26498, 13, 45213, 10699, 817, 10126, 6624, 532, 16, 2073, 26498, 13, 45213, 10699, 817, 10126, 198, 45213, 62, 2022, 62, 400, 624, 796, 26498, 13, 45213, 13579, 65, 817, 74, 198, 45213, 62, 2022, 62, 710, 394, 796, 26498, 13, 45213, 13579, 65, 46445, 198, 198, 7804, 2235, 12578, 4238, 3275, 198, 198, 4798, 10786, 6719, 12, 36948, 329, 311, 7156, 3781, 286, 555, 12, 17107, 43447, 422, 4186, 34049, 1533, 13579, 6849, 5072, 2637, 8, 198, 4798, 10786, 59, 83, 13838, 25, 705, 1343, 11593, 9800, 834, 8, 198, 4798, 10786, 59, 83, 10430, 25, 705, 1343, 640, 13, 2536, 31387, 7203, 4, 66, 4943, 1343, 705, 59, 77, 11537, 198, 4798, 10786, 29046, 25, 11537, 198, 4798, 10786, 59, 83, 26410, 8619, 25, 705, 1343, 965, 7, 448, 62, 15908, 4008, 198, 4798, 10786, 59, 83, 20560, 25424, 2393, 25, 705, 1343, 965, 7, 259, 62, 7364, 4008, 198, 4798, 10786, 59, 83, 6601, 6323, 25, 705, 1343, 965, 7, 45213, 62, 411, 8, 1343, 705, 28642, 14, 85, 87, 11537, 198, 361, 264, 70, 62, 400, 318, 407, 6045, 25, 198, 220, 220, 220, 3601, 10786, 59, 83, 41030, 14374, 6460, 25, 705, 8, 198, 220, 220, 220, 3601, 10786, 59, 83, 59, 83, 12, 35, 6377, 11387, 25, 705, 1343, 965, 7, 45213, 62, 400, 4008, 198, 220, 220, 220, 3601, 10786, 59, 83, 59, 83, 12, 10699, 11387, 25, 705, 1343, 965, 7, 45213, 62, 82, 89, 8, 1343, 705, 410, 87, 11537, 198, 4798, 10786, 59, 83, 7004, 12, 29048, 26021, 6460, 25, 705, 8, 198, 4798, 10786, 59, 83, 59, 83, 12, 15057, 286, 30778, 357, 55, 11, 575, 11, 1168, 2599, 705, 1343, 965, 7, 2777, 62, 35312, 4008, 198, 4798, 10786, 59, 83, 59, 83, 12, 34519, 410, 1140, 1424, 25, 705, 1343, 965, 7, 2777, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 4798, 10786, 59, 83, 13031, 37995, 2261, 6460, 25, 11537, 198, 4798, 10786, 59, 83, 59, 83, 12, 13031, 29302, 46390, 1292, 16874, 25, 705, 1343, 965, 7, 16762, 62, 6335, 8, 1343, 705, 28642, 11537, 198, 4798, 10786, 59, 83, 7902, 53, 662, 12, 36948, 25, 705, 8, 198, 4798, 10786, 59, 83, 59, 83, 12, 39470, 82, 329, 8405, 22715, 357, 55, 11, 575, 11, 1168, 2599, 705, 1343, 965, 7, 33967, 62, 1073, 3669, 62, 66, 10141, 4008, 198, 4798, 10786, 59, 83, 59, 83, 12, 39470, 329, 4580, 37995, 2261, 4522, 25, 705, 1343, 965, 7, 33967, 62, 312, 62, 4033, 4008, 198, 4798, 7, 7061, 8, 198, 198, 7804, 2, 10854, 198, 198, 4798, 10786, 47, 945, 278, 5128, 10007, 986, 11537, 198, 2777, 62, 411, 11, 45079, 62, 6335, 11, 599, 62, 2364, 62, 85, 1140, 1424, 796, 12178, 7, 45213, 62, 411, 828, 12178, 7, 16762, 62, 6335, 828, 493, 7, 2777, 62, 2364, 62, 85, 1140, 1424, 8, 198, 448, 62, 927, 796, 28686, 13, 6978, 13, 22018, 578, 742, 7, 418, 13, 6978, 13, 35312, 7, 259, 62, 7364, 38381, 16, 12962, 58, 15, 60, 198, 37043, 62, 27932, 796, 45941, 13, 1952, 7, 43358, 16193, 18, 11, 18, 11, 18, 4008, 198, 448, 62, 325, 70, 62, 15908, 796, 503, 62, 15908, 1343, 31051, 325, 14542, 6, 198, 361, 407, 28686, 13, 6978, 13, 9409, 343, 7, 448, 62, 325, 70, 62, 15908, 2599, 198, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 448, 62, 325, 70, 62, 15908, 8, 198, 198, 4798, 10786, 19031, 5128, 25424, 2393, 986, 11537, 198, 4743, 62, 7364, 796, 26692, 13, 7266, 13, 8248, 3419, 198, 28311, 25, 198, 220, 220, 220, 1278, 62, 7364, 13, 2220, 7, 259, 62, 7364, 8, 198, 16341, 26692, 13, 24900, 11755, 13, 20519, 41030, 20560, 12331, 355, 304, 25, 198, 220, 220, 220, 3601, 10786, 24908, 25, 5128, 25424, 2393, 714, 407, 307, 9639, 780, 286, 24018, 1343, 304, 13, 1136, 62, 20500, 3419, 1343, 705, 1, 11537, 198, 220, 220, 220, 3601, 10786, 44798, 515, 13, 19203, 1343, 640, 13, 2536, 31387, 7203, 4, 66, 4943, 1343, 705, 8, 11537, 198, 220, 220, 220, 25064, 13, 37023, 32590, 16, 8, 198, 7364, 796, 26692, 13, 7266, 13, 8248, 3419, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 81, 18755, 13031, 34960, 5376, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 81, 18755, 5159, 5376, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 5159, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 24864, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 51, 2326, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 12016, 72, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 9362, 55, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 9362, 56, 11537, 198, 7364, 13, 2860, 62, 28665, 7, 2539, 11639, 62, 862, 41030, 9362, 57, 11537, 198, 198, 14171, 62, 17107, 796, 10352, 198, 361, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 81, 18755, 39688, 55, 11537, 290, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 81, 18755, 39688, 56, 11537, 290, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 81, 18755, 39688, 57, 6, 2599, 198, 220, 220, 220, 3601, 10786, 59, 83, 12, 41030, 14374, 8159, 1043, 11, 25921, 25019, 10618, 341, 13906, 0, 11537, 198, 220, 220, 220, 4235, 62, 17107, 796, 6407, 198, 198, 4798, 10786, 13383, 371, 28399, 25, 16667, 26836, 9052, 11537, 198, 83, 17902, 62, 312, 796, 657, 198, 1640, 5752, 287, 2837, 7, 4743, 62, 7364, 13, 1136, 62, 77, 8516, 3419, 2599, 628, 220, 220, 220, 287, 62, 5420, 796, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 81, 18755, 13031, 34960, 5376, 3256, 5752, 8, 198, 220, 220, 220, 3601, 10786, 59, 83, 18709, 278, 16667, 21857, 25, 705, 1343, 287, 62, 5420, 8, 198, 220, 220, 220, 503, 62, 5420, 62, 927, 796, 28686, 13, 6978, 13, 22018, 578, 742, 7, 418, 13, 6978, 13, 35312, 7, 259, 62, 5420, 38381, 16, 12962, 58, 15, 60, 198, 220, 220, 220, 287, 62, 2022, 796, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 81, 18755, 5159, 5376, 3256, 5752, 8, 198, 220, 220, 220, 3601, 10786, 59, 83, 59, 83, 12, 19031, 25019, 10618, 341, 25, 705, 1343, 287, 62, 2022, 8, 198, 220, 220, 220, 284, 5908, 62, 2022, 796, 26692, 13, 6381, 38696, 62, 952, 13, 2220, 62, 83, 17902, 7, 259, 62, 2022, 8, 198, 220, 220, 220, 284, 5908, 62, 5420, 796, 26692, 13, 6381, 38696, 62, 952, 13, 2220, 62, 83, 17902, 7, 259, 62, 5420, 11, 8085, 499, 28, 17821, 8, 198, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 87, 11, 572, 62, 27932, 62, 9806, 62, 87, 796, 657, 11, 284, 5908, 62, 5420, 13, 43358, 58, 15, 60, 198, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 88, 11, 572, 62, 27932, 62, 9806, 62, 88, 796, 657, 11, 284, 5908, 62, 5420, 13, 43358, 58, 16, 60, 198, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 89, 11, 572, 62, 27932, 62, 9806, 62, 89, 796, 657, 11, 284, 5908, 62, 5420, 13, 43358, 58, 17, 60, 198, 220, 220, 220, 3094, 62, 87, 796, 572, 62, 27932, 62, 9806, 62, 87, 532, 572, 62, 27932, 62, 1084, 62, 87, 198, 220, 220, 220, 3094, 62, 88, 796, 572, 62, 27932, 62, 9806, 62, 88, 532, 572, 62, 27932, 62, 1084, 62, 88, 198, 220, 220, 220, 3094, 62, 89, 796, 572, 62, 27932, 62, 9806, 62, 89, 532, 572, 62, 27932, 62, 1084, 62, 89, 628, 220, 220, 220, 45079, 62, 27932, 796, 6045, 198, 220, 220, 220, 611, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 16762, 44, 83, 29080, 34, 21370, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 287, 62, 40664, 796, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 16762, 44, 83, 29080, 34, 21370, 3256, 5752, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 36120, 5128, 44189, 2393, 25, 705, 1343, 287, 62, 40664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 67, 291, 796, 26692, 13, 4743, 672, 874, 13, 961, 62, 40664, 62, 76, 912, 7, 259, 62, 40664, 11, 269, 85, 62, 1073, 3669, 62, 66, 10141, 11, 269, 85, 62, 312, 62, 4033, 11, 16075, 62, 5431, 28, 16762, 62, 2032, 499, 62, 5431, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 912, 62, 13033, 796, 1351, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 45079, 62, 312, 11, 45079, 62, 82, 9430, 287, 19974, 7, 2676, 7, 16762, 62, 67, 291, 13, 13083, 3419, 828, 11629, 7, 16762, 62, 67, 291, 13, 27160, 28955, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 912, 62, 13033, 15853, 45079, 62, 82, 9430, 198, 220, 220, 220, 220, 220, 220, 220, 285, 912, 62, 13033, 796, 45941, 13, 292, 18747, 7, 76, 912, 62, 13033, 11, 288, 4906, 28, 37659, 13, 22468, 2624, 8, 1635, 357, 16, 19571, 45213, 62, 411, 8, 628, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 41030, 434, 278, 262, 4580, 37995, 5028, 986, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 27932, 796, 26692, 13, 4743, 672, 874, 13, 13033, 62, 1462, 62, 27932, 7, 76, 912, 62, 13033, 11, 284, 5908, 62, 2022, 13, 43358, 11, 800, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 27932, 796, 599, 13, 358, 9060, 13, 24503, 1435, 13, 30246, 62, 35636, 62, 276, 83, 7, 16762, 62, 27932, 11, 19232, 28, 45213, 62, 411, 11, 1441, 62, 521, 1063, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 45079, 62, 27932, 796, 45079, 62, 27932, 1875, 45079, 62, 6335, 628, 220, 220, 220, 285, 65, 62, 75, 2436, 796, 657, 198, 220, 220, 220, 611, 264, 70, 62, 400, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 862, 41030, 33986, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 285, 65, 62, 75, 2436, 796, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 862, 41030, 33986, 3256, 5752, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 59, 83, 59, 83, 10, 41030, 434, 278, 43447, 351, 6167, 25, 705, 1343, 965, 7, 2022, 62, 75, 2436, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 285, 65, 62, 75, 2436, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 796, 284, 5908, 62, 2022, 6624, 285, 65, 62, 75, 2436, 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, 284, 5908, 62, 2022, 796, 284, 5908, 62, 2022, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 796, 284, 5908, 62, 2022, 1875, 657, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 796, 284, 5908, 62, 2022, 18189, 264, 70, 62, 400, 198, 220, 220, 220, 611, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 16762, 44, 83, 29080, 34, 21370, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 1635, 28, 45079, 62, 27932, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 45079, 62, 27932, 198, 220, 220, 220, 611, 1278, 62, 7364, 13, 10134, 62, 28665, 10786, 62, 862, 41030, 5159, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 4677, 3157, 262, 9335, 986, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 27932, 796, 26692, 13, 6381, 38696, 62, 952, 13, 2220, 62, 83, 17902, 7, 4743, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 862, 41030, 5159, 3256, 5752, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 285, 65, 62, 75, 2436, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 27932, 796, 1745, 62, 27932, 6624, 285, 65, 62, 75, 2436, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 27932, 796, 1745, 62, 27932, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 1635, 28, 1745, 62, 27932, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2340, 62, 27932, 796, 45941, 13, 3003, 7, 2946, 62, 27932, 8, 198, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 87, 11, 572, 62, 27932, 62, 9806, 62, 87, 796, 220, 2340, 62, 27932, 58, 15, 4083, 1084, 3419, 12, 2777, 62, 2364, 62, 85, 1140, 1424, 11, 220, 2340, 62, 27932, 58, 15, 4083, 9806, 3419, 10, 2777, 62, 2364, 62, 85, 1140, 1424, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 1084, 62, 87, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 87, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 9806, 62, 87, 1875, 1745, 62, 27932, 13, 43358, 58, 15, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 9806, 62, 87, 796, 1745, 62, 27932, 13, 43358, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 88, 11, 572, 62, 27932, 62, 9806, 62, 88, 796, 220, 2340, 62, 27932, 58, 16, 4083, 1084, 3419, 12, 2777, 62, 2364, 62, 85, 1140, 1424, 11, 220, 2340, 62, 27932, 58, 16, 4083, 9806, 3419, 10, 2777, 62, 2364, 62, 85, 1140, 1424, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 1084, 62, 88, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 88, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 9806, 62, 88, 1875, 1745, 62, 27932, 13, 43358, 58, 16, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 9806, 62, 88, 796, 1745, 62, 27932, 13, 43358, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 89, 11, 572, 62, 27932, 62, 9806, 62, 89, 796, 220, 2340, 62, 27932, 58, 17, 4083, 1084, 3419, 12, 2777, 62, 2364, 62, 85, 1140, 1424, 11, 220, 2340, 62, 27932, 58, 17, 4083, 9806, 3419, 10, 2777, 62, 2364, 62, 85, 1140, 1424, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 1084, 62, 89, 1279, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 1084, 62, 89, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 611, 572, 62, 27932, 62, 9806, 62, 89, 1875, 1745, 62, 27932, 13, 43358, 58, 17, 5974, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 62, 27932, 62, 9806, 62, 89, 796, 1745, 62, 27932, 13, 43358, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 1745, 62, 27932, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 220, 2340, 62, 27932, 198, 220, 220, 220, 1303, 26692, 13, 6381, 38696, 62, 952, 13, 21928, 62, 77, 32152, 7, 83, 17902, 62, 2022, 11, 503, 62, 15908, 1343, 31051, 2946, 13, 76, 6015, 11537, 198, 220, 220, 220, 611, 264, 70, 62, 400, 318, 407, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 13579, 1671, 1531, 11387, 278, 986, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 82, 89, 796, 26692, 13, 4743, 672, 874, 13, 20541, 62, 20930, 7, 83, 17902, 62, 2022, 11, 657, 13, 20, 11, 269, 28, 2075, 8, 198, 220, 220, 220, 220, 220, 220, 220, 284, 5908, 62, 2022, 796, 284, 5908, 62, 82, 89, 1875, 264, 70, 62, 82, 89, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 284, 5908, 62, 82, 89, 628, 220, 220, 220, 384, 70, 62, 16159, 796, 6045, 198, 220, 220, 220, 611, 4235, 62, 17107, 25, 198, 220, 220, 220, 220, 220, 220, 220, 384, 70, 62, 16159, 796, 45941, 13, 292, 18747, 19510, 4743, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 81, 18755, 39688, 55, 3256, 5752, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 81, 18755, 39688, 56, 3256, 5752, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1278, 62, 7364, 13, 1136, 62, 30854, 10786, 62, 81, 18755, 39688, 57, 3256, 5752, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 384, 70, 62, 16159, 58, 15, 60, 48185, 572, 62, 27932, 62, 1084, 62, 87, 198, 220, 220, 220, 220, 220, 220, 220, 384, 70, 62, 16159, 58, 16, 60, 48185, 572, 62, 27932, 62, 1084, 62, 88, 198, 220, 220, 220, 220, 220, 220, 220, 384, 70, 62, 16159, 58, 17, 60, 48185, 572, 62, 27932, 62, 1084, 62, 89, 628, 220, 220, 220, 3601, 10786, 59, 83, 41030, 434, 278, 262, 43447, 986, 11537, 198, 220, 220, 220, 611, 599, 62, 35312, 318, 6045, 25, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 2022, 796, 284, 5908, 62, 2022, 58, 2364, 62, 27932, 62, 1084, 62, 87, 25, 2364, 62, 27932, 62, 9806, 62, 87, 11, 572, 62, 27932, 62, 1084, 62, 88, 25, 2364, 62, 27932, 62, 9806, 62, 88, 11, 572, 62, 27932, 62, 1084, 62, 89, 25, 2364, 62, 27932, 62, 9806, 62, 89, 60, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 796, 284, 5908, 62, 5420, 58, 2364, 62, 27932, 62, 1084, 62, 87, 25, 2364, 62, 27932, 62, 9806, 62, 87, 11, 572, 62, 27932, 62, 1084, 62, 88, 25, 2364, 62, 27932, 62, 9806, 62, 88, 11, 572, 62, 27932, 62, 1084, 62, 89, 25, 2364, 62, 27932, 62, 9806, 62, 89, 60, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 67, 301, 796, 599, 13, 358, 9060, 13, 24503, 1435, 13, 30246, 62, 35636, 62, 276, 83, 7, 37659, 13, 259, 1851, 7, 82, 10396, 62, 2022, 828, 19232, 28, 45213, 62, 411, 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, 1441, 62, 521, 1063, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 796, 45941, 13, 9107, 418, 7, 43358, 28, 82, 10396, 13, 43358, 11, 288, 4906, 28, 37659, 13, 22468, 2624, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 4235, 62, 17107, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 12161, 18060, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 67, 301, 796, 4488, 62, 30246, 62, 17, 67, 7, 82, 10396, 62, 2022, 11, 581, 28, 16, 11, 1619, 62, 65, 28, 17821, 11, 4235, 62, 17, 67, 28, 17821, 11, 900, 62, 4122, 28, 325, 70, 62, 16159, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 7, 82, 10396, 62, 67, 301, 1875, 657, 8, 1222, 357, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 15437, 796, 10771, 62, 12161, 18060, 62, 12394, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 7, 82, 10396, 62, 67, 301, 1279, 657, 8, 1222, 357, 82, 10396, 62, 67, 301, 1875, 532, 16, 13, 1635, 357, 45213, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 4008, 60, 796, 10771, 62, 12161, 18060, 62, 13918, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 37659, 13, 48546, 7, 82, 10396, 62, 67, 301, 8, 1279, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 6624, 657, 60, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 2022, 1875, 657, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 503, 62, 82, 10396, 796, 503, 62, 325, 70, 62, 15908, 1343, 31051, 6, 1343, 503, 62, 5420, 62, 927, 1343, 705, 62, 83, 312, 62, 6, 1343, 965, 7, 83, 17902, 62, 312, 8, 1343, 45302, 76, 6015, 6, 198, 220, 220, 220, 220, 220, 220, 220, 503, 62, 325, 70, 796, 503, 62, 325, 70, 62, 15908, 1343, 31051, 6, 1343, 503, 62, 5420, 62, 927, 1343, 705, 62, 83, 312, 62, 6, 1343, 965, 7, 83, 17902, 62, 312, 8, 1343, 705, 62, 325, 70, 13, 76, 6015, 6, 198, 220, 220, 220, 220, 220, 220, 220, 26692, 13, 6381, 38696, 62, 952, 13, 21928, 62, 77, 32152, 7, 82, 10396, 11, 503, 62, 82, 10396, 8, 198, 220, 220, 220, 220, 220, 220, 220, 26692, 13, 6381, 38696, 62, 952, 13, 21928, 62, 77, 32152, 7, 82, 10396, 62, 325, 70, 11, 503, 62, 325, 70, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 264, 10396, 62, 325, 70, 198, 220, 220, 220, 220, 220, 220, 220, 1619, 264, 10396, 62, 67, 301, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 796, 8633, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 81, 18755, 13031, 34960, 5376, 20520, 796, 287, 62, 5420, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 81, 18755, 5159, 5376, 20520, 796, 503, 62, 82, 10396, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 5159, 20520, 796, 503, 62, 325, 70, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 24864, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 51, 2326, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 12016, 72, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 55, 20520, 796, 572, 62, 27932, 62, 1084, 62, 87, 1303, 657, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 56, 20520, 796, 572, 62, 27932, 62, 1084, 62, 88, 1303, 657, 198, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 57, 20520, 796, 572, 62, 27932, 62, 1084, 62, 89, 198, 220, 220, 220, 220, 220, 220, 220, 3491, 13, 2860, 62, 808, 7, 1174, 808, 62, 67, 291, 8, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 26568, 2535, 656, 850, 10396, 8139, 25, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 611, 599, 62, 35312, 58, 15, 60, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 4421, 796, 493, 7, 11018, 13, 344, 346, 7, 4421, 62, 87, 1220, 599, 62, 35312, 58, 15, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 15636, 796, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 87, 532, 572, 62, 27932, 62, 1084, 62, 87, 8, 1220, 599, 62, 35312, 58, 15, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 35312, 796, 493, 7, 2777, 62, 35312, 58, 15, 60, 1635, 10688, 13, 344, 346, 7, 22468, 7, 2946, 62, 15636, 20679, 2946, 62, 4421, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 87, 796, 1351, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14841, 62, 87, 796, 572, 62, 27932, 62, 1084, 62, 87, 1343, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 87, 12, 2364, 62, 27932, 62, 1084, 62, 87, 8, 1220, 1745, 62, 35312, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 87, 13, 33295, 19510, 2364, 62, 27932, 62, 1084, 62, 87, 11, 14841, 62, 87, 10, 2777, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 407, 5793, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 796, 572, 82, 62, 87, 58, 12, 16, 7131, 16, 60, 1343, 14841, 62, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1745, 18189, 572, 62, 27932, 62, 9806, 62, 87, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 87, 13, 33295, 19510, 8210, 62, 87, 58, 12, 16, 7131, 16, 60, 532, 599, 62, 2364, 62, 85, 1140, 1424, 11, 572, 62, 27932, 62, 9806, 62, 87, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 87, 13, 33295, 19510, 8210, 62, 87, 58, 12, 16, 7131, 16, 45297, 2777, 62, 2364, 62, 85, 1140, 1424, 11, 572, 82, 62, 87, 58, 12, 16, 7131, 16, 48688, 15636, 62, 87, 10, 2777, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 87, 796, 47527, 2364, 62, 27932, 62, 1084, 62, 87, 11, 572, 62, 27932, 62, 9806, 62, 87, 828, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 599, 62, 35312, 58, 16, 60, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 4421, 796, 493, 7, 11018, 13, 344, 346, 7, 4421, 62, 88, 1220, 599, 62, 35312, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 15636, 796, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 88, 532, 572, 62, 27932, 62, 1084, 62, 88, 8, 1220, 599, 62, 35312, 58, 16, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 35312, 796, 493, 7, 2777, 62, 35312, 58, 16, 60, 1635, 10688, 13, 344, 346, 7, 22468, 7, 2946, 62, 15636, 8, 1220, 1745, 62, 4421, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 88, 796, 1351, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14841, 62, 88, 796, 572, 62, 27932, 62, 1084, 62, 88, 1343, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 88, 12, 2364, 62, 27932, 62, 1084, 62, 88, 8, 1220, 1745, 62, 35312, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 88, 13, 33295, 19510, 2364, 62, 27932, 62, 1084, 62, 87, 11, 14841, 62, 88, 1343, 599, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 407, 5793, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 796, 572, 82, 62, 88, 58, 12, 16, 7131, 16, 60, 1343, 14841, 62, 88, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1745, 18189, 572, 62, 27932, 62, 9806, 62, 88, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 88, 13, 33295, 19510, 8210, 62, 88, 58, 12, 16, 7131, 16, 60, 532, 599, 62, 2364, 62, 85, 1140, 1424, 11, 572, 62, 27932, 62, 9806, 62, 88, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 88, 13, 33295, 19510, 8210, 62, 88, 58, 12, 16, 7131, 16, 60, 532, 599, 62, 2364, 62, 85, 1140, 1424, 11, 572, 82, 62, 88, 58, 12, 16, 7131, 16, 60, 1343, 14841, 62, 88, 1343, 599, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 88, 796, 47527, 2364, 62, 27932, 62, 1084, 62, 87, 11, 572, 62, 27932, 62, 9806, 62, 87, 828, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 599, 62, 35312, 58, 17, 60, 1875, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 4421, 796, 493, 7, 11018, 13, 344, 346, 7, 4421, 62, 89, 1220, 599, 62, 35312, 58, 17, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 15636, 796, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 89, 532, 572, 62, 27932, 62, 1084, 62, 89, 8, 1220, 599, 62, 35312, 58, 17, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 62, 35312, 796, 493, 7, 2777, 62, 35312, 58, 17, 60, 1635, 10688, 13, 344, 346, 7, 22468, 7, 2946, 62, 15636, 8, 1220, 1745, 62, 4421, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 89, 796, 1351, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14841, 62, 89, 796, 572, 62, 27932, 62, 1084, 62, 89, 1343, 493, 7, 11018, 13, 344, 346, 19510, 2364, 62, 27932, 62, 9806, 62, 89, 12, 2364, 62, 27932, 62, 1084, 62, 89, 8, 1220, 1745, 62, 35312, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 89, 13, 33295, 19510, 2364, 62, 27932, 62, 1084, 62, 89, 11, 14841, 62, 89, 1343, 599, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 407, 5793, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1745, 796, 572, 82, 62, 89, 58, 12, 16, 7131, 16, 60, 1343, 14841, 62, 89, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1745, 18189, 572, 62, 27932, 62, 9806, 62, 89, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 89, 13, 33295, 19510, 8210, 62, 89, 58, 12, 16, 7131, 16, 60, 532, 599, 62, 2364, 62, 85, 1140, 1424, 11, 572, 62, 27932, 62, 9806, 62, 89, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5793, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 89, 13, 33295, 19510, 8210, 62, 89, 58, 12, 16, 7131, 16, 60, 532, 599, 62, 2364, 62, 85, 1140, 1424, 11, 572, 82, 62, 89, 58, 12, 16, 7131, 16, 60, 1343, 14841, 62, 89, 1343, 599, 62, 2364, 62, 85, 1140, 1424, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 572, 82, 62, 89, 796, 47527, 2364, 62, 27932, 62, 1084, 62, 89, 11, 572, 62, 27932, 62, 9806, 62, 89, 828, 60, 198, 220, 220, 220, 220, 220, 220, 220, 6626, 62, 312, 796, 352, 198, 220, 220, 220, 220, 220, 220, 220, 329, 572, 62, 87, 287, 572, 82, 62, 87, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 572, 62, 88, 287, 572, 82, 62, 88, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 572, 62, 89, 287, 572, 82, 62, 89, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 59, 83, 59, 83, 12, 26568, 2535, 850, 29048, 25, 37250, 1343, 965, 7, 2364, 62, 87, 8, 1343, 46083, 705, 1343, 965, 7, 2364, 62, 88, 8, 1343, 46083, 705, 1343, 965, 7, 2364, 62, 89, 8, 1343, 20520, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 2022, 796, 284, 5908, 62, 2022, 58, 2364, 62, 87, 58, 15, 5974, 2364, 62, 87, 58, 16, 4357, 572, 62, 88, 58, 15, 5974, 2364, 62, 88, 58, 16, 4357, 572, 62, 89, 58, 15, 5974, 2364, 62, 89, 58, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 796, 284, 5908, 62, 5420, 58, 2364, 62, 87, 58, 15, 5974, 2364, 62, 87, 58, 16, 4357, 572, 62, 88, 58, 15, 5974, 2364, 62, 88, 58, 16, 4357, 572, 62, 89, 58, 15, 5974, 2364, 62, 89, 58, 16, 11907, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 796, 45941, 13, 9107, 418, 7, 43358, 28, 82, 10396, 13, 43358, 11, 288, 4906, 28, 37659, 13, 22468, 2624, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 407, 4235, 62, 17107, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 67, 301, 796, 599, 13, 358, 9060, 13, 24503, 1435, 13, 30246, 62, 35636, 62, 276, 83, 7, 37659, 13, 259, 1851, 7, 82, 10396, 62, 2022, 828, 19232, 28, 45213, 62, 411, 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, 1441, 62, 521, 1063, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 12161, 18060, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 384, 70, 62, 2364, 62, 16159, 796, 384, 70, 62, 16159, 532, 45941, 13, 292, 18747, 19510, 2364, 62, 87, 58, 15, 4357, 572, 62, 88, 58, 15, 4357, 572, 62, 89, 58, 15, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 67, 301, 796, 4488, 62, 30246, 62, 17, 67, 7, 82, 10396, 62, 2022, 11, 581, 28, 16, 11, 1619, 62, 65, 28, 17821, 11, 4235, 62, 17, 67, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 900, 62, 4122, 28, 325, 70, 62, 2364, 62, 16159, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 7, 82, 10396, 62, 67, 301, 1875, 657, 8, 1222, 357, 82, 10396, 62, 67, 301, 1279, 264, 70, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 15437, 796, 10771, 62, 12161, 18060, 62, 12394, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 7, 82, 10396, 62, 67, 301, 1279, 657, 8, 1222, 357, 82, 10396, 62, 67, 301, 1875, 532, 16, 13, 1635, 357, 45213, 62, 2022, 62, 710, 394, 1343, 264, 70, 62, 2022, 62, 400, 624, 4008, 60, 796, 10771, 62, 12161, 18060, 62, 13918, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 37659, 13, 48546, 7, 82, 10396, 62, 67, 301, 8, 1279, 264, 70, 62, 2022, 62, 400, 624, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 67, 301, 6624, 657, 60, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 10396, 62, 325, 70, 58, 82, 10396, 62, 2022, 1875, 657, 60, 796, 10771, 62, 43, 9148, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 62, 82, 10396, 796, 503, 62, 325, 70, 62, 15908, 1343, 31051, 6, 1343, 503, 62, 5420, 62, 927, 1343, 705, 62, 312, 62, 6, 1343, 965, 7, 83, 17902, 62, 312, 8, 1343, 705, 62, 35312, 62, 6, 1343, 965, 7, 35312, 62, 312, 8, 1343, 45302, 76, 6015, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 503, 62, 325, 70, 796, 503, 62, 325, 70, 62, 15908, 1343, 31051, 6, 1343, 503, 62, 5420, 62, 927, 1343, 705, 62, 312, 62, 6, 1343, 965, 7, 83, 17902, 62, 312, 8, 1343, 705, 62, 35312, 62, 6, 1343, 965, 7, 35312, 62, 312, 8, 1343, 705, 62, 2022, 13, 76, 6015, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26692, 13, 6381, 38696, 62, 952, 13, 21928, 62, 77, 32152, 7, 82, 10396, 11, 503, 62, 82, 10396, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26692, 13, 6381, 38696, 62, 952, 13, 21928, 62, 77, 32152, 7, 82, 10396, 62, 325, 70, 11, 503, 62, 325, 70, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 264, 10396, 62, 325, 70, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 264, 10396, 62, 67, 301, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6626, 62, 312, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 796, 8633, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 81, 18755, 13031, 34960, 5376, 20520, 796, 287, 62, 5420, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 81, 18755, 5159, 5376, 20520, 796, 503, 62, 82, 10396, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 5159, 20520, 796, 503, 62, 325, 70, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 24864, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 51, 2326, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 12016, 72, 20520, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 55, 20520, 796, 572, 62, 87, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 56, 20520, 796, 572, 62, 88, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5752, 62, 67, 291, 17816, 62, 862, 41030, 9362, 57, 20520, 796, 572, 62, 89, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3491, 13, 2860, 62, 808, 7, 1174, 808, 62, 67, 291, 8, 628, 220, 220, 220, 1303, 43426, 1306, 24415, 198, 220, 220, 220, 308, 66, 13, 33327, 3419, 198, 220, 220, 220, 284, 5908, 62, 312, 15853, 352, 198, 198, 448, 62, 7364, 796, 503, 62, 15908, 1343, 31051, 6, 1343, 503, 62, 927, 1343, 705, 62, 3866, 13, 7364, 6, 198, 4798, 10786, 59, 83, 1273, 3255, 5072, 25424, 2393, 287, 25, 705, 1343, 503, 62, 7364, 8, 198, 7364, 13, 8095, 7, 448, 62, 7364, 8, 198, 198, 4798, 10786, 44798, 515, 13, 19203, 1343, 640, 13, 2536, 31387, 7203, 4, 66, 4943, 1343, 705, 8, 11537 ]
1.945526
8,940
from tkinter import * from tkinter import ttk from tkinter import messagebox import sqlite3 from sqlite3 import Error Sea().mainloop()
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 201, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 201, 198, 11748, 44161, 578, 18, 201, 198, 6738, 44161, 578, 18, 1330, 13047, 201, 198, 201, 198, 201, 198, 37567, 22446, 12417, 26268, 3419 ]
2.918367
49
# pylint: disable=C0111,R0902,R0913 # Smartsheet Python SDK. # # Copyright 2016 Smartsheet.com, 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 collections import importlib import json import logging import six from datetime import datetime from dateutil.parser import parse from enum import Enum try: from collections import MutableSequence except ImportError: from collections.abc import MutableSequence
[ 2, 279, 2645, 600, 25, 15560, 28, 34, 486, 1157, 11, 49, 2931, 2999, 11, 49, 2931, 1485, 198, 2, 2439, 5889, 25473, 11361, 26144, 13, 198, 2, 198, 2, 15069, 1584, 2439, 5889, 25473, 13, 785, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1, 2599, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2, 198, 2, 220, 220, 220, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 2, 198, 2, 17486, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 3788, 198, 2, 9387, 739, 262, 13789, 318, 9387, 319, 281, 366, 1921, 3180, 1, 29809, 1797, 11, 42881, 198, 2, 34764, 11015, 6375, 7102, 49828, 11053, 3963, 15529, 509, 12115, 11, 2035, 4911, 393, 17142, 13, 4091, 262, 198, 2, 13789, 329, 262, 2176, 3303, 15030, 21627, 290, 11247, 198, 2, 739, 262, 13789, 13, 198, 198, 11748, 17268, 198, 11748, 1330, 8019, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 2237, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 17268, 1330, 13859, 540, 44015, 594, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 17268, 13, 39305, 1330, 13859, 540, 44015, 594, 628, 628, 628, 628 ]
3.616279
258
import os from urllib.request import urlretrieve url = "https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage" orca = '/usr/local/bin/orca' urlretrieve(url, orca) os.chmod(orca, 0o755) os.system("apt install xvfb libgconf-2-4")
[ 11748, 28686, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 6371, 796, 366, 5450, 1378, 12567, 13, 785, 14, 29487, 306, 14, 273, 6888, 14, 260, 29329, 14, 15002, 14, 85, 16, 13, 17, 13, 16, 14, 273, 6888, 12, 16, 13, 17, 13, 16, 12, 87, 4521, 62, 2414, 13, 4677, 5159, 1, 198, 273, 6888, 796, 31051, 14629, 14, 12001, 14, 8800, 14, 273, 6888, 6, 198, 6371, 1186, 30227, 7, 6371, 11, 393, 6888, 8, 198, 418, 13, 354, 4666, 7, 273, 6888, 11, 657, 78, 38172, 8, 198, 418, 13, 10057, 7203, 2373, 2721, 2124, 85, 21855, 9195, 70, 10414, 12, 17, 12, 19, 4943 ]
2.265487
113
from grafo_adj import * g = Grafo([],[]) for i in ['9','8','7','2','11','5','3', '10']: g.adiciona_vertice(i) for i in ['7-11', '5-8', '3-11', '7-8', '8-9','11-10','11-2', '5-10']: g.adiciona_aresta(i) print(g) print(g.dfs('7'))
[ 6738, 7933, 6513, 62, 41255, 1330, 1635, 198, 198, 70, 796, 7037, 6513, 26933, 38430, 12962, 198, 198, 1640, 1312, 287, 37250, 24, 41707, 23, 41707, 22, 41707, 17, 41707, 1157, 41707, 20, 41707, 18, 3256, 705, 940, 6, 5974, 198, 220, 220, 220, 308, 13, 23876, 32792, 62, 1851, 501, 7, 72, 8, 198, 198, 1640, 1312, 287, 37250, 22, 12, 1157, 3256, 705, 20, 12, 23, 3256, 705, 18, 12, 1157, 3256, 705, 22, 12, 23, 3256, 705, 23, 12, 24, 41707, 1157, 12, 940, 41707, 1157, 12, 17, 3256, 705, 20, 12, 940, 6, 5974, 198, 220, 220, 220, 308, 13, 23876, 32792, 62, 12423, 64, 7, 72, 8, 198, 4798, 7, 70, 8, 198, 4798, 7, 70, 13, 7568, 82, 10786, 22, 6, 4008, 628, 198 ]
1.861538
130
from collections import Counter import nltk from nltk.corpus import stopwords stopwords = set(stopwords.words('english')) # read sentence lines = [] for line in open('building_global_community.txt'): # delete the blank and line feed at the begining and end line = line.strip() # add processed line text into list 'lines' lines.append(line) # do Counter, # wordCounter : all words # wordCounter_Noun : noun words # wordCounter_Adj : Adj words # wordCounter_verb : Verb words # wordCounter_Other : other POS words wordCounter = Counter() wordCounter_verb =Counter() wordCounter_Adj = Counter() wordCounter_Noun = Counter() wordCounter_Other = Counter() wordCounter_adv = Counter() word_punc_tokenizer = nltk.WordPunctTokenizer() for sen in lines: # split sentence into words tokens = word_punc_tokenizer.tokenize(sen) #tokens = [word for word in nltk.word_tokenize(sen)] #tokens= filter(lambda word: word not in '[.,\/#!$%\^&\*;:{}-=\_`~()]', tokens) tmp_list = list() for token in tokens: if (token.isdigit()==False) and (token.isalpha()==True) and (token.lower() not in stopwords) : tmp_list.append(token.lower()) for element in tmp_list: get_pos = nltk.pos_tag(element.split()) word,pos = get_pos[0] if pos.startswith('NN'): wordCounter_Noun.update(word.split()) elif pos.startswith('JJ'): wordCounter_Adj.update(word.split()) elif pos.startswith('VB'): wordCounter_verb.update(word.split()) elif pos.startswith('RB'): wordCounter_adv.update(word.split()) else: wordCounter_Other.update(word.split()) wordCounter.update(tmp_list) # show the occurance of all words print '## All wordcount TOP-20: ' #print wordCounter.most_common(20) for word, count in wordCounter.most_common(20): print('{0}: {1}'.format(word, count)) # show the occurance of Noun words print '## Noun words TOP-10: ' #print wordCounter_Noun.most_common(10) for word, count in wordCounter_Noun.most_common(10): print('{0}: {1}'.format(word, count)) # show the occurance of Adj words print '## Adj words TOP-10: ' #print wordCounter_Adj.most_common(10) for word, count in wordCounter_Adj.most_common(10): print('{0}: {1}'.format(word, count)) # show the occurance of Adv words print '## Adv Words TOP-10: ' #print wordCounter_adv.most_common(10) for word, count in wordCounter_adv.most_common(10): print('{0}: {1}'.format(word, count)) # show the occurance of Other POS words print '## Other POS words TOP-10: ' #print wordCounter_Other.most_common(10) for word, count in wordCounter_Other.most_common(10): print('{0}: {1}'.format(word, count))
[ 6738, 17268, 1330, 15034, 198, 11748, 299, 2528, 74, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 11338, 10879, 796, 900, 7, 11338, 10879, 13, 10879, 10786, 39126, 6, 4008, 628, 198, 198, 2, 1100, 6827, 198, 6615, 796, 17635, 198, 1640, 1627, 287, 1280, 10786, 16894, 62, 20541, 62, 28158, 13, 14116, 6, 2599, 198, 220, 220, 220, 1303, 12233, 262, 9178, 290, 1627, 3745, 379, 262, 2221, 278, 290, 886, 198, 220, 220, 220, 1627, 796, 1627, 13, 36311, 3419, 198, 220, 220, 220, 1303, 751, 13686, 1627, 2420, 656, 1351, 705, 6615, 6, 198, 220, 220, 220, 3951, 13, 33295, 7, 1370, 8, 198, 197, 198, 2, 466, 15034, 11, 220, 198, 2, 1573, 31694, 1058, 477, 2456, 198, 2, 1573, 31694, 62, 45, 977, 1058, 23227, 2456, 198, 2, 1573, 31694, 62, 2782, 73, 1058, 1215, 73, 2456, 198, 2, 1573, 31694, 62, 19011, 1058, 49973, 2456, 198, 2, 1573, 31694, 62, 6395, 1058, 584, 28069, 2456, 198, 4775, 31694, 796, 15034, 3419, 198, 4775, 31694, 62, 19011, 796, 31694, 3419, 198, 4775, 31694, 62, 2782, 73, 796, 15034, 3419, 198, 4775, 31694, 62, 45, 977, 796, 15034, 3419, 198, 4775, 31694, 62, 6395, 796, 15034, 3419, 198, 4775, 31694, 62, 32225, 796, 15034, 3419, 198, 4775, 62, 79, 19524, 62, 30001, 7509, 796, 299, 2528, 74, 13, 26449, 47, 16260, 30642, 7509, 3419, 198, 1640, 3308, 287, 3951, 25, 198, 220, 220, 220, 1303, 6626, 6827, 656, 2456, 198, 220, 220, 220, 16326, 796, 1573, 62, 79, 19524, 62, 30001, 7509, 13, 30001, 1096, 7, 6248, 8, 198, 220, 220, 220, 1303, 83, 482, 641, 796, 685, 4775, 329, 1573, 287, 299, 2528, 74, 13, 4775, 62, 30001, 1096, 7, 6248, 15437, 198, 220, 220, 220, 1303, 83, 482, 641, 28, 8106, 7, 50033, 1573, 25, 1573, 407, 287, 44438, 1539, 11139, 2, 0, 3, 4, 59, 61, 5, 59, 9, 26, 29164, 92, 12, 28, 59, 62, 63, 93, 3419, 60, 3256, 16326, 8, 628, 220, 220, 220, 45218, 62, 4868, 796, 1351, 3419, 198, 220, 220, 220, 329, 11241, 287, 16326, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 357, 30001, 13, 9409, 328, 270, 3419, 855, 25101, 8, 290, 357, 30001, 13, 271, 26591, 3419, 855, 17821, 8, 290, 357, 30001, 13, 21037, 3419, 407, 287, 2245, 10879, 8, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45218, 62, 4868, 13, 33295, 7, 30001, 13, 21037, 28955, 198, 220, 220, 220, 329, 5002, 287, 45218, 62, 4868, 25, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 1930, 796, 299, 2528, 74, 13, 1930, 62, 12985, 7, 30854, 13, 35312, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1573, 11, 1930, 796, 651, 62, 1930, 58, 15, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1426, 13, 9688, 2032, 342, 10786, 6144, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 31694, 62, 45, 977, 13, 19119, 7, 4775, 13, 35312, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 1426, 13, 9688, 2032, 342, 10786, 32178, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 31694, 62, 2782, 73, 13, 19119, 7, 4775, 13, 35312, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 1426, 13, 9688, 2032, 342, 10786, 44526, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 31694, 62, 19011, 13, 19119, 7, 4775, 13, 35312, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 1426, 13, 9688, 2032, 342, 10786, 27912, 6, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 31694, 62, 32225, 13, 19119, 7, 4775, 13, 35312, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1573, 31694, 62, 6395, 13, 19119, 7, 4775, 13, 35312, 28955, 198, 220, 220, 220, 1573, 31694, 13, 19119, 7, 22065, 62, 4868, 8, 198, 197, 198, 198, 2, 905, 262, 3051, 590, 286, 477, 2456, 198, 4798, 705, 2235, 1439, 1573, 9127, 28662, 12, 1238, 25, 705, 198, 2, 4798, 1573, 31694, 13, 1712, 62, 11321, 7, 1238, 8, 198, 198, 1640, 1573, 11, 954, 287, 1573, 31694, 13, 1712, 62, 11321, 7, 1238, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 38362, 1391, 16, 92, 4458, 18982, 7, 4775, 11, 954, 4008, 628, 198, 198, 2, 905, 262, 3051, 590, 286, 399, 977, 2456, 198, 4798, 705, 2235, 399, 977, 2456, 28662, 12, 940, 25, 705, 198, 2, 4798, 1573, 31694, 62, 45, 977, 13, 1712, 62, 11321, 7, 940, 8, 198, 1640, 1573, 11, 954, 287, 1573, 31694, 62, 45, 977, 13, 1712, 62, 11321, 7, 940, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 38362, 1391, 16, 92, 4458, 18982, 7, 4775, 11, 954, 4008, 628, 198, 2, 905, 262, 3051, 590, 286, 1215, 73, 2456, 198, 4798, 705, 2235, 1215, 73, 2456, 28662, 12, 940, 25, 705, 198, 2, 4798, 1573, 31694, 62, 2782, 73, 13, 1712, 62, 11321, 7, 940, 8, 198, 1640, 1573, 11, 954, 287, 1573, 31694, 62, 2782, 73, 13, 1712, 62, 11321, 7, 940, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 38362, 1391, 16, 92, 4458, 18982, 7, 4775, 11, 954, 4008, 628, 198, 2, 905, 262, 3051, 590, 286, 8007, 2456, 198, 4798, 705, 2235, 8007, 23087, 28662, 12, 940, 25, 705, 198, 2, 4798, 1573, 31694, 62, 32225, 13, 1712, 62, 11321, 7, 940, 8, 198, 1640, 1573, 11, 954, 287, 1573, 31694, 62, 32225, 13, 1712, 62, 11321, 7, 940, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 38362, 1391, 16, 92, 4458, 18982, 7, 4775, 11, 954, 4008, 628, 198, 2, 905, 262, 3051, 590, 286, 3819, 28069, 2456, 198, 4798, 705, 2235, 3819, 28069, 2456, 28662, 12, 940, 25, 705, 198, 2, 4798, 1573, 31694, 62, 6395, 13, 1712, 62, 11321, 7, 940, 8, 198, 1640, 1573, 11, 954, 287, 1573, 31694, 62, 6395, 13, 1712, 62, 11321, 7, 940, 2599, 198, 220, 220, 220, 3601, 10786, 90, 15, 38362, 1391, 16, 92, 4458, 18982, 7, 4775, 11, 954, 4008, 198 ]
2.60076
1,052
# -*- coding: utf-8 -*- # Copyright (C) 2006-2016 Mag. Christian Tanzer. All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. [email protected] # **************************************************************************** # # This module is licensed under the terms of the BSD 3-Clause License # <http://www.c-tanzer.at/license/bsd_3c.html>. # **************************************************************************** # #++ # Name # TFL.Recordifier # # Purpose # Provide classes supporting the conversion of formatted strings to records # # Revision Dates # 17-Sep-2006 (CT) Creation # 23-Dec-2010 (CT) Use `_print` for doctest (`%s` instead of `%r` for `v`) # 9-Oct-2016 (CT) Move to Package_Namespace `TFL` # 9-Oct-2016 (CT) Fix Python 3 compatibility # ««revision-date»»··· #-- from _TFL import TFL from _TFL.pyk import pyk from _TFL.Regexp import re import _TFL.Caller import _TFL.Record import _TFL._Meta.Object # end def _print # end def __init__ # end def __call__ # end class _Recordifier_ class By_Regexp (_Recordifier_) : """Convert strings via regexp to records. >>> br = By_Regexp ( ... TFL.Regexp ... (r"(?P<dt> (?P<y> \d{4})-(?P<m> \d{2})(?:-(?P<d> \d{2}))?)" ... r" \s+ (?P<M> \d+) \s+ (?P<w> \d+\.\d*)", re.X) ... , M = int, weight = float, y = int, m = int, d = int) >>> _print (br ("2006-06-01 6 96.4 1.20 93.5 98.1")) (M = 6, d = 1, dt = 2006-06-01, m = 6, w = 96.4, y = 2006) >>> _print (br ("2006-06 6 96.4 1.20 93.5 98.1")) (M = 6, dt = 2006-06, m = 6, w = 96.4, y = 2006) """ field_pat = TFL.Regexp \ ( r"\(\?P< (?P<name> [a-zA-Z_][a-zA-Z0-9_]*) >" , flags = re.VERBOSE ) # end def __init__ # end def _field_iter # end class By_Regexp class By_Separator (_Recordifier_) : """Convert strings by splitting on whitespace into records. >>> bw = By_Separator ( ... "d", ("m", int), "avg", "err", "min", "max", ... _default_converter = float, d = str) >>> _print (bw ("2006-06-01 6 96.4 1.20 93.5 98.1")) (avg = 96.4, d = 2006-06-01, err = 1.2, m = 6, max = 98.1, min = 93.5) >>> _print (bw ("2006-06-01 6 96.4 1.20 93.5")) (avg = 96.4, d = 2006-06-01, err = 1.2, m = 6, min = 93.5) >>> _print (bw ("2006-06-01 6 96.4 1.20 93.5 98.1 42")) (avg = 96.4, d = 2006-06-01, err = 1.2, m = 6, max = 98.1, min = 93.5) """ _separator = None _default_converter = str # end def __init__ # end def _field_iter # end class By_Separator if __name__ == "__main__" : TFL._Export_Module () ### __END__ TFL.Recordifier
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 4793, 12, 5304, 2944, 13, 4302, 11818, 9107, 13, 1439, 2489, 10395, 198, 2, 21931, 559, 6422, 21612, 3933, 11, 317, 438, 1157, 1270, 370, 2013, 11, 17322, 13, 25706, 9107, 31, 46737, 13, 1073, 13, 265, 198, 2, 41906, 17174, 46068, 198, 2, 198, 2, 770, 8265, 318, 11971, 739, 262, 2846, 286, 262, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 1279, 4023, 1378, 2503, 13, 66, 12, 38006, 9107, 13, 265, 14, 43085, 14, 1443, 67, 62, 18, 66, 13, 6494, 28401, 198, 2, 41906, 17174, 46068, 198, 2, 198, 2, 4880, 198, 2, 6530, 198, 2, 220, 220, 220, 309, 3697, 13, 23739, 7483, 198, 2, 198, 2, 32039, 198, 2, 220, 220, 220, 44290, 6097, 6493, 262, 11315, 286, 39559, 13042, 284, 4406, 198, 2, 198, 2, 46604, 44712, 198, 2, 220, 220, 220, 1596, 12, 19117, 12, 13330, 357, 4177, 8, 21582, 198, 2, 220, 220, 220, 2242, 12, 10707, 12, 10333, 357, 4177, 8, 5765, 4600, 62, 4798, 63, 329, 10412, 395, 357, 63, 4, 82, 63, 2427, 286, 4600, 4, 81, 63, 329, 4600, 85, 63, 8, 198, 2, 220, 220, 220, 220, 860, 12, 12349, 12, 5304, 357, 4177, 8, 10028, 284, 15717, 62, 36690, 10223, 4600, 51, 3697, 63, 198, 2, 220, 220, 220, 220, 860, 12, 12349, 12, 5304, 357, 4177, 8, 13268, 11361, 513, 17764, 198, 2, 220, 220, 220, 21110, 24328, 260, 10178, 12, 4475, 17730, 17730, 35147, 9129, 198, 2, 438, 198, 198, 6738, 220, 220, 4808, 51, 3697, 220, 220, 220, 220, 220, 220, 220, 1330, 309, 3697, 198, 6738, 220, 220, 4808, 51, 3697, 13, 9078, 74, 220, 220, 220, 1330, 12972, 74, 198, 198, 6738, 220, 220, 4808, 51, 3697, 13, 3041, 25636, 79, 1330, 302, 198, 198, 11748, 4808, 51, 3697, 13, 14134, 263, 198, 11748, 4808, 51, 3697, 13, 23739, 198, 11748, 4808, 51, 3697, 13557, 48526, 13, 10267, 198, 2, 886, 825, 4808, 4798, 198, 220, 220, 220, 1303, 886, 825, 11593, 15003, 834, 198, 220, 220, 220, 1303, 886, 825, 11593, 13345, 834, 198, 198, 2, 886, 1398, 4808, 23739, 7483, 62, 198, 198, 4871, 2750, 62, 3041, 25636, 79, 44104, 23739, 7483, 62, 8, 1058, 198, 220, 220, 220, 37227, 3103, 1851, 13042, 2884, 40364, 79, 284, 4406, 13, 628, 220, 220, 220, 220, 220, 220, 13163, 865, 796, 2750, 62, 3041, 25636, 79, 357, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 309, 3697, 13, 3041, 25636, 79, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 220, 220, 357, 81, 18109, 30, 47, 27, 28664, 29, 357, 30, 47, 27, 88, 29, 3467, 67, 90, 19, 92, 13219, 7, 30, 47, 27, 76, 29, 3467, 67, 90, 17, 92, 5769, 30, 21912, 7, 30, 47, 27, 67, 29, 3467, 67, 90, 17, 92, 4008, 10091, 1, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 220, 220, 220, 374, 1, 3467, 82, 10, 357, 30, 47, 27, 44, 29, 3467, 67, 28988, 3467, 82, 10, 357, 30, 47, 27, 86, 29, 3467, 67, 10, 17405, 59, 67, 28104, 1600, 302, 13, 55, 8, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 220, 220, 837, 337, 796, 493, 11, 3463, 796, 12178, 11, 331, 796, 493, 11, 285, 796, 493, 11, 288, 796, 493, 8, 198, 220, 220, 220, 220, 220, 220, 13163, 4808, 4798, 357, 1671, 5855, 13330, 12, 3312, 12, 486, 718, 220, 9907, 13, 19, 220, 352, 13, 1238, 220, 10261, 13, 20, 220, 9661, 13, 16, 48774, 198, 220, 220, 220, 220, 220, 220, 357, 44, 796, 718, 11, 288, 796, 352, 11, 288, 83, 796, 4793, 12, 3312, 12, 486, 11, 285, 796, 718, 11, 266, 796, 9907, 13, 19, 11, 331, 796, 4793, 8, 198, 220, 220, 220, 220, 220, 220, 13163, 4808, 4798, 357, 1671, 5855, 13330, 12, 3312, 718, 220, 9907, 13, 19, 220, 352, 13, 1238, 220, 10261, 13, 20, 220, 9661, 13, 16, 48774, 198, 220, 220, 220, 220, 220, 220, 357, 44, 796, 718, 11, 288, 83, 796, 4793, 12, 3312, 11, 285, 796, 718, 11, 266, 796, 9907, 13, 19, 11, 331, 796, 4793, 8, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2214, 62, 8071, 796, 309, 3697, 13, 3041, 25636, 79, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 357, 374, 1, 59, 38016, 30, 47, 27, 357, 30, 47, 27, 3672, 29, 685, 64, 12, 89, 32, 12, 57, 62, 7131, 64, 12, 89, 32, 12, 57, 15, 12, 24, 62, 60, 28104, 1875, 1, 198, 220, 220, 220, 220, 220, 220, 220, 837, 9701, 796, 302, 13, 5959, 33, 14058, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 1303, 886, 825, 11593, 15003, 834, 198, 220, 220, 220, 1303, 886, 825, 4808, 3245, 62, 2676, 198, 198, 2, 886, 1398, 2750, 62, 3041, 25636, 79, 198, 198, 4871, 2750, 62, 19117, 283, 1352, 44104, 23739, 7483, 62, 8, 1058, 198, 220, 220, 220, 37227, 3103, 1851, 13042, 416, 26021, 319, 13216, 10223, 656, 4406, 13, 628, 220, 220, 220, 220, 220, 220, 13163, 275, 86, 796, 2750, 62, 19117, 283, 1352, 357, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 366, 67, 1600, 5855, 76, 1600, 493, 828, 366, 615, 70, 1600, 366, 8056, 1600, 366, 1084, 1600, 366, 9806, 1600, 198, 220, 220, 220, 220, 220, 220, 2644, 220, 220, 4808, 12286, 62, 1102, 332, 353, 796, 12178, 11, 288, 796, 965, 8, 198, 220, 220, 220, 220, 220, 220, 13163, 4808, 4798, 357, 65, 86, 5855, 13330, 12, 3312, 12, 486, 718, 220, 9907, 13, 19, 220, 352, 13, 1238, 220, 10261, 13, 20, 220, 9661, 13, 16, 48774, 198, 220, 220, 220, 220, 220, 220, 357, 615, 70, 796, 9907, 13, 19, 11, 288, 796, 4793, 12, 3312, 12, 486, 11, 11454, 796, 352, 13, 17, 11, 285, 796, 718, 11, 3509, 796, 9661, 13, 16, 11, 949, 796, 10261, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 13163, 4808, 4798, 357, 65, 86, 5855, 13330, 12, 3312, 12, 486, 718, 220, 9907, 13, 19, 220, 352, 13, 1238, 220, 10261, 13, 20, 48774, 198, 220, 220, 220, 220, 220, 220, 357, 615, 70, 796, 9907, 13, 19, 11, 288, 796, 4793, 12, 3312, 12, 486, 11, 11454, 796, 352, 13, 17, 11, 285, 796, 718, 11, 949, 796, 10261, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 13163, 4808, 4798, 357, 65, 86, 5855, 13330, 12, 3312, 12, 486, 718, 220, 9907, 13, 19, 220, 352, 13, 1238, 220, 10261, 13, 20, 220, 9661, 13, 16, 5433, 48774, 198, 220, 220, 220, 220, 220, 220, 357, 615, 70, 796, 9907, 13, 19, 11, 288, 796, 4793, 12, 3312, 12, 486, 11, 11454, 796, 352, 13, 17, 11, 285, 796, 718, 11, 3509, 796, 9661, 13, 16, 11, 949, 796, 10261, 13, 20, 8, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 4808, 25512, 1352, 220, 220, 220, 220, 220, 220, 220, 220, 796, 6045, 198, 220, 220, 220, 4808, 12286, 62, 1102, 332, 353, 796, 965, 198, 220, 220, 220, 1303, 886, 825, 11593, 15003, 834, 198, 220, 220, 220, 1303, 886, 825, 4808, 3245, 62, 2676, 198, 198, 2, 886, 1398, 2750, 62, 19117, 283, 1352, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1, 1058, 198, 220, 220, 220, 309, 3697, 13557, 43834, 62, 26796, 7499, 198, 21017, 11593, 10619, 834, 309, 3697, 13, 23739, 7483, 198 ]
2.146667
1,275
"""Various helper functions to set the dtypes.""" # ---------------------------------------------------- # Name : df2onehot.py # Author : E.Taskesen # Contact : [email protected] # github : https://github.com/erdogant/df2onehot # Licence : MIT # ---------------------------------------------------- # %% Libraries import pandas as pd import numpy as np from sklearn.preprocessing import LabelEncoder label_encoder = LabelEncoder() from tqdm import tqdm # %% Set dtypes def set_dtypes(df, dtypes='pandas', deep_extract=False, perc_min_num=None, num_if_decimal=True, verbose=3): """Set the dtypes of the dataframe. Parameters ---------- df : pd.DataFrame() Input dataframe for which the rows are the features, and colums are the samples. dtypes : list of str or 'pandas', optional Representation of the columns in the form of ['cat','num']. By default the dtype is determiend based on the pandas dataframe. deep_extract : bool [False, True] (default : False) True: Extract information from a vector that contains a list/array/dict. False: converted to a string and treated as catagorical ['cat']. perc_min_num : float [None, 0..1], optional Force column (int or float) to be numerical if unique non-zero values are above percentage. The default is None. Alternative can be 0.8 num_if_decimal : bool [False, True], optional Force column to be numerical if column with original dtype (int or float) show values with one or more decimals. The default is True. verbose : int, optional Print message to screen. The default is 3. 0: (default), 1: ERROR, 2: WARN, 3: INFO, 4: DEBUG, 5: TRACE Returns ------- tuple containing dataframe and dtypes. """ config = {} config['dtypes'] = dtypes config['deep_extract'] = deep_extract config['perc_min_num'] = perc_min_num config['num_if_decimal'] = num_if_decimal config['verbose'] = verbose # Determine dtypes for columns config['dtypes'] = _auto_dtypes(df, config['dtypes'], deep_extract=config['deep_extract'], perc_min_num=config['perc_min_num'], num_if_decimal=config['num_if_decimal'], verbose=config['verbose']) # Setup dtypes in columns df = _set_types(df.copy(), config['dtypes'], verbose=config['verbose']) # return return(df, config['dtypes']) # %% Setup columns in correct dtypes # %% Setup columns in correct dtypes # %% Set y def set_y(y, y_min=None, numeric=False, verbose=3): """Group labels if required. Parameters ---------- y : list input labels. y_min : int, optional If unique y-labels are less then absolute y_min, labels are grouped into the _other_ group. The default is None. numeric : bool [True, False], optional Convert to numeric labels. The default is False. verbose : int, optional Print message to screen. The default is 3. 0: (default), 1: ERROR, 2: WARN, 3: INFO, 4: DEBUG, 5: TRACE Returns ------- list of labels. """ y = y.astype(str) if not isinstance(y_min, type(None)): if verbose>=3: print('[df2onehot] >Group [y] labels that contains less then %d occurences are grouped under one single name [_other_]' %(y_min)) [uiy, ycounts] = np.unique(y, return_counts=True) labx = uiy[ycounts<y_min] y = y.astype('O') y[np.isin(y, labx)] = '_other_' # Note that this text is captured in compute_significance! Do not change or also change it over there! y = y.astype(str) if numeric: y = label_encoder.fit_transform(y).astype(int) return(y) # %% function to remove non-ASCII # %% Convert to pandas dataframe def is_DataFrame(data, verbose=3): """Convert data into dataframe. Parameters ---------- data : array-like Array-like data matrix. verbose : int, optional Print message to screen. The default is 3. 0: (default), 1: ERROR, 2: WARN, 3: INFO, 4: DEBUG, 5: TRACE Returns ------- pd.dataframe() """ if isinstance(data, list): data = pd.DataFrame(data) elif isinstance(data, np.ndarray): data = pd.DataFrame(data) elif isinstance(data, pd.DataFrame): pass else: if verbose>=3: print('Typing should be pd.DataFrame()!') data=None return(data)
[ 37811, 40009, 31904, 5499, 284, 900, 262, 288, 19199, 526, 15931, 198, 2, 20368, 19351, 198, 2, 6530, 220, 220, 220, 220, 220, 220, 220, 1058, 47764, 17, 505, 8940, 13, 9078, 198, 2, 6434, 220, 220, 220, 220, 220, 1058, 412, 13, 25714, 274, 268, 198, 2, 14039, 220, 220, 220, 220, 1058, 1931, 9703, 415, 31, 14816, 13, 785, 198, 2, 33084, 220, 220, 220, 220, 220, 1058, 3740, 1378, 12567, 13, 785, 14, 263, 9703, 415, 14, 7568, 17, 505, 8940, 198, 2, 10483, 594, 220, 220, 220, 220, 1058, 17168, 198, 2, 20368, 19351, 198, 198, 2, 43313, 46267, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 36052, 27195, 12342, 198, 18242, 62, 12685, 12342, 796, 36052, 27195, 12342, 3419, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 198, 2, 43313, 5345, 288, 19199, 198, 4299, 900, 62, 67, 19199, 7, 7568, 11, 288, 19199, 11639, 79, 392, 292, 3256, 2769, 62, 2302, 974, 28, 25101, 11, 583, 66, 62, 1084, 62, 22510, 28, 14202, 11, 997, 62, 361, 62, 12501, 4402, 28, 17821, 11, 15942, 577, 28, 18, 2599, 198, 220, 220, 220, 37227, 7248, 262, 288, 19199, 286, 262, 1366, 14535, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 47764, 1058, 279, 67, 13, 6601, 19778, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 23412, 1366, 14535, 329, 543, 262, 15274, 389, 262, 3033, 11, 290, 951, 5700, 389, 262, 8405, 13, 198, 220, 220, 220, 288, 19199, 1058, 1351, 286, 965, 393, 705, 79, 392, 292, 3256, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 10858, 341, 286, 262, 15180, 287, 262, 1296, 286, 37250, 9246, 41707, 22510, 6, 4083, 2750, 4277, 262, 288, 4906, 318, 2206, 11632, 437, 1912, 319, 262, 19798, 292, 1366, 14535, 13, 198, 220, 220, 220, 2769, 62, 2302, 974, 1058, 20512, 685, 25101, 11, 6407, 60, 357, 12286, 1058, 10352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 6407, 25, 29677, 1321, 422, 257, 15879, 326, 4909, 257, 1351, 14, 18747, 14, 11600, 13, 198, 220, 220, 220, 220, 220, 220, 220, 10352, 25, 11513, 284, 257, 4731, 290, 5716, 355, 3797, 363, 12409, 37250, 9246, 6, 4083, 198, 220, 220, 220, 583, 66, 62, 1084, 62, 22510, 1058, 12178, 685, 14202, 11, 657, 492, 16, 4357, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 5221, 5721, 357, 600, 393, 12178, 8, 284, 307, 29052, 611, 3748, 1729, 12, 22570, 3815, 389, 2029, 5873, 13, 383, 4277, 318, 6045, 13, 27182, 460, 307, 657, 13, 23, 198, 220, 220, 220, 997, 62, 361, 62, 12501, 4402, 1058, 20512, 685, 25101, 11, 6407, 4357, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 5221, 5721, 284, 307, 29052, 611, 5721, 351, 2656, 288, 4906, 357, 600, 393, 12178, 8, 905, 3815, 351, 530, 393, 517, 875, 320, 874, 13, 383, 4277, 318, 6407, 13, 198, 220, 220, 220, 15942, 577, 1058, 493, 11, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 12578, 3275, 284, 3159, 13, 383, 4277, 318, 513, 13, 198, 220, 220, 220, 220, 220, 220, 220, 657, 25, 357, 12286, 828, 352, 25, 33854, 11, 362, 25, 42660, 11, 513, 25, 24890, 11, 604, 25, 16959, 11, 642, 25, 7579, 11598, 628, 198, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 46545, 7268, 1366, 14535, 290, 288, 19199, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 4566, 796, 23884, 198, 220, 220, 220, 4566, 17816, 67, 19199, 20520, 796, 288, 19199, 198, 220, 220, 220, 4566, 17816, 22089, 62, 2302, 974, 20520, 796, 2769, 62, 2302, 974, 198, 220, 220, 220, 4566, 17816, 525, 66, 62, 1084, 62, 22510, 20520, 796, 583, 66, 62, 1084, 62, 22510, 198, 220, 220, 220, 4566, 17816, 22510, 62, 361, 62, 12501, 4402, 20520, 796, 997, 62, 361, 62, 12501, 4402, 198, 220, 220, 220, 4566, 17816, 19011, 577, 20520, 796, 15942, 577, 628, 220, 220, 220, 1303, 45559, 3810, 288, 19199, 329, 15180, 198, 220, 220, 220, 4566, 17816, 67, 19199, 20520, 796, 4808, 23736, 62, 67, 19199, 7, 7568, 11, 4566, 17816, 67, 19199, 6, 4357, 2769, 62, 2302, 974, 28, 11250, 17816, 22089, 62, 2302, 974, 6, 4357, 583, 66, 62, 1084, 62, 22510, 28, 11250, 17816, 525, 66, 62, 1084, 62, 22510, 6, 4357, 997, 62, 361, 62, 12501, 4402, 28, 11250, 17816, 22510, 62, 361, 62, 12501, 4402, 6, 4357, 15942, 577, 28, 11250, 17816, 19011, 577, 6, 12962, 198, 220, 220, 220, 1303, 31122, 288, 19199, 287, 15180, 198, 220, 220, 220, 47764, 796, 4808, 2617, 62, 19199, 7, 7568, 13, 30073, 22784, 4566, 17816, 67, 19199, 6, 4357, 15942, 577, 28, 11250, 17816, 19011, 577, 6, 12962, 198, 220, 220, 220, 1303, 1441, 198, 220, 220, 220, 1441, 7, 7568, 11, 4566, 17816, 67, 19199, 6, 12962, 628, 198, 2, 43313, 31122, 15180, 287, 3376, 288, 19199, 628, 198, 2, 43313, 31122, 15180, 287, 3376, 288, 19199, 628, 198, 2, 43313, 5345, 331, 198, 4299, 900, 62, 88, 7, 88, 11, 331, 62, 1084, 28, 14202, 11, 35575, 28, 25101, 11, 15942, 577, 28, 18, 2599, 198, 220, 220, 220, 37227, 13247, 14722, 611, 2672, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 331, 1058, 1351, 198, 220, 220, 220, 220, 220, 220, 220, 5128, 14722, 13, 198, 220, 220, 220, 331, 62, 1084, 1058, 493, 11, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 1002, 3748, 331, 12, 23912, 1424, 389, 1342, 788, 4112, 331, 62, 1084, 11, 14722, 389, 32824, 656, 262, 4808, 847, 62, 1448, 13, 383, 4277, 318, 6045, 13, 198, 220, 220, 220, 35575, 1058, 20512, 685, 17821, 11, 10352, 4357, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 38240, 284, 35575, 14722, 13, 383, 4277, 318, 10352, 13, 198, 220, 220, 220, 15942, 577, 1058, 493, 11, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 12578, 3275, 284, 3159, 13, 383, 4277, 318, 513, 13, 198, 220, 220, 220, 220, 220, 220, 220, 657, 25, 357, 12286, 828, 352, 25, 33854, 11, 362, 25, 42660, 11, 513, 25, 24890, 11, 604, 25, 16959, 11, 642, 25, 7579, 11598, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 1351, 286, 14722, 13, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 331, 796, 331, 13, 459, 2981, 7, 2536, 8, 628, 220, 220, 220, 611, 407, 318, 39098, 7, 88, 62, 1084, 11, 2099, 7, 14202, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 15942, 577, 29, 28, 18, 25, 3601, 10786, 58, 7568, 17, 505, 8940, 60, 1875, 13247, 685, 88, 60, 14722, 326, 4909, 1342, 788, 4064, 67, 1609, 495, 3179, 389, 32824, 739, 530, 2060, 1438, 685, 62, 847, 62, 49946, 4064, 7, 88, 62, 1084, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 685, 84, 7745, 11, 331, 9127, 82, 60, 796, 45941, 13, 34642, 7, 88, 11, 1441, 62, 9127, 82, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2248, 87, 796, 334, 7745, 58, 88, 9127, 82, 27, 88, 62, 1084, 60, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 331, 13, 459, 2981, 10786, 46, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 331, 58, 37659, 13, 45763, 7, 88, 11, 2248, 87, 15437, 796, 705, 62, 847, 62, 6, 220, 1303, 5740, 326, 428, 2420, 318, 7907, 287, 24061, 62, 12683, 811, 590, 0, 2141, 407, 1487, 393, 635, 1487, 340, 625, 612, 0, 198, 220, 220, 220, 220, 220, 220, 220, 331, 796, 331, 13, 459, 2981, 7, 2536, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 35575, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 796, 6167, 62, 12685, 12342, 13, 11147, 62, 35636, 7, 88, 737, 459, 2981, 7, 600, 8, 628, 220, 220, 220, 1441, 7, 88, 8, 198, 198, 2, 43313, 2163, 284, 4781, 1729, 12, 42643, 3978, 198, 198, 2, 43313, 38240, 284, 19798, 292, 1366, 14535, 198, 4299, 318, 62, 6601, 19778, 7, 7890, 11, 15942, 577, 28, 18, 2599, 198, 220, 220, 220, 37227, 3103, 1851, 1366, 656, 1366, 14535, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 1366, 1058, 7177, 12, 2339, 198, 220, 220, 220, 220, 220, 220, 220, 15690, 12, 2339, 1366, 17593, 13, 198, 220, 220, 220, 15942, 577, 1058, 493, 11, 11902, 198, 220, 220, 220, 220, 220, 220, 220, 12578, 3275, 284, 3159, 13, 383, 4277, 318, 513, 13, 198, 220, 220, 220, 220, 220, 220, 220, 657, 25, 357, 12286, 828, 352, 25, 33854, 11, 362, 25, 42660, 11, 513, 25, 24890, 11, 604, 25, 16959, 11, 642, 25, 7579, 11598, 628, 220, 220, 220, 16409, 198, 220, 220, 220, 35656, 198, 220, 220, 220, 279, 67, 13, 7890, 14535, 3419, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 39098, 7, 7890, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 279, 67, 13, 6601, 19778, 7, 7890, 8, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 7890, 11, 45941, 13, 358, 18747, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 279, 67, 13, 6601, 19778, 7, 7890, 8, 198, 220, 220, 220, 1288, 361, 318, 39098, 7, 7890, 11, 279, 67, 13, 6601, 19778, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 611, 15942, 577, 29, 28, 18, 25, 3601, 10786, 31467, 278, 815, 307, 279, 67, 13, 6601, 19778, 3419, 0, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 28, 14202, 628, 220, 220, 220, 1441, 7, 7890, 8, 198 ]
2.649038
1,664
import random import struct import json import flask import time import numpy as np from collections import defaultdict from threading import Thread from Queue import Queue from StringIO import StringIO from sqlalchemy import create_engine from flask import Flask, render_template, Response, request, stream_with_context from py.ds import * from py.manager import * app = Flask(__name__) # # Global variables # flask.DEBUG = False flask.val = 0 flask.dist = [] flask.dist_update_time = None flask.queries = {} flask.db = create_engine("postgresql://localhost/test") flask.manager = Manager() @app.route("/") @app.route("/attr/stats", methods=["post", "get"]) def table_stats(): """ Used by client to get the domain of the x and y axis expressions/attributes opts: { table: <table name> attrs: { <attrname>: <data type> ("continuous" | "discrete") } } """ discq = "SELECT DISTINCT %s FROM %s ORDER BY %s" contq = "SELECT min(%s), max(%s) FROM %s" opts = json.loads(request.data) table = opts['table'] contattrs = [] ret = {} for attr, typ in opts.get("attrs", {}).items(): if typ == "discrete": q = discq % (attr, table, attr) ret[attr] = zip(*flask.db.execute(q).fetchall())[0] else: q = contq % (attr, attr, table) ret[attr] = list(flask.db.execute(q).fetchone()) return Response(json.dumps(ret)) @app.route("/register/querytemplate", methods=["post"]) def register_qtemplate(): """ Registers a query template. Uses the query template name to instantiate (if possible) the corresponding data structure based on those in ds_klasses """ template = json.loads(request.data) flask.queries[template["tid"]] = template tid = template['tid'] if flask.manager.has_data_structure(tid): return Response("ok", mimetype="application/wu") for ds_klass in ds_klasses: if ds_klass.can_answer(template): try: ds = ds_klass(None, template) ds.id = tid flask.manager.add_data_structure(ds) except Exception as e: print e continue return Response("ok", mimetype="application/wu") @app.route("/distribution/set", methods=["post"]) def dist_set(): """ Set the current query distribution A distribution is currently defined as a list of [query, probability] where query is a dictionary: { template: <output of js template's .toWire()> data: { paramname: val } } The corresponding client files are in js/dist.js """ flask.dist = json.loads(request.data) flask.dist_update_time = time.time() if flask.DEBUG: print "got query distribution" return Response("ok", mimetype="application/wu") @app.route("/data") def data(): """ This API opens the data stream and starts sending data via the Manager object. The current implementation doesn't take advantage of the streaming nature and simply implements: 1. waits for a new query distribution, 2. picks the highest non-zero probability query 3. sends the cached data to the client In effect, this implements a basic request-response model of interaction. Details: The data stream has a simple encoding: [length of payload (32 bits)][encoding id (32 bits)][payload (a byte array)] The payload is encoded based on the particular data structure """ return Response(flask.manager(), mimetype="test/event-stream") @app.route("/fakedata") if __name__ == '__main__': import psycopg2 DEC2FLOAT = psycopg2.extensions.new_type( psycopg2.extensions.DECIMAL.values, 'DEC2FLOAT', lambda value, curs: float(value) if value is not None else None) psycopg2.extensions.register_type(DEC2FLOAT) app.run(host="localhost", port=5000, debug=0, threaded=1)#
[ 11748, 4738, 198, 11748, 2878, 198, 11748, 33918, 198, 11748, 42903, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 4670, 518, 1330, 4670, 518, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18261, 11, 2581, 11, 4269, 62, 4480, 62, 22866, 198, 198, 6738, 12972, 13, 9310, 1330, 1635, 198, 6738, 12972, 13, 37153, 1330, 1635, 628, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 198, 2, 8060, 9633, 198, 2, 198, 2704, 2093, 13, 30531, 796, 10352, 198, 2704, 2093, 13, 2100, 796, 657, 198, 2704, 2093, 13, 17080, 796, 17635, 198, 2704, 2093, 13, 17080, 62, 19119, 62, 2435, 796, 6045, 198, 2704, 2093, 13, 421, 10640, 796, 23884, 198, 2704, 2093, 13, 9945, 796, 2251, 62, 18392, 7203, 7353, 34239, 13976, 1378, 36750, 14, 9288, 4943, 198, 2704, 2093, 13, 37153, 796, 9142, 3419, 198, 198, 31, 1324, 13, 38629, 7203, 14, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 35226, 14, 34242, 1600, 5050, 28, 14692, 7353, 1600, 366, 1136, 8973, 8, 198, 4299, 3084, 62, 34242, 33529, 198, 220, 37227, 198, 220, 16718, 416, 5456, 284, 651, 262, 7386, 286, 262, 2124, 290, 331, 16488, 14700, 14, 1078, 7657, 628, 220, 2172, 82, 25, 1391, 198, 220, 220, 220, 3084, 25, 1279, 11487, 1438, 29, 198, 220, 220, 220, 708, 3808, 25, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 35226, 3672, 31175, 1279, 7890, 2099, 29, 5855, 18487, 5623, 1, 930, 366, 15410, 8374, 4943, 198, 220, 220, 220, 1782, 198, 220, 1782, 198, 220, 37227, 198, 220, 1221, 80, 796, 366, 46506, 360, 8808, 1268, 4177, 4064, 82, 16034, 4064, 82, 38678, 11050, 4064, 82, 1, 220, 198, 220, 542, 80, 796, 366, 46506, 949, 7, 4, 82, 828, 3509, 7, 4, 82, 8, 16034, 4064, 82, 1, 628, 220, 2172, 82, 796, 33918, 13, 46030, 7, 25927, 13, 7890, 8, 198, 220, 3084, 796, 2172, 82, 17816, 11487, 20520, 198, 220, 542, 1078, 3808, 796, 17635, 198, 220, 1005, 796, 23884, 198, 220, 329, 708, 81, 11, 2170, 287, 2172, 82, 13, 1136, 7203, 1078, 3808, 1600, 23884, 737, 23814, 33529, 198, 220, 220, 220, 611, 2170, 6624, 366, 15410, 8374, 1298, 198, 220, 220, 220, 220, 220, 10662, 796, 1221, 80, 4064, 357, 35226, 11, 3084, 11, 708, 81, 8, 198, 220, 220, 220, 220, 220, 1005, 58, 35226, 60, 796, 19974, 46491, 2704, 2093, 13, 9945, 13, 41049, 7, 80, 737, 69, 7569, 439, 28955, 58, 15, 60, 198, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 10662, 796, 542, 80, 4064, 357, 35226, 11, 708, 81, 11, 3084, 8, 198, 220, 220, 220, 220, 220, 1005, 58, 35226, 60, 796, 1351, 7, 2704, 2093, 13, 9945, 13, 41049, 7, 80, 737, 69, 7569, 505, 28955, 628, 220, 1441, 18261, 7, 17752, 13, 67, 8142, 7, 1186, 4008, 628, 198, 31, 1324, 13, 38629, 7203, 14, 30238, 14, 22766, 28243, 1600, 5050, 28, 14692, 7353, 8973, 8, 198, 4299, 7881, 62, 80, 28243, 33529, 198, 220, 37227, 198, 220, 3310, 6223, 257, 12405, 11055, 13, 220, 36965, 262, 12405, 11055, 1438, 284, 9113, 9386, 357, 361, 1744, 8, 198, 220, 262, 11188, 1366, 4645, 1912, 319, 883, 287, 288, 82, 62, 74, 28958, 198, 220, 37227, 198, 220, 11055, 796, 33918, 13, 46030, 7, 25927, 13, 7890, 8, 198, 220, 42903, 13, 421, 10640, 58, 28243, 14692, 83, 312, 8973, 60, 796, 11055, 198, 220, 29770, 796, 11055, 17816, 83, 312, 20520, 198, 220, 611, 42903, 13, 37153, 13, 10134, 62, 7890, 62, 301, 5620, 7, 83, 312, 2599, 220, 198, 220, 220, 220, 1441, 18261, 7203, 482, 1600, 17007, 2963, 431, 2625, 31438, 14, 43812, 4943, 628, 220, 329, 288, 82, 62, 74, 31172, 287, 288, 82, 62, 74, 28958, 25, 198, 220, 220, 220, 611, 288, 82, 62, 74, 31172, 13, 5171, 62, 41484, 7, 28243, 2599, 198, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 796, 288, 82, 62, 74, 31172, 7, 14202, 11, 11055, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 82, 13, 312, 796, 29770, 198, 220, 220, 220, 220, 220, 220, 220, 42903, 13, 37153, 13, 2860, 62, 7890, 62, 301, 5620, 7, 9310, 8, 198, 220, 220, 220, 220, 220, 2845, 35528, 355, 304, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 304, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 628, 220, 1441, 18261, 7203, 482, 1600, 17007, 2963, 431, 2625, 31438, 14, 43812, 4943, 198, 198, 31, 1324, 13, 38629, 7203, 14, 17080, 3890, 14, 2617, 1600, 5050, 28, 14692, 7353, 8973, 8, 198, 4299, 1233, 62, 2617, 33529, 198, 220, 37227, 198, 220, 5345, 262, 1459, 12405, 6082, 628, 220, 317, 6082, 318, 3058, 5447, 355, 257, 1351, 286, 685, 22766, 11, 12867, 60, 198, 220, 810, 12405, 318, 257, 22155, 25, 220, 1391, 198, 220, 220, 220, 11055, 25, 1279, 22915, 286, 44804, 11055, 338, 764, 1462, 29451, 3419, 29, 198, 220, 220, 220, 1366, 25, 1391, 5772, 3672, 25, 1188, 1782, 198, 220, 1782, 628, 220, 383, 11188, 5456, 3696, 389, 287, 44804, 14, 17080, 13, 8457, 198, 220, 37227, 198, 220, 42903, 13, 17080, 796, 33918, 13, 46030, 7, 25927, 13, 7890, 8, 198, 220, 42903, 13, 17080, 62, 19119, 62, 2435, 796, 640, 13, 2435, 3419, 198, 220, 611, 42903, 13, 30531, 25, 198, 220, 220, 220, 3601, 366, 23442, 12405, 6082, 1, 198, 220, 1441, 18261, 7203, 482, 1600, 17007, 2963, 431, 2625, 31438, 14, 43812, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 7890, 4943, 198, 4299, 1366, 33529, 198, 220, 37227, 198, 220, 770, 7824, 9808, 262, 1366, 4269, 290, 4940, 7216, 1366, 2884, 262, 9142, 2134, 13, 198, 220, 383, 1459, 7822, 1595, 470, 1011, 4621, 286, 262, 11305, 3450, 290, 2391, 23986, 25, 198, 220, 352, 13, 28364, 329, 257, 649, 12405, 6082, 11, 198, 220, 362, 13, 11103, 262, 4511, 1729, 12, 22570, 12867, 12405, 198, 220, 513, 13, 12800, 262, 39986, 1366, 284, 262, 5456, 628, 220, 554, 1245, 11, 428, 23986, 257, 4096, 2581, 12, 26209, 2746, 286, 10375, 13, 628, 198, 220, 14890, 25, 198, 220, 220, 220, 383, 1366, 4269, 468, 257, 2829, 21004, 25, 628, 220, 220, 220, 220, 220, 220, 220, 685, 13664, 286, 21437, 357, 2624, 10340, 8, 7131, 12685, 7656, 4686, 357, 2624, 10340, 8, 7131, 15577, 2220, 357, 64, 18022, 7177, 15437, 628, 220, 220, 220, 383, 21437, 318, 30240, 1912, 319, 262, 1948, 1366, 4645, 198, 220, 37227, 198, 220, 1441, 18261, 7, 2704, 2093, 13, 37153, 22784, 17007, 2963, 431, 2625, 9288, 14, 15596, 12, 5532, 4943, 628, 198, 31, 1324, 13, 38629, 7203, 14, 69, 4335, 1045, 4943, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 1330, 17331, 22163, 70, 17, 198, 220, 27196, 17, 3697, 46, 1404, 796, 17331, 22163, 70, 17, 13, 2302, 5736, 13, 3605, 62, 4906, 7, 198, 220, 220, 220, 17331, 22163, 70, 17, 13, 2302, 5736, 13, 41374, 3955, 1847, 13, 27160, 11, 198, 220, 220, 220, 705, 41374, 17, 3697, 46, 1404, 3256, 198, 220, 220, 220, 37456, 1988, 11, 13882, 25, 12178, 7, 8367, 8, 611, 1988, 318, 407, 6045, 2073, 6045, 8, 198, 220, 17331, 22163, 70, 17, 13, 2302, 5736, 13, 30238, 62, 4906, 7, 41374, 17, 3697, 46, 1404, 8, 628, 198, 220, 598, 13, 5143, 7, 4774, 2625, 36750, 1600, 2493, 28, 27641, 11, 14257, 28, 15, 11, 40945, 28, 16, 8, 2 ]
2.893963
1,292
import maya.cmds as mc createVisualizerNodes()
[ 11748, 743, 64, 13, 28758, 82, 355, 36650, 628, 198, 17953, 36259, 7509, 45, 4147, 3419, 628, 198 ]
2.833333
18
import kivy from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import ObjectProperty, StringProperty from kivy.uix.floatlayout import FloatLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.image import Image, AsyncImage from kivy.uix.textinput import TextInput from kivy.config import Config from kivy.loader import Loader from math import sin import wikipedia import matplotlib from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg,\ NavigationToolbar2Kivy from kivy.app import App from kivy.uix.boxlayout import BoxLayout import numpy as np import numpy as np2 import matplotlib.pyplot as plt matplotlib.rcParams.update({'font.size': 8}) app = WikipediaComparatorApp() app.run()
[ 11748, 479, 452, 88, 198, 198, 6738, 479, 452, 88, 13, 1324, 1330, 2034, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 42655, 1330, 370, 17484, 198, 6738, 479, 452, 88, 13, 48310, 1330, 9515, 21746, 11, 10903, 21746, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 22468, 39786, 1330, 48436, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 25928, 39786, 1330, 24846, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 9060, 1330, 7412, 11, 1081, 13361, 5159, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 5239, 15414, 1330, 8255, 20560, 198, 6738, 479, 452, 88, 13, 11250, 1330, 17056, 198, 6738, 479, 452, 88, 13, 29356, 1330, 8778, 263, 198, 6738, 10688, 1330, 7813, 628, 198, 11748, 47145, 11151, 198, 198, 11748, 2603, 29487, 8019, 198, 6738, 479, 452, 88, 13, 70, 5872, 13, 6759, 29487, 8019, 13, 1891, 437, 62, 74, 452, 88, 9460, 1330, 11291, 6090, 11017, 42, 452, 88, 46384, 11, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 42115, 25391, 5657, 17, 42, 452, 88, 198, 6738, 479, 452, 88, 13, 1324, 1330, 2034, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 3524, 39786, 1330, 8315, 32517, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 355, 45941, 17, 628, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6759, 29487, 8019, 13, 6015, 10044, 4105, 13, 19119, 15090, 6, 10331, 13, 7857, 10354, 807, 30072, 628, 628, 198, 1324, 796, 15312, 50249, 1352, 4677, 3419, 198, 1324, 13, 5143, 3419 ]
2.672241
299
# -*- coding: utf-8 -*- """Tests for internals.py""" from asyncio.tasks import Task import os import json import sys import unittest import asyncio import logging from io import StringIO from importlib import reload from unittest.mock import AsyncMock, Mock, call, patch from aiohttp.client_exceptions import ClientConnectorError from google.cloud.storage.blob import Blob from google.cloud.storage.bucket import Bucket from slack_bolt.app.async_app import AsyncApp from slack_sdk.errors import SlackApiError from slack_sdk.web.async_client import AsyncWebClient from slack_sdk.web.async_slack_response import AsyncSlackResponse from multi_reaction_add.internals import check_env, setup_logger, build_home_tab_view, user_data_key,\ delete_users_data, EmojiOperator # pylint: disable=attribute-defined-outside-init class TestCheckEnv(unittest.TestCase): """Test env vars checker""" def setUp(self): """Setup tests""" self.env_keys = ["SLACK_CLIENT_ID", "SLACK_CLIENT_SECRET", "SLACK_SIGNING_SECRET", "SLACK_INSTALLATION_GOOGLE_BUCKET_NAME", "SLACK_STATE_GOOGLE_BUCKET_NAME", "USER_DATA_BUCKET_NAME"] def test_checkenv_ok(self): """Test checkenv success""" for key in self.env_keys: os.environ[key] = "" check_env() for key in self.env_keys: del os.environ[key] @unittest.expectedFailure def test_checkenv_missing(self): """Test checkenv throws error""" # pylint: disable=no-self-use check_env() class TestCloudLogging(unittest.TestCase): """Test logger class""" def tearDown(self): """Cleanup tests""" logging.shutdown() reload(logging) def test_log_format(self): """Test logger has correct format""" with StringIO() as stream: logger = setup_logger(stream=stream) logger.info("a message") self.assertRegex(stream.getvalue(), r'{"timestamp": "\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}", ' '"severity": "INFO", "funcName": "test_log_format", ' '"component": "root", "message": "a message"}') def test_log_level_set(self): """Test log level can be set from env""" os.environ["LOG_LEVEL"] = "WARNING" with StringIO() as stream: logger = setup_logger(stream=stream) del os.environ["LOG_LEVEL"] logger.info("a message") logger.warning("some message") logger.error("another message") output = stream.getvalue() self.assertTrue(all([ "a message" not in output, "some message" in output, "another message" in output ]), msg="Cannot set log level") class TestInternals(unittest.TestCase): """Test light methods""" def test_build_home_tab(self): """Test build_home_tab method""" # check home tab with no urls home_tab_dict = build_home_tab_view() home_tab_json = json.dumps(home_tab_dict, separators=(",", ":")) self.assertEqual(home_tab_json, '{"type":"home","blocks":[{"type":"header","text":{"type":"plain_text","text":' '"Setting emojis :floppy_disk:","emoji":true}},{"type":"section","text":{"type"' ':"mrkdwn","text":"Type `/multireact <list of emojis>` in any chat to set a' ' list of emojis for later usage."}},{"type":"section","text":{"type":"mrkdwn",' '"text":"You can view what you saved any moment by typing `/multireact` in' ' any chat."}},{"type":"divider"},{"type":"header","text":{"type":"plain_text",' '"text":"Adding Reactions :star-struck:","emoji":true}},{"type":"section",' '"text":{"type":"mrkdwn","text":"Go to a message, click `More Actions`, then' ' click on `Multireact` to react with the saved emojis to the message.\\n\\nIf' ' you can\'t see `Multireact`, click `More message shortcuts...`' ' to find it."}}]}') # check home tab with urls home_tab_dict = build_home_tab_view(app_url="localhost") home_tab_json = json.dumps(home_tab_dict, separators=(",", ":")) self.assertEqual(home_tab_json, '{"type":"home","blocks":[{"type":"header","text":{"type":"plain_text","text":' '"Setting emojis :floppy_disk:","emoji":true}},{"type":"section","text":{"type"' ':"mrkdwn","text":"Type `/multireact <list of emojis>` in any chat to set a' ' list of emojis for later usage."}},{"type":"image","image_url":' '"localhost/img/reaction-write-emojis.png?w=1024&ssl=1","alt_text":' '"write emojis"},{"type":"image","image_url":' '"localhost/img/reaction-save.png?w=1024&ssl=1","alt_text":' '"saved emojis"},{"type":"section","text":{"type":"mrkdwn","text":' '"You can view what you saved any moment by typing `/multireact` in any' ' chat."}},{"type":"image","image_url":' '"localhost/img/reaction-write-nothing.png?w=1024&ssl=1","alt_text":' '"view emojis"},{"type":"image","image_url":' '"localhost/img/reaction-view.png?w=1024&ssl=1","alt_text":"view emojis"},' '{"type":"divider"},{"type":"header","text":{"type":"plain_text","text":' '"Adding Reactions :star-struck:","emoji":true}},{"type":"section","text":' '{"type":"mrkdwn","text":"Go to a message, click `More Actions`, then click on' ' `Multireact` to react with the saved emojis to the message.\\n\\nIf you' ' can\'t see `Multireact`, click `More message shortcuts...` to find it."}},' '{"type":"image","image_url":' '"localhost/img/reaction-none.png?w=1024&ssl=1","alt_text":"message with no' ' reactions"},{"type":"image","image_url":' '"localhost/img/reaction-menu.png?w=1024&ssl=1","alt_text":"message menu"},' '{"type":"image","image_url":' '"localhost/img/reaction-add.png?w=1024&ssl=1","alt_text":' '"message with reactions"}]}') def test_user_data_key(self): """Test user_data_key method""" self.assertEqual( user_data_key("client_id", "enter_id", "team_id", "user_id"), "client_id/enter_id-team_id/user_id") self.assertEqual( user_data_key("client_id", None, "team_id", "user_id"), "client_id/none-team_id/user_id") class TestDeleteUserData(unittest.IsolatedAsyncioTestCase): """Test user data deletion""" async def asyncSetUp(self): """Setup tests""" self.bucket = Mock(spec=Bucket) self.blob = Blob(name="name", bucket=self.bucket) self.blob.delete = Mock() self.bucket.blob = Mock(return_value=self.blob) @classmethod def setUpClass(cls): """Setup tests once""" if sys.platform.startswith("win"): asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) @patch("multi_reaction_add.internals.user_data_key") async def test_delete_users_data(self, mock_user_data_key: Mock): """Test delete_users_data method""" # test user data exists self.blob.exists = Mock(return_value=True) await delete_users_data(self.bucket, "client_id", "enter_id", "team_id", ["user_id"]) self.blob.exists.assert_called_once() self.blob.delete.assert_called_once() self.blob.delete.reset_mock() # test user data doesn't exist self.blob.exists = Mock(return_value=False) await delete_users_data(self.bucket, "client_id", "enter_id", "team_id", ["user_id"]) self.blob.exists.assert_called_once() self.blob.delete.assert_not_called() # test multiple user data await delete_users_data(self.bucket, "client_id", "enter_id", "team_id", ["user_id1", "user_id2"]) mock_user_data_key.assert_has_calls([call(slack_client_id="client_id", enterprise_id="enter_id", team_id="team_id", user_id="user_id1"), call(slack_client_id="client_id", enterprise_id="enter_id", team_id="team_id", user_id="user_id2")]) class TestEmojiOperator(unittest.IsolatedAsyncioTestCase): """Test EmojiOperator class""" # pylint: disable=protected-access async def asyncSetUp(self): """Setup tests""" self.client = AsyncMock(AsyncWebClient) self.client.token = None self.http_args = {"client": self.client, "http_verb": "POST", "api_url": "some-api", "req_args": {}, "headers": {}, "status_code": 200} self.app = AsyncMock(AsyncApp) self.app.client = self.client self.logger = logging.getLogger() self.logger.handlers = [] @classmethod def setUpClass(cls): """Setup tests once""" if sys.platform.startswith("win"): asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) async def test_get_user_reactions(self): """Test get_user_reactions method""" # check no reactions response = AsyncSlackResponse(**{**self.http_args, **{"data": {"type": "message", "message": {}}} }) self.client.reactions_get.return_value = response emojis = await EmojiOperator.get_user_reactions(client=self.client, channel_id="channel_id", message_ts="message_ts", user_id="user_id") self.assertEqual(emojis, []) # sample response: https://api.slack.com/methods/reactions.get # check reactions on message response = AsyncSlackResponse(**{**self.http_args, **{"data": {"type": "message", "message": { "reactions": [{ "name": "smile", "users": [ "user_id1", "user_id2" ] }, { "name": "wink", "users": [ "user_id2", "user_id3" ] }] }}}}) self.client.reactions_get.return_value = response emojis = await EmojiOperator.get_user_reactions(client=self.client, channel_id="channel_id", message_ts="message_ts", user_id="user_id2") self.assertEqual(emojis, ["smile", "wink"]) # check reactions on file response = AsyncSlackResponse(**{**self.http_args, **{"data": {"type": "file", "file": { "reactions": [{ "name": "laugh", "users": [ "user_id1", "user_id2" ] }] }}}}) self.client.reactions_get.return_value = response emojis = await EmojiOperator.get_user_reactions(client=self.client, channel_id="channel_id", message_ts="message_ts", user_id="user_id1") self.assertEqual(emojis, ["laugh"]) # check reactions on file_comment response = AsyncSlackResponse(**{**self.http_args, **{"data": {"type": "file_comment", "comment": { "reactions": [{ "name": "heart", "users": [ "user_id1", "user_id2" ] }] }}}}) self.client.reactions_get.return_value = response emojis = await EmojiOperator.get_user_reactions(client=self.client, channel_id="channel_id", message_ts="message_ts", user_id="user_id2") self.assertEqual(emojis, ["heart"]) @patch("aiohttp.ClientSession.get") async def test_get_reactions_in_team(self, get: AsyncMock): """Test get_reactions_in_team method""" mock_context_manager: AsyncMock = get.return_value.__aenter__.return_value mock_context_manager.status = 200 mock_context_manager.text.return_value = \ '[{"base":"anguished"}, {"base":"sad_face"}, {"base":"clap"}]' # sample response: https://api.slack.com/methods/emoji.list slack_response = AsyncSlackResponse(**{**self.http_args, **{"data": { "emoji": { "longcat": "some url", "doge": "alias", "partyparrot": "some url", }, "categories": [ { "name": "faces", "emoji_names": ["smile", "wink"] }, { "name": "flags", "emoji_names": ["flag1", "flag2", "flag3"] } ] }}}) self.client.emoji_list.return_value = slack_response # test standard emojis response ok emojis = await EmojiOperator._get_reactions_in_team(client=self.client, logger=self.logger) self.client.emoji_list.assert_awaited_once_with(include_categories=True) # session.get.assert_called_once_with("https://www.emojidex.com/api/v1/utf_emoji") mock_context_manager.text.assert_awaited_once_with(encoding="utf-8") self.assertEqual(set(emojis), set(["longcat", "doge", "partyparrot", "smile", "wink", "flag1", "flag2", "flag3", "anguished", "sad_face", "clap"]), msg="Could not parse all emojis") mock_context_manager.reset_mock() get.reset_mock() # test standard emojis response not ok get.return_value.__aenter__.return_value.status = 500 emojis = await EmojiOperator._get_reactions_in_team(client=self.client, logger=self.logger) mock_context_manager.text.assert_not_awaited() self.assertEqual(set(emojis), set(["longcat", "doge", "partyparrot", "smile", "wink", "flag1", "flag2", "flag3"]), msg="Should not return standard emojis when invalid http request") mock_context_manager.reset_mock() get.reset_mock() # test standard emojis response exception get.return_value.__aenter__.side_effect = ClientConnectorError(None, Mock()) emojis = await EmojiOperator._get_reactions_in_team(client=self.client, logger=self.logger) mock_context_manager.text.assert_not_awaited() self.assertEqual(set(emojis), set(["longcat", "doge", "partyparrot", "smile", "wink", "flag1", "flag2", "flag3"]), msg="Should not return standard emojis when connection error") @patch("multi_reaction_add.internals.EmojiOperator._get_reactions_in_team") async def test_update_emoji_list(self, get_reactions: AsyncMock): """Test update_emoji_list method""" get_reactions.return_value = ["some", "emojis"] emoji_operator = EmojiOperator() self.client.token = "old token" # test normal execution try: await asyncio.wait_for( emoji_operator._update_emoji_list( app=self.app, token="new token", logger=self.logger, sleep=1), timeout=1.5) except asyncio.TimeoutError: pass get_reactions.assert_awaited_once_with(self.client, self.logger) self.assertEqual(emoji_operator._all_emojis, ["some", "emojis"]) self.assertEqual(self.client.token, "old token") # test all_emojis left unchanged on slack api error get_reactions.side_effect = SlackApiError(None, None) try: await asyncio.wait_for( emoji_operator._update_emoji_list( app=self.app, token="new token", logger=self.logger, sleep=1), timeout=1.5) except asyncio.TimeoutError: pass self.assertEqual(emoji_operator._all_emojis, ["some", "emojis"]) self.assertEqual(self.client.token, "old token") # test all_emojis unset on slack api exception emoji_operator._all_emojis = None get_reactions.side_effect = SlackApiError(None, None) try: await asyncio.wait_for( emoji_operator._update_emoji_list( app=self.app, token="new token", logger=self.logger, sleep=1), timeout=1.5) except asyncio.TimeoutError: pass self.assertEqual(emoji_operator._all_emojis, None) self.assertEqual(self.client.token, "old token") async def test_stop_emoji_thread(self): """Test stop_emoji_thread method""" emoji_operator = EmojiOperator() emoji_operator._emoji_task = asyncio.create_task(some_method()) await emoji_operator.stop_emoji_update() await asyncio.sleep(0.1) # task will be canceled when it will be scheduled in the event loop self.assertTrue(emoji_operator._emoji_task.done()) @patch("multi_reaction_add.internals.EmojiOperator._get_reactions_in_team") async def test_get_valid_reactions(self, get_reactions: AsyncMock): """Test get_valid_reactions method""" emoji_operator = EmojiOperator() emoji_operator._emoji_task = Mock(spec=Task) emoji_operator._emoji_task.done.return_value = False emoji_operator._update_emoji_list = AsyncMock() emoji_operator._all_emojis = ["smile", "wink", "face", "laugh", "some-emoji", "-emj-", "_emj_", "some_emoji", "+one", "'quote'", "54"] # check empty input emojis = await emoji_operator.get_valid_reactions(text="", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, []) # check no emojis in input emojis = await emoji_operator.get_valid_reactions(text="some text", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, []) # check no valid emojis emojis = await emoji_operator.get_valid_reactions(text="::::", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, []) # check valid input emojis = await emoji_operator.get_valid_reactions(text=":smile: :wink:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["smile", "wink"]) # check emojis special characters emojis = await emoji_operator.get_valid_reactions( text=":some-emoji: :-emj-: :_emj_: :some_emoji: :+one: :'quote': :54:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["some-emoji", "-emj-", "_emj_", "some_emoji", "+one", "'quote'", "54"]) # check remove duplicates emojis = await emoji_operator.get_valid_reactions(text=":smile: :wink: :smile:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["smile", "wink"]) # check emoji with modifier emojis = await emoji_operator.get_valid_reactions(text=":face::skin-tone-2:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["face::skin-tone-2"]) # check no space in input emojis = await emoji_operator.get_valid_reactions( text=":smile::wink::face::skin-tone-2::face::skin-tone-3::laugh:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["smile", "wink", "face::skin-tone-2", "face::skin-tone-3", "laugh"]) # check text and emojis emojis = await emoji_operator.get_valid_reactions( text="sometext:smile:anothertext:wink:moretext:laugh:endoftext", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["smile", "wink", "laugh"]) # check invalid emoji emojis = await emoji_operator.get_valid_reactions(text=":smile: :invalid:", client=self.client, app=self.app, logger=self.logger) self.assertEqual(emojis, ["smile"]) # check emoji_task is started when finished get_reactions.return_value = ["joy"] emoji_operator._emoji_task.done.return_value = True emojis = await emoji_operator.get_valid_reactions(text=":joy:", client=self.client, app=self.app, logger=self.logger) get_reactions.assert_awaited_once_with(self.client, self.logger) self.assertEqual(emojis, ["joy"])
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 1788, 874, 13, 9078, 37811, 198, 198, 6738, 30351, 952, 13, 83, 6791, 1330, 15941, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 1330, 8019, 1330, 18126, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 1081, 13361, 44, 735, 11, 44123, 11, 869, 11, 8529, 198, 198, 6738, 257, 952, 4023, 13, 16366, 62, 1069, 11755, 1330, 20985, 34525, 12331, 198, 6738, 23645, 13, 17721, 13, 35350, 13, 2436, 672, 1330, 1086, 672, 198, 6738, 23645, 13, 17721, 13, 35350, 13, 27041, 316, 1330, 48353, 198, 6738, 30740, 62, 25593, 13, 1324, 13, 292, 13361, 62, 1324, 1330, 1081, 13361, 4677, 198, 6738, 30740, 62, 21282, 74, 13, 48277, 1330, 36256, 32, 14415, 12331, 198, 6738, 30740, 62, 21282, 74, 13, 12384, 13, 292, 13361, 62, 16366, 1330, 1081, 13361, 13908, 11792, 198, 6738, 30740, 62, 21282, 74, 13, 12384, 13, 292, 13361, 62, 6649, 441, 62, 26209, 1330, 1081, 13361, 11122, 441, 31077, 198, 198, 6738, 5021, 62, 260, 2673, 62, 2860, 13, 23124, 874, 1330, 2198, 62, 24330, 11, 9058, 62, 6404, 1362, 11, 1382, 62, 11195, 62, 8658, 62, 1177, 11, 2836, 62, 7890, 62, 2539, 11, 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, 220, 220, 220, 220, 12233, 62, 18417, 62, 7890, 11, 2295, 31370, 18843, 1352, 628, 198, 2, 279, 2645, 600, 25, 15560, 28, 42348, 12, 23211, 12, 43435, 12, 15003, 198, 4871, 6208, 9787, 4834, 85, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 17365, 410, 945, 2198, 263, 37811, 628, 220, 220, 220, 825, 900, 4933, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 40786, 5254, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 24330, 62, 13083, 796, 14631, 8634, 8120, 62, 5097, 28495, 62, 2389, 1600, 366, 8634, 8120, 62, 5097, 28495, 62, 23683, 26087, 1600, 366, 8634, 8120, 62, 50, 3528, 15871, 62, 23683, 26087, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 8634, 8120, 62, 38604, 7036, 6234, 62, 38, 6684, 38, 2538, 62, 33, 16696, 2767, 62, 20608, 1600, 366, 8634, 8120, 62, 44724, 62, 38, 6684, 38, 2538, 62, 33, 16696, 2767, 62, 20608, 1600, 366, 29904, 62, 26947, 62, 33, 16696, 2767, 62, 20608, 8973, 628, 220, 220, 220, 825, 1332, 62, 9122, 24330, 62, 482, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 2198, 24330, 1943, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 287, 2116, 13, 24330, 62, 13083, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 268, 2268, 58, 2539, 60, 796, 13538, 628, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 24330, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1994, 287, 2116, 13, 24330, 62, 13083, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 28686, 13, 268, 2268, 58, 2539, 60, 628, 220, 220, 220, 2488, 403, 715, 395, 13, 40319, 50015, 198, 220, 220, 220, 825, 1332, 62, 9122, 24330, 62, 45688, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 2198, 24330, 12542, 4049, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 279, 2645, 600, 25, 15560, 28, 3919, 12, 944, 12, 1904, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 24330, 3419, 628, 198, 4871, 6208, 18839, 11187, 2667, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 49706, 1398, 37811, 628, 220, 220, 220, 825, 11626, 8048, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 32657, 929, 5254, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 49625, 2902, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 18126, 7, 6404, 2667, 8, 628, 220, 220, 220, 825, 1332, 62, 6404, 62, 18982, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 49706, 468, 3376, 5794, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 351, 10903, 9399, 3419, 355, 4269, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 796, 9058, 62, 6404, 1362, 7, 5532, 28, 5532, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 64, 3275, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 3041, 25636, 7, 5532, 13, 1136, 8367, 22784, 374, 6, 4895, 16514, 27823, 1298, 37082, 67, 90, 19, 92, 12, 59, 67, 90, 17, 92, 12, 59, 67, 90, 17, 92, 3467, 67, 90, 17, 92, 7479, 67, 90, 17, 92, 7479, 67, 90, 17, 5512, 59, 67, 90, 18, 92, 1600, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1, 28116, 414, 1298, 366, 10778, 1600, 366, 20786, 5376, 1298, 366, 9288, 62, 6404, 62, 18982, 1600, 705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1, 42895, 1298, 366, 15763, 1600, 366, 20500, 1298, 366, 64, 3275, 20662, 11537, 628, 220, 220, 220, 825, 1332, 62, 6404, 62, 5715, 62, 2617, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 2604, 1241, 460, 307, 900, 422, 17365, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 268, 2268, 14692, 25294, 62, 2538, 18697, 8973, 796, 366, 31502, 1, 198, 220, 220, 220, 220, 220, 220, 220, 351, 10903, 9399, 3419, 355, 4269, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 796, 9058, 62, 6404, 1362, 7, 5532, 28, 5532, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1619, 28686, 13, 268, 2268, 14692, 25294, 62, 2538, 18697, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 10951, 7203, 64, 3275, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 43917, 7203, 11246, 3275, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 13, 18224, 7203, 29214, 3275, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5072, 796, 4269, 13, 1136, 8367, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 17821, 7, 439, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 64, 3275, 1, 407, 287, 5072, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11246, 3275, 1, 287, 5072, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 29214, 3275, 1, 287, 5072, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 828, 31456, 2625, 34, 34574, 900, 2604, 1241, 4943, 628, 198, 4871, 6208, 15865, 874, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 1657, 5050, 37811, 628, 220, 220, 220, 825, 1332, 62, 11249, 62, 11195, 62, 8658, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 1382, 62, 11195, 62, 8658, 2446, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 1363, 7400, 351, 645, 2956, 7278, 198, 220, 220, 220, 220, 220, 220, 220, 1363, 62, 8658, 62, 11600, 796, 1382, 62, 11195, 62, 8658, 62, 1177, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 1363, 62, 8658, 62, 17752, 796, 33918, 13, 67, 8142, 7, 11195, 62, 8658, 62, 11600, 11, 2880, 2024, 16193, 2430, 11, 366, 11097, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 11195, 62, 8658, 62, 17752, 11, 705, 4895, 4906, 2404, 11195, 2430, 27372, 32509, 4906, 2404, 25677, 2430, 5239, 8351, 4906, 2404, 25638, 62, 5239, 2430, 5239, 1298, 6, 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, 705, 1, 34149, 795, 13210, 271, 1058, 2704, 26696, 62, 39531, 25, 2430, 368, 31370, 1298, 7942, 92, 8762, 4906, 2404, 5458, 2430, 5239, 8351, 4906, 30543, 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, 705, 11097, 43395, 74, 67, 675, 2430, 5239, 2404, 6030, 4600, 14, 16680, 557, 529, 1279, 4868, 286, 795, 13210, 271, 29, 63, 287, 597, 8537, 284, 900, 257, 6, 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, 705, 1351, 286, 795, 13210, 271, 329, 1568, 8748, 526, 92, 8762, 4906, 2404, 5458, 2430, 5239, 8351, 4906, 2404, 43395, 74, 67, 675, 1600, 6, 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, 705, 1, 5239, 2404, 1639, 460, 1570, 644, 345, 7448, 597, 2589, 416, 19720, 4600, 14, 16680, 557, 529, 63, 287, 6, 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, 705, 597, 8537, 526, 92, 8762, 4906, 2404, 7146, 1304, 11919, 4906, 2404, 25677, 2430, 5239, 8351, 4906, 2404, 25638, 62, 5239, 1600, 6, 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, 705, 1, 5239, 2404, 32901, 797, 4658, 1058, 7364, 12, 19554, 694, 25, 2430, 368, 31370, 1298, 7942, 92, 8762, 4906, 2404, 5458, 1600, 6, 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, 705, 1, 5239, 8351, 4906, 2404, 43395, 74, 67, 675, 2430, 5239, 2404, 5247, 284, 257, 3275, 11, 3904, 4600, 5167, 24439, 47671, 788, 6, 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, 705, 3904, 319, 4600, 15205, 557, 529, 63, 284, 6324, 351, 262, 7448, 795, 13210, 271, 284, 262, 3275, 13, 6852, 77, 6852, 77, 1532, 6, 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, 705, 345, 460, 43054, 83, 766, 4600, 15205, 557, 529, 47671, 3904, 4600, 5167, 3275, 32953, 986, 63, 6, 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, 705, 284, 1064, 340, 526, 11709, 48999, 11537, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 1363, 7400, 351, 2956, 7278, 198, 220, 220, 220, 220, 220, 220, 220, 1363, 62, 8658, 62, 11600, 796, 1382, 62, 11195, 62, 8658, 62, 1177, 7, 1324, 62, 6371, 2625, 36750, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1363, 62, 8658, 62, 17752, 796, 33918, 13, 67, 8142, 7, 11195, 62, 8658, 62, 11600, 11, 2880, 2024, 16193, 2430, 11, 366, 11097, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 11195, 62, 8658, 62, 17752, 11, 705, 4895, 4906, 2404, 11195, 2430, 27372, 32509, 4906, 2404, 25677, 2430, 5239, 8351, 4906, 2404, 25638, 62, 5239, 2430, 5239, 1298, 6, 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, 705, 1, 34149, 795, 13210, 271, 1058, 2704, 26696, 62, 39531, 25, 2430, 368, 31370, 1298, 7942, 92, 8762, 4906, 2404, 5458, 2430, 5239, 8351, 4906, 30543, 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, 705, 11097, 43395, 74, 67, 675, 2430, 5239, 2404, 6030, 4600, 14, 16680, 557, 529, 1279, 4868, 286, 795, 13210, 271, 29, 63, 287, 597, 8537, 284, 900, 257, 6, 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, 705, 1351, 286, 795, 13210, 271, 329, 1568, 8748, 526, 92, 8762, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 13564, 12, 368, 13210, 271, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 1298, 6, 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, 705, 1, 13564, 795, 13210, 271, 11919, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 21928, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 1298, 6, 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, 705, 1, 82, 9586, 795, 13210, 271, 11919, 4906, 2404, 5458, 2430, 5239, 8351, 4906, 2404, 43395, 74, 67, 675, 2430, 5239, 1298, 6, 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, 705, 1, 1639, 460, 1570, 644, 345, 7448, 597, 2589, 416, 19720, 4600, 14, 16680, 557, 529, 63, 287, 597, 6, 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, 705, 8537, 526, 92, 8762, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 13564, 12, 22366, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 1298, 6, 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, 705, 1, 1177, 795, 13210, 271, 11919, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 1177, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 2404, 1177, 795, 13210, 271, 20662, 4032, 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, 705, 4895, 4906, 2404, 7146, 1304, 11919, 4906, 2404, 25677, 2430, 5239, 8351, 4906, 2404, 25638, 62, 5239, 2430, 5239, 1298, 6, 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, 705, 1, 32901, 797, 4658, 1058, 7364, 12, 19554, 694, 25, 2430, 368, 31370, 1298, 7942, 92, 8762, 4906, 2404, 5458, 2430, 5239, 1298, 6, 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, 705, 4895, 4906, 2404, 43395, 74, 67, 675, 2430, 5239, 2404, 5247, 284, 257, 3275, 11, 3904, 4600, 5167, 24439, 47671, 788, 3904, 319, 6, 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, 705, 4600, 15205, 557, 529, 63, 284, 6324, 351, 262, 7448, 795, 13210, 271, 284, 262, 3275, 13, 6852, 77, 6852, 77, 1532, 345, 6, 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, 705, 460, 43054, 83, 766, 4600, 15205, 557, 529, 47671, 3904, 4600, 5167, 3275, 32953, 986, 63, 284, 1064, 340, 526, 11709, 4032, 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, 705, 4895, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 23108, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 2404, 20500, 351, 645, 6, 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, 705, 12737, 11919, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 26272, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 2404, 20500, 6859, 20662, 4032, 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, 705, 4895, 4906, 2404, 9060, 2430, 9060, 62, 6371, 1298, 6, 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, 705, 1, 36750, 14, 9600, 14, 260, 2673, 12, 2860, 13, 11134, 30, 86, 28, 35500, 5, 45163, 28, 16, 2430, 2501, 62, 5239, 1298, 6, 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, 705, 1, 20500, 351, 12737, 20662, 48999, 11537, 628, 220, 220, 220, 825, 1332, 62, 7220, 62, 7890, 62, 2539, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 2836, 62, 7890, 62, 2539, 2446, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 7890, 62, 2539, 7203, 16366, 62, 312, 1600, 366, 9255, 62, 312, 1600, 366, 15097, 62, 312, 1600, 366, 7220, 62, 312, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16366, 62, 312, 14, 9255, 62, 312, 12, 15097, 62, 312, 14, 7220, 62, 312, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 7890, 62, 2539, 7203, 16366, 62, 312, 1600, 6045, 11, 366, 15097, 62, 312, 1600, 366, 7220, 62, 312, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16366, 62, 312, 14, 23108, 12, 15097, 62, 312, 14, 7220, 62, 312, 4943, 628, 198, 4871, 6208, 38727, 12982, 6601, 7, 403, 715, 395, 13, 3792, 50027, 42367, 952, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 2836, 1366, 39948, 37811, 628, 220, 220, 220, 30351, 825, 30351, 7248, 4933, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 40786, 5254, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27041, 316, 796, 44123, 7, 16684, 28, 33, 38811, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 796, 1086, 672, 7, 3672, 2625, 3672, 1600, 19236, 28, 944, 13, 27041, 316, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 33678, 796, 44123, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 27041, 316, 13, 2436, 672, 796, 44123, 7, 7783, 62, 8367, 28, 944, 13, 2436, 672, 8, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 900, 4933, 9487, 7, 565, 82, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 40786, 5254, 1752, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 611, 25064, 13, 24254, 13, 9688, 2032, 342, 7203, 5404, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 952, 13, 2617, 62, 15596, 62, 26268, 62, 30586, 7, 292, 13361, 952, 13, 11209, 17563, 273, 9237, 39516, 36727, 28955, 628, 220, 220, 220, 2488, 17147, 7203, 41684, 62, 260, 2673, 62, 2860, 13, 23124, 874, 13, 7220, 62, 7890, 62, 2539, 4943, 198, 220, 220, 220, 30351, 825, 1332, 62, 33678, 62, 18417, 62, 7890, 7, 944, 11, 15290, 62, 7220, 62, 7890, 62, 2539, 25, 44123, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 12233, 62, 18417, 62, 7890, 2446, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 2836, 1366, 7160, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 1069, 1023, 796, 44123, 7, 7783, 62, 8367, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 12233, 62, 18417, 62, 7890, 7, 944, 13, 27041, 316, 11, 366, 16366, 62, 312, 1600, 366, 9255, 62, 312, 1600, 366, 15097, 62, 312, 1600, 14631, 7220, 62, 312, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 1069, 1023, 13, 30493, 62, 7174, 62, 27078, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 33678, 13, 30493, 62, 7174, 62, 27078, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 33678, 13, 42503, 62, 76, 735, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 2836, 1366, 1595, 470, 2152, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 1069, 1023, 796, 44123, 7, 7783, 62, 8367, 28, 25101, 8, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 12233, 62, 18417, 62, 7890, 7, 944, 13, 27041, 316, 11, 366, 16366, 62, 312, 1600, 366, 9255, 62, 312, 1600, 366, 15097, 62, 312, 1600, 14631, 7220, 62, 312, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 1069, 1023, 13, 30493, 62, 7174, 62, 27078, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2436, 672, 13, 33678, 13, 30493, 62, 1662, 62, 7174, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 3294, 2836, 1366, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 12233, 62, 18417, 62, 7890, 7, 944, 13, 27041, 316, 11, 366, 16366, 62, 312, 1600, 366, 9255, 62, 312, 1600, 366, 15097, 62, 312, 1600, 14631, 7220, 62, 312, 16, 1600, 366, 7220, 62, 312, 17, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 7220, 62, 7890, 62, 2539, 13, 30493, 62, 10134, 62, 66, 5691, 26933, 13345, 7, 6649, 441, 62, 16366, 62, 312, 2625, 16366, 62, 312, 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, 13953, 62, 312, 2625, 9255, 62, 312, 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, 1074, 62, 312, 2625, 15097, 62, 312, 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, 2836, 62, 312, 2625, 7220, 62, 312, 16, 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, 869, 7, 6649, 441, 62, 16366, 62, 312, 2625, 16366, 62, 312, 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, 13953, 62, 312, 2625, 9255, 62, 312, 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, 1074, 62, 312, 2625, 15097, 62, 312, 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, 2836, 62, 312, 2625, 7220, 62, 312, 17, 4943, 12962, 628, 198, 4871, 6208, 36, 5908, 7285, 18843, 1352, 7, 403, 715, 395, 13, 3792, 50027, 42367, 952, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 2295, 31370, 18843, 1352, 1398, 37811, 198, 220, 220, 220, 1303, 279, 2645, 600, 25, 15560, 28, 24326, 12, 15526, 628, 220, 220, 220, 30351, 825, 30351, 7248, 4933, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 40786, 5254, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 796, 1081, 13361, 44, 735, 7, 42367, 13908, 11792, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 30001, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 4023, 62, 22046, 796, 19779, 16366, 1298, 2116, 13, 16366, 11, 366, 4023, 62, 19011, 1298, 366, 32782, 1600, 366, 15042, 62, 6371, 1298, 366, 11246, 12, 15042, 1600, 366, 42180, 62, 22046, 1298, 1391, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 50145, 1298, 1391, 5512, 366, 13376, 62, 8189, 1298, 939, 92, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1324, 796, 1081, 13361, 44, 735, 7, 42367, 4677, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 1324, 13, 16366, 796, 2116, 13, 16366, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 6404, 1362, 13, 4993, 8116, 796, 17635, 628, 220, 220, 220, 2488, 4871, 24396, 198, 220, 220, 220, 825, 900, 4933, 9487, 7, 565, 82, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 40786, 5254, 1752, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 611, 25064, 13, 24254, 13, 9688, 2032, 342, 7203, 5404, 1, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 952, 13, 2617, 62, 15596, 62, 26268, 62, 30586, 7, 292, 13361, 952, 13, 11209, 17563, 273, 9237, 39516, 36727, 28955, 628, 220, 220, 220, 30351, 825, 1332, 62, 1136, 62, 7220, 62, 260, 4658, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 651, 62, 7220, 62, 260, 4658, 2446, 37811, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 645, 12737, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 1081, 13361, 11122, 441, 31077, 7, 1174, 90, 1174, 944, 13, 4023, 62, 22046, 11, 12429, 4895, 7890, 1298, 19779, 4906, 1298, 366, 20500, 1600, 366, 20500, 1298, 1391, 42535, 32092, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 260, 4658, 62, 1136, 13, 7783, 62, 8367, 796, 2882, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13, 1136, 62, 7220, 62, 260, 4658, 7, 16366, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6518, 62, 312, 2625, 17620, 62, 312, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 912, 2625, 20500, 62, 912, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 312, 2625, 7220, 62, 312, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 685, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 6291, 2882, 25, 3740, 1378, 15042, 13, 6649, 441, 13, 785, 14, 24396, 82, 14, 260, 4658, 13, 1136, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 12737, 319, 3275, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 1081, 13361, 11122, 441, 31077, 7, 1174, 90, 1174, 944, 13, 4023, 62, 22046, 11, 12429, 4895, 7890, 1298, 19779, 4906, 1298, 366, 20500, 1600, 366, 20500, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 260, 4658, 1298, 685, 90, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 5796, 576, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18417, 1298, 685, 366, 7220, 62, 312, 16, 1600, 366, 7220, 62, 312, 17, 1, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 86, 676, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18417, 1298, 685, 366, 7220, 62, 312, 17, 1600, 366, 7220, 62, 312, 18, 1, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 11709, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 260, 4658, 62, 1136, 13, 7783, 62, 8367, 796, 2882, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13, 1136, 62, 7220, 62, 260, 4658, 7, 16366, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6518, 62, 312, 2625, 17620, 62, 312, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 912, 2625, 20500, 62, 912, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 312, 2625, 7220, 62, 312, 17, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 1600, 366, 86, 676, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 12737, 319, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 1081, 13361, 11122, 441, 31077, 7, 1174, 90, 1174, 944, 13, 4023, 62, 22046, 11, 12429, 4895, 7890, 1298, 19779, 4906, 1298, 366, 7753, 1600, 366, 7753, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 260, 4658, 1298, 685, 90, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 44944, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18417, 1298, 685, 366, 7220, 62, 312, 16, 1600, 366, 7220, 62, 312, 17, 1, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 11709, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 260, 4658, 62, 1136, 13, 7783, 62, 8367, 796, 2882, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13, 1136, 62, 7220, 62, 260, 4658, 7, 16366, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6518, 62, 312, 2625, 17620, 62, 312, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 912, 2625, 20500, 62, 912, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 312, 2625, 7220, 62, 312, 16, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 44944, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 12737, 319, 2393, 62, 23893, 198, 220, 220, 220, 220, 220, 220, 220, 2882, 796, 1081, 13361, 11122, 441, 31077, 7, 1174, 90, 1174, 944, 13, 4023, 62, 22046, 11, 12429, 4895, 7890, 1298, 19779, 4906, 1298, 366, 7753, 62, 23893, 1600, 366, 23893, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 260, 4658, 1298, 685, 90, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 11499, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18417, 1298, 685, 366, 7220, 62, 312, 16, 1600, 366, 7220, 62, 312, 17, 1, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 11709, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 260, 4658, 62, 1136, 13, 7783, 62, 8367, 796, 2882, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13, 1136, 62, 7220, 62, 260, 4658, 7, 16366, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6518, 62, 312, 2625, 17620, 62, 312, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3275, 62, 912, 2625, 20500, 62, 912, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2836, 62, 312, 2625, 7220, 62, 312, 17, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 11499, 8973, 8, 628, 220, 220, 220, 2488, 17147, 7203, 64, 952, 4023, 13, 11792, 36044, 13, 1136, 4943, 198, 220, 220, 220, 30351, 825, 1332, 62, 1136, 62, 260, 4658, 62, 259, 62, 15097, 7, 944, 11, 651, 25, 1081, 13361, 44, 735, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 651, 62, 260, 4658, 62, 259, 62, 15097, 2446, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 25, 1081, 13361, 44, 735, 796, 651, 13, 7783, 62, 8367, 13, 834, 64, 9255, 834, 13, 7783, 62, 8367, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 13376, 796, 939, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 5239, 13, 7783, 62, 8367, 796, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44438, 4895, 8692, 2404, 2303, 1348, 25719, 19779, 8692, 2404, 82, 324, 62, 2550, 25719, 19779, 8692, 2404, 565, 499, 20662, 49946, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6291, 2882, 25, 3740, 1378, 15042, 13, 6649, 441, 13, 785, 14, 24396, 82, 14, 368, 31370, 13, 4868, 198, 220, 220, 220, 220, 220, 220, 220, 30740, 62, 26209, 796, 1081, 13361, 11122, 441, 31077, 7, 1174, 90, 1174, 944, 13, 4023, 62, 22046, 11, 12429, 4895, 7890, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 368, 31370, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 6511, 9246, 1298, 366, 11246, 19016, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 4598, 469, 1298, 366, 26011, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 10608, 1845, 10599, 1298, 366, 11246, 19016, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 66, 26129, 1298, 685, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 32186, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 368, 31370, 62, 14933, 1298, 14631, 5796, 576, 1600, 366, 86, 676, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8964, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 33152, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 368, 31370, 62, 14933, 1298, 14631, 32109, 16, 1600, 366, 32109, 17, 1600, 366, 32109, 18, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1782, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 1782, 11709, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 368, 31370, 62, 4868, 13, 7783, 62, 8367, 796, 30740, 62, 26209, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 3210, 795, 13210, 271, 2882, 12876, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13557, 1136, 62, 260, 4658, 62, 259, 62, 15097, 7, 16366, 28, 944, 13, 16366, 11, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 368, 31370, 62, 4868, 13, 30493, 62, 41742, 62, 27078, 62, 4480, 7, 17256, 62, 66, 26129, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 6246, 13, 1136, 13, 30493, 62, 7174, 62, 27078, 62, 4480, 7203, 5450, 1378, 2503, 13, 368, 13210, 485, 87, 13, 785, 14, 15042, 14, 85, 16, 14, 40477, 62, 368, 31370, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 5239, 13, 30493, 62, 41742, 62, 27078, 62, 4480, 7, 12685, 7656, 2625, 40477, 12, 23, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 2617, 7, 368, 13210, 271, 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, 900, 7, 14692, 6511, 9246, 1600, 366, 4598, 469, 1600, 366, 10608, 1845, 10599, 1600, 366, 5796, 576, 1600, 366, 86, 676, 1600, 366, 32109, 16, 1600, 366, 32109, 17, 1600, 366, 32109, 18, 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, 366, 2303, 1348, 1600, 366, 82, 324, 62, 2550, 1600, 366, 565, 499, 8973, 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, 31456, 2625, 23722, 407, 21136, 477, 795, 13210, 271, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 42503, 62, 76, 735, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 651, 13, 42503, 62, 76, 735, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 3210, 795, 13210, 271, 2882, 407, 12876, 198, 220, 220, 220, 220, 220, 220, 220, 651, 13, 7783, 62, 8367, 13, 834, 64, 9255, 834, 13, 7783, 62, 8367, 13, 13376, 796, 5323, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13557, 1136, 62, 260, 4658, 62, 259, 62, 15097, 7, 16366, 28, 944, 13, 16366, 11, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 5239, 13, 30493, 62, 1662, 62, 41742, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 2617, 7, 368, 13210, 271, 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, 900, 7, 14692, 6511, 9246, 1600, 366, 4598, 469, 1600, 366, 10608, 1845, 10599, 1600, 366, 5796, 576, 1600, 366, 86, 676, 1600, 366, 32109, 16, 1600, 366, 32109, 17, 1600, 366, 32109, 18, 8973, 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, 31456, 2625, 19926, 407, 1441, 3210, 795, 13210, 271, 618, 12515, 2638, 2581, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 42503, 62, 76, 735, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 651, 13, 42503, 62, 76, 735, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 3210, 795, 13210, 271, 2882, 6631, 198, 220, 220, 220, 220, 220, 220, 220, 651, 13, 7783, 62, 8367, 13, 834, 64, 9255, 834, 13, 1589, 62, 10760, 796, 20985, 34525, 12331, 7, 14202, 11, 44123, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 2295, 31370, 18843, 1352, 13557, 1136, 62, 260, 4658, 62, 259, 62, 15097, 7, 16366, 28, 944, 13, 16366, 11, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15290, 62, 22866, 62, 37153, 13, 5239, 13, 30493, 62, 1662, 62, 41742, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 2617, 7, 368, 13210, 271, 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, 900, 7, 14692, 6511, 9246, 1600, 366, 4598, 469, 1600, 366, 10608, 1845, 10599, 1600, 366, 5796, 576, 1600, 366, 86, 676, 1600, 366, 32109, 16, 1600, 366, 32109, 17, 1600, 366, 32109, 18, 8973, 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, 31456, 2625, 19926, 407, 1441, 3210, 795, 13210, 271, 618, 4637, 4049, 4943, 628, 220, 220, 220, 2488, 17147, 7203, 41684, 62, 260, 2673, 62, 2860, 13, 23124, 874, 13, 36, 5908, 7285, 18843, 1352, 13557, 1136, 62, 260, 4658, 62, 259, 62, 15097, 4943, 198, 220, 220, 220, 30351, 825, 1332, 62, 19119, 62, 368, 31370, 62, 4868, 7, 944, 11, 651, 62, 260, 4658, 25, 1081, 13361, 44, 735, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 4296, 62, 368, 31370, 62, 4868, 2446, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 7783, 62, 8367, 796, 14631, 11246, 1600, 366, 368, 13210, 271, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 796, 2295, 31370, 18843, 1352, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 16366, 13, 30001, 796, 366, 727, 11241, 1, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 3487, 9706, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 30351, 952, 13, 17077, 62, 1640, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 19119, 62, 368, 31370, 62, 4868, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11241, 2625, 3605, 11241, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3993, 28, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 16, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 30351, 952, 13, 48031, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 30493, 62, 41742, 62, 27078, 62, 4480, 7, 944, 13, 16366, 11, 2116, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 31370, 62, 46616, 13557, 439, 62, 368, 13210, 271, 11, 14631, 11246, 1600, 366, 368, 13210, 271, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 944, 13, 16366, 13, 30001, 11, 366, 727, 11241, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 477, 62, 368, 13210, 271, 1364, 21588, 319, 30740, 40391, 4049, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 1589, 62, 10760, 796, 36256, 32, 14415, 12331, 7, 14202, 11, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 30351, 952, 13, 17077, 62, 1640, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 19119, 62, 368, 31370, 62, 4868, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11241, 2625, 3605, 11241, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3993, 28, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 16, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 30351, 952, 13, 48031, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 31370, 62, 46616, 13557, 439, 62, 368, 13210, 271, 11, 14631, 11246, 1600, 366, 368, 13210, 271, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 944, 13, 16366, 13, 30001, 11, 366, 727, 11241, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1332, 477, 62, 368, 13210, 271, 555, 2617, 319, 30740, 40391, 6631, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 439, 62, 368, 13210, 271, 796, 6045, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 1589, 62, 10760, 796, 36256, 32, 14415, 12331, 7, 14202, 11, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25507, 30351, 952, 13, 17077, 62, 1640, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 19119, 62, 368, 31370, 62, 4868, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11241, 2625, 3605, 11241, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3993, 28, 16, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26827, 28, 16, 13, 20, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 30351, 952, 13, 48031, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 628, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 31370, 62, 46616, 13557, 439, 62, 368, 13210, 271, 11, 6045, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 944, 13, 16366, 13, 30001, 11, 366, 727, 11241, 4943, 628, 220, 220, 220, 30351, 825, 1332, 62, 11338, 62, 368, 31370, 62, 16663, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 2245, 62, 368, 31370, 62, 16663, 2446, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 796, 2295, 31370, 18843, 1352, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 368, 31370, 62, 35943, 796, 30351, 952, 13, 17953, 62, 35943, 7, 11246, 62, 24396, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 44805, 62, 46616, 13, 11338, 62, 368, 31370, 62, 19119, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 25507, 30351, 952, 13, 42832, 7, 15, 13, 16, 8, 220, 1303, 4876, 481, 307, 19994, 618, 340, 481, 307, 7530, 287, 262, 1785, 9052, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 17821, 7, 368, 31370, 62, 46616, 13557, 368, 31370, 62, 35943, 13, 28060, 28955, 628, 220, 220, 220, 2488, 17147, 7203, 41684, 62, 260, 2673, 62, 2860, 13, 23124, 874, 13, 36, 5908, 7285, 18843, 1352, 13557, 1136, 62, 260, 4658, 62, 259, 62, 15097, 4943, 198, 220, 220, 220, 30351, 825, 1332, 62, 1136, 62, 12102, 62, 260, 4658, 7, 944, 11, 651, 62, 260, 4658, 25, 1081, 13361, 44, 735, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14402, 651, 62, 12102, 62, 260, 4658, 2446, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 796, 2295, 31370, 18843, 1352, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 368, 31370, 62, 35943, 796, 44123, 7, 16684, 28, 25714, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 368, 31370, 62, 35943, 13, 28060, 13, 7783, 62, 8367, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 19119, 62, 368, 31370, 62, 4868, 796, 1081, 13361, 44, 735, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 439, 62, 368, 13210, 271, 796, 14631, 5796, 576, 1600, 366, 86, 676, 1600, 366, 2550, 1600, 366, 44944, 1600, 366, 11246, 12, 368, 31370, 1600, 27444, 368, 73, 12, 1600, 45434, 368, 73, 62, 1600, 366, 11246, 62, 368, 31370, 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, 43825, 505, 1600, 24018, 22708, 6, 1600, 366, 4051, 8973, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 6565, 5128, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 2625, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 685, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 645, 795, 13210, 271, 287, 5128, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 2625, 11246, 2420, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 685, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 645, 4938, 795, 13210, 271, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 3712, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 685, 12962, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 4938, 5128, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 5796, 576, 25, 1058, 86, 676, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 1600, 366, 86, 676, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 795, 13210, 271, 2041, 3435, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 28, 1298, 11246, 12, 368, 31370, 25, 1058, 12, 368, 73, 12, 25, 1058, 62, 368, 73, 62, 25, 1058, 11246, 62, 368, 31370, 25, 1058, 10, 505, 25, 1058, 6, 22708, 10354, 1058, 4051, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 11246, 12, 368, 31370, 1600, 27444, 368, 73, 12, 1600, 45434, 368, 73, 62, 1600, 366, 11246, 62, 368, 31370, 1600, 43825, 505, 1600, 24018, 22708, 6, 1600, 366, 4051, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 4781, 14184, 16856, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 5796, 576, 25, 1058, 86, 676, 25, 1058, 5796, 576, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 1600, 366, 86, 676, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 44805, 351, 23157, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 2550, 3712, 20407, 12, 41527, 12, 17, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 2550, 3712, 20407, 12, 41527, 12, 17, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 645, 2272, 287, 5128, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 28, 1298, 5796, 576, 3712, 86, 676, 3712, 2550, 3712, 20407, 12, 41527, 12, 17, 3712, 2550, 3712, 20407, 12, 41527, 12, 18, 3712, 44944, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 1600, 366, 86, 676, 1600, 366, 2550, 3712, 20407, 12, 41527, 12, 17, 1600, 366, 2550, 3712, 20407, 12, 41527, 12, 18, 1600, 366, 44944, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 2420, 290, 795, 13210, 271, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2420, 2625, 82, 908, 2302, 25, 5796, 576, 25, 29214, 5239, 25, 86, 676, 25, 3549, 5239, 25, 44944, 25, 437, 1659, 5239, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 1600, 366, 86, 676, 1600, 366, 44944, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 12515, 44805, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 5796, 576, 25, 1058, 259, 12102, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 5796, 576, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 2198, 44805, 62, 35943, 318, 2067, 618, 5201, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 7783, 62, 8367, 796, 14631, 2633, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 44805, 62, 46616, 13557, 368, 31370, 62, 35943, 13, 28060, 13, 7783, 62, 8367, 796, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 795, 13210, 271, 796, 25507, 44805, 62, 46616, 13, 1136, 62, 12102, 62, 260, 4658, 7, 5239, 28, 1298, 2633, 25, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5456, 28, 944, 13, 16366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 598, 28, 944, 13, 1324, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49706, 28, 944, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 651, 62, 260, 4658, 13, 30493, 62, 41742, 62, 27078, 62, 4480, 7, 944, 13, 16366, 11, 2116, 13, 6404, 1362, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 30493, 36, 13255, 7, 368, 13210, 271, 11, 14631, 2633, 8973, 8, 198 ]
1.994553
11,016
from flask import Flask from flask_restful import Api from multiprocessing import Process from heartbit import heartbit from api_health import HealthEndPoint from api_manifest import ManifestEndPoint from api_metrics import MetricsEndPoint app = Flask(__name__) api = Api(app) async_process = Process( target=heartbit, daemon=True ) async_process.start() health_check_routes = ['/', '/health', '/health/', '/v1', '/v1/', '/v1/health', '/v1/health/'] manifest_routes = ['/manifest', '/manifest/', '/v1/manifest', '/v1/manifest/'] disk_routes = ['/metrics', '/metrics/', '/v1/metrics', '/v1/metrics/'] api.add_resource(HealthEndPoint, *health_check_routes) api.add_resource(ManifestEndPoint, *manifest_routes) api.add_resource(MetricsEndPoint, *disk_routes) if __name__ == '__main__': app.run()
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 198, 6738, 2612, 2545, 1330, 2612, 2545, 198, 6738, 40391, 62, 13948, 1330, 3893, 12915, 12727, 198, 6738, 40391, 62, 805, 8409, 1330, 36757, 12915, 12727, 198, 6738, 40391, 62, 4164, 10466, 1330, 3395, 10466, 12915, 12727, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 15042, 796, 5949, 72, 7, 1324, 8, 198, 198, 292, 13361, 62, 14681, 796, 10854, 7, 220, 198, 220, 220, 220, 2496, 28, 11499, 2545, 11, 198, 220, 220, 220, 33386, 28, 17821, 198, 8, 198, 292, 13361, 62, 14681, 13, 9688, 3419, 198, 198, 13948, 62, 9122, 62, 81, 448, 274, 796, 685, 26488, 3256, 31051, 13948, 3256, 31051, 13948, 14, 3256, 31051, 85, 16, 3256, 31051, 85, 16, 14, 3256, 31051, 85, 16, 14, 13948, 3256, 31051, 85, 16, 14, 13948, 14, 20520, 198, 805, 8409, 62, 81, 448, 274, 796, 685, 26488, 805, 8409, 3256, 31051, 805, 8409, 14, 3256, 31051, 85, 16, 14, 805, 8409, 3256, 31051, 85, 16, 14, 805, 8409, 14, 20520, 198, 39531, 62, 81, 448, 274, 796, 685, 26488, 4164, 10466, 3256, 31051, 4164, 10466, 14, 3256, 31051, 85, 16, 14, 4164, 10466, 3256, 31051, 85, 16, 14, 4164, 10466, 14, 20520, 198, 198, 15042, 13, 2860, 62, 31092, 7, 18081, 12915, 12727, 11, 1635, 13948, 62, 9122, 62, 81, 448, 274, 8, 198, 15042, 13, 2860, 62, 31092, 7, 5124, 8409, 12915, 12727, 11, 1635, 805, 8409, 62, 81, 448, 274, 8, 198, 15042, 13, 2860, 62, 31092, 7, 9171, 10466, 12915, 12727, 11, 1635, 39531, 62, 81, 448, 274, 8, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 598, 13, 5143, 3419, 198 ]
2.697674
301
from Field_D_SupportingClasses import * ProgramID = "DF Word Score Sonifier v1.0" WorkTitle = "Untitled Sonification" Lyricist = "" Input = DF_TextInput() WorkTitle = Input.provideTitle() Lyricist = Input.provideLyricist() verses = Input.provideVerses() positions = Input.providePositions() scores = Input.provideScrabbleScores() Planner = DF_SongPlanner(verses, positions, scores) verseKeys = Planner.getVerseKeys() Planner.getBassPart(Planner.homeKey) Planner.getTenorPart(Planner.homeKey) Planner.getAltoPart(Planner.homeKey) Planner.getSopPart(Planner.homeKey) X = DF_MusicXML(WorkTitle, ProgramID, Lyricist) basNotes = Planner.bassNotes basDurations = Planner.bassRhythms basLyric = Planner.bassWords basPos = Planner.bassPositions basTies = Planner.bassTies tenNotes = Planner.tenNotes tenDurations = Planner.tenRhythms tenLyric = Planner.tenWords tenPos = Planner.tenPositions tenTies = Planner.tenTies altoNotes = Planner.altoNotes altoDurations = Planner.altoRhythms altoLyric = Planner.altoWords altoPos = Planner.altoPositions altoTies = Planner.altoTies sopNotes = Planner.sopNotes sopDurations = Planner.sopRhythms sopLyric = Planner.sopWords sopPos = Planner.sopPositions sopTies = Planner.sopTies X.writeSop(sopNotes, sopDurations, sopLyric, sopPos, sopTies) X.writeAlto(altoNotes, altoDurations, altoLyric, altoPos, altoTies) X.writeTenor(tenNotes, tenDurations, tenLyric, tenPos, tenTies) X.writeBass(basNotes, basDurations, basLyric, basPos, basTies) X.endXMLFile()
[ 6738, 7663, 62, 35, 62, 15514, 278, 9487, 274, 1330, 1635, 201, 198, 201, 198, 15167, 2389, 796, 366, 8068, 9678, 15178, 6295, 7483, 410, 16, 13, 15, 1, 201, 198, 12468, 19160, 796, 366, 46332, 6295, 2649, 1, 201, 198, 31633, 1173, 396, 796, 13538, 201, 198, 201, 198, 20560, 796, 36323, 62, 8206, 20560, 3419, 201, 198, 12468, 19160, 796, 23412, 13, 15234, 485, 19160, 3419, 201, 198, 31633, 1173, 396, 796, 23412, 13, 15234, 485, 31633, 1173, 396, 3419, 201, 198, 690, 274, 796, 23412, 13, 15234, 485, 34947, 274, 3419, 201, 198, 1930, 1756, 796, 23412, 13, 15234, 485, 21604, 1756, 3419, 201, 198, 1416, 2850, 796, 23412, 13, 15234, 485, 3351, 25619, 903, 3351, 2850, 3419, 201, 198, 20854, 1008, 796, 36323, 62, 44241, 20854, 1008, 7, 690, 274, 11, 6116, 11, 8198, 8, 201, 198, 4399, 40729, 796, 220, 5224, 1008, 13, 1136, 13414, 325, 40729, 3419, 201, 198, 20854, 1008, 13, 1136, 33, 562, 7841, 7, 20854, 1008, 13, 11195, 9218, 8, 201, 198, 20854, 1008, 13, 1136, 24893, 273, 7841, 7, 20854, 1008, 13, 11195, 9218, 8, 201, 198, 20854, 1008, 13, 1136, 2348, 1462, 7841, 7, 20854, 1008, 13, 11195, 9218, 8, 201, 198, 20854, 1008, 13, 1136, 50, 404, 7841, 7, 20854, 1008, 13, 11195, 9218, 8, 201, 198, 201, 198, 55, 796, 36323, 62, 22648, 55, 5805, 7, 12468, 19160, 11, 6118, 2389, 11, 9334, 1173, 396, 8, 201, 198, 12093, 16130, 796, 5224, 1008, 13, 42933, 16130, 201, 198, 12093, 35, 20074, 796, 5224, 1008, 13, 42933, 38576, 5272, 907, 201, 198, 12093, 31633, 1173, 796, 5224, 1008, 13, 42933, 37117, 201, 198, 12093, 21604, 796, 5224, 1008, 13, 42933, 21604, 1756, 201, 198, 12093, 51, 444, 796, 5224, 1008, 13, 42933, 51, 444, 201, 198, 1452, 16130, 796, 5224, 1008, 13, 1452, 16130, 201, 198, 1452, 35, 20074, 796, 5224, 1008, 13, 1452, 38576, 5272, 907, 201, 198, 1452, 31633, 1173, 796, 5224, 1008, 13, 1452, 37117, 201, 198, 1452, 21604, 796, 5224, 1008, 13, 1452, 21604, 1756, 201, 198, 1452, 51, 444, 796, 5224, 1008, 13, 1452, 51, 444, 201, 198, 282, 1462, 16130, 796, 5224, 1008, 13, 282, 1462, 16130, 201, 198, 282, 1462, 35, 20074, 796, 5224, 1008, 13, 282, 1462, 38576, 5272, 907, 201, 198, 282, 1462, 31633, 1173, 796, 5224, 1008, 13, 282, 1462, 37117, 201, 198, 282, 1462, 21604, 796, 5224, 1008, 13, 282, 1462, 21604, 1756, 201, 198, 282, 1462, 51, 444, 796, 5224, 1008, 13, 282, 1462, 51, 444, 201, 198, 82, 404, 16130, 796, 5224, 1008, 13, 82, 404, 16130, 201, 198, 82, 404, 35, 20074, 796, 5224, 1008, 13, 82, 404, 38576, 5272, 907, 201, 198, 82, 404, 31633, 1173, 796, 5224, 1008, 13, 82, 404, 37117, 201, 198, 82, 404, 21604, 796, 5224, 1008, 13, 82, 404, 21604, 1756, 201, 198, 82, 404, 51, 444, 796, 5224, 1008, 13, 82, 404, 51, 444, 201, 198, 55, 13, 13564, 50, 404, 7, 82, 404, 16130, 11, 264, 404, 35, 20074, 11, 264, 404, 31633, 1173, 11, 264, 404, 21604, 11, 264, 404, 51, 444, 8, 201, 198, 55, 13, 13564, 2348, 1462, 7, 282, 1462, 16130, 11, 435, 1462, 35, 20074, 11, 435, 1462, 31633, 1173, 11, 435, 1462, 21604, 11, 435, 1462, 51, 444, 8, 201, 198, 55, 13, 13564, 24893, 273, 7, 1452, 16130, 11, 3478, 35, 20074, 11, 3478, 31633, 1173, 11, 3478, 21604, 11, 3478, 51, 444, 8, 201, 198, 55, 13, 13564, 33, 562, 7, 12093, 16130, 11, 1615, 35, 20074, 11, 1615, 31633, 1173, 11, 1615, 21604, 11, 1615, 51, 444, 8, 201, 198, 55, 13, 437, 55, 5805, 8979, 3419 ]
2.509836
610
#!/usr/bin/env python3 import gzip import io import os import time import git from broker.config import env, logging from broker.libs.ipfs import decrypt_using_gpg from broker.utils import cd, is_gzip_file_empty, log, path_leaf, run # from subprocess import CalledProcessError def initialize_check(path): """.git/ folder should exist within the target folder""" with cd(path): if not is_initialized(path): try: run(["git", "init", "--initial-branch=master"]) add_all() except Exception as error: logging.error(f"E: {error}") return False return True def diff_patch(path, source_code_hash, index, target_path): """ * "git diff HEAD" for detecting all the changes: * Shows all the changes between the working directory and HEAD (which includes changes in the index). * This shows all the changes since the last commit, whether or not they have been staged for commit * or not. """ sep = "*" # separator in between the string infos is_file_empty = False with cd(path): log(f"==> Navigate to {path}") """TODO if not is_initialized(path): upload everything, changed files! """ repo = git.Repo(".", search_parent_directories=True) try: repo.git.config("core.fileMode", "false") # git config core.fileMode false # first ignore deleted files not to be added into git run(["bash", f"{env.EBLOCPATH}/broker/bash_scripts/git_ignore_deleted.sh"]) head_commit_id = repo.rev_parse("HEAD") patch_name = f"patch{sep}{head_commit_id}{sep}{source_code_hash}{sep}{index}.diff" except: return False patch_upload_name = f"{patch_name}.gz" # file to be uploaded as zip patch_file = f"{target_path}/{patch_upload_name}" logging.info(f"patch_path={patch_upload_name}") try: repo.git.add(A=True) diff_and_gzip(patch_file) except: return False time.sleep(0.25) if is_gzip_file_empty(patch_file): log("==> Created patch file is empty, nothing to upload") os.remove(patch_file) is_file_empty = True return patch_upload_name, patch_file, is_file_empty def apply_patch(git_folder, patch_file, is_gpg=False): """Apply git patch. https://stackoverflow.com/a/15375869/2402577 """ if is_gpg: decrypt_using_gpg(patch_file) with cd(git_folder): base_name = path_leaf(patch_file) log(f"==> {base_name}") # folder_name = base_name_split[2] try: # base_name_split = base_name.split("_") # git_hash = base_name_split[1] # run(["git", "checkout", git_hash]) # run(["git", "reset", "--hard"]) # run(["git", "clean", "-f"]) # echo "\n" >> patch_file.txt seems like fixing it with open(patch_file, "a") as myfile: myfile.write("\n") # output = repo.git.apply("--reject", "--whitespace=fix", patch_file) run(["git", "apply", "--reject", "--whitespace=fix", "--verbose", patch_file]) return True except: return False def generate_git_repo(folders): """Create git repositories in the given folders if it does not exist.""" if isinstance(folders, list): for folder in folders: _generate_git_repo(folder) else: # if string given "/home/user/folder" retreive string instead of "/" with for above _generate_git_repo(folders) # def extract_gzip(): # pass
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 308, 13344, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 17606, 198, 198, 6738, 20426, 13, 11250, 1330, 17365, 11, 18931, 198, 6738, 20426, 13, 8019, 82, 13, 541, 9501, 1330, 42797, 62, 3500, 62, 70, 6024, 198, 6738, 20426, 13, 26791, 1330, 22927, 11, 318, 62, 70, 13344, 62, 7753, 62, 28920, 11, 2604, 11, 3108, 62, 33201, 11, 1057, 198, 198, 2, 422, 850, 14681, 1330, 34099, 18709, 12331, 628, 198, 4299, 41216, 62, 9122, 7, 6978, 2599, 198, 220, 220, 220, 13538, 1911, 18300, 14, 9483, 815, 2152, 1626, 262, 2496, 9483, 37811, 198, 220, 220, 220, 351, 22927, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 62, 17532, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1057, 7, 14692, 18300, 1600, 366, 15003, 1600, 366, 438, 36733, 12, 1671, 3702, 28, 9866, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 751, 62, 439, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 35528, 355, 4049, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 18224, 7, 69, 1, 36, 25, 1391, 18224, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 628, 628, 198, 198, 4299, 814, 62, 17147, 7, 6978, 11, 2723, 62, 8189, 62, 17831, 11, 6376, 11, 2496, 62, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1635, 366, 18300, 814, 39837, 1, 329, 31521, 477, 262, 2458, 25, 198, 220, 220, 220, 1635, 25156, 477, 262, 2458, 1022, 262, 1762, 8619, 290, 39837, 357, 4758, 3407, 2458, 287, 262, 6376, 737, 198, 220, 220, 220, 1635, 770, 2523, 477, 262, 2458, 1201, 262, 938, 4589, 11, 1771, 393, 407, 484, 423, 587, 23393, 329, 4589, 198, 220, 220, 220, 1635, 393, 407, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 41767, 796, 366, 9, 1, 220, 1303, 2880, 1352, 287, 1022, 262, 4731, 1167, 418, 198, 220, 220, 220, 318, 62, 7753, 62, 28920, 796, 10352, 198, 220, 220, 220, 351, 22927, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 7, 69, 1, 855, 29, 13244, 10055, 284, 1391, 6978, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 51, 3727, 46, 198, 220, 220, 220, 220, 220, 220, 220, 611, 407, 318, 62, 17532, 7, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 9516, 2279, 11, 3421, 3696, 0, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 29924, 796, 17606, 13, 6207, 78, 7203, 33283, 2989, 62, 8000, 62, 12942, 1749, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29924, 13, 18300, 13, 11250, 7203, 7295, 13, 7753, 19076, 1600, 366, 9562, 4943, 220, 1303, 17606, 4566, 4755, 13, 7753, 19076, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 717, 8856, 13140, 3696, 407, 284, 307, 2087, 656, 17606, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1057, 7, 14692, 41757, 1600, 277, 1, 90, 24330, 13, 36, 9148, 4503, 34219, 92, 14, 7957, 6122, 14, 41757, 62, 46521, 14, 18300, 62, 46430, 62, 2934, 33342, 13, 1477, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1182, 62, 41509, 62, 312, 796, 29924, 13, 18218, 62, 29572, 7203, 37682, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8529, 62, 3672, 796, 277, 1, 17147, 90, 325, 79, 18477, 2256, 62, 41509, 62, 312, 18477, 325, 79, 18477, 10459, 62, 8189, 62, 17831, 18477, 325, 79, 18477, 9630, 27422, 26069, 1, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 220, 220, 220, 220, 8529, 62, 25850, 62, 3672, 796, 277, 1, 90, 17147, 62, 3672, 27422, 34586, 1, 220, 1303, 2393, 284, 307, 19144, 355, 19974, 198, 220, 220, 220, 220, 220, 220, 220, 8529, 62, 7753, 796, 277, 1, 90, 16793, 62, 6978, 92, 14, 90, 17147, 62, 25850, 62, 3672, 36786, 198, 220, 220, 220, 220, 220, 220, 220, 18931, 13, 10951, 7, 69, 1, 17147, 62, 6978, 34758, 17147, 62, 25850, 62, 3672, 92, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29924, 13, 18300, 13, 2860, 7, 32, 28, 17821, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 814, 62, 392, 62, 70, 13344, 7, 17147, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 220, 220, 220, 640, 13, 42832, 7, 15, 13, 1495, 8, 198, 220, 220, 220, 611, 318, 62, 70, 13344, 62, 7753, 62, 28920, 7, 17147, 62, 7753, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 7203, 855, 29, 15622, 8529, 2393, 318, 6565, 11, 2147, 284, 9516, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 28956, 7, 17147, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 318, 62, 7753, 62, 28920, 796, 6407, 628, 220, 220, 220, 1441, 8529, 62, 25850, 62, 3672, 11, 8529, 62, 7753, 11, 318, 62, 7753, 62, 28920, 628, 628, 198, 4299, 4174, 62, 17147, 7, 18300, 62, 43551, 11, 8529, 62, 7753, 11, 318, 62, 70, 6024, 28, 25101, 2599, 198, 220, 220, 220, 37227, 44836, 17606, 8529, 13, 628, 220, 220, 220, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 21395, 38569, 3388, 14, 16102, 1495, 3324, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, 62, 70, 6024, 25, 198, 220, 220, 220, 220, 220, 220, 220, 42797, 62, 3500, 62, 70, 6024, 7, 17147, 62, 7753, 8, 628, 220, 220, 220, 351, 22927, 7, 18300, 62, 43551, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2779, 62, 3672, 796, 3108, 62, 33201, 7, 17147, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2604, 7, 69, 1, 855, 29, 1391, 8692, 62, 3672, 92, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 9483, 62, 3672, 796, 2779, 62, 3672, 62, 35312, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2779, 62, 3672, 62, 35312, 796, 2779, 62, 3672, 13, 35312, 7203, 62, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17606, 62, 17831, 796, 2779, 62, 3672, 62, 35312, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1057, 7, 14692, 18300, 1600, 366, 9122, 448, 1600, 17606, 62, 17831, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1057, 7, 14692, 18300, 1600, 366, 42503, 1600, 366, 438, 10424, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1057, 7, 14692, 18300, 1600, 366, 27773, 1600, 27444, 69, 8973, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 9809, 37082, 77, 1, 9609, 8529, 62, 7753, 13, 14116, 2331, 588, 18682, 340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 351, 1280, 7, 17147, 62, 7753, 11, 366, 64, 4943, 355, 616, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 616, 7753, 13, 13564, 7203, 59, 77, 4943, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5072, 796, 29924, 13, 18300, 13, 39014, 7203, 438, 260, 752, 1600, 366, 438, 1929, 2737, 10223, 28, 13049, 1600, 8529, 62, 7753, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1057, 7, 14692, 18300, 1600, 366, 39014, 1600, 366, 438, 260, 752, 1600, 366, 438, 1929, 2737, 10223, 28, 13049, 1600, 366, 438, 19011, 577, 1600, 8529, 62, 7753, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 6407, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 10352, 628, 628, 198, 4299, 7716, 62, 18300, 62, 260, 7501, 7, 11379, 364, 2599, 198, 220, 220, 220, 37227, 16447, 17606, 38072, 287, 262, 1813, 24512, 611, 340, 857, 407, 2152, 526, 15931, 198, 220, 220, 220, 611, 318, 39098, 7, 11379, 364, 11, 1351, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, 9483, 287, 24512, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 8612, 378, 62, 18300, 62, 260, 7501, 7, 43551, 8, 198, 220, 220, 220, 2073, 25, 220, 1303, 611, 4731, 1813, 12813, 11195, 14, 7220, 14, 43551, 1, 1005, 260, 425, 4731, 2427, 286, 12813, 1, 351, 329, 2029, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 8612, 378, 62, 18300, 62, 260, 7501, 7, 11379, 364, 8, 628, 198, 2, 825, 7925, 62, 70, 13344, 33529, 198, 2, 220, 220, 220, 220, 1208, 198 ]
2.26055
1,635
# -*- coding: utf-8 -*- """Tag Matching Module This module mirrors the Tag Matching API. It allows the user to search for tag id matches. https://doc.cognitedata.com/0.5/#Cognite-API-Tag-Matching """ import cognite._utils as _utils import cognite.config as config from cognite.v05.dto import TagMatchingResponse def tag_matching(tag_ids, fuzzy_threshold=0, platform=None, **kwargs): """Returns a TagMatchingObject containing a list of matched tags for the given query. This method takes an arbitrary string as argument and performs fuzzy matching with a user defined threshold toward tag ids in the system. Args: tag_ids (list): The tag_ids to retrieve matches for. fuzzy_threshold (int): The threshold to use when searching for matches. A fuzzy threshold of 0 means you only want to accept perfect matches. Must be >= 0. platform (str): The platform to search on. Keyword Args: api_key (str): Your api-key. project (str): Project name. Returns: v05.dto.TagMatchingResponse: A data object containing the requested data with several getter methods with different output formats. """ api_key, project = config.get_config_variables(kwargs.get("api_key"), kwargs.get("project")) url = config.get_base_url(api_version=0.5) + "/projects/{}/tagmatching".format(project) body = {"tagIds": tag_ids, "metadata": {"fuzzyThreshold": fuzzy_threshold, "platform": platform}} headers = {"api-key": api_key, "content-type": "*/*", "accept": "application/json"} res = _utils.post_request(url=url, body=body, headers=headers, cookies=config.get_cookies()) return TagMatchingResponse(res.json())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 24835, 13225, 278, 19937, 198, 198, 1212, 8265, 22353, 262, 17467, 13225, 278, 7824, 13, 632, 3578, 262, 2836, 284, 2989, 329, 7621, 4686, 7466, 13, 198, 198, 5450, 1378, 15390, 13, 66, 2360, 863, 1045, 13, 785, 14, 15, 13, 20, 31113, 34, 2360, 578, 12, 17614, 12, 24835, 12, 44, 19775, 198, 37811, 198, 11748, 8866, 578, 13557, 26791, 355, 4808, 26791, 198, 11748, 8866, 578, 13, 11250, 355, 4566, 198, 6738, 8866, 578, 13, 85, 2713, 13, 67, 1462, 1330, 17467, 44, 19775, 31077, 628, 198, 4299, 7621, 62, 15699, 278, 7, 12985, 62, 2340, 11, 34669, 62, 400, 10126, 28, 15, 11, 3859, 28, 14202, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 35561, 257, 17467, 44, 19775, 10267, 7268, 257, 1351, 286, 14451, 15940, 329, 262, 1813, 12405, 13, 628, 220, 220, 220, 770, 2446, 2753, 281, 14977, 4731, 355, 4578, 290, 17706, 34669, 12336, 351, 257, 2836, 5447, 11387, 198, 220, 220, 220, 3812, 7621, 220, 2340, 287, 262, 1080, 13, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7621, 62, 2340, 357, 4868, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 383, 7621, 62, 2340, 284, 19818, 7466, 329, 13, 628, 220, 220, 220, 220, 220, 220, 220, 34669, 62, 400, 10126, 357, 600, 2599, 220, 383, 11387, 284, 779, 618, 10342, 329, 7466, 13, 317, 34669, 11387, 286, 657, 1724, 345, 691, 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, 765, 284, 2453, 2818, 7466, 13, 12039, 307, 18189, 657, 13, 628, 220, 220, 220, 220, 220, 220, 220, 3859, 357, 2536, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 383, 3859, 284, 2989, 319, 13, 628, 220, 220, 220, 7383, 4775, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 40391, 62, 2539, 357, 2536, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3406, 40391, 12, 2539, 13, 628, 220, 220, 220, 220, 220, 220, 220, 1628, 357, 2536, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4935, 1438, 13, 628, 220, 220, 220, 16409, 25, 198, 220, 220, 220, 220, 220, 220, 220, 410, 2713, 13, 67, 1462, 13, 24835, 44, 19775, 31077, 25, 317, 1366, 2134, 7268, 262, 9167, 1366, 351, 1811, 651, 353, 5050, 351, 1180, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 17519, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40391, 62, 2539, 11, 1628, 796, 4566, 13, 1136, 62, 11250, 62, 25641, 2977, 7, 46265, 22046, 13, 1136, 7203, 15042, 62, 2539, 12340, 479, 86, 22046, 13, 1136, 7203, 16302, 48774, 198, 220, 220, 220, 19016, 796, 4566, 13, 1136, 62, 8692, 62, 6371, 7, 15042, 62, 9641, 28, 15, 13, 20, 8, 1343, 12813, 42068, 14, 90, 92, 14, 12985, 15699, 278, 1911, 18982, 7, 16302, 8, 198, 220, 220, 220, 1767, 796, 19779, 12985, 7390, 82, 1298, 7621, 62, 2340, 11, 366, 38993, 1298, 19779, 69, 4715, 88, 817, 10126, 1298, 34669, 62, 400, 10126, 11, 366, 24254, 1298, 3859, 11709, 198, 220, 220, 220, 24697, 796, 19779, 15042, 12, 2539, 1298, 40391, 62, 2539, 11, 366, 11299, 12, 4906, 1298, 366, 9, 15211, 1600, 366, 13635, 1298, 366, 31438, 14, 17752, 20662, 198, 220, 220, 220, 581, 796, 4808, 26791, 13, 7353, 62, 25927, 7, 6371, 28, 6371, 11, 1767, 28, 2618, 11, 24697, 28, 50145, 11, 14746, 28, 11250, 13, 1136, 62, 27916, 444, 28955, 198, 220, 220, 220, 1441, 17467, 44, 19775, 31077, 7, 411, 13, 17752, 28955, 198 ]
2.802862
629
import StringIO import json import logging import random import urllib import urllib2 from xml.dom import minidom # for sending images from PIL import Image import multipart # standard app engine imports from google.appengine.api import urlfetch from google.appengine.ext import ndb import webapp2 TOKEN = '119152358:AAFvnvYU_5sxfTInk0LNQ55a_U5FMY3pyUo' BASE_URL = 'https://api.telegram.org/bot' + TOKEN + '/' # ================================ # ================================ # ================================ app = webapp2.WSGIApplication([ ('/me', MeHandler), ('/updates', GetUpdatesHandler), ('/set_webhook', SetWebhookHandler), ('/webhook', WebhookHandler), ], debug=True)
[ 11748, 10903, 9399, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 198, 6738, 35555, 13, 3438, 1330, 949, 312, 296, 198, 198, 2, 329, 7216, 4263, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 18540, 433, 198, 198, 2, 3210, 598, 3113, 17944, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 2956, 1652, 7569, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 11748, 3992, 1324, 17, 198, 198, 10468, 43959, 796, 705, 16315, 1314, 1954, 3365, 25, 38540, 85, 48005, 56, 52, 62, 20, 82, 26152, 51, 818, 74, 15, 43, 45, 48, 2816, 64, 62, 52, 20, 23264, 56, 18, 9078, 52, 78, 6, 198, 198, 33, 11159, 62, 21886, 796, 705, 5450, 1378, 15042, 13, 660, 30536, 13, 2398, 14, 13645, 6, 1343, 5390, 43959, 1343, 31051, 6, 628, 198, 2, 36658, 25609, 18604, 628, 198, 2, 36658, 25609, 18604, 628, 198, 2, 36658, 25609, 18604, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220, 220, 220, 220, 628, 198, 1324, 796, 3992, 1324, 17, 13, 19416, 38, 3539, 381, 10142, 26933, 198, 220, 220, 220, 19203, 14, 1326, 3256, 2185, 25060, 828, 198, 220, 220, 220, 19203, 14, 929, 19581, 3256, 3497, 4933, 19581, 25060, 828, 198, 220, 220, 220, 19203, 14, 2617, 62, 12384, 25480, 3256, 5345, 13908, 25480, 25060, 828, 198, 220, 220, 220, 19203, 14, 12384, 25480, 3256, 5313, 25480, 25060, 828, 198, 4357, 14257, 28, 17821, 8, 198 ]
2.805344
262
#Faça um Programa que leia um vetor de 5 números inteiros e mostre-os. lista=[] for i in range(1, 6): lista.append(int(input('Digite um número: '))) print(lista)
[ 2, 50110, 50041, 23781, 6118, 64, 8358, 443, 544, 23781, 1569, 13165, 390, 642, 299, 21356, 647, 418, 493, 20295, 4951, 304, 749, 260, 12, 418, 13, 198, 198, 4868, 64, 28, 21737, 198, 1640, 1312, 287, 2837, 7, 16, 11, 718, 2599, 198, 220, 220, 220, 1351, 64, 13, 33295, 7, 600, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 25, 705, 22305, 198, 4798, 7, 4868, 64, 8, 198 ]
2.287671
73
from django.utils.text import slugify from soil import DownloadBase from corehq.apps.hqmedia.tasks import build_application_zip from corehq.util.view_utils import absolute_reverse, json_error from corehq.apps.domain.models import Domain from dimagi.utils.web import json_response from corehq.apps.domain.decorators import ( login_or_digest_or_basic, ) from corehq.apps.app_manager.dbaccessors import get_app @json_error @login_or_digest_or_basic() @json_error
[ 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198, 198, 6738, 9260, 1330, 10472, 14881, 198, 6738, 4755, 71, 80, 13, 18211, 13, 71, 80, 11431, 13, 83, 6791, 1330, 1382, 62, 31438, 62, 13344, 198, 6738, 4755, 71, 80, 13, 22602, 13, 1177, 62, 26791, 1330, 4112, 62, 50188, 11, 33918, 62, 18224, 198, 6738, 4755, 71, 80, 13, 18211, 13, 27830, 13, 27530, 1330, 20021, 198, 6738, 5391, 18013, 13, 26791, 13, 12384, 1330, 33918, 62, 26209, 198, 6738, 4755, 71, 80, 13, 18211, 13, 27830, 13, 12501, 273, 2024, 1330, 357, 198, 220, 220, 220, 17594, 62, 273, 62, 12894, 395, 62, 273, 62, 35487, 11, 198, 8, 198, 6738, 4755, 71, 80, 13, 18211, 13, 1324, 62, 37153, 13, 9945, 15526, 669, 1330, 651, 62, 1324, 628, 198, 31, 17752, 62, 18224, 198, 31, 38235, 62, 273, 62, 12894, 395, 62, 273, 62, 35487, 3419, 628, 198, 31, 17752, 62, 18224, 198 ]
2.968354
158
import re import datetime from ingestion import datasource as ds # Provides access to coinmarketcap.com data, using the API when available, # or web scraping when there is no public API class CoinList(ds.DataSource): """Used to get a list of all the coins on coinmarketcap""" class Ticker(CoinList): """Used to get current price/marketcap/volume data for all coins""" class CoinLinks(ds.DataSource): """Used to get social media links for a coin (subreddit, twitter, btctalk)""" class HistoricalPrices(ds.DataSource): """Used to get historical price data for a coin This requires scraping the site, because there is no API for this data This is only used for the initial data import, and after that we can just periodically get the ticker """
[ 11748, 302, 198, 11748, 4818, 8079, 198, 6738, 38382, 1330, 19395, 1668, 355, 288, 82, 628, 198, 2, 47081, 1895, 284, 10752, 10728, 11128, 13, 785, 1366, 11, 1262, 262, 7824, 618, 1695, 11, 198, 2, 393, 3992, 46743, 618, 612, 318, 645, 1171, 7824, 628, 198, 4871, 16312, 8053, 7, 9310, 13, 6601, 7416, 2599, 198, 220, 220, 220, 37227, 38052, 284, 651, 257, 1351, 286, 477, 262, 10796, 319, 10752, 10728, 11128, 37811, 628, 198, 4871, 309, 15799, 7, 24387, 8053, 2599, 198, 220, 220, 220, 37227, 38052, 284, 651, 1459, 2756, 14, 10728, 11128, 14, 29048, 1366, 329, 477, 10796, 37811, 628, 198, 4871, 16312, 31815, 7, 9310, 13, 6601, 7416, 2599, 198, 220, 220, 220, 37227, 38052, 284, 651, 1919, 2056, 6117, 329, 257, 10752, 357, 7266, 10748, 11, 17044, 11, 275, 83, 310, 971, 8, 37811, 628, 198, 4871, 23121, 6836, 1063, 7, 9310, 13, 6601, 7416, 2599, 198, 220, 220, 220, 37227, 38052, 284, 651, 6754, 2756, 1366, 329, 257, 10752, 198, 220, 220, 220, 770, 4433, 46743, 262, 2524, 11, 780, 612, 318, 645, 7824, 329, 428, 1366, 198, 220, 220, 220, 770, 318, 691, 973, 329, 262, 4238, 1366, 1330, 11, 290, 706, 326, 356, 460, 655, 26034, 651, 262, 4378, 263, 198, 220, 220, 220, 37227, 198 ]
3.611111
216
#create file myaperture.dat needed for source optimization f = open("myaperture.dat",'w') f.write(" 50.0 -0.002 0.002 -0.002 0.002") f.close() print("File written to disk: myaperture.dat")
[ 2, 17953, 2393, 616, 499, 861, 495, 13, 19608, 2622, 329, 2723, 23989, 198, 69, 796, 1280, 7203, 1820, 499, 861, 495, 13, 19608, 1600, 6, 86, 11537, 198, 69, 13, 13564, 7203, 2026, 13, 15, 220, 220, 220, 220, 220, 532, 15, 13, 21601, 220, 220, 220, 657, 13, 21601, 220, 532, 15, 13, 21601, 220, 657, 13, 21601, 4943, 198, 69, 13, 19836, 3419, 198, 4798, 7203, 8979, 3194, 284, 11898, 25, 616, 499, 861, 495, 13, 19608, 4943, 198 ]
2.426829
82
print(">>>>>> import schemas_invitation.py > Invitation ...") from typing import List, Optional, Any import datetime from pydantic import BaseModel, EmailStr # from uuid import UUID from .schemas_choices import ItemType, InvitationStatus, InviteeType, InvitationStatusAction from .schemas_auths import AuthsInfosBasics from .schemas_user import User, UserInDBBaseLight # print("=== SCH-schemas_invitation > InvitationBase : ", InvitationBase) # class InvitationList(Invitation): # pass
[ 4798, 7203, 16471, 4211, 1330, 3897, 5356, 62, 16340, 3780, 13, 9078, 1875, 220, 10001, 3780, 35713, 8, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4377, 198, 11748, 4818, 8079, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 9570, 13290, 198, 2, 422, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 764, 1416, 4411, 292, 62, 6679, 1063, 1330, 9097, 6030, 11, 10001, 3780, 19580, 11, 10001, 578, 68, 6030, 11, 10001, 3780, 19580, 12502, 198, 6738, 764, 1416, 4411, 292, 62, 18439, 82, 1330, 26828, 82, 18943, 418, 15522, 873, 198, 198, 6738, 764, 1416, 4411, 292, 62, 7220, 1330, 11787, 11, 11787, 818, 11012, 14881, 15047, 628, 628, 198, 198, 2, 3601, 7203, 18604, 22374, 12, 1416, 4411, 292, 62, 16340, 3780, 1875, 10001, 3780, 14881, 1058, 33172, 10001, 3780, 14881, 8, 628, 628, 198, 198, 2, 1398, 10001, 3780, 8053, 7, 19904, 3780, 2599, 198, 220, 1303, 1208, 628 ]
3.245161
155
import pytest from signal_ocean import VesselClassFilter from .builders import create_vessel_class @pytest.mark.parametrize( 'name_like', [ 'matching name', 'matching', 'name', 'mat', 'me', 'ing na', 'MATCHING NAME', 'MATCHING', 'NAME', 'MAT', 'ME', 'ING NA', 'mAtchiNG NamE', 'Matching', 'nAME', 'MaT', 'mE', 'INg nA', ' ' ] )
[ 11748, 12972, 9288, 198, 198, 6738, 6737, 62, 78, 5829, 1330, 44734, 9487, 22417, 198, 6738, 764, 50034, 1330, 2251, 62, 1158, 741, 62, 4871, 628, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 705, 3672, 62, 2339, 3256, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 705, 15699, 278, 1438, 3256, 705, 15699, 278, 3256, 705, 3672, 3256, 705, 6759, 3256, 705, 1326, 3256, 705, 278, 12385, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 44, 11417, 2751, 36751, 3256, 705, 44, 11417, 2751, 3256, 705, 20608, 3256, 705, 41636, 3256, 705, 11682, 3256, 705, 2751, 11746, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 76, 2953, 11072, 10503, 17871, 36, 3256, 705, 44, 19775, 3256, 705, 77, 10067, 3256, 705, 21467, 51, 3256, 705, 76, 36, 3256, 705, 1268, 70, 299, 32, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 705, 198, 220, 220, 220, 2361, 198, 8, 198 ]
2.19883
171
# from transformers import pipeline # generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') # generator("EleutherAI has", do_sample=True, min_length=50) # [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}] from transformers import GPT2Tokenizer, GPT2Model model_name = "microsoft/CodeGPT-small-java-adaptedGPT2" # model_name = "./CodeGPT-small-java-adaptedGPT2" tokenizer = GPT2Tokenizer.from_pretrained(model_name) # CodeGPT-small-java-adaptedGPT2 model = GPT2Model.from_pretrained(model_name) # tokenizer.save_pretrained(f"./{model_name}") # model.save_pretrained(f"./{model_name}") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') print(model) output = model(**encoded_input, output_hidden_states=True) print(len(output["hidden_states"])) print(output["hidden_states"][0].shape)
[ 2, 422, 6121, 364, 1330, 11523, 198, 2, 17301, 796, 11523, 10786, 5239, 12, 20158, 3256, 2746, 11639, 28827, 12866, 20185, 14, 70, 457, 12, 710, 78, 12, 17, 13, 22, 33, 11537, 198, 2, 17301, 7203, 28827, 12866, 20185, 468, 1600, 466, 62, 39873, 28, 17821, 11, 949, 62, 13664, 28, 1120, 8, 198, 198, 2, 685, 90, 6, 27568, 62, 5239, 10354, 705, 28827, 12866, 20185, 468, 925, 257, 7901, 284, 2251, 649, 3788, 10392, 329, 1123, 286, 663, 1688, 7534, 290, 468, 6, 92, 60, 198, 198, 6738, 6121, 364, 1330, 402, 11571, 17, 30642, 7509, 11, 402, 11571, 17, 17633, 198, 19849, 62, 3672, 796, 366, 40485, 14, 10669, 38, 11571, 12, 17470, 12, 12355, 12, 42552, 276, 38, 11571, 17, 1, 198, 2, 2746, 62, 3672, 796, 366, 19571, 10669, 38, 11571, 12, 17470, 12, 12355, 12, 42552, 276, 38, 11571, 17, 1, 198, 30001, 7509, 796, 402, 11571, 17, 30642, 7509, 13, 6738, 62, 5310, 13363, 7, 19849, 62, 3672, 8, 1303, 6127, 38, 11571, 12, 17470, 12, 12355, 12, 42552, 276, 38, 11571, 17, 198, 19849, 796, 402, 11571, 17, 17633, 13, 6738, 62, 5310, 13363, 7, 19849, 62, 3672, 8, 198, 198, 2, 11241, 7509, 13, 21928, 62, 5310, 13363, 7, 69, 1911, 14, 90, 19849, 62, 3672, 92, 4943, 198, 2, 2746, 13, 21928, 62, 5310, 13363, 7, 69, 1911, 14, 90, 19849, 62, 3672, 92, 4943, 628, 198, 5239, 796, 366, 3041, 5372, 502, 416, 597, 2420, 345, 1549, 588, 526, 198, 12685, 9043, 62, 15414, 796, 11241, 7509, 7, 5239, 11, 1441, 62, 83, 641, 669, 11639, 457, 11537, 198, 4798, 7, 19849, 8, 198, 22915, 796, 2746, 7, 1174, 12685, 9043, 62, 15414, 11, 5072, 62, 30342, 62, 27219, 28, 17821, 8, 198, 4798, 7, 11925, 7, 22915, 14692, 30342, 62, 27219, 8973, 4008, 198, 4798, 7, 22915, 14692, 30342, 62, 27219, 1, 7131, 15, 4083, 43358, 8 ]
2.903125
320
import gspread from oauth2client.service_account import ServiceAccountCredentials from datetime import datetime from pprint import pprint import pytz import locale import sys import process sys.path.insert(0,'./process.py') #set locale locale.setlocale(locale.LC_TIME, 'id_ID.UTF-8') #Set up credentials scope = ["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive"] creds = ServiceAccountCredentials.from_json_keyfile_name("creds.json", scope) client = gspread.authorize(creds) #Open gsheet sa = client.open("Copy of Absensi CBP 2022") now = datetime.now() localtz = pytz.timezone('Asia/Jakarta') date_jkt = int(localtz.localize(now).strftime("%d")) month_jkt = localtz.localize(now).strftime("%B") wks = sa.worksheet(month_jkt) #Get all data values=wks.get_all_values() absen=values[2:] hasil = process.yang_masuk(absen)
[ 11748, 308, 43639, 198, 6738, 267, 18439, 17, 16366, 13, 15271, 62, 23317, 1330, 4809, 30116, 34, 445, 14817, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 12972, 22877, 198, 11748, 36693, 198, 11748, 25064, 198, 11748, 1429, 198, 17597, 13, 6978, 13, 28463, 7, 15, 4032, 19571, 14681, 13, 9078, 11537, 198, 198, 2, 2617, 36693, 198, 17946, 1000, 13, 2617, 17946, 1000, 7, 17946, 1000, 13, 5639, 62, 34694, 11, 705, 312, 62, 2389, 13, 48504, 12, 23, 11537, 198, 198, 2, 7248, 510, 18031, 198, 29982, 796, 14631, 5450, 1378, 43639, 42011, 13, 13297, 13, 785, 14, 12363, 82, 1600, 6, 5450, 1378, 2503, 13, 13297, 499, 271, 13, 785, 14, 18439, 14, 43639, 42011, 40264, 5450, 1378, 2503, 13, 13297, 499, 271, 13, 785, 14, 18439, 14, 19472, 13, 7753, 2430, 5450, 1378, 2503, 13, 13297, 499, 271, 13, 785, 14, 18439, 14, 19472, 8973, 198, 66, 445, 82, 796, 4809, 30116, 34, 445, 14817, 13, 6738, 62, 17752, 62, 2539, 7753, 62, 3672, 7203, 66, 445, 82, 13, 17752, 1600, 8354, 8, 198, 16366, 796, 308, 43639, 13, 9800, 1096, 7, 66, 445, 82, 8, 198, 198, 2, 11505, 308, 21760, 198, 11400, 796, 5456, 13, 9654, 7203, 29881, 286, 13051, 641, 72, 10078, 47, 33160, 4943, 198, 2197, 796, 4818, 8079, 13, 2197, 3419, 198, 17946, 2501, 89, 796, 12972, 22877, 13, 2435, 11340, 10786, 38555, 14, 41, 461, 34202, 11537, 198, 4475, 62, 73, 21841, 796, 493, 7, 17946, 2501, 89, 13, 12001, 1096, 7, 2197, 737, 2536, 31387, 7203, 4, 67, 48774, 198, 8424, 62, 73, 21841, 796, 1957, 22877, 13, 12001, 1096, 7, 2197, 737, 2536, 31387, 7203, 4, 33, 4943, 198, 86, 591, 796, 473, 13, 5225, 25473, 7, 8424, 62, 73, 21841, 8, 198, 198, 2, 3855, 477, 1366, 198, 27160, 28, 86, 591, 13, 1136, 62, 439, 62, 27160, 3419, 198, 397, 6248, 28, 27160, 58, 17, 47715, 198, 198, 10134, 346, 796, 1429, 13, 17859, 62, 5356, 2724, 7, 397, 6248, 8 ]
2.758017
343
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved. """ Tests for half-precision syntax quirks. """ import dace import math import numpy as np from dace.transformation.dataflow import MapFusion, Vectorization from dace.transformation.optimizer import Optimizer N = dace.symbol('N') def _test_half(veclen): """ Tests a set of elementwise operations on a vector half type. """ @dace.program A = np.random.rand(24).astype(np.float16) B = np.random.rand(24).astype(np.float16) sdfg = halftest.to_sdfg() sdfg.apply_strict_transformations() sdfg.apply_gpu_transformations() # Apply vectorization on each map and count applied applied = 0 for xform in Optimizer(sdfg).get_pattern_matches(patterns=[Vectorization]): xform.vector_len = veclen xform.postamble = False xform.apply(sdfg) applied += 1 assert applied == 2 out = sdfg(A=A, B=B, N=24) assert np.allclose(out, A * B + A) def test_half4(): """ Tests a set of elementwise operations on half with vector length 4. """ _test_half(4) def test_half8(): """ Tests a set of elementwise operations on half with vector length 8. """ _test_half(8) def test_exp_vec(): """ Tests an exp operator on a vector half type. """ @dace.program A = np.random.rand(24).astype(np.float16) sdfg = halftest.to_sdfg() sdfg.apply_gpu_transformations() assert sdfg.apply_transformations(Vectorization, dict(vector_len=8)) == 1 out = sdfg(A=A, N=24) assert np.allclose(out, np.exp(A)) def test_relu_vec(): """ Tests a ReLU operator on a vector half type. """ @dace.program A = np.random.rand(24).astype(np.float16) sdfg = halftest.to_sdfg() sdfg.apply_gpu_transformations() assert sdfg.apply_transformations(Vectorization, dict(vector_len=8)) == 1 out = sdfg(A=A, N=24) assert np.allclose(out, np.maximum(A, 0)) def test_dropout_vec(): """ Tests a dropout operator on a vector half type. """ @dace.program A = np.random.rand(24).astype(np.float16) mask = np.random.randint(0, 2, size=[24]).astype(np.float16) sdfg: dace.SDFG = halftest.to_sdfg() sdfg.apply_gpu_transformations() assert sdfg.apply_transformations(Vectorization, dict(vector_len=8)) == 1 out = sdfg(A=A, mask=mask, N=24) assert np.allclose(out, A * mask) def test_gelu_vec(): """ Tests a GELU operator on a vector half type. """ s2pi = math.sqrt(2.0 / math.pi) @dace.program A = np.random.rand(24).astype(np.float16) sdfg = halftest.to_sdfg() sdfg.apply_gpu_transformations() assert sdfg.apply_transformations(Vectorization, dict(vector_len=4)) == 1 out = sdfg(A=A, N=24) expected = 0.5 * A * ( 1 + np.tanh(math.sqrt(2.0 / math.pi) * (A + 0.044715 * (A**3)))) assert np.allclose(out, expected, rtol=1e-2, atol=1e-4) if __name__ == '__main__': # Prerequisite for test: CUDA compute capability >= 6.0 dace.Config.set('compiler', 'cuda', 'cuda_arch', value='60') test_half4() test_half8() test_exp_vec() test_relu_vec() test_dropout_vec() test_gelu_vec()
[ 2, 15069, 13130, 12, 42334, 35920, 43412, 290, 262, 9637, 34, 68, 7035, 13, 1439, 2489, 10395, 13, 198, 37811, 30307, 329, 2063, 12, 3866, 16005, 15582, 48072, 13, 37227, 198, 198, 11748, 288, 558, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 288, 558, 13, 7645, 1161, 13, 7890, 11125, 1330, 9347, 37, 4241, 11, 20650, 1634, 198, 6738, 288, 558, 13, 7645, 1161, 13, 40085, 7509, 1330, 30011, 7509, 198, 198, 45, 796, 288, 558, 13, 1837, 23650, 10786, 45, 11537, 628, 198, 4299, 4808, 9288, 62, 13959, 7, 303, 565, 268, 2599, 198, 220, 220, 220, 37227, 30307, 257, 900, 286, 5002, 3083, 4560, 319, 257, 15879, 2063, 2099, 13, 37227, 198, 220, 220, 220, 2488, 67, 558, 13, 23065, 628, 220, 220, 220, 317, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 347, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 264, 7568, 70, 796, 10284, 701, 395, 13, 1462, 62, 82, 7568, 70, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 301, 2012, 62, 35636, 602, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 46999, 62, 35636, 602, 3419, 628, 220, 220, 220, 1303, 27967, 15879, 1634, 319, 1123, 3975, 290, 954, 5625, 198, 220, 220, 220, 5625, 796, 657, 198, 220, 220, 220, 329, 2124, 687, 287, 30011, 7509, 7, 82, 7568, 70, 737, 1136, 62, 33279, 62, 6759, 2052, 7, 33279, 82, 41888, 38469, 1634, 60, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 687, 13, 31364, 62, 11925, 796, 1569, 565, 268, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 687, 13, 7353, 321, 903, 796, 10352, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 687, 13, 39014, 7, 82, 7568, 70, 8, 198, 220, 220, 220, 220, 220, 220, 220, 5625, 15853, 352, 198, 220, 220, 220, 6818, 5625, 6624, 362, 628, 220, 220, 220, 503, 796, 264, 7568, 70, 7, 32, 28, 32, 11, 347, 28, 33, 11, 399, 28, 1731, 8, 198, 220, 220, 220, 6818, 45941, 13, 439, 19836, 7, 448, 11, 317, 1635, 347, 1343, 317, 8, 628, 198, 4299, 1332, 62, 13959, 19, 33529, 198, 220, 220, 220, 37227, 30307, 257, 900, 286, 5002, 3083, 4560, 319, 2063, 351, 15879, 4129, 604, 13, 37227, 198, 220, 220, 220, 4808, 9288, 62, 13959, 7, 19, 8, 628, 198, 4299, 1332, 62, 13959, 23, 33529, 198, 220, 220, 220, 37227, 30307, 257, 900, 286, 5002, 3083, 4560, 319, 2063, 351, 15879, 4129, 807, 13, 37227, 198, 220, 220, 220, 4808, 9288, 62, 13959, 7, 23, 8, 628, 198, 4299, 1332, 62, 11201, 62, 35138, 33529, 198, 220, 220, 220, 37227, 30307, 281, 1033, 10088, 319, 257, 15879, 2063, 2099, 13, 37227, 198, 220, 220, 220, 2488, 67, 558, 13, 23065, 628, 220, 220, 220, 317, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 264, 7568, 70, 796, 10284, 701, 395, 13, 1462, 62, 82, 7568, 70, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 46999, 62, 35636, 602, 3419, 198, 220, 220, 220, 6818, 264, 7568, 70, 13, 39014, 62, 35636, 602, 7, 38469, 1634, 11, 8633, 7, 31364, 62, 11925, 28, 23, 4008, 6624, 352, 198, 220, 220, 220, 503, 796, 264, 7568, 70, 7, 32, 28, 32, 11, 399, 28, 1731, 8, 198, 220, 220, 220, 6818, 45941, 13, 439, 19836, 7, 448, 11, 45941, 13, 11201, 7, 32, 4008, 628, 198, 4299, 1332, 62, 260, 2290, 62, 35138, 33529, 198, 220, 220, 220, 37227, 30307, 257, 797, 41596, 10088, 319, 257, 15879, 2063, 2099, 13, 37227, 198, 220, 220, 220, 2488, 67, 558, 13, 23065, 628, 220, 220, 220, 317, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 264, 7568, 70, 796, 10284, 701, 395, 13, 1462, 62, 82, 7568, 70, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 46999, 62, 35636, 602, 3419, 198, 220, 220, 220, 6818, 264, 7568, 70, 13, 39014, 62, 35636, 602, 7, 38469, 1634, 11, 8633, 7, 31364, 62, 11925, 28, 23, 4008, 6624, 352, 198, 220, 220, 220, 503, 796, 264, 7568, 70, 7, 32, 28, 32, 11, 399, 28, 1731, 8, 198, 220, 220, 220, 6818, 45941, 13, 439, 19836, 7, 448, 11, 45941, 13, 47033, 7, 32, 11, 657, 4008, 628, 198, 4299, 1332, 62, 14781, 448, 62, 35138, 33529, 198, 220, 220, 220, 37227, 30307, 257, 4268, 448, 10088, 319, 257, 15879, 2063, 2099, 13, 37227, 198, 220, 220, 220, 2488, 67, 558, 13, 23065, 628, 220, 220, 220, 317, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 9335, 796, 45941, 13, 25120, 13, 25192, 600, 7, 15, 11, 362, 11, 2546, 41888, 1731, 35944, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 264, 7568, 70, 25, 288, 558, 13, 50, 8068, 38, 796, 10284, 701, 395, 13, 1462, 62, 82, 7568, 70, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 46999, 62, 35636, 602, 3419, 198, 220, 220, 220, 6818, 264, 7568, 70, 13, 39014, 62, 35636, 602, 7, 38469, 1634, 11, 8633, 7, 31364, 62, 11925, 28, 23, 4008, 6624, 352, 198, 220, 220, 220, 503, 796, 264, 7568, 70, 7, 32, 28, 32, 11, 9335, 28, 27932, 11, 399, 28, 1731, 8, 198, 220, 220, 220, 6818, 45941, 13, 439, 19836, 7, 448, 11, 317, 1635, 9335, 8, 628, 198, 4299, 1332, 62, 25280, 84, 62, 35138, 33529, 198, 220, 220, 220, 37227, 30307, 257, 402, 3698, 52, 10088, 319, 257, 15879, 2063, 2099, 13, 37227, 198, 220, 220, 220, 264, 17, 14415, 796, 10688, 13, 31166, 17034, 7, 17, 13, 15, 1220, 10688, 13, 14415, 8, 628, 220, 220, 220, 2488, 67, 558, 13, 23065, 628, 220, 220, 220, 317, 796, 45941, 13, 25120, 13, 25192, 7, 1731, 737, 459, 2981, 7, 37659, 13, 22468, 1433, 8, 198, 220, 220, 220, 264, 7568, 70, 796, 10284, 701, 395, 13, 1462, 62, 82, 7568, 70, 3419, 198, 220, 220, 220, 264, 7568, 70, 13, 39014, 62, 46999, 62, 35636, 602, 3419, 198, 220, 220, 220, 6818, 264, 7568, 70, 13, 39014, 62, 35636, 602, 7, 38469, 1634, 11, 8633, 7, 31364, 62, 11925, 28, 19, 4008, 6624, 352, 198, 220, 220, 220, 503, 796, 264, 7568, 70, 7, 32, 28, 32, 11, 399, 28, 1731, 8, 198, 220, 220, 220, 2938, 796, 657, 13, 20, 1635, 317, 1635, 357, 198, 220, 220, 220, 220, 220, 220, 220, 352, 1343, 45941, 13, 38006, 71, 7, 11018, 13, 31166, 17034, 7, 17, 13, 15, 1220, 10688, 13, 14415, 8, 1635, 357, 32, 1343, 657, 13, 15, 34825, 1314, 1635, 357, 32, 1174, 18, 35514, 198, 220, 220, 220, 6818, 45941, 13, 439, 19836, 7, 448, 11, 2938, 11, 374, 83, 349, 28, 16, 68, 12, 17, 11, 379, 349, 28, 16, 68, 12, 19, 8, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 3771, 27614, 329, 1332, 25, 29369, 5631, 24061, 12971, 18189, 718, 13, 15, 198, 220, 220, 220, 288, 558, 13, 16934, 13, 2617, 10786, 5589, 5329, 3256, 705, 66, 15339, 3256, 705, 66, 15339, 62, 998, 3256, 1988, 11639, 1899, 11537, 628, 220, 220, 220, 1332, 62, 13959, 19, 3419, 198, 220, 220, 220, 1332, 62, 13959, 23, 3419, 198, 220, 220, 220, 1332, 62, 11201, 62, 35138, 3419, 198, 220, 220, 220, 1332, 62, 260, 2290, 62, 35138, 3419, 198, 220, 220, 220, 1332, 62, 14781, 448, 62, 35138, 3419, 198, 220, 220, 220, 1332, 62, 25280, 84, 62, 35138, 3419, 198 ]
2.397126
1,322