max_stars_repo_path
stringlengths 4
237
| max_stars_repo_name
stringlengths 6
117
| max_stars_count
int64 0
95.2k
| id
stringlengths 1
7
| content
stringlengths 12
593k
| input_ids
sequencelengths 7
549k
|
---|---|---|---|---|---|
hard-gists/6532185/snippet.py | jjhenkel/dockerizeme | 21 | 189767 | <gh_stars>10-100
#!/usr/bin/env python
# September 2013
# by <NAME>, @bordignon on Twitter
#
# Simple Python script (v2.7x) that subscribes to a MQTT broker topic and inserts the topic into a mysql database
# This is designed for the http://mqttitude.org/ project backend
#
import MySQLdb
import mosquitto
import json
import time
#mosquitto broker config
broker = 'mqtt.localdomain'
broker_port = 1883
broker_topic = '/test/location/#'
#broker_clientid = 'mqttuide2mysqlScript'
#mysql config
mysql_server = 'thebeast.localdomain'
mysql_username = 'root'
mysql_passwd = ''
mysql_db = 'mqtt'
#change table below.
# Open database connection
db = MySQLdb.connect(mysql_server, mysql_username, mysql_passwd, mysql_db)
# prepare a cursor object using cursor() method
cursor = db.cursor()
def on_connect(mosq, obj, rc):
print("rc: "+str(rc))
def on_message(mosq, obj, msg):
print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload))
vars_to_sql = []
keys_to_sql = []
list = []
list = json.loads(msg.payload)
for key,value in list.iteritems():
print ("")
print key, value
if key == 'tst':
print "time found"
print value
value = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(float(value)))
print value
value_type = type(value)
if value_type is not dict:
print "value_type is not dict"
if value_type is unicode:
print "value_type is unicode"
vars_to_sql.append(value.encode('ascii', 'ignore'))
keys_to_sql.append(key.encode('ascii', 'ignore'))
else:
print "value_type is not unicode"
vars_to_sql.append(value)
keys_to_sql.append(key)
#add the msg.topic to the list as well
print "topic", msg.topic
addtopic = 'topic'
vars_to_sql.append(msg.topic.encode('ascii', 'ignore'))
keys_to_sql.append(addtopic.encode('ascii', 'ignore'))
keys_to_sql = ', '.join(keys_to_sql)
try:
# Execute the SQL command
# change locations to the table you are using
queryText = "INSERT INTO locations(%s) VALUES %r"
queryArgs = (keys_to_sql, tuple(vars_to_sql))
cursor.execute(queryText % queryArgs)
print('Successfully Added record to mysql')
db.commit()
except MySQLdb.Error, e:
try:
print "MySQL Error [%d]: %s" % (e.args[0], e.args[1])
except IndexError:
print "MySQL Error: %s" % str(e)
# Rollback in case there is any error
db.rollback()
print('ERROR adding record to MYSQL')
def on_publish(mosq, obj, mid):
print("mid: "+str(mid))
def on_subscribe(mosq, obj, mid, granted_qos):
print("Subscribed: "+str(mid)+" "+str(granted_qos))
def on_log(mosq, obj, level, string):
print(string)
# If you want to use a specific client id, use
#mqttc = mosquitto.Mosquitto(broker_clientid)
# but note that the client id must be unique on the broker. Leaving the client
# id parameter empty will generate a random id for you.
mqttc = mosquitto.Mosquitto()
mqttc.on_message = on_message
mqttc.on_connect = on_connect
mqttc.on_publish = on_publish
mqttc.on_subscribe = on_subscribe
# Uncomment to enable debug messages
mqttc.on_log = on_log
mqttc.connect(broker, broker_port, 60)
mqttc.subscribe(broker_topic, 0)
rc = 0
while rc == 0:
rc = mqttc.loop()
print("rc: "+str(rc))
# disconnect from server
print ('Disconnected, done.')
db.close() | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
3839,
29871,
29906,
29900,
29896,
29941,
13,
29937,
491,
529,
5813,
10202,
732,
29890,
536,
29582,
373,
20147,
13,
29937,
13,
29937,
12545,
5132,
2471,
313,
29894,
29906,
29889,
29955,
29916,
29897,
393,
21696,
5707,
304,
263,
341,
29984,
19988,
2545,
3946,
11261,
322,
13534,
1372,
278,
11261,
964,
263,
5749,
2566,
13,
29937,
910,
338,
8688,
363,
278,
1732,
597,
28466,
698,
4279,
29889,
990,
29914,
2060,
14998,
13,
29937,
13,
13,
5215,
9254,
2585,
13,
5215,
19767,
339,
20435,
13,
5215,
4390,
13,
5215,
931,
13,
13,
29937,
7681,
339,
20435,
2545,
3946,
2295,
13,
6729,
3946,
353,
525,
28466,
698,
29889,
2997,
7247,
29915,
13,
6729,
3946,
29918,
637,
353,
29871,
29896,
29947,
29947,
29941,
13,
6729,
3946,
29918,
13010,
353,
8207,
1688,
29914,
5479,
8484,
29915,
13,
29937,
6729,
3946,
29918,
4645,
333,
353,
525,
28466,
698,
29884,
680,
29906,
7938,
4081,
29915,
13,
29937,
7938,
2295,
13,
7938,
29918,
2974,
353,
525,
1552,
915,
579,
29889,
2997,
7247,
29915,
13,
7938,
29918,
6786,
353,
525,
4632,
29915,
13,
7938,
29918,
3364,
9970,
353,
6629,
13,
7938,
29918,
2585,
353,
525,
28466,
698,
29915,
13,
29937,
3167,
1591,
2400,
29889,
13,
13,
29937,
4673,
2566,
3957,
13,
2585,
353,
9254,
2585,
29889,
6915,
29898,
7938,
29918,
2974,
29892,
5749,
29918,
6786,
29892,
5749,
29918,
3364,
9970,
29892,
5749,
29918,
2585,
29897,
13,
29937,
19012,
263,
10677,
1203,
773,
10677,
580,
1158,
13,
18127,
353,
4833,
29889,
18127,
580,
13,
13,
1753,
373,
29918,
6915,
29898,
7681,
29939,
29892,
5446,
29892,
364,
29883,
1125,
13,
1678,
1596,
703,
2214,
29901,
15691,
710,
29898,
2214,
876,
13,
13,
1753,
373,
29918,
4906,
29898,
7681,
29939,
29892,
5446,
29892,
10191,
1125,
13,
1678,
1596,
29898,
7645,
29889,
13010,
13578,
15691,
710,
29898,
7645,
29889,
29939,
359,
7240,
29908,
15691,
710,
29898,
7645,
29889,
23813,
876,
13,
1678,
24987,
29918,
517,
29918,
2850,
353,
5159,
13,
1678,
6611,
29918,
517,
29918,
2850,
353,
5159,
13,
1678,
1051,
353,
5159,
13,
268,
13,
1678,
1051,
353,
4390,
29889,
18132,
29898,
7645,
29889,
23813,
29897,
13,
268,
13,
1678,
363,
1820,
29892,
1767,
297,
1051,
29889,
1524,
7076,
7295,
13,
418,
1596,
4852,
1159,
13,
418,
1596,
1820,
29892,
995,
13,
418,
565,
1820,
1275,
525,
29873,
303,
2396,
13,
4706,
1596,
376,
2230,
1476,
29908,
13,
4706,
1596,
995,
13,
4706,
995,
353,
931,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
742,
931,
29889,
2997,
2230,
29898,
7411,
29898,
1767,
4961,
13,
4706,
1596,
995,
13,
308,
13,
418,
995,
29918,
1853,
353,
1134,
29898,
1767,
29897,
13,
418,
565,
995,
29918,
1853,
338,
451,
9657,
29901,
13,
4706,
1596,
376,
1767,
29918,
1853,
338,
451,
9657,
29908,
13,
4706,
565,
995,
29918,
1853,
338,
29104,
29901,
13,
3986,
1596,
376,
1767,
29918,
1853,
338,
29104,
29908,
13,
3986,
24987,
29918,
517,
29918,
2850,
29889,
4397,
29898,
1767,
29889,
12508,
877,
294,
18869,
742,
525,
17281,
8785,
13,
3986,
6611,
29918,
517,
29918,
2850,
29889,
4397,
29898,
1989,
29889,
12508,
877,
294,
18869,
742,
525,
17281,
8785,
13,
4706,
1683,
29901,
13,
3986,
1596,
376,
1767,
29918,
1853,
338,
451,
29104,
29908,
13,
3986,
24987,
29918,
517,
29918,
2850,
29889,
4397,
29898,
1767,
29897,
13,
3986,
6611,
29918,
517,
29918,
2850,
29889,
4397,
29898,
1989,
29897,
13,
1678,
396,
1202,
278,
10191,
29889,
13010,
304,
278,
1051,
408,
1532,
13,
1678,
1596,
376,
13010,
613,
10191,
29889,
13010,
13,
1678,
788,
13010,
353,
525,
13010,
29915,
13,
1678,
24987,
29918,
517,
29918,
2850,
29889,
4397,
29898,
7645,
29889,
13010,
29889,
12508,
877,
294,
18869,
742,
525,
17281,
8785,
13,
1678,
6611,
29918,
517,
29918,
2850,
29889,
4397,
29898,
1202,
13010,
29889,
12508,
877,
294,
18869,
742,
525,
17281,
8785,
13,
268,
13,
1678,
6611,
29918,
517,
29918,
2850,
353,
13420,
15300,
7122,
29898,
8149,
29918,
517,
29918,
2850,
29897,
13,
13,
1678,
1018,
29901,
13,
539,
396,
11080,
1082,
278,
3758,
1899,
29871,
13,
539,
396,
1735,
14354,
304,
278,
1591,
366,
526,
773,
13,
539,
2346,
1626,
353,
376,
19460,
11646,
14354,
29414,
29879,
29897,
15673,
1273,
29878,
29908,
13,
539,
2346,
7883,
353,
313,
8149,
29918,
517,
29918,
2850,
29892,
18761,
29898,
16908,
29918,
517,
29918,
2850,
876,
13,
539,
10677,
29889,
7978,
29898,
1972,
1626,
1273,
2346,
7883,
29897,
13,
539,
1596,
877,
14191,
3730,
25601,
2407,
304,
5749,
1495,
13,
539,
4833,
29889,
15060,
580,
13,
1678,
5174,
9254,
2585,
29889,
2392,
29892,
321,
29901,
13,
4706,
1018,
29901,
13,
9651,
1596,
376,
3421,
4176,
4829,
518,
29995,
29881,
5387,
1273,
29879,
29908,
1273,
313,
29872,
29889,
5085,
29961,
29900,
1402,
321,
29889,
5085,
29961,
29896,
2314,
13,
4706,
5174,
11374,
2392,
29901,
13,
9651,
1596,
376,
3421,
4176,
4829,
29901,
1273,
29879,
29908,
1273,
851,
29898,
29872,
29897,
13,
4706,
396,
21809,
1627,
297,
1206,
727,
338,
738,
1059,
13,
4706,
4833,
29889,
1245,
1627,
580,
13,
4706,
1596,
877,
11432,
4417,
2407,
304,
19519,
4176,
1495,
13,
13,
1753,
373,
29918,
23679,
29898,
7681,
29939,
29892,
5446,
29892,
7145,
1125,
13,
1678,
1596,
703,
6563,
29901,
15691,
710,
29898,
6563,
876,
13,
13,
1753,
373,
29918,
19496,
29898,
7681,
29939,
29892,
5446,
29892,
7145,
29892,
16896,
29918,
29939,
359,
1125,
13,
1678,
1596,
703,
4035,
7588,
2580,
29901,
15691,
710,
29898,
6563,
7240,
29908,
15691,
710,
29898,
629,
9714,
29918,
29939,
359,
876,
13,
13,
1753,
373,
29918,
1188,
29898,
7681,
29939,
29892,
5446,
29892,
3233,
29892,
1347,
1125,
13,
1678,
1596,
29898,
1807,
29897,
13,
13,
29937,
960,
366,
864,
304,
671,
263,
2702,
3132,
1178,
29892,
671,
13,
29937,
28466,
698,
29883,
353,
19767,
339,
20435,
29889,
29924,
359,
339,
20435,
29898,
6729,
3946,
29918,
4645,
333,
29897,
13,
29937,
541,
4443,
393,
278,
3132,
1178,
1818,
367,
5412,
373,
278,
2545,
3946,
29889,
951,
5555,
278,
3132,
13,
29937,
1178,
3443,
4069,
674,
5706,
263,
4036,
1178,
363,
366,
29889,
13,
28466,
698,
29883,
353,
19767,
339,
20435,
29889,
29924,
359,
339,
20435,
580,
13,
28466,
698,
29883,
29889,
265,
29918,
4906,
353,
373,
29918,
4906,
13,
28466,
698,
29883,
29889,
265,
29918,
6915,
353,
373,
29918,
6915,
13,
28466,
698,
29883,
29889,
265,
29918,
23679,
353,
373,
29918,
23679,
13,
28466,
698,
29883,
29889,
265,
29918,
19496,
353,
373,
29918,
19496,
13,
29937,
853,
9342,
304,
9025,
4744,
7191,
13,
28466,
698,
29883,
29889,
265,
29918,
1188,
353,
373,
29918,
1188,
13,
13,
28466,
698,
29883,
29889,
6915,
29898,
6729,
3946,
29892,
2545,
3946,
29918,
637,
29892,
29871,
29953,
29900,
29897,
13,
28466,
698,
29883,
29889,
19496,
29898,
6729,
3946,
29918,
13010,
29892,
29871,
29900,
29897,
13,
13,
2214,
353,
29871,
29900,
13,
8000,
364,
29883,
1275,
29871,
29900,
29901,
13,
1678,
364,
29883,
353,
286,
29939,
698,
29883,
29889,
7888,
580,
13,
13,
2158,
703,
2214,
29901,
15691,
710,
29898,
2214,
876,
13,
13,
29937,
766,
6915,
515,
1923,
13,
2158,
6702,
4205,
18045,
29892,
2309,
29889,
1495,
13,
2585,
29889,
5358,
580,
2
] |
textadapter/tests/data/benchmarks.py | ContinuumIO/TextAdapter | 22 | 52358 | import timeit
import os
def timeFunction(function, setup):
print 'timing', function
t = timeit.Timer(stmt=function, setup=setup)
times = []
for i in range(0,3):
os.system('sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"')
times.append(str(t.timeit(number=1)))
return min(times)
ints1 = timeFunction('blazeopt.loadtxt("ints1", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
ints2 = timeFunction('blazeopt.loadtxt("ints2", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
ints3 = timeFunction('blazeopt.loadtxt("ints3", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
print ints1, ints2, ints3
floats1 = timeFunction('blazeopt.loadtxt("floats1", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
floats2 = timeFunction('blazeopt.loadtxt("floats2", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
floats3 = timeFunction('blazeopt.loadtxt("floats3", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
print floats1, floats2, floats3
ints1 = timeFunction('blazeopt.genfromtxt("ints1", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
ints2 = timeFunction('blazeopt.genfromtxt("ints2", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
ints3 = timeFunction('blazeopt.genfromtxt("ints3", dtype="u4,u4,u4,u4,u4", delimiter=",")', 'import blazeopt')
print ints1, ints2, ints3
floats1 = timeFunction('blazeopt.genfromtxt("floats1", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
floats2 = timeFunction('blazeopt.genfromtxt("floats2", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
floats3 = timeFunction('blazeopt.genfromtxt("floats3", dtype="f8,f8,f8,f8,f8", delimiter=",")', 'import blazeopt')
print floats1, floats2, floats3
missingValues1 = timeFunction('blazeopt.genfromtxt("missingvalues1", dtype="u4,u4,u4,u4,u4", delimiter=",", missing_values={0:["NA","NaN"], 1:["xx","inf"]}, filling_values="999")', 'import blazeopt')
missingValues2 = timeFunction('blazeopt.genfromtxt("missingvalues2", dtype="u4,u4,u4,u4,u4", delimiter=",", missing_values={0:["NA","NaN"], 1:["xx","inf"]}, filling_values="999")', 'import blazeopt')
missingValues3 = timeFunction('blazeopt.genfromtxt("missingvalues3", dtype="u4,u4,u4,u4,u4", delimiter=",", missing_values={0:["NA","NaN"], 1:["xx","inf"]}, filling_values="999")', 'import blazeopt')
print missingValues1, missingValues2, missingValues3
fixedwidth1 = timeFunction('blazeopt.genfromtxt("fixedwidth1", dtype="u4,u4,u4,u4,u4", delimiter=[2,3,4,5,6])', 'import blazeopt')
fixedwidth2 = timeFunction('blazeopt.genfromtxt("fixedwidth2", dtype="u4,u4,u4,u4,u4", delimiter=[2,3,4,5,6])', 'import blazeopt')
fixedwidth3 = timeFunction('blazeopt.genfromtxt("fixedwidth3", dtype="u4,u4,u4,u4,u4", delimiter=[2,3,4,5,6])', 'import blazeopt')
print fixedwidth1, fixedwidth2, fixedwidth3
| [
1,
1053,
931,
277,
13,
5215,
2897,
13,
13,
13,
1753,
931,
6678,
29898,
2220,
29892,
6230,
1125,
13,
1678,
1596,
525,
9346,
292,
742,
740,
13,
1678,
260,
353,
931,
277,
29889,
14745,
29898,
17868,
29922,
2220,
29892,
6230,
29922,
14669,
29897,
13,
1678,
3064,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29941,
1125,
13,
4706,
2897,
29889,
5205,
877,
15360,
528,
448,
29883,
376,
16593,
29936,
2916,
29871,
29941,
1405,
847,
15439,
29914,
9675,
29914,
6925,
29914,
8865,
29918,
29883,
14520,
29908,
1495,
13,
4706,
3064,
29889,
4397,
29898,
710,
29898,
29873,
29889,
2230,
277,
29898,
4537,
29922,
29896,
4961,
13,
1678,
736,
1375,
29898,
3706,
29897,
13,
13,
13,
9466,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
9466,
29896,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
9466,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
9466,
29906,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
9466,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
9466,
29941,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
938,
29879,
29896,
29892,
938,
29879,
29906,
29892,
938,
29879,
29941,
13,
13,
29888,
417,
1446,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
29888,
417,
1446,
29896,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
29888,
417,
1446,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
29888,
417,
1446,
29906,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
29888,
417,
1446,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1359,
3945,
703,
29888,
417,
1446,
29941,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
5685,
1446,
29896,
29892,
5685,
1446,
29906,
29892,
5685,
1446,
29941,
13,
13,
9466,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
9466,
29896,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
9466,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
9466,
29906,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
9466,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
9466,
29941,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
938,
29879,
29896,
29892,
938,
29879,
29906,
29892,
938,
29879,
29941,
13,
13,
29888,
417,
1446,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
29888,
417,
1446,
29896,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
29888,
417,
1446,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
29888,
417,
1446,
29906,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
29888,
417,
1446,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
29888,
417,
1446,
29941,
613,
26688,
543,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
29892,
29888,
29947,
613,
28552,
543,
29892,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
5685,
1446,
29896,
29892,
5685,
1446,
29906,
29892,
5685,
1446,
29941,
13,
13,
27259,
9065,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
27259,
5975,
29896,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
613,
4567,
29918,
5975,
3790,
29900,
29901,
3366,
3521,
3284,
19377,
12436,
29871,
29896,
29901,
3366,
4419,
3284,
7192,
3108,
1118,
27523,
29918,
5975,
543,
29929,
29929,
29929,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
27259,
9065,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
27259,
5975,
29906,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
613,
4567,
29918,
5975,
3790,
29900,
29901,
3366,
3521,
3284,
19377,
12436,
29871,
29896,
29901,
3366,
4419,
3284,
7192,
3108,
1118,
27523,
29918,
5975,
543,
29929,
29929,
29929,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
27259,
9065,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
27259,
5975,
29941,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
543,
29892,
613,
4567,
29918,
5975,
3790,
29900,
29901,
3366,
3521,
3284,
19377,
12436,
29871,
29896,
29901,
3366,
4419,
3284,
7192,
3108,
1118,
27523,
29918,
5975,
543,
29929,
29929,
29929,
1159,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
4567,
9065,
29896,
29892,
4567,
9065,
29906,
29892,
4567,
9065,
29941,
13,
13,
20227,
2103,
29896,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
20227,
2103,
29896,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
11759,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
2314,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
20227,
2103,
29906,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
20227,
2103,
29906,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
11759,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
2314,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
20227,
2103,
29941,
353,
931,
6678,
877,
17530,
911,
3670,
29889,
1885,
3166,
3945,
703,
20227,
2103,
29941,
613,
26688,
543,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
29892,
29884,
29946,
613,
28552,
11759,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
2314,
742,
525,
5215,
12995,
911,
3670,
1495,
13,
2158,
4343,
2103,
29896,
29892,
4343,
2103,
29906,
29892,
4343,
2103,
29941,
13,
13,
2
] |
neutronpy/instrument/chopper.py | neutronpy/neutronpy | 14 | 176213 | <gh_stars>10-100
# -*- coding: utf-8 -*-
r"""Chopper class for Time of Flight instrument
"""
import numpy as np
from .exceptions import ChopperError
class Chopper(object):
r"""Class defining a chopper object for using Time of Flight spectrometer
resolution calculations.
Parameters
----------
distance : float
Distance of the chopper from the source in cm.
speed : float
Speed of the chopper in Hz.
width : float
width of the beam at the chopper in cm.
chopper_type : string
The type of chopper: 'disk' or 'fermi'.
acceptance : float
If chopper_type == 'disk', angular acceptance of the chopper in
degrees, unless `radius` is defined, in which case `acceptance`
is the size of the opening in the disk in cm. If chopper_type ==
'fermi', distance between chopper blades in cm.
counter_rot : bool, optional
If the disk chopper consists of two counter rotating choppers, set to
True (Default: False).
radius : float, optional
radius of the chopper in cm. If defined, and chopper_type == 'disk',
then `acceptance` is assumed to be in units of cm.
depth : float, optional
The depth of the Fermi Chopper blades, to calculate angular
acceptance. Required if chopper_type == 'fermi'.
tau : float, optional
Custom value of the resolution of the chopper in standard deviation in
units of microseconds. Used to override the automatic calculation of
tau.
Attributes
----------
distance
speed
width
chopper_type
acceptance
radius
depth
tau
"""
def __init__(self, distance, speed, width, chopper_type, acceptance, counter_rot=False, radius=None, depth=None, tau=None):
self.distance = distance
self.speed = speed
self.width = width
self.chopper_type = chopper_type
self.acceptance = acceptance
if counter_rot:
self.counter_rot = 2.0
else:
self.counter_rot = 1.0
if radius is not None:
self.radius = radius
if depth is not None:
self.depth = depth
if tau is not None:
self.tau_override = tau
def __repr__(self):
args = ', '.join(
[str(getattr(self, key)) for key in ['distance', 'speed', 'width', 'chopper_type', 'acceptance']])
kwargs = ', '.join(
['{0}={1}'.format(getattr(self, key)) for key in ['depth', 'tau'] if getattr(self, key, None) is not None])
return "Chopper({0})".format(', '.join([args, kwargs]))
@property
def tau(self):
"""Calculate the time resolution of the chopper
Returns
-------
tau : float
Returns the resolution of the chopper in standard deviation in units of microseconds
"""
if hasattr(self, 'tau_override'):
return self.tau_override
elif self.chopper_type == 'disk' and hasattr(self, 'radius'):
return self.acceptance / (self.radius * self.speed * self.counter_rot) / np.sqrt(8 * np.log(2))
elif self.chopper_type == 'disk' and ~hasattr(self, 'radius'):
return 1e6 / (self.speed * self.acceptance * self.counter_rot) / 360.0
elif self.chopper_type == 'fermi':
try:
return 1e6 / (self.speed * 2.0 * np.arctan(self.acceptance / self.depth)) / 360.
except AttributeError:
raise ChopperError("'depth' not specified, and is a required value for a Fermi Chopper.")
else:
raise ChopperError("'{0}' is an invalid chopper_type. Choose 'disk' or 'fermi', or specify custom tau \
via `tau_override` attribute".format('chopper_type'))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29878,
15945,
29908,
15954,
2496,
770,
363,
5974,
310,
2379,
523,
11395,
13,
13,
15945,
29908,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
869,
11739,
29879,
1053,
14542,
2496,
2392,
13,
13,
13,
1990,
14542,
2496,
29898,
3318,
1125,
13,
1678,
364,
15945,
29908,
2385,
16184,
263,
3060,
2496,
1203,
363,
773,
5974,
310,
2379,
523,
6683,
456,
1308,
13,
1678,
10104,
17203,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
5418,
584,
5785,
13,
4706,
6652,
749,
310,
278,
3060,
2496,
515,
278,
2752,
297,
7477,
29889,
13,
13,
1678,
6210,
584,
5785,
13,
4706,
24839,
310,
278,
3060,
2496,
297,
379,
29920,
29889,
13,
13,
1678,
2920,
584,
5785,
13,
4706,
2920,
310,
278,
22913,
472,
278,
3060,
2496,
297,
7477,
29889,
13,
13,
1678,
3060,
2496,
29918,
1853,
584,
1347,
13,
4706,
450,
1134,
310,
3060,
2496,
29901,
525,
20960,
29915,
470,
525,
571,
2460,
4286,
13,
13,
1678,
3544,
749,
584,
5785,
13,
4706,
960,
3060,
2496,
29918,
1853,
1275,
525,
20960,
742,
6401,
3544,
749,
310,
278,
3060,
2496,
297,
13,
4706,
14496,
29892,
6521,
421,
13471,
29952,
338,
3342,
29892,
297,
607,
1206,
421,
16044,
749,
29952,
13,
4706,
338,
278,
2159,
310,
278,
8718,
297,
278,
8086,
297,
7477,
29889,
960,
3060,
2496,
29918,
1853,
1275,
13,
4706,
525,
571,
2460,
742,
5418,
1546,
3060,
2496,
1999,
3076,
297,
7477,
29889,
13,
13,
1678,
6795,
29918,
5450,
584,
6120,
29892,
13136,
13,
4706,
960,
278,
8086,
3060,
2496,
11624,
310,
1023,
6795,
5731,
1218,
3060,
22437,
29892,
731,
304,
13,
4706,
5852,
313,
4592,
29901,
7700,
467,
13,
13,
1678,
11855,
584,
5785,
29892,
13136,
13,
4706,
11855,
310,
278,
3060,
2496,
297,
7477,
29889,
960,
3342,
29892,
322,
3060,
2496,
29918,
1853,
1275,
525,
20960,
742,
13,
4706,
769,
421,
16044,
749,
29952,
338,
12023,
304,
367,
297,
10340,
310,
7477,
29889,
13,
13,
1678,
10809,
584,
5785,
29892,
13136,
13,
4706,
450,
10809,
310,
278,
383,
837,
29875,
14542,
2496,
1999,
3076,
29892,
304,
8147,
6401,
13,
4706,
3544,
749,
29889,
830,
5958,
565,
3060,
2496,
29918,
1853,
1275,
525,
571,
2460,
4286,
13,
13,
1678,
260,
585,
584,
5785,
29892,
13136,
13,
4706,
8701,
995,
310,
278,
10104,
310,
278,
3060,
2496,
297,
3918,
29522,
297,
13,
4706,
10340,
310,
9200,
23128,
29889,
501,
8485,
304,
5712,
278,
18428,
13944,
310,
13,
4706,
260,
585,
29889,
13,
13,
1678,
6212,
5026,
13,
1678,
448,
1378,
29899,
13,
1678,
5418,
13,
1678,
6210,
13,
1678,
2920,
13,
1678,
3060,
2496,
29918,
1853,
13,
1678,
3544,
749,
13,
1678,
11855,
13,
1678,
10809,
13,
1678,
260,
585,
13,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5418,
29892,
6210,
29892,
2920,
29892,
3060,
2496,
29918,
1853,
29892,
3544,
749,
29892,
6795,
29918,
5450,
29922,
8824,
29892,
11855,
29922,
8516,
29892,
10809,
29922,
8516,
29892,
260,
585,
29922,
8516,
1125,
13,
4706,
1583,
29889,
19244,
353,
5418,
13,
4706,
1583,
29889,
19322,
353,
6210,
13,
4706,
1583,
29889,
2103,
353,
2920,
13,
4706,
1583,
29889,
1859,
2496,
29918,
1853,
353,
3060,
2496,
29918,
1853,
13,
4706,
1583,
29889,
16044,
749,
353,
3544,
749,
13,
4706,
565,
6795,
29918,
5450,
29901,
13,
9651,
1583,
29889,
11808,
29918,
5450,
353,
29871,
29906,
29889,
29900,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
11808,
29918,
5450,
353,
29871,
29896,
29889,
29900,
13,
4706,
565,
11855,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
13471,
353,
11855,
13,
4706,
565,
10809,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
19488,
353,
10809,
13,
4706,
565,
260,
585,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
4722,
29918,
15752,
353,
260,
585,
13,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
6389,
353,
13420,
15300,
7122,
29898,
13,
9651,
518,
710,
29898,
657,
5552,
29898,
1311,
29892,
1820,
876,
363,
1820,
297,
6024,
19244,
742,
525,
19322,
742,
525,
2103,
742,
525,
1859,
2496,
29918,
1853,
742,
525,
16044,
749,
2033,
2314,
13,
4706,
9049,
5085,
353,
13420,
15300,
7122,
29898,
13,
9651,
6024,
29912,
29900,
29913,
3790,
29896,
29913,
4286,
4830,
29898,
657,
5552,
29898,
1311,
29892,
1820,
876,
363,
1820,
297,
6024,
19488,
742,
525,
4722,
2033,
565,
679,
5552,
29898,
1311,
29892,
1820,
29892,
6213,
29897,
338,
451,
6213,
2314,
13,
4706,
736,
376,
15954,
2496,
3319,
29900,
1800,
1642,
4830,
29317,
15300,
7122,
4197,
5085,
29892,
9049,
5085,
12622,
13,
13,
1678,
732,
6799,
13,
1678,
822,
260,
585,
29898,
1311,
1125,
13,
4706,
9995,
27065,
403,
278,
931,
10104,
310,
278,
3060,
2496,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
260,
585,
584,
5785,
13,
9651,
16969,
278,
10104,
310,
278,
3060,
2496,
297,
3918,
29522,
297,
10340,
310,
9200,
23128,
13,
4706,
9995,
13,
4706,
565,
756,
5552,
29898,
1311,
29892,
525,
4722,
29918,
15752,
29374,
13,
9651,
736,
1583,
29889,
4722,
29918,
15752,
13,
13,
4706,
25342,
1583,
29889,
1859,
2496,
29918,
1853,
1275,
525,
20960,
29915,
322,
756,
5552,
29898,
1311,
29892,
525,
13471,
29374,
13,
9651,
736,
1583,
29889,
16044,
749,
847,
313,
1311,
29889,
13471,
334,
1583,
29889,
19322,
334,
1583,
29889,
11808,
29918,
5450,
29897,
847,
7442,
29889,
3676,
29898,
29947,
334,
7442,
29889,
1188,
29898,
29906,
876,
13,
4706,
25342,
1583,
29889,
1859,
2496,
29918,
1853,
1275,
525,
20960,
29915,
322,
3695,
5349,
5552,
29898,
1311,
29892,
525,
13471,
29374,
13,
9651,
736,
29871,
29896,
29872,
29953,
847,
313,
1311,
29889,
19322,
334,
1583,
29889,
16044,
749,
334,
1583,
29889,
11808,
29918,
5450,
29897,
847,
29871,
29941,
29953,
29900,
29889,
29900,
13,
4706,
25342,
1583,
29889,
1859,
2496,
29918,
1853,
1275,
525,
571,
2460,
2396,
13,
9651,
1018,
29901,
13,
18884,
736,
29871,
29896,
29872,
29953,
847,
313,
1311,
29889,
19322,
334,
29871,
29906,
29889,
29900,
334,
7442,
29889,
27014,
273,
29898,
1311,
29889,
16044,
749,
847,
1583,
29889,
19488,
876,
847,
29871,
29941,
29953,
29900,
29889,
13,
9651,
5174,
23833,
2392,
29901,
13,
18884,
12020,
14542,
2496,
2392,
703,
29915,
19488,
29915,
451,
6790,
29892,
322,
338,
263,
3734,
995,
363,
263,
383,
837,
29875,
14542,
2496,
23157,
13,
13,
4706,
1683,
29901,
13,
9651,
12020,
14542,
2496,
2392,
703,
29915,
29912,
29900,
10162,
338,
385,
8340,
3060,
2496,
29918,
1853,
29889,
14542,
852,
525,
20960,
29915,
470,
525,
571,
2460,
742,
470,
6084,
2888,
260,
585,
320,
13,
462,
18884,
3025,
421,
4722,
29918,
15752,
29952,
5352,
1642,
4830,
877,
1859,
2496,
29918,
1853,
8785,
13,
2
] |
reproducer/reproduced_results_analyzer.py | BugSwarm/bugswarm | 18 | 143052 | <reponame>BugSwarm/bugswarm
import getopt
import logging
import os
import sys
import time
from typing import List
from typing import Tuple
from bugswarm.analyzer import analyzer
from bugswarm.common import log
from bugswarm.common.json import read_json
from bugswarm.common.json import write_json
from bugswarm.common.log_downloader import download_log
from bugswarm.common.utils import get_current_component_version_message
from reproducer.config import Config
from reproducer.model.jobpair import JobPair
from reproducer.pair_center import PairCenter
from reproducer.utils import Utils
from reproducer.pipeline.analyze_and_compare import analyze_and_compare
class ReproducedResultsAnalyzer(object):
def __init__(self, input_file, runs, task_name):
log.info('Initializing ReproducedResultsAnalyzer.')
self.input_file = input_file
self.runs = runs
self.config = Config(task_name)
self.utils = Utils(self.config)
self.analyzer = analyzer.Analyzer()
# Initializing pair_center should not be in _pre_analyze because we want the pairs to maintain state between
# analyzing each run.
self.pair_center = PairCenter(input_file, self.utils)
# The below attributes are initialized in _pre_analyze.
self.start_time = None
self.reproduced_logs = None
self.reproduced_logs_analyzed = None
self.error_count = None
def run(self):
for i in range(1, self.runs + 1):
self._pre_analyze()
self._analyze(i)
self._post_analyze(i)
self._show_reproducibility()
self._write_output_json()
log.info('Done!')
def _pre_analyze(self):
"""
Reset state before analyzing the next run.
"""
self.start_time = time.time()
self.reproduced_logs = {}
self.reproduced_logs_analyzed = 0
self.error_count = 0
# Reset the match type flag before each run
for r in self.pair_center.repos:
for bp in self.pair_center.repos[r].buildpairs:
bp.set_match_type.value = False
def _analyze(self, run):
"""
Analyze a single run of reproduced results.
For each job in a jobpair, check if the reproduced log exists in the task folder. If it does, then download the
original Travis log. Finally, analyze and compare the two logs.
"""
for r in self.pair_center.repos:
for bp in self.pair_center.repos[r].buildpairs:
for jp in bp.jobpairs:
for j in jp.jobs:
try:
analyzed_reproduced_log = analyze_and_compare(self, j, run)
if analyzed_reproduced_log:
self.reproduced_logs_analyzed += 1
except Exception as e:
log.error('Encountered an error while analyzing and comparing {}: {}'.format(j.job_name, e))
self.error_count += 1
self.pair_center.update_buildpair_done_status()
self.pair_center.assign_pair_match_types()
self.pair_center.assign_pair_match_history(run)
self.pair_center.assign_pair_patch_history(run)
def _post_analyze(self, run):
"""
This function is called after analyzing each run. Print statistics like how many pairs matched and time elapsed
and then visualize the match history after this run.
"""
log.info('Done analyzing run {}.'.format(run))
self._visualize_match_history()
log.info('{} reproduced logs analyzed and {} errors in run {}.'
.format(self.reproduced_logs_analyzed, self.error_count, run))
# Print a blank line to separate each run.
log.info()
mmm = self.utils.construct_mmm_count(self.pair_center)
aaa = self.utils.construct_aaa_count(self.pair_center)
log.debug('Match types in run {}: m1-m2-m3: {} a1-a2-a3: {}.'.format(run, mmm, aaa))
def _write_output_json(self):
log.info('Writing output JSON annotated with match history.')
pairs = read_json(self.input_file)
# Write default attributes.
for p in pairs:
for jp in p['jobpairs']:
jp['match_history'] = {}
jp['failed_job']['match_history'] = {}
jp['passed_job']['match_history'] = {}
jp['failed_job']['orig_result'] = ''
jp['passed_job']['orig_result'] = ''
jp['failed_job']['mismatch_attrs'] = []
jp['passed_job']['mismatch_attrs'] = []
jp['failed_job']['pip_patch'] = False
jp['passed_job']['pip_patch'] = False
for p in pairs:
repo = p['repo']
if repo not in self.pair_center.repos:
continue
# Try to find this build pair in pair center.
for bp in self.pair_center.repos[repo].buildpairs:
if p['failed_build']['build_id'] == bp.builds[0].build_id:
# Found build pair in pair center.
# Optional: Write buildpair match type.
# This is not used since we switched to jobpair packaging.
p['match'] = bp.match.value
trigger_sha = p['failed_build']['head_sha']
# Similarly, for each job pair in build pair, try to find it in the pair center.
for jp in p['jobpairs']:
# For a build that has some jobs filtered and some jobs not filtered,
# the job cannot be found in paircenter.
if jp['is_filtered']:
continue
found_in_paircenter = False
for jobpair in bp.jobpairs:
if str(jobpair.jobs[0].job_id) == str(jp['failed_job']['job_id']):
found_in_paircenter = True
# Write jobpair match history, analyzed results, and mismatched attributes.
jp['match_history'] = jobpair.match_history
jp['failed_job']['match_history'] = jobpair.failed_job_match_history
jp['passed_job']['match_history'] = jobpair.passed_job_match_history
jp['failed_job']['orig_result'] = jobpair.jobs[0].orig_result
jp['passed_job']['orig_result'] = jobpair.jobs[1].orig_result
jp['failed_job']['mismatch_attrs'] = jobpair.jobs[0].mismatch_attrs
jp['passed_job']['mismatch_attrs'] = jobpair.jobs[1].mismatch_attrs
jp['failed_job']['pip_patch'] = jobpair.jobs[0].pip_patch
jp['passed_job']['pip_patch'] = jobpair.jobs[1].pip_patch
if not found_in_paircenter:
# If not found in pair center, this jobpair was filtered out.
# In this case, we still analyze the original log to get as many attributes as possible.
for i in range(2):
job_name = 'failed_job' if i == 0 else 'passed_job'
job_id = jp[job_name]['job_id']
original_log_path = self.utils.get_orig_log_path(job_id)
if not download_log(job_id, original_log_path):
continue
original_result = self.analyzer.analyze_single_log(original_log_path, job_id,
trigger_sha, repo)
if 'not_in_supported_language' in original_result:
continue
jp[job_name]['orig_result'] = original_result
raise RuntimeError('Unexpected state: Jobpair not found in pair center. Exiting.')
os.makedirs(self.config.result_json_dir, exist_ok=True)
filename = self.config.task + '.json'
filepath = os.path.join(self.config.result_json_dir, filename)
write_json(filepath, pairs)
def _get_all_jobpairs_and_all_runs(self) -> Tuple[List[JobPair], List[str]]:
all_jobpairs = []
for r in self.pair_center.repos:
for bp in self.pair_center.repos[r].buildpairs:
for jp in bp.jobpairs:
all_jobpairs.append(jp)
all_runs = []
for jp in all_jobpairs:
for run in jp.match_history:
all_runs.append(run)
all_runs = list(set(all_runs))
all_runs.sort()
return all_jobpairs, all_runs
def _visualize_match_history(self):
log.info('Visualizing match history:')
log.info('N means no reproduced log exists. (An error occured in reproducer while reproducing the job.)')
all_jobpairs, all_runs = self._get_all_jobpairs_and_all_runs()
for jp in all_jobpairs:
log.info(jp.full_name)
match_histories = [
(jp.match_history, 'Job pair'),
(jp.failed_job_match_history, 'Failed job'),
(jp.passed_job_match_history, 'Passed job'),
]
for match_history, history_name in match_histories:
# Task name is run number 1-5
mh = [str(match_history.get(run, 'N')) for run in all_runs]
if mh:
full_history_name = '{} match history'.format(history_name)
log.info('{:>24}:'.format(full_history_name), ' -> '.join(mh))
else:
log.info('No match history. (This jobpair is not reproduced.)')
def _show_reproducibility(self):
log.info('Visualizing reproducibility:')
all_jobpairs, all_runs = self._get_all_jobpairs_and_all_runs()
if not all_jobpairs:
log.info('Nothing to visualize since no jobs were run.')
else:
full_name_max_length = max([len(jp.full_name) for jp in all_jobpairs])
for jp in all_jobpairs:
mh = []
for run in all_runs:
run_result = jp.match_history.get(run)
# run_result could be 'N', 0, or 1
if run_result != 1:
mh.append(0)
else:
mh.append(run_result)
# No reproducing runs were successful
if all(v == 0 for v in mh):
reproducibility = 'Unreproducible'
# match history is all 1s, all runs reproducible
elif all(mh):
reproducibility = 'Reproducible'
else:
reproducibility = 'Flaky'
log.info('{full_name: >{width}} job pair reproducibility: {result}'
.format(width=full_name_max_length, full_name=jp.full_name, result=reproducibility))
# Print a blank separator line.
log.info()
def _print_usage():
log.info('Usage: python3 reproduced_results_analyzer.py -i <input_file> -n <runs> --task-name <task_name>')
log.info('{:<30}{:<30}'.format('-i, --input-file', 'Path to a JSON file containing fail-pass pairs to reproduce.'))
log.info('{:<30}{:<30}'.format('-n, --runs', 'Number of reproducer runs to analyze.'))
log.info('{:<30}{:<30}'.format('--task-name', 'Name of task folder, or default to the name of JSON file'))
def _validate_input(argv):
shortopts = 'i:n:'
longopts = 'input-file= runs= task-name='.split()
input_file = None
runs = 0
task_name = None
try:
optlist, args = getopt.getopt(argv[1:], shortopts, longopts)
except getopt.GetoptError:
log.error('Could not parse arguments. Exiting.')
_print_usage()
sys.exit(2)
for opt, arg in optlist:
if opt in ('-i', '--input-file'):
input_file = arg
if opt in ('-n', '--runs'):
try:
runs = int(arg)
except (ValueError, TypeError):
log.error('The runs argument must be an integer.')
_print_usage()
sys.exit(2)
if opt in '--task-name':
task_name = arg
if not input_file:
_print_usage()
sys.exit(2)
if not os.path.isfile(input_file):
log.error('The input_file argument is not a file or does not exist. Exiting.')
sys.exit(2)
if not runs:
_print_usage()
sys.exit(2)
if not task_name:
_print_usage()
sys.exit(2)
return input_file, runs, task_name
def main(argv=None):
argv = argv or sys.argv
# Configure logging.
log.config_logging(getattr(logging, 'INFO', None))
# Log the current version of this BugSwarm component.
log.info(get_current_component_version_message('ReproducedResultsAnalyzer'))
input_file, runs, task_name = _validate_input(argv)
ReproducedResultsAnalyzer(input_file, runs, task_name).run()
if __name__ == '__main__':
sys.exit(main())
| [
1,
529,
276,
1112,
420,
29958,
29933,
688,
10840,
2817,
29914,
6152,
2774,
2817,
13,
5215,
679,
3670,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
931,
13,
13,
3166,
19229,
1053,
2391,
13,
3166,
19229,
1053,
12603,
552,
13,
13,
3166,
6494,
2774,
2817,
29889,
24209,
3298,
1053,
16455,
3298,
13,
3166,
6494,
2774,
2817,
29889,
9435,
1053,
1480,
13,
3166,
6494,
2774,
2817,
29889,
9435,
29889,
3126,
1053,
1303,
29918,
3126,
13,
3166,
6494,
2774,
2817,
29889,
9435,
29889,
3126,
1053,
2436,
29918,
3126,
13,
3166,
6494,
2774,
2817,
29889,
9435,
29889,
1188,
29918,
10382,
261,
1053,
5142,
29918,
1188,
13,
3166,
6494,
2774,
2817,
29889,
9435,
29889,
13239,
1053,
679,
29918,
3784,
29918,
9700,
29918,
3259,
29918,
4906,
13,
13,
3166,
9483,
2265,
29889,
2917,
1053,
12782,
13,
3166,
9483,
2265,
29889,
4299,
29889,
9057,
18784,
1053,
17163,
20547,
13,
3166,
9483,
2265,
29889,
18784,
29918,
5064,
1053,
349,
1466,
13409,
13,
3166,
9483,
2265,
29889,
13239,
1053,
22310,
29879,
13,
3166,
9483,
2265,
29889,
13096,
5570,
29889,
24209,
911,
29918,
392,
29918,
18307,
1053,
27599,
29918,
392,
29918,
18307,
13,
13,
13,
1990,
830,
5498,
1133,
12191,
2744,
14997,
3298,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1881,
29918,
1445,
29892,
6057,
29892,
3414,
29918,
978,
1125,
13,
4706,
1480,
29889,
3888,
877,
15514,
5281,
830,
5498,
1133,
12191,
2744,
14997,
3298,
29889,
1495,
13,
4706,
1583,
29889,
2080,
29918,
1445,
353,
1881,
29918,
1445,
13,
4706,
1583,
29889,
3389,
29879,
353,
6057,
13,
4706,
1583,
29889,
2917,
353,
12782,
29898,
7662,
29918,
978,
29897,
13,
4706,
1583,
29889,
13239,
353,
22310,
29879,
29898,
1311,
29889,
2917,
29897,
13,
4706,
1583,
29889,
24209,
3298,
353,
16455,
3298,
29889,
2744,
14997,
3298,
580,
13,
4706,
396,
17250,
5281,
5101,
29918,
5064,
881,
451,
367,
297,
903,
1457,
29918,
24209,
911,
1363,
591,
864,
278,
11000,
304,
7344,
2106,
1546,
13,
4706,
396,
29537,
292,
1269,
1065,
29889,
13,
4706,
1583,
29889,
18784,
29918,
5064,
353,
349,
1466,
13409,
29898,
2080,
29918,
1445,
29892,
1583,
29889,
13239,
29897,
13,
13,
4706,
396,
450,
2400,
8393,
526,
16601,
297,
903,
1457,
29918,
24209,
911,
29889,
13,
4706,
1583,
29889,
2962,
29918,
2230,
353,
6213,
13,
4706,
1583,
29889,
276,
5498,
1133,
29918,
20756,
353,
6213,
13,
4706,
1583,
29889,
276,
5498,
1133,
29918,
20756,
29918,
7054,
12339,
287,
353,
6213,
13,
4706,
1583,
29889,
2704,
29918,
2798,
353,
6213,
13,
13,
1678,
822,
1065,
29898,
1311,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
1583,
29889,
3389,
29879,
718,
29871,
29896,
1125,
13,
9651,
1583,
3032,
1457,
29918,
24209,
911,
580,
13,
9651,
1583,
3032,
24209,
911,
29898,
29875,
29897,
13,
9651,
1583,
3032,
2490,
29918,
24209,
911,
29898,
29875,
29897,
13,
4706,
1583,
3032,
4294,
29918,
276,
5498,
455,
29890,
1793,
580,
13,
4706,
1583,
3032,
3539,
29918,
4905,
29918,
3126,
580,
13,
4706,
1480,
29889,
3888,
877,
25632,
29991,
1495,
13,
13,
1678,
822,
903,
1457,
29918,
24209,
911,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
2538,
300,
2106,
1434,
29537,
292,
278,
2446,
1065,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
2962,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1583,
29889,
276,
5498,
1133,
29918,
20756,
353,
6571,
13,
4706,
1583,
29889,
276,
5498,
1133,
29918,
20756,
29918,
7054,
12339,
287,
353,
29871,
29900,
13,
4706,
1583,
29889,
2704,
29918,
2798,
353,
29871,
29900,
13,
13,
4706,
396,
2538,
300,
278,
1993,
1134,
7353,
1434,
1269,
1065,
13,
4706,
363,
364,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29901,
13,
9651,
363,
289,
29886,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29961,
29878,
1822,
4282,
29886,
7121,
29901,
13,
18884,
289,
29886,
29889,
842,
29918,
4352,
29918,
1853,
29889,
1767,
353,
7700,
13,
13,
1678,
822,
903,
24209,
911,
29898,
1311,
29892,
1065,
1125,
13,
4706,
9995,
13,
4706,
11597,
29891,
911,
263,
2323,
1065,
310,
9483,
1133,
2582,
29889,
13,
4706,
1152,
1269,
4982,
297,
263,
4982,
18784,
29892,
1423,
565,
278,
9483,
1133,
1480,
4864,
297,
278,
3414,
4138,
29889,
960,
372,
947,
29892,
769,
5142,
278,
13,
4706,
2441,
3201,
1730,
1480,
29889,
9788,
29892,
27599,
322,
7252,
278,
1023,
10748,
29889,
13,
4706,
9995,
13,
4706,
363,
364,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29901,
13,
9651,
363,
289,
29886,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29961,
29878,
1822,
4282,
29886,
7121,
29901,
13,
18884,
363,
432,
29886,
297,
289,
29886,
29889,
9057,
29886,
7121,
29901,
13,
462,
1678,
363,
432,
297,
432,
29886,
29889,
9057,
29879,
29901,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
29537,
287,
29918,
276,
5498,
1133,
29918,
1188,
353,
27599,
29918,
392,
29918,
18307,
29898,
1311,
29892,
432,
29892,
1065,
29897,
13,
462,
9651,
565,
29537,
287,
29918,
276,
5498,
1133,
29918,
1188,
29901,
13,
462,
18884,
1583,
29889,
276,
5498,
1133,
29918,
20756,
29918,
7054,
12339,
287,
4619,
29871,
29896,
13,
462,
4706,
5174,
8960,
408,
321,
29901,
13,
462,
9651,
1480,
29889,
2704,
877,
8566,
5336,
287,
385,
1059,
1550,
29537,
292,
322,
17420,
426,
6177,
6571,
4286,
4830,
29898,
29926,
29889,
9057,
29918,
978,
29892,
321,
876,
13,
462,
9651,
1583,
29889,
2704,
29918,
2798,
4619,
29871,
29896,
13,
4706,
1583,
29889,
18784,
29918,
5064,
29889,
5504,
29918,
4282,
18784,
29918,
15091,
29918,
4882,
580,
13,
4706,
1583,
29889,
18784,
29918,
5064,
29889,
16645,
29918,
18784,
29918,
4352,
29918,
8768,
580,
13,
4706,
1583,
29889,
18784,
29918,
5064,
29889,
16645,
29918,
18784,
29918,
4352,
29918,
18434,
29898,
3389,
29897,
13,
4706,
1583,
29889,
18784,
29918,
5064,
29889,
16645,
29918,
18784,
29918,
5041,
29918,
18434,
29898,
3389,
29897,
13,
13,
1678,
822,
903,
2490,
29918,
24209,
911,
29898,
1311,
29892,
1065,
1125,
13,
4706,
9995,
13,
4706,
910,
740,
338,
2000,
1156,
29537,
292,
1269,
1065,
29889,
13905,
13964,
763,
920,
1784,
11000,
19228,
322,
931,
560,
28170,
13,
4706,
322,
769,
7604,
675,
278,
1993,
4955,
1156,
445,
1065,
29889,
13,
4706,
9995,
13,
4706,
1480,
29889,
3888,
877,
25632,
29537,
292,
1065,
426,
1836,
4286,
4830,
29898,
3389,
876,
13,
4706,
1583,
3032,
20119,
675,
29918,
4352,
29918,
18434,
580,
13,
4706,
1480,
29889,
3888,
877,
8875,
9483,
1133,
10748,
29537,
287,
322,
6571,
4436,
297,
1065,
426,
1836,
29915,
13,
462,
869,
4830,
29898,
1311,
29889,
276,
5498,
1133,
29918,
20756,
29918,
7054,
12339,
287,
29892,
1583,
29889,
2704,
29918,
2798,
29892,
1065,
876,
13,
4706,
396,
13905,
263,
9654,
1196,
304,
5004,
1269,
1065,
29889,
13,
4706,
1480,
29889,
3888,
580,
13,
4706,
286,
4317,
353,
1583,
29889,
13239,
29889,
11433,
29918,
4317,
29885,
29918,
2798,
29898,
1311,
29889,
18784,
29918,
5064,
29897,
13,
4706,
263,
7340,
353,
1583,
29889,
13239,
29889,
11433,
29918,
7340,
29874,
29918,
2798,
29898,
1311,
29889,
18784,
29918,
5064,
29897,
13,
4706,
1480,
29889,
8382,
877,
9652,
4072,
297,
1065,
426,
6177,
286,
29896,
29899,
29885,
29906,
29899,
29885,
29941,
29901,
6571,
263,
29896,
29899,
29874,
29906,
29899,
29874,
29941,
29901,
426,
1836,
4286,
4830,
29898,
3389,
29892,
286,
4317,
29892,
263,
7340,
876,
13,
13,
1678,
822,
903,
3539,
29918,
4905,
29918,
3126,
29898,
1311,
1125,
13,
4706,
1480,
29889,
3888,
877,
29956,
768,
292,
1962,
4663,
9732,
630,
411,
1993,
4955,
29889,
1495,
13,
4706,
11000,
353,
1303,
29918,
3126,
29898,
1311,
29889,
2080,
29918,
1445,
29897,
13,
4706,
396,
14350,
2322,
8393,
29889,
13,
4706,
363,
282,
297,
11000,
29901,
13,
9651,
363,
432,
29886,
297,
282,
1839,
9057,
29886,
7121,
2033,
29901,
13,
18884,
432,
29886,
1839,
4352,
29918,
18434,
2033,
353,
6571,
13,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
4352,
29918,
18434,
2033,
353,
6571,
13,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
4352,
29918,
18434,
2033,
353,
6571,
13,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
12683,
29918,
2914,
2033,
353,
6629,
13,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
12683,
29918,
2914,
2033,
353,
6629,
13,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
29885,
1608,
905,
29918,
5552,
29879,
2033,
353,
5159,
13,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
29885,
1608,
905,
29918,
5552,
29879,
2033,
353,
5159,
13,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
13096,
29918,
5041,
2033,
353,
7700,
13,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
13096,
29918,
5041,
2033,
353,
7700,
13,
13,
4706,
363,
282,
297,
11000,
29901,
13,
9651,
13761,
353,
282,
1839,
20095,
2033,
13,
9651,
565,
13761,
451,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29901,
13,
18884,
6773,
13,
13,
9651,
396,
3967,
304,
1284,
445,
2048,
5101,
297,
5101,
4818,
29889,
13,
9651,
363,
289,
29886,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29961,
20095,
1822,
4282,
29886,
7121,
29901,
13,
18884,
565,
282,
1839,
26061,
29918,
4282,
16215,
4282,
29918,
333,
2033,
1275,
289,
29886,
29889,
4282,
29879,
29961,
29900,
1822,
4282,
29918,
333,
29901,
13,
462,
1678,
396,
7460,
2048,
5101,
297,
5101,
4818,
29889,
13,
13,
462,
1678,
396,
28379,
29901,
14350,
2048,
18784,
1993,
1134,
29889,
13,
462,
1678,
396,
910,
338,
451,
1304,
1951,
591,
26263,
304,
4982,
18784,
4870,
6751,
29889,
13,
462,
1678,
282,
1839,
4352,
2033,
353,
289,
29886,
29889,
4352,
29889,
1767,
13,
462,
1678,
7135,
29918,
17051,
353,
282,
1839,
26061,
29918,
4282,
16215,
2813,
29918,
17051,
2033,
13,
462,
1678,
396,
20175,
29892,
363,
1269,
4982,
5101,
297,
2048,
5101,
29892,
1018,
304,
1284,
372,
297,
278,
5101,
4818,
29889,
13,
462,
1678,
363,
432,
29886,
297,
282,
1839,
9057,
29886,
7121,
2033,
29901,
13,
462,
4706,
396,
1152,
263,
2048,
393,
756,
777,
17643,
22289,
322,
777,
17643,
451,
22289,
29892,
13,
462,
4706,
396,
278,
4982,
2609,
367,
1476,
297,
5101,
5064,
29889,
13,
462,
4706,
565,
432,
29886,
1839,
275,
29918,
4572,
287,
2033,
29901,
13,
462,
9651,
6773,
13,
13,
462,
4706,
1476,
29918,
262,
29918,
18784,
5064,
353,
7700,
13,
462,
4706,
363,
4982,
18784,
297,
289,
29886,
29889,
9057,
29886,
7121,
29901,
13,
462,
9651,
565,
851,
29898,
9057,
18784,
29889,
9057,
29879,
29961,
29900,
1822,
9057,
29918,
333,
29897,
1275,
851,
29898,
16865,
1839,
26061,
29918,
9057,
16215,
9057,
29918,
333,
2033,
1125,
13,
462,
18884,
1476,
29918,
262,
29918,
18784,
5064,
353,
5852,
13,
462,
18884,
396,
14350,
4982,
18784,
1993,
4955,
29892,
29537,
287,
2582,
29892,
322,
29635,
287,
8393,
29889,
13,
462,
18884,
432,
29886,
1839,
4352,
29918,
18434,
2033,
353,
4982,
18784,
29889,
4352,
29918,
18434,
13,
462,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
4352,
29918,
18434,
2033,
353,
4982,
18784,
29889,
26061,
29918,
9057,
29918,
4352,
29918,
18434,
13,
462,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
4352,
29918,
18434,
2033,
353,
4982,
18784,
29889,
3364,
287,
29918,
9057,
29918,
4352,
29918,
18434,
13,
462,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
12683,
29918,
2914,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29900,
1822,
12683,
29918,
2914,
13,
462,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
12683,
29918,
2914,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29896,
1822,
12683,
29918,
2914,
13,
462,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
29885,
1608,
905,
29918,
5552,
29879,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29900,
1822,
29885,
1608,
905,
29918,
5552,
29879,
13,
462,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
29885,
1608,
905,
29918,
5552,
29879,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29896,
1822,
29885,
1608,
905,
29918,
5552,
29879,
13,
462,
18884,
432,
29886,
1839,
26061,
29918,
9057,
16215,
13096,
29918,
5041,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29900,
1822,
13096,
29918,
5041,
13,
462,
18884,
432,
29886,
1839,
3364,
287,
29918,
9057,
16215,
13096,
29918,
5041,
2033,
353,
4982,
18784,
29889,
9057,
29879,
29961,
29896,
1822,
13096,
29918,
5041,
13,
13,
462,
4706,
565,
451,
1476,
29918,
262,
29918,
18784,
5064,
29901,
13,
462,
9651,
396,
960,
451,
1476,
297,
5101,
4818,
29892,
445,
4982,
18784,
471,
22289,
714,
29889,
13,
462,
9651,
396,
512,
445,
1206,
29892,
591,
1603,
27599,
278,
2441,
1480,
304,
679,
408,
1784,
8393,
408,
1950,
29889,
13,
462,
9651,
363,
474,
297,
3464,
29898,
29906,
1125,
13,
462,
18884,
4982,
29918,
978,
353,
525,
26061,
29918,
9057,
29915,
565,
474,
1275,
29871,
29900,
1683,
525,
3364,
287,
29918,
9057,
29915,
13,
462,
18884,
4982,
29918,
333,
353,
432,
29886,
29961,
9057,
29918,
978,
22322,
9057,
29918,
333,
2033,
13,
462,
18884,
2441,
29918,
1188,
29918,
2084,
353,
1583,
29889,
13239,
29889,
657,
29918,
12683,
29918,
1188,
29918,
2084,
29898,
9057,
29918,
333,
29897,
13,
462,
18884,
565,
451,
5142,
29918,
1188,
29898,
9057,
29918,
333,
29892,
2441,
29918,
1188,
29918,
2084,
1125,
13,
462,
462,
1678,
6773,
13,
462,
18884,
2441,
29918,
2914,
353,
1583,
29889,
24209,
3298,
29889,
24209,
911,
29918,
14369,
29918,
1188,
29898,
13492,
29918,
1188,
29918,
2084,
29892,
4982,
29918,
333,
29892,
13,
462,
462,
462,
462,
462,
259,
7135,
29918,
17051,
29892,
13761,
29897,
13,
462,
18884,
565,
525,
1333,
29918,
262,
29918,
23765,
29918,
11675,
29915,
297,
2441,
29918,
2914,
29901,
13,
462,
462,
1678,
6773,
13,
462,
18884,
432,
29886,
29961,
9057,
29918,
978,
22322,
12683,
29918,
2914,
2033,
353,
2441,
29918,
2914,
13,
462,
9651,
12020,
24875,
2392,
877,
29965,
13996,
6021,
2106,
29901,
17163,
18784,
451,
1476,
297,
5101,
4818,
29889,
1222,
11407,
29889,
1495,
13,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
2917,
29889,
2914,
29918,
3126,
29918,
3972,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
10422,
353,
1583,
29889,
2917,
29889,
7662,
718,
15300,
3126,
29915,
13,
4706,
934,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
2917,
29889,
2914,
29918,
3126,
29918,
3972,
29892,
10422,
29897,
13,
4706,
2436,
29918,
3126,
29898,
1445,
2084,
29892,
11000,
29897,
13,
13,
1678,
822,
903,
657,
29918,
497,
29918,
9057,
29886,
7121,
29918,
392,
29918,
497,
29918,
3389,
29879,
29898,
1311,
29897,
1599,
12603,
552,
29961,
1293,
29961,
11947,
20547,
1402,
2391,
29961,
710,
5262,
29901,
13,
4706,
599,
29918,
9057,
29886,
7121,
353,
5159,
13,
4706,
363,
364,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29901,
13,
9651,
363,
289,
29886,
297,
1583,
29889,
18784,
29918,
5064,
29889,
276,
1066,
29961,
29878,
1822,
4282,
29886,
7121,
29901,
13,
18884,
363,
432,
29886,
297,
289,
29886,
29889,
9057,
29886,
7121,
29901,
13,
462,
1678,
599,
29918,
9057,
29886,
7121,
29889,
4397,
29898,
16865,
29897,
13,
4706,
599,
29918,
3389,
29879,
353,
5159,
13,
4706,
363,
432,
29886,
297,
599,
29918,
9057,
29886,
7121,
29901,
13,
9651,
363,
1065,
297,
432,
29886,
29889,
4352,
29918,
18434,
29901,
13,
18884,
599,
29918,
3389,
29879,
29889,
4397,
29898,
3389,
29897,
13,
4706,
599,
29918,
3389,
29879,
353,
1051,
29898,
842,
29898,
497,
29918,
3389,
29879,
876,
13,
4706,
599,
29918,
3389,
29879,
29889,
6605,
580,
13,
4706,
736,
599,
29918,
9057,
29886,
7121,
29892,
599,
29918,
3389,
29879,
13,
13,
1678,
822,
903,
20119,
675,
29918,
4352,
29918,
18434,
29898,
1311,
1125,
13,
4706,
1480,
29889,
3888,
877,
16227,
5281,
1993,
4955,
29901,
1495,
13,
4706,
1480,
29889,
3888,
877,
29940,
2794,
694,
9483,
1133,
1480,
4864,
29889,
313,
2744,
1059,
2179,
2955,
297,
9483,
2265,
1550,
9483,
3277,
278,
4982,
1846,
1495,
13,
4706,
599,
29918,
9057,
29886,
7121,
29892,
599,
29918,
3389,
29879,
353,
1583,
3032,
657,
29918,
497,
29918,
9057,
29886,
7121,
29918,
392,
29918,
497,
29918,
3389,
29879,
580,
13,
4706,
363,
432,
29886,
297,
599,
29918,
9057,
29886,
7121,
29901,
13,
9651,
1480,
29889,
3888,
29898,
16865,
29889,
8159,
29918,
978,
29897,
13,
9651,
1993,
29918,
16211,
583,
353,
518,
13,
18884,
313,
16865,
29889,
4352,
29918,
18434,
29892,
525,
11947,
5101,
5477,
13,
18884,
313,
16865,
29889,
26061,
29918,
9057,
29918,
4352,
29918,
18434,
29892,
525,
17776,
4982,
5477,
13,
18884,
313,
16865,
29889,
3364,
287,
29918,
9057,
29918,
4352,
29918,
18434,
29892,
525,
7129,
287,
4982,
5477,
13,
9651,
4514,
13,
9651,
363,
1993,
29918,
18434,
29892,
4955,
29918,
978,
297,
1993,
29918,
16211,
583,
29901,
13,
18884,
396,
9330,
1024,
338,
1065,
1353,
29871,
29896,
29899,
29945,
13,
18884,
286,
29882,
353,
518,
710,
29898,
4352,
29918,
18434,
29889,
657,
29898,
3389,
29892,
525,
29940,
8785,
363,
1065,
297,
599,
29918,
3389,
29879,
29962,
13,
18884,
565,
286,
29882,
29901,
13,
462,
1678,
2989,
29918,
18434,
29918,
978,
353,
525,
8875,
1993,
4955,
4286,
4830,
29898,
18434,
29918,
978,
29897,
13,
462,
1678,
1480,
29889,
3888,
877,
25641,
29958,
29906,
29946,
6177,
4286,
4830,
29898,
8159,
29918,
18434,
29918,
978,
511,
525,
1599,
15300,
7122,
29898,
29885,
29882,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
1480,
29889,
3888,
877,
3782,
1993,
4955,
29889,
313,
4013,
4982,
18784,
338,
451,
9483,
1133,
1846,
1495,
13,
13,
1678,
822,
903,
4294,
29918,
276,
5498,
455,
29890,
1793,
29898,
1311,
1125,
13,
4706,
1480,
29889,
3888,
877,
16227,
5281,
9483,
455,
29890,
1793,
29901,
1495,
13,
4706,
599,
29918,
9057,
29886,
7121,
29892,
599,
29918,
3389,
29879,
353,
1583,
3032,
657,
29918,
497,
29918,
9057,
29886,
7121,
29918,
392,
29918,
497,
29918,
3389,
29879,
580,
13,
4706,
565,
451,
599,
29918,
9057,
29886,
7121,
29901,
13,
9651,
1480,
29889,
3888,
877,
26521,
304,
7604,
675,
1951,
694,
17643,
892,
1065,
29889,
1495,
13,
4706,
1683,
29901,
13,
9651,
2989,
29918,
978,
29918,
3317,
29918,
2848,
353,
4236,
4197,
2435,
29898,
16865,
29889,
8159,
29918,
978,
29897,
363,
432,
29886,
297,
599,
29918,
9057,
29886,
7121,
2314,
13,
9651,
363,
432,
29886,
297,
599,
29918,
9057,
29886,
7121,
29901,
13,
18884,
286,
29882,
353,
5159,
13,
18884,
363,
1065,
297,
599,
29918,
3389,
29879,
29901,
13,
462,
1678,
1065,
29918,
2914,
353,
432,
29886,
29889,
4352,
29918,
18434,
29889,
657,
29898,
3389,
29897,
13,
462,
1678,
396,
1065,
29918,
2914,
1033,
367,
525,
29940,
742,
29871,
29900,
29892,
470,
29871,
29896,
13,
462,
1678,
565,
1065,
29918,
2914,
2804,
29871,
29896,
29901,
13,
462,
4706,
286,
29882,
29889,
4397,
29898,
29900,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
286,
29882,
29889,
4397,
29898,
3389,
29918,
2914,
29897,
13,
13,
18884,
396,
1939,
9483,
3277,
6057,
892,
9150,
13,
18884,
565,
599,
29898,
29894,
1275,
29871,
29900,
363,
325,
297,
286,
29882,
1125,
13,
462,
1678,
9483,
455,
29890,
1793,
353,
525,
2525,
276,
5498,
15520,
29915,
13,
18884,
396,
1993,
4955,
338,
599,
29871,
29896,
29879,
29892,
599,
6057,
9483,
15520,
13,
18884,
25342,
599,
29898,
29885,
29882,
1125,
13,
462,
1678,
9483,
455,
29890,
1793,
353,
525,
1123,
5498,
15520,
29915,
13,
18884,
1683,
29901,
13,
462,
1678,
9483,
455,
29890,
1793,
353,
525,
29943,
433,
3459,
29915,
13,
18884,
1480,
29889,
3888,
877,
29912,
8159,
29918,
978,
29901,
1405,
29912,
2103,
930,
4982,
5101,
9483,
455,
29890,
1793,
29901,
426,
2914,
10162,
13,
462,
308,
869,
4830,
29898,
2103,
29922,
8159,
29918,
978,
29918,
3317,
29918,
2848,
29892,
2989,
29918,
978,
29922,
16865,
29889,
8159,
29918,
978,
29892,
1121,
29922,
276,
5498,
455,
29890,
1793,
876,
13,
4706,
396,
13905,
263,
9654,
28128,
1196,
29889,
13,
4706,
1480,
29889,
3888,
580,
13,
13,
13,
1753,
903,
2158,
29918,
21125,
7295,
13,
1678,
1480,
29889,
3888,
877,
27573,
29901,
3017,
29941,
9483,
1133,
29918,
9902,
29918,
24209,
3298,
29889,
2272,
448,
29875,
529,
2080,
29918,
1445,
29958,
448,
29876,
529,
3389,
29879,
29958,
1192,
7662,
29899,
978,
529,
7662,
29918,
978,
29958,
1495,
13,
1678,
1480,
29889,
3888,
877,
25641,
29966,
29941,
29900,
1157,
29901,
29966,
29941,
29900,
29913,
4286,
4830,
877,
29899,
29875,
29892,
1192,
2080,
29899,
1445,
742,
525,
2605,
304,
263,
4663,
934,
6943,
4418,
29899,
3364,
11000,
304,
18532,
6169,
876,
13,
1678,
1480,
29889,
3888,
877,
25641,
29966,
29941,
29900,
1157,
29901,
29966,
29941,
29900,
29913,
4286,
4830,
877,
29899,
29876,
29892,
1192,
3389,
29879,
742,
525,
4557,
310,
9483,
2265,
6057,
304,
27599,
6169,
876,
13,
1678,
1480,
29889,
3888,
877,
25641,
29966,
29941,
29900,
1157,
29901,
29966,
29941,
29900,
29913,
4286,
4830,
877,
489,
7662,
29899,
978,
742,
525,
1170,
310,
3414,
4138,
29892,
470,
2322,
304,
278,
1024,
310,
4663,
934,
8785,
13,
13,
13,
1753,
903,
15480,
29918,
2080,
29898,
19218,
1125,
13,
1678,
3273,
25707,
353,
525,
29875,
29901,
29876,
11283,
13,
1678,
1472,
25707,
353,
525,
2080,
29899,
1445,
29922,
6057,
29922,
3414,
29899,
978,
2433,
29889,
5451,
580,
13,
1678,
1881,
29918,
1445,
353,
6213,
13,
1678,
6057,
353,
29871,
29900,
13,
1678,
3414,
29918,
978,
353,
6213,
13,
1678,
1018,
29901,
13,
4706,
3523,
1761,
29892,
6389,
353,
679,
3670,
29889,
657,
3670,
29898,
19218,
29961,
29896,
29901,
1402,
3273,
25707,
29892,
1472,
25707,
29897,
13,
1678,
5174,
679,
3670,
29889,
2577,
3670,
2392,
29901,
13,
4706,
1480,
29889,
2704,
877,
23323,
451,
6088,
6273,
29889,
1222,
11407,
29889,
1495,
13,
4706,
903,
2158,
29918,
21125,
580,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
13,
1678,
363,
3523,
29892,
1852,
297,
3523,
1761,
29901,
13,
4706,
565,
3523,
297,
6702,
29899,
29875,
742,
525,
489,
2080,
29899,
1445,
29374,
13,
9651,
1881,
29918,
1445,
353,
1852,
13,
4706,
565,
3523,
297,
6702,
29899,
29876,
742,
525,
489,
3389,
29879,
29374,
13,
9651,
1018,
29901,
13,
18884,
6057,
353,
938,
29898,
1191,
29897,
13,
9651,
5174,
313,
1917,
2392,
29892,
20948,
1125,
13,
18884,
1480,
29889,
2704,
877,
1576,
6057,
2980,
1818,
367,
385,
6043,
29889,
1495,
13,
18884,
903,
2158,
29918,
21125,
580,
13,
18884,
10876,
29889,
13322,
29898,
29906,
29897,
13,
4706,
565,
3523,
297,
525,
489,
7662,
29899,
978,
2396,
13,
9651,
3414,
29918,
978,
353,
1852,
13,
13,
1678,
565,
451,
1881,
29918,
1445,
29901,
13,
4706,
903,
2158,
29918,
21125,
580,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
2080,
29918,
1445,
1125,
13,
4706,
1480,
29889,
2704,
877,
1576,
1881,
29918,
1445,
2980,
338,
451,
263,
934,
470,
947,
451,
1863,
29889,
1222,
11407,
29889,
1495,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
1678,
565,
451,
6057,
29901,
13,
4706,
903,
2158,
29918,
21125,
580,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
1678,
565,
451,
3414,
29918,
978,
29901,
13,
4706,
903,
2158,
29918,
21125,
580,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
13,
1678,
736,
1881,
29918,
1445,
29892,
6057,
29892,
3414,
29918,
978,
13,
13,
13,
1753,
1667,
29898,
19218,
29922,
8516,
1125,
13,
1678,
1852,
29894,
353,
1852,
29894,
470,
10876,
29889,
19218,
13,
13,
1678,
396,
1281,
4532,
12183,
29889,
13,
1678,
1480,
29889,
2917,
29918,
21027,
29898,
657,
5552,
29898,
21027,
29892,
525,
11690,
742,
6213,
876,
13,
13,
1678,
396,
4522,
278,
1857,
1873,
310,
445,
28209,
10840,
2817,
4163,
29889,
13,
1678,
1480,
29889,
3888,
29898,
657,
29918,
3784,
29918,
9700,
29918,
3259,
29918,
4906,
877,
1123,
5498,
1133,
12191,
2744,
14997,
3298,
8785,
13,
13,
1678,
1881,
29918,
1445,
29892,
6057,
29892,
3414,
29918,
978,
353,
903,
15480,
29918,
2080,
29898,
19218,
29897,
13,
1678,
830,
5498,
1133,
12191,
2744,
14997,
3298,
29898,
2080,
29918,
1445,
29892,
6057,
29892,
3414,
29918,
978,
467,
3389,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
10876,
29889,
13322,
29898,
3396,
3101,
13,
2
] |
dashPages/value_boxes/callbacks.py | jinniuai/dash-fasta | 0 | 198724 | <reponame>jinniuai/dash-fasta
from main import app
from dash.dependencies import Input, Output, State
| [
1,
529,
276,
1112,
420,
29958,
28789,
21399,
1794,
29914,
14592,
29899,
29888,
5427,
13,
3166,
1667,
1053,
623,
13,
3166,
12569,
29889,
22594,
418,
1053,
10567,
29892,
10604,
29892,
4306,
13,
13,
2
] |
public_plugins/portals/portals.py | Infinity-LTD/discord_gradiusbot | 10 | 115622 | <reponame>Infinity-LTD/discord_gradiusbot
import asyncio
import logging
logger = logging.getLogger('gradiusbot')
logger.info("[Public Plugin] <portals.py>: This plugin allows you to use portals to move your messages around!")
portal_dict = {}
@asyncio.coroutine
async def action(**kwargs):
message = kwargs['message']
config = kwargs['config']
client = kwargs['client']
# if the portal is blue, store a key:value of user:portal content
if '<:portal_blue:502170507198857226>' in message.content:
remaining_content = message.content.replace('<:portal_blue:502170507198857226>', '')
portal_dict[message.author.id] = {"content": remaining_content, "message": message}
# if the portal is red, check to see if the user has any blue portals, and move the content from there, to here.
if '<:portal_orange:502170488680874004>' in message.content:
if message.author.id in portal_dict.keys() and portal_dict[message.author.id]:
await message.channel.send('<@' + str(message.author.id) + '>: <:portal_orange:502170488680874004>' + portal_dict[message.author.id]['content'])
await portal_dict[message.author.id]['message'].delete()
await message.delete()
portal_dict[message.author.id] = None
| [
1,
529,
276,
1112,
420,
29958,
797,
4951,
537,
29899,
5850,
29928,
29914,
2218,
16090,
29918,
5105,
2482,
7451,
13,
5215,
408,
948,
3934,
13,
5215,
12183,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
877,
5105,
2482,
7451,
1495,
13,
13,
21707,
29889,
3888,
703,
29961,
19858,
1858,
3851,
29962,
529,
637,
1338,
29889,
2272,
23917,
910,
7079,
6511,
366,
304,
671,
2011,
1338,
304,
4337,
596,
7191,
2820,
29991,
1159,
13,
13,
25089,
29918,
8977,
353,
6571,
13,
13,
13,
29992,
294,
948,
3934,
29889,
2616,
449,
457,
13,
12674,
822,
3158,
29898,
1068,
19290,
1125,
13,
1678,
2643,
353,
9049,
5085,
1839,
4906,
2033,
13,
1678,
2295,
353,
9049,
5085,
1839,
2917,
2033,
13,
1678,
3132,
353,
9049,
5085,
1839,
4645,
2033,
13,
13,
1678,
396,
565,
278,
25792,
338,
7254,
29892,
3787,
263,
1820,
29901,
1767,
310,
1404,
29901,
25089,
2793,
13,
1678,
565,
12801,
29901,
25089,
29918,
9539,
29901,
29945,
29900,
29906,
29896,
29955,
29900,
29945,
29900,
29955,
29896,
29929,
29947,
29947,
29945,
29955,
29906,
29906,
29953,
16299,
297,
2643,
29889,
3051,
29901,
13,
4706,
9886,
29918,
3051,
353,
2643,
29889,
3051,
29889,
6506,
877,
29966,
29901,
25089,
29918,
9539,
29901,
29945,
29900,
29906,
29896,
29955,
29900,
29945,
29900,
29955,
29896,
29929,
29947,
29947,
29945,
29955,
29906,
29906,
29953,
29958,
742,
27255,
13,
4706,
25792,
29918,
8977,
29961,
4906,
29889,
8921,
29889,
333,
29962,
353,
8853,
3051,
1115,
9886,
29918,
3051,
29892,
376,
4906,
1115,
2643,
29913,
13,
13,
1678,
396,
565,
278,
25792,
338,
2654,
29892,
1423,
304,
1074,
565,
278,
1404,
756,
738,
7254,
2011,
1338,
29892,
322,
4337,
278,
2793,
515,
727,
29892,
304,
1244,
29889,
13,
1678,
565,
12801,
29901,
25089,
29918,
272,
927,
29901,
29945,
29900,
29906,
29896,
29955,
29900,
29946,
29947,
29947,
29953,
29947,
29900,
29947,
29955,
29946,
29900,
29900,
29946,
16299,
297,
2643,
29889,
3051,
29901,
13,
4706,
565,
2643,
29889,
8921,
29889,
333,
297,
25792,
29918,
8977,
29889,
8149,
580,
322,
25792,
29918,
8977,
29961,
4906,
29889,
8921,
29889,
333,
5387,
13,
9651,
7272,
2643,
29889,
12719,
29889,
6717,
877,
29966,
29992,
29915,
718,
851,
29898,
4906,
29889,
8921,
29889,
333,
29897,
718,
525,
23917,
529,
29901,
25089,
29918,
272,
927,
29901,
29945,
29900,
29906,
29896,
29955,
29900,
29946,
29947,
29947,
29953,
29947,
29900,
29947,
29955,
29946,
29900,
29900,
29946,
16299,
718,
25792,
29918,
8977,
29961,
4906,
29889,
8921,
29889,
333,
22322,
3051,
11287,
13,
9651,
7272,
25792,
29918,
8977,
29961,
4906,
29889,
8921,
29889,
333,
22322,
4906,
13359,
8143,
580,
13,
9651,
7272,
2643,
29889,
8143,
580,
13,
9651,
25792,
29918,
8977,
29961,
4906,
29889,
8921,
29889,
333,
29962,
353,
6213,
13,
2
] |
Problem 10/advent10b.py | mankybansal/advent-of-code-2020 | 0 | 41664 | from collections import Counter
adapters = []
for line in open('input.txt', 'r').readlines():
adapters.append(int(line.strip()))
adapters = sorted(adapters)
device_joltage = adapters[-1] + 3
adapters.append(device_joltage)
dp = Counter()
dp[0] = 1
for adapter in adapters:
dp[adapter] = dp[adapter - 3] + dp[adapter - 2] + dp[adapter - 1]
print(dp[device_joltage])
| [
1,
515,
16250,
1053,
315,
5336,
13,
13,
328,
481,
2153,
353,
5159,
13,
1454,
1196,
297,
1722,
877,
2080,
29889,
3945,
742,
525,
29878,
2824,
949,
9012,
7295,
13,
12,
328,
481,
2153,
29889,
4397,
29898,
524,
29898,
1220,
29889,
17010,
22130,
13,
13,
328,
481,
2153,
353,
12705,
29898,
328,
481,
2153,
29897,
13,
10141,
29918,
29926,
14339,
482,
353,
594,
481,
2153,
14352,
29896,
29962,
718,
29871,
29941,
13,
328,
481,
2153,
29889,
4397,
29898,
10141,
29918,
29926,
14339,
482,
29897,
13,
13,
6099,
353,
315,
5336,
580,
13,
6099,
29961,
29900,
29962,
353,
29871,
29896,
13,
13,
1454,
13304,
297,
594,
481,
2153,
29901,
13,
12,
6099,
29961,
21412,
29962,
353,
270,
29886,
29961,
21412,
448,
29871,
29941,
29962,
718,
270,
29886,
29961,
21412,
448,
29871,
29906,
29962,
718,
270,
29886,
29961,
21412,
448,
29871,
29896,
29962,
13,
13,
2158,
29898,
6099,
29961,
10141,
29918,
29926,
14339,
482,
2314,
13,
2
] |
claims_to_quality/lib/teradata_methods/sql_formatting.py | CMSgov/qpp-claims-to-quality-public | 13 | 61960 | <filename>claims_to_quality/lib/teradata_methods/sql_formatting.py
"""SQL formatting for Teradata queries."""
class SQLFormattingError(Exception):
"""Custom Exception handling for empty SQL lists."""
pass
def to_sql_list(iterable):
"""
Transform a Python list to a SQL list.
input = [a1, a2]
output = "('a1', 'a2')"
"""
if iterable:
return '(' + ', '.join("'" + str(item) + "'" for item in iterable) + ')'
else:
raise SQLFormattingError('No element in list. Cannot process IN statement.')
| [
1,
529,
9507,
29958,
29883,
8342,
29879,
29918,
517,
29918,
29567,
29914,
1982,
29914,
357,
7221,
29918,
23515,
29914,
2850,
29918,
689,
23980,
29889,
2272,
13,
15945,
29908,
4176,
15998,
363,
5061,
7221,
9365,
1213,
15945,
13,
13,
13,
1990,
3758,
2500,
23980,
2392,
29898,
2451,
1125,
13,
1678,
9995,
7281,
8960,
11415,
363,
4069,
3758,
8857,
1213,
15945,
13,
13,
1678,
1209,
13,
13,
13,
1753,
304,
29918,
2850,
29918,
1761,
29898,
1524,
519,
1125,
13,
1678,
9995,
13,
1678,
4103,
689,
263,
5132,
1051,
304,
263,
3758,
1051,
29889,
13,
13,
1678,
1881,
353,
518,
29874,
29896,
29892,
263,
29906,
29962,
13,
1678,
1962,
353,
376,
877,
29874,
29896,
742,
525,
29874,
29906,
1495,
29908,
13,
1678,
9995,
13,
1678,
565,
4256,
519,
29901,
13,
4706,
736,
525,
877,
718,
13420,
15300,
7122,
703,
11838,
718,
851,
29898,
667,
29897,
718,
376,
11838,
363,
2944,
297,
4256,
519,
29897,
718,
525,
16029,
13,
1678,
1683,
29901,
13,
4706,
12020,
3758,
2500,
23980,
2392,
877,
3782,
1543,
297,
1051,
29889,
15808,
1889,
2672,
3229,
29889,
1495,
13,
2
] |
zapbot.py | fernandoepm1/zapbot | 0 | 91129 | <reponame>fernandoepm1/zapbot<filename>zapbot.py<gh_stars>0
from selenium import webdriver
from time import sleep
import os
class Zapbot:
dir_path = os.getcwd()
chromedriver = os.path.join(dir_path, "chromedriver_linux64")
profile = os.path.join(dir_path, "profile", "wpp")
def __init__(self):
self.options = webdriver.ChromeOptions()
self.options.add_argument(r"user-data-dir={}".format(self.profile))
self.driver = webdriver.Chrome(self.chromedriver, chrome_options = self.options)
self.driver.get("https://web.whatsapp.com/")
self.driver.implicitly_wait(15)
def open_chat(self, contact_name):
try:
search_title = "Search or start new chat"
search_box = self.driver.find_element_by_xpath("//input[@title='{}']".format(search_title))
search_box.send_keys(contact_name)
sleep(2)
contact = self.driver.find_element_by_xpath("//span[@title='{}']".format(contact_name))
contact.click()
sleep(2)
except Exception as e:
print("Chat could not be opened", e)
def send_message(self, message):
try:
#chat_box_classes = "copyable-text selectable-text"
self.chat_box = self.driver.find_element_by_class_name("_3u328")
self.chat_box.send_keys(message)
sleep(1)
send_button = self.driver.find_element_by_xpath("//button//span[@data-icon='send']")
send_button.click()
sleep(2)
except Exception as e:
print("Could not send message to contact", e)
def send_media(self, media, caption_text = ""):
try:
clip_button = self.driver.find_element_by_xpath("//div[@role='button'][@title='Attach']")
clip_button.click()
sleep(2)
attach_file = self.driver.find_element_by_xpath("//input[@type='file']")
attach_file.send_keys(media)
sleep(3)
caption = self.driver.switch_to.active_element
caption.send_keys(caption_text)
sleep(3)
send_button = self.driver.find_element_by_xpath("//span[@data-icon='send-light']")
send_button.click()
except Exception as e:
print("Error sending media to contact", e)
bot = Zapbot()
bot.open_chat("contact name")
bot.send_message("a beautiful message")
bot.send_media("/path/to/file", "a great caption")
| [
1,
529,
276,
1112,
420,
29958,
24023,
1743,
1022,
29885,
29896,
29914,
29920,
481,
7451,
29966,
9507,
29958,
29920,
481,
7451,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
18866,
1053,
1856,
9465,
13,
3166,
931,
1053,
8709,
13,
5215,
2897,
13,
13,
1990,
796,
481,
7451,
29901,
13,
29871,
4516,
29918,
2084,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
29871,
25173,
287,
3511,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3972,
29918,
2084,
29892,
376,
27433,
287,
3511,
29918,
9389,
29953,
29946,
1159,
13,
29871,
8722,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3972,
29918,
2084,
29892,
376,
10185,
613,
376,
29893,
407,
1159,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
1125,
13,
1678,
1583,
29889,
6768,
353,
1856,
9465,
29889,
1451,
4871,
5856,
580,
13,
1678,
1583,
29889,
6768,
29889,
1202,
29918,
23516,
29898,
29878,
29908,
1792,
29899,
1272,
29899,
3972,
3790,
29913,
1642,
4830,
29898,
1311,
29889,
10185,
876,
13,
1678,
1583,
29889,
9465,
353,
1856,
9465,
29889,
1451,
4871,
29898,
1311,
29889,
27433,
287,
3511,
29892,
16735,
29918,
6768,
353,
1583,
29889,
6768,
29897,
13,
1678,
1583,
29889,
9465,
29889,
657,
703,
991,
597,
2676,
29889,
1332,
1446,
932,
29889,
510,
29914,
1159,
13,
1678,
1583,
29889,
9465,
29889,
6574,
4019,
368,
29918,
10685,
29898,
29896,
29945,
29897,
13,
13,
29871,
822,
1722,
29918,
13496,
29898,
1311,
29892,
6958,
29918,
978,
1125,
13,
1678,
1018,
29901,
13,
418,
2740,
29918,
3257,
353,
376,
7974,
470,
1369,
716,
13563,
29908,
13,
418,
2740,
29918,
1884,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
2080,
17548,
3257,
2433,
8875,
2033,
1642,
4830,
29898,
4478,
29918,
3257,
876,
13,
418,
2740,
29918,
1884,
29889,
6717,
29918,
8149,
29898,
12346,
29918,
978,
29897,
13,
418,
8709,
29898,
29906,
29897,
13,
13,
418,
6958,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
9653,
17548,
3257,
2433,
8875,
2033,
1642,
4830,
29898,
12346,
29918,
978,
876,
13,
418,
6958,
29889,
3808,
580,
13,
418,
8709,
29898,
29906,
29897,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
418,
1596,
703,
1451,
271,
1033,
451,
367,
6496,
613,
321,
29897,
13,
13,
29871,
822,
3638,
29918,
4906,
29898,
1311,
29892,
2643,
1125,
13,
1678,
1018,
29901,
13,
418,
396,
13496,
29918,
1884,
29918,
13203,
353,
376,
8552,
519,
29899,
726,
1831,
519,
29899,
726,
29908,
13,
418,
1583,
29889,
13496,
29918,
1884,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
1990,
29918,
978,
703,
29918,
29941,
29884,
29941,
29906,
29947,
1159,
13,
418,
1583,
29889,
13496,
29918,
1884,
29889,
6717,
29918,
8149,
29898,
4906,
29897,
13,
418,
8709,
29898,
29896,
29897,
13,
13,
418,
3638,
29918,
3092,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
3092,
458,
9653,
17548,
1272,
29899,
4144,
2433,
6717,
2033,
1159,
13,
418,
3638,
29918,
3092,
29889,
3808,
580,
13,
418,
8709,
29898,
29906,
29897,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
418,
1596,
703,
23323,
451,
3638,
2643,
304,
6958,
613,
321,
29897,
13,
13,
29871,
822,
3638,
29918,
9799,
29898,
1311,
29892,
5745,
29892,
5777,
683,
29918,
726,
353,
5124,
1125,
13,
1678,
1018,
29901,
13,
418,
20102,
29918,
3092,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
4563,
17548,
12154,
2433,
3092,
2033,
17548,
3257,
2433,
4165,
496,
2033,
1159,
13,
418,
20102,
29918,
3092,
29889,
3808,
580,
13,
418,
8709,
29898,
29906,
29897,
13,
13,
418,
10641,
29918,
1445,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
2080,
17548,
1853,
2433,
1445,
2033,
1159,
13,
418,
10641,
29918,
1445,
29889,
6717,
29918,
8149,
29898,
9799,
29897,
13,
418,
8709,
29898,
29941,
29897,
13,
13,
418,
5777,
683,
353,
1583,
29889,
9465,
29889,
15123,
29918,
517,
29889,
4925,
29918,
5029,
13,
418,
5777,
683,
29889,
6717,
29918,
8149,
29898,
6671,
29918,
726,
29897,
13,
418,
8709,
29898,
29941,
29897,
13,
13,
418,
3638,
29918,
3092,
353,
1583,
29889,
9465,
29889,
2886,
29918,
5029,
29918,
1609,
29918,
23635,
703,
458,
9653,
17548,
1272,
29899,
4144,
2433,
6717,
29899,
4366,
2033,
1159,
13,
418,
3638,
29918,
3092,
29889,
3808,
580,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
418,
1596,
703,
2392,
9348,
5745,
304,
6958,
613,
321,
29897,
13,
13,
7451,
353,
796,
481,
7451,
580,
13,
7451,
29889,
3150,
29918,
13496,
703,
12346,
1024,
1159,
13,
7451,
29889,
6717,
29918,
4906,
703,
29874,
9560,
2643,
1159,
13,
7451,
29889,
6717,
29918,
9799,
11974,
2084,
29914,
517,
29914,
1445,
613,
376,
29874,
2107,
5777,
683,
1159,
13,
2
] |
louis/webdev/myblog/blog/admin.py | GadinganJayHarley06/intern-blog | 0 | 35293 | <filename>louis/webdev/myblog/blog/admin.py
from django.contrib import admin
from .models import Index, Tag, Category, Post
# Register your models here.
admin.site.register(Index)
admin.site.register(Tag)
admin.site.register(Category)
admin.site.register(Post) | [
1,
529,
9507,
29958,
23581,
275,
29914,
2676,
3359,
29914,
1357,
7312,
29914,
7312,
29914,
6406,
29889,
2272,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
13,
3166,
869,
9794,
1053,
11374,
29892,
10522,
29892,
17943,
29892,
4918,
13,
13,
29937,
12577,
596,
4733,
1244,
29889,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
3220,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
8176,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
10900,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
6747,
29897,
2
] |
scholarly_citation_finder/apps/parser/Parser.py | citationfinder/scholarly_citation_finder | 1 | 111599 | <reponame>citationfinder/scholarly_citation_finder
#!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
from django.db import connections
from django.db.utils import IntegrityError, DataError, ProgrammingError
from .AuthorParser import AuthorParser
from .Exceptions import ParserRollbackError, ParserDataError
from scholarly_citation_finder.lib.string import normalize_string
logger = logging.getLogger(__name__)
class Parser:
'''
Parse a entry and store it in the database.
'''
PUBLICATION_ATTRIBUTES = [
'type',
'title',
'date',
'booktitle'
#'journal',
'volume',
'number',
'pages_from',
'pages_to',
'series',
'publisher',
'isbn',
'doi',
'abstract',
'copyright'
]
def __init__(self, database):
'''
Create object.
:param database: Database name
'''
self.conn = connections[database]
self.cursor = self.conn.cursor()
self.count_publications = 0
self.author_parser = AuthorParser(database=database)
def commit(self):
'''
Commit database changes.
:raise ParserRollbackError When a problems occurred, that required to do a rollback
'''
try:
logger.info('commit')
self.conn.commit()
except(IntegrityError) as e:
logger.error(e, exc_info=True)
self.conn.rollback()
raise ParserRollbackError(e)
def parse_author(self, name):
'''
If the author with the given name already exists, the ID of that author is returned.
Otherwise a new author gets created.
:param name: Name of the author
:return: ID of the author
:raise ParserDataError: When the name is too long
'''
name = normalize_string(name)
self.cursor.execute("SELECT id FROM core_author WHERE name LIKE %s LIMIT 1", [name])
result = self.cursor.fetchone()
if result:
return result[0]
else:
if name and len(name) <= 100:
self.cursor.execute("INSERT INTO core_author (name) VALUES (%s) RETURNING id", [name])
return self.cursor.fetchone()[0]
else:
raise ParserDataError('Author name is too long')
def parse_journal(self, name):
'''
If the journal with the given name already exists, the ID of that journal is returned.
Otherwise a new journel gets created.
:param name: Name of the journal
:return: ID of the journal
:raise ParserDataError: When the name is too long
'''
name = normalize_string(name)
self.cursor.execute("SELECT id FROM core_journal WHERE name LIKE %s LIMIT 1", [name])
result = self.cursor.fetchone()
if result:
return result[0]
else:
if name and len(name) <= 250:
self.cursor.execute("INSERT INTO core_journal (name) VALUES (%s) RETURNING id", [name])
return self.cursor.fetchone()[0]
else:
raise ParserDataError('Journal name is too long')
def parse_conference(self, short_name):
'''
Parse a conference.
:param short_name:
'''
short_name = normalize_string(short_name)
self.cursor.execute("SELECT id FROM core_conference WHERE short_name LIKE %s LIMIT 1", [short_name])
result = self.cursor.fetchone()
if result:
return result[0]
else:
if short_name and len(short_name) <= 20:
self.cursor.execute("INSERT INTO core_conference (short_name) VALUES (%s) RETURNING id", [short_name])
return self.cursor.fetchone()[0]
else:
raise ParserDataError('Conference short name is too long: %s' % short_name)
def parse_publication(self, type=None, title=None, year=None, date=None, booktitle=None, journal_id=None, volume=None, number=None, pages_from=None, pages_to=None, series=None, publisher=None, isbn=None, doi=None, abstract=None, copyright=None, conference_id=None, source=None):
'''
Parse a publication.
:param type:
:param title:
:param year:
:param date:
:param booktitle:
:param journal_id:
:param volume:
:param number:
:param pages_from:
:param pages_to:
:param series:
:param publisher:
:param isbn:
:param doi:
:param abstract:
:param copyright:
:param conference_id:
:param source:
'''
if title and len(title) <= 250:
title = normalize_string(title)
self.cursor.execute("SELECT id FROM core_publication WHERE title LIKE %s LIMIT 1", [title])
result = self.cursor.fetchone()
if result:
return result[0]
else:
if date and len(date) > 50:
date = None
if booktitle and len(booktitle) > 200:
booktitle = None
if volume and len(volume) > 20:
volume = None
if number and len(number) > 20:
number = None
if pages_from and len(pages_from) > 5:
pages_from = None
if pages_to and len(pages_to) > 5:
pages_to = None
if series and len(series) > 200:
series = None
if publisher and len(publisher) > 150:
publisher = None
if isbn and len(isbn) > 50:
isbn = None
if doi and len(doi) > 50:
doi = None
self.cursor.execute("INSERT INTO core_publication (type, title, year, date, booktitle, journal_id, volume, number, pages_from, pages_to, series, publisher, isbn, doi, abstract, copyright, conference_id, source) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id", [type, title, year, date, booktitle, journal_id, volume, number, pages_from, pages_to, series, publisher, isbn, doi, abstract, copyright, conference_id, source])
return self.cursor.fetchone()[0]
else:
raise ParserDataError('Title does not exists or is too long')
def parse_reference(self, publication_id, reference_id, context=None, source_id=None):
'''
Parse a reference
:param publication_id:
:param reference_id:
:param context:
:param source_id:
'''
if publication_id and reference_id:
self.cursor.execute("INSERT INTO core_publicationreference (publication_id, reference_id, context, source_id) VALUES (%s, %s, %s, %s)", [publication_id, reference_id, context, source_id])
else:
raise ParserDataError('publication_id or reference_id does not exists')
def parse(self, publication, conference=None, journal_name=None, authors=None, keywords=None, urls=None, reference=None):
'''
Parse a entry.
:param publication: Publication dictionary
:param conference: Conference dictionary: 'short_name', 'instance_name'
:param journal_name: Journal name
:param authors: Authors name array
:param keywords: Keywords array
:param urls: URL array
:param reference: Reference dictionary
:return: Publication ID, if entry was successfully parsed; False otherwise
:raise ParserRollbackError: When a problems occurred, that required to do a rollback
'''
self.count_publications += 1
try:
conference_id = None
journal_id = None
# conference
if conference:
if 'short_name' in conference and conference['short_name']: # otherwise value can be None or NoneType
try:
conference_id = self.parse_conference(conference['short_name'])
except(ParserDataError) as e:
logger.warn(str(e))
elif 'instance_name' in conference:
logger.warn('Can not handle conference instance name yet: %s' % (conference['instance_name']))
del conference
# journal
if journal_name:
try:
journal_id = self.parse_journal(journal_name)
except(ParserDataError) as e:
logger.warn(str(e))
del journal_name
# publication
publication_id = self.parse_publication(conference_id=conference_id,
journal_id=journal_id,
**publication)
# authors
if authors:
for author in authors:
try:
self.cursor.execute("INSERT INTO core_publicationauthoraffilation (publication_id, author_id) VALUES (%s, %s)", [publication_id, self.author_parser.parse(author)])
except(ParserDataError, DataError) as e:
logger.warn(str(e))
except(IntegrityError) as e:
pass
del authors
# keywords
if keywords:
for keyword in keywords:
if keyword and len(keyword) <= 100:
keyword = normalize_string(keyword)
self.cursor.execute("INSERT INTO core_publicationkeyword (publication_id, name) VALUES (%s, %s)", [publication_id, keyword])
del keywords
# urls
if urls:
for url in urls:
url_type = None
if isinstance(url, dict):
url_type = url['type']
url = url['value']
if url and len(url) <= 200:
if url_type and len(url_type) >= 30:
url_type = None
self.cursor.execute("INSERT INTO core_publicationurl (publication_id, url, type) VALUES (%s, %s, %s)", [publication_id, url, url_type])
del urls
# reference
if reference:
try:
self.parse_reference(reference_id=publication_id, **reference)
except(ParserDataError) as e:
logger.warn(str(e))
del reference
return publication_id
except(ParserDataError) as e:
#logger.warn(str(e))
return False
except(ProgrammingError, DataError) as e:
logger.error(e, exc_info=True)
self.conn.rollback()
raise ParserRollbackError(str(e))
| [
1,
529,
276,
1112,
420,
29958,
29883,
7018,
2886,
261,
29914,
816,
10170,
368,
29918,
29883,
7018,
29918,
2886,
261,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
12183,
13,
3166,
9557,
29889,
2585,
1053,
12368,
13,
3166,
9557,
29889,
2585,
29889,
13239,
1053,
17100,
537,
2392,
29892,
3630,
2392,
29892,
7835,
4056,
2392,
13,
13,
3166,
869,
13720,
11726,
1053,
13361,
11726,
13,
3166,
869,
2451,
29879,
1053,
1459,
643,
29934,
3028,
1627,
2392,
29892,
1459,
643,
1469,
2392,
13,
3166,
21344,
368,
29918,
29883,
7018,
29918,
2886,
261,
29889,
1982,
29889,
1807,
1053,
4226,
675,
29918,
1807,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
1459,
643,
29901,
13,
1678,
14550,
13,
1678,
20969,
263,
6251,
322,
3787,
372,
297,
278,
2566,
29889,
13,
1678,
14550,
13,
13,
1678,
349,
7466,
27888,
8098,
29918,
1299,
29911,
3960,
29933,
2692,
2890,
353,
518,
13,
4706,
525,
1853,
742,
13,
4706,
525,
3257,
742,
13,
4706,
525,
1256,
742,
13,
4706,
525,
2909,
3257,
29915,
13,
4706,
396,
29915,
29926,
4659,
742,
13,
4706,
525,
24623,
742,
13,
4706,
525,
4537,
742,
13,
4706,
525,
12292,
29918,
3166,
742,
13,
4706,
525,
12292,
29918,
517,
742,
13,
4706,
525,
13757,
742,
13,
4706,
525,
23679,
261,
742,
13,
4706,
525,
275,
11197,
742,
13,
4706,
525,
1867,
29875,
742,
13,
4706,
525,
16595,
742,
13,
4706,
525,
8552,
1266,
29915,
13,
1678,
4514,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2566,
1125,
13,
4706,
14550,
13,
4706,
6204,
1203,
29889,
13,
308,
13,
4706,
584,
3207,
2566,
29901,
5470,
1024,
13,
4706,
14550,
13,
4706,
1583,
29889,
13082,
353,
12368,
29961,
9803,
29962,
13,
4706,
1583,
29889,
18127,
353,
1583,
29889,
13082,
29889,
18127,
580,
13,
4706,
1583,
29889,
2798,
29918,
3597,
800,
353,
29871,
29900,
13,
4706,
1583,
29889,
8921,
29918,
16680,
353,
13361,
11726,
29898,
9803,
29922,
9803,
29897,
13,
13,
1678,
822,
9063,
29898,
1311,
1125,
13,
4706,
14550,
13,
4706,
1876,
277,
2566,
3620,
29889,
13,
308,
13,
4706,
584,
22692,
1459,
643,
29934,
3028,
1627,
2392,
1932,
263,
4828,
10761,
29892,
393,
3734,
304,
437,
263,
9679,
1627,
13,
4706,
14550,
13,
4706,
1018,
29901,
13,
9651,
17927,
29889,
3888,
877,
15060,
1495,
13,
9651,
1583,
29889,
13082,
29889,
15060,
580,
13,
4706,
5174,
29898,
23573,
537,
2392,
29897,
408,
321,
29901,
13,
9651,
17927,
29889,
2704,
29898,
29872,
29892,
5566,
29918,
3888,
29922,
5574,
29897,
13,
9651,
1583,
29889,
13082,
29889,
1245,
1627,
580,
13,
9651,
12020,
1459,
643,
29934,
3028,
1627,
2392,
29898,
29872,
29897,
13,
13,
1678,
822,
6088,
29918,
8921,
29898,
1311,
29892,
1024,
1125,
13,
4706,
14550,
13,
4706,
960,
278,
4148,
411,
278,
2183,
1024,
2307,
4864,
29892,
278,
3553,
310,
393,
4148,
338,
4133,
29889,
13,
4706,
13466,
263,
716,
4148,
4947,
2825,
29889,
13,
308,
13,
4706,
584,
3207,
1024,
29901,
4408,
310,
278,
4148,
13,
4706,
584,
2457,
29901,
3553,
310,
278,
4148,
13,
4706,
584,
22692,
1459,
643,
1469,
2392,
29901,
1932,
278,
1024,
338,
2086,
1472,
13,
4706,
14550,
13,
4706,
1024,
353,
4226,
675,
29918,
1807,
29898,
978,
29897,
13,
4706,
1583,
29889,
18127,
29889,
7978,
703,
6404,
1178,
3895,
7136,
29918,
8921,
5754,
1024,
22962,
1273,
29879,
27848,
29871,
29896,
613,
518,
978,
2314,
13,
4706,
1121,
353,
1583,
29889,
18127,
29889,
9155,
650,
580,
13,
308,
13,
4706,
565,
1121,
29901,
13,
9651,
736,
1121,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
565,
1024,
322,
7431,
29898,
978,
29897,
5277,
29871,
29896,
29900,
29900,
29901,
13,
18884,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
8921,
313,
978,
29897,
15673,
313,
29995,
29879,
29897,
28081,
24015,
4214,
1178,
613,
518,
978,
2314,
13,
18884,
736,
1583,
29889,
18127,
29889,
9155,
650,
580,
29961,
29900,
29962,
13,
9651,
1683,
29901,
13,
18884,
12020,
1459,
643,
1469,
2392,
877,
13720,
1024,
338,
2086,
1472,
1495,
13,
13,
1678,
822,
6088,
29918,
29926,
4659,
29898,
1311,
29892,
1024,
1125,
13,
4706,
14550,
13,
4706,
960,
278,
8955,
411,
278,
2183,
1024,
2307,
4864,
29892,
278,
3553,
310,
393,
8955,
338,
4133,
29889,
13,
4706,
13466,
263,
716,
21824,
295,
4947,
2825,
29889,
13,
308,
13,
4706,
584,
3207,
1024,
29901,
4408,
310,
278,
8955,
13,
4706,
584,
2457,
29901,
3553,
310,
278,
8955,
13,
4706,
584,
22692,
1459,
643,
1469,
2392,
29901,
1932,
278,
1024,
338,
2086,
1472,
13,
4706,
14550,
13,
4706,
1024,
353,
4226,
675,
29918,
1807,
29898,
978,
29897,
13,
4706,
1583,
29889,
18127,
29889,
7978,
703,
6404,
1178,
3895,
7136,
29918,
29926,
4659,
5754,
1024,
22962,
1273,
29879,
27848,
29871,
29896,
613,
518,
978,
2314,
13,
4706,
1121,
353,
1583,
29889,
18127,
29889,
9155,
650,
580,
13,
308,
13,
4706,
565,
1121,
29901,
13,
9651,
736,
1121,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
565,
1024,
322,
7431,
29898,
978,
29897,
5277,
29871,
29906,
29945,
29900,
29901,
13,
18884,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
29926,
4659,
313,
978,
29897,
15673,
313,
29995,
29879,
29897,
28081,
24015,
4214,
1178,
613,
518,
978,
2314,
13,
18884,
736,
1583,
29889,
18127,
29889,
9155,
650,
580,
29961,
29900,
29962,
13,
9651,
1683,
29901,
13,
18884,
12020,
1459,
643,
1469,
2392,
877,
29967,
4659,
1024,
338,
2086,
1472,
1495,
13,
13,
1678,
822,
6088,
29918,
535,
1659,
29898,
1311,
29892,
3273,
29918,
978,
1125,
13,
4706,
14550,
13,
4706,
20969,
263,
21362,
29889,
13,
308,
13,
4706,
584,
3207,
3273,
29918,
978,
29901,
13,
4706,
14550,
13,
4706,
3273,
29918,
978,
353,
4226,
675,
29918,
1807,
29898,
12759,
29918,
978,
29897,
13,
4706,
1583,
29889,
18127,
29889,
7978,
703,
6404,
1178,
3895,
7136,
29918,
535,
1659,
5754,
3273,
29918,
978,
22962,
1273,
29879,
27848,
29871,
29896,
613,
518,
12759,
29918,
978,
2314,
13,
4706,
1121,
353,
1583,
29889,
18127,
29889,
9155,
650,
580,
13,
308,
13,
4706,
565,
1121,
29901,
13,
9651,
736,
1121,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
565,
3273,
29918,
978,
322,
7431,
29898,
12759,
29918,
978,
29897,
5277,
29871,
29906,
29900,
29901,
13,
18884,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
535,
1659,
313,
12759,
29918,
978,
29897,
15673,
313,
29995,
29879,
29897,
28081,
24015,
4214,
1178,
613,
518,
12759,
29918,
978,
2314,
13,
18884,
736,
1583,
29889,
18127,
29889,
9155,
650,
580,
29961,
29900,
29962,
13,
9651,
1683,
29901,
13,
18884,
12020,
1459,
643,
1469,
2392,
877,
1168,
1659,
3273,
1024,
338,
2086,
1472,
29901,
1273,
29879,
29915,
1273,
3273,
29918,
978,
29897,
308,
13,
13,
1678,
822,
6088,
29918,
3597,
362,
29898,
1311,
29892,
1134,
29922,
8516,
29892,
3611,
29922,
8516,
29892,
1629,
29922,
8516,
29892,
2635,
29922,
8516,
29892,
3143,
3257,
29922,
8516,
29892,
8955,
29918,
333,
29922,
8516,
29892,
7977,
29922,
8516,
29892,
1353,
29922,
8516,
29892,
6515,
29918,
3166,
29922,
8516,
29892,
6515,
29918,
517,
29922,
8516,
29892,
3652,
29922,
8516,
29892,
9805,
261,
29922,
8516,
29892,
338,
11197,
29922,
8516,
29892,
13102,
29922,
8516,
29892,
9846,
29922,
8516,
29892,
3509,
1266,
29922,
8516,
29892,
21362,
29918,
333,
29922,
8516,
29892,
2752,
29922,
8516,
1125,
13,
4706,
14550,
13,
4706,
20969,
263,
17745,
29889,
13,
308,
13,
4706,
584,
3207,
1134,
29901,
13,
4706,
584,
3207,
3611,
29901,
13,
4706,
584,
3207,
1629,
29901,
13,
4706,
584,
3207,
2635,
29901,
13,
4706,
584,
3207,
3143,
3257,
29901,
13,
4706,
584,
3207,
8955,
29918,
333,
29901,
13,
4706,
584,
3207,
7977,
29901,
13,
4706,
584,
3207,
1353,
29901,
13,
4706,
584,
3207,
6515,
29918,
3166,
29901,
13,
4706,
584,
3207,
6515,
29918,
517,
29901,
13,
4706,
584,
3207,
3652,
29901,
13,
4706,
584,
3207,
9805,
261,
29901,
13,
4706,
584,
3207,
338,
11197,
29901,
13,
4706,
584,
3207,
13102,
29901,
13,
4706,
584,
3207,
9846,
29901,
13,
4706,
584,
3207,
3509,
1266,
29901,
13,
4706,
584,
3207,
21362,
29918,
333,
29901,
13,
4706,
584,
3207,
2752,
29901,
13,
4706,
14550,
13,
4706,
565,
3611,
322,
7431,
29898,
3257,
29897,
5277,
29871,
29906,
29945,
29900,
29901,
13,
9651,
3611,
353,
4226,
675,
29918,
1807,
29898,
3257,
29897,
13,
632,
13,
9651,
1583,
29889,
18127,
29889,
7978,
703,
6404,
1178,
3895,
7136,
29918,
3597,
362,
5754,
3611,
22962,
1273,
29879,
27848,
29871,
29896,
613,
518,
3257,
2314,
13,
9651,
1121,
353,
1583,
29889,
18127,
29889,
9155,
650,
580,
13,
9651,
565,
1121,
29901,
13,
18884,
736,
1121,
29961,
29900,
29962,
13,
9651,
1683,
29901,
13,
18884,
565,
2635,
322,
7431,
29898,
1256,
29897,
1405,
29871,
29945,
29900,
29901,
13,
462,
1678,
2635,
353,
6213,
13,
18884,
565,
3143,
3257,
322,
7431,
29898,
2909,
3257,
29897,
1405,
29871,
29906,
29900,
29900,
29901,
13,
462,
1678,
3143,
3257,
353,
6213,
13,
18884,
565,
7977,
322,
7431,
29898,
24623,
29897,
1405,
29871,
29906,
29900,
29901,
13,
462,
1678,
7977,
353,
6213,
13,
18884,
565,
1353,
322,
7431,
29898,
4537,
29897,
1405,
29871,
29906,
29900,
29901,
13,
462,
1678,
1353,
353,
6213,
13,
18884,
565,
6515,
29918,
3166,
322,
7431,
29898,
12292,
29918,
3166,
29897,
1405,
29871,
29945,
29901,
13,
462,
1678,
6515,
29918,
3166,
353,
6213,
13,
18884,
565,
6515,
29918,
517,
322,
7431,
29898,
12292,
29918,
517,
29897,
1405,
29871,
29945,
29901,
13,
462,
1678,
6515,
29918,
517,
353,
6213,
13,
18884,
565,
3652,
322,
7431,
29898,
13757,
29897,
1405,
29871,
29906,
29900,
29900,
29901,
13,
462,
1678,
3652,
353,
6213,
13,
18884,
565,
9805,
261,
322,
7431,
29898,
23679,
261,
29897,
1405,
29871,
29896,
29945,
29900,
29901,
13,
462,
1678,
9805,
261,
353,
6213,
13,
18884,
565,
338,
11197,
322,
7431,
29898,
275,
11197,
29897,
1405,
29871,
29945,
29900,
29901,
13,
462,
1678,
338,
11197,
353,
6213,
13,
18884,
565,
13102,
322,
7431,
29898,
1867,
29875,
29897,
1405,
29871,
29945,
29900,
29901,
13,
462,
1678,
13102,
353,
6213,
13,
18884,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
3597,
362,
313,
1853,
29892,
3611,
29892,
1629,
29892,
2635,
29892,
3143,
3257,
29892,
8955,
29918,
333,
29892,
7977,
29892,
1353,
29892,
6515,
29918,
3166,
29892,
6515,
29918,
517,
29892,
3652,
29892,
9805,
261,
29892,
338,
11197,
29892,
13102,
29892,
9846,
29892,
3509,
1266,
29892,
21362,
29918,
333,
29892,
2752,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29897,
28081,
24015,
4214,
1178,
613,
518,
1853,
29892,
3611,
29892,
1629,
29892,
2635,
29892,
3143,
3257,
29892,
8955,
29918,
333,
29892,
7977,
29892,
1353,
29892,
6515,
29918,
3166,
29892,
6515,
29918,
517,
29892,
3652,
29892,
9805,
261,
29892,
338,
11197,
29892,
13102,
29892,
9846,
29892,
3509,
1266,
29892,
21362,
29918,
333,
29892,
2752,
2314,
13,
18884,
736,
1583,
29889,
18127,
29889,
9155,
650,
580,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
12020,
1459,
643,
1469,
2392,
877,
7030,
947,
451,
4864,
470,
338,
2086,
1472,
1495,
13,
13,
1678,
822,
6088,
29918,
5679,
29898,
1311,
29892,
17745,
29918,
333,
29892,
3407,
29918,
333,
29892,
3030,
29922,
8516,
29892,
2752,
29918,
333,
29922,
8516,
1125,
13,
4706,
14550,
13,
4706,
20969,
263,
3407,
29871,
13,
308,
13,
4706,
584,
3207,
17745,
29918,
333,
29901,
13,
4706,
584,
3207,
3407,
29918,
333,
29901,
13,
4706,
584,
3207,
3030,
29901,
13,
4706,
584,
3207,
2752,
29918,
333,
29901,
13,
4706,
14550,
13,
4706,
565,
17745,
29918,
333,
322,
3407,
29918,
333,
29901,
13,
9651,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
3597,
362,
5679,
313,
3597,
362,
29918,
333,
29892,
3407,
29918,
333,
29892,
3030,
29892,
2752,
29918,
333,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
19123,
518,
3597,
362,
29918,
333,
29892,
3407,
29918,
333,
29892,
3030,
29892,
2752,
29918,
333,
2314,
13,
4706,
1683,
29901,
13,
9651,
12020,
1459,
643,
1469,
2392,
877,
3597,
362,
29918,
333,
470,
3407,
29918,
333,
947,
451,
4864,
1495,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
17745,
29892,
21362,
29922,
8516,
29892,
8955,
29918,
978,
29922,
8516,
29892,
15717,
29922,
8516,
29892,
29361,
29922,
8516,
29892,
23942,
29922,
8516,
29892,
3407,
29922,
8516,
1125,
13,
4706,
14550,
13,
4706,
20969,
263,
6251,
29889,
13,
308,
13,
4706,
584,
3207,
17745,
29901,
5236,
362,
8600,
13,
4706,
584,
3207,
21362,
29901,
16377,
8600,
29901,
525,
12759,
29918,
978,
742,
525,
8758,
29918,
978,
29915,
13,
4706,
584,
3207,
8955,
29918,
978,
29901,
8237,
1024,
13,
4706,
584,
3207,
15717,
29901,
13189,
943,
1024,
1409,
13,
4706,
584,
3207,
29361,
29901,
7670,
9303,
1409,
13,
4706,
584,
3207,
23942,
29901,
3988,
1409,
13,
4706,
584,
3207,
3407,
29901,
12105,
8600,
13,
4706,
584,
2457,
29901,
5236,
362,
3553,
29892,
565,
6251,
471,
8472,
21213,
29936,
7700,
6467,
13,
4706,
584,
22692,
1459,
643,
29934,
3028,
1627,
2392,
29901,
1932,
263,
4828,
10761,
29892,
393,
3734,
304,
437,
263,
9679,
1627,
13,
4706,
14550,
13,
308,
13,
4706,
1583,
29889,
2798,
29918,
3597,
800,
4619,
29871,
29896,
13,
4706,
1018,
29901,
13,
632,
13,
9651,
21362,
29918,
333,
353,
6213,
13,
9651,
8955,
29918,
333,
353,
6213,
13,
13,
9651,
396,
21362,
13,
9651,
565,
21362,
29901,
13,
18884,
565,
525,
12759,
29918,
978,
29915,
297,
21362,
322,
21362,
1839,
12759,
29918,
978,
2033,
29901,
396,
6467,
995,
508,
367,
6213,
470,
6213,
1542,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
21362,
29918,
333,
353,
1583,
29889,
5510,
29918,
535,
1659,
29898,
535,
1659,
1839,
12759,
29918,
978,
11287,
13,
462,
1678,
5174,
29898,
11726,
1469,
2392,
29897,
408,
321,
29901,
13,
462,
4706,
17927,
29889,
25442,
29898,
710,
29898,
29872,
876,
13,
18884,
25342,
525,
8758,
29918,
978,
29915,
297,
21362,
29901,
13,
462,
1678,
17927,
29889,
25442,
877,
6028,
451,
4386,
21362,
2777,
1024,
3447,
29901,
1273,
29879,
29915,
1273,
313,
535,
1659,
1839,
8758,
29918,
978,
25901,
13,
18884,
628,
21362,
13,
9651,
396,
8955,
13,
9651,
565,
8955,
29918,
978,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
8955,
29918,
333,
353,
1583,
29889,
5510,
29918,
29926,
4659,
29898,
29926,
4659,
29918,
978,
29897,
13,
18884,
5174,
29898,
11726,
1469,
2392,
29897,
408,
321,
29901,
13,
462,
1678,
17927,
29889,
25442,
29898,
710,
29898,
29872,
876,
13,
18884,
628,
8955,
29918,
978,
13,
9651,
396,
17745,
13,
9651,
17745,
29918,
333,
353,
1583,
29889,
5510,
29918,
3597,
362,
29898,
535,
1659,
29918,
333,
29922,
535,
1659,
29918,
333,
29892,
13,
462,
462,
462,
1678,
8955,
29918,
333,
29922,
29926,
4659,
29918,
333,
29892,
13,
462,
462,
462,
1678,
3579,
3597,
362,
29897,
13,
9651,
396,
15717,
13,
9651,
565,
15717,
29901,
13,
18884,
363,
4148,
297,
15717,
29901,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
3597,
362,
8921,
3470,
8634,
313,
3597,
362,
29918,
333,
29892,
4148,
29918,
333,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
19123,
518,
3597,
362,
29918,
333,
29892,
1583,
29889,
8921,
29918,
16680,
29889,
5510,
29898,
8921,
29897,
2314,
13,
462,
1678,
5174,
29898,
11726,
1469,
2392,
29892,
3630,
2392,
29897,
408,
321,
29901,
13,
462,
4706,
17927,
29889,
25442,
29898,
710,
29898,
29872,
876,
13,
462,
1678,
5174,
29898,
23573,
537,
2392,
29897,
408,
321,
29901,
13,
462,
4706,
1209,
13,
18884,
628,
15717,
13,
9651,
396,
29361,
13,
9651,
565,
29361,
29901,
13,
18884,
363,
13553,
297,
29361,
29901,
13,
462,
1678,
565,
13553,
322,
7431,
29898,
26766,
29897,
5277,
29871,
29896,
29900,
29900,
29901,
13,
462,
4706,
13553,
353,
4226,
675,
29918,
1807,
29898,
26766,
29897,
13,
462,
4706,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
3597,
362,
26766,
313,
3597,
362,
29918,
333,
29892,
1024,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
19123,
518,
3597,
362,
29918,
333,
29892,
13553,
2314,
13,
18884,
628,
29361,
13,
9651,
396,
23942,
13,
9651,
565,
23942,
29901,
13,
18884,
363,
3142,
297,
23942,
29901,
13,
462,
1678,
3142,
29918,
1853,
353,
6213,
13,
462,
1678,
565,
338,
8758,
29898,
2271,
29892,
9657,
1125,
13,
462,
4706,
3142,
29918,
1853,
353,
3142,
1839,
1853,
2033,
13,
462,
4706,
3142,
353,
3142,
1839,
1767,
2033,
13,
462,
308,
13,
462,
1678,
565,
3142,
322,
7431,
29898,
2271,
29897,
5277,
29871,
29906,
29900,
29900,
29901,
13,
462,
4706,
565,
3142,
29918,
1853,
322,
7431,
29898,
2271,
29918,
1853,
29897,
6736,
29871,
29941,
29900,
29901,
13,
462,
9651,
3142,
29918,
1853,
353,
6213,
13,
462,
4706,
1583,
29889,
18127,
29889,
7978,
703,
19460,
11646,
7136,
29918,
3597,
362,
2271,
313,
3597,
362,
29918,
333,
29892,
3142,
29892,
1134,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
19123,
518,
3597,
362,
29918,
333,
29892,
3142,
29892,
3142,
29918,
1853,
2314,
13,
18884,
628,
23942,
13,
9651,
396,
3407,
13,
9651,
565,
3407,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1583,
29889,
5510,
29918,
5679,
29898,
5679,
29918,
333,
29922,
3597,
362,
29918,
333,
29892,
3579,
5679,
29897,
13,
18884,
5174,
29898,
11726,
1469,
2392,
29897,
408,
321,
29901,
13,
462,
1678,
17927,
29889,
25442,
29898,
710,
29898,
29872,
876,
13,
18884,
628,
3407,
13,
13,
9651,
736,
17745,
29918,
333,
13,
4706,
5174,
29898,
11726,
1469,
2392,
29897,
408,
321,
29901,
13,
9651,
396,
21707,
29889,
25442,
29898,
710,
29898,
29872,
876,
13,
9651,
736,
7700,
13,
4706,
5174,
29898,
9283,
4056,
2392,
29892,
3630,
2392,
29897,
408,
321,
29901,
13,
9651,
17927,
29889,
2704,
29898,
29872,
29892,
5566,
29918,
3888,
29922,
5574,
29897,
13,
9651,
1583,
29889,
13082,
29889,
1245,
1627,
580,
13,
9651,
12020,
1459,
643,
29934,
3028,
1627,
2392,
29898,
710,
29898,
29872,
876,
13,
2
] |
{{cookiecutter.project_slug}}/sources/app/config/settings/components/security.py | AsheKR/cookiecutter-django | 0 | 14607 | <filename>{{cookiecutter.project_slug}}/sources/app/config/settings/components/security.py
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect
SECURE_SSL_REDIRECT = True
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure
SESSION_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure
CSRF_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/topics/security/#ssl-https
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-preload
SECURE_HSTS_PRELOAD = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-include-subdomains
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds
SECURE_HSTS_SECONDS = 31536000
# https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff
SECURE_CONTENT_TYPE_NOSNIFF = True
| [
1,
529,
9507,
29958,
6224,
15108,
21199,
6463,
29889,
4836,
29918,
29517,
930,
29914,
29879,
2863,
29914,
932,
29914,
2917,
29914,
11027,
29914,
14036,
29914,
8926,
29889,
2272,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
24216,
29899,
14701,
29899,
16265,
29899,
6672,
13,
1660,
29907,
11499,
29918,
8618,
18454,
29918,
18641,
29918,
23252,
1001,
353,
4852,
10493,
29918,
29990,
29918,
22051,
29956,
1718,
2287,
29928,
29918,
8618,
4986,
613,
376,
991,
1159,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
24216,
29899,
16265,
29899,
17886,
13,
1660,
29907,
11499,
29918,
18641,
29918,
1525,
4571,
26282,
353,
5852,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
7924,
29899,
21509,
29899,
24216,
13,
17493,
29918,
3217,
8949,
8673,
29918,
1660,
29907,
11499,
353,
5852,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
2395,
9600,
29899,
21509,
29899,
24216,
13,
9295,
29934,
29943,
29918,
3217,
8949,
8673,
29918,
1660,
29907,
11499,
353,
5852,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
3332,
1199,
29914,
8926,
8484,
16265,
29899,
991,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
24216,
29899,
29882,
303,
29879,
29899,
1457,
1359,
13,
1660,
29907,
11499,
29918,
29950,
1254,
29903,
29918,
15094,
29428,
353,
5852,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
24216,
29899,
29882,
303,
29879,
29899,
2856,
29899,
1491,
3129,
2708,
13,
1660,
29907,
11499,
29918,
29950,
1254,
29903,
29918,
1177,
6154,
29965,
2287,
29918,
20633,
3970,
29032,
29903,
353,
5852,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
11027,
8484,
24216,
29899,
29882,
303,
29879,
29899,
23128,
13,
1660,
29907,
11499,
29918,
29950,
1254,
29903,
29918,
1660,
6007,
8452,
353,
29871,
29941,
29896,
29945,
29941,
29953,
29900,
29900,
29900,
13,
29937,
2045,
597,
2640,
29889,
19776,
574,
26555,
622,
29889,
510,
29914,
264,
29914,
3359,
29914,
999,
29914,
17662,
2519,
8484,
29916,
29899,
3051,
29899,
1853,
29899,
6768,
29899,
17639,
29876,
2593,
13,
1660,
29907,
11499,
29918,
22412,
3919,
29918,
11116,
29918,
29940,
3267,
12916,
4198,
353,
5852,
13,
2
] |
scanner/chair_sqlite.py | NNMartin/ChairDetector | 0 | 128173 | <gh_stars>0
import sqlite3 as sql
from pandas import DataFrame
from typing import List, Tuple
def sqlfstr(s: str):
"""
Returns the string <s> as string format used for SQL parameter input.
:param s: String to reformat.
:return: str
"""
return s.replace('"', '""')
def open_conn(db_name="scanner/chairs.db"):
"""
Opens connection to the database <db_name>. Returns a cursor object and
connection object so that interactions with the database can occur.
:param db_name: Name of database.
:return: Tuple[sqlite3.Cursor, sqlite3.Connection]
"""
conn = sql.connect(db_name)
c = conn.cursor()
return c, conn
def close_conn(db_conn: Tuple[sql.Cursor, sql.Connection]):
"""
Closes the connection to the database with cursor and connection objects
<db_conn>.
:param db_conn: Cursor and connection to
database.
:return: None
"""
c, conn = db_conn
conn.close()
def init_db(db="scanner/chairs.db", table_name="chairs"):
"""
Initializes database with name <db> and table <table_name>.
:param db: Name of database.
:param table_name: Name of table in database.
:return: None
"""
c, conn = open_conn(db_name=db)
c.execute("""CREATE TABLE {table}(
id integer,
date text,
prob real,
price real,
filename text
)""".format(table=sqlfstr(table_name)))
conn.commit()
conn.close()
def insert(db_conn: Tuple[sql.Cursor, sql.Connection], item_dict: dict,
item_names: str, table="chairs"):
"""
Inserts <item_dict> into the <table> corresponding to the <db_conn>
database. <item_names> are the column names of <table>.
:param db_conn: Cursor and connection to
database.
:param item_dict: Dictionary whose keys match <item_names>.
:param item_names: String in format "(:item1, :item2, ..., item:n)"
:param table: Name of table in database
:return: None
"""
c, conn = db_conn
with conn:
c.execute(
"INSERT INTO {table} VALUES {item_names}"\
.format(table=sqlfstr(table), item_names=sqlfstr(item_names)),
item_dict
)
def is_in_db(db_conn: Tuple[sql.Cursor, sql.Connection], item: any, var: str,
table="chairs"):
"""
Returns True if observation <item> belonging to variable <var> is in the
database with (cursor, connection) <db_conn> and table <table>, returns
False otherwise.
:param db_conn: [sql.Cursor, sql.Connection] Cursor and connection to
database.
:param item: Item to check if in database.
:param var: Variable that <item> corresponds to.
:param table: Name of table in database.
:return: bool
"""
c, _ = db_conn
c.execute(
"SELECT {} FROM {} WHERE {}=?".format(
sqlfstr(var), sqlfstr(table), sqlfstr(var)
),
(item,)
)
result = c.fetchone()
return result is not None
def table_to_df(col_names: List[str], table="chairs"):
"""
Given the column names <col_names> associated to the database table
<table>, returns a pandas DataFrame of the table.
:param col_names: Names of columns in <table>
:param table: Name of database table.
:return: DataFrame
"""
c, conn = open_conn()
with conn:
data = c.execute(" SELECT * FROM {table}".format(table=sqlfstr(table)))
data = DataFrame(data.fetchall(), columns=col_names)
return data
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
21120,
29941,
408,
4576,
13,
3166,
11701,
1053,
3630,
4308,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
13,
13,
13,
1753,
4576,
29888,
710,
29898,
29879,
29901,
851,
1125,
13,
1678,
9995,
13,
1678,
16969,
278,
1347,
29871,
1,
29871,
408,
1347,
3402,
1304,
363,
3758,
3443,
1881,
29889,
13,
13,
1678,
584,
3207,
269,
29901,
1714,
304,
337,
4830,
29889,
13,
1678,
584,
2457,
29901,
851,
13,
1678,
9995,
13,
1678,
736,
269,
29889,
6506,
877,
29908,
742,
525,
15945,
1495,
13,
13,
13,
1753,
1722,
29918,
13082,
29898,
2585,
29918,
978,
543,
1557,
7310,
29914,
305,
7121,
29889,
2585,
29908,
1125,
13,
1678,
9995,
13,
1678,
6461,
575,
3957,
304,
278,
2566,
529,
2585,
29918,
978,
15513,
16969,
263,
10677,
1203,
322,
13,
1678,
3957,
1203,
577,
393,
22060,
411,
278,
2566,
508,
6403,
29889,
13,
13,
1678,
584,
3207,
4833,
29918,
978,
29901,
4408,
310,
2566,
29889,
13,
1678,
584,
2457,
29901,
12603,
552,
29961,
22793,
29941,
29889,
19890,
29892,
21120,
29941,
29889,
5350,
29962,
13,
1678,
9995,
13,
1678,
11009,
353,
4576,
29889,
6915,
29898,
2585,
29918,
978,
29897,
13,
1678,
274,
353,
11009,
29889,
18127,
580,
13,
1678,
736,
274,
29892,
11009,
13,
13,
13,
1753,
3802,
29918,
13082,
29898,
2585,
29918,
13082,
29901,
12603,
552,
29961,
2850,
29889,
19890,
29892,
4576,
29889,
5350,
29962,
1125,
13,
1678,
9995,
13,
1678,
2233,
15806,
278,
3957,
304,
278,
2566,
411,
10677,
322,
3957,
3618,
13,
1678,
529,
2585,
29918,
13082,
15513,
13,
13,
1678,
584,
3207,
4833,
29918,
13082,
29901,
315,
5966,
322,
3957,
304,
13,
9651,
2566,
29889,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
274,
29892,
11009,
353,
4833,
29918,
13082,
13,
1678,
11009,
29889,
5358,
580,
13,
13,
13,
1753,
2069,
29918,
2585,
29898,
2585,
543,
1557,
7310,
29914,
305,
7121,
29889,
2585,
613,
1591,
29918,
978,
543,
305,
7121,
29908,
1125,
13,
1678,
9995,
13,
1678,
17250,
7093,
2566,
411,
1024,
529,
2585,
29958,
322,
1591,
529,
2371,
29918,
978,
15513,
13,
13,
1678,
584,
3207,
4833,
29901,
4408,
310,
2566,
29889,
13,
1678,
584,
3207,
1591,
29918,
978,
29901,
4408,
310,
1591,
297,
2566,
29889,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
274,
29892,
11009,
353,
1722,
29918,
13082,
29898,
2585,
29918,
978,
29922,
2585,
29897,
13,
1678,
274,
29889,
7978,
703,
15945,
27045,
10911,
426,
2371,
2119,
13,
4706,
1178,
6043,
29892,
13,
4706,
2635,
1426,
29892,
13,
4706,
2070,
1855,
29892,
13,
4706,
8666,
1855,
29892,
13,
4706,
10422,
1426,
13,
4706,
1723,
15945,
1642,
4830,
29898,
2371,
29922,
2850,
29888,
710,
29898,
2371,
29918,
978,
4961,
13,
1678,
11009,
29889,
15060,
580,
13,
1678,
11009,
29889,
5358,
580,
13,
13,
13,
1753,
4635,
29898,
2585,
29918,
13082,
29901,
12603,
552,
29961,
2850,
29889,
19890,
29892,
4576,
29889,
5350,
1402,
2944,
29918,
8977,
29901,
9657,
29892,
13,
965,
2944,
29918,
7039,
29901,
851,
29892,
1591,
543,
305,
7121,
29908,
1125,
13,
1678,
9995,
13,
1678,
512,
643,
1372,
529,
667,
29918,
8977,
29958,
964,
278,
529,
2371,
29958,
6590,
304,
278,
529,
2585,
29918,
13082,
29958,
13,
1678,
2566,
29889,
529,
667,
29918,
7039,
29958,
526,
278,
1897,
2983,
310,
529,
2371,
15513,
13,
13,
1678,
584,
3207,
4833,
29918,
13082,
29901,
315,
5966,
322,
3957,
304,
13,
9651,
2566,
29889,
13,
1678,
584,
3207,
2944,
29918,
8977,
29901,
13343,
5069,
6611,
1993,
529,
667,
29918,
7039,
15513,
13,
1678,
584,
3207,
2944,
29918,
7039,
29901,
1714,
297,
3402,
376,
8137,
667,
29896,
29892,
584,
667,
29906,
29892,
2023,
29892,
2944,
29901,
29876,
5513,
13,
1678,
584,
3207,
1591,
29901,
4408,
310,
1591,
297,
2566,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
274,
29892,
11009,
353,
4833,
29918,
13082,
13,
1678,
411,
11009,
29901,
13,
4706,
274,
29889,
7978,
29898,
13,
9651,
376,
19460,
11646,
426,
2371,
29913,
15673,
426,
667,
29918,
7039,
5038,
29905,
13,
9651,
869,
4830,
29898,
2371,
29922,
2850,
29888,
710,
29898,
2371,
511,
2944,
29918,
7039,
29922,
2850,
29888,
710,
29898,
667,
29918,
7039,
8243,
13,
9651,
2944,
29918,
8977,
13,
9651,
1723,
13,
13,
13,
1753,
338,
29918,
262,
29918,
2585,
29898,
2585,
29918,
13082,
29901,
12603,
552,
29961,
2850,
29889,
19890,
29892,
4576,
29889,
5350,
1402,
2944,
29901,
738,
29892,
722,
29901,
851,
29892,
13,
632,
1591,
543,
305,
7121,
29908,
1125,
13,
1678,
9995,
13,
1678,
16969,
5852,
565,
15500,
529,
667,
29958,
23329,
304,
2286,
529,
1707,
29958,
338,
297,
278,
13,
1678,
2566,
411,
313,
18127,
29892,
3957,
29897,
529,
2585,
29918,
13082,
29958,
322,
1591,
529,
2371,
10202,
3639,
13,
1678,
7700,
6467,
29889,
13,
13,
1678,
584,
3207,
4833,
29918,
13082,
29901,
518,
2850,
29889,
19890,
29892,
4576,
29889,
5350,
29962,
315,
5966,
322,
3957,
304,
13,
9651,
2566,
29889,
13,
1678,
584,
3207,
2944,
29901,
10976,
304,
1423,
565,
297,
2566,
29889,
13,
1678,
584,
3207,
722,
29901,
28736,
393,
529,
667,
29958,
16161,
304,
29889,
13,
1678,
584,
3207,
1591,
29901,
4408,
310,
1591,
297,
2566,
29889,
13,
1678,
584,
2457,
29901,
6120,
13,
1678,
9995,
13,
1678,
274,
29892,
903,
353,
4833,
29918,
13082,
13,
1678,
274,
29889,
7978,
29898,
13,
4706,
376,
6404,
6571,
3895,
6571,
5754,
426,
5369,
29973,
1642,
4830,
29898,
13,
9651,
4576,
29888,
710,
29898,
1707,
511,
4576,
29888,
710,
29898,
2371,
511,
4576,
29888,
710,
29898,
1707,
29897,
13,
9651,
10353,
13,
4706,
313,
667,
29892,
29897,
13,
4706,
1723,
13,
1678,
1121,
353,
274,
29889,
9155,
650,
580,
13,
1678,
736,
1121,
338,
451,
6213,
13,
13,
13,
1753,
1591,
29918,
517,
29918,
2176,
29898,
1054,
29918,
7039,
29901,
2391,
29961,
710,
1402,
1591,
543,
305,
7121,
29908,
1125,
13,
1678,
9995,
13,
1678,
11221,
278,
1897,
2983,
529,
1054,
29918,
7039,
29958,
6942,
304,
278,
2566,
1591,
13,
1678,
529,
2371,
10202,
3639,
263,
11701,
3630,
4308,
310,
278,
1591,
29889,
13,
13,
1678,
584,
3207,
784,
29918,
7039,
29901,
14706,
310,
4341,
297,
529,
2371,
29958,
13,
1678,
584,
3207,
1591,
29901,
4408,
310,
2566,
1591,
29889,
13,
1678,
584,
2457,
29901,
3630,
4308,
13,
1678,
9995,
13,
1678,
274,
29892,
11009,
353,
1722,
29918,
13082,
580,
13,
1678,
411,
11009,
29901,
13,
4706,
848,
353,
274,
29889,
7978,
703,
5097,
334,
3895,
426,
2371,
29913,
1642,
4830,
29898,
2371,
29922,
2850,
29888,
710,
29898,
2371,
4961,
13,
4706,
848,
353,
3630,
4308,
29898,
1272,
29889,
9155,
497,
3285,
4341,
29922,
1054,
29918,
7039,
29897,
13,
1678,
736,
848,
13,
2
] |
apps/recipes/management/commands/import_ingredients_csv.py | AleksandrTka4uk/foodgram-project | 0 | 121546 | import csv
from django.core.management.base import BaseCommand
from apps.recipes.models import Ingredient
class Command(BaseCommand):
help = 'Import data from ingredients.csv'
def handle(self, *args, **options):
with open('ingredients.csv', newline='', encoding='utf-8') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
for row in reader:
title, dimension = row
Ingredient.objects.get_or_create(title=title,
dimension=dimension)
| [
1,
1053,
11799,
13,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
13,
3166,
11446,
29889,
4361,
5547,
29889,
9794,
1053,
22607,
1127,
993,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
1371,
353,
525,
17518,
848,
515,
2348,
1127,
10070,
29889,
7638,
29915,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
411,
1722,
877,
292,
1127,
10070,
29889,
7638,
742,
25899,
2433,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
11799,
1445,
29901,
13,
9651,
9591,
353,
11799,
29889,
16950,
29898,
7638,
1445,
29892,
28552,
29922,
742,
1495,
13,
9651,
363,
1948,
297,
9591,
29901,
13,
18884,
3611,
29892,
9927,
353,
1948,
13,
18884,
22607,
1127,
993,
29889,
12650,
29889,
657,
29918,
272,
29918,
3258,
29898,
3257,
29922,
3257,
29892,
13,
462,
462,
462,
9927,
29922,
6229,
2673,
29897,
13,
2
] |
tree.py | s-gehring/modules | 0 | 146727 | import network
import string
import io
import pdf_files as pdf
global_leaves= 0
global_nodes = 0
global_lectures=0
def get_tree(link, deep_search=False, first_iteration=True):
global global_leaves, global_nodes
c = network.get_content(link)
#print c.prettify()
if is_leaf(c):
#leaf
global_leaves = global_leaves + 1
tables = c.find("div", class_="content").hr.find_all("table", recursive=False)
if(deep_search):
final_links = get_leaves(tables)
return parsed_lectures_deeply(final_links)
else:
return parsed_lectures_shallow(tables)
else:
#node
global_nodes = global_nodes + 1
if c.div.hr == None:
tables = c.find("div", class_="content").hr.find_all("table", recursive=False)
else:
tables = c.div.hr.find_all("table", recursive=False)
new_title, new_links = get_nodes(tables)
arr = {}
i = 1
for l in new_links:
if first_iteration:
print round(i*100./len(new_links),2),"% ("+l+")"
i=i+1
arr.update({l:get_tree(get_hyper_reference(new_links[l]), deep_search, False)})
return arr
def get_link_padding(link_container):
return int(link_container.tr.td['width'])
def get_link_title(link_container):
# The string is hidden in about 32529 containers. Sorry
# for not having a more descriptive comment,
# but I don't have any idea how this works, I just found this to
# be working.
return link_container.tr.find_all("td")[1].table.tr.find_all("td")[2].a.string
def get_hyper_reference(link_container):
return link_container.tr.find_all("td")[1].table.tr.find_all("td")[2].a['href']
def has_link_title(link_container):
# Derived from get_link_title. There are empty tables
# in between the full ones, so we check for these and ignore them.
return link_container.tr.find_all("td")[1].table != None
def is_leaf(content):
s = content.get_text().lower()
buzzwords1 = ["day", "time", "room", "lecturer", "remarks", "duration"]
buzzwords2 = ["tag", "zeit", "raum", "lehrperson", "bemerkung", "dauer"]
buzzwords3 = [u"(--- lecture not found ---)", u"(--- keine veranstaltung in diesem bereich gefunden ---)"]
failed = False
for x in buzzwords3:
if x in s:
return True
for x in buzzwords1:
if x not in s:
failed = True
break
if not failed:
return True
for x in buzzwords2:
if x not in s:
return False
return True
def parsed_lectures_shallow(tables):
global global_lectures
parsed_data = []
for table in tables:
if table.tr.td.has_attr("width"):
# Not real. Find last title though.
pass
else:
data_containers = table.find_all("tr")[1].find_all("td")[1].find_all("table")
# Now we need data_containers (which are <table>s) in packs of two.
# We use this boolean to handle this
first = True
cur_lecture = {}
for container in data_containers:
if first:
actual_container = list(container.tr.td.children)
full_title = actual_container[1].a.string
title_parts = string.split(full_title, u' - ')
if len(title_parts) < 2:
small_id = None
full_title = title_parts[0]
else:
small_id = io.clean_string(title_parts[0])
full_title = io.clean_string(title_parts[1])
actual_container = list(actual_container[3].children)
no_and_time = actual_container[0].string
no_and_time = no_and_time.split(u"\xa0")
number = io.clean_string(no_and_time[0])
time = io.clean_string(no_and_time[3])
lec_type = io.clean_string(actual_container[1].string)
if isinstance(actual_container[2], basestring):
effort = io.clean_string(actual_container[2])
if actual_container[3].a == None or actual_container[3].a.string == None:
lecturer = None
else:
lecturer = io.clean_string(actual_container[3].a.string)
else:
effort = None
if actual_container[2].a == None or actual_container[2].a.string == None:
lecturer = None
else:
lecturer = io.clean_string(actual_container[2].a.string)
if small_id == None:
pdf_pages = []
else:
pdf_pages = pdf.get_pdf_pages(small_id)
cur_lecture = {
"title":full_title,
"id":number,
"type":lec_type,
"time":time,
"effort":effort,
"small_id":small_id,
"lecturer":lecturer,
"pages":pdf_pages
}
else:
# Time table... *sigh*
global_lectures = global_lectures +1
times = []
for tr in container.find_all("tr"):
if tr.td == None:
continue
if tr.th != None:
continue
# now we don't have the first two, and not the last k tds.
# we can actually start building our timetable
tds = list(tr.find_all("td"))
if len(tds) < 7:
continue
weekday = io.get_weekday(io.clean_string(tds[1].string))
if tds[2].nobr.string == None:
time = None
else:
time = tds[2].nobr.string.strip()
if tds[3].a.string == None:
room = None
else:
room = {'name':tds[3].a.string, 'link':tds[3].a['href']}
if tds[4].string == None:
lecturer = None
else:
lecturer = tds[4].string.strip()
if tds[5].string == None:
notes = None
else:
notes = tds[5].string.strip()
if tds[6].string == None:
duration = None
else:
duration = io.clean_string(tds[6].string.replace("<br>", "").replace("bis", "to"))
times.append({
'day':weekday,
'time':time,
'room':room,
'lecturer':lecturer,
'notes':notes,
'duration':duration
})
cur_lecture.update({'schedule':times})
parsed_data.append(cur_lecture)
pass
first = not first
return parsed_data
def parse_links(container):
first = True
resulting_links = []
for table in container:
if first:
resulting_links.append(table.tr.td.h2.a['href'])
first = not first
return resulting_links
def get_leaves(links):
right_amount_of_links = []
for link in links:
# Now we don't have any empty tables anymore.
if not link.tr.td.has_attr('width'):
# Now we have our real tables
# with actual data in it.
# We ignore this data aswell
# and look for the link for the
# dedicated page.
right_amount_of_links.extend(parse_links(link.find_all("tr")[1].find_all("td")[1].find_all("table")))
# Or maybe we don't?
return right_amount_of_links
def get_nodes(links):
max_padding = -1
cur_title = "This should not be visible ever #1"
last_title= "This should not be visible ever #2"
right_amount_of_links = {}
for link in links:
if not has_link_title(link):
continue
cur_padding = get_link_padding(link)
if(max_padding < cur_padding):
last_title = cur_title
max_padding = cur_padding
cur_title = get_link_title(link)
right_amount_of_links = {cur_title:link}
else:
cur_title = get_link_title(link)
right_amount_of_links.update({cur_title:link})
return last_title, right_amount_of_links
def parse_lecture_deeply(link):
c = get_content(link)
d = c.find("div", class_="content").form
e = d.find_all("table", recursive=False)
# In e[0]: MA-INF 0402 - Master Thesis Seminar - Single View
full_title = e[0].tr.td.h1.string
title_parts = string.split(full_title, u' - ')
small_id = io.clean_string(title_parts[0])
full_title = io.clean_string(title_parts[1].strip())
# In f: Nr.: 612010402 Seminar WiSe 2016/17 2.0 Hours per week in term
f = list(e[1].tr.td.children)
index = 2
if len(f) < 4:
index = 0
number = None
else:
number = f[1].string
lec_type = io.clean_string(f[1+index].string)
time_and_effort = f[2+index]
tae = string.split(time_and_effort, u'\xa0')
time = io.clean_string(tae[0])
effort = io.clean_string(tae[3])
#e[2] is just "That's a masters course
index = 3
if(e[index].tr == None):
index = 2
lecturer = e[index].tr.find_all("td")
if(len(lecturer) > 1):
lecturer = io.clean_string(lecturer[1].a.string)
else:
lecturer = None
return {
"title":full_title,
"id":number,
"type":lec_type,
"time":time,
"effort":effort,
"small_id":small_id,
"lecturer":lecturer
}
def parsed_lectures_deeply(links):
parsed_data = []
global global_lectures
for link in links:
global_lectures = global_lectures +1
d = parse_lecture_deeply(link)
d.update({'link':link})
parsed_data.append(d)
return parsed_data
| [
1,
1053,
3564,
13,
5215,
1347,
13,
5215,
12013,
13,
5215,
13552,
29918,
5325,
408,
13552,
13,
13,
10945,
29918,
280,
5989,
29922,
29871,
29900,
13,
10945,
29918,
18010,
353,
29871,
29900,
13,
10945,
29918,
781,
1973,
29922,
29900,
13,
13,
13,
1753,
679,
29918,
8336,
29898,
2324,
29892,
6483,
29918,
4478,
29922,
8824,
29892,
937,
29918,
1524,
362,
29922,
5574,
1125,
13,
1678,
5534,
5534,
29918,
280,
5989,
29892,
5534,
29918,
18010,
13,
1678,
274,
353,
3564,
29889,
657,
29918,
3051,
29898,
2324,
29897,
13,
1678,
396,
2158,
274,
29889,
1457,
698,
1598,
580,
13,
1678,
565,
338,
29918,
29500,
29898,
29883,
1125,
13,
4706,
396,
29500,
13,
4706,
5534,
29918,
280,
5989,
353,
5534,
29918,
280,
5989,
718,
29871,
29896,
13,
4706,
6131,
353,
274,
29889,
2886,
703,
4563,
613,
770,
29918,
543,
3051,
2564,
1092,
29889,
2886,
29918,
497,
703,
2371,
613,
16732,
29922,
8824,
29897,
13,
4706,
565,
29898,
24535,
29918,
4478,
1125,
13,
3986,
2186,
29918,
4965,
353,
679,
29918,
280,
5989,
29898,
24051,
29897,
13,
3986,
736,
21213,
29918,
781,
1973,
29918,
24535,
368,
29898,
8394,
29918,
4965,
29897,
13,
4706,
1683,
29901,
13,
3986,
736,
21213,
29918,
781,
1973,
29918,
845,
9536,
29898,
24051,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
396,
3177,
13,
4706,
5534,
29918,
18010,
353,
5534,
29918,
18010,
718,
29871,
29896,
13,
4706,
565,
274,
29889,
4563,
29889,
1092,
1275,
6213,
29901,
13,
3986,
6131,
353,
274,
29889,
2886,
703,
4563,
613,
770,
29918,
543,
3051,
2564,
1092,
29889,
2886,
29918,
497,
703,
2371,
613,
16732,
29922,
8824,
29897,
13,
4706,
1683,
29901,
13,
3986,
6131,
353,
274,
29889,
4563,
29889,
1092,
29889,
2886,
29918,
497,
703,
2371,
613,
16732,
29922,
8824,
29897,
13,
4706,
716,
29918,
3257,
29892,
716,
29918,
4965,
353,
679,
29918,
18010,
29898,
24051,
29897,
13,
4706,
3948,
353,
6571,
13,
4706,
474,
353,
29871,
29896,
13,
13,
4706,
363,
301,
297,
716,
29918,
4965,
29901,
13,
9651,
565,
937,
29918,
1524,
362,
29901,
13,
795,
1596,
4513,
29898,
29875,
29930,
29896,
29900,
29900,
6904,
2435,
29898,
1482,
29918,
4965,
511,
29906,
511,
29908,
29995,
4852,
29974,
29880,
29974,
1159,
29908,
13,
795,
474,
29922,
29875,
29974,
29896,
13,
9651,
3948,
29889,
5504,
3319,
29880,
29901,
657,
29918,
8336,
29898,
657,
29918,
24947,
29918,
5679,
29898,
1482,
29918,
4965,
29961,
29880,
11724,
6483,
29918,
4478,
29892,
7700,
26972,
13,
4706,
736,
3948,
13,
13,
1753,
679,
29918,
2324,
29918,
12791,
29898,
2324,
29918,
7611,
1125,
13,
1678,
736,
938,
29898,
2324,
29918,
7611,
29889,
509,
29889,
1594,
1839,
2103,
11287,
13,
13,
1753,
679,
29918,
2324,
29918,
3257,
29898,
2324,
29918,
7611,
1125,
13,
1678,
396,
450,
1347,
338,
7934,
297,
1048,
29871,
29941,
29906,
29945,
29906,
29929,
22637,
29889,
8221,
13,
1678,
396,
363,
451,
2534,
263,
901,
29037,
573,
3440,
29892,
13,
1678,
396,
541,
306,
1016,
29915,
29873,
505,
738,
2969,
920,
445,
1736,
29892,
306,
925,
1476,
445,
304,
13,
1678,
396,
367,
1985,
29889,
13,
1678,
736,
1544,
29918,
7611,
29889,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
29961,
29896,
1822,
2371,
29889,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
29961,
29906,
1822,
29874,
29889,
1807,
13,
13,
1753,
679,
29918,
24947,
29918,
5679,
29898,
2324,
29918,
7611,
1125,
13,
1678,
736,
1544,
29918,
7611,
29889,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
29961,
29896,
1822,
2371,
29889,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
29961,
29906,
1822,
29874,
1839,
12653,
2033,
13,
13,
1753,
756,
29918,
2324,
29918,
3257,
29898,
2324,
29918,
7611,
1125,
13,
1678,
396,
2452,
2347,
515,
679,
29918,
2324,
29918,
3257,
29889,
1670,
526,
4069,
6131,
13,
1678,
396,
297,
1546,
278,
2989,
6743,
29892,
577,
591,
1423,
363,
1438,
322,
11455,
963,
29889,
13,
1678,
736,
1544,
29918,
7611,
29889,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
29961,
29896,
1822,
2371,
2804,
6213,
13,
13,
13,
1753,
338,
29918,
29500,
29898,
3051,
1125,
13,
29871,
269,
353,
2793,
29889,
657,
29918,
726,
2141,
13609,
580,
13,
29871,
1321,
5617,
9303,
29896,
353,
6796,
3250,
613,
376,
2230,
613,
376,
8345,
613,
376,
781,
9945,
613,
376,
1745,
17862,
613,
376,
19708,
3108,
13,
29871,
1321,
5617,
9303,
29906,
353,
6796,
4039,
613,
376,
6665,
613,
376,
19527,
613,
376,
280,
1092,
10532,
613,
376,
29890,
331,
5968,
686,
613,
376,
29881,
7547,
3108,
13,
29871,
1321,
5617,
9303,
29941,
353,
518,
29884,
29908,
29898,
5634,
29197,
451,
1476,
11474,
19123,
318,
29908,
29898,
5634,
13945,
1147,
22439,
686,
297,
12909,
9218,
436,
10235,
9784,
11474,
29897,
3108,
13,
29871,
5229,
353,
7700,
13,
29871,
363,
921,
297,
1321,
5617,
9303,
29941,
29901,
13,
1678,
565,
921,
297,
269,
29901,
13,
418,
736,
5852,
13,
29871,
363,
921,
297,
1321,
5617,
9303,
29896,
29901,
13,
1678,
565,
921,
451,
297,
269,
29901,
13,
418,
5229,
353,
5852,
13,
418,
2867,
13,
29871,
565,
451,
5229,
29901,
13,
1678,
736,
5852,
13,
29871,
363,
921,
297,
1321,
5617,
9303,
29906,
29901,
13,
1678,
565,
921,
451,
297,
269,
29901,
13,
418,
736,
7700,
13,
29871,
736,
5852,
13,
13,
13,
13,
1753,
21213,
29918,
781,
1973,
29918,
845,
9536,
29898,
24051,
1125,
13,
29871,
5534,
5534,
29918,
781,
1973,
13,
29871,
21213,
29918,
1272,
353,
5159,
13,
29871,
363,
1591,
297,
6131,
29901,
13,
1678,
565,
1591,
29889,
509,
29889,
1594,
29889,
5349,
29918,
5552,
703,
2103,
29908,
1125,
13,
418,
396,
2216,
1855,
29889,
10987,
1833,
3611,
2466,
29889,
13,
418,
1209,
13,
1678,
1683,
29901,
13,
13,
418,
848,
29918,
1285,
475,
414,
353,
1591,
29889,
2886,
29918,
497,
703,
509,
1159,
29961,
29896,
1822,
2886,
29918,
497,
703,
1594,
1159,
29961,
29896,
1822,
2886,
29918,
497,
703,
2371,
1159,
13,
418,
396,
2567,
591,
817,
848,
29918,
1285,
475,
414,
313,
4716,
526,
529,
2371,
29958,
29879,
29897,
297,
4870,
29879,
310,
1023,
29889,
13,
418,
396,
1334,
671,
445,
7223,
304,
4386,
445,
13,
418,
937,
353,
5852,
13,
418,
3151,
29918,
781,
545,
353,
6571,
13,
418,
363,
5639,
297,
848,
29918,
1285,
475,
414,
29901,
13,
13,
4706,
565,
937,
29901,
13,
3986,
3935,
29918,
7611,
353,
1051,
29898,
7611,
29889,
509,
29889,
1594,
29889,
11991,
29897,
13,
13,
3986,
2989,
29918,
3257,
353,
3935,
29918,
7611,
29961,
29896,
1822,
29874,
29889,
1807,
13,
3986,
3611,
29918,
20895,
353,
1347,
29889,
5451,
29898,
8159,
29918,
3257,
29892,
318,
29915,
448,
25710,
13,
3986,
565,
7431,
29898,
3257,
29918,
20895,
29897,
529,
29871,
29906,
29901,
13,
9651,
2319,
29918,
333,
353,
6213,
13,
9651,
2989,
29918,
3257,
353,
3611,
29918,
20895,
29961,
29900,
29962,
13,
3986,
1683,
29901,
13,
9651,
2319,
29918,
333,
353,
12013,
29889,
14941,
29918,
1807,
29898,
3257,
29918,
20895,
29961,
29900,
2314,
13,
9651,
2989,
29918,
3257,
353,
12013,
29889,
14941,
29918,
1807,
29898,
3257,
29918,
20895,
29961,
29896,
2314,
13,
13,
3986,
3935,
29918,
7611,
353,
1051,
29898,
19304,
29918,
7611,
29961,
29941,
1822,
11991,
29897,
13,
13,
3986,
694,
29918,
392,
29918,
2230,
353,
3935,
29918,
7611,
29961,
29900,
1822,
1807,
13,
3986,
694,
29918,
392,
29918,
2230,
353,
694,
29918,
392,
29918,
2230,
29889,
5451,
29898,
29884,
26732,
17367,
29900,
1159,
13,
3986,
1353,
353,
12013,
29889,
14941,
29918,
1807,
29898,
1217,
29918,
392,
29918,
2230,
29961,
29900,
2314,
13,
3986,
931,
353,
12013,
29889,
14941,
29918,
1807,
29898,
1217,
29918,
392,
29918,
2230,
29961,
29941,
2314,
13,
13,
3986,
454,
29883,
29918,
1853,
353,
12013,
29889,
14941,
29918,
1807,
29898,
19304,
29918,
7611,
29961,
29896,
1822,
1807,
29897,
13,
13,
3986,
565,
338,
8758,
29898,
19304,
29918,
7611,
29961,
29906,
1402,
2362,
342,
5393,
1125,
13,
9651,
7225,
353,
12013,
29889,
14941,
29918,
1807,
29898,
19304,
29918,
7611,
29961,
29906,
2314,
13,
9651,
565,
3935,
29918,
7611,
29961,
29941,
1822,
29874,
1275,
6213,
470,
3935,
29918,
7611,
29961,
29941,
1822,
29874,
29889,
1807,
1275,
6213,
29901,
13,
795,
13081,
9945,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
13081,
9945,
353,
12013,
29889,
14941,
29918,
1807,
29898,
19304,
29918,
7611,
29961,
29941,
1822,
29874,
29889,
1807,
29897,
13,
3986,
1683,
29901,
13,
9651,
7225,
353,
6213,
13,
9651,
565,
3935,
29918,
7611,
29961,
29906,
1822,
29874,
1275,
6213,
470,
3935,
29918,
7611,
29961,
29906,
1822,
29874,
29889,
1807,
1275,
6213,
29901,
13,
795,
13081,
9945,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
13081,
9945,
353,
12013,
29889,
14941,
29918,
1807,
29898,
19304,
29918,
7611,
29961,
29906,
1822,
29874,
29889,
1807,
29897,
13,
13,
3986,
565,
2319,
29918,
333,
1275,
6213,
29901,
13,
9651,
13552,
29918,
12292,
353,
5159,
13,
3986,
1683,
29901,
13,
9651,
13552,
29918,
12292,
353,
13552,
29889,
657,
29918,
5140,
29918,
12292,
29898,
9278,
29918,
333,
29897,
13,
13,
3986,
3151,
29918,
781,
545,
353,
426,
13,
795,
376,
3257,
1115,
8159,
29918,
3257,
29892,
13,
795,
376,
333,
1115,
4537,
29892,
13,
795,
376,
1853,
1115,
280,
29883,
29918,
1853,
29892,
13,
795,
376,
2230,
1115,
2230,
29892,
13,
795,
376,
12352,
441,
1115,
12352,
441,
29892,
13,
795,
376,
9278,
29918,
333,
1115,
9278,
29918,
333,
29892,
13,
795,
376,
781,
9945,
1115,
781,
9945,
29892,
13,
795,
376,
12292,
1115,
5140,
29918,
12292,
13,
3986,
500,
13,
13,
4706,
1683,
29901,
13,
3986,
396,
5974,
1591,
856,
334,
29879,
1141,
29930,
13,
3986,
5534,
29918,
781,
1973,
353,
5534,
29918,
781,
1973,
718,
29896,
13,
3986,
3064,
353,
5159,
13,
13,
3986,
363,
534,
297,
5639,
29889,
2886,
29918,
497,
703,
509,
29908,
1125,
13,
9651,
565,
534,
29889,
1594,
1275,
6213,
29901,
13,
795,
6773,
13,
9651,
565,
534,
29889,
386,
2804,
6213,
29901,
13,
795,
6773,
13,
13,
9651,
396,
1286,
591,
1016,
29915,
29873,
505,
278,
937,
1023,
29892,
322,
451,
278,
1833,
413,
260,
6289,
29889,
13,
9651,
396,
591,
508,
2869,
1369,
5214,
1749,
5335,
300,
519,
13,
9651,
260,
6289,
353,
1051,
29898,
509,
29889,
2886,
29918,
497,
703,
1594,
5783,
13,
9651,
565,
7431,
29898,
1594,
29879,
29897,
529,
29871,
29955,
29901,
13,
795,
6773,
13,
9651,
4723,
3250,
353,
12013,
29889,
657,
29918,
18448,
3250,
29898,
601,
29889,
14941,
29918,
1807,
29898,
1594,
29879,
29961,
29896,
1822,
1807,
876,
13,
13,
9651,
565,
260,
6289,
29961,
29906,
1822,
29876,
711,
29878,
29889,
1807,
1275,
6213,
29901,
13,
795,
931,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
931,
353,
260,
6289,
29961,
29906,
1822,
29876,
711,
29878,
29889,
1807,
29889,
17010,
580,
13,
9651,
565,
260,
6289,
29961,
29941,
1822,
29874,
29889,
1807,
1275,
6213,
29901,
13,
795,
5716,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
5716,
353,
11117,
978,
2396,
1594,
29879,
29961,
29941,
1822,
29874,
29889,
1807,
29892,
525,
2324,
2396,
1594,
29879,
29961,
29941,
1822,
29874,
1839,
12653,
2033,
29913,
13,
9651,
565,
260,
6289,
29961,
29946,
1822,
1807,
1275,
6213,
29901,
13,
795,
13081,
9945,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
13081,
9945,
353,
260,
6289,
29961,
29946,
1822,
1807,
29889,
17010,
580,
13,
9651,
565,
260,
6289,
29961,
29945,
1822,
1807,
1275,
6213,
29901,
13,
795,
11486,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
11486,
353,
260,
6289,
29961,
29945,
1822,
1807,
29889,
17010,
580,
13,
9651,
565,
260,
6289,
29961,
29953,
1822,
1807,
1275,
6213,
29901,
13,
795,
14385,
353,
6213,
13,
9651,
1683,
29901,
13,
795,
14385,
353,
12013,
29889,
14941,
29918,
1807,
29898,
1594,
29879,
29961,
29953,
1822,
1807,
29889,
6506,
28945,
1182,
28341,
376,
2564,
6506,
703,
18809,
613,
376,
517,
5783,
13,
13,
9651,
3064,
29889,
4397,
3319,
13,
795,
525,
3250,
2396,
18448,
3250,
29892,
13,
795,
525,
2230,
2396,
2230,
29892,
13,
795,
525,
8345,
2396,
8345,
29892,
13,
795,
525,
781,
9945,
2396,
781,
9945,
29892,
13,
795,
525,
16953,
2396,
16953,
29892,
13,
795,
525,
19708,
2396,
19708,
13,
9651,
5615,
13,
9651,
3151,
29918,
781,
545,
29889,
5504,
3319,
29915,
816,
11272,
2396,
3706,
1800,
13,
3986,
21213,
29918,
1272,
29889,
4397,
29898,
2764,
29918,
781,
545,
29897,
13,
3986,
1209,
13,
13,
4706,
937,
353,
451,
937,
13,
13,
29871,
736,
21213,
29918,
1272,
13,
13,
13,
1753,
6088,
29918,
4965,
29898,
7611,
1125,
13,
1678,
937,
353,
5852,
13,
1678,
9819,
29918,
4965,
353,
5159,
13,
1678,
363,
1591,
297,
5639,
29901,
13,
4706,
565,
937,
29901,
13,
9651,
9819,
29918,
4965,
29889,
4397,
29898,
2371,
29889,
509,
29889,
1594,
29889,
29882,
29906,
29889,
29874,
1839,
12653,
11287,
13,
13,
4706,
937,
353,
451,
937,
13,
1678,
736,
9819,
29918,
4965,
13,
13,
1753,
679,
29918,
280,
5989,
29898,
4965,
1125,
13,
1678,
1492,
29918,
14506,
29918,
974,
29918,
4965,
353,
5159,
13,
13,
1678,
363,
1544,
297,
2988,
29901,
13,
4706,
396,
2567,
591,
1016,
29915,
29873,
505,
738,
4069,
6131,
15128,
29889,
13,
4706,
565,
451,
1544,
29889,
509,
29889,
1594,
29889,
5349,
29918,
5552,
877,
2103,
29374,
13,
13,
9651,
396,
2567,
591,
505,
1749,
1855,
6131,
13,
9651,
396,
411,
3935,
848,
297,
372,
29889,
13,
9651,
396,
1334,
11455,
445,
848,
408,
5872,
13,
9651,
396,
322,
1106,
363,
278,
1544,
363,
278,
13,
9651,
396,
16955,
1813,
29889,
13,
9651,
1492,
29918,
14506,
29918,
974,
29918,
4965,
29889,
21843,
29898,
5510,
29918,
4965,
29898,
2324,
29889,
2886,
29918,
497,
703,
509,
1159,
29961,
29896,
1822,
2886,
29918,
497,
703,
1594,
1159,
29961,
29896,
1822,
2886,
29918,
497,
703,
2371,
29908,
4961,
13,
13,
9651,
396,
1394,
5505,
591,
1016,
29915,
29873,
29973,
13,
13,
13,
1678,
736,
1492,
29918,
14506,
29918,
974,
29918,
4965,
13,
13,
1753,
679,
29918,
18010,
29898,
4965,
1125,
13,
1678,
4236,
29918,
12791,
353,
448,
29896,
13,
1678,
3151,
29918,
3257,
353,
376,
4013,
881,
451,
367,
7962,
3926,
396,
29896,
29908,
13,
1678,
1833,
29918,
3257,
29922,
376,
4013,
881,
451,
367,
7962,
3926,
396,
29906,
29908,
13,
1678,
1492,
29918,
14506,
29918,
974,
29918,
4965,
353,
6571,
13,
1678,
363,
1544,
297,
2988,
29901,
13,
4706,
565,
451,
756,
29918,
2324,
29918,
3257,
29898,
2324,
1125,
13,
9651,
6773,
13,
4706,
3151,
29918,
12791,
353,
679,
29918,
2324,
29918,
12791,
29898,
2324,
29897,
13,
4706,
565,
29898,
3317,
29918,
12791,
529,
3151,
29918,
12791,
1125,
13,
13,
9651,
1833,
29918,
3257,
353,
3151,
29918,
3257,
13,
9651,
4236,
29918,
12791,
353,
3151,
29918,
12791,
13,
9651,
3151,
29918,
3257,
353,
679,
29918,
2324,
29918,
3257,
29898,
2324,
29897,
13,
9651,
1492,
29918,
14506,
29918,
974,
29918,
4965,
353,
426,
2764,
29918,
3257,
29901,
2324,
29913,
13,
4706,
1683,
29901,
13,
9651,
3151,
29918,
3257,
353,
679,
29918,
2324,
29918,
3257,
29898,
2324,
29897,
13,
9651,
1492,
29918,
14506,
29918,
974,
29918,
4965,
29889,
5504,
3319,
2764,
29918,
3257,
29901,
2324,
1800,
13,
13,
1678,
736,
1833,
29918,
3257,
29892,
1492,
29918,
14506,
29918,
974,
29918,
4965,
13,
13,
1753,
6088,
29918,
781,
545,
29918,
24535,
368,
29898,
2324,
1125,
13,
1678,
274,
353,
679,
29918,
3051,
29898,
2324,
29897,
13,
1678,
270,
353,
274,
29889,
2886,
703,
4563,
613,
770,
29918,
543,
3051,
2564,
689,
13,
13,
1678,
321,
353,
270,
29889,
2886,
29918,
497,
703,
2371,
613,
16732,
29922,
8824,
29897,
13,
1678,
396,
512,
321,
29961,
29900,
5387,
14861,
29899,
24065,
29871,
29900,
29946,
29900,
29906,
448,
9082,
498,
6656,
9444,
18220,
448,
16740,
4533,
13,
13,
1678,
2989,
29918,
3257,
353,
321,
29961,
29900,
1822,
509,
29889,
1594,
29889,
29882,
29896,
29889,
1807,
13,
13,
1678,
3611,
29918,
20895,
353,
1347,
29889,
5451,
29898,
8159,
29918,
3257,
29892,
318,
29915,
448,
25710,
13,
1678,
2319,
29918,
333,
353,
12013,
29889,
14941,
29918,
1807,
29898,
3257,
29918,
20895,
29961,
29900,
2314,
13,
1678,
2989,
29918,
3257,
353,
12013,
29889,
14941,
29918,
1807,
29898,
3257,
29918,
20895,
29961,
29896,
1822,
17010,
3101,
13,
13,
13,
1678,
396,
512,
285,
29901,
11100,
4898,
29871,
29953,
29896,
29906,
29900,
29896,
29900,
29946,
29900,
29906,
268,
9444,
18220,
1678,
14570,
2008,
29871,
29906,
29900,
29896,
29953,
29914,
29896,
29955,
418,
29906,
29889,
29900,
379,
2470,
639,
4723,
297,
1840,
13,
1678,
285,
353,
1051,
29898,
29872,
29961,
29896,
1822,
509,
29889,
1594,
29889,
11991,
29897,
13,
1678,
2380,
353,
29871,
29906,
13,
13,
1678,
565,
7431,
29898,
29888,
29897,
529,
29871,
29946,
29901,
13,
4706,
2380,
353,
29871,
29900,
13,
4706,
1353,
353,
6213,
13,
1678,
1683,
29901,
13,
4706,
1353,
353,
285,
29961,
29896,
1822,
1807,
13,
13,
1678,
454,
29883,
29918,
1853,
353,
12013,
29889,
14941,
29918,
1807,
29898,
29888,
29961,
29896,
29974,
2248,
1822,
1807,
29897,
13,
13,
1678,
931,
29918,
392,
29918,
12352,
441,
353,
285,
29961,
29906,
29974,
2248,
29962,
13,
1678,
260,
3660,
353,
1347,
29889,
5451,
29898,
2230,
29918,
392,
29918,
12352,
441,
29892,
318,
12764,
17367,
29900,
1495,
13,
1678,
931,
353,
12013,
29889,
14941,
29918,
1807,
29898,
941,
29872,
29961,
29900,
2314,
13,
1678,
7225,
353,
12013,
29889,
14941,
29918,
1807,
29898,
941,
29872,
29961,
29941,
2314,
13,
13,
1678,
396,
29872,
29961,
29906,
29962,
338,
925,
376,
7058,
29915,
29879,
263,
5835,
29879,
29871,
3236,
13,
1678,
2380,
353,
29871,
29941,
13,
1678,
565,
29898,
29872,
29961,
2248,
1822,
509,
1275,
6213,
1125,
13,
4706,
2380,
353,
29871,
29906,
13,
1678,
13081,
9945,
353,
321,
29961,
2248,
1822,
509,
29889,
2886,
29918,
497,
703,
1594,
1159,
13,
1678,
565,
29898,
2435,
29898,
781,
9945,
29897,
1405,
29871,
29896,
1125,
13,
4706,
13081,
9945,
353,
12013,
29889,
14941,
29918,
1807,
29898,
781,
9945,
29961,
29896,
1822,
29874,
29889,
1807,
29897,
13,
1678,
1683,
29901,
13,
4706,
13081,
9945,
353,
6213,
13,
13,
1678,
736,
426,
13,
4706,
376,
3257,
1115,
8159,
29918,
3257,
29892,
13,
4706,
376,
333,
1115,
4537,
29892,
13,
4706,
376,
1853,
1115,
280,
29883,
29918,
1853,
29892,
13,
4706,
376,
2230,
1115,
2230,
29892,
13,
4706,
376,
12352,
441,
1115,
12352,
441,
29892,
13,
4706,
376,
9278,
29918,
333,
1115,
9278,
29918,
333,
29892,
13,
4706,
376,
781,
9945,
1115,
781,
9945,
13,
1678,
500,
13,
13,
13,
1753,
21213,
29918,
781,
1973,
29918,
24535,
368,
29898,
4965,
1125,
13,
1678,
21213,
29918,
1272,
353,
5159,
13,
1678,
5534,
5534,
29918,
781,
1973,
13,
1678,
363,
1544,
297,
2988,
29901,
13,
4706,
5534,
29918,
781,
1973,
353,
5534,
29918,
781,
1973,
718,
29896,
13,
4706,
270,
353,
6088,
29918,
781,
545,
29918,
24535,
368,
29898,
2324,
29897,
13,
4706,
270,
29889,
5504,
3319,
29915,
2324,
2396,
2324,
1800,
13,
4706,
21213,
29918,
1272,
29889,
4397,
29898,
29881,
29897,
13,
1678,
736,
21213,
29918,
1272,
13,
2
] |
typarser/_base_optarg.py | ermishechkin/typarser | 0 | 27542 | from __future__ import annotations
import typing
from typing import Callable, Generic, Iterable, Literal, Optional, Tuple, Union
from ._base import RESULT, TYPE, BaseComponent
from ._internal_namespace import set_value
if typing.TYPE_CHECKING:
from ._base import Namespace
from .action import Action
NARGS = Union[int, Literal['*'], Literal['+'], Literal['?']]
class BaseOptArg(BaseComponent[TYPE, RESULT], Generic[TYPE, RESULT]):
def __init__(
self,
*,
type: Callable[[str], TYPE], # pylint: disable=redefined-builtin
nargs: Optional[NARGS],
choices: Optional[Iterable[TYPE]],
default: Optional[Union[RESULT, str]],
metavar: Optional[Union[str, Tuple[str, ...]]],
action: Optional[Action] = None,
help: Optional[str], # pylint: disable=redefined-builtin
) -> None:
super().__init__(help=help)
self._type = type
self._nargs = nargs
self._choices = tuple(choices) if choices else None
self._default = default
self._metavar = metavar
self._action = action
@property
def type(self) -> Callable[[str], TYPE]:
return self._type
@property
def nargs(self) -> Optional[NARGS]:
return self._nargs
@property
def choices(self) -> Optional[Tuple[TYPE, ...]]:
return self._choices
@property
def default(self) -> Optional[Union[RESULT, str]]:
return self._default
@property
def metavar(self) -> Optional[Union[str, Tuple[str, ...]]]:
return self._metavar
@property
def action(self) -> Optional[Action]:
return self._action
def __set__(self, owner: Namespace, value: TYPE):
set_value(owner, self, value)
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
19229,
13,
3166,
19229,
1053,
8251,
519,
29892,
3251,
293,
29892,
20504,
519,
29892,
5449,
284,
29892,
28379,
29892,
12603,
552,
29892,
7761,
13,
13,
3166,
869,
29918,
3188,
1053,
390,
2890,
8647,
29892,
323,
6959,
29892,
7399,
5308,
13,
3166,
869,
29918,
7564,
29918,
22377,
1053,
731,
29918,
1767,
13,
13,
361,
19229,
29889,
11116,
29918,
3210,
16658,
4214,
29901,
13,
1678,
515,
869,
29918,
3188,
1053,
14706,
3535,
13,
1678,
515,
869,
2467,
1053,
9123,
13,
1678,
405,
1718,
10749,
353,
7761,
29961,
524,
29892,
5449,
284,
1839,
29930,
7464,
5449,
284,
1839,
29974,
7464,
5449,
284,
1839,
29973,
2033,
29962,
13,
13,
13,
1990,
7399,
20624,
8559,
29898,
5160,
5308,
29961,
11116,
29892,
390,
2890,
8647,
1402,
3251,
293,
29961,
11116,
29892,
390,
2890,
8647,
29962,
1125,
13,
1678,
822,
4770,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
334,
29892,
13,
9651,
1134,
29901,
8251,
519,
8999,
710,
1402,
323,
6959,
1402,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
276,
12119,
29899,
16145,
262,
13,
9651,
302,
5085,
29901,
28379,
29961,
29940,
1718,
10749,
1402,
13,
9651,
19995,
29901,
28379,
29961,
13463,
519,
29961,
11116,
20526,
13,
9651,
2322,
29901,
28379,
29961,
19986,
29961,
15989,
8647,
29892,
851,
20526,
13,
9651,
1539,
485,
279,
29901,
28379,
29961,
19986,
29961,
710,
29892,
12603,
552,
29961,
710,
29892,
2023,
5262,
1402,
13,
9651,
3158,
29901,
28379,
29961,
4276,
29962,
353,
6213,
29892,
13,
9651,
1371,
29901,
28379,
29961,
710,
1402,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
276,
12119,
29899,
16145,
262,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8477,
29922,
8477,
29897,
13,
4706,
1583,
3032,
1853,
353,
1134,
13,
4706,
1583,
3032,
29876,
5085,
353,
302,
5085,
13,
4706,
1583,
3032,
1859,
1575,
353,
18761,
29898,
1859,
1575,
29897,
565,
19995,
1683,
6213,
13,
4706,
1583,
3032,
4381,
353,
2322,
13,
4706,
1583,
3032,
2527,
485,
279,
353,
1539,
485,
279,
13,
4706,
1583,
3032,
2467,
353,
3158,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1134,
29898,
1311,
29897,
1599,
8251,
519,
8999,
710,
1402,
323,
6959,
5387,
13,
4706,
736,
1583,
3032,
1853,
13,
13,
1678,
732,
6799,
13,
1678,
822,
302,
5085,
29898,
1311,
29897,
1599,
28379,
29961,
29940,
1718,
10749,
5387,
13,
4706,
736,
1583,
3032,
29876,
5085,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19995,
29898,
1311,
29897,
1599,
28379,
29961,
23215,
552,
29961,
11116,
29892,
2023,
5262,
29901,
13,
4706,
736,
1583,
3032,
1859,
1575,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2322,
29898,
1311,
29897,
1599,
28379,
29961,
19986,
29961,
15989,
8647,
29892,
851,
5262,
29901,
13,
4706,
736,
1583,
3032,
4381,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1539,
485,
279,
29898,
1311,
29897,
1599,
28379,
29961,
19986,
29961,
710,
29892,
12603,
552,
29961,
710,
29892,
2023,
5262,
5387,
13,
4706,
736,
1583,
3032,
2527,
485,
279,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3158,
29898,
1311,
29897,
1599,
28379,
29961,
4276,
5387,
13,
4706,
736,
1583,
3032,
2467,
13,
13,
1678,
822,
4770,
842,
12035,
1311,
29892,
12271,
29901,
14706,
3535,
29892,
995,
29901,
323,
6959,
1125,
13,
4706,
731,
29918,
1767,
29898,
20348,
29892,
1583,
29892,
995,
29897,
13,
2
] |
tests/test_angular_style.py | rainchen/git-changelog | 1 | 68128 | from git_changelog.build import Commit
from git_changelog.style import AngularStyle
def test_angular_style_breaking_change():
subject = "feat: this is a new breaking feature"
body = ["BREAKING CHANGE: there is a breaking feature in this code"]
commit = Commit(hash="aaaaaaa", subject=subject, body=body, author_date="1574340645", committer_date="1574340645")
style = AngularStyle()
commit_dict = style.parse_commit(commit)
assert commit_dict["is_major"]
assert not commit_dict["is_minor"]
assert not commit_dict["is_patch"]
def test_angular_style_breaking_changes():
subject = "feat: this is a new breaking feature"
body = ["BREAKING CHANGES: there is a breaking feature in this code"]
commit = Commit(hash="aaaaaaa", subject=subject, body=body, author_date="1574340645", committer_date="1574340645")
style = AngularStyle()
commit_dict = style.parse_commit(commit)
assert commit_dict["is_major"]
assert not commit_dict["is_minor"]
assert not commit_dict["is_patch"]
def test_angular_style_feat():
subject = "feat: this is a new feature"
commit = Commit(hash="aaaaaaa", subject=subject, author_date="1574340645", committer_date="1574340645")
style = AngularStyle()
commit_dict = style.parse_commit(commit)
assert not commit_dict["is_major"]
assert commit_dict["is_minor"]
assert not commit_dict["is_patch"]
def test_angular_style_fix():
subject = "fix: this is a bug fix"
commit = Commit(hash="aaaaaaa", subject=subject, author_date="1574340645", committer_date="1574340645")
style = AngularStyle()
commit_dict = style.parse_commit(commit)
assert not commit_dict["is_major"]
assert not commit_dict["is_minor"]
assert commit_dict["is_patch"]
| [
1,
515,
6315,
29918,
305,
9477,
468,
29889,
4282,
1053,
1876,
277,
13,
3166,
6315,
29918,
305,
9477,
468,
29889,
3293,
1053,
11575,
5568,
13,
13,
13,
1753,
1243,
29918,
6825,
29918,
3293,
29918,
1030,
5086,
29918,
3167,
7295,
13,
1678,
4967,
353,
376,
1725,
271,
29901,
445,
338,
263,
716,
16679,
4682,
29908,
13,
1678,
3573,
353,
6796,
29933,
1525,
22311,
4214,
5868,
24336,
29901,
727,
338,
263,
16679,
4682,
297,
445,
775,
3108,
13,
1678,
9063,
353,
1876,
277,
29898,
8568,
543,
27137,
7340,
29874,
613,
4967,
29922,
16009,
29892,
3573,
29922,
2587,
29892,
4148,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
613,
844,
5171,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
1159,
13,
1678,
3114,
353,
11575,
5568,
580,
13,
1678,
9063,
29918,
8977,
353,
3114,
29889,
5510,
29918,
15060,
29898,
15060,
29897,
13,
1678,
4974,
9063,
29918,
8977,
3366,
275,
29918,
21355,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
1195,
272,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
5041,
3108,
13,
13,
13,
1753,
1243,
29918,
6825,
29918,
3293,
29918,
1030,
5086,
29918,
25990,
7295,
13,
1678,
4967,
353,
376,
1725,
271,
29901,
445,
338,
263,
716,
16679,
4682,
29908,
13,
1678,
3573,
353,
6796,
29933,
1525,
22311,
4214,
5868,
24336,
29903,
29901,
727,
338,
263,
16679,
4682,
297,
445,
775,
3108,
13,
1678,
9063,
353,
1876,
277,
29898,
8568,
543,
27137,
7340,
29874,
613,
4967,
29922,
16009,
29892,
3573,
29922,
2587,
29892,
4148,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
613,
844,
5171,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
1159,
13,
1678,
3114,
353,
11575,
5568,
580,
13,
1678,
9063,
29918,
8977,
353,
3114,
29889,
5510,
29918,
15060,
29898,
15060,
29897,
13,
1678,
4974,
9063,
29918,
8977,
3366,
275,
29918,
21355,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
1195,
272,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
5041,
3108,
13,
13,
13,
1753,
1243,
29918,
6825,
29918,
3293,
29918,
1725,
271,
7295,
13,
1678,
4967,
353,
376,
1725,
271,
29901,
445,
338,
263,
716,
4682,
29908,
13,
1678,
9063,
353,
1876,
277,
29898,
8568,
543,
27137,
7340,
29874,
613,
4967,
29922,
16009,
29892,
4148,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
613,
844,
5171,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
1159,
13,
1678,
3114,
353,
11575,
5568,
580,
13,
1678,
9063,
29918,
8977,
353,
3114,
29889,
5510,
29918,
15060,
29898,
15060,
29897,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
21355,
3108,
13,
1678,
4974,
9063,
29918,
8977,
3366,
275,
29918,
1195,
272,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
5041,
3108,
13,
13,
13,
1753,
1243,
29918,
6825,
29918,
3293,
29918,
5878,
7295,
13,
1678,
4967,
353,
376,
5878,
29901,
445,
338,
263,
6494,
2329,
29908,
13,
1678,
9063,
353,
1876,
277,
29898,
8568,
543,
27137,
7340,
29874,
613,
4967,
29922,
16009,
29892,
4148,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
613,
844,
5171,
29918,
1256,
543,
29896,
29945,
29955,
29946,
29941,
29946,
29900,
29953,
29946,
29945,
1159,
13,
1678,
3114,
353,
11575,
5568,
580,
13,
1678,
9063,
29918,
8977,
353,
3114,
29889,
5510,
29918,
15060,
29898,
15060,
29897,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
21355,
3108,
13,
1678,
4974,
451,
9063,
29918,
8977,
3366,
275,
29918,
1195,
272,
3108,
13,
1678,
4974,
9063,
29918,
8977,
3366,
275,
29918,
5041,
3108,
13,
2
] |
src/class_1/code.py | byteEpoch/python_course | 1 | 166971 | # Esto es un comentario
# enteros - int
my_int = 42
# reales - float
my_float = 3.14
# strings - str
my_str = 'string con comilla simple'
my_str_2 = "string con comilla doble"
my_str_3 = """string
multilinea"""
"""Los strings
multilinea
pueden servir
para poner
comentarios de
varias líneas"""
# booleans - bool
my_bool_true = True
my_bool_false = False
# Imprimir por pantalla
print('Imprime cualquier cosa entre los parentesis')
# Operaciones aritméticas (int y floats)
print(3 + 4) # Suma: 7
print(3 - 4) # Resta: -1
print(3 * 4) # Multiplicacion: 12
print(3 / 4) # Divison: 0.75
print(3 // 4) # Divion entera: 0
print(3 % 4) # Modulo: 3
print(3 ** 4) # Potenciacion: 81
print(-3) # Negativo: -3
print(+3) # Positivo: 3
# Los parentesis cambian la precedencia de los operadores
print(3 / 4 * 5) # 3.75
print(3 / (4 * 5)) # 0.15
# La lista de precedencia de los operadores la podeis ver aqui:
# https://docs.python.org/3/reference/expressions.html#operator-precedence
# La lista esta ordenada de menor a mayor. Contiene muchas mas cosas de las que hemos visto
# ahora, pero os puede servir si teneis dudas.
# Operaciones ariméticas (str)
print('Hello, ' + 'byteEpoch') # Hello, byteEpoch
print('spam' * 3) # spamspamspam
print('na' * 8 + ' Batman') # <NAME>
# print('Un string ' + 5) # ERROR: no se puede concatenar un str con algo que no sea un str
# Cambio/Cast de tipos
str(3) # int a str
str(3.14) # float a str
int('3') # str a int
# int('3.14') # ERROR: no es un int
float('3') # str a float
float('3.14') # str a float
bool(0) # False
bool(42) # True
bool(3.14) # True
bool(0.0) # False
bool('') # False
bool(':)') # True
# Declarar variables
# Reglas para los nombres:
# 1. Los nombres solo puedes contener caracteres alfanumericos y _
# 2. Las variables no pueden comenzar por numeros
# 3. Las variables no pueden tener espacios
# A parte de esto, las variables no pueden llamarse como algunas palabras
# os dejo un link con las palabras prohibidas:
# https://docs.python.org/3/reference/lexical_analysis.html#keywords
# Por ultimo, las variables son case-senstive, no es lo mismo my_var que MY_VAR
# Ejemplos de nombres de variables:
my_var = 3
my_var_2 = 12
_my_other_var = 'papi'
_12 = 'Arthur'
MY_VAR = 'GREAT'
# Ejemplos de variables con nombres invalidos
# 12 = 'a' - Empieza por numero
# dollar$ = '$' - Continen algo que no es un caracter alfanumerico o _
# my var = 12 - Contiene espacios
# def = 2 - Palabra reservada
# Leer por teclado
my_value_from_keyboard = input()
my_value_from_keyboard_2 = input('Este texto sale por pantalla como el print: ')
# Longitud de un string
print(len('hola')) # 4
"""Primer programita en un string multilinea
print('Hello, world!')
print('What is your name?')
my_name = input()
print('It is good to meet you, ' + my_name)
print('The length of your name is:')
print(len(my_name))
print('What is your age?')
my_age = input()
print('You will be ' + str(int(my_age) + 1) + ' in a year.')
"""
# Operadores comparativos
# Estos operadores devuelven un bool - True o False, 0 o 1
# Igual a
my_num_1 = 7
my_num_2 = 7
print(my_num_1 == my_num_2) # True
# Distinto de
my_str1 = 'A'
my_str2 = 'a'
print(my_str1 != my_str2) # True
# Mayor que
print(5 > 3) # True
# Menor que
print(5 < 3) # False
# Mayor o igual a
print(5 >= 3) # True
# Menor o igual a
print(5 <= 3) # True
# Operadores de asignacion
# Asignan lo que haya a la derecha del operador a la variable de la izquierda
# Asignacion normal
my_number = 3
print(my_number) # 3
# Asignacion con suma
# Suma lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number + 2
my_number += 2
print(my_number) # 5
# Asignacion con resta
# Resta lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number - 2
my_number -= 2
print(my_number) # 3
# Asignacion con multiplicacion
# Multiplica lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number * 2
my_number *= 2
print(my_number) # 6
# Asignacion con division
# Divide lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number / 2
my_number /= 2
print(my_number) # 3
# Asignacion con potenciacion
# Potencia lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number ** 2
my_number **= 2
print(my_number) # 9
# Asignacion con division entera
# Divide y descarta la parte decimal de lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number // 2
my_number //= 2
print(my_number) # 4
# Asignacion con modulo
# Obtiene el modulo de la division de lo que haya a la derecha a lo que ya hubiera a la izquierda
# Seria equivalente a my_number = my_number % 2
my_number %= 2
print(my_number) # 0
# OR
# Puerta logica que devuelve True si cualquiera de las dos partes es True.
# En cualquier otro caso devuelve False.
cobrar = False
dejar = False
print(cobrar or dejar) # 0 0 - False
cobrar = False
dejar = True
print(cobrar or dejar) # 0 1 - True
cobrar = True
dejar = False
print(cobrar or dejar) # 1 0 - True
cobrar = True
dejar = True
print(cobrar or dejar) # 1 1 - True
# AND
# Puerta logica que devuelve True si, y solo si, ambas partes son True.
# En cualquier otro caso devuelve False.
cobramos = False
soleado = False
print(cobramos and soleado) # 0 0 - False
cobramos = False
soleado = True
print(cobramos and soleado) # 0 1 - False
cobramos = True
soleado = False
print(cobramos and soleado) # 1 0 - False
cobramos = True
soleado = True
print(cobramos and soleado) # 1 1 - True
# NOT
# Puerta logica que devuelve la inversa, si es True, devuleve False, y si es False, devuleve True
inversa = True
print(not inversa) # False
inversa = False
print(not inversa) # True
# Estructura de control condicional - if
# Ejecuta el codigo que contiene si su condicion es True
# Para indicar que el codigo esta dentro del if se hace indentando el codigo
# Se puede indentar con cualquier numero de espacios o tabulador
# aunque lo recomendable es con 4 espacios.
# La mayoria de editores, sobre todo si son para python, transforman los
# tabuladores en 4 espacios.
# La sintaxis seria:
# if CONDICION:
# CODIGO
if cobramos and soleado:
print('Party hard!')
# Si necesitamos tambien contemplar el caso contrario usamos else
# La sintaxis seria:
# if CONDICION:
# CODIGO PARA CONDICION TRUE
# else:
# CODIGO PARA CONDICION FALSE
if cobramos and soleado:
print('Party hard!')
else:
print('Boooring!')
# Happy Hacking! :)
| [
1,
396,
2661,
29877,
831,
443,
419,
296,
2628,
13,
13,
29937,
3896,
359,
448,
938,
13,
1357,
29918,
524,
353,
29871,
29946,
29906,
13,
13,
29937,
1855,
267,
448,
5785,
13,
1357,
29918,
7411,
353,
29871,
29941,
29889,
29896,
29946,
13,
13,
29937,
6031,
448,
851,
13,
1357,
29918,
710,
353,
525,
1807,
378,
419,
2911,
2560,
29915,
13,
1357,
29918,
710,
29918,
29906,
353,
376,
1807,
378,
419,
2911,
437,
569,
29908,
13,
1357,
29918,
710,
29918,
29941,
353,
9995,
1807,
29871,
13,
4713,
309,
16736,
15945,
29908,
13,
13,
15945,
29908,
29286,
6031,
13,
4713,
309,
16736,
13,
3746,
6424,
28644,
13,
22752,
12509,
261,
13,
510,
296,
8596,
316,
13,
5927,
294,
10263,
484,
294,
15945,
29908,
13,
13,
29937,
1045,
1772,
550,
448,
6120,
13,
1357,
29918,
11227,
29918,
3009,
353,
5852,
13,
1357,
29918,
11227,
29918,
4541,
353,
7700,
13,
13,
29937,
1954,
9469,
381,
1277,
282,
424,
9864,
13,
2158,
877,
1888,
10080,
28217,
22383,
2637,
1232,
3847,
6656,
1495,
13,
13,
29937,
6607,
6027,
564,
277,
29885,
1893,
5070,
313,
524,
343,
5685,
1446,
29897,
13,
2158,
29898,
29941,
718,
29871,
29946,
29897,
29871,
396,
6991,
29874,
29901,
29871,
29955,
13,
2158,
29898,
29941,
448,
29871,
29946,
29897,
29871,
396,
390,
4405,
29901,
448,
29896,
13,
2158,
29898,
29941,
334,
29871,
29946,
29897,
29871,
396,
9683,
666,
506,
16337,
29901,
29871,
29896,
29906,
13,
2158,
29898,
29941,
847,
29871,
29946,
29897,
29871,
396,
4910,
2285,
29901,
29871,
29900,
29889,
29955,
29945,
13,
2158,
29898,
29941,
849,
29871,
29946,
29897,
396,
4910,
291,
875,
1572,
29901,
29871,
29900,
13,
2158,
29898,
29941,
1273,
29871,
29946,
29897,
29871,
396,
3382,
7207,
29901,
29871,
29941,
29871,
13,
2158,
29898,
29941,
3579,
29871,
29946,
29897,
396,
10173,
5760,
12401,
29901,
29871,
29947,
29896,
13,
2158,
6278,
29941,
29897,
268,
396,
12610,
11692,
29901,
448,
29941,
13,
2158,
29898,
29974,
29941,
29897,
268,
396,
10321,
277,
4243,
29901,
29871,
29941,
13,
13,
29937,
4602,
3847,
6656,
10625,
713,
425,
9399,
5760,
316,
1232,
1751,
7447,
13,
2158,
29898,
29941,
847,
29871,
29946,
334,
29871,
29945,
29897,
259,
396,
29871,
29941,
29889,
29955,
29945,
13,
2158,
29898,
29941,
847,
313,
29946,
334,
29871,
29945,
876,
396,
29871,
29900,
29889,
29896,
29945,
13,
13,
29937,
997,
15023,
316,
9399,
5760,
316,
1232,
1751,
7447,
425,
13279,
275,
1147,
263,
6578,
29901,
13,
29937,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29941,
29914,
5679,
29914,
17073,
1080,
29889,
1420,
29937,
6891,
29899,
1457,
1133,
663,
13,
29937,
997,
15023,
7444,
16075,
1114,
316,
26764,
263,
9105,
29889,
2866,
3530,
1568,
294,
5516,
6776,
294,
316,
1869,
712,
9736,
359,
29025,
13,
29937,
263,
15255,
29892,
7046,
2897,
11493,
28644,
1354,
260,
1600,
275,
270,
566,
294,
29889,
13,
13,
29937,
6607,
6027,
564,
326,
1893,
5070,
313,
710,
29897,
13,
2158,
877,
10994,
29892,
525,
718,
525,
10389,
29923,
1129,
305,
1495,
396,
15043,
29892,
7023,
29923,
1129,
305,
13,
2158,
877,
1028,
314,
29915,
334,
29871,
29941,
29897,
795,
396,
805,
314,
1028,
314,
1028,
314,
13,
2158,
877,
1056,
29915,
334,
29871,
29947,
718,
525,
12579,
1171,
1495,
1678,
396,
529,
5813,
29958,
13,
29937,
1596,
877,
2525,
1347,
525,
718,
29871,
29945,
29897,
418,
396,
14431,
29901,
694,
409,
11493,
16125,
279,
443,
851,
378,
24673,
712,
694,
7205,
443,
851,
13,
13,
29937,
9287,
601,
29914,
15738,
316,
6872,
359,
13,
710,
29898,
29941,
29897,
4706,
396,
938,
263,
851,
13,
710,
29898,
29941,
29889,
29896,
29946,
29897,
268,
396,
5785,
263,
851,
13,
524,
877,
29941,
1495,
418,
396,
851,
263,
938,
13,
29937,
938,
877,
29941,
29889,
29896,
29946,
1495,
396,
14431,
29901,
694,
831,
443,
938,
13,
7411,
877,
29941,
1495,
1678,
396,
851,
263,
5785,
13,
7411,
877,
29941,
29889,
29896,
29946,
1495,
396,
851,
263,
5785,
13,
11227,
29898,
29900,
29897,
539,
396,
7700,
13,
11227,
29898,
29946,
29906,
29897,
418,
396,
5852,
13,
11227,
29898,
29941,
29889,
29896,
29946,
29897,
1678,
396,
5852,
13,
11227,
29898,
29900,
29889,
29900,
29897,
268,
396,
7700,
13,
11227,
877,
1495,
418,
396,
7700,
13,
11227,
877,
20925,
1495,
1678,
396,
5852,
13,
13,
29937,
3826,
4675,
279,
3651,
13,
29937,
2169,
3333,
1702,
1232,
2245,
16105,
29901,
13,
29937,
29871,
29896,
29889,
4602,
2245,
16105,
6651,
2653,
11696,
640,
759,
15215,
267,
394,
12963,
4680,
4869,
343,
903,
13,
29937,
29871,
29906,
29889,
7413,
3651,
694,
19796,
19487,
279,
1277,
4825,
359,
13,
29937,
29871,
29941,
29889,
7413,
3651,
694,
19796,
22975,
9015,
20237,
13,
29937,
319,
3810,
316,
18261,
29892,
1869,
3651,
694,
19796,
11829,
7989,
1986,
27228,
27555,
3417,
13,
29937,
2897,
316,
2212,
443,
1544,
378,
1869,
27555,
3417,
21460,
8817,
29901,
29871,
13,
29937,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29941,
29914,
5679,
29914,
2506,
936,
29918,
15916,
29889,
1420,
29937,
1989,
9303,
13,
29937,
7102,
8494,
4200,
29892,
1869,
3651,
1487,
1206,
29899,
4881,
303,
573,
29892,
694,
831,
658,
11329,
590,
29918,
1707,
712,
19519,
29918,
26865,
13,
29937,
382,
12701,
572,
359,
316,
2245,
16105,
316,
3651,
29901,
13,
1357,
29918,
1707,
353,
29871,
29941,
13,
1357,
29918,
1707,
29918,
29906,
353,
29871,
29896,
29906,
13,
29918,
1357,
29918,
1228,
29918,
1707,
353,
525,
29886,
2754,
29915,
13,
29918,
29896,
29906,
353,
525,
1433,
9743,
29915,
13,
17870,
29918,
26865,
353,
525,
29954,
1525,
1299,
29915,
13,
29937,
382,
12701,
572,
359,
316,
3651,
378,
2245,
16105,
8340,
359,
13,
29937,
29871,
29896,
29906,
353,
525,
29874,
29915,
448,
7361,
347,
1362,
1277,
17910,
13,
29937,
11232,
279,
29938,
353,
14180,
29915,
448,
2866,
7026,
24673,
712,
694,
831,
443,
15215,
394,
12963,
4680,
1417,
288,
903,
13,
29937,
590,
722,
353,
29871,
29896,
29906,
448,
2866,
3530,
9015,
20237,
13,
29937,
822,
353,
29871,
29906,
448,
3793,
370,
336,
620,
6972,
1114,
13,
13,
29937,
951,
261,
1277,
13784,
29880,
912,
13,
1357,
29918,
1767,
29918,
3166,
29918,
1989,
3377,
353,
1881,
580,
13,
1357,
29918,
1767,
29918,
3166,
29918,
1989,
3377,
29918,
29906,
353,
1881,
877,
29923,
1655,
1426,
29877,
14686,
1277,
282,
424,
9864,
1986,
560,
1596,
29901,
25710,
13,
13,
29937,
6242,
11267,
316,
443,
1347,
13,
2158,
29898,
2435,
877,
29882,
2963,
8785,
396,
29871,
29946,
13,
13,
15945,
29908,
4040,
4193,
1824,
2028,
427,
443,
1347,
1773,
309,
16736,
13,
13,
2158,
877,
10994,
29892,
3186,
29991,
1495,
13,
2158,
877,
5618,
338,
596,
1024,
29973,
1495,
13,
1357,
29918,
978,
353,
1881,
580,
13,
2158,
877,
3112,
338,
1781,
304,
5870,
366,
29892,
525,
718,
590,
29918,
978,
29897,
13,
2158,
877,
1576,
3309,
310,
596,
1024,
338,
29901,
1495,
13,
2158,
29898,
2435,
29898,
1357,
29918,
978,
876,
13,
2158,
877,
5618,
338,
596,
5046,
29973,
1495,
13,
1357,
29918,
482,
353,
1881,
580,
13,
2158,
877,
3492,
674,
367,
525,
718,
851,
29898,
524,
29898,
1357,
29918,
482,
29897,
718,
29871,
29896,
29897,
718,
525,
297,
263,
1629,
29889,
1495,
13,
15945,
29908,
13,
13,
29937,
6607,
7447,
5734,
29002,
13,
29937,
2661,
359,
1751,
7447,
2906,
2491,
854,
443,
6120,
448,
5852,
288,
7700,
29892,
29871,
29900,
288,
29871,
29896,
13,
29937,
12815,
950,
263,
13,
1357,
29918,
1949,
29918,
29896,
353,
29871,
29955,
13,
1357,
29918,
1949,
29918,
29906,
353,
29871,
29955,
13,
2158,
29898,
1357,
29918,
1949,
29918,
29896,
1275,
590,
29918,
1949,
29918,
29906,
29897,
396,
5852,
13,
29937,
6652,
8941,
316,
13,
1357,
29918,
710,
29896,
353,
525,
29909,
29915,
13,
1357,
29918,
710,
29906,
353,
525,
29874,
29915,
13,
2158,
29898,
1357,
29918,
710,
29896,
2804,
590,
29918,
710,
29906,
29897,
259,
396,
5852,
13,
29937,
22186,
712,
13,
2158,
29898,
29945,
1405,
29871,
29941,
29897,
29871,
396,
5852,
13,
29937,
7567,
272,
712,
13,
2158,
29898,
29945,
529,
29871,
29941,
29897,
29871,
396,
7700,
13,
29937,
22186,
288,
21432,
263,
13,
2158,
29898,
29945,
6736,
29871,
29941,
29897,
396,
5852,
13,
29937,
7567,
272,
288,
21432,
263,
13,
2158,
29898,
29945,
5277,
29871,
29941,
29897,
396,
5852,
13,
13,
29937,
6607,
7447,
316,
408,
647,
16337,
13,
29937,
1094,
647,
273,
658,
712,
298,
9010,
263,
425,
14923,
5815,
628,
1751,
3136,
263,
425,
2286,
316,
425,
5951,
16026,
1388,
13,
29937,
1094,
647,
16337,
4226,
13,
1357,
29918,
4537,
353,
29871,
29941,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29941,
13,
29937,
1094,
647,
16337,
378,
2533,
29874,
13,
29937,
6991,
29874,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
718,
29871,
29906,
13,
1357,
29918,
4537,
4619,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29945,
13,
29937,
1094,
647,
16337,
378,
24450,
13,
29937,
390,
4405,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
448,
29871,
29906,
13,
1357,
29918,
4537,
22361,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29941,
13,
29937,
1094,
647,
16337,
378,
6674,
506,
16337,
13,
29937,
9683,
666,
10123,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
334,
29871,
29906,
13,
1357,
29918,
4537,
334,
29922,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29953,
13,
29937,
1094,
647,
16337,
378,
8542,
13,
29937,
4910,
680,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
847,
29871,
29906,
13,
1357,
29918,
4537,
847,
29922,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29941,
13,
29937,
1094,
647,
16337,
378,
3104,
5760,
12401,
13,
29937,
10173,
5760,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
3579,
29871,
29906,
13,
1357,
29918,
4537,
3579,
29922,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29929,
13,
29937,
1094,
647,
16337,
378,
8542,
875,
1572,
13,
29937,
4910,
680,
343,
5153,
16979,
425,
3810,
13677,
316,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
849,
29871,
29906,
13,
1357,
29918,
4537,
849,
29922,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29946,
13,
29937,
1094,
647,
16337,
378,
878,
7207,
13,
29937,
438,
3116,
3530,
560,
878,
7207,
316,
425,
8542,
316,
658,
712,
298,
9010,
263,
425,
14923,
5815,
263,
658,
712,
9343,
19766,
8311,
263,
425,
5951,
16026,
1388,
13,
29937,
1816,
423,
5737,
2016,
263,
590,
29918,
4537,
353,
590,
29918,
4537,
1273,
29871,
29906,
13,
1357,
29918,
4537,
1273,
29922,
29871,
29906,
13,
2158,
29898,
1357,
29918,
4537,
29897,
396,
29871,
29900,
13,
13,
29937,
6323,
13,
29937,
12129,
17951,
1480,
983,
712,
2906,
2491,
345,
5852,
1354,
8351,
339,
8311,
316,
1869,
3248,
760,
267,
831,
5852,
29889,
13,
29937,
1174,
28217,
16994,
11986,
2906,
2491,
345,
7700,
29889,
13,
29883,
711,
13678,
353,
7700,
13,
311,
4758,
353,
7700,
13,
2158,
29898,
29883,
711,
13678,
470,
316,
4758,
29897,
396,
29871,
29900,
29871,
29900,
448,
7700,
13,
29883,
711,
13678,
353,
7700,
13,
311,
4758,
353,
5852,
13,
2158,
29898,
29883,
711,
13678,
470,
316,
4758,
29897,
396,
29871,
29900,
29871,
29896,
448,
5852,
13,
29883,
711,
13678,
353,
5852,
13,
311,
4758,
353,
7700,
13,
2158,
29898,
29883,
711,
13678,
470,
316,
4758,
29897,
396,
29871,
29896,
29871,
29900,
448,
5852,
13,
29883,
711,
13678,
353,
5852,
13,
311,
4758,
353,
5852,
13,
2158,
29898,
29883,
711,
13678,
470,
316,
4758,
29897,
396,
29871,
29896,
29871,
29896,
448,
5852,
13,
13,
29937,
5300,
13,
29937,
12129,
17951,
1480,
983,
712,
2906,
2491,
345,
5852,
1354,
29892,
343,
6651,
1354,
29892,
3181,
294,
760,
267,
1487,
5852,
29889,
13,
29937,
1174,
28217,
16994,
11986,
2906,
2491,
345,
7700,
29889,
13,
29883,
711,
2572,
359,
353,
7700,
13,
2170,
912,
353,
7700,
13,
2158,
29898,
29883,
711,
2572,
359,
322,
14419,
912,
29897,
396,
29871,
29900,
29871,
29900,
448,
7700,
13,
29883,
711,
2572,
359,
353,
7700,
13,
2170,
912,
353,
5852,
13,
2158,
29898,
29883,
711,
2572,
359,
322,
14419,
912,
29897,
396,
29871,
29900,
29871,
29896,
448,
7700,
13,
29883,
711,
2572,
359,
353,
5852,
13,
2170,
912,
353,
7700,
13,
2158,
29898,
29883,
711,
2572,
359,
322,
14419,
912,
29897,
396,
29871,
29896,
29871,
29900,
448,
7700,
13,
29883,
711,
2572,
359,
353,
5852,
13,
2170,
912,
353,
5852,
13,
2158,
29898,
29883,
711,
2572,
359,
322,
14419,
912,
29897,
396,
29871,
29896,
29871,
29896,
448,
5852,
13,
13,
29937,
6058,
13,
29937,
12129,
17951,
1480,
983,
712,
2906,
2491,
345,
425,
297,
874,
29874,
29892,
1354,
831,
5852,
29892,
2906,
1297,
345,
7700,
29892,
343,
1354,
831,
7700,
29892,
2906,
1297,
345,
5852,
13,
262,
874,
29874,
353,
5852,
13,
2158,
29898,
1333,
297,
874,
29874,
29897,
396,
7700,
13,
262,
874,
29874,
353,
7700,
13,
2158,
29898,
1333,
297,
874,
29874,
29897,
396,
5852,
13,
13,
29937,
2661,
1247,
2002,
316,
2761,
2148,
18394,
448,
565,
13,
29937,
26087,
687,
6637,
560,
15234,
5973,
712,
8651,
1354,
480,
2148,
15353,
831,
5852,
13,
29937,
12994,
4221,
279,
712,
560,
15234,
5973,
7444,
16018,
628,
565,
409,
20470,
29536,
1743,
560,
15234,
5973,
13,
29937,
922,
11493,
29536,
279,
378,
28217,
17910,
316,
9015,
20237,
288,
4434,
352,
3136,
13,
29937,
17742,
658,
27878,
355,
519,
831,
378,
29871,
29946,
9015,
20237,
29889,
13,
29937,
997,
1122,
4108,
316,
6920,
267,
29892,
4166,
10481,
1354,
1487,
1702,
3017,
29892,
4327,
273,
1232,
29871,
13,
29937,
4434,
352,
7447,
427,
29871,
29946,
9015,
20237,
29889,
13,
29937,
997,
25507,
8990,
28844,
29901,
13,
29937,
565,
8707,
29928,
2965,
2725,
29901,
13,
29937,
268,
4810,
4571,
17080,
13,
361,
274,
711,
2572,
359,
322,
14419,
912,
29901,
13,
1678,
1596,
877,
7439,
29891,
2898,
29991,
1495,
13,
29937,
6101,
16632,
277,
14054,
3882,
819,
640,
16305,
279,
560,
11986,
4313,
2628,
502,
14054,
1683,
13,
29937,
997,
25507,
8990,
28844,
29901,
13,
29937,
565,
8707,
29928,
2965,
2725,
29901,
13,
29937,
268,
4810,
4571,
17080,
349,
1718,
29909,
8707,
29928,
2965,
2725,
15676,
13,
29937,
1683,
29901,
13,
29937,
268,
4810,
4571,
17080,
349,
1718,
29909,
8707,
29928,
2965,
2725,
17131,
13,
361,
274,
711,
2572,
359,
322,
14419,
912,
29901,
13,
1678,
1596,
877,
7439,
29891,
2898,
29991,
1495,
13,
2870,
29901,
13,
1678,
1596,
877,
29933,
3634,
8253,
29991,
1495,
13,
13,
29937,
28569,
379,
547,
292,
29991,
4248,
13,
2
] |
pip_services3_prometheus/count/__init__.py | pip-services-python/pip-services-prometheus-python | 0 | 34907 | <filename>pip_services3_prometheus/count/__init__.py
# -*- coding: utf-8 -*-
__all__ = ['PrometheusCounterConverter', 'PrometheusCounters']
from .PrometheusCounterConverter import PrometheusCounterConverter
from .PrometheusCounters import PrometheusCounters
| [
1,
529,
9507,
29958,
13096,
29918,
9916,
29941,
29918,
14032,
23043,
375,
29914,
2798,
29914,
1649,
2344,
26914,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1649,
497,
1649,
353,
6024,
18571,
23043,
375,
17779,
18545,
742,
525,
18571,
23043,
375,
29907,
1309,
2153,
2033,
13,
13,
3166,
869,
18571,
23043,
375,
17779,
18545,
1053,
9705,
23043,
375,
17779,
18545,
13,
3166,
869,
18571,
23043,
375,
29907,
1309,
2153,
1053,
9705,
23043,
375,
29907,
1309,
2153,
13,
2
] |
3.py | hubieva-a/lab5 | 0 | 45866 | # Дано предложение. Удалить из него все буквы о, стоящие на нечетных местах.
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
n = str(input("Предложение - "))
m = len(n)
for i in range(1, m):
i = str(i)
if n.find(i) % 2 == 1:
n = n.replace('о', '')
print(n)
| [
1,
396,
8371,
570,
4570,
843,
11567,
29889,
2014,
840,
644,
1413,
1866,
20507,
6495,
3180,
29951,
4938,
614,
29892,
29871,
6428,
2837,
29919,
665,
1538,
1093,
26063,
27596,
29988,
22993,
13,
30004,
13,
29937,
1738,
29914,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
30004,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
30004,
13,
1678,
302,
353,
851,
29898,
2080,
703,
30013,
4715,
843,
11567,
448,
376,
876,
30004,
13,
1678,
286,
353,
7431,
29898,
29876,
8443,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
286,
1125,
30004,
13,
4706,
474,
353,
851,
29898,
29875,
8443,
13,
4706,
565,
302,
29889,
2886,
29898,
29875,
29897,
1273,
29871,
29906,
1275,
29871,
29896,
29901,
30004,
13,
9651,
302,
353,
302,
29889,
6506,
877,
29904,
742,
27255,
30004,
13,
1678,
1596,
29898,
29876,
8443,
13,
2
] |
binding.gyp | epsitec-sa/node-darwin-ipc | 0 | 102912 | {
"targets": [
{
"target_name": "sharedMemory",
"include_dirs": [
"<!(node -e \"require('napi-macros')\")"
],
"sources": [ "./src/sharedMemory.cpp" ],
"libraries": [],
},
{
"target_name": "messaging",
"include_dirs": [
"<!(node -e \"require('napi-macros')\")"
],
"sources": [ "./src/messaging.cpp" ],
"libraries": [],
}
]
} | [
1,
426,
13,
29871,
376,
5182,
29879,
1115,
518,
13,
1678,
426,
13,
418,
376,
5182,
29918,
978,
1115,
376,
12366,
16015,
613,
13,
418,
376,
2856,
29918,
3972,
29879,
1115,
518,
13,
3986,
9872,
13311,
3177,
448,
29872,
13218,
12277,
877,
29876,
2754,
29899,
8628,
1883,
1495,
29905,
1159,
29908,
13,
418,
21251,
13,
418,
376,
29879,
2863,
1115,
518,
376,
6904,
4351,
29914,
12366,
16015,
29889,
8223,
29908,
21251,
13,
418,
376,
492,
8464,
1115,
19997,
13,
1678,
2981,
13,
1678,
426,
13,
418,
376,
5182,
29918,
978,
1115,
376,
12062,
6751,
613,
13,
418,
376,
2856,
29918,
3972,
29879,
1115,
518,
13,
3986,
9872,
13311,
3177,
448,
29872,
13218,
12277,
877,
29876,
2754,
29899,
8628,
1883,
1495,
29905,
1159,
29908,
13,
418,
21251,
13,
418,
376,
29879,
2863,
1115,
518,
376,
6904,
4351,
29914,
12062,
6751,
29889,
8223,
29908,
21251,
13,
418,
376,
492,
8464,
1115,
19997,
13,
1678,
500,
13,
29871,
4514,
13,
29913,
2
] |
src/zen_nas/PlainNet/SuperResK1KXK1.py | Adlik/zen_nas | 7 | 77250 | '''
Copyright (C) 2010-2021 Alibaba Group Holding Limited.
'''
# pylint: disable=invalid-name,too-many-branches,too-many-statements
import os
import sys
import uuid
from torch import nn
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
try:
import PlainNet
from PlainNet import _get_right_parentheses_index_
from PlainNet.super_blocks import PlainNetSuperBlockClass
import global_utils
except ImportError:
print('fail to import zen_nas modules')
# pylint: disable=too-many-instance-attributes,too-many-locals,too-many-arguments
class SuperResK1KXK1(PlainNetSuperBlockClass):
"""Resnet BottleneckBlock-like block"""
def __init__(self, in_channels=None, out_channels=None, stride=None, bottleneck_channels=None,
sub_layers=None, kernel_size=None, no_create=False, no_reslink=False,
no_BN=False, use_se=False, **kwargs):
super().__init__(**kwargs)
self.in_channels = in_channels
self.out_channels = out_channels
self.stride = stride
self.bottleneck_channels = bottleneck_channels
self.sub_layers = sub_layers
self.kernel_size = kernel_size
self.no_create = no_create
self.no_reslink = no_reslink
self.no_BN = no_BN
self.use_se = use_se
if self.use_se:
print('---debug use_se in ' + str(self))
full_str = ''
last_channels = in_channels
current_stride = stride
for i in range(self.sub_layers):
inner_str = ''
# first bl-block with reslink
inner_str += f'ConvKX({last_channels},{self.bottleneck_channels},{1},{1})'
if not self.no_BN:
inner_str += f'BN({self.bottleneck_channels})'
inner_str += f'RELU({self.bottleneck_channels})'
inner_str += f'ConvKX({self.bottleneck_channels},{self.bottleneck_channels},\
{self.kernel_size},{current_stride})'
if not self.no_BN:
inner_str += f'BN({self.bottleneck_channels})'
inner_str += f'RELU({self.bottleneck_channels})'
if self.use_se:
inner_str += f'SE({self.bottleneck_channels})'
inner_str += f'ConvKX({self.bottleneck_channels},{self.out_channels},{1},{1})'
if not self.no_BN:
inner_str += f'BN({self.out_channels})'.format()
if not self.no_reslink:
if i == 0:
res_str = f'ResBlockProj({inner_str})RELU({out_channels})'
else:
res_str = f'ResBlock({inner_str})RELU({out_channels})'
else:
res_str = f'{inner_str}RELU({out_channels})'
full_str += res_str
# second bl-block with reslink
inner_str = ''
inner_str += f'ConvKX({self.out_channels},{self.bottleneck_channels},{1},{1})'
if not self.no_BN:
inner_str += f'BN({self.bottleneck_channels})'
inner_str += f'RELU({self.bottleneck_channels})'
inner_str += f'ConvKX({self.bottleneck_channels},{self.bottleneck_channels},\
{self.kernel_size},{1})'
if not self.no_BN:
inner_str += f'BN({self.bottleneck_channels})'
inner_str += f'RELU({self.bottleneck_channels})'
if self.use_se:
inner_str += f'SE({self.bottleneck_channels})'
inner_str += f'ConvKX({self.bottleneck_channels},{self.out_channels},{1},{1})'
if not self.no_BN:
inner_str += f'BN({self.out_channels})'
if not self.no_reslink:
res_str = f'ResBlock({inner_str})RELU({self.out_channels})'
else:
res_str = f'{inner_str}RELU({self.out_channels})'
full_str += res_str
last_channels = out_channels
current_stride = 1
self.block_list = PlainNet.create_netblock_list_from_str(full_str, no_create=no_create,
no_reslink=no_reslink, no_BN=no_BN, **kwargs)
if not no_create:
self.module_list = nn.ModuleList(self.block_list)
else:
self.module_list = None
def __str__(self):
return type(self).__name__ + f'({self.in_channels},{self.out_channels},\
{self.stride},{self.bottleneck_channels},{self.sub_layers})'
def __repr__(self):
return type(self).__name__ + f'({self.block_name}|in={self.in_channels},out={self.out_channels},\
stride={self.stride},btl_channels={self.bottleneck_channels},\
sub_layers={self.sub_layers},kernel_size={self.kernel_size})'
def encode_structure(self):
"""pack channels and sub_layers to a list"""
return [self.out_channels, self.sub_layers, self.bottleneck_channels]
def split(self, split_layer_threshold):
"""split the layer when exceeding threshold"""
if self.sub_layers >= split_layer_threshold:
new_sublayers_1 = split_layer_threshold // 2
new_sublayers_2 = self.sub_layers - new_sublayers_1
new_block_str1 = type(self).__name__ + f'({self.in_channels},{self.out_channels},\
{self.stride},{self.bottleneck_channels},{new_sublayers_1})'
new_block_str2 = type(self).__name__ + f'({self.out_channels},{self.out_channels},\
{1},{self.bottleneck_channels},{new_sublayers_2})'
return new_block_str1 + new_block_str2
return str(self)
def structure_scale(self, scale=1.0, channel_scale=None, sub_layer_scale=None):
""" adjust the number to a specific multiple or range"""
if channel_scale is None:
channel_scale = scale
if sub_layer_scale is None:
sub_layer_scale = scale
new_out_channels = global_utils.smart_round(self.out_channels * channel_scale)
new_bottleneck_channels = global_utils.smart_round(self.bottleneck_channels * channel_scale)
new_sub_layers = max(1, round(self.sub_layers * sub_layer_scale))
return type(self).__name__ + f'({self.in_channels},{new_out_channels}, \
{self.stride},{new_bottleneck_channels},{new_sub_layers})'
# pylint: disable=arguments-differ
@classmethod
def create_from_str(cls, struct_str, **kwargs):
assert cls.is_instance_from_str(struct_str)
idx = _get_right_parentheses_index_(struct_str)
assert idx is not None
param_str = struct_str[len(cls.__name__ + '('):idx]
# find block_name
tmp_idx = param_str.find('|')
if tmp_idx < 0:
tmp_block_name = f'uuid{uuid.uuid4().hex}'
else:
tmp_block_name = param_str[0:tmp_idx]
param_str = param_str[tmp_idx + 1:]
param_str_split = param_str.split(',')
in_channels = int(param_str_split[0])
out_channels = int(param_str_split[1])
stride = int(param_str_split[2])
bottleneck_channels = int(param_str_split[3])
sub_layers = int(param_str_split[4])
return cls(in_channels=in_channels, out_channels=out_channels, stride=stride,
bottleneck_channels=bottleneck_channels, sub_layers=sub_layers,
block_name=tmp_block_name, **kwargs), struct_str[idx + 1:]
class SuperResK1K3K1(SuperResK1KXK1):
""" kernel size 3x3"""
def __init__(self, in_channels=None, out_channels=None, stride=None, bottleneck_channels=None,
sub_layers=None, no_create=False, **kwargs):
super().__init__(in_channels=in_channels, out_channels=out_channels, stride=stride,
bottleneck_channels=bottleneck_channels, sub_layers=sub_layers,
kernel_size=3,
no_create=no_create, **kwargs)
class SuperResK1K5K1(SuperResK1KXK1):
""" kernel size 5x5"""
def __init__(self, in_channels=None, out_channels=None, stride=None, bottleneck_channels=None,
sub_layers=None, no_create=False, **kwargs):
super().__init__(in_channels=in_channels, out_channels=out_channels, stride=stride,
bottleneck_channels=bottleneck_channels, sub_layers=sub_layers,
kernel_size=5,
no_create=no_create, **kwargs)
class SuperResK1K7K1(SuperResK1KXK1):
""" kernel size 7x7"""
def __init__(self, in_channels=None, out_channels=None, stride=None, bottleneck_channels=None,
sub_layers=None, no_create=False, **kwargs):
super().__init__(in_channels=in_channels, out_channels=out_channels, stride=stride,
bottleneck_channels=bottleneck_channels, sub_layers=sub_layers,
kernel_size=7,
no_create=no_create, **kwargs)
def register_netblocks_dict(netblocks_dict: dict):
"""add different kernel size block to block dict"""
this_py_file_netblocks_dict = {
'SuperResK1K3K1': SuperResK1K3K1,
'SuperResK1K5K1': SuperResK1K5K1,
'SuperResK1K7K1': SuperResK1K7K1,
}
netblocks_dict.update(this_py_file_netblocks_dict)
return netblocks_dict
| [
1,
14550,
13,
11882,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29900,
29899,
29906,
29900,
29906,
29896,
319,
1982,
5363,
6431,
21771,
292,
28873,
29889,
13,
12008,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
20965,
29899,
978,
29892,
517,
29877,
29899,
13011,
29899,
17519,
267,
29892,
517,
29877,
29899,
13011,
29899,
6112,
4110,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
318,
5416,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
9675,
29889,
2084,
29889,
4397,
29898,
359,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
13697,
13,
2202,
29901,
13,
1678,
1053,
349,
7420,
6779,
13,
1678,
515,
349,
7420,
6779,
1053,
903,
657,
29918,
1266,
29918,
3560,
13244,
267,
29918,
2248,
29918,
13,
1678,
515,
349,
7420,
6779,
29889,
9136,
29918,
1271,
29879,
1053,
349,
7420,
6779,
19111,
7445,
2385,
13,
1678,
1053,
5534,
29918,
13239,
13,
19499,
16032,
2392,
29901,
13,
1678,
1596,
877,
14057,
304,
1053,
503,
264,
29918,
22911,
10585,
1495,
13,
13,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
8758,
29899,
15697,
29892,
517,
29877,
29899,
13011,
29899,
2997,
29879,
29892,
517,
29877,
29899,
13011,
29899,
25699,
13,
1990,
5670,
1666,
29968,
29896,
29968,
29990,
29968,
29896,
29898,
29925,
7420,
6779,
19111,
7445,
2385,
1125,
13,
1678,
9995,
1666,
1212,
350,
1501,
29880,
1600,
384,
7445,
29899,
4561,
2908,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29922,
8516,
29892,
714,
29918,
305,
12629,
29922,
8516,
29892,
380,
2426,
29922,
8516,
29892,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
8516,
29892,
13,
462,
1014,
29918,
29277,
29922,
8516,
29892,
8466,
29918,
2311,
29922,
8516,
29892,
694,
29918,
3258,
29922,
8824,
29892,
694,
29918,
690,
2324,
29922,
8824,
29892,
13,
462,
694,
29918,
29933,
29940,
29922,
8824,
29892,
671,
29918,
344,
29922,
8824,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
262,
29918,
305,
12629,
353,
297,
29918,
305,
12629,
13,
4706,
1583,
29889,
449,
29918,
305,
12629,
353,
714,
29918,
305,
12629,
13,
4706,
1583,
29889,
303,
2426,
353,
380,
2426,
13,
4706,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
353,
18046,
29880,
1600,
384,
29918,
305,
12629,
13,
4706,
1583,
29889,
1491,
29918,
29277,
353,
1014,
29918,
29277,
13,
4706,
1583,
29889,
17460,
29918,
2311,
353,
8466,
29918,
2311,
13,
4706,
1583,
29889,
1217,
29918,
3258,
353,
694,
29918,
3258,
13,
4706,
1583,
29889,
1217,
29918,
690,
2324,
353,
694,
29918,
690,
2324,
13,
4706,
1583,
29889,
1217,
29918,
29933,
29940,
353,
694,
29918,
29933,
29940,
13,
4706,
1583,
29889,
1509,
29918,
344,
353,
671,
29918,
344,
13,
4706,
565,
1583,
29889,
1509,
29918,
344,
29901,
13,
9651,
1596,
877,
5634,
8382,
671,
29918,
344,
297,
525,
718,
851,
29898,
1311,
876,
13,
13,
4706,
2989,
29918,
710,
353,
6629,
13,
4706,
1833,
29918,
305,
12629,
353,
297,
29918,
305,
12629,
13,
4706,
1857,
29918,
303,
2426,
353,
380,
2426,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
29889,
1491,
29918,
29277,
1125,
13,
9651,
6426,
29918,
710,
353,
6629,
13,
13,
9651,
396,
937,
1999,
29899,
1271,
411,
620,
2324,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
4230,
29918,
305,
12629,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
29896,
29087,
29896,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1525,
29931,
29965,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
7570,
13,
462,
462,
29871,
426,
1311,
29889,
17460,
29918,
2311,
29087,
3784,
29918,
303,
2426,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1525,
29931,
29965,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
565,
1583,
29889,
1509,
29918,
344,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
1660,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1311,
29889,
449,
29918,
305,
12629,
29087,
29896,
29087,
29896,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
449,
29918,
305,
12629,
1800,
4286,
4830,
580,
13,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
690,
2324,
29901,
13,
18884,
565,
474,
1275,
29871,
29900,
29901,
13,
462,
1678,
620,
29918,
710,
353,
285,
29915,
1666,
7445,
1184,
29926,
3319,
3993,
29918,
710,
1800,
1525,
29931,
29965,
3319,
449,
29918,
305,
12629,
1800,
29915,
13,
18884,
1683,
29901,
13,
462,
1678,
620,
29918,
710,
353,
285,
29915,
1666,
7445,
3319,
3993,
29918,
710,
1800,
1525,
29931,
29965,
3319,
449,
29918,
305,
12629,
1800,
29915,
13,
9651,
1683,
29901,
13,
18884,
620,
29918,
710,
353,
285,
29915,
29912,
3993,
29918,
710,
29913,
1525,
29931,
29965,
3319,
449,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
2989,
29918,
710,
4619,
620,
29918,
710,
13,
13,
9651,
396,
1473,
1999,
29899,
1271,
411,
620,
2324,
13,
9651,
6426,
29918,
710,
353,
6629,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
1311,
29889,
449,
29918,
305,
12629,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
29896,
29087,
29896,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1525,
29931,
29965,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
7570,
13,
462,
965,
426,
1311,
29889,
17460,
29918,
2311,
29087,
29896,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1525,
29931,
29965,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
9651,
565,
1583,
29889,
1509,
29918,
344,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
1660,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
6426,
29918,
710,
4619,
285,
29915,
1168,
29894,
29968,
29990,
3319,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1311,
29889,
449,
29918,
305,
12629,
29087,
29896,
29087,
29896,
1800,
29915,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
29933,
29940,
29901,
13,
18884,
6426,
29918,
710,
4619,
285,
29915,
29933,
29940,
3319,
1311,
29889,
449,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
565,
451,
1583,
29889,
1217,
29918,
690,
2324,
29901,
13,
18884,
620,
29918,
710,
353,
285,
29915,
1666,
7445,
3319,
3993,
29918,
710,
1800,
1525,
29931,
29965,
3319,
1311,
29889,
449,
29918,
305,
12629,
1800,
29915,
13,
9651,
1683,
29901,
13,
18884,
620,
29918,
710,
353,
285,
29915,
29912,
3993,
29918,
710,
29913,
1525,
29931,
29965,
3319,
1311,
29889,
449,
29918,
305,
12629,
1800,
29915,
13,
13,
9651,
2989,
29918,
710,
4619,
620,
29918,
710,
13,
13,
9651,
1833,
29918,
305,
12629,
353,
714,
29918,
305,
12629,
13,
9651,
1857,
29918,
303,
2426,
353,
29871,
29896,
13,
13,
4706,
1583,
29889,
1271,
29918,
1761,
353,
349,
7420,
6779,
29889,
3258,
29918,
1212,
1271,
29918,
1761,
29918,
3166,
29918,
710,
29898,
8159,
29918,
710,
29892,
694,
29918,
3258,
29922,
1217,
29918,
3258,
29892,
13,
462,
462,
462,
462,
694,
29918,
690,
2324,
29922,
1217,
29918,
690,
2324,
29892,
694,
29918,
29933,
29940,
29922,
1217,
29918,
29933,
29940,
29892,
3579,
19290,
29897,
13,
4706,
565,
451,
694,
29918,
3258,
29901,
13,
9651,
1583,
29889,
5453,
29918,
1761,
353,
302,
29876,
29889,
7355,
1293,
29898,
1311,
29889,
1271,
29918,
1761,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
5453,
29918,
1761,
353,
6213,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1134,
29898,
1311,
467,
1649,
978,
1649,
718,
285,
29915,
3319,
1311,
29889,
262,
29918,
305,
12629,
29087,
1311,
29889,
449,
29918,
305,
12629,
7570,
13,
462,
462,
4706,
426,
1311,
29889,
303,
2426,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1311,
29889,
1491,
29918,
29277,
1800,
29915,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
1134,
29898,
1311,
467,
1649,
978,
1649,
718,
285,
29915,
3319,
1311,
29889,
1271,
29918,
978,
11079,
262,
3790,
1311,
29889,
262,
29918,
305,
12629,
1118,
449,
3790,
1311,
29889,
449,
29918,
305,
12629,
7570,
13,
462,
462,
4706,
380,
2426,
3790,
1311,
29889,
303,
2426,
1118,
3116,
29880,
29918,
305,
12629,
3790,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
7570,
13,
462,
462,
4706,
1014,
29918,
29277,
3790,
1311,
29889,
1491,
29918,
29277,
1118,
17460,
29918,
2311,
3790,
1311,
29889,
17460,
29918,
2311,
1800,
29915,
13,
13,
1678,
822,
19750,
29918,
23905,
29898,
1311,
1125,
13,
4706,
9995,
4058,
18196,
322,
1014,
29918,
29277,
304,
263,
1051,
15945,
29908,
13,
13,
4706,
736,
518,
1311,
29889,
449,
29918,
305,
12629,
29892,
1583,
29889,
1491,
29918,
29277,
29892,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29962,
13,
13,
1678,
822,
6219,
29898,
1311,
29892,
6219,
29918,
13148,
29918,
386,
12268,
1125,
13,
4706,
9995,
5451,
278,
7546,
746,
13461,
292,
16897,
15945,
29908,
13,
13,
4706,
565,
1583,
29889,
1491,
29918,
29277,
6736,
6219,
29918,
13148,
29918,
386,
12268,
29901,
13,
9651,
716,
29918,
1491,
29277,
29918,
29896,
353,
6219,
29918,
13148,
29918,
386,
12268,
849,
29871,
29906,
13,
9651,
716,
29918,
1491,
29277,
29918,
29906,
353,
1583,
29889,
1491,
29918,
29277,
448,
716,
29918,
1491,
29277,
29918,
29896,
13,
9651,
716,
29918,
1271,
29918,
710,
29896,
353,
1134,
29898,
1311,
467,
1649,
978,
1649,
718,
285,
29915,
3319,
1311,
29889,
262,
29918,
305,
12629,
29087,
1311,
29889,
449,
29918,
305,
12629,
7570,
13,
462,
462,
462,
418,
426,
1311,
29889,
303,
2426,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1482,
29918,
1491,
29277,
29918,
29896,
1800,
29915,
13,
13,
9651,
716,
29918,
1271,
29918,
710,
29906,
353,
1134,
29898,
1311,
467,
1649,
978,
1649,
718,
285,
29915,
3319,
1311,
29889,
449,
29918,
305,
12629,
29087,
1311,
29889,
449,
29918,
305,
12629,
7570,
13,
462,
462,
462,
418,
426,
29896,
29087,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1482,
29918,
1491,
29277,
29918,
29906,
1800,
29915,
13,
9651,
736,
716,
29918,
1271,
29918,
710,
29896,
718,
716,
29918,
1271,
29918,
710,
29906,
13,
4706,
736,
851,
29898,
1311,
29897,
13,
13,
1678,
822,
3829,
29918,
7052,
29898,
1311,
29892,
6287,
29922,
29896,
29889,
29900,
29892,
8242,
29918,
7052,
29922,
8516,
29892,
1014,
29918,
13148,
29918,
7052,
29922,
8516,
1125,
13,
4706,
9995,
10365,
278,
1353,
304,
263,
2702,
2999,
470,
3464,
15945,
29908,
13,
13,
4706,
565,
8242,
29918,
7052,
338,
6213,
29901,
13,
9651,
8242,
29918,
7052,
353,
6287,
13,
4706,
565,
1014,
29918,
13148,
29918,
7052,
338,
6213,
29901,
13,
9651,
1014,
29918,
13148,
29918,
7052,
353,
6287,
13,
13,
4706,
716,
29918,
449,
29918,
305,
12629,
353,
5534,
29918,
13239,
29889,
3844,
442,
29918,
14486,
29898,
1311,
29889,
449,
29918,
305,
12629,
334,
8242,
29918,
7052,
29897,
13,
4706,
716,
29918,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
353,
5534,
29918,
13239,
29889,
3844,
442,
29918,
14486,
29898,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
334,
8242,
29918,
7052,
29897,
13,
4706,
716,
29918,
1491,
29918,
29277,
353,
4236,
29898,
29896,
29892,
4513,
29898,
1311,
29889,
1491,
29918,
29277,
334,
1014,
29918,
13148,
29918,
7052,
876,
13,
13,
4706,
736,
1134,
29898,
1311,
467,
1649,
978,
1649,
718,
285,
29915,
3319,
1311,
29889,
262,
29918,
305,
12629,
29087,
1482,
29918,
449,
29918,
305,
12629,
1118,
320,
13,
462,
462,
4706,
426,
1311,
29889,
303,
2426,
29087,
1482,
29918,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29087,
1482,
29918,
1491,
29918,
29277,
1800,
29915,
13,
13,
1678,
396,
282,
2904,
524,
29901,
11262,
29922,
25699,
29899,
29881,
8349,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
1653,
29918,
3166,
29918,
710,
29898,
25932,
29892,
2281,
29918,
710,
29892,
3579,
19290,
1125,
13,
4706,
4974,
1067,
29879,
29889,
275,
29918,
8758,
29918,
3166,
29918,
710,
29898,
4984,
29918,
710,
29897,
13,
4706,
22645,
353,
903,
657,
29918,
1266,
29918,
3560,
13244,
267,
29918,
2248,
23538,
4984,
29918,
710,
29897,
13,
4706,
4974,
22645,
338,
451,
6213,
13,
4706,
1828,
29918,
710,
353,
2281,
29918,
710,
29961,
2435,
29898,
25932,
17255,
978,
1649,
718,
525,
877,
1125,
13140,
29962,
13,
13,
4706,
396,
1284,
2908,
29918,
978,
13,
4706,
13128,
29918,
13140,
353,
1828,
29918,
710,
29889,
2886,
877,
29989,
1495,
13,
4706,
565,
13128,
29918,
13140,
529,
29871,
29900,
29901,
13,
9651,
13128,
29918,
1271,
29918,
978,
353,
285,
29915,
25118,
29912,
25118,
29889,
25118,
29946,
2141,
20970,
10162,
13,
4706,
1683,
29901,
13,
9651,
13128,
29918,
1271,
29918,
978,
353,
1828,
29918,
710,
29961,
29900,
29901,
7050,
29918,
13140,
29962,
13,
9651,
1828,
29918,
710,
353,
1828,
29918,
710,
29961,
7050,
29918,
13140,
718,
29871,
29896,
17531,
13,
13,
4706,
1828,
29918,
710,
29918,
5451,
353,
1828,
29918,
710,
29889,
5451,
29317,
1495,
13,
4706,
297,
29918,
305,
12629,
353,
938,
29898,
3207,
29918,
710,
29918,
5451,
29961,
29900,
2314,
13,
4706,
714,
29918,
305,
12629,
353,
938,
29898,
3207,
29918,
710,
29918,
5451,
29961,
29896,
2314,
13,
4706,
380,
2426,
353,
938,
29898,
3207,
29918,
710,
29918,
5451,
29961,
29906,
2314,
13,
4706,
18046,
29880,
1600,
384,
29918,
305,
12629,
353,
938,
29898,
3207,
29918,
710,
29918,
5451,
29961,
29941,
2314,
13,
4706,
1014,
29918,
29277,
353,
938,
29898,
3207,
29918,
710,
29918,
5451,
29961,
29946,
2314,
13,
4706,
736,
1067,
29879,
29898,
262,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
380,
2426,
29922,
303,
2426,
29892,
13,
462,
259,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29892,
1014,
29918,
29277,
29922,
1491,
29918,
29277,
29892,
13,
462,
259,
2908,
29918,
978,
29922,
7050,
29918,
1271,
29918,
978,
29892,
3579,
19290,
511,
2281,
29918,
710,
29961,
13140,
718,
29871,
29896,
17531,
13,
13,
13,
1990,
5670,
1666,
29968,
29896,
29968,
29941,
29968,
29896,
29898,
19111,
1666,
29968,
29896,
29968,
29990,
29968,
29896,
1125,
13,
1678,
9995,
8466,
2159,
29871,
29941,
29916,
29941,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29922,
8516,
29892,
714,
29918,
305,
12629,
29922,
8516,
29892,
380,
2426,
29922,
8516,
29892,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
8516,
29892,
13,
462,
1014,
29918,
29277,
29922,
8516,
29892,
694,
29918,
3258,
29922,
8824,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
262,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
380,
2426,
29922,
303,
2426,
29892,
13,
462,
308,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29892,
1014,
29918,
29277,
29922,
1491,
29918,
29277,
29892,
13,
462,
308,
8466,
29918,
2311,
29922,
29941,
29892,
13,
462,
308,
694,
29918,
3258,
29922,
1217,
29918,
3258,
29892,
3579,
19290,
29897,
13,
13,
13,
1990,
5670,
1666,
29968,
29896,
29968,
29945,
29968,
29896,
29898,
19111,
1666,
29968,
29896,
29968,
29990,
29968,
29896,
1125,
13,
1678,
9995,
8466,
2159,
29871,
29945,
29916,
29945,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29922,
8516,
29892,
714,
29918,
305,
12629,
29922,
8516,
29892,
380,
2426,
29922,
8516,
29892,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
8516,
29892,
13,
462,
1014,
29918,
29277,
29922,
8516,
29892,
694,
29918,
3258,
29922,
8824,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
262,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
380,
2426,
29922,
303,
2426,
29892,
13,
462,
308,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29892,
1014,
29918,
29277,
29922,
1491,
29918,
29277,
29892,
13,
462,
308,
8466,
29918,
2311,
29922,
29945,
29892,
13,
462,
308,
694,
29918,
3258,
29922,
1217,
29918,
3258,
29892,
3579,
19290,
29897,
13,
13,
13,
1990,
5670,
1666,
29968,
29896,
29968,
29955,
29968,
29896,
29898,
19111,
1666,
29968,
29896,
29968,
29990,
29968,
29896,
1125,
13,
1678,
9995,
8466,
2159,
29871,
29955,
29916,
29955,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
305,
12629,
29922,
8516,
29892,
714,
29918,
305,
12629,
29922,
8516,
29892,
380,
2426,
29922,
8516,
29892,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
8516,
29892,
13,
462,
1014,
29918,
29277,
29922,
8516,
29892,
694,
29918,
3258,
29922,
8824,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
262,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
380,
2426,
29922,
303,
2426,
29892,
13,
462,
308,
18046,
29880,
1600,
384,
29918,
305,
12629,
29922,
29890,
1501,
29880,
1600,
384,
29918,
305,
12629,
29892,
1014,
29918,
29277,
29922,
1491,
29918,
29277,
29892,
13,
462,
308,
8466,
29918,
2311,
29922,
29955,
29892,
13,
462,
308,
694,
29918,
3258,
29922,
1217,
29918,
3258,
29892,
3579,
19290,
29897,
13,
13,
13,
1753,
6036,
29918,
1212,
1271,
29879,
29918,
8977,
29898,
1212,
1271,
29879,
29918,
8977,
29901,
9657,
1125,
13,
1678,
9995,
1202,
1422,
8466,
2159,
2908,
304,
2908,
9657,
15945,
29908,
13,
13,
1678,
445,
29918,
2272,
29918,
1445,
29918,
1212,
1271,
29879,
29918,
8977,
353,
426,
13,
4706,
525,
19111,
1666,
29968,
29896,
29968,
29941,
29968,
29896,
2396,
5670,
1666,
29968,
29896,
29968,
29941,
29968,
29896,
29892,
13,
4706,
525,
19111,
1666,
29968,
29896,
29968,
29945,
29968,
29896,
2396,
5670,
1666,
29968,
29896,
29968,
29945,
29968,
29896,
29892,
13,
4706,
525,
19111,
1666,
29968,
29896,
29968,
29955,
29968,
29896,
2396,
5670,
1666,
29968,
29896,
29968,
29955,
29968,
29896,
29892,
13,
1678,
500,
13,
1678,
7787,
1271,
29879,
29918,
8977,
29889,
5504,
29898,
1366,
29918,
2272,
29918,
1445,
29918,
1212,
1271,
29879,
29918,
8977,
29897,
13,
1678,
736,
7787,
1271,
29879,
29918,
8977,
13,
2
] |
attic/wpfrontman/wp_frontman/templatetags/wpf_sb_tags.py | ludoo/wpkit | 0 | 179450 | <reponame>ludoo/wpkit<filename>attic/wpfrontman/wp_frontman/templatetags/wpf_sb_tags.py
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django import template
from django.db import models
from wp_frontman.lib.utils import make_tree, prune_tree, s2i
from wp_frontman.blog import Blog
from wp_frontman.models import *
from wp_frontman.cache.tag_decorators import cached_inclusion_tag
register = template.Library()
@register.filter
def post_length_gt(post, args):
return
@register.filter
def post_length(post, args):
post_length = getattr(post, '_wpf_post_length', None)
if post_length is None:
lengths = dict(line=20, comment=180, comment_form=300, post_meta=300, num_chars=70)
args = [int(a) for a in args.split(',')]
for a in ('line', 'comment', 'comment_form'):
try:
lengths[a] = args.pop(0)
except IndexError:
pass
post_length = lengths['post_meta']
post_length += len(post.content_stripped) / lengths['num_chars'] * lengths['line']
post_length += post.comment_count * lengths['comment']
if post.comment_status == 'open':
post_length += lengths['comment_form']
post._wpf_post_length = post_length
return post_length
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_pages.html', takes_context=True, expire_timestamps=('page',))
def sb_pages(context, ordering=None, max_level=None, num=None):
# TODO: change the model to Page once deferreds work properly with proxy models
qs = BasePost.objects.pages().published().select_related('parent').defer(
'date_gmt', 'content', '_excerpt', 'password', 'modified_gmt', 'content_filtered',
'parent__date_gmt', 'parent__content', 'parent___excerpt', 'parent__password',
'parent__modified_gmt', 'parent__content_filtered',
)
if ordering is not None:
ordering = tuple([ordering, 'menu_order', 'title'])
else:
ordering = tuple(['menu_order', 'title'])
qs = qs.order_by(*ordering)
pages = make_tree(qs)
if num:
pages = pages[:num]
request = context.get('request')
return dict(blog=Blog.get_active(), path=getattr(context.get('request'), 'path', None), pages=pages, max_level=max_level)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_recent_posts.html', expire_timestamps=('post',))
def sb_recent_posts(num=5, skip=0, exclude_id=None, title=None, keep_content=False, exclude_posts=None):
if skip:
start, end = skip, num+skip
else:
start, end = 0, num
defer_list = ('date_gmt', '_excerpt', 'password')
if not keep_content:
defer_list += ('content', 'content_filtered', 'modified_gmt')
qs = Post.objects.published().defer(*defer_list)
if exclude_id:
qs = qs.exclude(id=exclude_id)
if exclude_posts:
qs = qs.exclude(id__in=[p.id for p in exclude_posts])
return dict(blog=Blog.get_active(), posts=qs[start:end], title=title)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_top_commented.html', expire_timestamps=('post',))
def sb_top_commented(num=5, skip=0, exclude_id=None, title=None, keep_content=False):
if skip:
start, end = skip, num+skip
else:
start, end = 0, num
defer_list = ('date_gmt', '_excerpt', 'password')
if not keep_content:
defer_list += ('content', 'content_filtered', 'modified_gmt')
qs = Post.objects.published().defer(*defer_list)
if exclude_id:
qs = qs.exclude(id=exclude_id)
qs = qs.order_by('-comment_count')
return dict(blog=Blog.get_active(), posts=qs[start:end], title=title)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_recent_comments.html', expire_timestamps=('comment',))
def sb_recent_comments(num=5, exclude_id=None):
qs = BaseComment.objects.approved().select_related('base_post').defer(
'base_post__date_gmt', 'base_post__content', 'base_post___excerpt',
'base_post__password', 'base_post__modified_gmt', 'base_post__content_filtered'
).order_by('-id')
if exclude_id:
qs = qs.exclude(base_post__id=exclude_id)
return dict(blog=Blog.get_active(), comments=qs[0:num])
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_categories.html', expire_timestamps=('taxonomy',))
def sb_categories(ordering=None, max_level=None, num=None, parent_id=None, exclude=None, as_tree=True):
# try a shortcut
categories = None
if not ordering and not max_level and not num and not exclude:
tree = Category.get_all(as_tree=True)
for k, v in tree.items():
if k.term.slug == parent_id:
categories = v
prune_tree(categories, 'count')
if not as_tree:
categories = categories.keys()
break
if not categories:
if not ordering:
ordering = Category._meta.ordering
else:
ordering = (ordering, ) + Category._meta.ordering
qs = Category.objects.select_related('parent', 'term')
if parent_id:
if parent_id == 'root':
qs = qs.filter(parent__isnull=True)
else:
qs = qs.filter(parent__term__slug=parent_id)
if exclude:
qs = qs.exclude(term__slug__in=exclude.split(','))
qs = qs.order_by(*ordering)
if as_tree:
categories = make_tree(qs)
prune_tree(categories, 'count')
else:
categories = qs.filter(count__gt=0)
if num:
categories = categories[:num]
return dict(blog=Blog.get_active(), categories=categories, max_level=max_level or None, as_sets=Blog.site.categories_as_sets)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_linkcategories.html', expire_timestamps=('taxonomy',))
def sb_linkcategories(ordering=None, max_level=None, num=None, parent_id=None, nested=False, toplevel_only=False):
if not ordering:
ordering = LinkCategory._meta.ordering
else:
ordering = (ordering, ) + LinkCategory._meta.ordering
qs = LinkCategory.objects.select_related('parent', 'term')
if toplevel_only:
qs = qs.filter(parent__isnull=True)
if parent_id:
qs = qs.filter(parent__term__slug=parent_id)
qs = qs.order_by(*ordering)
if nested:
categories = make_tree(qs)
prune_tree(categories, 'count')
else:
categories = qs.filter(count__gt=0)
if num:
categories = categories[:num]
return dict(blog=Blog.get_active(), categories=categories, max_level=max_level or None)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_archives_year.html', expire_timestamps=('post',))
def sb_archives_year(desc=False, orderby_count=False, num=None):
return dict(blog=Blog.get_active(), archives=ArchiveYear.all(desc, orderby_count, num))
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_archives_month.html', expire_timestamps=('post',))
def sb_archives_month(desc=False, orderby_count=False, num=None):
return dict(blog=Blog.get_active(), archives=ArchiveMonth.all(desc, orderby_count, num))
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_taxonomy_posts.html', expire_timestamps=('post',), localize_template_by='taxonomy_term.term.slug')
def sb_taxonomy_posts(slug, taxonomy='category', num=5, exclude=None, exclude_slice=None):
try:
taxonomy_term = TaxonomyTerm.objects.select_related('term').get(term__slug=slug, taxonomy=taxonomy)
except ObjectDoesNotExist:
return dict(taxonomy_term=None, posts=None)
qs = PostTerms.objects.filter(
term_taxonomy=taxonomy_term, post__post_type='post', post__status='publish'
).select_related('post').order_by('-post__id')
if exclude:
if isinstance(exclude, BasePost):
exclude = [exclude]
if exclude_slice:
start, sep, end = exclude_slice.partition(':')
try:
if start and end:
exclude = exclude[int(start):int(end)]
elif start:
exclude = exclude[int(start):]
elif end:
exclude = exclude[:int(end)]
except (TypeError, ValueError):
pass
qs = qs.exclude(post__id__in=[p.id for p in exclude])
posts = [t.post for t in qs[:num]]
return dict(blog=Blog.get_active(), taxonomy_term=taxonomy_term, posts=posts)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_taxonomy_pages.html', expire_timestamps=('page',), localize_template_by='taxonomy_term.term.slug')
def sb_taxonomy_pages(slug, taxonomy='post_tag', num=5):
try:
taxonomy_term = TaxonomyTerm.objects.select_related('term').get(term__slug=slug, taxonomy=taxonomy)
except ObjectDoesNotExist:
return dict(taxonomy_term=None, posts=None)
pages = [t.post for t in PostTerms.objects.filter(
term_taxonomy=taxonomy_term, post__post_type='page', post__status='publish'
).select_related('post').order_by('-post__id')[:num]]
return dict(blog=Blog.get_active(), taxonomy_term=taxonomy_term, pages=pages)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_related_posts.html', expire_timestamps=('post',))
def sb_related_posts(post, num=5):
"""
cursor.execute("select object_id, count(distinct term_taxonomy_id) as weight from wp_2_term_relationships t inner join wp_2_posts p on p.ID=t.object_id where term_taxonomy_id in (%s) and post_type='post' and post_status='publish' and object_id != %s group by object_id order by weight desc, object_id limit 5" % (', '.join(str(t) for t in tt_ids), p.id))
"""
# defer some of the heavier post fields once the defer+annotate bug has been fixed
posts = Post.objects.published().filter(tag__in=post.tags).exclude(id=post.id).annotate(weight=models.Count('tag')).order_by('-weight', '-date')[:num]
return dict(blog=Blog.get_active(), posts=posts)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_page.html', expire_timestamps=('page',), localize_template_by='page.slug')
def sb_page(slug):
try:
page = Page.objects.get(slug=slug)
except ObjectDoesNotExist:
page=None
return dict(blog=Blog.get_active(), page=page)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_links.html')
def sb_links():
# TODO: support nested categories by using a tree as in the tags above,
# and adding links to each one in one sweep
categories = dict()
for rel in LinkCategories.objects.select_related('link', 'category').filter(link__visible='Y'):
category = rel.category
link = rel.link
if not category.id in categories:
categories[category.id] = category
category.shortcuts = dict(links=list())
else:
category = categories[category.id]
category.shortcuts['links'].append(link)
categories = [c[1] for c in sorted([(c.term.name, c) for c in categories.values()])]
return dict(blog=Blog.get_active(), categories=categories)
@cached_inclusion_tag(register, 'wp_frontman/tags/sb_tagcloud.html', expire_timestamps=('taxonomy',))
def sb_tagcloud(max_tags=30, size_max=1.2, size_avg=1, size_min=0.8, use_int=False, order_by=None, exclude=None, r=1, g=1, b=1, reorder_by_name=False):
max_tags = s2i(max_tags, None)
size_max = s2i(size_max, 1.2, cls=float)
size_avg = s2i(size_avg, 1)
size_min = s2i(size_min, 0.8, cls=float)
r = s2i(r, 1, cls=float)
g = s2i(g, 1, cls=float)
b = s2i(b, 1, cls=float)
tags = Tag.objects.select_related('term').order_by('-count')
if exclude:
tags = tags.exclude(term__slug__in=exclude.split(','))
if order_by:
tags = tags.order_by(order_by)
if not tags:
return dict(blog=Blog.get_active(), tags=list())
if max_tags:
tags = tags[:max_tags]
nums = [t.count for t in tags]
n_min = min(nums)
n_max = max(nums)
if not n_max:
return dict(blog=Blog.get_active(), tags=list())
if n_max == n_min:
step = size_max / n_max
else:
step = (size_max - size_min) / float(n_max - n_min)
use_rgb = len(set([r, g, b])) > 1
for tag in tags:
tag.cloud_size = size_min + (tag.count - n_min) * step
if use_int:
tag.cloud_size = int(tag.cloud_size)
if use_rgb:
tag.cloud_rgb = (int(round(tag.cloud_size*r)), int(round(tag.cloud_size*g)), int(round(tag.cloud_size*b)))
else:
tag.cloud_rgb = (tag.cloud_size, tag.cloud_size, tag.cloud_size)
if reorder_by_name and tags:
tags = [t[1] for t in sorted((t.term.name, t) for t in tags)]
return dict(blog=Blog.get_active(), tags=tags)
| [
1,
529,
276,
1112,
420,
29958,
29880,
566,
3634,
29914,
11912,
7354,
29966,
9507,
29958,
1131,
293,
29914,
11912,
8862,
1171,
29914,
11912,
29918,
8862,
1171,
29914,
1356,
572,
271,
300,
810,
29914,
29893,
7810,
29918,
20778,
29918,
11338,
29889,
2272,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
3221,
29889,
11739,
29879,
1053,
4669,
25125,
3664,
1252,
391,
13,
3166,
9557,
1053,
4472,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
3166,
19247,
29918,
8862,
1171,
29889,
1982,
29889,
13239,
1053,
1207,
29918,
8336,
29892,
544,
1540,
29918,
8336,
29892,
269,
29906,
29875,
13,
3166,
19247,
29918,
8862,
1171,
29889,
7312,
1053,
350,
1188,
13,
3166,
19247,
29918,
8862,
1171,
29889,
9794,
1053,
334,
13,
3166,
19247,
29918,
8862,
1171,
29889,
8173,
29889,
4039,
29918,
19557,
4097,
1053,
22152,
29918,
262,
10085,
29918,
4039,
13,
13,
13,
9573,
353,
4472,
29889,
12284,
580,
13,
13,
13,
29992,
9573,
29889,
4572,
13,
1753,
1400,
29918,
2848,
29918,
4141,
29898,
2490,
29892,
6389,
1125,
13,
1678,
736,
13,
13,
13,
29992,
9573,
29889,
4572,
13,
1753,
1400,
29918,
2848,
29898,
2490,
29892,
6389,
1125,
13,
1678,
1400,
29918,
2848,
353,
679,
5552,
29898,
2490,
29892,
22868,
29893,
7810,
29918,
2490,
29918,
2848,
742,
6213,
29897,
13,
1678,
565,
1400,
29918,
2848,
338,
6213,
29901,
13,
4706,
27497,
353,
9657,
29898,
1220,
29922,
29906,
29900,
29892,
3440,
29922,
29896,
29947,
29900,
29892,
3440,
29918,
689,
29922,
29941,
29900,
29900,
29892,
1400,
29918,
7299,
29922,
29941,
29900,
29900,
29892,
954,
29918,
305,
1503,
29922,
29955,
29900,
29897,
13,
4706,
6389,
353,
518,
524,
29898,
29874,
29897,
363,
263,
297,
6389,
29889,
5451,
29317,
1495,
29962,
13,
4706,
363,
263,
297,
6702,
1220,
742,
525,
9342,
742,
525,
9342,
29918,
689,
29374,
13,
9651,
1018,
29901,
13,
1669,
27497,
29961,
29874,
29962,
353,
6389,
29889,
7323,
29898,
29900,
29897,
13,
9651,
5174,
11374,
2392,
29901,
13,
18884,
1209,
13,
4706,
1400,
29918,
2848,
353,
27497,
1839,
2490,
29918,
7299,
2033,
13,
4706,
1400,
29918,
2848,
4619,
7431,
29898,
2490,
29889,
3051,
29918,
303,
374,
2986,
29897,
847,
27497,
1839,
1949,
29918,
305,
1503,
2033,
334,
27497,
1839,
1220,
2033,
13,
4706,
1400,
29918,
2848,
4619,
1400,
29889,
9342,
29918,
2798,
334,
27497,
1839,
9342,
2033,
13,
4706,
565,
1400,
29889,
9342,
29918,
4882,
1275,
525,
3150,
2396,
13,
9651,
1400,
29918,
2848,
4619,
27497,
1839,
9342,
29918,
689,
2033,
13,
4706,
1400,
3032,
29893,
7810,
29918,
2490,
29918,
2848,
353,
1400,
29918,
2848,
13,
1678,
736,
1400,
29918,
2848,
13,
308,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
12292,
29889,
1420,
742,
4893,
29918,
4703,
29922,
5574,
29892,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
3488,
742,
876,
13,
1753,
17444,
29918,
12292,
29898,
4703,
29892,
20520,
29922,
8516,
29892,
4236,
29918,
5563,
29922,
8516,
29892,
954,
29922,
8516,
1125,
13,
1678,
396,
14402,
29901,
1735,
278,
1904,
304,
9305,
2748,
316,
14373,
29879,
664,
6284,
411,
10166,
4733,
13,
1678,
3855,
29879,
353,
7399,
6747,
29889,
12650,
29889,
12292,
2141,
5467,
3726,
2141,
2622,
29918,
12817,
877,
3560,
2824,
311,
571,
29898,
13,
4706,
525,
1256,
29918,
29887,
4378,
742,
525,
3051,
742,
22868,
735,
2265,
415,
742,
525,
5630,
742,
525,
1545,
2164,
29918,
29887,
4378,
742,
525,
3051,
29918,
4572,
287,
742,
13,
4706,
525,
3560,
1649,
1256,
29918,
29887,
4378,
742,
525,
3560,
1649,
3051,
742,
525,
3560,
22359,
735,
2265,
415,
742,
525,
3560,
1649,
5630,
742,
13,
4706,
525,
3560,
1649,
1545,
2164,
29918,
29887,
4378,
742,
525,
3560,
1649,
3051,
29918,
4572,
287,
742,
13,
1678,
1723,
13,
1678,
565,
20520,
338,
451,
6213,
29901,
13,
4706,
20520,
353,
18761,
4197,
2098,
292,
29892,
525,
6510,
29918,
2098,
742,
525,
3257,
11287,
13,
1678,
1683,
29901,
13,
4706,
20520,
353,
18761,
18959,
6510,
29918,
2098,
742,
525,
3257,
11287,
13,
1678,
3855,
29879,
353,
3855,
29879,
29889,
2098,
29918,
1609,
10456,
2098,
292,
29897,
13,
1678,
6515,
353,
1207,
29918,
8336,
29898,
29939,
29879,
29897,
13,
1678,
565,
954,
29901,
13,
4706,
6515,
353,
6515,
7503,
1949,
29962,
13,
1678,
2009,
353,
3030,
29889,
657,
877,
3827,
1495,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
2224,
29922,
657,
5552,
29898,
4703,
29889,
657,
877,
3827,
5477,
525,
2084,
742,
6213,
511,
6515,
29922,
12292,
29892,
4236,
29918,
5563,
29922,
3317,
29918,
5563,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
276,
1760,
29918,
14080,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
876,
13,
1753,
17444,
29918,
276,
1760,
29918,
14080,
29898,
1949,
29922,
29945,
29892,
14383,
29922,
29900,
29892,
19060,
29918,
333,
29922,
8516,
29892,
3611,
29922,
8516,
29892,
3013,
29918,
3051,
29922,
8824,
29892,
19060,
29918,
14080,
29922,
8516,
1125,
13,
1678,
565,
14383,
29901,
13,
4706,
1369,
29892,
1095,
353,
14383,
29892,
954,
29974,
11014,
13,
1678,
1683,
29901,
13,
4706,
1369,
29892,
1095,
353,
29871,
29900,
29892,
954,
13,
1678,
316,
571,
29918,
1761,
353,
6702,
1256,
29918,
29887,
4378,
742,
22868,
735,
2265,
415,
742,
525,
5630,
1495,
13,
1678,
565,
451,
3013,
29918,
3051,
29901,
13,
4706,
316,
571,
29918,
1761,
4619,
6702,
3051,
742,
525,
3051,
29918,
4572,
287,
742,
525,
1545,
2164,
29918,
29887,
4378,
1495,
13,
1678,
3855,
29879,
353,
4918,
29889,
12650,
29889,
5467,
3726,
2141,
311,
571,
10456,
311,
571,
29918,
1761,
29897,
13,
1678,
565,
19060,
29918,
333,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
333,
29922,
735,
2325,
29918,
333,
29897,
13,
1678,
565,
19060,
29918,
14080,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
333,
1649,
262,
11759,
29886,
29889,
333,
363,
282,
297,
19060,
29918,
14080,
2314,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
11803,
29922,
29939,
29879,
29961,
2962,
29901,
355,
1402,
3611,
29922,
3257,
29897,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
3332,
29918,
9342,
287,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
876,
13,
1753,
17444,
29918,
3332,
29918,
9342,
287,
29898,
1949,
29922,
29945,
29892,
14383,
29922,
29900,
29892,
19060,
29918,
333,
29922,
8516,
29892,
3611,
29922,
8516,
29892,
3013,
29918,
3051,
29922,
8824,
1125,
13,
1678,
565,
14383,
29901,
13,
4706,
1369,
29892,
1095,
353,
14383,
29892,
954,
29974,
11014,
13,
1678,
1683,
29901,
13,
4706,
1369,
29892,
1095,
353,
29871,
29900,
29892,
954,
13,
1678,
316,
571,
29918,
1761,
353,
6702,
1256,
29918,
29887,
4378,
742,
22868,
735,
2265,
415,
742,
525,
5630,
1495,
13,
1678,
565,
451,
3013,
29918,
3051,
29901,
13,
4706,
316,
571,
29918,
1761,
4619,
6702,
3051,
742,
525,
3051,
29918,
4572,
287,
742,
525,
1545,
2164,
29918,
29887,
4378,
1495,
13,
1678,
3855,
29879,
353,
4918,
29889,
12650,
29889,
5467,
3726,
2141,
311,
571,
10456,
311,
571,
29918,
1761,
29897,
13,
1678,
565,
19060,
29918,
333,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
333,
29922,
735,
2325,
29918,
333,
29897,
13,
1678,
3855,
29879,
353,
3855,
29879,
29889,
2098,
29918,
1609,
877,
29899,
9342,
29918,
2798,
1495,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
11803,
29922,
29939,
29879,
29961,
2962,
29901,
355,
1402,
3611,
29922,
3257,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
276,
1760,
29918,
21032,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
9342,
742,
876,
13,
1753,
17444,
29918,
276,
1760,
29918,
21032,
29898,
1949,
29922,
29945,
29892,
19060,
29918,
333,
29922,
8516,
1125,
13,
1678,
3855,
29879,
353,
7399,
20001,
29889,
12650,
29889,
9961,
1490,
2141,
2622,
29918,
12817,
877,
3188,
29918,
2490,
2824,
311,
571,
29898,
13,
4706,
525,
3188,
29918,
2490,
1649,
1256,
29918,
29887,
4378,
742,
525,
3188,
29918,
2490,
1649,
3051,
742,
525,
3188,
29918,
2490,
22359,
735,
2265,
415,
742,
13,
4706,
525,
3188,
29918,
2490,
1649,
5630,
742,
525,
3188,
29918,
2490,
1649,
1545,
2164,
29918,
29887,
4378,
742,
525,
3188,
29918,
2490,
1649,
3051,
29918,
4572,
287,
29915,
13,
1678,
13742,
2098,
29918,
1609,
877,
29899,
333,
1495,
13,
1678,
565,
19060,
29918,
333,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
3188,
29918,
2490,
1649,
333,
29922,
735,
2325,
29918,
333,
29897,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
6589,
29922,
29939,
29879,
29961,
29900,
29901,
1949,
2314,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
20683,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
20725,
21926,
742,
876,
13,
1753,
17444,
29918,
20683,
29898,
2098,
292,
29922,
8516,
29892,
4236,
29918,
5563,
29922,
8516,
29892,
954,
29922,
8516,
29892,
3847,
29918,
333,
29922,
8516,
29892,
19060,
29922,
8516,
29892,
408,
29918,
8336,
29922,
5574,
1125,
13,
1678,
396,
1018,
263,
21697,
13,
1678,
13997,
353,
6213,
13,
1678,
565,
451,
20520,
322,
451,
4236,
29918,
5563,
322,
451,
954,
322,
451,
19060,
29901,
13,
4706,
5447,
353,
17943,
29889,
657,
29918,
497,
29898,
294,
29918,
8336,
29922,
5574,
29897,
13,
4706,
363,
413,
29892,
325,
297,
5447,
29889,
7076,
7295,
13,
9651,
565,
413,
29889,
8489,
29889,
29517,
1275,
3847,
29918,
333,
29901,
13,
18884,
13997,
353,
325,
13,
18884,
544,
1540,
29918,
8336,
29898,
20683,
29892,
525,
2798,
1495,
13,
18884,
565,
451,
408,
29918,
8336,
29901,
13,
462,
1678,
13997,
353,
13997,
29889,
8149,
580,
13,
18884,
2867,
13,
1678,
565,
451,
13997,
29901,
13,
4706,
565,
451,
20520,
29901,
13,
9651,
20520,
353,
17943,
3032,
7299,
29889,
2098,
292,
13,
4706,
1683,
29901,
13,
9651,
20520,
353,
313,
2098,
292,
29892,
1723,
718,
17943,
3032,
7299,
29889,
2098,
292,
13,
4706,
3855,
29879,
353,
17943,
29889,
12650,
29889,
2622,
29918,
12817,
877,
3560,
742,
525,
8489,
1495,
13,
4706,
565,
3847,
29918,
333,
29901,
13,
9651,
565,
3847,
29918,
333,
1275,
525,
4632,
2396,
13,
18884,
3855,
29879,
353,
3855,
29879,
29889,
4572,
29898,
3560,
1649,
275,
4304,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
3855,
29879,
353,
3855,
29879,
29889,
4572,
29898,
3560,
1649,
8489,
1649,
29517,
29922,
3560,
29918,
333,
29897,
13,
4706,
565,
19060,
29901,
13,
9651,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
8489,
1649,
29517,
1649,
262,
29922,
735,
2325,
29889,
5451,
29898,
3788,
876,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
2098,
29918,
1609,
10456,
2098,
292,
29897,
13,
4706,
565,
408,
29918,
8336,
29901,
13,
9651,
13997,
353,
1207,
29918,
8336,
29898,
29939,
29879,
29897,
13,
9651,
544,
1540,
29918,
8336,
29898,
20683,
29892,
525,
2798,
1495,
13,
4706,
1683,
29901,
13,
9651,
13997,
353,
3855,
29879,
29889,
4572,
29898,
2798,
1649,
4141,
29922,
29900,
29897,
13,
1678,
565,
954,
29901,
13,
4706,
13997,
353,
13997,
7503,
1949,
29962,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
13997,
29922,
20683,
29892,
4236,
29918,
5563,
29922,
3317,
29918,
5563,
470,
6213,
29892,
408,
29918,
7224,
29922,
29933,
1188,
29889,
2746,
29889,
20683,
29918,
294,
29918,
7224,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
2324,
20683,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
20725,
21926,
742,
876,
13,
1753,
17444,
29918,
2324,
20683,
29898,
2098,
292,
29922,
8516,
29892,
4236,
29918,
5563,
29922,
8516,
29892,
954,
29922,
8516,
29892,
3847,
29918,
333,
29922,
8516,
29892,
9322,
29922,
8824,
29892,
304,
552,
955,
29918,
6194,
29922,
8824,
1125,
13,
1678,
565,
451,
20520,
29901,
13,
4706,
20520,
353,
6645,
10900,
3032,
7299,
29889,
2098,
292,
13,
1678,
1683,
29901,
13,
4706,
20520,
353,
313,
2098,
292,
29892,
1723,
718,
6645,
10900,
3032,
7299,
29889,
2098,
292,
13,
1678,
3855,
29879,
353,
6645,
10900,
29889,
12650,
29889,
2622,
29918,
12817,
877,
3560,
742,
525,
8489,
1495,
13,
1678,
565,
304,
552,
955,
29918,
6194,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
4572,
29898,
3560,
1649,
275,
4304,
29922,
5574,
29897,
13,
1678,
565,
3847,
29918,
333,
29901,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
4572,
29898,
3560,
1649,
8489,
1649,
29517,
29922,
3560,
29918,
333,
29897,
13,
1678,
3855,
29879,
353,
3855,
29879,
29889,
2098,
29918,
1609,
10456,
2098,
292,
29897,
13,
1678,
565,
9322,
29901,
13,
4706,
13997,
353,
1207,
29918,
8336,
29898,
29939,
29879,
29897,
13,
4706,
544,
1540,
29918,
8336,
29898,
20683,
29892,
525,
2798,
1495,
13,
1678,
1683,
29901,
13,
4706,
13997,
353,
3855,
29879,
29889,
4572,
29898,
2798,
1649,
4141,
29922,
29900,
29897,
13,
1678,
565,
954,
29901,
13,
4706,
13997,
353,
13997,
7503,
1949,
29962,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
13997,
29922,
20683,
29892,
4236,
29918,
5563,
29922,
3317,
29918,
5563,
470,
6213,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
1279,
3145,
29918,
6360,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
876,
13,
1753,
17444,
29918,
1279,
3145,
29918,
6360,
29898,
14273,
29922,
8824,
29892,
1797,
1609,
29918,
2798,
29922,
8824,
29892,
954,
29922,
8516,
1125,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
3190,
3145,
29922,
13197,
573,
12883,
29889,
497,
29898,
14273,
29892,
1797,
1609,
29918,
2798,
29892,
954,
876,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
1279,
3145,
29918,
10874,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
876,
13,
1753,
17444,
29918,
1279,
3145,
29918,
10874,
29898,
14273,
29922,
8824,
29892,
1797,
1609,
29918,
2798,
29922,
8824,
29892,
954,
29922,
8516,
1125,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
3190,
3145,
29922,
13197,
573,
13953,
29889,
497,
29898,
14273,
29892,
1797,
1609,
29918,
2798,
29892,
954,
876,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
20725,
21926,
29918,
14080,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
511,
1887,
675,
29918,
6886,
29918,
1609,
2433,
20725,
21926,
29918,
8489,
29889,
8489,
29889,
29517,
1495,
13,
1753,
17444,
29918,
20725,
21926,
29918,
14080,
29898,
29517,
29892,
8818,
21926,
2433,
7320,
742,
954,
29922,
29945,
29892,
19060,
29922,
8516,
29892,
19060,
29918,
18337,
29922,
8516,
1125,
13,
1678,
1018,
29901,
13,
4706,
8818,
21926,
29918,
8489,
353,
17847,
21926,
14343,
29889,
12650,
29889,
2622,
29918,
12817,
877,
8489,
2824,
657,
29898,
8489,
1649,
29517,
29922,
29517,
29892,
8818,
21926,
29922,
20725,
21926,
29897,
13,
1678,
5174,
4669,
25125,
3664,
1252,
391,
29901,
13,
4706,
736,
9657,
29898,
20725,
21926,
29918,
8489,
29922,
8516,
29892,
11803,
29922,
8516,
29897,
13,
1678,
3855,
29879,
353,
4918,
14343,
29879,
29889,
12650,
29889,
4572,
29898,
13,
4706,
1840,
29918,
20725,
21926,
29922,
20725,
21926,
29918,
8489,
29892,
1400,
1649,
2490,
29918,
1853,
2433,
2490,
742,
1400,
1649,
4882,
2433,
23679,
29915,
13,
1678,
13742,
2622,
29918,
12817,
877,
2490,
2824,
2098,
29918,
1609,
877,
29899,
2490,
1649,
333,
1495,
13,
1678,
565,
19060,
29901,
13,
4706,
565,
338,
8758,
29898,
735,
2325,
29892,
7399,
6747,
1125,
13,
9651,
19060,
353,
518,
735,
2325,
29962,
13,
4706,
565,
19060,
29918,
18337,
29901,
13,
9651,
1369,
29892,
16345,
29892,
1095,
353,
19060,
29918,
18337,
29889,
16707,
877,
29901,
1495,
13,
9651,
1018,
29901,
13,
18884,
565,
1369,
322,
1095,
29901,
13,
462,
1678,
19060,
353,
19060,
29961,
524,
29898,
2962,
1125,
524,
29898,
355,
4638,
13,
18884,
25342,
1369,
29901,
13,
462,
1678,
19060,
353,
19060,
29961,
524,
29898,
2962,
1125,
29962,
13,
18884,
25342,
1095,
29901,
13,
462,
1678,
19060,
353,
19060,
7503,
524,
29898,
355,
4638,
13,
9651,
5174,
313,
1542,
2392,
29892,
7865,
2392,
1125,
13,
18884,
1209,
13,
4706,
3855,
29879,
353,
3855,
29879,
29889,
735,
2325,
29898,
2490,
1649,
333,
1649,
262,
11759,
29886,
29889,
333,
363,
282,
297,
19060,
2314,
13,
1678,
11803,
353,
518,
29873,
29889,
2490,
363,
260,
297,
3855,
29879,
7503,
1949,
5262,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
8818,
21926,
29918,
8489,
29922,
20725,
21926,
29918,
8489,
29892,
11803,
29922,
14080,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
20725,
21926,
29918,
12292,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
3488,
742,
511,
1887,
675,
29918,
6886,
29918,
1609,
2433,
20725,
21926,
29918,
8489,
29889,
8489,
29889,
29517,
1495,
13,
1753,
17444,
29918,
20725,
21926,
29918,
12292,
29898,
29517,
29892,
8818,
21926,
2433,
2490,
29918,
4039,
742,
954,
29922,
29945,
1125,
13,
1678,
1018,
29901,
13,
4706,
8818,
21926,
29918,
8489,
353,
17847,
21926,
14343,
29889,
12650,
29889,
2622,
29918,
12817,
877,
8489,
2824,
657,
29898,
8489,
1649,
29517,
29922,
29517,
29892,
8818,
21926,
29922,
20725,
21926,
29897,
13,
1678,
5174,
4669,
25125,
3664,
1252,
391,
29901,
13,
4706,
736,
9657,
29898,
20725,
21926,
29918,
8489,
29922,
8516,
29892,
11803,
29922,
8516,
29897,
13,
1678,
6515,
353,
518,
29873,
29889,
2490,
363,
260,
297,
4918,
14343,
29879,
29889,
12650,
29889,
4572,
29898,
13,
4706,
1840,
29918,
20725,
21926,
29922,
20725,
21926,
29918,
8489,
29892,
1400,
1649,
2490,
29918,
1853,
2433,
3488,
742,
1400,
1649,
4882,
2433,
23679,
29915,
13,
1678,
13742,
2622,
29918,
12817,
877,
2490,
2824,
2098,
29918,
1609,
877,
29899,
2490,
1649,
333,
1495,
7503,
1949,
5262,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
8818,
21926,
29918,
8489,
29922,
20725,
21926,
29918,
8489,
29892,
6515,
29922,
12292,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
12817,
29918,
14080,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
2490,
742,
876,
13,
1753,
17444,
29918,
12817,
29918,
14080,
29898,
2490,
29892,
954,
29922,
29945,
1125,
13,
1678,
9995,
13,
1678,
10677,
29889,
7978,
703,
2622,
1203,
29918,
333,
29892,
2302,
29898,
5721,
5562,
1840,
29918,
20725,
21926,
29918,
333,
29897,
408,
7688,
515,
19247,
29918,
29906,
29918,
8489,
29918,
2674,
800,
14587,
260,
6426,
5988,
19247,
29918,
29906,
29918,
14080,
282,
373,
282,
29889,
1367,
29922,
29873,
29889,
3318,
29918,
333,
988,
1840,
29918,
20725,
21926,
29918,
333,
297,
313,
29995,
29879,
29897,
322,
1400,
29918,
1853,
2433,
2490,
29915,
322,
1400,
29918,
4882,
2433,
23679,
29915,
322,
1203,
29918,
333,
2804,
1273,
29879,
2318,
491,
1203,
29918,
333,
1797,
491,
7688,
5153,
29892,
1203,
29918,
333,
4046,
29871,
29945,
29908,
1273,
313,
742,
15300,
7122,
29898,
710,
29898,
29873,
29897,
363,
260,
297,
260,
29873,
29918,
4841,
511,
282,
29889,
333,
876,
13,
1678,
9995,
13,
1678,
396,
316,
571,
777,
310,
278,
14200,
631,
1400,
4235,
2748,
278,
316,
571,
29974,
6735,
403,
6494,
756,
1063,
4343,
13,
1678,
11803,
353,
4918,
29889,
12650,
29889,
5467,
3726,
2141,
4572,
29898,
4039,
1649,
262,
29922,
2490,
29889,
11338,
467,
735,
2325,
29898,
333,
29922,
2490,
29889,
333,
467,
6735,
403,
29898,
7915,
29922,
9794,
29889,
3981,
877,
4039,
1495,
467,
2098,
29918,
1609,
877,
29899,
7915,
742,
17411,
1256,
1495,
7503,
1949,
29962,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
11803,
29922,
14080,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
3488,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
3488,
742,
511,
1887,
675,
29918,
6886,
29918,
1609,
2433,
3488,
29889,
29517,
1495,
13,
1753,
17444,
29918,
3488,
29898,
29517,
1125,
13,
1678,
1018,
29901,
13,
4706,
1813,
353,
9305,
29889,
12650,
29889,
657,
29898,
29517,
29922,
29517,
29897,
13,
1678,
5174,
4669,
25125,
3664,
1252,
391,
29901,
13,
4706,
1813,
29922,
8516,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
1813,
29922,
3488,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
4965,
29889,
1420,
1495,
13,
1753,
17444,
29918,
4965,
7295,
13,
1678,
396,
14402,
29901,
2304,
9322,
13997,
491,
773,
263,
5447,
408,
297,
278,
8282,
2038,
29892,
13,
1678,
396,
539,
322,
4417,
2988,
304,
1269,
697,
297,
697,
7901,
1022,
13,
1678,
13997,
353,
9657,
580,
13,
1678,
363,
1104,
297,
6645,
29907,
14404,
29889,
12650,
29889,
2622,
29918,
12817,
877,
2324,
742,
525,
7320,
2824,
4572,
29898,
2324,
1649,
12872,
2433,
29979,
29374,
13,
4706,
7663,
353,
1104,
29889,
7320,
13,
4706,
1544,
353,
1104,
29889,
2324,
13,
4706,
565,
451,
7663,
29889,
333,
297,
13997,
29901,
13,
9651,
13997,
29961,
7320,
29889,
333,
29962,
353,
7663,
13,
9651,
7663,
29889,
12759,
7582,
29879,
353,
9657,
29898,
4965,
29922,
1761,
3101,
13,
4706,
1683,
29901,
13,
9651,
7663,
353,
13997,
29961,
7320,
29889,
333,
29962,
13,
4706,
7663,
29889,
12759,
7582,
29879,
1839,
4965,
13359,
4397,
29898,
2324,
29897,
13,
1678,
13997,
353,
518,
29883,
29961,
29896,
29962,
363,
274,
297,
12705,
4197,
29898,
29883,
29889,
8489,
29889,
978,
29892,
274,
29897,
363,
274,
297,
13997,
29889,
5975,
580,
2314,
29962,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
13997,
29922,
20683,
29897,
13,
13,
13,
29992,
29883,
3791,
29918,
262,
10085,
29918,
4039,
29898,
9573,
29892,
525,
11912,
29918,
8862,
1171,
29914,
11338,
29914,
20778,
29918,
4039,
9274,
29889,
1420,
742,
1518,
533,
29918,
9346,
342,
15092,
29922,
877,
20725,
21926,
742,
876,
13,
1753,
17444,
29918,
4039,
9274,
29898,
3317,
29918,
11338,
29922,
29941,
29900,
29892,
2159,
29918,
3317,
29922,
29896,
29889,
29906,
29892,
2159,
29918,
485,
29887,
29922,
29896,
29892,
2159,
29918,
1195,
29922,
29900,
29889,
29947,
29892,
671,
29918,
524,
29922,
8824,
29892,
1797,
29918,
1609,
29922,
8516,
29892,
19060,
29922,
8516,
29892,
364,
29922,
29896,
29892,
330,
29922,
29896,
29892,
289,
29922,
29896,
29892,
337,
2098,
29918,
1609,
29918,
978,
29922,
8824,
1125,
13,
1678,
4236,
29918,
11338,
353,
269,
29906,
29875,
29898,
3317,
29918,
11338,
29892,
6213,
29897,
13,
1678,
2159,
29918,
3317,
353,
269,
29906,
29875,
29898,
2311,
29918,
3317,
29892,
29871,
29896,
29889,
29906,
29892,
1067,
29879,
29922,
7411,
29897,
13,
1678,
2159,
29918,
485,
29887,
353,
269,
29906,
29875,
29898,
2311,
29918,
485,
29887,
29892,
29871,
29896,
29897,
13,
1678,
2159,
29918,
1195,
353,
269,
29906,
29875,
29898,
2311,
29918,
1195,
29892,
29871,
29900,
29889,
29947,
29892,
1067,
29879,
29922,
7411,
29897,
13,
1678,
364,
353,
269,
29906,
29875,
29898,
29878,
29892,
29871,
29896,
29892,
1067,
29879,
29922,
7411,
29897,
13,
1678,
330,
353,
269,
29906,
29875,
29898,
29887,
29892,
29871,
29896,
29892,
1067,
29879,
29922,
7411,
29897,
13,
1678,
289,
353,
269,
29906,
29875,
29898,
29890,
29892,
29871,
29896,
29892,
1067,
29879,
29922,
7411,
29897,
13,
1678,
8282,
353,
10522,
29889,
12650,
29889,
2622,
29918,
12817,
877,
8489,
2824,
2098,
29918,
1609,
877,
29899,
2798,
1495,
13,
1678,
565,
19060,
29901,
13,
4706,
8282,
353,
8282,
29889,
735,
2325,
29898,
8489,
1649,
29517,
1649,
262,
29922,
735,
2325,
29889,
5451,
29898,
3788,
876,
13,
1678,
565,
1797,
29918,
1609,
29901,
13,
4706,
8282,
353,
8282,
29889,
2098,
29918,
1609,
29898,
2098,
29918,
1609,
29897,
13,
1678,
565,
451,
8282,
29901,
13,
4706,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
8282,
29922,
1761,
3101,
13,
1678,
565,
4236,
29918,
11338,
29901,
13,
4706,
8282,
353,
8282,
7503,
3317,
29918,
11338,
29962,
13,
1678,
954,
29879,
353,
518,
29873,
29889,
2798,
363,
260,
297,
8282,
29962,
13,
1678,
302,
29918,
1195,
353,
1375,
29898,
1949,
29879,
29897,
13,
1678,
302,
29918,
3317,
353,
4236,
29898,
1949,
29879,
29897,
13,
1678,
565,
451,
302,
29918,
3317,
29901,
13,
4706,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
8282,
29922,
1761,
3101,
13,
1678,
565,
302,
29918,
3317,
1275,
302,
29918,
1195,
29901,
13,
4706,
4331,
353,
2159,
29918,
3317,
847,
302,
29918,
3317,
13,
1678,
1683,
29901,
13,
4706,
4331,
353,
313,
2311,
29918,
3317,
448,
2159,
29918,
1195,
29897,
847,
5785,
29898,
29876,
29918,
3317,
448,
302,
29918,
1195,
29897,
13,
1678,
671,
29918,
23973,
353,
7431,
29898,
842,
4197,
29878,
29892,
330,
29892,
289,
12622,
1405,
29871,
29896,
13,
1678,
363,
4055,
297,
8282,
29901,
13,
4706,
4055,
29889,
9274,
29918,
2311,
353,
2159,
29918,
1195,
718,
313,
4039,
29889,
2798,
448,
302,
29918,
1195,
29897,
334,
4331,
13,
4706,
565,
671,
29918,
524,
29901,
13,
9651,
4055,
29889,
9274,
29918,
2311,
353,
938,
29898,
4039,
29889,
9274,
29918,
2311,
29897,
13,
4706,
565,
671,
29918,
23973,
29901,
13,
9651,
4055,
29889,
9274,
29918,
23973,
353,
313,
524,
29898,
14486,
29898,
4039,
29889,
9274,
29918,
2311,
29930,
29878,
8243,
938,
29898,
14486,
29898,
4039,
29889,
9274,
29918,
2311,
29930,
29887,
8243,
938,
29898,
14486,
29898,
4039,
29889,
9274,
29918,
2311,
29930,
29890,
4961,
13,
4706,
1683,
29901,
13,
9651,
4055,
29889,
9274,
29918,
23973,
353,
313,
4039,
29889,
9274,
29918,
2311,
29892,
4055,
29889,
9274,
29918,
2311,
29892,
4055,
29889,
9274,
29918,
2311,
29897,
13,
1678,
565,
337,
2098,
29918,
1609,
29918,
978,
322,
8282,
29901,
13,
4706,
8282,
353,
518,
29873,
29961,
29896,
29962,
363,
260,
297,
12705,
3552,
29873,
29889,
8489,
29889,
978,
29892,
260,
29897,
363,
260,
297,
8282,
4638,
13,
1678,
736,
9657,
29898,
7312,
29922,
29933,
1188,
29889,
657,
29918,
4925,
3285,
8282,
29922,
11338,
29897,
13,
2
] |
update_thing.py | djfurman/example-db-app | 0 | 142648 | <reponame>djfurman/example-db-app
import os
import pymysql
# Environment variables can be set on the client or server
# You can also run `cp .env.example .env` and set them locally
# The .env file will be ignored by version control
# This creates a convenient way to test and transports to prod settings
# Intentionally using os.getenv instead of os.environ here so you get python's None if not set
# This will now only connect to the database at boot, not on each call
db_connection = pymysql.connect(
database=os.getenv("DB_DATABASE"),
host=os.getenv("DB_HOST"),
user=os.getenv("DB_USER"),
password=os.getenv("DB_PASS"),
)
def update(cursor: pymysql.Connection.cursorclass, data: dict) -> None:
"""Data update method responsible for updating the active data record
Arguments:
cursor (pymysql.Connection.cursorclas): the established DB cursor
data (dict): Python dictionary of data to update
"""
# Triple quotes make the query much easier to read/format
# your future self will thank you
query = """
Update
employees
Set
family_members = %(family_members)s,
social_status = %(social_status)s,
gender = %(gender)s,
date_birth = %(date_birth)s,
id_number = %(id_number)s,
mail = %(mail)s,
name = %(name)s
Where
id = %(id)s
;
"""
# Execute the query
# This method uses the named vairables from the dict
# Each variable is escaped protecting you from SQL-injection
cursor.execute(query, data)
# Let's get this set to the DB
cursor.commit()
def main() -> None:
"""General controller method
This could be
an application entry point for your GUI
the start routine for Django/Flask/FastAPI
Something simple like this wrapped in argparse
"""
# TODO - Gather this from whatever mechanism is needed
data = {
"family_members": "",
"social_status": "",
"gender": "",
"date_birth": "",
"id_number": 0,
"mail": "",
"name": "",
"id": "",
}
# Grab an active cursor object
cursor = db_connection.cursor()
# We know the DB is the part that can break, so we'll wrap this first
try:
update(cursor, data)
print("Yay this worked") # Check the DB and give some user feedback
except pymysql.DatabaseError as e:
print(str(e)) # Prints the basic error you encountered
# If you hit this section, get rid of the try/except or use pdb to walk the error
# There are multiple ways to print the traceback
# IMHO the easiest is to just not catch the exception
# This should only really be terminated when the application is done
db_connection.close()
if __name__ == "__main__":
main()
| [
1,
529,
276,
1112,
420,
29958,
19776,
22613,
1171,
29914,
4773,
29899,
2585,
29899,
932,
13,
5215,
2897,
13,
13,
5215,
282,
962,
952,
1519,
13,
13,
29937,
16738,
3651,
508,
367,
731,
373,
278,
3132,
470,
1923,
13,
29937,
887,
508,
884,
1065,
421,
6814,
869,
6272,
29889,
4773,
869,
6272,
29952,
322,
731,
963,
12430,
13,
29937,
450,
869,
6272,
934,
674,
367,
17262,
491,
1873,
2761,
13,
29937,
910,
10017,
263,
19192,
982,
304,
1243,
322,
1301,
4011,
304,
11859,
6055,
13,
29937,
3159,
2509,
635,
773,
2897,
29889,
657,
6272,
2012,
310,
2897,
29889,
21813,
1244,
577,
366,
679,
3017,
29915,
29879,
6213,
565,
451,
731,
13,
29937,
910,
674,
1286,
871,
4511,
304,
278,
2566,
472,
6579,
29892,
451,
373,
1269,
1246,
13,
2585,
29918,
9965,
353,
282,
962,
952,
1519,
29889,
6915,
29898,
13,
1678,
2566,
29922,
359,
29889,
657,
6272,
703,
4051,
29918,
25832,
27982,
4968,
13,
1678,
3495,
29922,
359,
29889,
657,
6272,
703,
4051,
29918,
20832,
4968,
13,
1678,
1404,
29922,
359,
29889,
657,
6272,
703,
4051,
29918,
11889,
4968,
13,
1678,
4800,
29922,
359,
29889,
657,
6272,
703,
4051,
29918,
25711,
4968,
13,
29897,
13,
13,
13,
1753,
2767,
29898,
18127,
29901,
282,
962,
952,
1519,
29889,
5350,
29889,
18127,
1990,
29892,
848,
29901,
9657,
29897,
1599,
6213,
29901,
13,
1678,
9995,
1469,
2767,
1158,
14040,
363,
13271,
278,
6136,
848,
2407,
13,
13,
1678,
11842,
9331,
29901,
13,
4706,
10677,
313,
29886,
962,
952,
1519,
29889,
5350,
29889,
18127,
695,
294,
1125,
278,
7841,
6535,
10677,
13,
4706,
848,
313,
8977,
1125,
5132,
8600,
310,
848,
304,
2767,
13,
1678,
9995,
13,
13,
1678,
396,
8602,
552,
11839,
1207,
278,
2346,
1568,
6775,
304,
1303,
29914,
4830,
13,
1678,
396,
596,
5434,
1583,
674,
6452,
366,
13,
1678,
2346,
353,
9995,
13,
1678,
10318,
13,
4706,
22873,
13,
1678,
3789,
13,
4706,
3942,
29918,
28109,
353,
1273,
29898,
11922,
29918,
28109,
29897,
29879,
29892,
13,
4706,
5264,
29918,
4882,
353,
1273,
29898,
24911,
29918,
4882,
29897,
29879,
29892,
13,
4706,
23346,
353,
1273,
29898,
26098,
29897,
29879,
29892,
13,
4706,
2635,
29918,
29890,
7515,
353,
1273,
29898,
1256,
29918,
29890,
7515,
29897,
29879,
29892,
13,
4706,
1178,
29918,
4537,
353,
1273,
29898,
333,
29918,
4537,
29897,
29879,
29892,
13,
4706,
10524,
353,
1273,
29898,
2549,
29897,
29879,
29892,
13,
4706,
1024,
353,
1273,
29898,
978,
29897,
29879,
13,
1678,
6804,
13,
4706,
1178,
353,
1273,
29898,
333,
29897,
29879,
13,
1678,
2056,
13,
1678,
9995,
13,
13,
1678,
396,
11080,
1082,
278,
2346,
13,
1678,
396,
910,
1158,
3913,
278,
4257,
325,
1794,
4201,
793,
515,
278,
9657,
13,
1678,
396,
7806,
2286,
338,
19824,
12566,
292,
366,
515,
3758,
29899,
262,
6929,
13,
1678,
10677,
29889,
7978,
29898,
1972,
29892,
848,
29897,
13,
13,
1678,
396,
2803,
29915,
29879,
679,
445,
731,
304,
278,
6535,
13,
1678,
10677,
29889,
15060,
580,
13,
13,
13,
1753,
1667,
580,
1599,
6213,
29901,
13,
1678,
9995,
15263,
4701,
1158,
13,
1678,
910,
1033,
367,
13,
4706,
385,
2280,
6251,
1298,
363,
596,
14839,
13,
4706,
278,
1369,
26529,
363,
15337,
29914,
8754,
1278,
29914,
29943,
579,
8787,
13,
4706,
12538,
2560,
763,
445,
21021,
297,
1852,
5510,
13,
1678,
9995,
13,
13,
1678,
396,
14402,
448,
402,
1624,
445,
515,
6514,
13336,
338,
4312,
13,
1678,
848,
353,
426,
13,
4706,
376,
11922,
29918,
28109,
1115,
12633,
13,
4706,
376,
24911,
29918,
4882,
1115,
12633,
13,
4706,
376,
26098,
1115,
12633,
13,
4706,
376,
1256,
29918,
29890,
7515,
1115,
12633,
13,
4706,
376,
333,
29918,
4537,
1115,
29871,
29900,
29892,
13,
4706,
376,
2549,
1115,
12633,
13,
4706,
376,
978,
1115,
12633,
13,
4706,
376,
333,
1115,
12633,
13,
1678,
500,
13,
13,
1678,
396,
22351,
385,
6136,
10677,
1203,
13,
1678,
10677,
353,
4833,
29918,
9965,
29889,
18127,
580,
13,
13,
1678,
396,
1334,
1073,
278,
6535,
338,
278,
760,
393,
508,
2867,
29892,
577,
591,
29915,
645,
12244,
445,
937,
13,
1678,
1018,
29901,
13,
4706,
2767,
29898,
18127,
29892,
848,
29897,
13,
4706,
1596,
703,
29979,
388,
445,
3796,
1159,
29871,
396,
5399,
278,
6535,
322,
2367,
777,
1404,
16705,
13,
1678,
5174,
282,
962,
952,
1519,
29889,
9112,
2392,
408,
321,
29901,
13,
4706,
1596,
29898,
710,
29898,
29872,
876,
29871,
396,
1588,
9466,
278,
6996,
1059,
366,
18169,
13,
4706,
396,
960,
366,
7124,
445,
4004,
29892,
679,
8177,
310,
278,
1018,
29914,
19499,
470,
671,
282,
2585,
304,
6686,
278,
1059,
13,
4706,
396,
1670,
526,
2999,
5837,
304,
1596,
278,
9637,
1627,
13,
4706,
396,
22313,
8187,
278,
19075,
338,
304,
925,
451,
4380,
278,
3682,
13,
13,
1678,
396,
910,
881,
871,
2289,
367,
29185,
746,
278,
2280,
338,
2309,
13,
1678,
4833,
29918,
9965,
29889,
5358,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
python/chronos/src/bigdl/chronos/autots/model/auto_prophet.py | Laniakea94/BigDL | 3 | 2588 | # +
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp'
# ress or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import pandas as pd
import warnings
from bigdl.chronos.model.prophet import ProphetBuilder, ProphetModel
from bigdl.chronos.autots.utils import recalculate_n_sampling
# -
class AutoProphet:
def __init__(self,
changepoint_prior_scale=None,
seasonality_prior_scale=None,
holidays_prior_scale=None,
seasonality_mode=None,
changepoint_range=None,
metric='mse',
logs_dir="/tmp/auto_prophet_logs",
cpus_per_trial=1,
name="auto_prophet",
remote_dir=None,
load_dir=None,
**prophet_config
):
"""
Create an automated Prophet Model.
User need to specify either the exact value or the search space of the
Prophet model hyperparameters. For details of the Prophet model hyperparameters, refer to
https://facebook.github.io/prophet/docs/diagnostics.html#hyperparameter-tuning.
:param changepoint_prior_scale: Int or hp sampling function from an integer space
for hyperparameter changepoint_prior_scale for the Prophet model.
For hp sampling, see bigdl.chronos.orca.automl.hp for more details.
e.g. hp.loguniform(0.001, 0.5).
:param seasonality_prior_scale: hyperparameter seasonality_prior_scale for the
Prophet model.
e.g. hp.loguniform(0.01, 10).
:param holidays_prior_scale: hyperparameter holidays_prior_scale for the
Prophet model.
e.g. hp.loguniform(0.01, 10).
:param seasonality_mode: hyperparameter seasonality_mode for the
Prophet model.
e.g. hp.choice(['additive', 'multiplicative']).
:param changepoint_range: hyperparameter changepoint_range for the
Prophet model.
e.g. hp.uniform(0.8, 0.95).
:param metric: String. The evaluation metric name to optimize. e.g. "mse"
:param logs_dir: Local directory to save logs and results. It defaults to
"/tmp/auto_prophet_logs"
:param cpus_per_trial: Int. Number of cpus for each trial. It defaults to 1.
:param name: name of the AutoProphet. It defaults to "auto_prophet"
:param remote_dir: String. Remote directory to sync training results and checkpoints. It
defaults to None and doesn't take effects while running in local. While running in
cluster, it defaults to "hdfs:///tmp/{name}".
:param load_dir: Load the ckpt from load_dir. The value defaults to None.
:param prophet_config: Other Prophet hyperparameters.
"""
if load_dir:
self.best_model = ProphetModel()
self.best_model.restore(load_dir)
try:
from bigdl.orca.automl.auto_estimator import AutoEstimator
import bigdl.orca.automl.hp as hp
self.search_space = {
"changepoint_prior_scale": hp.grid_search([0.005, 0.05, 0.1, 0.5])
if changepoint_prior_scale is None
else changepoint_prior_scale,
"seasonality_prior_scale": hp.grid_search([0.01, 0.1, 1.0, 10.0])
if seasonality_prior_scale is None
else seasonality_prior_scale,
"holidays_prior_scale": hp.loguniform(0.01, 10)
if holidays_prior_scale is None
else holidays_prior_scale,
"seasonality_mode": hp.choice(['additive', 'multiplicative'])
if seasonality_mode is None
else seasonality_mode,
"changepoint_range": hp.uniform(0.8, 0.95)
if changepoint_range is None
else changepoint_range
}
self.search_space.update(prophet_config) # update other configs
self.metric = metric
model_builder = ProphetBuilder()
self.auto_est = AutoEstimator(model_builder=model_builder,
logs_dir=logs_dir,
resources_per_trial={"cpu": cpus_per_trial},
remote_dir=remote_dir,
name=name)
except ImportError:
warnings.warn("You need to install `bigdl-orca[automl]` to use `fit` function.")
def fit(self,
data,
cross_validation=True,
expect_horizon=None,
freq=None,
metric_threshold=None,
n_sampling=16,
search_alg=None,
search_alg_params=None,
scheduler=None,
scheduler_params=None,
):
"""
Automatically fit the model and search for the best hyperparameters.
:param data: training data, a pandas dataframe with Td rows,
and 2 columns, with column 'ds' indicating date and column 'y' indicating value
and Td is the time dimension
:param cross_validation: bool, if the eval result comes from cross_validation.
The value is set to True by default. Setting this option to False to
speed up the process.
:param expect_horizon: int, validation data will be automatically splited from training
data, and expect_horizon is the horizon you may need to use once the mode is fitted.
The value defaults to None, where 10% of training data will be taken
as the validation data.
:param freq: the freqency of the training dataframe. the frequency can be anything from the
pandas list of frequency strings here:
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliasesDefaulted
to None, where an unreliable frequency will be infer implicitly.
:param metric_threshold: a trial will be terminated when metric threshold is met
:param n_sampling: Number of trials to evaluate in total. Defaults to 16.
If hp.grid_search is in search_space, the grid will be run n_sampling of trials
and round up n_sampling according to hp.grid_search.
If this is -1, (virtually) infinite samples are generated
until a stopping condition is met.
:param search_alg: str, all supported searcher provided by ray tune
(i.e."variant_generator", "random", "ax", "dragonfly", "skopt",
"hyperopt", "bayesopt", "bohb", "nevergrad", "optuna", "zoopt" and
"sigopt")
:param search_alg_params: extra parameters for searcher algorithm besides search_space,
metric and searcher mode
:param scheduler: str, all supported scheduler provided by ray tune
:param scheduler_params: parameters for scheduler
"""
if expect_horizon is None:
expect_horizon = int(0.1*len(data))
if freq is None:
assert len(data) >= 2, "The training dataframe should contains more than 2 records."
assert pd.api.types.is_datetime64_any_dtype(data["ds"].dtypes), \
"The 'ds' col should be in datetime 64 type, or you need to set `freq` in fit."
self._freq = data["ds"].iloc[1] - data["ds"].iloc[0]
else:
self._freq = pd.Timedelta(freq)
expect_horizon_str = str(self._freq * expect_horizon)
self.search_space.update({"expect_horizon": expect_horizon_str,
"cross_validation": cross_validation})
train_data = data if cross_validation else data[:len(data)-expect_horizon]
validation_data = None if cross_validation else data[len(data)-expect_horizon:]
n_sampling = recalculate_n_sampling(self.search_space,
n_sampling) if n_sampling != -1 else -1
self.auto_est.fit(data=train_data,
validation_data=validation_data,
metric=self.metric,
metric_threshold=metric_threshold,
n_sampling=n_sampling,
search_space=self.search_space,
search_alg=search_alg,
search_alg_params=search_alg_params,
scheduler=scheduler,
scheduler_params=scheduler_params
)
# use the best config to fit a new prophet model on whole data
self.best_model = ProphetBuilder().build(self.auto_est.get_best_config())
self.best_model.model.fit(data)
def predict(self, horizon=1, freq="D", ds_data=None):
"""
Predict using the best model after HPO.
:param horizon: the number of steps forward to predict
:param freq: the freqency of the predicted dataframe, defaulted to day("D"),
the frequency can be anything from the pandas list of frequency strings here:
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases
:param ds_data: a dataframe that has 1 column 'ds' indicating date.
"""
if self.best_model.model is None:
raise RuntimeError(
"You must call fit or restore first before calling predict!")
return self.best_model.predict(horizon=horizon, freq=freq, ds_data=ds_data)
def evaluate(self, data, metrics=['mse']):
"""
Evaluate using the best model after HPO.
:param data: evaluation data, a pandas dataframe with Td rows,
and 2 columns, with column 'ds' indicating date and column 'y' indicating value
and Td is the time dimension
:param metrics: A list contains metrics for test/valid data.
"""
if data is None:
raise ValueError("Input invalid data of None")
if self.best_model.model is None:
raise RuntimeError(
"You must call fit or restore first before calling evaluate!")
return self.best_model.evaluate(target=data,
metrics=metrics)
def save(self, checkpoint_file):
"""
Save the best model after HPO.
:param checkpoint_file: The location you want to save the best model, should be a json file
"""
if self.best_model.model is None:
raise RuntimeError(
"You must call fit or restore first before calling save!")
self.best_model.save(checkpoint_file)
def restore(self, checkpoint_file):
"""
Restore the best model after HPO.
:param checkpoint_file: The checkpoint file location you want to load the best model.
"""
self.best_model.restore(checkpoint_file)
def get_best_model(self):
"""
Get the best Prophet model.
"""
return self.best_model.model
| [
1,
396,
718,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
450,
7997,
19558,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
1518,
29915,
13,
29937,
18475,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
18116,
13,
3166,
4802,
11671,
29889,
5904,
359,
29889,
4299,
29889,
771,
561,
300,
1053,
1019,
561,
300,
5627,
29892,
1019,
561,
300,
3195,
13,
3166,
4802,
11671,
29889,
5904,
359,
29889,
1300,
1862,
29889,
13239,
1053,
337,
15807,
403,
29918,
29876,
29918,
13445,
10335,
13,
13,
13,
29937,
448,
13,
13,
1990,
11133,
1184,
561,
300,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1735,
3149,
29918,
29886,
13479,
29918,
7052,
29922,
8516,
29892,
13,
462,
4259,
2877,
29918,
29886,
13479,
29918,
7052,
29922,
8516,
29892,
13,
462,
8753,
333,
1036,
29918,
29886,
13479,
29918,
7052,
29922,
8516,
29892,
13,
462,
4259,
2877,
29918,
8513,
29922,
8516,
29892,
13,
462,
1735,
3149,
29918,
3881,
29922,
8516,
29892,
13,
462,
12714,
2433,
29885,
344,
742,
13,
462,
10748,
29918,
3972,
13802,
7050,
29914,
6921,
29918,
771,
561,
300,
29918,
20756,
613,
13,
462,
274,
13364,
29918,
546,
29918,
3626,
284,
29922,
29896,
29892,
13,
462,
1024,
543,
6921,
29918,
771,
561,
300,
613,
13,
462,
7592,
29918,
3972,
29922,
8516,
29892,
13,
462,
2254,
29918,
3972,
29922,
8516,
29892,
13,
462,
3579,
771,
561,
300,
29918,
2917,
13,
462,
29871,
1125,
13,
4706,
9995,
13,
4706,
6204,
385,
3345,
630,
1019,
561,
300,
8125,
29889,
13,
4706,
4911,
817,
304,
6084,
2845,
278,
2684,
995,
470,
278,
2740,
2913,
310,
278,
13,
4706,
1019,
561,
300,
1904,
11266,
16744,
29889,
1152,
4902,
310,
278,
1019,
561,
300,
1904,
11266,
16744,
29892,
2737,
304,
13,
4706,
2045,
597,
15445,
29889,
3292,
29889,
601,
29914,
771,
561,
300,
29914,
2640,
29914,
6051,
20921,
29889,
1420,
29937,
24947,
15501,
29899,
29873,
27964,
29889,
13,
13,
4706,
584,
3207,
1735,
3149,
29918,
29886,
13479,
29918,
7052,
29901,
3159,
470,
298,
29886,
23460,
740,
515,
385,
6043,
2913,
13,
9651,
363,
11266,
15501,
1735,
3149,
29918,
29886,
13479,
29918,
7052,
363,
278,
1019,
561,
300,
1904,
29889,
13,
9651,
1152,
298,
29886,
23460,
29892,
1074,
4802,
11671,
29889,
5904,
359,
29889,
272,
1113,
29889,
17405,
29880,
29889,
28887,
363,
901,
4902,
29889,
13,
9651,
321,
29889,
29887,
29889,
298,
29886,
29889,
1188,
29590,
29898,
29900,
29889,
29900,
29900,
29896,
29892,
29871,
29900,
29889,
29945,
467,
13,
4706,
584,
3207,
4259,
2877,
29918,
29886,
13479,
29918,
7052,
29901,
11266,
15501,
4259,
2877,
29918,
29886,
13479,
29918,
7052,
363,
278,
13,
9651,
1019,
561,
300,
1904,
29889,
13,
9651,
321,
29889,
29887,
29889,
298,
29886,
29889,
1188,
29590,
29898,
29900,
29889,
29900,
29896,
29892,
29871,
29896,
29900,
467,
13,
4706,
584,
3207,
8753,
333,
1036,
29918,
29886,
13479,
29918,
7052,
29901,
11266,
15501,
8753,
333,
1036,
29918,
29886,
13479,
29918,
7052,
363,
278,
13,
9651,
1019,
561,
300,
1904,
29889,
13,
9651,
321,
29889,
29887,
29889,
298,
29886,
29889,
1188,
29590,
29898,
29900,
29889,
29900,
29896,
29892,
29871,
29896,
29900,
467,
13,
4706,
584,
3207,
4259,
2877,
29918,
8513,
29901,
11266,
15501,
4259,
2877,
29918,
8513,
363,
278,
13,
9651,
1019,
561,
300,
1904,
29889,
13,
9651,
321,
29889,
29887,
29889,
298,
29886,
29889,
16957,
18959,
1202,
3321,
742,
525,
18056,
506,
1230,
2033,
467,
13,
4706,
584,
3207,
1735,
3149,
29918,
3881,
29901,
11266,
15501,
1735,
3149,
29918,
3881,
363,
278,
13,
9651,
1019,
561,
300,
1904,
29889,
13,
9651,
321,
29889,
29887,
29889,
298,
29886,
29889,
29590,
29898,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29929,
29945,
467,
13,
4706,
584,
3207,
12714,
29901,
1714,
29889,
450,
17983,
12714,
1024,
304,
24656,
29889,
321,
29889,
29887,
29889,
376,
29885,
344,
29908,
13,
4706,
584,
3207,
10748,
29918,
3972,
29901,
9959,
3884,
304,
4078,
10748,
322,
2582,
29889,
739,
21274,
304,
13,
9651,
5591,
7050,
29914,
6921,
29918,
771,
561,
300,
29918,
20756,
29908,
13,
4706,
584,
3207,
274,
13364,
29918,
546,
29918,
3626,
284,
29901,
3159,
29889,
9681,
310,
274,
13364,
363,
1269,
14260,
29889,
739,
21274,
304,
29871,
29896,
29889,
13,
4706,
584,
3207,
1024,
29901,
1024,
310,
278,
11133,
1184,
561,
300,
29889,
739,
21274,
304,
376,
6921,
29918,
771,
561,
300,
29908,
13,
4706,
584,
3207,
7592,
29918,
3972,
29901,
1714,
29889,
5240,
866,
3884,
304,
16523,
6694,
2582,
322,
1423,
9748,
29889,
739,
13,
9651,
21274,
304,
6213,
322,
1838,
29915,
29873,
2125,
9545,
1550,
2734,
297,
1887,
29889,
5806,
2734,
297,
13,
9651,
9867,
29892,
372,
21274,
304,
376,
29882,
29069,
597,
29914,
7050,
19248,
978,
29913,
1642,
13,
4706,
584,
3207,
2254,
29918,
3972,
29901,
16012,
278,
274,
29895,
415,
515,
2254,
29918,
3972,
29889,
450,
995,
21274,
304,
6213,
29889,
13,
13,
4706,
584,
3207,
27953,
300,
29918,
2917,
29901,
5901,
1019,
561,
300,
11266,
16744,
29889,
13,
4706,
9995,
13,
4706,
565,
2254,
29918,
3972,
29901,
13,
9651,
1583,
29889,
13318,
29918,
4299,
353,
1019,
561,
300,
3195,
580,
13,
9651,
1583,
29889,
13318,
29918,
4299,
29889,
5060,
487,
29898,
1359,
29918,
3972,
29897,
13,
4706,
1018,
29901,
13,
9651,
515,
4802,
11671,
29889,
272,
1113,
29889,
17405,
29880,
29889,
6921,
29918,
342,
326,
1061,
1053,
11133,
12787,
326,
1061,
13,
9651,
1053,
4802,
11671,
29889,
272,
1113,
29889,
17405,
29880,
29889,
28887,
408,
298,
29886,
13,
9651,
1583,
29889,
4478,
29918,
3493,
353,
426,
13,
18884,
376,
3167,
3149,
29918,
29886,
13479,
29918,
7052,
1115,
298,
29886,
29889,
7720,
29918,
4478,
4197,
29900,
29889,
29900,
29900,
29945,
29892,
29871,
29900,
29889,
29900,
29945,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29945,
2314,
13,
18884,
565,
1735,
3149,
29918,
29886,
13479,
29918,
7052,
338,
6213,
13,
18884,
1683,
1735,
3149,
29918,
29886,
13479,
29918,
7052,
29892,
13,
18884,
376,
25682,
2877,
29918,
29886,
13479,
29918,
7052,
1115,
298,
29886,
29889,
7720,
29918,
4478,
4197,
29900,
29889,
29900,
29896,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
2314,
13,
18884,
565,
4259,
2877,
29918,
29886,
13479,
29918,
7052,
338,
6213,
13,
18884,
1683,
4259,
2877,
29918,
29886,
13479,
29918,
7052,
29892,
13,
18884,
376,
5391,
333,
1036,
29918,
29886,
13479,
29918,
7052,
1115,
298,
29886,
29889,
1188,
29590,
29898,
29900,
29889,
29900,
29896,
29892,
29871,
29896,
29900,
29897,
13,
18884,
565,
8753,
333,
1036,
29918,
29886,
13479,
29918,
7052,
338,
6213,
13,
18884,
1683,
8753,
333,
1036,
29918,
29886,
13479,
29918,
7052,
29892,
13,
18884,
376,
25682,
2877,
29918,
8513,
1115,
298,
29886,
29889,
16957,
18959,
1202,
3321,
742,
525,
18056,
506,
1230,
11287,
13,
18884,
565,
4259,
2877,
29918,
8513,
338,
6213,
13,
18884,
1683,
4259,
2877,
29918,
8513,
29892,
13,
18884,
376,
3167,
3149,
29918,
3881,
1115,
298,
29886,
29889,
29590,
29898,
29900,
29889,
29947,
29892,
29871,
29900,
29889,
29929,
29945,
29897,
13,
18884,
565,
1735,
3149,
29918,
3881,
338,
6213,
13,
18884,
1683,
1735,
3149,
29918,
3881,
13,
9651,
500,
13,
9651,
1583,
29889,
4478,
29918,
3493,
29889,
5504,
29898,
771,
561,
300,
29918,
2917,
29897,
29871,
396,
2767,
916,
2295,
29879,
13,
9651,
1583,
29889,
16414,
353,
12714,
13,
9651,
1904,
29918,
16409,
353,
1019,
561,
300,
5627,
580,
13,
9651,
1583,
29889,
6921,
29918,
342,
353,
11133,
12787,
326,
1061,
29898,
4299,
29918,
16409,
29922,
4299,
29918,
16409,
29892,
13,
462,
462,
3986,
10748,
29918,
3972,
29922,
20756,
29918,
3972,
29892,
13,
462,
462,
3986,
7788,
29918,
546,
29918,
3626,
284,
3790,
29908,
21970,
1115,
274,
13364,
29918,
546,
29918,
3626,
284,
1118,
13,
462,
462,
3986,
7592,
29918,
3972,
29922,
16674,
29918,
3972,
29892,
13,
462,
462,
3986,
1024,
29922,
978,
29897,
13,
4706,
5174,
16032,
2392,
29901,
13,
9651,
18116,
29889,
25442,
703,
3492,
817,
304,
2601,
421,
3752,
11671,
29899,
272,
1113,
29961,
17405,
29880,
7961,
304,
671,
421,
9202,
29952,
740,
23157,
13,
13,
1678,
822,
6216,
29898,
1311,
29892,
13,
9651,
848,
29892,
13,
9651,
4891,
29918,
18157,
29922,
5574,
29892,
13,
9651,
2149,
29918,
2015,
18162,
29922,
8516,
29892,
13,
9651,
3005,
29939,
29922,
8516,
29892,
13,
9651,
12714,
29918,
386,
12268,
29922,
8516,
29892,
13,
9651,
302,
29918,
13445,
10335,
29922,
29896,
29953,
29892,
13,
9651,
2740,
29918,
9564,
29922,
8516,
29892,
13,
9651,
2740,
29918,
9564,
29918,
7529,
29922,
8516,
29892,
13,
9651,
1364,
14952,
29922,
8516,
29892,
13,
9651,
1364,
14952,
29918,
7529,
29922,
8516,
29892,
13,
632,
1125,
13,
4706,
9995,
13,
4706,
15854,
19574,
6216,
278,
1904,
322,
2740,
363,
278,
1900,
11266,
16744,
29889,
13,
13,
4706,
584,
3207,
848,
29901,
6694,
848,
29892,
263,
11701,
12205,
411,
323,
29881,
4206,
29892,
13,
1669,
322,
29871,
29906,
4341,
29892,
411,
1897,
525,
6289,
29915,
23941,
2635,
322,
1897,
525,
29891,
29915,
23941,
995,
13,
1669,
322,
323,
29881,
338,
278,
931,
9927,
13,
4706,
584,
3207,
4891,
29918,
18157,
29901,
6120,
29892,
565,
278,
19745,
1121,
5304,
515,
4891,
29918,
18157,
29889,
13,
1669,
450,
995,
338,
731,
304,
5852,
491,
2322,
29889,
21605,
445,
2984,
304,
7700,
304,
13,
1669,
6210,
701,
278,
1889,
29889,
13,
4706,
584,
3207,
2149,
29918,
2015,
18162,
29901,
938,
29892,
8845,
848,
674,
367,
6336,
8536,
1573,
515,
6694,
13,
1669,
848,
29892,
322,
2149,
29918,
2015,
18162,
338,
278,
28205,
366,
1122,
817,
304,
671,
2748,
278,
4464,
338,
25890,
29889,
13,
1669,
450,
995,
21274,
304,
6213,
29892,
988,
29871,
29896,
29900,
29995,
310,
6694,
848,
674,
367,
4586,
13,
1669,
408,
278,
8845,
848,
29889,
13,
4706,
584,
3207,
3005,
29939,
29901,
278,
3005,
29939,
3819,
310,
278,
6694,
12205,
29889,
278,
10868,
508,
367,
3099,
515,
278,
13,
1669,
11701,
1051,
310,
10868,
6031,
1244,
29901,
13,
1669,
2045,
597,
15112,
29889,
2272,
1272,
29889,
990,
29914,
15112,
29899,
2640,
29914,
13844,
29914,
1792,
29918,
13075,
29914,
3706,
6358,
29889,
1420,
29937,
3706,
6358,
29899,
10289,
29899,
2606,
2129,
4592,
287,
13,
1669,
304,
6213,
29892,
988,
385,
443,
276,
492,
519,
10868,
674,
367,
10115,
27063,
29889,
13,
4706,
584,
3207,
12714,
29918,
386,
12268,
29901,
263,
14260,
674,
367,
29185,
746,
12714,
16897,
338,
1539,
13,
4706,
584,
3207,
302,
29918,
13445,
10335,
29901,
9681,
310,
3367,
1338,
304,
14707,
297,
3001,
29889,
13109,
29879,
304,
29871,
29896,
29953,
29889,
13,
1669,
960,
298,
29886,
29889,
7720,
29918,
4478,
338,
297,
2740,
29918,
3493,
29892,
278,
6856,
674,
367,
1065,
302,
29918,
13445,
10335,
310,
3367,
1338,
13,
1669,
322,
4513,
701,
302,
29918,
13445,
10335,
5034,
304,
298,
29886,
29889,
7720,
29918,
4478,
29889,
13,
1669,
960,
445,
338,
448,
29896,
29892,
313,
15389,
1474,
29897,
10362,
11916,
526,
5759,
13,
1669,
2745,
263,
25480,
4195,
338,
1539,
29889,
13,
4706,
584,
3207,
2740,
29918,
9564,
29901,
851,
29892,
599,
6969,
2740,
261,
4944,
491,
15570,
260,
1540,
13,
1669,
313,
29875,
29889,
29872,
1213,
19365,
29918,
27959,
613,
376,
8172,
613,
376,
1165,
613,
376,
20515,
265,
17652,
613,
376,
808,
3670,
613,
13,
1669,
376,
24947,
3670,
613,
376,
27495,
267,
3670,
613,
376,
833,
29882,
29890,
613,
376,
484,
369,
5105,
613,
376,
3670,
4347,
613,
376,
2502,
3670,
29908,
322,
13,
1669,
376,
18816,
3670,
1159,
13,
4706,
584,
3207,
2740,
29918,
9564,
29918,
7529,
29901,
4805,
4128,
363,
2740,
261,
5687,
18034,
2740,
29918,
3493,
29892,
13,
1669,
12714,
322,
2740,
261,
4464,
13,
4706,
584,
3207,
1364,
14952,
29901,
851,
29892,
599,
6969,
1364,
14952,
4944,
491,
15570,
260,
1540,
13,
4706,
584,
3207,
1364,
14952,
29918,
7529,
29901,
4128,
363,
1364,
14952,
13,
4706,
9995,
13,
4706,
565,
2149,
29918,
2015,
18162,
338,
6213,
29901,
13,
9651,
2149,
29918,
2015,
18162,
353,
938,
29898,
29900,
29889,
29896,
29930,
2435,
29898,
1272,
876,
13,
4706,
565,
3005,
29939,
338,
6213,
29901,
13,
9651,
4974,
7431,
29898,
1272,
29897,
6736,
29871,
29906,
29892,
376,
1576,
6694,
12205,
881,
3743,
901,
1135,
29871,
29906,
6475,
1213,
13,
9651,
4974,
10518,
29889,
2754,
29889,
8768,
29889,
275,
29918,
12673,
29953,
29946,
29918,
1384,
29918,
29881,
1853,
29898,
1272,
3366,
6289,
16862,
29881,
8768,
511,
320,
13,
18884,
376,
1576,
525,
6289,
29915,
784,
881,
367,
297,
12865,
29871,
29953,
29946,
1134,
29892,
470,
366,
817,
304,
731,
421,
29888,
7971,
29952,
297,
6216,
1213,
13,
9651,
1583,
3032,
29888,
7971,
353,
848,
3366,
6289,
16862,
309,
542,
29961,
29896,
29962,
448,
848,
3366,
6289,
16862,
309,
542,
29961,
29900,
29962,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
29888,
7971,
353,
10518,
29889,
13711,
287,
2554,
29898,
29888,
7971,
29897,
13,
4706,
2149,
29918,
2015,
18162,
29918,
710,
353,
851,
29898,
1311,
3032,
29888,
7971,
334,
2149,
29918,
2015,
18162,
29897,
13,
4706,
1583,
29889,
4478,
29918,
3493,
29889,
5504,
3319,
29908,
17854,
29918,
2015,
18162,
1115,
2149,
29918,
2015,
18162,
29918,
710,
29892,
13,
462,
462,
29871,
376,
19128,
29918,
18157,
1115,
4891,
29918,
18157,
1800,
13,
4706,
7945,
29918,
1272,
353,
848,
565,
4891,
29918,
18157,
1683,
848,
7503,
2435,
29898,
1272,
6817,
17854,
29918,
2015,
18162,
29962,
13,
4706,
8845,
29918,
1272,
353,
6213,
565,
4891,
29918,
18157,
1683,
848,
29961,
2435,
29898,
1272,
6817,
17854,
29918,
2015,
18162,
17531,
13,
4706,
302,
29918,
13445,
10335,
353,
337,
15807,
403,
29918,
29876,
29918,
13445,
10335,
29898,
1311,
29889,
4478,
29918,
3493,
29892,
13,
462,
462,
9651,
302,
29918,
13445,
10335,
29897,
565,
302,
29918,
13445,
10335,
2804,
448,
29896,
1683,
448,
29896,
13,
4706,
1583,
29889,
6921,
29918,
342,
29889,
9202,
29898,
1272,
29922,
14968,
29918,
1272,
29892,
13,
462,
3986,
8845,
29918,
1272,
29922,
18157,
29918,
1272,
29892,
13,
462,
3986,
12714,
29922,
1311,
29889,
16414,
29892,
13,
462,
3986,
12714,
29918,
386,
12268,
29922,
16414,
29918,
386,
12268,
29892,
13,
462,
3986,
302,
29918,
13445,
10335,
29922,
29876,
29918,
13445,
10335,
29892,
13,
462,
3986,
2740,
29918,
3493,
29922,
1311,
29889,
4478,
29918,
3493,
29892,
13,
462,
3986,
2740,
29918,
9564,
29922,
4478,
29918,
9564,
29892,
13,
462,
3986,
2740,
29918,
9564,
29918,
7529,
29922,
4478,
29918,
9564,
29918,
7529,
29892,
13,
462,
3986,
1364,
14952,
29922,
816,
14952,
29892,
13,
462,
3986,
1364,
14952,
29918,
7529,
29922,
816,
14952,
29918,
7529,
13,
462,
3986,
1723,
13,
4706,
396,
671,
278,
1900,
2295,
304,
6216,
263,
716,
27953,
300,
1904,
373,
3353,
848,
13,
4706,
1583,
29889,
13318,
29918,
4299,
353,
1019,
561,
300,
5627,
2141,
4282,
29898,
1311,
29889,
6921,
29918,
342,
29889,
657,
29918,
13318,
29918,
2917,
3101,
13,
4706,
1583,
29889,
13318,
29918,
4299,
29889,
4299,
29889,
9202,
29898,
1272,
29897,
13,
13,
1678,
822,
8500,
29898,
1311,
29892,
28205,
29922,
29896,
29892,
3005,
29939,
543,
29928,
613,
18031,
29918,
1272,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
21099,
919,
773,
278,
1900,
1904,
1156,
379,
13152,
29889,
13,
13,
4706,
584,
3207,
28205,
29901,
278,
1353,
310,
6576,
6375,
304,
8500,
13,
4706,
584,
3207,
3005,
29939,
29901,
278,
3005,
29939,
3819,
310,
278,
25383,
12205,
29892,
2322,
287,
304,
2462,
703,
29928,
4968,
13,
1669,
278,
10868,
508,
367,
3099,
515,
278,
11701,
1051,
310,
10868,
6031,
1244,
29901,
13,
1669,
2045,
597,
15112,
29889,
2272,
1272,
29889,
990,
29914,
15112,
29899,
2640,
29914,
13844,
29914,
1792,
29918,
13075,
29914,
3706,
6358,
29889,
1420,
29937,
3706,
6358,
29899,
10289,
29899,
2606,
2129,
13,
4706,
584,
3207,
18031,
29918,
1272,
29901,
263,
12205,
393,
756,
29871,
29896,
1897,
525,
6289,
29915,
23941,
2635,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
13318,
29918,
4299,
29889,
4299,
338,
6213,
29901,
13,
9651,
12020,
24875,
2392,
29898,
13,
18884,
376,
3492,
1818,
1246,
6216,
470,
17749,
937,
1434,
5432,
8500,
29991,
1159,
13,
4706,
736,
1583,
29889,
13318,
29918,
4299,
29889,
27711,
29898,
2015,
18162,
29922,
2015,
18162,
29892,
3005,
29939,
29922,
29888,
7971,
29892,
18031,
29918,
1272,
29922,
6289,
29918,
1272,
29897,
13,
13,
1678,
822,
14707,
29898,
1311,
29892,
848,
29892,
21556,
29922,
1839,
29885,
344,
2033,
1125,
13,
4706,
9995,
13,
4706,
382,
4387,
403,
773,
278,
1900,
1904,
1156,
379,
13152,
29889,
13,
13,
4706,
584,
3207,
848,
29901,
17983,
848,
29892,
263,
11701,
12205,
411,
323,
29881,
4206,
29892,
13,
9651,
322,
29871,
29906,
4341,
29892,
411,
1897,
525,
6289,
29915,
23941,
2635,
322,
1897,
525,
29891,
29915,
23941,
995,
13,
9651,
322,
323,
29881,
338,
278,
931,
9927,
13,
4706,
584,
3207,
21556,
29901,
319,
1051,
3743,
21556,
363,
1243,
29914,
3084,
848,
29889,
13,
4706,
9995,
13,
4706,
565,
848,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
703,
4290,
8340,
848,
310,
6213,
1159,
13,
4706,
565,
1583,
29889,
13318,
29918,
4299,
29889,
4299,
338,
6213,
29901,
13,
9651,
12020,
24875,
2392,
29898,
13,
18884,
376,
3492,
1818,
1246,
6216,
470,
17749,
937,
1434,
5432,
14707,
29991,
1159,
13,
4706,
736,
1583,
29889,
13318,
29918,
4299,
29889,
24219,
403,
29898,
5182,
29922,
1272,
29892,
13,
462,
462,
4706,
21556,
29922,
2527,
10817,
29897,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
1423,
3149,
29918,
1445,
1125,
13,
4706,
9995,
13,
4706,
16913,
278,
1900,
1904,
1156,
379,
13152,
29889,
13,
13,
4706,
584,
3207,
1423,
3149,
29918,
1445,
29901,
450,
4423,
366,
864,
304,
4078,
278,
1900,
1904,
29892,
881,
367,
263,
4390,
934,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
13318,
29918,
4299,
29889,
4299,
338,
6213,
29901,
13,
9651,
12020,
24875,
2392,
29898,
13,
18884,
376,
3492,
1818,
1246,
6216,
470,
17749,
937,
1434,
5432,
4078,
29991,
1159,
13,
4706,
1583,
29889,
13318,
29918,
4299,
29889,
7620,
29898,
3198,
3149,
29918,
1445,
29897,
13,
13,
1678,
822,
17749,
29898,
1311,
29892,
1423,
3149,
29918,
1445,
1125,
13,
4706,
9995,
13,
4706,
11654,
487,
278,
1900,
1904,
1156,
379,
13152,
29889,
13,
13,
4706,
584,
3207,
1423,
3149,
29918,
1445,
29901,
450,
1423,
3149,
934,
4423,
366,
864,
304,
2254,
278,
1900,
1904,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
13318,
29918,
4299,
29889,
5060,
487,
29898,
3198,
3149,
29918,
1445,
29897,
13,
13,
1678,
822,
679,
29918,
13318,
29918,
4299,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
3617,
278,
1900,
1019,
561,
300,
1904,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
13318,
29918,
4299,
29889,
4299,
13,
2
] |
rollout.py | knowledgetechnologyuhh/hipss | 0 | 170567 | import numpy as np
class RolloutWorker:
def __init__(self, env, policy, cfg, env_params, language_conditioned=False):
self.env = env
self.policy = policy
self.cfg = cfg
self.env_params = env_params
self.language_conditioned = language_conditioned
self.timestep_counter = 0
def generate_rollout(self, train_mode=False, animated=False):
episodes = []
for _ in range(self.cfg.num_rollouts_per_mpi):
ep_obs, ep_actions, ep_success, ep_rewards = [], [], [], []
observation = self.env.reset()
obs = observation['observation']
if self.language_conditioned:
instruction = observation['instruction']
ep_instructions, ep_hinsight_instruction = [], []
else:
ag = observation['achieved_goal']
g = observation['desired_goal']
ep_ag, ep_g = [], []
for _ in range(self.env_params['max_timesteps']):
if self.language_conditioned:
action = self.policy.act(obs.copy(), instruction.copy(), train_mode)
else:
action = self.policy.act(obs.copy(), ag.copy(), g.copy(), train_mode)
if animated:
self.env.render()
observation_new, reward, _, info = self.env.step(action)
self.timestep_counter += 1
obs_new = observation_new['observation']
if self.language_conditioned:
instruction_new = observation_new['instruction']
hindsight_instr = info['hindsight_instruction'] if 'hindsight_instruction' in info.keys(
) else np.zeros_like(instruction_new)
else:
ag_new = observation_new['achieved_goal']
ep_obs.append(obs.copy())
ep_actions.append(action.copy())
ep_rewards.append([reward])
if self.language_conditioned:
ep_instructions.append(instruction.copy())
ep_hinsight_instruction.append(hindsight_instr.copy())
else:
ep_ag.append(ag.copy())
ep_g.append(g.copy())
obs = obs_new
if self.language_conditioned:
instruction = instruction_new
else:
ag = ag_new
ep_success.append(info['is_success'])
ep_obs.append(obs.copy())
if not self.language_conditioned:
ep_ag.append(ag.copy())
episode_data = dict(obs=np.array(ep_obs).copy(),
action=np.array(ep_actions).copy(),
reward=np.array(ep_rewards).copy(),
success=np.array(ep_success).copy(),
timesteps=self.timestep_counter)
if self.language_conditioned:
episode_data['instruction'] = np.array(ep_instructions).copy()
episode_data['hindsight_instruction'] = np.array(ep_hinsight_instruction).copy()
else:
episode_data['g'] = np.array(ep_g).copy()
episode_data['ag'] = np.array(ep_ag).copy()
episodes.append(episode_data)
return episodes
def generate_test_rollout(self, animated=False):
rollout_data = []
for _ in range(self.cfg.n_test_rollouts):
rollout = self.generate_rollout(train_mode=False, animated=animated)
rollout_data.append(rollout)
# only take the last step to calculate success rate
success_rate = np.mean([_rd['success'][-1] for rd in rollout_data for _rd in rd])
rewards = np.sum([_rd['reward'] for rd in rollout_data for _rd in rd], 1).mean()
return success_rate, rewards
| [
1,
1053,
12655,
408,
7442,
13,
13,
13,
1990,
21809,
449,
16164,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8829,
29892,
8898,
29892,
274,
16434,
29892,
8829,
29918,
7529,
29892,
4086,
29918,
16122,
287,
29922,
8824,
1125,
13,
13,
4706,
1583,
29889,
6272,
353,
8829,
13,
4706,
1583,
29889,
22197,
353,
8898,
13,
4706,
1583,
29889,
16859,
353,
274,
16434,
13,
4706,
1583,
29889,
6272,
29918,
7529,
353,
8829,
29918,
7529,
13,
4706,
1583,
29889,
11675,
29918,
16122,
287,
353,
4086,
29918,
16122,
287,
13,
4706,
1583,
29889,
9346,
342,
1022,
29918,
11808,
353,
29871,
29900,
13,
13,
1678,
822,
5706,
29918,
1245,
449,
29898,
1311,
29892,
7945,
29918,
8513,
29922,
8824,
29892,
17524,
29922,
8824,
1125,
13,
13,
4706,
23238,
353,
5159,
13,
4706,
363,
903,
297,
3464,
29898,
1311,
29889,
16859,
29889,
1949,
29918,
1245,
17718,
29918,
546,
29918,
1526,
29875,
1125,
13,
9651,
9358,
29918,
26290,
29892,
9358,
29918,
7387,
29892,
9358,
29918,
8698,
29892,
9358,
29918,
276,
2935,
353,
19997,
19997,
19997,
5159,
13,
9651,
15500,
353,
1583,
29889,
6272,
29889,
12071,
580,
13,
9651,
20881,
353,
15500,
1839,
26739,
362,
2033,
13,
13,
9651,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
18884,
15278,
353,
15500,
1839,
2611,
4080,
2033,
13,
18884,
9358,
29918,
2611,
582,
1953,
29892,
9358,
29918,
29882,
1144,
523,
29918,
2611,
4080,
353,
19997,
5159,
13,
9651,
1683,
29901,
13,
18884,
946,
353,
15500,
1839,
496,
6402,
29918,
28111,
2033,
13,
18884,
330,
353,
15500,
1839,
2783,
2859,
29918,
28111,
2033,
13,
18884,
9358,
29918,
351,
29892,
9358,
29918,
29887,
353,
19997,
5159,
13,
13,
9651,
363,
903,
297,
3464,
29898,
1311,
29889,
6272,
29918,
7529,
1839,
3317,
29918,
9346,
4196,
567,
2033,
1125,
13,
18884,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
462,
1678,
3158,
353,
1583,
29889,
22197,
29889,
627,
29898,
26290,
29889,
8552,
3285,
15278,
29889,
8552,
3285,
7945,
29918,
8513,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
3158,
353,
1583,
29889,
22197,
29889,
627,
29898,
26290,
29889,
8552,
3285,
946,
29889,
8552,
3285,
330,
29889,
8552,
3285,
7945,
29918,
8513,
29897,
13,
18884,
565,
17524,
29901,
13,
462,
1678,
1583,
29889,
6272,
29889,
9482,
580,
13,
13,
18884,
15500,
29918,
1482,
29892,
20751,
29892,
17117,
5235,
353,
1583,
29889,
6272,
29889,
10568,
29898,
2467,
29897,
13,
18884,
1583,
29889,
9346,
342,
1022,
29918,
11808,
4619,
29871,
29896,
13,
13,
18884,
20881,
29918,
1482,
353,
15500,
29918,
1482,
1839,
26739,
362,
2033,
13,
13,
18884,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
462,
1678,
15278,
29918,
1482,
353,
15500,
29918,
1482,
1839,
2611,
4080,
2033,
13,
462,
1678,
298,
12772,
523,
29918,
262,
710,
353,
5235,
1839,
29882,
12772,
523,
29918,
2611,
4080,
2033,
565,
525,
29882,
12772,
523,
29918,
2611,
4080,
29915,
297,
5235,
29889,
8149,
29898,
13,
462,
1678,
1723,
1683,
7442,
29889,
3298,
359,
29918,
4561,
29898,
2611,
4080,
29918,
1482,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
946,
29918,
1482,
353,
15500,
29918,
1482,
1839,
496,
6402,
29918,
28111,
2033,
13,
13,
18884,
9358,
29918,
26290,
29889,
4397,
29898,
26290,
29889,
8552,
3101,
13,
18884,
9358,
29918,
7387,
29889,
4397,
29898,
2467,
29889,
8552,
3101,
13,
18884,
9358,
29918,
276,
2935,
29889,
4397,
4197,
276,
1328,
2314,
13,
18884,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
462,
1678,
9358,
29918,
2611,
582,
1953,
29889,
4397,
29898,
2611,
4080,
29889,
8552,
3101,
13,
462,
1678,
9358,
29918,
29882,
1144,
523,
29918,
2611,
4080,
29889,
4397,
29898,
29882,
12772,
523,
29918,
262,
710,
29889,
8552,
3101,
13,
18884,
1683,
29901,
13,
462,
1678,
9358,
29918,
351,
29889,
4397,
29898,
351,
29889,
8552,
3101,
13,
462,
1678,
9358,
29918,
29887,
29889,
4397,
29898,
29887,
29889,
8552,
3101,
13,
13,
18884,
20881,
353,
20881,
29918,
1482,
13,
18884,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
462,
1678,
15278,
353,
15278,
29918,
1482,
13,
18884,
1683,
29901,
13,
462,
1678,
946,
353,
946,
29918,
1482,
13,
18884,
9358,
29918,
8698,
29889,
4397,
29898,
3888,
1839,
275,
29918,
8698,
11287,
13,
13,
9651,
9358,
29918,
26290,
29889,
4397,
29898,
26290,
29889,
8552,
3101,
13,
9651,
565,
451,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
18884,
9358,
29918,
351,
29889,
4397,
29898,
351,
29889,
8552,
3101,
13,
13,
9651,
12720,
29918,
1272,
353,
9657,
29898,
26290,
29922,
9302,
29889,
2378,
29898,
1022,
29918,
26290,
467,
8552,
3285,
13,
462,
18884,
3158,
29922,
9302,
29889,
2378,
29898,
1022,
29918,
7387,
467,
8552,
3285,
13,
462,
18884,
20751,
29922,
9302,
29889,
2378,
29898,
1022,
29918,
276,
2935,
467,
8552,
3285,
13,
462,
18884,
2551,
29922,
9302,
29889,
2378,
29898,
1022,
29918,
8698,
467,
8552,
3285,
13,
462,
18884,
5335,
4196,
567,
29922,
1311,
29889,
9346,
342,
1022,
29918,
11808,
29897,
13,
13,
9651,
565,
1583,
29889,
11675,
29918,
16122,
287,
29901,
13,
18884,
12720,
29918,
1272,
1839,
2611,
4080,
2033,
353,
7442,
29889,
2378,
29898,
1022,
29918,
2611,
582,
1953,
467,
8552,
580,
13,
18884,
12720,
29918,
1272,
1839,
29882,
12772,
523,
29918,
2611,
4080,
2033,
353,
7442,
29889,
2378,
29898,
1022,
29918,
29882,
1144,
523,
29918,
2611,
4080,
467,
8552,
580,
13,
9651,
1683,
29901,
13,
18884,
12720,
29918,
1272,
1839,
29887,
2033,
353,
7442,
29889,
2378,
29898,
1022,
29918,
29887,
467,
8552,
580,
13,
18884,
12720,
29918,
1272,
1839,
351,
2033,
353,
7442,
29889,
2378,
29898,
1022,
29918,
351,
467,
8552,
580,
13,
13,
9651,
23238,
29889,
4397,
29898,
1022,
275,
356,
29918,
1272,
29897,
13,
13,
4706,
736,
23238,
13,
13,
1678,
822,
5706,
29918,
1688,
29918,
1245,
449,
29898,
1311,
29892,
17524,
29922,
8824,
1125,
13,
4706,
9679,
449,
29918,
1272,
353,
5159,
13,
4706,
363,
903,
297,
3464,
29898,
1311,
29889,
16859,
29889,
29876,
29918,
1688,
29918,
1245,
17718,
1125,
13,
9651,
9679,
449,
353,
1583,
29889,
17158,
29918,
1245,
449,
29898,
14968,
29918,
8513,
29922,
8824,
29892,
17524,
29922,
11576,
630,
29897,
13,
9651,
9679,
449,
29918,
1272,
29889,
4397,
29898,
1245,
449,
29897,
13,
4706,
396,
871,
2125,
278,
1833,
4331,
304,
8147,
2551,
6554,
13,
4706,
2551,
29918,
10492,
353,
7442,
29889,
12676,
4197,
29918,
5499,
1839,
8698,
2033,
14352,
29896,
29962,
363,
364,
29881,
297,
9679,
449,
29918,
1272,
363,
903,
5499,
297,
364,
29881,
2314,
13,
4706,
337,
2935,
353,
7442,
29889,
2083,
4197,
29918,
5499,
1839,
276,
1328,
2033,
363,
364,
29881,
297,
9679,
449,
29918,
1272,
363,
903,
5499,
297,
364,
29881,
1402,
29871,
29896,
467,
12676,
580,
13,
4706,
736,
2551,
29918,
10492,
29892,
337,
2935,
13,
2
] |
python/taichi/dynamics/__init__.py | gonnavis/taichi | 2 | 119397 | from .mpm import MPM
from .simulation import Simulation
__all__ = ['MPM']
| [
1,
515,
869,
1526,
29885,
1053,
341,
13427,
13,
3166,
869,
3601,
2785,
1053,
3439,
2785,
13,
13,
1649,
497,
1649,
353,
6024,
3580,
29924,
2033,
13,
2
] |
main/SimulationSettings/FluctuationAmplitudePython/Simulation/FluctuationAmplitude.py | JulianoGianlupi/nh-cc3d-4x-base-tool | 0 | 53081 | <gh_stars>0
from cc3d import CompuCellSetup
from .FluctuationAmplitudeSteppables import FluctuationAmplitude
CompuCellSetup.register_steppable(steppable=FluctuationAmplitude(frequency=100))
CompuCellSetup.run()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
21759,
29941,
29881,
1053,
422,
3746,
4617,
26947,
13,
3166,
869,
8754,
5313,
29884,
362,
6833,
2830,
1151,
7789,
407,
1849,
1053,
2379,
5313,
29884,
362,
6833,
2830,
1151,
13,
13,
1523,
3746,
4617,
26947,
29889,
9573,
29918,
1655,
407,
519,
29898,
1655,
407,
519,
29922,
8754,
5313,
29884,
362,
6833,
2830,
1151,
29898,
10745,
23860,
29922,
29896,
29900,
29900,
876,
13,
13,
1523,
3746,
4617,
26947,
29889,
3389,
580,
13,
13,
2
] |
aws_topology/tests/test_autoscaling.py | Mathieu-Dirkx/stackstate-agent-integrations | 2 | 1600031 | <gh_stars>1-10
from stackstate_checks.base.stubs import topology as top
from .conftest import BaseApiTest, set_cloudtrail_event
class TestAutoScaling(BaseApiTest):
def get_api(self):
return "autoscaling"
def get_account_id(self):
return "731070500579"
def get_region(self):
return "eu-west-1"
def test_process_autoscaling(self):
self.check.run()
topology = [top.get_snapshot(self.check.check_id)]
self.assertEqual(len(topology), 1)
self.assert_executed_ok()
# TODO this needs to be fixed in go, delete_ids need to be passed
topology[0]["delete_ids"] = self.check.delete_ids
components = topology[0]["components"]
relations = topology[0]["relations"]
group_arn = (
"arn:aws:autoscaling:eu-west-1:731070500579:"
+ "autoScalingGroup:e1155c2b-016a-40ad-8cba-2423c349574b:"
+ "autoScalingGroupName/awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM"
)
comp = top.assert_component(
components,
"awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM",
"aws.autoscaling.group",
checks={
"AutoScalingGroupARN": group_arn,
"Name": "awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM",
"URN": [group_arn]
},
)
self.assert_location_info(comp)
top.assert_relation(
relations,
"arn:aws:elasticloadbalancing:eu-west-1:731070500579:loadbalancer/awseb-e-g-AWSEBLoa-1WTFTHM4EDGUX",
group_arn,
"uses-service",
)
top.assert_relation(relations, group_arn, "i-063c119ff97e71b82", "uses-service")
top.assert_relation(relations, group_arn, "i-0928b13f776ba8e76", "uses-service")
top.assert_relation(relations, group_arn, "i-0ed02eb3eab5399fb", "uses-service")
self.assertEqual(len(topology[0]["delete_ids"]), 3)
top.assert_all_checked(components, relations)
@set_cloudtrail_event("create_autoscaling_group")
def test_process_autoscaling_create_autoscaling_group(self):
self.check.run()
topology = [top.get_snapshot(self.check.check_id)]
self.assertEqual(len(topology), 1)
self.assert_updated_ok()
self.assertEqual(len(topology[0]["components"]), 1)
self.assertEqual(
"awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM",
topology[0]["components"][0]["data"]["AutoScalingGroupName"],
)
@set_cloudtrail_event("delete_autoscaling_group")
def test_process_autoscaling_delete_autoscaling_group(self):
self.check.run()
topology = [top.get_snapshot(self.check.check_id)]
self.assertEqual(len(topology), 1)
self.assert_updated_ok()
self.assertEqual(len(topology[0]["components"]), 0)
self.assertIn(
"elvin-stackstate-tests-main-account-main-region-EcsAutoScalingGroup-VVC5WIJ3AI3K", self.check.delete_ids
)
@set_cloudtrail_event("create_or_update_tags")
def test_process_autoscaling_create_or_update_tags(self):
self.check.run()
topology = [top.get_snapshot(self.check.check_id)]
self.assertEqual(len(topology), 1)
self.assert_updated_ok()
self.assertEqual(len(topology[0]["components"]), 1)
self.assertEqual(
"awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM",
topology[0]["components"][0]["data"]["AutoScalingGroupName"],
)
@set_cloudtrail_event("update_autoscaling_group")
def test_process_autoscaling_update_autoscaling_group(self):
self.check.run()
topology = [top.get_snapshot(self.check.check_id)]
self.assertEqual(len(topology), 1)
self.assert_updated_ok()
self.assertEqual(len(topology[0]["components"]), 1)
self.assertEqual(
"awseb-e-gwhbyckyjq-stack-AWSEBAutoScalingGroup-35ZMDUKHPCUM",
topology[0]["components"][0]["data"]["AutoScalingGroupName"],
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
5096,
3859,
29918,
3198,
29879,
29889,
3188,
29889,
303,
23954,
1053,
20159,
408,
2246,
13,
3166,
869,
535,
615,
342,
1053,
7399,
11713,
3057,
29892,
731,
29918,
9274,
3018,
309,
29918,
3696,
13,
13,
13,
1990,
4321,
12300,
29636,
292,
29898,
5160,
11713,
3057,
1125,
13,
1678,
822,
679,
29918,
2754,
29898,
1311,
1125,
13,
4706,
736,
376,
1300,
359,
1052,
292,
29908,
13,
13,
1678,
822,
679,
29918,
10149,
29918,
333,
29898,
1311,
1125,
13,
4706,
736,
376,
29955,
29941,
29896,
29900,
29955,
29900,
29945,
29900,
29900,
29945,
29955,
29929,
29908,
13,
13,
1678,
822,
679,
29918,
12803,
29898,
1311,
1125,
13,
4706,
736,
376,
12932,
29899,
5933,
29899,
29896,
29908,
13,
13,
1678,
822,
1243,
29918,
5014,
29918,
1300,
359,
1052,
292,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3198,
29889,
3389,
580,
13,
4706,
20159,
353,
518,
3332,
29889,
657,
29918,
29879,
14551,
29898,
1311,
29889,
3198,
29889,
3198,
29918,
333,
4638,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29918,
4258,
3860,
29918,
554,
580,
13,
13,
4706,
396,
14402,
445,
4225,
304,
367,
4343,
297,
748,
29892,
5217,
29918,
4841,
817,
304,
367,
4502,
13,
4706,
20159,
29961,
29900,
29962,
3366,
8143,
29918,
4841,
3108,
353,
1583,
29889,
3198,
29889,
8143,
29918,
4841,
13,
13,
4706,
7117,
353,
20159,
29961,
29900,
29962,
3366,
14036,
3108,
13,
4706,
5302,
353,
20159,
29961,
29900,
29962,
3366,
2674,
800,
3108,
13,
13,
4706,
2318,
29918,
2753,
353,
313,
13,
9651,
376,
2753,
29901,
10467,
29901,
1300,
359,
1052,
292,
29901,
12932,
29899,
5933,
29899,
29896,
29901,
29955,
29941,
29896,
29900,
29955,
29900,
29945,
29900,
29900,
29945,
29955,
29929,
6160,
13,
9651,
718,
376,
6921,
29636,
292,
4782,
29901,
29872,
29896,
29896,
29945,
29945,
29883,
29906,
29890,
29899,
29900,
29896,
29953,
29874,
29899,
29946,
29900,
328,
29899,
29947,
29883,
2291,
29899,
29906,
29946,
29906,
29941,
29883,
29941,
29946,
29929,
29945,
29955,
29946,
29890,
6160,
13,
9651,
718,
376,
6921,
29636,
292,
4782,
1170,
29914,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
29908,
13,
4706,
1723,
13,
13,
4706,
752,
353,
2246,
29889,
9294,
29918,
9700,
29898,
13,
9651,
7117,
29892,
13,
9651,
376,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
613,
13,
9651,
376,
10467,
29889,
1300,
359,
1052,
292,
29889,
2972,
613,
13,
9651,
12747,
3790,
13,
18884,
376,
12300,
29636,
292,
4782,
15249,
1115,
2318,
29918,
2753,
29892,
13,
18884,
376,
1170,
1115,
376,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
613,
13,
18884,
376,
24015,
1115,
518,
2972,
29918,
2753,
29962,
13,
9651,
2981,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
29918,
5479,
29918,
3888,
29898,
2388,
29897,
13,
13,
4706,
2246,
29889,
9294,
29918,
23445,
29898,
13,
9651,
5302,
29892,
13,
9651,
376,
2753,
29901,
10467,
29901,
295,
6288,
1359,
5521,
19985,
29901,
12932,
29899,
5933,
29899,
29896,
29901,
29955,
29941,
29896,
29900,
29955,
29900,
29945,
29900,
29900,
29945,
29955,
29929,
29901,
1359,
5521,
25856,
29914,
1450,
344,
29890,
29899,
29872,
29899,
29887,
29899,
29376,
1660,
29933,
3410,
29874,
29899,
29896,
29956,
8969,
4690,
29924,
29946,
3352,
29954,
29965,
29990,
613,
13,
9651,
2318,
29918,
2753,
29892,
13,
9651,
376,
6394,
29899,
5509,
613,
13,
4706,
1723,
13,
4706,
2246,
29889,
9294,
29918,
23445,
29898,
2674,
800,
29892,
2318,
29918,
2753,
29892,
376,
29875,
29899,
29900,
29953,
29941,
29883,
29896,
29896,
29929,
600,
29929,
29955,
29872,
29955,
29896,
29890,
29947,
29906,
613,
376,
6394,
29899,
5509,
1159,
13,
4706,
2246,
29889,
9294,
29918,
23445,
29898,
2674,
800,
29892,
2318,
29918,
2753,
29892,
376,
29875,
29899,
29900,
29929,
29906,
29947,
29890,
29896,
29941,
29888,
29955,
29955,
29953,
2291,
29947,
29872,
29955,
29953,
613,
376,
6394,
29899,
5509,
1159,
13,
4706,
2246,
29889,
9294,
29918,
23445,
29898,
2674,
800,
29892,
2318,
29918,
2753,
29892,
376,
29875,
29899,
29900,
287,
29900,
29906,
774,
29941,
29872,
370,
29945,
29941,
29929,
29929,
14943,
613,
376,
6394,
29899,
5509,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
29961,
29900,
29962,
3366,
8143,
29918,
4841,
3108,
511,
29871,
29941,
29897,
13,
13,
4706,
2246,
29889,
9294,
29918,
497,
29918,
11238,
29898,
14036,
29892,
5302,
29897,
13,
13,
1678,
732,
842,
29918,
9274,
3018,
309,
29918,
3696,
703,
3258,
29918,
1300,
359,
1052,
292,
29918,
2972,
1159,
13,
1678,
822,
1243,
29918,
5014,
29918,
1300,
359,
1052,
292,
29918,
3258,
29918,
1300,
359,
1052,
292,
29918,
2972,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3198,
29889,
3389,
580,
13,
4706,
20159,
353,
518,
3332,
29889,
657,
29918,
29879,
14551,
29898,
1311,
29889,
3198,
29889,
3198,
29918,
333,
4638,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29918,
21402,
29918,
554,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
29961,
29900,
29962,
3366,
14036,
3108,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
376,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
613,
13,
9651,
20159,
29961,
29900,
29962,
3366,
14036,
3108,
29961,
29900,
29962,
3366,
1272,
3108,
3366,
12300,
29636,
292,
4782,
1170,
12436,
13,
4706,
1723,
13,
13,
1678,
732,
842,
29918,
9274,
3018,
309,
29918,
3696,
703,
8143,
29918,
1300,
359,
1052,
292,
29918,
2972,
1159,
13,
1678,
822,
1243,
29918,
5014,
29918,
1300,
359,
1052,
292,
29918,
8143,
29918,
1300,
359,
1052,
292,
29918,
2972,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3198,
29889,
3389,
580,
13,
4706,
20159,
353,
518,
3332,
29889,
657,
29918,
29879,
14551,
29898,
1311,
29889,
3198,
29889,
3198,
29918,
333,
4638,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29918,
21402,
29918,
554,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
29961,
29900,
29962,
3366,
14036,
3108,
511,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
13,
9651,
376,
295,
3845,
29899,
1429,
3859,
29899,
21150,
29899,
3396,
29899,
10149,
29899,
3396,
29899,
12803,
29899,
29923,
2395,
12300,
29636,
292,
4782,
29899,
29963,
8257,
29945,
22119,
29967,
29941,
23869,
29941,
29968,
613,
1583,
29889,
3198,
29889,
8143,
29918,
4841,
13,
4706,
1723,
13,
13,
1678,
732,
842,
29918,
9274,
3018,
309,
29918,
3696,
703,
3258,
29918,
272,
29918,
5504,
29918,
11338,
1159,
13,
1678,
822,
1243,
29918,
5014,
29918,
1300,
359,
1052,
292,
29918,
3258,
29918,
272,
29918,
5504,
29918,
11338,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3198,
29889,
3389,
580,
13,
4706,
20159,
353,
518,
3332,
29889,
657,
29918,
29879,
14551,
29898,
1311,
29889,
3198,
29889,
3198,
29918,
333,
4638,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29918,
21402,
29918,
554,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
29961,
29900,
29962,
3366,
14036,
3108,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
376,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
613,
13,
9651,
20159,
29961,
29900,
29962,
3366,
14036,
3108,
29961,
29900,
29962,
3366,
1272,
3108,
3366,
12300,
29636,
292,
4782,
1170,
12436,
13,
4706,
1723,
13,
13,
1678,
732,
842,
29918,
9274,
3018,
309,
29918,
3696,
703,
5504,
29918,
1300,
359,
1052,
292,
29918,
2972,
1159,
13,
1678,
822,
1243,
29918,
5014,
29918,
1300,
359,
1052,
292,
29918,
5504,
29918,
1300,
359,
1052,
292,
29918,
2972,
29898,
1311,
1125,
13,
4706,
1583,
29889,
3198,
29889,
3389,
580,
13,
4706,
20159,
353,
518,
3332,
29889,
657,
29918,
29879,
14551,
29898,
1311,
29889,
3198,
29889,
3198,
29918,
333,
4638,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
29918,
21402,
29918,
554,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
3332,
3002,
29961,
29900,
29962,
3366,
14036,
3108,
511,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
376,
1450,
344,
29890,
29899,
29872,
29899,
29887,
1332,
1609,
384,
17472,
29939,
29899,
1429,
29899,
29376,
1660,
5688,
3066,
29636,
292,
4782,
29899,
29941,
29945,
29999,
5773,
19960,
3954,
29907,
5005,
613,
13,
9651,
20159,
29961,
29900,
29962,
3366,
14036,
3108,
29961,
29900,
29962,
3366,
1272,
3108,
3366,
12300,
29636,
292,
4782,
1170,
12436,
13,
4706,
1723,
13,
2
] |
quantumGAN/qgan.py | tomiock/qGAN | 1 | 1602312 | <filename>quantumGAN/qgan.py
import glob
import os
import json
import random
from datetime import datetime
from typing import List
import imageio
import matplotlib.pyplot as plt
import numpy as np
from quantumGAN.discriminator import ClassicalDiscriminator
from quantumGAN.functions import fechet_distance, minimax, images_to_distribution, images_to_scatter
from quantumGAN.quantum_generator import QuantumGenerator
class Quantum_GAN:
def __init__(self,
generator: QuantumGenerator,
discriminator: ClassicalDiscriminator
):
self.last_batch = None
now = datetime.now()
init_time = now.strftime("%d_%m_%Y__%H_%M_%S")
self.path = "data/run{}".format(init_time)
self.path_images = self.path + "/images"
self.filename = "run.txt"
if not os.path.exists(self.path):
os.makedirs(self.path)
if not os.path.exists(self.path_images):
os.makedirs(self.path_images)
with open(os.path.join(self.path, self.filename), "w") as file:
file.write("RUN {} \n".format(init_time))
file.close()
self.generator = generator
self.discriminator = discriminator
self.loss_series, self.label_real_series, self.label_fake_series, self.FD_score = [], [], [], []
self.generator.init_parameters()
self.example_g_circuit = self.generator.construct_circuit(latent_space_noise=None,
to_measure=False)
self.generator.set_discriminator(self.discriminator)
def __repr__(self):
return "Discriminator Architecture: {} \n Generator Example Circuit: \n{}" \
.format(self.discriminator.sizes, self.example_g_circuit)
def store_info(self, epoch, loss, real_label, fake_label):
file = open(os.path.join(self.path, self.filename), "a")
file.write("{} epoch LOSS {} Parameters {} REAL {} FAKE {} \n"
.format(epoch,
loss,
self.generator.parameter_values,
real_label,
fake_label))
file.close()
def plot(self):
# save data for plotting
fake_images, real_images = [], []
for image_batch in self.last_batch:
fake_images.append(image_batch[1])
real_images.append(image_batch[0])
keys, average_result = images_to_distribution(fake_images)
print(average_result)
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Distribució d'una imatge generada \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Distribució d'una imatge generada \n(epoch={self.num_epochs})")
plt.ylim(0., 1.)
plt.bar(keys, average_result)
plt.savefig(self.path + "/fake_distribution.png")
plt.clf()
keys_real, average_result_real = images_to_distribution(real_images)
print(average_result_real)
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Distribució d'una imatge real \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Distribució d'una imatge real \n(epoch={self.num_epochs})")
plt.ylim(0., 1.)
plt.bar(keys_real, average_result_real)
plt.savefig(self.path + "/real_distribution.png")
plt.clf()
y_axis, x_axis = images_to_scatter(fake_images)
y_axis_real, x_axis_real = images_to_scatter(real_images)
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Comparació entre les imatges reals con les imatges falses \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Comparació entre les imatges reals con les imatges falses \n(epoch={self.num_epochs})")
plt.ylim(0. - .1, 1. + .1)
plt.scatter(y_axis, x_axis, label='Valors per les imatges falses',
color='indigo',
linewidth=.1,
alpha=.2)
plt.scatter(y_axis_real, x_axis_real, label='Valors per les imatges reals',
color='limegreen',
linewidth=.1,
alpha=.2)
plt.savefig(self.path + "/scatter_plot.png")
plt.clf()
t_steps = np.arange(self.num_epochs)
plt.figure(figsize=(6, 5))
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Progrés de la funció de pèrdua \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Progrés de la funció de pèrdua \n(epoch={self.num_epochs})")
plt.plot(t_steps, self.loss_series, label='Funció de pèrdua del discriminador', color='rebeccapurple',
linewidth=2)
plt.grid()
plt.legend(loc='best')
plt.xlabel('Iteracions')
plt.ylabel('Funció de pèrdua')
plt.savefig(self.path + "/loss_plot.png")
plt.clf()
t_steps = np.arange(self.num_epochs)
plt.figure(figsize=(6, 5))
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Progrés de les etiquetes \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Progrés de les etiquetes \n(epoch={self.num_epochs})")
plt.scatter(t_steps, self.label_real_series, label='Etiquetes per les imatges reals',
color='mediumvioletred',
linewidth=.1)
plt.scatter(t_steps, self.label_fake_series, label='Etiquetes per les imatges generades',
color='rebeccapurple',
linewidth=.1)
plt.grid()
plt.ylim(0. - .1, 1. + .1)
plt.legend(loc='best')
plt.xlabel('Iteracions')
plt.ylabel('Valor de les etiquetes')
plt.savefig(self.path + "/labels_plot.png")
plt.clf()
plt.figure(figsize=(6, 5))
if self.generator.num_qubits_ancilla != 0:
plt.title(f"Puntuació de a partir de la distancia de Fréchet \n(ancilla, epoch={self.num_epochs})")
else:
plt.title(f"Puntuació de a partir de la distancia de Fréchet \n(epoch={self.num_epochs})")
plt.plot(t_steps, self.FD_score, label='Valor de la puntuació de Fréchet', color='rebeccapurple', linewidth=2)
plt.grid()
plt.legend(loc='best')
plt.ylim(0., .28)
plt.xlabel('Iteracions')
plt.ylabel('Valor de la puntuació')
plt.savefig(self.path + "/FD_score.png")
plt.clf()
def train(self,
num_epochs: int,
training_data: List,
batch_size: int,
generator_learning_rate: float,
discriminator_learning_rate: float,
is_save_images: bool):
self.num_epochs = num_epochs
self.training_data = training_data
self.batch_size = batch_size
self.batch_size = batch_size
self.generator_lr = generator_learning_rate
self.discriminator_lr = discriminator_learning_rate
self.is_save_images = is_save_images
noise = self.training_data[0][1]
time_init = datetime.now()
for o in range(self.num_epochs):
mini_batches = create_mini_batches(self.training_data, self.batch_size)
output_fake = self.generator.get_output(latent_space_noise=mini_batches[0][0][1], parameters=None)
for mini_batch in mini_batches:
self.last_batch = self.generator.train_mini_batch(mini_batch, self.generator_lr)
self.discriminator.train_mini_batch(self.last_batch, self.discriminator_lr)
output_real = mini_batches[0][0][0]
if is_save_images:
self.save_images(self.generator.get_output(latent_space_noise=noise, parameters=None), o)
self.FD_score.append(fechet_distance(output_real, output_fake))
label_real, label_fake = self.discriminator.predict(output_real), self.discriminator.predict(output_fake)
loss_final = 1 / 2 * (minimax(label_real, label_fake) + minimax(label_real, label_fake))
self.loss_series.append(loss_final)
self.label_real_series.append(label_real)
self.label_fake_series.append(label_fake)
print("Epoch {}: Loss: {}".format(o, loss_final), output_real, output_fake)
print(label_real[-1], label_fake[-1])
self.store_info(o, loss_final, label_real, label_fake)
time_now = datetime.now()
print((time_now - time_init).total_seconds(), "seconds")
def save_images(self, image, epoch):
image_shape = int(image.shape[0] / 2)
image = image.reshape(image_shape, image_shape)
plt.imshow(image, cmap='gray', vmax=1., vmin=0.)
plt.axis('off')
plt.savefig(self.path_images + '/image_at_epoch_{:04d}.png'.format(epoch))
plt.clf()
def create_gif(self):
anim_file = self.path + '/dcgan.gif'
with imageio.get_writer(anim_file, mode='I') as writer:
filenames = glob.glob(self.path_images + '/image*.png')
filenames = sorted(filenames)
for filename in filenames:
image = imageio.imread(filename)
writer.append_data(image)
image = imageio.imread(filename)
writer.append_data(image)
def save(self):
"""Save the neural network to the file ``filename``."""
data = {"batch_size": self.batch_size,
"D_sizes": self.discriminator.sizes,
"D_weights": [w.tolist() for w in self.discriminator.weights],
"D_biases": [b.tolist() for b in self.discriminator.biases],
"D_loss": self.discriminator.type_loss,
"Q_parameters": [theta for theta in self.generator.parameter_values],
"Q_shots": self.generator.shots,
"Q_num_qubits": self.generator.num_qubits_total,
"Q_num_qubits_ancilla": self.generator.num_qubits_ancilla,
"real_labels": self.label_real_series,
"fake_labels": self.label_fake_series,
"loss_series": self.loss_series
}
f = open(os.path.join(self.path, "data.txt"), "a")
json.dump(data, f)
f.close()
def create_mini_batches(training_data, mini_batch_size):
n = len(training_data)
random.shuffle(training_data)
mini_batches = [
training_data[k:k + mini_batch_size]
for k in range(0, n, mini_batch_size)]
return [mini_batches[0]]
def load_gan(filename):
f = open(filename, "r")
data = json.load(f)
f.close()
discriminator = ClassicalDiscriminator(data["D_sizes"], data["D_loss"])
generator = QuantumGenerator(num_qubits=data["Q_num_qubits"],
generator_circuit=None,
num_qubits_ancilla=data["Q_num_qubits_ancilla"],
shots=data["Q_shots"])
quantum_gan = Quantum_GAN(generator, discriminator)
quantum_gan.discriminator.weights = [np.array(w) for w in data["D_weights"]]
quantum_gan.discriminator.biases = [np.array(b) for b in data["D_biases"]]
quantum_gan.generator.parameter_values = np.array(data["Q_parameters"])
return quantum_gan, data["batch_size"]
| [
1,
529,
9507,
29958,
12150,
398,
29954,
2190,
29914,
29939,
6249,
29889,
2272,
13,
5215,
13149,
13,
5215,
2897,
13,
5215,
4390,
13,
5215,
4036,
13,
3166,
12865,
1053,
12865,
13,
3166,
19229,
1053,
2391,
13,
13,
5215,
1967,
601,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
12101,
29954,
2190,
29889,
2218,
29883,
20386,
1061,
1053,
4134,
936,
4205,
29883,
20386,
1061,
13,
3166,
12101,
29954,
2190,
29889,
12171,
1053,
1238,
305,
300,
29918,
19244,
29892,
6260,
1165,
29892,
4558,
29918,
517,
29918,
27691,
29892,
4558,
29918,
517,
29918,
1557,
2620,
13,
3166,
12101,
29954,
2190,
29889,
12150,
398,
29918,
27959,
1053,
22746,
398,
21575,
13,
13,
13,
1990,
22746,
398,
29918,
29954,
2190,
29901,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
13,
12,
632,
15299,
29901,
22746,
398,
21575,
29892,
13,
12,
632,
2313,
20386,
1061,
29901,
4134,
936,
4205,
29883,
20386,
1061,
13,
12,
795,
1125,
13,
13,
12,
12,
1311,
29889,
4230,
29918,
16175,
353,
6213,
13,
12,
12,
3707,
353,
12865,
29889,
3707,
580,
13,
12,
12,
2344,
29918,
2230,
353,
1286,
29889,
710,
615,
603,
11702,
29881,
29918,
29995,
29885,
29918,
29995,
29979,
1649,
29995,
29950,
29918,
29995,
29924,
29918,
29995,
29903,
1159,
13,
12,
12,
1311,
29889,
2084,
353,
376,
1272,
29914,
3389,
8875,
1642,
4830,
29898,
2344,
29918,
2230,
29897,
13,
12,
12,
1311,
29889,
2084,
29918,
8346,
353,
1583,
29889,
2084,
718,
5591,
8346,
29908,
13,
12,
12,
1311,
29889,
9507,
353,
376,
3389,
29889,
3945,
29908,
13,
13,
12,
12,
361,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
2084,
1125,
13,
12,
12,
12,
359,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
2084,
29897,
13,
13,
12,
12,
361,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
2084,
29918,
8346,
1125,
13,
12,
12,
12,
359,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
2084,
29918,
8346,
29897,
13,
13,
12,
12,
2541,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
2084,
29892,
1583,
29889,
9507,
511,
376,
29893,
1159,
408,
934,
29901,
13,
12,
12,
12,
1445,
29889,
3539,
703,
29934,
3904,
6571,
320,
29876,
1642,
4830,
29898,
2344,
29918,
2230,
876,
13,
12,
12,
12,
1445,
29889,
5358,
580,
13,
13,
12,
12,
1311,
29889,
27959,
353,
15299,
13,
12,
12,
1311,
29889,
2218,
29883,
20386,
1061,
353,
2313,
20386,
1061,
13,
12,
12,
1311,
29889,
6758,
29918,
13757,
29892,
1583,
29889,
1643,
29918,
6370,
29918,
13757,
29892,
1583,
29889,
1643,
29918,
29888,
1296,
29918,
13757,
29892,
1583,
29889,
26453,
29918,
13628,
353,
19997,
19997,
19997,
5159,
13,
13,
12,
12,
1311,
29889,
27959,
29889,
2344,
29918,
16744,
580,
13,
12,
12,
1311,
29889,
4773,
29918,
29887,
29918,
6034,
3121,
353,
1583,
29889,
27959,
29889,
11433,
29918,
6034,
3121,
29898,
5066,
296,
29918,
3493,
29918,
1217,
895,
29922,
8516,
29892,
13,
12,
12,
462,
462,
462,
3986,
304,
29918,
26658,
29922,
8824,
29897,
13,
12,
12,
1311,
29889,
27959,
29889,
842,
29918,
2218,
29883,
20386,
1061,
29898,
1311,
29889,
2218,
29883,
20386,
1061,
29897,
13,
13,
12,
1753,
4770,
276,
558,
12035,
1311,
1125,
13,
12,
12,
2457,
376,
4205,
29883,
20386,
1061,
28333,
29901,
6571,
320,
29876,
3251,
1061,
8741,
12594,
3121,
29901,
320,
29876,
29912,
5038,
320,
13,
12,
12,
12,
29889,
4830,
29898,
1311,
29889,
2218,
29883,
20386,
1061,
29889,
29879,
7093,
29892,
1583,
29889,
4773,
29918,
29887,
29918,
6034,
3121,
29897,
13,
13,
12,
1753,
3787,
29918,
3888,
29898,
1311,
29892,
21502,
305,
29892,
6410,
29892,
1855,
29918,
1643,
29892,
25713,
29918,
1643,
1125,
13,
12,
12,
1445,
353,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
2084,
29892,
1583,
29889,
9507,
511,
376,
29874,
1159,
13,
12,
12,
1445,
29889,
3539,
703,
8875,
21502,
305,
11247,
1799,
6571,
12662,
2699,
6571,
5195,
1964,
6571,
13515,
6059,
6571,
320,
29876,
29908,
13,
12,
12,
965,
869,
4830,
29898,
1022,
2878,
29892,
13,
12,
12,
462,
259,
6410,
29892,
13,
12,
12,
462,
259,
1583,
29889,
27959,
29889,
15501,
29918,
5975,
29892,
13,
12,
12,
462,
259,
1855,
29918,
1643,
29892,
13,
12,
12,
462,
259,
25713,
29918,
1643,
876,
13,
12,
12,
1445,
29889,
5358,
580,
13,
13,
12,
1753,
6492,
29898,
1311,
1125,
13,
12,
12,
29937,
4078,
848,
363,
6492,
1259,
13,
12,
12,
29888,
1296,
29918,
8346,
29892,
1855,
29918,
8346,
353,
19997,
5159,
13,
12,
12,
1454,
1967,
29918,
16175,
297,
1583,
29889,
4230,
29918,
16175,
29901,
13,
12,
12,
12,
29888,
1296,
29918,
8346,
29889,
4397,
29898,
3027,
29918,
16175,
29961,
29896,
2314,
13,
12,
12,
12,
6370,
29918,
8346,
29889,
4397,
29898,
3027,
29918,
16175,
29961,
29900,
2314,
13,
13,
12,
12,
8149,
29892,
6588,
29918,
2914,
353,
4558,
29918,
517,
29918,
27691,
29898,
29888,
1296,
29918,
8346,
29897,
13,
12,
12,
2158,
29898,
12483,
482,
29918,
2914,
29897,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
13398,
7741,
2617,
270,
29915,
4347,
527,
26775,
1176,
1114,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
13398,
7741,
2617,
270,
29915,
4347,
527,
26775,
1176,
1114,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
29891,
2576,
29898,
29900,
1696,
29871,
29896,
1846,
13,
12,
12,
572,
29873,
29889,
1646,
29898,
8149,
29892,
6588,
29918,
2914,
29897,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
29888,
1296,
29918,
27691,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
12,
8149,
29918,
6370,
29892,
6588,
29918,
2914,
29918,
6370,
353,
4558,
29918,
517,
29918,
27691,
29898,
6370,
29918,
8346,
29897,
13,
12,
12,
2158,
29898,
12483,
482,
29918,
2914,
29918,
6370,
29897,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
13398,
7741,
2617,
270,
29915,
4347,
527,
26775,
1855,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
13398,
7741,
2617,
270,
29915,
4347,
527,
26775,
1855,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
29891,
2576,
29898,
29900,
1696,
29871,
29896,
1846,
13,
12,
12,
572,
29873,
29889,
1646,
29898,
8149,
29918,
6370,
29892,
6588,
29918,
2914,
29918,
6370,
29897,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
6370,
29918,
27691,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
12,
29891,
29918,
8990,
29892,
921,
29918,
8990,
353,
4558,
29918,
517,
29918,
1557,
2620,
29898,
29888,
1296,
29918,
8346,
29897,
13,
12,
12,
29891,
29918,
8990,
29918,
6370,
29892,
921,
29918,
8990,
29918,
6370,
353,
4558,
29918,
517,
29918,
1557,
2620,
29898,
6370,
29918,
8346,
29897,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1523,
862,
12076,
2637,
966,
527,
271,
2710,
337,
1338,
378,
966,
527,
271,
2710,
285,
1338,
267,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1523,
862,
12076,
2637,
966,
527,
271,
2710,
337,
1338,
378,
966,
527,
271,
2710,
285,
1338,
267,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
29891,
2576,
29898,
29900,
29889,
448,
869,
29896,
29892,
29871,
29896,
29889,
718,
869,
29896,
29897,
13,
12,
12,
572,
29873,
29889,
1557,
2620,
29898,
29891,
29918,
8990,
29892,
921,
29918,
8990,
29892,
3858,
2433,
1440,
943,
639,
966,
527,
271,
2710,
285,
1338,
267,
742,
13,
12,
12,
9651,
2927,
2433,
513,
5973,
742,
13,
12,
12,
9651,
1196,
2103,
21098,
29896,
29892,
13,
12,
12,
9651,
15595,
21098,
29906,
29897,
13,
12,
12,
572,
29873,
29889,
1557,
2620,
29898,
29891,
29918,
8990,
29918,
6370,
29892,
921,
29918,
8990,
29918,
6370,
29892,
3858,
2433,
1440,
943,
639,
966,
527,
271,
2710,
337,
1338,
742,
13,
12,
12,
9651,
2927,
2433,
2576,
387,
2733,
742,
13,
12,
12,
9651,
1196,
2103,
21098,
29896,
29892,
13,
12,
12,
9651,
15595,
21098,
29906,
29897,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
1557,
2620,
29918,
5317,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
12,
29873,
29918,
24530,
353,
7442,
29889,
279,
927,
29898,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
29897,
13,
12,
12,
572,
29873,
29889,
4532,
29898,
1003,
2311,
7607,
29953,
29892,
29871,
29945,
876,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1184,
629,
743,
316,
425,
2090,
2617,
316,
282,
30000,
29878,
700,
29874,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1184,
629,
743,
316,
425,
2090,
2617,
316,
282,
30000,
29878,
700,
29874,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
5317,
29898,
29873,
29918,
24530,
29892,
1583,
29889,
6758,
29918,
13757,
29892,
3858,
2433,
25394,
2617,
316,
282,
30000,
29878,
700,
29874,
628,
2313,
20386,
3136,
742,
2927,
2433,
276,
915,
617,
481,
332,
552,
742,
13,
12,
12,
308,
1196,
2103,
29922,
29906,
29897,
13,
12,
12,
572,
29873,
29889,
7720,
580,
13,
12,
12,
572,
29873,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
12,
12,
572,
29873,
29889,
29916,
1643,
877,
13463,
17249,
1495,
13,
12,
12,
572,
29873,
29889,
29891,
1643,
877,
25394,
2617,
316,
282,
30000,
29878,
700,
29874,
1495,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
6758,
29918,
5317,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
12,
29873,
29918,
24530,
353,
7442,
29889,
279,
927,
29898,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
29897,
13,
12,
12,
572,
29873,
29889,
4532,
29898,
1003,
2311,
7607,
29953,
29892,
29871,
29945,
876,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1184,
629,
743,
316,
966,
634,
8105,
10778,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
1184,
629,
743,
316,
966,
634,
8105,
10778,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
1557,
2620,
29898,
29873,
29918,
24530,
29892,
1583,
29889,
1643,
29918,
6370,
29918,
13757,
29892,
3858,
2433,
29923,
2034,
339,
10778,
639,
966,
527,
271,
2710,
337,
1338,
742,
13,
12,
12,
9651,
2927,
2433,
27891,
29894,
601,
1026,
1127,
742,
13,
12,
12,
9651,
1196,
2103,
21098,
29896,
29897,
13,
12,
12,
572,
29873,
29889,
1557,
2620,
29898,
29873,
29918,
24530,
29892,
1583,
29889,
1643,
29918,
29888,
1296,
29918,
13757,
29892,
3858,
2433,
29923,
2034,
339,
10778,
639,
966,
527,
271,
2710,
1176,
3076,
742,
13,
12,
12,
9651,
2927,
2433,
276,
915,
617,
481,
332,
552,
742,
13,
12,
12,
9651,
1196,
2103,
21098,
29896,
29897,
13,
12,
12,
572,
29873,
29889,
7720,
580,
13,
12,
12,
572,
29873,
29889,
29891,
2576,
29898,
29900,
29889,
448,
869,
29896,
29892,
29871,
29896,
29889,
718,
869,
29896,
29897,
13,
12,
12,
572,
29873,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
12,
12,
572,
29873,
29889,
29916,
1643,
877,
13463,
17249,
1495,
13,
12,
12,
572,
29873,
29889,
29891,
1643,
877,
1440,
272,
316,
966,
634,
8105,
10778,
1495,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
21134,
29918,
5317,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
12,
572,
29873,
29889,
4532,
29898,
1003,
2311,
7607,
29953,
29892,
29871,
29945,
876,
13,
12,
12,
361,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
2804,
29871,
29900,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
29925,
1657,
3357,
2617,
316,
263,
8019,
316,
425,
1320,
14006,
316,
4693,
17192,
300,
320,
29876,
29898,
4564,
2911,
29892,
21502,
305,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
572,
29873,
29889,
3257,
29898,
29888,
29908,
29925,
1657,
3357,
2617,
316,
263,
8019,
316,
425,
1320,
14006,
316,
4693,
17192,
300,
320,
29876,
29898,
1022,
2878,
3790,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1800,
1159,
13,
12,
12,
572,
29873,
29889,
5317,
29898,
29873,
29918,
24530,
29892,
1583,
29889,
26453,
29918,
13628,
29892,
3858,
2433,
1440,
272,
316,
425,
11978,
3357,
2617,
316,
4693,
17192,
300,
742,
2927,
2433,
276,
915,
617,
481,
332,
552,
742,
1196,
2103,
29922,
29906,
29897,
13,
12,
12,
572,
29873,
29889,
7720,
580,
13,
12,
12,
572,
29873,
29889,
26172,
29898,
2029,
2433,
13318,
1495,
13,
12,
12,
572,
29873,
29889,
29891,
2576,
29898,
29900,
1696,
869,
29906,
29947,
29897,
13,
12,
12,
572,
29873,
29889,
29916,
1643,
877,
13463,
17249,
1495,
13,
12,
12,
572,
29873,
29889,
29891,
1643,
877,
1440,
272,
316,
425,
11978,
3357,
2617,
1495,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
718,
5591,
26453,
29918,
13628,
29889,
2732,
1159,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
1753,
7945,
29898,
1311,
29892,
13,
12,
3986,
954,
29918,
1022,
2878,
29879,
29901,
938,
29892,
13,
12,
3986,
6694,
29918,
1272,
29901,
2391,
29892,
13,
12,
3986,
9853,
29918,
2311,
29901,
938,
29892,
13,
12,
3986,
15299,
29918,
21891,
29918,
10492,
29901,
5785,
29892,
13,
12,
3986,
2313,
20386,
1061,
29918,
21891,
29918,
10492,
29901,
5785,
29892,
13,
12,
3986,
338,
29918,
7620,
29918,
8346,
29901,
6120,
1125,
13,
13,
12,
12,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
353,
954,
29918,
1022,
2878,
29879,
13,
12,
12,
1311,
29889,
26495,
29918,
1272,
353,
6694,
29918,
1272,
13,
12,
12,
1311,
29889,
16175,
29918,
2311,
353,
9853,
29918,
2311,
13,
12,
12,
1311,
29889,
16175,
29918,
2311,
353,
9853,
29918,
2311,
13,
12,
12,
1311,
29889,
27959,
29918,
29212,
353,
15299,
29918,
21891,
29918,
10492,
13,
12,
12,
1311,
29889,
2218,
29883,
20386,
1061,
29918,
29212,
353,
2313,
20386,
1061,
29918,
21891,
29918,
10492,
13,
12,
12,
1311,
29889,
275,
29918,
7620,
29918,
8346,
353,
338,
29918,
7620,
29918,
8346,
13,
13,
12,
12,
1217,
895,
353,
1583,
29889,
26495,
29918,
1272,
29961,
29900,
3816,
29896,
29962,
13,
12,
12,
2230,
29918,
2344,
353,
12865,
29889,
3707,
580,
13,
12,
12,
1454,
288,
297,
3464,
29898,
1311,
29889,
1949,
29918,
1022,
2878,
29879,
1125,
13,
12,
12,
12,
1195,
29875,
29918,
16175,
267,
353,
1653,
29918,
1195,
29875,
29918,
16175,
267,
29898,
1311,
29889,
26495,
29918,
1272,
29892,
1583,
29889,
16175,
29918,
2311,
29897,
13,
12,
12,
12,
4905,
29918,
29888,
1296,
353,
1583,
29889,
27959,
29889,
657,
29918,
4905,
29898,
5066,
296,
29918,
3493,
29918,
1217,
895,
29922,
1195,
29875,
29918,
16175,
267,
29961,
29900,
3816,
29900,
3816,
29896,
1402,
4128,
29922,
8516,
29897,
13,
13,
12,
12,
12,
1454,
20629,
29918,
16175,
297,
20629,
29918,
16175,
267,
29901,
13,
12,
12,
12,
12,
1311,
29889,
4230,
29918,
16175,
353,
1583,
29889,
27959,
29889,
14968,
29918,
1195,
29875,
29918,
16175,
29898,
1195,
29875,
29918,
16175,
29892,
1583,
29889,
27959,
29918,
29212,
29897,
13,
12,
12,
12,
12,
1311,
29889,
2218,
29883,
20386,
1061,
29889,
14968,
29918,
1195,
29875,
29918,
16175,
29898,
1311,
29889,
4230,
29918,
16175,
29892,
1583,
29889,
2218,
29883,
20386,
1061,
29918,
29212,
29897,
13,
13,
12,
12,
12,
4905,
29918,
6370,
353,
20629,
29918,
16175,
267,
29961,
29900,
3816,
29900,
3816,
29900,
29962,
13,
12,
12,
12,
361,
338,
29918,
7620,
29918,
8346,
29901,
13,
12,
12,
12,
12,
1311,
29889,
7620,
29918,
8346,
29898,
1311,
29889,
27959,
29889,
657,
29918,
4905,
29898,
5066,
296,
29918,
3493,
29918,
1217,
895,
29922,
1217,
895,
29892,
4128,
29922,
8516,
511,
288,
29897,
13,
13,
12,
12,
12,
1311,
29889,
26453,
29918,
13628,
29889,
4397,
29898,
1725,
305,
300,
29918,
19244,
29898,
4905,
29918,
6370,
29892,
1962,
29918,
29888,
1296,
876,
13,
12,
12,
12,
1643,
29918,
6370,
29892,
3858,
29918,
29888,
1296,
353,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
27711,
29898,
4905,
29918,
6370,
511,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
27711,
29898,
4905,
29918,
29888,
1296,
29897,
13,
12,
12,
12,
6758,
29918,
8394,
353,
29871,
29896,
847,
29871,
29906,
334,
313,
1195,
326,
1165,
29898,
1643,
29918,
6370,
29892,
3858,
29918,
29888,
1296,
29897,
718,
6260,
1165,
29898,
1643,
29918,
6370,
29892,
3858,
29918,
29888,
1296,
876,
13,
13,
12,
12,
12,
1311,
29889,
6758,
29918,
13757,
29889,
4397,
29898,
6758,
29918,
8394,
29897,
13,
12,
12,
12,
1311,
29889,
1643,
29918,
6370,
29918,
13757,
29889,
4397,
29898,
1643,
29918,
6370,
29897,
13,
12,
12,
12,
1311,
29889,
1643,
29918,
29888,
1296,
29918,
13757,
29889,
4397,
29898,
1643,
29918,
29888,
1296,
29897,
13,
13,
12,
12,
12,
2158,
703,
29923,
1129,
305,
426,
6177,
365,
2209,
29901,
6571,
1642,
4830,
29898,
29877,
29892,
6410,
29918,
8394,
511,
1962,
29918,
6370,
29892,
1962,
29918,
29888,
1296,
29897,
13,
12,
12,
12,
2158,
29898,
1643,
29918,
6370,
14352,
29896,
1402,
3858,
29918,
29888,
1296,
14352,
29896,
2314,
13,
12,
12,
12,
1311,
29889,
8899,
29918,
3888,
29898,
29877,
29892,
6410,
29918,
8394,
29892,
3858,
29918,
6370,
29892,
3858,
29918,
29888,
1296,
29897,
13,
13,
12,
12,
2230,
29918,
3707,
353,
12865,
29889,
3707,
580,
13,
12,
12,
2158,
3552,
2230,
29918,
3707,
448,
931,
29918,
2344,
467,
7827,
29918,
23128,
3285,
376,
23128,
1159,
13,
13,
12,
1753,
4078,
29918,
8346,
29898,
1311,
29892,
1967,
29892,
21502,
305,
1125,
13,
12,
12,
3027,
29918,
12181,
353,
938,
29898,
3027,
29889,
12181,
29961,
29900,
29962,
847,
29871,
29906,
29897,
13,
12,
12,
3027,
353,
1967,
29889,
690,
14443,
29898,
3027,
29918,
12181,
29892,
1967,
29918,
12181,
29897,
13,
13,
12,
12,
572,
29873,
29889,
326,
4294,
29898,
3027,
29892,
274,
1958,
2433,
21012,
742,
325,
3317,
29922,
29896,
1696,
325,
1195,
29922,
29900,
1846,
13,
12,
12,
572,
29873,
29889,
8990,
877,
2696,
1495,
13,
12,
12,
572,
29873,
29889,
7620,
1003,
29898,
1311,
29889,
2084,
29918,
8346,
718,
8207,
3027,
29918,
271,
29918,
1022,
2878,
648,
29901,
29900,
29946,
29881,
1836,
2732,
4286,
4830,
29898,
1022,
2878,
876,
13,
12,
12,
572,
29873,
29889,
695,
29888,
580,
13,
13,
12,
1753,
1653,
29918,
18660,
29898,
1311,
1125,
13,
12,
12,
11576,
29918,
1445,
353,
1583,
29889,
2084,
718,
8207,
13891,
6249,
29889,
18660,
29915,
13,
13,
12,
12,
2541,
1967,
601,
29889,
657,
29918,
13236,
29898,
11576,
29918,
1445,
29892,
4464,
2433,
29902,
1495,
408,
9227,
29901,
13,
12,
12,
12,
1777,
264,
1280,
353,
13149,
29889,
23705,
29898,
1311,
29889,
2084,
29918,
8346,
718,
8207,
3027,
10521,
2732,
1495,
13,
12,
12,
12,
1777,
264,
1280,
353,
12705,
29898,
1777,
264,
1280,
29897,
13,
13,
12,
12,
12,
1454,
10422,
297,
977,
264,
1280,
29901,
13,
12,
12,
12,
12,
3027,
353,
1967,
601,
29889,
326,
949,
29898,
9507,
29897,
13,
12,
12,
12,
12,
13236,
29889,
4397,
29918,
1272,
29898,
3027,
29897,
13,
13,
12,
12,
12,
3027,
353,
1967,
601,
29889,
326,
949,
29898,
9507,
29897,
13,
12,
12,
12,
13236,
29889,
4397,
29918,
1272,
29898,
3027,
29897,
13,
13,
12,
1753,
4078,
29898,
1311,
1125,
13,
12,
12,
15945,
29908,
11371,
278,
19677,
3564,
304,
278,
934,
4954,
9507,
16159,
1213,
15945,
13,
12,
12,
1272,
353,
8853,
16175,
29918,
2311,
1115,
1583,
29889,
16175,
29918,
2311,
29892,
13,
12,
12,
4706,
376,
29928,
29918,
29879,
7093,
1115,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
29879,
7093,
29892,
13,
12,
12,
4706,
376,
29928,
29918,
705,
5861,
1115,
518,
29893,
29889,
25027,
391,
580,
363,
281,
297,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
705,
5861,
1402,
13,
12,
12,
4706,
376,
29928,
29918,
5365,
2129,
1115,
518,
29890,
29889,
25027,
391,
580,
363,
289,
297,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
5365,
2129,
1402,
13,
12,
12,
4706,
376,
29928,
29918,
6758,
1115,
1583,
29889,
2218,
29883,
20386,
1061,
29889,
1853,
29918,
6758,
29892,
13,
12,
12,
4706,
376,
29984,
29918,
16744,
1115,
518,
3416,
363,
278,
941,
297,
1583,
29889,
27959,
29889,
15501,
29918,
5975,
1402,
13,
12,
12,
4706,
376,
29984,
29918,
845,
1862,
1115,
1583,
29889,
27959,
29889,
845,
1862,
29892,
13,
12,
12,
4706,
376,
29984,
29918,
1949,
29918,
339,
14836,
1115,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
7827,
29892,
13,
12,
12,
4706,
376,
29984,
29918,
1949,
29918,
339,
14836,
29918,
4564,
2911,
1115,
1583,
29889,
27959,
29889,
1949,
29918,
339,
14836,
29918,
4564,
2911,
29892,
13,
12,
12,
4706,
376,
6370,
29918,
21134,
1115,
1583,
29889,
1643,
29918,
6370,
29918,
13757,
29892,
13,
12,
12,
4706,
376,
29888,
1296,
29918,
21134,
1115,
1583,
29889,
1643,
29918,
29888,
1296,
29918,
13757,
29892,
13,
12,
12,
4706,
376,
6758,
29918,
13757,
1115,
1583,
29889,
6758,
29918,
13757,
13,
12,
12,
4706,
500,
13,
12,
12,
29888,
353,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
2084,
29892,
376,
1272,
29889,
3945,
4968,
376,
29874,
1159,
13,
12,
12,
3126,
29889,
15070,
29898,
1272,
29892,
285,
29897,
13,
12,
12,
29888,
29889,
5358,
580,
13,
13,
13,
1753,
1653,
29918,
1195,
29875,
29918,
16175,
267,
29898,
26495,
29918,
1272,
29892,
20629,
29918,
16175,
29918,
2311,
1125,
13,
12,
29876,
353,
7431,
29898,
26495,
29918,
1272,
29897,
13,
12,
8172,
29889,
845,
21897,
29898,
26495,
29918,
1272,
29897,
13,
12,
1195,
29875,
29918,
16175,
267,
353,
518,
13,
12,
12,
26495,
29918,
1272,
29961,
29895,
29901,
29895,
718,
20629,
29918,
16175,
29918,
2311,
29962,
13,
12,
12,
1454,
413,
297,
3464,
29898,
29900,
29892,
302,
29892,
20629,
29918,
16175,
29918,
2311,
4638,
13,
12,
2457,
518,
1195,
29875,
29918,
16175,
267,
29961,
29900,
5262,
13,
13,
13,
1753,
2254,
29918,
6249,
29898,
9507,
1125,
13,
12,
29888,
353,
1722,
29898,
9507,
29892,
376,
29878,
1159,
13,
12,
1272,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
12,
29888,
29889,
5358,
580,
13,
12,
2218,
29883,
20386,
1061,
353,
4134,
936,
4205,
29883,
20386,
1061,
29898,
1272,
3366,
29928,
29918,
29879,
7093,
12436,
848,
3366,
29928,
29918,
6758,
20068,
13,
13,
12,
27959,
353,
22746,
398,
21575,
29898,
1949,
29918,
339,
14836,
29922,
1272,
3366,
29984,
29918,
1949,
29918,
339,
14836,
12436,
13,
12,
462,
632,
15299,
29918,
6034,
3121,
29922,
8516,
29892,
13,
12,
462,
632,
954,
29918,
339,
14836,
29918,
4564,
2911,
29922,
1272,
3366,
29984,
29918,
1949,
29918,
339,
14836,
29918,
4564,
2911,
12436,
13,
12,
462,
632,
528,
1862,
29922,
1272,
3366,
29984,
29918,
845,
1862,
20068,
13,
13,
12,
12150,
398,
29918,
6249,
353,
22746,
398,
29918,
29954,
2190,
29898,
27959,
29892,
2313,
20386,
1061,
29897,
13,
13,
12,
12150,
398,
29918,
6249,
29889,
2218,
29883,
20386,
1061,
29889,
705,
5861,
353,
518,
9302,
29889,
2378,
29898,
29893,
29897,
363,
281,
297,
848,
3366,
29928,
29918,
705,
5861,
3108,
29962,
13,
12,
12150,
398,
29918,
6249,
29889,
2218,
29883,
20386,
1061,
29889,
5365,
2129,
353,
518,
9302,
29889,
2378,
29898,
29890,
29897,
363,
289,
297,
848,
3366,
29928,
29918,
5365,
2129,
3108,
29962,
13,
12,
12150,
398,
29918,
6249,
29889,
27959,
29889,
15501,
29918,
5975,
353,
7442,
29889,
2378,
29898,
1272,
3366,
29984,
29918,
16744,
20068,
13,
13,
12,
2457,
12101,
29918,
6249,
29892,
848,
3366,
16175,
29918,
2311,
3108,
13,
2
] |
location_booking/models.py | reload/Web-Based-Info-Screen | 0 | 102378 | from django.db import models
import requests, icalendar, re
from datetime import datetime, date
from dateutil.tz import tzlocal
def localize_timezones(event):
'''Makes sure all date and datetimes are in the local timezone.'''
for field_name, field_value in event.items():
if isinstance(field_value, icalendar.prop.vDDDTypes):
# Is this infact a datetime?
if isinstance(field_value.dt, datetime):
event[field_name].dt = field_value.dt.astimezone( tzlocal() )
return event
class Calendar(models.Model):
ical_url = models.CharField(max_length=1024)
calendar = None
def __str__(self):
return 'Calendar (%s)' % ( self.ical_url )
def load(self):
response = requests.get(self.ical_url)
self.calendar = icalendar.Calendar.from_ical(response.text)
name = self.calendar.get('X-WR-CALNAME')
description = self.calendar.get('X-WR-CALDESC')
if name and description:
print "Loaded calendar: '%s' (%s)." % (name, description)
elif name:
print "Loaded calendar: '%s'." % (name)
else:
print "Loaded calendar!"
def all_events(self):
self.load()
result = []
for event in self.calendar.walk("VEVENT"):
event = localize_timezones(event)
result.append(event)
return result
def events_today(self):
events = self.all_events()
result = []
now = datetime.now(tzlocal())
this_morning = now.replace(hour=0, minute=0)
this_midnight = now.replace(hour=23, minute=59)
for event in events:
start = event.get('DTSTART').dt
if type(start) == date:
if this_morning.date() == start:
result.append(event)
elif start > this_morning and start < this_midnight:
result.append(event)
return result
class Location(models.Model):
calendar = models.ForeignKey('Calendar')
title = models.CharField(max_length=256)
location_regexp = models.CharField(max_length=256)
def __str__(self):
return 'Location (%s in %s)' % ( self.location_regexp, self.calendar.ical_url )
def events_today(self):
future_calendar_events = self.calendar.events_today()
result = {
'allday_events': [],
'regular_events': []
}
for event in future_calendar_events:
location = event.get('LOCATION')
if location and re.search(self.location_regexp, location, flags=re.IGNORECASE):
event_dict = dict()
for k,v in event.items():
k = k.lower().replace('-', '_')
event_dict[k] = v
if type(event.get('DTSTART').dt) == date:
result['allday_events'].append(event_dict)
else:
result['regular_events'].append(event_dict)
# Sort based on start-time.
result['regular_events'] = sorted(result['regular_events'], lambda a,b: cmp(a['dtstart'].dt, b['dtstart'].dt))
return result | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
5215,
7274,
29892,
29871,
936,
6486,
29892,
337,
13,
3166,
12865,
1053,
12865,
29892,
2635,
13,
3166,
2635,
4422,
29889,
17559,
1053,
260,
29920,
2997,
13,
13,
1753,
1887,
675,
29918,
2230,
29920,
2873,
29898,
3696,
1125,
13,
1678,
14550,
29924,
6926,
1854,
599,
2635,
322,
1418,
300,
1355,
526,
297,
278,
1887,
29431,
29889,
12008,
13,
1678,
363,
1746,
29918,
978,
29892,
1746,
29918,
1767,
297,
1741,
29889,
7076,
7295,
13,
4706,
565,
338,
8758,
29898,
2671,
29918,
1767,
29892,
29871,
936,
6486,
29889,
7728,
29889,
29894,
7858,
29928,
10562,
1125,
13,
9651,
396,
1317,
445,
3041,
627,
263,
12865,
29973,
13,
9651,
565,
338,
8758,
29898,
2671,
29918,
1767,
29889,
6008,
29892,
12865,
1125,
13,
18884,
1741,
29961,
2671,
29918,
978,
1822,
6008,
353,
1746,
29918,
1767,
29889,
6008,
29889,
579,
603,
8028,
29898,
260,
29920,
2997,
580,
1723,
13,
1678,
736,
1741,
13,
13,
1990,
26431,
29898,
9794,
29889,
3195,
1125,
13,
268,
936,
29918,
2271,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29900,
29906,
29946,
29897,
13,
1678,
17684,
353,
6213,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
525,
17447,
313,
29995,
29879,
16029,
1273,
313,
1583,
29889,
936,
29918,
2271,
1723,
13,
1678,
822,
2254,
29898,
1311,
1125,
13,
4706,
2933,
353,
7274,
29889,
657,
29898,
1311,
29889,
936,
29918,
2271,
29897,
13,
4706,
1583,
29889,
23392,
353,
29871,
936,
6486,
29889,
17447,
29889,
3166,
29918,
936,
29898,
5327,
29889,
726,
29897,
13,
4706,
1024,
353,
1583,
29889,
23392,
29889,
657,
877,
29990,
29899,
9980,
29899,
29907,
1964,
5813,
1495,
13,
4706,
6139,
353,
1583,
29889,
23392,
29889,
657,
877,
29990,
29899,
9980,
29899,
29907,
1964,
2287,
7187,
1495,
13,
4706,
565,
1024,
322,
6139,
29901,
13,
9651,
1596,
376,
29147,
17684,
29901,
14210,
29879,
29915,
313,
29995,
29879,
467,
29908,
1273,
313,
978,
29892,
6139,
29897,
13,
4706,
25342,
1024,
29901,
13,
9651,
1596,
376,
29147,
17684,
29901,
14210,
29879,
29915,
1213,
1273,
313,
978,
29897,
13,
4706,
1683,
29901,
13,
9651,
1596,
376,
29147,
17684,
3850,
13,
1678,
822,
599,
29918,
13604,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1359,
580,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
1741,
297,
1583,
29889,
23392,
29889,
20919,
703,
12064,
29963,
3919,
29908,
1125,
13,
9651,
1741,
353,
1887,
675,
29918,
2230,
29920,
2873,
29898,
3696,
29897,
13,
9651,
1121,
29889,
4397,
29898,
3696,
29897,
13,
4706,
736,
1121,
13,
1678,
822,
4959,
29918,
27765,
29898,
1311,
1125,
13,
4706,
4959,
353,
1583,
29889,
497,
29918,
13604,
580,
13,
4706,
1121,
353,
5159,
13,
4706,
1286,
353,
12865,
29889,
3707,
29898,
17559,
2997,
3101,
13,
4706,
445,
29918,
12257,
1076,
353,
1286,
29889,
6506,
29898,
18721,
29922,
29900,
29892,
11015,
29922,
29900,
29897,
13,
4706,
445,
29918,
6563,
11147,
353,
1286,
29889,
6506,
29898,
18721,
29922,
29906,
29941,
29892,
11015,
29922,
29945,
29929,
29897,
13,
4706,
363,
1741,
297,
4959,
29901,
13,
308,
12,
2962,
353,
1741,
29889,
657,
877,
12972,
25826,
2824,
6008,
13,
308,
12,
361,
1134,
29898,
2962,
29897,
1275,
2635,
29901,
13,
308,
12,
12,
361,
445,
29918,
12257,
1076,
29889,
1256,
580,
1275,
1369,
29901,
13,
308,
12,
12,
12,
2914,
29889,
4397,
29898,
3696,
29897,
13,
308,
12,
23681,
1369,
1405,
445,
29918,
12257,
1076,
322,
1369,
529,
445,
29918,
6563,
11147,
29901,
13,
308,
12,
12,
2914,
29889,
4397,
29898,
3696,
29897,
13,
4706,
736,
1121,
13,
13,
1990,
17015,
29898,
9794,
29889,
3195,
1125,
13,
1678,
17684,
353,
4733,
29889,
27755,
2558,
877,
17447,
1495,
13,
1678,
3611,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29953,
29897,
13,
1678,
4423,
29918,
13087,
29886,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29953,
29897,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
525,
6508,
313,
29995,
29879,
297,
1273,
29879,
16029,
1273,
313,
1583,
29889,
5479,
29918,
13087,
29886,
29892,
1583,
29889,
23392,
29889,
936,
29918,
2271,
1723,
13,
13,
1678,
822,
4959,
29918,
27765,
29898,
1311,
1125,
13,
4706,
5434,
29918,
23392,
29918,
13604,
353,
1583,
29889,
23392,
29889,
13604,
29918,
27765,
580,
13,
4706,
1121,
353,
426,
13,
308,
12,
29915,
284,
430,
388,
29918,
13604,
2396,
19997,
13,
308,
12,
29915,
15227,
29918,
13604,
2396,
5159,
13,
4706,
500,
13,
4706,
363,
1741,
297,
5434,
29918,
23392,
29918,
13604,
29901,
13,
308,
12,
5479,
353,
1741,
29889,
657,
877,
16652,
8098,
1495,
13,
308,
12,
361,
4423,
322,
337,
29889,
4478,
29898,
1311,
29889,
5479,
29918,
13087,
29886,
29892,
4423,
29892,
13449,
29922,
276,
29889,
6259,
6632,
1525,
23487,
1125,
13,
308,
12,
12,
3696,
29918,
8977,
353,
9657,
580,
13,
308,
12,
12,
1454,
413,
29892,
29894,
297,
1741,
29889,
7076,
7295,
13,
308,
12,
12,
12,
29895,
353,
413,
29889,
13609,
2141,
6506,
877,
29899,
742,
22868,
1495,
13,
308,
12,
12,
12,
3696,
29918,
8977,
29961,
29895,
29962,
353,
325,
13,
308,
12,
12,
361,
1134,
29898,
3696,
29889,
657,
877,
12972,
25826,
2824,
6008,
29897,
1275,
2635,
29901,
13,
308,
12,
12,
12,
2914,
1839,
284,
430,
388,
29918,
13604,
13359,
4397,
29898,
3696,
29918,
8977,
29897,
13,
308,
12,
12,
2870,
29901,
13,
308,
12,
12,
12,
2914,
1839,
15227,
29918,
13604,
13359,
4397,
29898,
3696,
29918,
8977,
29897,
13,
4706,
12,
29937,
20025,
2729,
373,
1369,
29899,
2230,
29889,
13,
4706,
12,
2914,
1839,
15227,
29918,
13604,
2033,
353,
12705,
29898,
2914,
1839,
15227,
29918,
13604,
7464,
14013,
263,
29892,
29890,
29901,
274,
1526,
29898,
29874,
1839,
6008,
2962,
13359,
6008,
29892,
289,
1839,
6008,
2962,
13359,
6008,
876,
13,
4706,
736,
1121,
2
] |
orangecontrib/esrf/xoppy/widgets/extension/Transfocator_test.py | oasys-esrf-kit/OASYS1-ESRF-Extensions | 0 | 130339 | import sys
import numpy
from PyQt5.QtWidgets import QApplication, QMessageBox, QSizePolicy
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from oasys.widgets.exchange import DataExchangeObject
from orangecontrib.xoppy.util.xoppy_xraylib_util import xpower_calc
from oasys.widgets.exchange import DataExchangeObject
from orangecontrib.xoppy.widgets.gui.ow_xoppy_widget import XoppyWidget
import scipy.constants as codata
class Transfocator(XoppyWidget):
name = "Transfocator"
id = "orange.widgets.dataxpower"
description = "Power Absorbed and Transmitted by Optical Elements"
icon = "icons/xoppy_xpower.png"
priority = 10
category = ""
keywords = ["xoppy", "power", "Transfocator"]
inputs = [("ExchangeData", DataExchangeObject, "acceptExchangeData")]
SOURCE = Setting(2)
PINHOLE_APERTURE = Setting(1e-4)
NUMBER_LENS = Setting(26)
SUBSTANCE = Setting('Be')
THICK = Setting(0.05)
DENS = Setting('?')
ENER_MIN = Setting(10000.0)
ENER_MAX = Setting(200000.0)
ENER_N = Setting(2000)
SOURCE_FILE = Setting("?")
FILE_DUMP = 0
def build_gui(self):
self.leftWidgetPart.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding))
self.leftWidgetPart.setMaximumWidth(self.CONTROL_AREA_WIDTH + 20)
self.leftWidgetPart.updateGeometry()
box = oasysgui.widgetBox(self.controlArea, self.name + " Input Parameters", orientation="vertical", width=self.CONTROL_AREA_WIDTH-10)
idx = -1
# widget index 1
idx += 1
box1 = gui.widgetBox(box)
self.box_source = gui.comboBox(box1, self, "SOURCE",
label=self.unitLabels()[idx], addSpace=False,
items=['From Oasys wire', 'Normalized to 1',
'From external file. '],
valueType=int, orientation="horizontal", labelWidth=150)
self.show_at(self.unitFlags()[idx], box1)
#widget index 1.5
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "PINHOLE_APERTURE",
label=self.unitLabels()[idx], addSpace=False, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
# widget index 2
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "NUMBER_LENS",
label=self.unitLabels()[idx], addSpace=False,
valueType=int, orientation="horizontal", labelWidth=150)
self.show_at(self.unitFlags()[idx], box1)
# widget index 3
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "SUBSTANCE",
label=self.unitLabels()[idx], addSpace=False, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
# widget index 4
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "THICK",
label=self.unitLabels()[idx], addSpace=False,
valueType=float, orientation="horizontal", labelWidth=150)
self.show_at(self.unitFlags()[idx], box1)
# widget index 5
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "DENS",
label=self.unitLabels()[idx], addSpace=False,
valueType=float, orientation="horizontal", labelWidth=150)
self.show_at(self.unitFlags()[idx], box1)
# widget index 6
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "ENER_MIN",
label=self.unitLabels()[idx], addSpace=False,
valueType=float, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
# widget index 7
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "ENER_MAX",
label=self.unitLabels()[idx], addSpace=False,
valueType=float, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
# widget index 8
idx += 1
box1 = gui.widgetBox(box)
oasysgui.lineEdit(box1, self, "ENER_N",
label=self.unitLabels()[idx], addSpace=False,
valueType=int, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
# widget index 9 *********** File Browser ******************
idx += 1
box1 = gui.widgetBox(box)
file_box_id = oasysgui.widgetBox(box1, "", addSpace=False, orientation="horizontal")
self.file_id = oasysgui.lineEdit(file_box_id, self, "SOURCE_FILE", self.unitLabels()[idx],
labelWidth=100, valueType=str, orientation="horizontal")
gui.button(file_box_id, self, "...", callback=self.select_input_file, width=25)
self.show_at(self.unitFlags()[idx], box1)
#widget index 10
idx += 1
box1 = gui.widgetBox(box)
gui.separator(box1, height=7)
gui.comboBox(box1, self, "FILE_DUMP",
label=self.unitLabels()[idx], addSpace=False,
items=['No', 'Yes (transfo.spec)'],
valueType=int, orientation="horizontal", labelWidth=250)
self.show_at(self.unitFlags()[idx], box1)
self.input_spectrum = None
def select_input_file(self):
self.file_id.setText(oasysgui.selectFileFromDialog(self, self.SOURCE_FILE,
"Open 2-columns file with spectral power",
file_extension_filter="ascii dat (*.dat *.txt *spec)"))
def unitLabels(self):
return ['Input beam:','Pinhole aperture [m]', 'Number of Lens','Element','Thickness [mm]',
'Density g/cm^3',
'From energy [eV]: ',
'To energy [eV]:',
'Energy points: ',
'File with input beam spectral power:',"Dump file"]
def unitFlags(self):
return ['True','True','True','True','True',
'True',
'self.SOURCE == 1',
'self.SOURCE == 1',
'self.SOURCE == 1',
'self.SOURCE == 2',
'True']
def get_help_name(self):
return 'Transfocator'
def selectFile(self):
self.le_source_file.setText(oasysgui.selectFileFromDialog(self, self.SOURCE_FILE, "Open Source File", file_extension_filter="*.*"))
def acceptExchangeData(self, exchangeData):
self.input_spectrum = None
self.SOURCE = 0
# self.box_source.setCurrentIndex(self.SOURCE)
try:
if not exchangeData is None:
if exchangeData.get_program_name() == "XOPPY":
no_bandwidth = False
if exchangeData.get_widget_name() =="UNDULATOR_FLUX" :
# self.SOURCE_FILE = "xoppy_undulator_flux"
no_bandwidth = True
index_flux = 2
elif exchangeData.get_widget_name() == "BM" :
if exchangeData.get_content("is_log_plot") == 1:
raise Exception("Logaritmic X scale of Xoppy Energy distribution not supported")
if exchangeData.get_content("calculation_type") == 0 and exchangeData.get_content("psi") == 0:
# self.SOURCE_FILE = "xoppy_bm_flux"
no_bandwidth = True
index_flux = 6
else:
raise Exception("Xoppy result is not an Flux vs Energy distribution integrated in Psi")
elif exchangeData.get_widget_name() =="XWIGGLER" :
# self.SOURCE_FILE = "xoppy_xwiggler_flux"
no_bandwidth = True
index_flux = 2
elif exchangeData.get_widget_name() =="WS" :
# self.SOURCE_FILE = "xoppy_xwiggler_flux"
no_bandwidth = True
index_flux = 2
elif exchangeData.get_widget_name() =="XTUBES" :
# self.SOURCE_FILE = "xoppy_xtubes_flux"
index_flux = 1
no_bandwidth = True
elif exchangeData.get_widget_name() =="XTUBE_W" :
# self.SOURCE_FILE = "xoppy_xtube_w_flux"
index_flux = 1
no_bandwidth = True
elif exchangeData.get_widget_name() =="BLACK_BODY" :
# self.SOURCE_FILE = "xoppy_black_body_flux"
no_bandwidth = True
index_flux = 2
elif exchangeData.get_widget_name() =="UNDULATOR_RADIATION" :
# self.SOURCE_FILE = "xoppy_undulator_radiation"
no_bandwidth = True
index_flux = 1
elif exchangeData.get_widget_name() =="POWER" :
# self.SOURCE_FILE = "xoppy_undulator_power"
no_bandwidth = True
index_flux = -1
elif exchangeData.get_widget_name() =="POWER3D" :
# self.SOURCE_FILE = "xoppy_power3d"
no_bandwidth = True
index_flux = 1
else:
raise Exception("Xoppy Source not recognized")
# self.SOURCE_FILE += "_" + str(id(self)) + ".dat"
spectrum = exchangeData.get_content("xoppy_data")
if exchangeData.get_widget_name() =="UNDULATOR_RADIATION" or \
exchangeData.get_widget_name() =="POWER3D":
[p, e, h, v ] = spectrum
tmp = p.sum(axis=2).sum(axis=1)*(h[1]-h[0])*(v[1]-v[0])*codata.e*1e3
spectrum = numpy.vstack((e,p.sum(axis=2).sum(axis=1)*(h[1]-h[0])*(v[1]-v[0])*
codata.e*1e3))
self.input_spectrum = spectrum
else:
if not no_bandwidth:
spectrum[:,index_flux] /= 0.001*spectrum[:,0]
self.input_spectrum = numpy.vstack((spectrum[:,0],spectrum[:,index_flux]))
self.process_showers()
self.compute()
except Exception as exception:
QMessageBox.critical(self, "Error",
str(exception),
QMessageBox.Ok)
#raise exception
def check_fields(self):
self.NUMBER_LENS = congruence.checkStrictlyPositiveNumber(self.NUMBER_LENS, "Number of Lens")
self.THICK = congruence.checkStrictlyPositiveNumber(self.THICK, "Thickness")
if self.SOURCE == 1:
self.ENER_MIN = congruence.checkPositiveNumber(self.ENER_MIN, "Energy from")
self.ENER_MAX = congruence.checkStrictlyPositiveNumber(self.ENER_MAX, "Energy to")
congruence.checkLessThan(self.ENER_MIN, self.ENER_MAX, "Energy from", "Energy to")
self.NPOINTS = congruence.checkStrictlyPositiveNumber(self.ENER_N, "Energy Points")
elif self.SOURCE == 2:
congruence.checkFile(self.SOURCE_FILE)
def do_xoppy_calculation(self):
return self.xoppy_calc_xpower()
def extract_data_from_xoppy_output(self, calculation_output):
return calculation_output
def get_data_exchange_widget_name(self):
return "POWER"
def getTitles(self):
return ['Input Beam','Transmitivity','Absorption','Intensity']
def getXTitles(self):
return ["Energy [eV]","Energy [eV]","Energy [eV]","Energy [eV]"]
def getYTitles(self):
return ["Source",'Transmitivity','Absorption',"Intensity"]
def getVariablesToPlot(self):
return [(0, 1),(0, 2),(0, 3),(0, 4)]
def getLogPlot(self):
return [(False,False),(False, False),(False, False),(False,False) ]
def Transmitivity(self):
return E,T
def xoppy_calc_xpower(self):
Result=[]
Result_Absorption = []
list=[]
cumulated_data = {}
if self.SOURCE == 0:
if self.input_spectrum is None:
raise Exception("No input beam")
else:
energies = self.input_spectrum[0,:].copy()
source = self.input_spectrum[1,:].copy()
elif self.SOURCE == 1:
energies = numpy.linspace(self.ENER_MIN,self.ENER_MAX,self.ENER_N)
source = numpy.ones(energies.size)
tmp = numpy.vstack( (energies,source))
self.input_spectrum = source
elif self.SOURCE == 2:
if self.SOURCE == 2: source_file = self.SOURCE_FILE
try:
tmp = numpy.loadtxt(source_file)
energies = tmp[:,0]
source = tmp[:,1]
self.input_spectrum = source
except:
print("Error loading file %s "%(source_file))
raise
if self.FILE_DUMP == 0:
output_file = None
else:
output_file = "Transfo.spec"
try:
print(out_dictionary["info"])
except:
pass
#calculate attenuators total
Result.append((out_dictionary['data'][0]).tolist())
Result.append((out_dictionary['data'][1]).tolist())
for k in range(self.NUMBER_LENS):
list.append(out_dictionary['data'][4 + 5*k])
Result.append(List_Product(list))
for k in range(len(Result[0])):
Result_Absorption.append(1-Result[-1][k])
Result.append(Result_Absorption)
Result.append((out_dictionary['data'][5*len(substance)+1]).tolist())
cumulated_data['data']=numpy.array(Result)
#send exchange
calculated_data = DataExchangeObject("XOPPY", self.get_data_exchange_widget_name())
try:
calculated_data.add_content("xoppy_data", cumulated_data["data"].T)
except:
pass
return calculated_data
def List_Product(list):
L = []
l = 1
for k in range(len(list[0])):
for i in range(len(list)):
l = l * list[i][k]
L.append(l)
l = 1
return (L)
if __name__ == "__main__":
from oasys.widgets.exchange import DataExchangeObject
input_data_type = "POWER"
if input_data_type == "POWER":
# create fake UNDULATOR_FLUX xoppy exchange data
e = numpy.linspace(1000.0, 10000.0, 100)
source = e/10
received_data = DataExchangeObject("XOPPY", "POWER")
received_data.add_content("xoppy_data", numpy.vstack((e,e,source)).T)
received_data.add_content("xoppy_code", "US")
elif input_data_type == "POWER3D":
# create unulator_radiation xoppy exchange data
from orangecontrib.xoppy.util.xoppy_undulators import xoppy_calc_undulator_radiation
e, h, v, p, code = xoppy_calc_undulator_radiation(ELECTRONENERGY=6.04,ELECTRONENERGYSPREAD=0.001,ELECTRONCURRENT=0.2,\
ELECTRONBEAMSIZEH=0.000395,ELECTRONBEAMSIZEV=9.9e-06,\
ELECTRONBEAMDIVERGENCEH=1.05e-05,ELECTRONBEAMDIVERGENCEV=3.9e-06,\
PERIODID=0.018,NPERIODS=222,KV=1.68,DISTANCE=30.0,
SETRESONANCE=0,HARMONICNUMBER=1,
GAPH=0.001,GAPV=0.001,\
HSLITPOINTS=41,VSLITPOINTS=41,METHOD=0,
PHOTONENERGYMIN=7000,PHOTONENERGYMAX=8100,PHOTONENERGYPOINTS=20,
USEEMITTANCES=1)
received_data = DataExchangeObject("XOPPY", "POWER3D")
received_data = DataExchangeObject("XOPPY", "UNDULATOR_RADIATION")
received_data.add_content("xoppy_data", [p, e, h, v])
received_data.add_content("xoppy_code", code)
app = QApplication(sys.argv)
w = Transfocator()
w.acceptExchangeData(received_data)
w.show()
app.exec()
w.saveSettings() | [
1,
1053,
10876,
13,
5215,
12655,
13,
3166,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
4873,
29892,
660,
3728,
3313,
29892,
660,
3505,
15644,
13,
13,
3166,
24841,
8030,
1053,
1410,
29875,
13,
3166,
24841,
8030,
29889,
11027,
1053,
21605,
13,
3166,
288,
294,
952,
29889,
8030,
29879,
1053,
1410,
29875,
408,
288,
294,
952,
23569,
29892,
378,
7108,
663,
13,
3166,
288,
294,
952,
29889,
8030,
29879,
29889,
6543,
1053,
3630,
1252,
3167,
2061,
13,
3166,
24841,
21570,
29889,
29916,
9354,
29891,
29889,
4422,
29889,
29916,
9354,
29891,
29918,
29916,
764,
1982,
29918,
4422,
1053,
921,
13519,
29918,
28667,
13,
13,
3166,
288,
294,
952,
29889,
8030,
29879,
29889,
6543,
1053,
3630,
1252,
3167,
2061,
13,
3166,
24841,
21570,
29889,
29916,
9354,
29891,
29889,
8030,
29879,
29889,
23569,
29889,
340,
29918,
29916,
9354,
29891,
29918,
8030,
1053,
1060,
9354,
29891,
8801,
13,
13,
13,
5215,
4560,
2272,
29889,
3075,
1934,
408,
15234,
532,
13,
13,
1990,
4103,
29888,
542,
1061,
29898,
29990,
9354,
29891,
8801,
1125,
13,
1678,
1024,
353,
376,
4300,
29888,
542,
1061,
29908,
13,
1678,
1178,
353,
376,
272,
927,
29889,
8030,
29879,
29889,
1272,
29916,
13519,
29908,
13,
1678,
6139,
353,
376,
21472,
24650,
272,
2580,
322,
4103,
29885,
4430,
491,
20693,
936,
10619,
29879,
29908,
13,
1678,
9849,
353,
376,
27078,
29914,
29916,
9354,
29891,
29918,
29916,
13519,
29889,
2732,
29908,
13,
1678,
20136,
353,
29871,
29896,
29900,
13,
1678,
7663,
353,
5124,
13,
1678,
29361,
353,
6796,
29916,
9354,
29891,
613,
376,
13519,
613,
376,
4300,
29888,
542,
1061,
3108,
13,
13,
1678,
10970,
353,
518,
703,
1252,
3167,
1469,
613,
3630,
1252,
3167,
2061,
29892,
376,
16044,
1252,
3167,
1469,
13531,
13,
13,
13,
1678,
7791,
4574,
4741,
353,
21605,
29898,
29906,
29897,
13,
1678,
349,
1177,
8187,
1307,
29918,
3301,
20161,
11499,
353,
21605,
29898,
29896,
29872,
29899,
29946,
29897,
13,
1678,
28019,
13635,
29918,
1307,
3059,
353,
21605,
29898,
29906,
29953,
29897,
13,
1678,
27092,
1254,
23219,
353,
21605,
877,
3629,
1495,
13,
1678,
3446,
2965,
29968,
353,
21605,
29898,
29900,
29889,
29900,
29945,
29897,
13,
1678,
360,
1430,
29903,
353,
21605,
877,
29973,
1495,
13,
1678,
12524,
1001,
29918,
16173,
353,
21605,
29898,
29896,
29900,
29900,
29900,
29900,
29889,
29900,
29897,
13,
1678,
12524,
1001,
29918,
12648,
353,
21605,
29898,
29906,
29900,
29900,
29900,
29900,
29900,
29889,
29900,
29897,
13,
1678,
12524,
1001,
29918,
29940,
353,
21605,
29898,
29906,
29900,
29900,
29900,
29897,
13,
1678,
7791,
4574,
4741,
29918,
7724,
353,
21605,
703,
29973,
1159,
13,
1678,
24080,
29918,
14849,
3580,
353,
29871,
29900,
13,
13,
1678,
822,
2048,
29918,
23569,
29898,
1311,
1125,
13,
13,
4706,
1583,
29889,
1563,
8801,
7439,
29889,
842,
3505,
15644,
29898,
29984,
3505,
15644,
29898,
29984,
3505,
15644,
29889,
8140,
12539,
29777,
292,
29892,
660,
3505,
15644,
29889,
8140,
12539,
29777,
292,
876,
13,
4706,
1583,
29889,
1563,
8801,
7439,
29889,
842,
7976,
12539,
6110,
29898,
1311,
29889,
22412,
1672,
29931,
29918,
29909,
1525,
29909,
29918,
22574,
718,
29871,
29906,
29900,
29897,
13,
4706,
1583,
29889,
1563,
8801,
7439,
29889,
5504,
7999,
7843,
580,
13,
13,
4706,
3800,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
1311,
29889,
6451,
13799,
29892,
1583,
29889,
978,
718,
376,
10567,
12662,
2699,
613,
19843,
543,
18575,
613,
2920,
29922,
1311,
29889,
22412,
1672,
29931,
29918,
29909,
1525,
29909,
29918,
22574,
29899,
29896,
29900,
29897,
13,
13,
4706,
22645,
353,
448,
29896,
13,
13,
4706,
396,
11109,
2380,
29871,
29896,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
1583,
29889,
1884,
29918,
4993,
353,
1410,
29875,
29889,
510,
17801,
29898,
1884,
29896,
29892,
1583,
29892,
376,
27839,
4741,
613,
13,
462,
462,
539,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
462,
539,
4452,
29922,
1839,
4591,
438,
294,
952,
8014,
742,
525,
19077,
1891,
304,
29871,
29896,
742,
13,
462,
462,
795,
525,
4591,
7029,
934,
29889,
18884,
525,
1402,
13,
462,
462,
539,
995,
1542,
29922,
524,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29896,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
13,
4706,
396,
8030,
2380,
29871,
29896,
29889,
29945,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
29925,
1177,
8187,
1307,
29918,
3301,
20161,
11499,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29906,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
23207,
29918,
1307,
3059,
613,
13,
462,
462,
539,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
462,
539,
995,
1542,
29922,
524,
29892,
29871,
19843,
543,
22672,
613,
3858,
6110,
29922,
29896,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29941,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
20633,
1254,
23219,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29946,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
4690,
2965,
29968,
613,
13,
462,
462,
539,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
462,
539,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29896,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29945,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
29928,
1430,
29903,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
3986,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29896,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29953,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
1430,
1001,
29918,
16173,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
3986,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29955,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
1430,
1001,
29918,
12648,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
3986,
995,
1542,
29922,
7411,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29947,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1884,
29896,
29892,
1583,
29892,
376,
1430,
1001,
29918,
29940,
613,
13,
462,
3986,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
3986,
995,
1542,
29922,
524,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
396,
11109,
2380,
29871,
29929,
334,
4189,
1068,
259,
3497,
27088,
334,
7775,
29930,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
934,
29918,
1884,
29918,
333,
353,
288,
294,
952,
23569,
29889,
8030,
3313,
29898,
1884,
29896,
29892,
12633,
788,
14936,
29922,
8824,
29892,
19843,
543,
22672,
1159,
13,
4706,
1583,
29889,
1445,
29918,
333,
353,
288,
294,
952,
23569,
29889,
1220,
6103,
29898,
1445,
29918,
1884,
29918,
333,
29892,
1583,
29892,
376,
27839,
4741,
29918,
7724,
613,
1583,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
13,
462,
462,
308,
3858,
6110,
29922,
29896,
29900,
29900,
29892,
995,
1542,
29922,
710,
29892,
19843,
543,
22672,
1159,
13,
4706,
1410,
29875,
29889,
3092,
29898,
1445,
29918,
1884,
29918,
333,
29892,
1583,
29892,
29804,
613,
6939,
29922,
1311,
29889,
2622,
29918,
2080,
29918,
1445,
29892,
2920,
29922,
29906,
29945,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
13,
4706,
396,
8030,
2380,
29871,
29896,
29900,
13,
4706,
22645,
4619,
29871,
29896,
13,
4706,
3800,
29896,
353,
1410,
29875,
29889,
8030,
3313,
29898,
1884,
29897,
13,
4706,
1410,
29875,
29889,
344,
17954,
29898,
1884,
29896,
29892,
3171,
29922,
29955,
29897,
13,
13,
4706,
1410,
29875,
29889,
510,
17801,
29898,
1884,
29896,
29892,
1583,
29892,
376,
7724,
29918,
14849,
3580,
613,
13,
462,
268,
3858,
29922,
1311,
29889,
5441,
4775,
29879,
580,
29961,
13140,
1402,
788,
14936,
29922,
8824,
29892,
13,
462,
1678,
4452,
29922,
1839,
3782,
742,
525,
8241,
313,
3286,
1181,
29889,
6550,
29897,
7464,
13,
462,
1678,
995,
1542,
29922,
524,
29892,
19843,
543,
22672,
613,
3858,
6110,
29922,
29906,
29945,
29900,
29897,
13,
4706,
1583,
29889,
4294,
29918,
271,
29898,
1311,
29889,
5441,
15675,
580,
29961,
13140,
1402,
3800,
29896,
29897,
13,
13,
4706,
1583,
29889,
2080,
29918,
21494,
5848,
353,
6213,
13,
13,
13,
13,
13,
1678,
822,
1831,
29918,
2080,
29918,
1445,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1445,
29918,
333,
29889,
12038,
29898,
29877,
294,
952,
23569,
29889,
2622,
2283,
4591,
7647,
29898,
1311,
29892,
1583,
29889,
27839,
4741,
29918,
7724,
29892,
13,
462,
462,
1678,
376,
6585,
29871,
29906,
29899,
13099,
934,
411,
23161,
3081,
613,
13,
462,
462,
1678,
934,
29918,
17588,
29918,
4572,
543,
294,
18869,
1418,
3070,
29889,
4130,
20611,
3945,
334,
6550,
5513,
876,
13,
13,
13,
13,
1678,
822,
5190,
4775,
29879,
29898,
1311,
1125,
13,
308,
736,
6024,
4290,
22913,
29901,
3788,
29925,
21307,
280,
263,
10700,
545,
518,
29885,
29962,
742,
525,
4557,
310,
365,
575,
3788,
2642,
3788,
1349,
860,
2264,
518,
4317,
29962,
742,
13,
462,
525,
29928,
575,
537,
330,
29914,
4912,
29985,
29941,
742,
13,
462,
525,
4591,
5864,
518,
29872,
29963,
5387,
418,
13420,
13,
462,
525,
1762,
5864,
518,
29872,
29963,
5387,
742,
13,
462,
525,
29923,
1089,
1927,
3291,
29901,
29871,
13420,
13,
462,
525,
2283,
411,
1881,
22913,
23161,
3081,
29901,
742,
29908,
29928,
3427,
934,
3108,
13,
13,
13,
1678,
822,
5190,
15675,
29898,
1311,
1125,
13,
308,
736,
6024,
5574,
3788,
5574,
3788,
5574,
3788,
5574,
3788,
5574,
742,
13,
462,
525,
5574,
742,
13,
462,
525,
1311,
29889,
27839,
4741,
29871,
1275,
259,
29896,
742,
13,
462,
525,
1311,
29889,
27839,
4741,
29871,
1275,
259,
29896,
742,
13,
462,
525,
1311,
29889,
27839,
4741,
29871,
1275,
259,
29896,
742,
13,
462,
525,
1311,
29889,
27839,
4741,
29871,
1275,
259,
29906,
742,
13,
462,
525,
5574,
2033,
13,
13,
1678,
822,
679,
29918,
8477,
29918,
978,
29898,
1311,
1125,
13,
4706,
736,
525,
4300,
29888,
542,
1061,
29915,
13,
13,
1678,
822,
1831,
2283,
29898,
1311,
1125,
13,
4706,
1583,
29889,
280,
29918,
4993,
29918,
1445,
29889,
12038,
29898,
29877,
294,
952,
23569,
29889,
2622,
2283,
4591,
7647,
29898,
1311,
29892,
1583,
29889,
27839,
4741,
29918,
7724,
29892,
376,
6585,
7562,
3497,
613,
934,
29918,
17588,
29918,
4572,
543,
29930,
5575,
5783,
13,
13,
1678,
822,
3544,
1252,
3167,
1469,
29898,
1311,
29892,
14523,
1469,
1125,
13,
13,
4706,
1583,
29889,
2080,
29918,
21494,
5848,
353,
6213,
13,
4706,
1583,
29889,
27839,
4741,
353,
29871,
29900,
13,
4706,
396,
1583,
29889,
1884,
29918,
4993,
29889,
842,
7583,
3220,
29898,
1311,
29889,
27839,
4741,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
565,
451,
14523,
1469,
338,
6213,
29901,
13,
18884,
565,
14523,
1469,
29889,
657,
29918,
8860,
29918,
978,
580,
1275,
376,
29990,
4590,
20055,
1115,
13,
462,
1678,
694,
29918,
4980,
2103,
353,
7700,
13,
462,
1678,
565,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
18783,
13309,
1299,
1955,
29918,
10536,
29965,
29990,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
870,
9183,
29918,
1579,
1314,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29906,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
1275,
376,
29933,
29924,
29908,
584,
13,
462,
4706,
565,
14523,
1469,
29889,
657,
29918,
3051,
703,
275,
29918,
1188,
29918,
5317,
1159,
1275,
29871,
29896,
29901,
13,
462,
9651,
12020,
8960,
703,
3403,
279,
277,
13076,
1060,
6287,
310,
1060,
9354,
29891,
24836,
4978,
451,
6969,
1159,
13,
462,
4706,
565,
14523,
1469,
29889,
657,
29918,
3051,
703,
15807,
362,
29918,
1853,
1159,
1275,
29871,
29900,
322,
14523,
1469,
29889,
657,
29918,
3051,
703,
6134,
1159,
1275,
29871,
29900,
29901,
13,
462,
9651,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
5838,
29918,
1579,
1314,
29908,
13,
462,
9651,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
9651,
2380,
29918,
1579,
1314,
353,
29871,
29953,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
12020,
8960,
703,
29990,
9354,
29891,
1121,
338,
451,
385,
2379,
1314,
7186,
24836,
4978,
23387,
297,
349,
1039,
1159,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
29990,
29956,
6259,
7239,
1001,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
29916,
9192,
29887,
1358,
29918,
1579,
1314,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29906,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
7811,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
29916,
9192,
29887,
1358,
29918,
1579,
1314,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29906,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
12188,
7466,
2890,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
486,
431,
267,
29918,
1579,
1314,
29908,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29896,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
12188,
7466,
29923,
29918,
29956,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
486,
4003,
29918,
29893,
29918,
1579,
1314,
29908,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29896,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
13367,
11375,
29918,
8456,
29928,
29979,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
8517,
29918,
2587,
29918,
1579,
1314,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29906,
13,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
18783,
13309,
1299,
1955,
29918,
29934,
3035,
29902,
8098,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
870,
9183,
29918,
3665,
11685,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29896,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
29925,
9806,
1001,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
870,
9183,
29918,
13519,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
448,
29896,
13,
462,
1678,
25342,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
29925,
9806,
1001,
29941,
29928,
29908,
584,
13,
462,
4706,
396,
1583,
29889,
27839,
4741,
29918,
7724,
353,
376,
29916,
9354,
29891,
29918,
13519,
29941,
29881,
29908,
13,
462,
4706,
694,
29918,
4980,
2103,
353,
5852,
13,
462,
4706,
2380,
29918,
1579,
1314,
353,
29871,
29896,
13,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
12020,
8960,
703,
29990,
9354,
29891,
7562,
451,
14831,
1159,
13,
13,
462,
1678,
396,
1583,
29889,
27839,
4741,
29918,
7724,
4619,
11119,
29908,
718,
851,
29898,
333,
29898,
1311,
876,
718,
11393,
4130,
29908,
13,
13,
13,
462,
1678,
18272,
353,
14523,
1469,
29889,
657,
29918,
3051,
703,
29916,
9354,
29891,
29918,
1272,
1159,
13,
13,
462,
1678,
565,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
18783,
13309,
1299,
1955,
29918,
29934,
3035,
29902,
8098,
29908,
470,
320,
13,
462,
4706,
14523,
1469,
29889,
657,
29918,
8030,
29918,
978,
580,
353,
543,
29925,
9806,
1001,
29941,
29928,
1115,
13,
462,
4706,
518,
29886,
29892,
321,
29892,
298,
29892,
325,
4514,
353,
18272,
13,
462,
4706,
13128,
353,
282,
29889,
2083,
29898,
8990,
29922,
29906,
467,
2083,
29898,
8990,
29922,
29896,
11877,
29898,
29882,
29961,
29896,
29962,
29899,
29882,
29961,
29900,
2314,
16395,
29894,
29961,
29896,
29962,
29899,
29894,
29961,
29900,
2314,
29930,
19284,
532,
29889,
29872,
29930,
29896,
29872,
29941,
13,
462,
4706,
18272,
353,
12655,
29889,
29894,
1429,
3552,
29872,
29892,
29886,
29889,
2083,
29898,
8990,
29922,
29906,
467,
2083,
29898,
8990,
29922,
29896,
11877,
29898,
29882,
29961,
29896,
29962,
29899,
29882,
29961,
29900,
2314,
16395,
29894,
29961,
29896,
29962,
29899,
29894,
29961,
29900,
2314,
29930,
13,
462,
462,
462,
15234,
532,
29889,
29872,
29930,
29896,
29872,
29941,
876,
13,
462,
4706,
1583,
29889,
2080,
29918,
21494,
5848,
353,
18272,
13,
462,
1678,
1683,
29901,
13,
13,
462,
4706,
565,
451,
694,
29918,
4980,
2103,
29901,
13,
462,
9651,
18272,
7503,
29892,
2248,
29918,
1579,
1314,
29962,
847,
29922,
29871,
29900,
29889,
29900,
29900,
29896,
29930,
21494,
5848,
7503,
29892,
29900,
29962,
13,
13,
462,
4706,
1583,
29889,
2080,
29918,
21494,
5848,
353,
12655,
29889,
29894,
1429,
3552,
21494,
5848,
7503,
29892,
29900,
1402,
21494,
5848,
7503,
29892,
2248,
29918,
1579,
1314,
12622,
13,
13,
462,
1678,
1583,
29889,
5014,
29918,
4294,
414,
580,
13,
462,
1678,
1583,
29889,
26017,
580,
13,
13,
4706,
5174,
8960,
408,
3682,
29901,
13,
9651,
660,
3728,
3313,
29889,
9695,
936,
29898,
1311,
29892,
376,
2392,
613,
13,
462,
462,
539,
851,
29898,
11739,
511,
13,
18884,
660,
3728,
3313,
29889,
20434,
29897,
13,
13,
9651,
396,
22692,
3682,
13,
13,
13,
13,
13,
1678,
822,
1423,
29918,
9621,
29898,
1311,
1125,
13,
4706,
1583,
29889,
23207,
29918,
1307,
3059,
353,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
23207,
29918,
1307,
3059,
29892,
376,
4557,
310,
365,
575,
1159,
13,
4706,
1583,
29889,
4690,
2965,
29968,
353,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
4690,
2965,
29968,
29892,
376,
1349,
860,
2264,
1159,
13,
4706,
565,
1583,
29889,
27839,
4741,
1275,
29871,
29896,
29901,
13,
9651,
1583,
29889,
1430,
1001,
29918,
16173,
353,
378,
7108,
663,
29889,
3198,
9135,
3321,
4557,
29898,
1311,
29889,
1430,
1001,
29918,
16173,
29892,
376,
29923,
1089,
1927,
515,
1159,
13,
9651,
1583,
29889,
1430,
1001,
29918,
12648,
353,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
1430,
1001,
29918,
12648,
29892,
376,
29923,
1089,
1927,
304,
1159,
13,
9651,
378,
7108,
663,
29889,
3198,
29931,
404,
1349,
273,
29898,
1311,
29889,
1430,
1001,
29918,
16173,
29892,
1583,
29889,
1430,
1001,
29918,
12648,
29892,
376,
29923,
1089,
1927,
515,
613,
376,
29923,
1089,
1927,
304,
1159,
13,
9651,
1583,
29889,
25500,
6992,
9375,
353,
378,
7108,
663,
29889,
3198,
5015,
919,
368,
9135,
3321,
4557,
29898,
1311,
29889,
1430,
1001,
29918,
29940,
29892,
376,
29923,
1089,
1927,
8984,
29879,
1159,
13,
4706,
25342,
1583,
29889,
27839,
4741,
1275,
29871,
29906,
29901,
13,
9651,
378,
7108,
663,
29889,
3198,
2283,
29898,
1311,
29889,
27839,
4741,
29918,
7724,
29897,
13,
13,
1678,
822,
437,
29918,
29916,
9354,
29891,
29918,
15807,
362,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29916,
9354,
29891,
29918,
28667,
29918,
29916,
13519,
580,
13,
13,
1678,
822,
6597,
29918,
1272,
29918,
3166,
29918,
29916,
9354,
29891,
29918,
4905,
29898,
1311,
29892,
13944,
29918,
4905,
1125,
13,
4706,
736,
13944,
29918,
4905,
13,
13,
13,
1678,
822,
679,
29918,
1272,
29918,
6543,
29918,
8030,
29918,
978,
29898,
1311,
1125,
13,
4706,
736,
376,
29925,
9806,
1001,
29908,
13,
13,
13,
13,
1678,
822,
679,
29911,
277,
793,
29898,
1311,
1125,
13,
4706,
736,
6024,
4290,
1522,
314,
3788,
4300,
2415,
2068,
3788,
4920,
29879,
272,
683,
3788,
2928,
575,
537,
2033,
13,
13,
1678,
822,
679,
12188,
277,
793,
29898,
1311,
1125,
13,
4706,
736,
6796,
29923,
1089,
1927,
518,
29872,
29963,
29962,
3284,
29923,
1089,
1927,
518,
29872,
29963,
29962,
3284,
29923,
1089,
1927,
518,
29872,
29963,
29962,
3284,
29923,
1089,
1927,
518,
29872,
29963,
29962,
3108,
13,
13,
1678,
822,
679,
29979,
29911,
277,
793,
29898,
1311,
1125,
13,
4706,
736,
6796,
4435,
613,
29915,
4300,
2415,
2068,
3788,
4920,
29879,
272,
683,
742,
29908,
2928,
575,
537,
3108,
13,
13,
13,
1678,
822,
679,
10444,
1849,
1762,
20867,
29898,
1311,
1125,
13,
4706,
736,
17288,
29900,
29892,
29871,
29896,
21336,
29900,
29892,
29871,
29906,
21336,
29900,
29892,
29871,
29941,
21336,
29900,
29892,
29871,
29946,
4638,
13,
13,
1678,
822,
679,
3403,
20867,
29898,
1311,
1125,
13,
4706,
736,
17288,
8824,
29892,
8824,
21336,
8824,
29892,
7700,
21336,
8824,
29892,
7700,
21336,
8824,
29892,
8824,
29897,
4514,
13,
13,
13,
1678,
822,
4103,
2415,
2068,
29898,
1311,
1125,
13,
4706,
736,
382,
29892,
29911,
13,
13,
1678,
822,
921,
9354,
29891,
29918,
28667,
29918,
29916,
13519,
29898,
1311,
1125,
13,
13,
4706,
7867,
29922,
2636,
13,
4706,
7867,
29918,
4920,
29879,
272,
683,
353,
5159,
13,
4706,
1051,
29922,
2636,
13,
4706,
13299,
7964,
29918,
1272,
353,
6571,
13,
13,
13,
4706,
565,
1583,
29889,
27839,
4741,
1275,
29871,
29900,
29901,
13,
9651,
565,
1583,
29889,
2080,
29918,
21494,
5848,
338,
6213,
29901,
13,
18884,
12020,
8960,
703,
3782,
1881,
22913,
1159,
13,
9651,
1683,
29901,
13,
18884,
18190,
583,
353,
1583,
29889,
2080,
29918,
21494,
5848,
29961,
29900,
29892,
29901,
1822,
8552,
580,
13,
18884,
2752,
353,
1583,
29889,
2080,
29918,
21494,
5848,
29961,
29896,
29892,
29901,
1822,
8552,
580,
13,
4706,
25342,
1583,
29889,
27839,
4741,
1275,
29871,
29896,
29901,
13,
9651,
18190,
583,
353,
12655,
29889,
1915,
3493,
29898,
1311,
29889,
1430,
1001,
29918,
16173,
29892,
1311,
29889,
1430,
1001,
29918,
12648,
29892,
1311,
29889,
1430,
1001,
29918,
29940,
29897,
13,
9651,
2752,
353,
12655,
29889,
2873,
29898,
759,
29887,
583,
29889,
2311,
29897,
13,
9651,
13128,
353,
12655,
29889,
29894,
1429,
29898,
313,
759,
29887,
583,
29892,
4993,
876,
13,
9651,
1583,
29889,
2080,
29918,
21494,
5848,
353,
2752,
13,
4706,
25342,
1583,
29889,
27839,
4741,
1275,
29871,
29906,
29901,
13,
9651,
565,
1583,
29889,
27839,
4741,
1275,
29871,
29906,
29901,
2752,
29918,
1445,
353,
1583,
29889,
27839,
4741,
29918,
7724,
13,
9651,
1018,
29901,
13,
18884,
13128,
353,
12655,
29889,
1359,
3945,
29898,
4993,
29918,
1445,
29897,
13,
18884,
18190,
583,
353,
13128,
7503,
29892,
29900,
29962,
13,
18884,
2752,
353,
13128,
7503,
29892,
29896,
29962,
13,
18884,
1583,
29889,
2080,
29918,
21494,
5848,
353,
2752,
13,
9651,
5174,
29901,
13,
18884,
1596,
703,
2392,
8363,
934,
1273,
29879,
11860,
29898,
4993,
29918,
1445,
876,
13,
18884,
12020,
13,
13,
4706,
565,
1583,
29889,
7724,
29918,
14849,
3580,
1275,
29871,
29900,
29901,
13,
9651,
1962,
29918,
1445,
353,
6213,
13,
4706,
1683,
29901,
13,
9651,
1962,
29918,
1445,
353,
376,
4300,
1181,
29889,
6550,
29908,
13,
13,
13,
13,
4706,
1018,
29901,
13,
9651,
1596,
29898,
449,
29918,
27126,
3366,
3888,
20068,
13,
4706,
5174,
29901,
13,
9651,
1209,
13,
13,
4706,
396,
15807,
403,
472,
841,
29884,
4097,
3001,
13,
4706,
7867,
29889,
4397,
3552,
449,
29918,
27126,
1839,
1272,
2033,
29961,
29900,
14664,
25027,
391,
3101,
13,
4706,
7867,
29889,
4397,
3552,
449,
29918,
27126,
1839,
1272,
2033,
29961,
29896,
14664,
25027,
391,
3101,
13,
4706,
363,
413,
297,
3464,
29898,
1311,
29889,
23207,
29918,
1307,
3059,
1125,
13,
9651,
1051,
29889,
4397,
29898,
449,
29918,
27126,
1839,
1272,
2033,
29961,
29946,
718,
29871,
29945,
29930,
29895,
2314,
13,
4706,
7867,
29889,
4397,
29898,
1293,
29918,
7566,
29898,
1761,
876,
13,
13,
4706,
363,
413,
297,
3464,
29898,
2435,
29898,
3591,
29961,
29900,
12622,
29901,
13,
9651,
7867,
29918,
4920,
29879,
272,
683,
29889,
4397,
29898,
29896,
29899,
3591,
14352,
29896,
3816,
29895,
2314,
13,
4706,
7867,
29889,
4397,
29898,
3591,
29918,
4920,
29879,
272,
683,
29897,
13,
13,
4706,
7867,
29889,
4397,
3552,
449,
29918,
27126,
1839,
1272,
2033,
29961,
29945,
29930,
2435,
29898,
22492,
749,
7240,
29896,
14664,
25027,
391,
3101,
13,
4706,
13299,
7964,
29918,
1272,
1839,
1272,
2033,
29922,
23749,
29889,
2378,
29898,
3591,
29897,
13,
13,
4706,
396,
6717,
14523,
13,
4706,
12833,
29918,
1272,
353,
3630,
1252,
3167,
2061,
703,
29990,
4590,
20055,
613,
1583,
29889,
657,
29918,
1272,
29918,
6543,
29918,
8030,
29918,
978,
3101,
13,
4706,
1018,
29901,
13,
9651,
12833,
29918,
1272,
29889,
1202,
29918,
3051,
703,
29916,
9354,
29891,
29918,
1272,
613,
13299,
7964,
29918,
1272,
3366,
1272,
16862,
29911,
29897,
13,
4706,
5174,
29901,
13,
9651,
1209,
13,
4706,
736,
12833,
29918,
1272,
13,
13,
13,
13,
1753,
2391,
29918,
7566,
29898,
1761,
1125,
13,
1678,
365,
353,
5159,
13,
1678,
301,
353,
29871,
29896,
13,
1678,
363,
413,
297,
3464,
29898,
2435,
29898,
1761,
29961,
29900,
12622,
29901,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
1761,
22164,
13,
9651,
301,
353,
301,
334,
1051,
29961,
29875,
3816,
29895,
29962,
13,
4706,
365,
29889,
4397,
29898,
29880,
29897,
13,
4706,
301,
353,
29871,
29896,
13,
1678,
736,
313,
29931,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
13,
1678,
515,
288,
294,
952,
29889,
8030,
29879,
29889,
6543,
1053,
3630,
1252,
3167,
2061,
13,
13,
13,
13,
1678,
1881,
29918,
1272,
29918,
1853,
353,
376,
29925,
9806,
1001,
29908,
13,
13,
1678,
565,
1881,
29918,
1272,
29918,
1853,
1275,
376,
29925,
9806,
1001,
1115,
13,
4706,
396,
1653,
25713,
501,
2797,
13309,
1299,
1955,
29918,
10536,
29965,
29990,
921,
9354,
29891,
14523,
848,
13,
4706,
321,
353,
12655,
29889,
1915,
3493,
29898,
29896,
29900,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29897,
13,
4706,
2752,
353,
321,
29914,
29896,
29900,
13,
4706,
4520,
29918,
1272,
353,
3630,
1252,
3167,
2061,
703,
29990,
4590,
20055,
613,
376,
29925,
9806,
1001,
1159,
13,
4706,
4520,
29918,
1272,
29889,
1202,
29918,
3051,
703,
29916,
9354,
29891,
29918,
1272,
613,
12655,
29889,
29894,
1429,
3552,
29872,
29892,
29872,
29892,
4993,
8106,
29911,
29897,
13,
4706,
4520,
29918,
1272,
29889,
1202,
29918,
3051,
703,
29916,
9354,
29891,
29918,
401,
613,
376,
3308,
1159,
13,
13,
1678,
25342,
1881,
29918,
1272,
29918,
1853,
1275,
376,
29925,
9806,
1001,
29941,
29928,
1115,
13,
4706,
396,
1653,
443,
9183,
29918,
3665,
11685,
921,
9354,
29891,
14523,
848,
13,
4706,
515,
24841,
21570,
29889,
29916,
9354,
29891,
29889,
4422,
29889,
29916,
9354,
29891,
29918,
870,
352,
4097,
1053,
921,
9354,
29891,
29918,
28667,
29918,
870,
9183,
29918,
3665,
11685,
13,
13,
4706,
321,
29892,
298,
29892,
325,
29892,
282,
29892,
775,
353,
921,
9354,
29891,
29918,
28667,
29918,
870,
9183,
29918,
3665,
11685,
29898,
29923,
3281,
29934,
1164,
1430,
1001,
29954,
29979,
29922,
29953,
29889,
29900,
29946,
29892,
29923,
3281,
29934,
1164,
1430,
1001,
29954,
29979,
5550,
16310,
29922,
29900,
29889,
29900,
29900,
29896,
29892,
29923,
3281,
29934,
1164,
22484,
29450,
29922,
29900,
29889,
29906,
2053,
13,
462,
462,
965,
382,
3281,
29934,
1164,
15349,
29909,
4345,
29902,
10721,
29950,
29922,
29900,
29889,
29900,
29900,
29900,
29941,
29929,
29945,
29892,
29923,
3281,
29934,
1164,
15349,
29909,
4345,
29902,
10721,
29963,
29922,
29929,
29889,
29929,
29872,
29899,
29900,
29953,
2053,
13,
462,
462,
965,
382,
3281,
29934,
1164,
15349,
5194,
4571,
5348,
24647,
4741,
29950,
29922,
29896,
29889,
29900,
29945,
29872,
29899,
29900,
29945,
29892,
29923,
3281,
29934,
1164,
15349,
5194,
4571,
5348,
24647,
4741,
29963,
29922,
29941,
29889,
29929,
29872,
29899,
29900,
29953,
2053,
13,
462,
462,
965,
349,
1001,
5971,
29928,
1367,
29922,
29900,
29889,
29900,
29896,
29947,
29892,
29940,
13171,
5971,
8452,
29922,
29906,
29906,
29906,
29892,
29968,
29963,
29922,
29896,
29889,
29953,
29947,
29892,
4571,
1254,
23219,
29922,
29941,
29900,
29889,
29900,
29892,
13,
462,
462,
965,
11368,
1525,
3094,
23219,
29922,
29900,
29892,
29950,
1718,
22877,
2965,
23207,
29922,
29896,
29892,
13,
462,
462,
965,
402,
3301,
29950,
29922,
29900,
29889,
29900,
29900,
29896,
29892,
29954,
3301,
29963,
29922,
29900,
29889,
29900,
29900,
29896,
2053,
13,
462,
462,
965,
379,
12750,
1806,
29925,
6992,
9375,
29922,
29946,
29896,
29892,
29963,
12750,
1806,
29925,
6992,
9375,
29922,
29946,
29896,
29892,
2303,
4690,
13668,
29922,
29900,
29892,
13,
462,
462,
965,
349,
29950,
2891,
1164,
1430,
1001,
29954,
29979,
16173,
29922,
29955,
29900,
29900,
29900,
29892,
19689,
2891,
1164,
1430,
1001,
29954,
29979,
12648,
29922,
29947,
29896,
29900,
29900,
29892,
19689,
2891,
1164,
1430,
1001,
29954,
29979,
29925,
6992,
9375,
29922,
29906,
29900,
29892,
13,
462,
462,
965,
501,
1660,
12665,
1806,
29911,
2190,
27266,
29922,
29896,
29897,
13,
4706,
4520,
29918,
1272,
353,
3630,
1252,
3167,
2061,
703,
29990,
4590,
20055,
613,
376,
29925,
9806,
1001,
29941,
29928,
1159,
13,
4706,
4520,
29918,
1272,
353,
3630,
1252,
3167,
2061,
703,
29990,
4590,
20055,
613,
376,
18783,
13309,
1299,
1955,
29918,
29934,
3035,
29902,
8098,
1159,
13,
4706,
4520,
29918,
1272,
29889,
1202,
29918,
3051,
703,
29916,
9354,
29891,
29918,
1272,
613,
518,
29886,
29892,
321,
29892,
298,
29892,
325,
2314,
13,
4706,
4520,
29918,
1272,
29889,
1202,
29918,
3051,
703,
29916,
9354,
29891,
29918,
401,
613,
775,
29897,
13,
13,
13,
13,
13,
1678,
623,
353,
660,
4873,
29898,
9675,
29889,
19218,
29897,
13,
1678,
281,
353,
4103,
29888,
542,
1061,
580,
13,
1678,
281,
29889,
16044,
1252,
3167,
1469,
29898,
13556,
2347,
29918,
1272,
29897,
13,
1678,
281,
29889,
4294,
580,
13,
1678,
623,
29889,
4258,
580,
13,
1678,
281,
29889,
7620,
9585,
580,
2
] |
setup.t9-exec-server.py | AlumCC/T9 | 3 | 198186 | from setuptools import setup
setup(
name='t9-exec-server',
version='0.1.0',
author='<NAME>',
author_email='<EMAIL>',
url='https://github.com/ashafer01/t9',
license='MIT',
description='T9 Exec Server',
long_description='This package runs on the docker exec container',
packages=[
't9_exec_server',
't9_config',
],
install_requires=[
'pyyaml',
'aiohttp',
],
)
| [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
29873,
29929,
29899,
4258,
29899,
2974,
742,
13,
1678,
1873,
2433,
29900,
29889,
29896,
29889,
29900,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
26840,
571,
29900,
29896,
29914,
29873,
29929,
742,
13,
1678,
19405,
2433,
26349,
742,
13,
1678,
6139,
2433,
29911,
29929,
11080,
5656,
742,
13,
1678,
1472,
29918,
8216,
2433,
4013,
3577,
6057,
373,
278,
10346,
2279,
5639,
742,
13,
1678,
9741,
11759,
13,
4706,
525,
29873,
29929,
29918,
4258,
29918,
2974,
742,
13,
4706,
525,
29873,
29929,
29918,
2917,
742,
13,
1678,
21251,
13,
1678,
2601,
29918,
276,
339,
2658,
11759,
13,
4706,
525,
2272,
25162,
742,
13,
4706,
525,
29874,
601,
1124,
742,
13,
1678,
21251,
13,
29897,
13,
2
] |
load.py | GaniAliguzhinov/LowResImageClassifier | 0 | 175177 | <filename>load.py
from imports import *
MEAN = 0.5
STD = 0.2
def load_data():
if not FROM_FILE:
(Xtrain, Ytrain), (Xtest, Ytest) = tf.keras.datasets.mnist.load_data()
Xtrain, Xtest = Xtrain.reshape(-1, INPUT_WIDTH, INPUT_HEIGHT, CHANNELS), \
Xtest.reshape(-1, INPUT_WIDTH, INPUT_HEIGHT, CHANNELS)
return Xtrain, Ytrain, Xtest, Ytest
else:
train = pd.read_csv(TRAIN_FILE)
test = pd.read_csv(TEST_FILE)
Xtrain = train.values[:,1:].reshape(-1, INPUT_WIDTH, INPUT_HEIGHT, CHANNELS)
Xtest = test.values.reshape(-1, INPUT_WIDTH, INPUT_HEIGHT, CHANNELS)
Ytrain = train.values[:,0].reshape(-1)
Ytest = np.zeros((test.values.shape[0]))
return Xtrain, Ytrain, Xtest, Ytest
def mapValues(values, domain_l, domain_h, codomain_l=0.0, codomain_h=1.0, save=False):
global MEAN
global STD
l, h, L, H = domain_l, domain_h, codomain_l, codomain_h
v = (values - l) * (H - L)/(h - l) + L
if save:
MEAN = v.mean().astype(np.float32)
STD = v.std().astype(np.float32)
return v
def normalize(x):
m = MEAN
s = STD
return (x-m)/s
def em(x):
return x
def getgen():
return tf.keras.preprocessing.image.ImageDataGenerator(
featurewise_center=False, # set input mean to 0 over the dataset
samplewise_center=False, # set each sample mean to 0
featurewise_std_normalization=False, # divide inputs by std of the dataset
samplewise_std_normalization=False, # divide each input by its std
zca_whitening=False, # apply ZCA whitening
rotation_range=10, # randomly rotate images in the range (degrees, 0 to 180)
zoom_range = 0.1, # Randomly zoom image
width_shift_range=0.1, # randomly shift images horizontally (fraction of total width)
height_shift_range=0.1, # randomly shift images vertically (fraction of total height)
horizontal_flip=False, # randomly flip images
shear_range=0.4, # randomly apply shearing in range (degrees, 0 to 180)
vertical_flip=False) # randomly flip images
| [
1,
529,
9507,
29958,
1359,
29889,
2272,
13,
3166,
24802,
1053,
334,
13,
13,
2303,
2190,
353,
29871,
29900,
29889,
29945,
13,
1254,
29928,
353,
29871,
29900,
29889,
29906,
13,
1753,
2254,
29918,
1272,
7295,
13,
1678,
565,
451,
3895,
29918,
7724,
29901,
13,
4706,
313,
29990,
14968,
29892,
612,
14968,
511,
313,
29990,
1688,
29892,
612,
1688,
29897,
353,
15886,
29889,
3946,
294,
29889,
14538,
1691,
29889,
23521,
391,
29889,
1359,
29918,
1272,
580,
13,
4706,
1060,
14968,
29892,
1060,
1688,
353,
1060,
14968,
29889,
690,
14443,
6278,
29896,
29892,
2672,
12336,
29918,
22574,
29892,
2672,
12336,
29918,
9606,
22530,
29892,
5868,
2190,
29940,
6670,
29903,
511,
320,
13,
462,
4706,
1060,
1688,
29889,
690,
14443,
6278,
29896,
29892,
2672,
12336,
29918,
22574,
29892,
2672,
12336,
29918,
9606,
22530,
29892,
5868,
2190,
29940,
6670,
29903,
29897,
13,
4706,
736,
1060,
14968,
29892,
612,
14968,
29892,
1060,
1688,
29892,
612,
1688,
13,
1678,
1683,
29901,
13,
4706,
7945,
353,
10518,
29889,
949,
29918,
7638,
29898,
29911,
4717,
1177,
29918,
7724,
29897,
13,
4706,
1243,
353,
10518,
29889,
949,
29918,
7638,
29898,
18267,
29918,
7724,
29897,
13,
4706,
1060,
14968,
353,
7945,
29889,
5975,
7503,
29892,
29896,
29901,
1822,
690,
14443,
6278,
29896,
29892,
2672,
12336,
29918,
22574,
29892,
2672,
12336,
29918,
9606,
22530,
29892,
5868,
2190,
29940,
6670,
29903,
29897,
13,
4706,
1060,
1688,
353,
1243,
29889,
5975,
29889,
690,
14443,
6278,
29896,
29892,
2672,
12336,
29918,
22574,
29892,
2672,
12336,
29918,
9606,
22530,
29892,
5868,
2190,
29940,
6670,
29903,
29897,
13,
4706,
612,
14968,
353,
7945,
29889,
5975,
7503,
29892,
29900,
1822,
690,
14443,
6278,
29896,
29897,
13,
4706,
612,
1688,
353,
7442,
29889,
3298,
359,
3552,
1688,
29889,
5975,
29889,
12181,
29961,
29900,
12622,
13,
13,
4706,
736,
1060,
14968,
29892,
612,
14968,
29892,
1060,
1688,
29892,
612,
1688,
13,
1753,
2910,
9065,
29898,
5975,
29892,
5354,
29918,
29880,
29892,
5354,
29918,
29882,
29892,
15234,
290,
475,
29918,
29880,
29922,
29900,
29889,
29900,
29892,
15234,
290,
475,
29918,
29882,
29922,
29896,
29889,
29900,
29892,
4078,
29922,
8824,
1125,
13,
1678,
5534,
22986,
2190,
13,
1678,
5534,
6850,
29928,
13,
1678,
301,
29892,
298,
29892,
365,
29892,
379,
353,
5354,
29918,
29880,
29892,
5354,
29918,
29882,
29892,
15234,
290,
475,
29918,
29880,
29892,
15234,
290,
475,
29918,
29882,
13,
1678,
325,
353,
313,
5975,
448,
301,
29897,
334,
313,
29950,
448,
365,
6802,
29898,
29882,
448,
301,
29897,
718,
365,
13,
1678,
565,
4078,
29901,
13,
4706,
22986,
2190,
353,
325,
29889,
12676,
2141,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
4706,
6850,
29928,
353,
325,
29889,
4172,
2141,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
736,
325,
13,
13,
1753,
4226,
675,
29898,
29916,
1125,
13,
1678,
286,
353,
22986,
2190,
13,
1678,
269,
353,
6850,
29928,
13,
1678,
736,
313,
29916,
29899,
29885,
6802,
29879,
13,
1753,
953,
29898,
29916,
1125,
13,
1678,
736,
921,
13,
1753,
679,
1885,
7295,
13,
1678,
736,
15886,
29889,
3946,
294,
29889,
1457,
19170,
29889,
3027,
29889,
2940,
1469,
21575,
29898,
13,
9651,
4682,
3538,
29918,
5064,
29922,
8824,
29892,
29871,
396,
731,
1881,
2099,
304,
29871,
29900,
975,
278,
8783,
13,
9651,
4559,
3538,
29918,
5064,
29922,
8824,
29892,
29871,
396,
731,
1269,
4559,
2099,
304,
29871,
29900,
13,
9651,
4682,
3538,
29918,
4172,
29918,
8945,
2133,
29922,
8824,
29892,
29871,
396,
16429,
10970,
491,
3659,
310,
278,
8783,
13,
9651,
4559,
3538,
29918,
4172,
29918,
8945,
2133,
29922,
8824,
29892,
29871,
396,
16429,
1269,
1881,
491,
967,
3659,
13,
9651,
503,
1113,
29918,
1332,
3537,
292,
29922,
8824,
29892,
29871,
396,
3394,
796,
5454,
377,
3537,
292,
13,
9651,
13733,
29918,
3881,
29922,
29896,
29900,
29892,
29871,
396,
20459,
16734,
4558,
297,
278,
3464,
313,
311,
7979,
267,
29892,
29871,
29900,
304,
29871,
29896,
29947,
29900,
29897,
13,
9651,
19342,
29918,
3881,
353,
29871,
29900,
29889,
29896,
29892,
396,
16968,
368,
19342,
1967,
13,
9651,
2920,
29918,
10889,
29918,
3881,
29922,
29900,
29889,
29896,
29892,
29871,
396,
20459,
9500,
4558,
4029,
6753,
635,
313,
29888,
13857,
310,
3001,
2920,
29897,
13,
9651,
3171,
29918,
10889,
29918,
3881,
29922,
29900,
29889,
29896,
29892,
29871,
396,
20459,
9500,
4558,
4837,
1711,
313,
29888,
13857,
310,
3001,
3171,
29897,
13,
9651,
14698,
29918,
29888,
3466,
29922,
8824,
29892,
29871,
396,
20459,
285,
3466,
4558,
13,
9651,
1183,
279,
29918,
3881,
29922,
29900,
29889,
29946,
29892,
418,
396,
20459,
3394,
1183,
4362,
297,
3464,
313,
311,
7979,
267,
29892,
29871,
29900,
304,
29871,
29896,
29947,
29900,
29897,
13,
9651,
11408,
29918,
29888,
3466,
29922,
8824,
29897,
29871,
396,
20459,
285,
3466,
4558,
13,
2
] |
app/api/user_routes.py | nappernick/envelope | 2 | 10308 | from datetime import datetime
from werkzeug.security import generate_password_hash
from flask import Blueprint, jsonify, request
from sqlalchemy.orm import joinedload
from flask_login import login_required
from app.models import db, User, Type
from app.forms import UpdateUserForm
from .auth_routes import authenticate, validation_errors_to_error_messages
user_routes = Blueprint('users', __name__)
@user_routes.route("/types")
def types():
types = db.session.query(Type).all()
return jsonify([type.name_to_id() for type in types])
@user_routes.route('/')
@login_required
def users():
users = db.session.query(User).all()
return jsonify([user.to_dict_full() for user in users])
@user_routes.route('/<int:id>')
@login_required
def user(id):
user = User.query.get(id)
return user.to_dict()
@user_routes.route('/<int:id>', methods=["DELETE"])
@login_required
def user_delete(id):
user = User.query.get(id)
db.session.delete(user)
db.session.commit()
return { id: "Successfully deleted" }
@user_routes.route('/<int:id>', methods=["POST"])
@login_required
def user_update(id):
user = User.query.options(joinedload("type")).get(id)
form = UpdateUserForm()
form['csrf_token'].data = request.cookies['csrf_token']
if form.validate_on_submit():
print("_______ FORM DATA",form.data)
user.username=form.data['username'],
user.email=form.data['email'],
user.hashed_password=generate_password_hash(form.password.data),
user.first_name=form.data['first_name'],
user.last_name=form.data['last_name'],
user.type_id=form.data['type_id'],
user.updated_at=datetime.now()
db.session.commit()
return user.to_dict_full()
return {'errors': validation_errors_to_error_messages(form.errors)}
@user_routes.route("/<int:id>/clients")
@login_required
def admin_fetch_clients(id):
authenticated = authenticate()
clientUsers = db.session.query(User).filter_by(type_id=2).all()
if authenticated["type_id"] != 1:
return jsonify({
"errors": [
"Unauthorized"
]
})
return jsonify([user.to_dict_full() for user in clientUsers])
| [
1,
515,
12865,
1053,
12865,
13,
3166,
23085,
13289,
29889,
8926,
1053,
5706,
29918,
5630,
29918,
8568,
13,
3166,
29784,
1053,
10924,
2158,
29892,
4390,
1598,
29892,
2009,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
8772,
1359,
13,
3166,
29784,
29918,
7507,
1053,
6464,
29918,
12403,
13,
3166,
623,
29889,
9794,
1053,
4833,
29892,
4911,
29892,
5167,
13,
3166,
623,
29889,
9514,
1053,
10318,
2659,
2500,
13,
3166,
869,
5150,
29918,
27894,
1053,
15585,
403,
29892,
8845,
29918,
12523,
29918,
517,
29918,
2704,
29918,
19158,
13,
13,
1792,
29918,
27894,
353,
10924,
2158,
877,
7193,
742,
4770,
978,
1649,
29897,
13,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11974,
8768,
1159,
13,
1753,
4072,
7295,
13,
1678,
4072,
353,
4833,
29889,
7924,
29889,
1972,
29898,
1542,
467,
497,
580,
13,
1678,
736,
4390,
1598,
4197,
1853,
29889,
978,
29918,
517,
29918,
333,
580,
363,
1134,
297,
4072,
2314,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11219,
1495,
13,
29992,
7507,
29918,
12403,
13,
1753,
4160,
7295,
13,
1678,
4160,
353,
4833,
29889,
7924,
29889,
1972,
29898,
2659,
467,
497,
580,
13,
1678,
736,
4390,
1598,
4197,
1792,
29889,
517,
29918,
8977,
29918,
8159,
580,
363,
1404,
297,
4160,
2314,
13,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11219,
29966,
524,
29901,
333,
29958,
1495,
13,
29992,
7507,
29918,
12403,
13,
1753,
1404,
29898,
333,
1125,
13,
1678,
1404,
353,
4911,
29889,
1972,
29889,
657,
29898,
333,
29897,
13,
1678,
736,
1404,
29889,
517,
29918,
8977,
580,
13,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11219,
29966,
524,
29901,
333,
29958,
742,
3519,
29922,
3366,
2287,
18476,
20068,
13,
29992,
7507,
29918,
12403,
13,
1753,
1404,
29918,
8143,
29898,
333,
1125,
13,
1678,
1404,
353,
4911,
29889,
1972,
29889,
657,
29898,
333,
29897,
13,
1678,
4833,
29889,
7924,
29889,
8143,
29898,
1792,
29897,
13,
1678,
4833,
29889,
7924,
29889,
15060,
580,
13,
1678,
736,
426,
1178,
29901,
376,
14191,
3730,
11132,
29908,
500,
13,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11219,
29966,
524,
29901,
333,
29958,
742,
3519,
29922,
3366,
5438,
20068,
13,
29992,
7507,
29918,
12403,
13,
1753,
1404,
29918,
5504,
29898,
333,
1125,
13,
1678,
1404,
353,
4911,
29889,
1972,
29889,
6768,
29898,
2212,
1312,
1359,
703,
1853,
1159,
467,
657,
29898,
333,
29897,
13,
1678,
883,
353,
10318,
2659,
2500,
580,
13,
1678,
883,
1839,
2395,
9600,
29918,
6979,
13359,
1272,
353,
2009,
29889,
15108,
583,
1839,
2395,
9600,
29918,
6979,
2033,
13,
1678,
565,
883,
29889,
15480,
29918,
265,
29918,
7892,
7295,
13,
4706,
1596,
703,
7652,
22359,
383,
12054,
360,
8254,
613,
689,
29889,
1272,
29897,
13,
4706,
1404,
29889,
6786,
29922,
689,
29889,
1272,
1839,
6786,
7464,
13,
4706,
1404,
29889,
5269,
29922,
689,
29889,
1272,
1839,
5269,
7464,
13,
4706,
1404,
29889,
8568,
287,
29918,
5630,
29922,
17158,
29918,
5630,
29918,
8568,
29898,
689,
29889,
5630,
29889,
1272,
511,
13,
4706,
1404,
29889,
4102,
29918,
978,
29922,
689,
29889,
1272,
1839,
4102,
29918,
978,
7464,
13,
4706,
1404,
29889,
4230,
29918,
978,
29922,
689,
29889,
1272,
1839,
4230,
29918,
978,
7464,
13,
4706,
1404,
29889,
1853,
29918,
333,
29922,
689,
29889,
1272,
1839,
1853,
29918,
333,
7464,
13,
4706,
1404,
29889,
21402,
29918,
271,
29922,
12673,
29889,
3707,
580,
13,
4706,
4833,
29889,
7924,
29889,
15060,
580,
13,
4706,
736,
1404,
29889,
517,
29918,
8977,
29918,
8159,
580,
13,
1678,
736,
11117,
12523,
2396,
8845,
29918,
12523,
29918,
517,
29918,
2704,
29918,
19158,
29898,
689,
29889,
12523,
2915,
13,
13,
13,
29992,
1792,
29918,
27894,
29889,
13134,
11974,
29966,
524,
29901,
333,
20690,
11303,
1237,
1159,
13,
29992,
7507,
29918,
12403,
13,
1753,
4113,
29918,
9155,
29918,
11303,
1237,
29898,
333,
1125,
13,
1678,
15585,
630,
353,
15585,
403,
580,
13,
1678,
3132,
5959,
353,
4833,
29889,
7924,
29889,
1972,
29898,
2659,
467,
4572,
29918,
1609,
29898,
1853,
29918,
333,
29922,
29906,
467,
497,
580,
13,
268,
13,
1678,
565,
15585,
630,
3366,
1853,
29918,
333,
3108,
2804,
29871,
29896,
29901,
13,
4706,
736,
4390,
1598,
3319,
13,
9651,
376,
12523,
1115,
518,
13,
18884,
376,
29965,
1056,
329,
2015,
1891,
29908,
13,
9651,
4514,
13,
4706,
5615,
13,
1678,
736,
4390,
1598,
4197,
1792,
29889,
517,
29918,
8977,
29918,
8159,
580,
363,
1404,
297,
3132,
5959,
2314,
13,
2
] |
scripts/mnpr_system.py | semontesdeoca/MNPR | 218 | 39390 | """
@license: MIT
@repository: https://github.com/semontesdeoca/MNPR
_
_ __ ___ _ __ _ __ _ __ ___ _ _ ___| |_ ___ _ __ ___
| '_ ` _ \| '_ \| '_ \| '__| / __| | | / __| __/ _ \ '_ ` _ \
| | | | | | | | | |_) | | \__ \ |_| \__ \ || __/ | | | | |
|_| |_| |_|_| |_| .__/|_| |___/\__, |___/\__\___|_| |_| |_|
|_| |___/
@summary: MNPR related functions
"""
from __future__ import print_function
import os
import traceback
import maya.cmds as cmds
import maya.mel as mel
import coopLib as lib
import mnpr_info
import mnpr_runner
import mnpr_matPresets
mnpr_info.loadPlugin()
dx2sfxAttr = {"xUseColorTexture": "Albedo_Texture",
"xColorTint": "Color_Tint",
"xUseNormalTexture": "Normal_Map",
"xFlipU": "Invert_U",
"xFlipV": "Invert_V",
"xBumpDepth": "Bump_Depth",
"xUseSpecularTexture": "Specular_Map",
"xSpecular": "Specular_Roll_Off",
"xSpecDiffusion": "Specular_Diffusion",
"xSpecTransparency": "Specular_Transparency",
"xUseShadows": "",
"xShadowDepthBias": "",
"xDiffuseFactor": "Diffuse_Factor",
"xShadeColor": "Shade_Color",
"xShadeWrap": "Shade_Wrap",
"xUseOverrideShade": "Shade_Override",
"xDilute": "Dilute_Paint",
"xCangiante": "Cangiante",
"xDiluteArea": "Dilute_Area",
"xHighArea": "Highlight_Roll_Off",
"xHighTransparency": "Highlight_Transparency",
"xAtmosphereColor": "",
"xRangeStart": "",
"xRangeEnd": "",
"xDarkEdges": "",
"xMainTex": "Albedo_Texture_File",
"xNormalTex": "Normal_Map_File",
"xSpecTex": "Specular_Map_File"
}
def check():
"""Makes sure everything is running right"""
print("SYSTEM CHECK FOR {0}".format(mnpr_info.prototype))
# check viewport
viewport = lib.getActiveModelPanel()
cmds.modelEditor(viewport, dtx=True, e=True) # display textures
# plugin needs to be loaded
mnpr_info.loadRenderer()
# 3rd party plugins must be loaded
cmds.loadPlugin('shaderFXPlugin', quiet=True)
if cmds.about(nt=True, q=True):
cmds.loadPlugin('dx11Shader', quiet=True) # deprecated (only shadeFXPlugin in the future)
cmds.loadPlugin('glslShader', quiet=True) # deprecated (only shaderFXPlugin in the future)
# viewport renderer must be set
mel.eval("setRendererAndOverrideInModelPanel vp2Renderer {0} {1};".format(mnpr_info.prototype, viewport))
# modify color of heads up display
cmds.displayColor("headsUpDisplayLabels", 2, dormant=True)
cmds.displayColor("headsUpDisplayValues", 2, dormant=True)
# make sure a config node exists
if not cmds.objExists(mnpr_info.configNode):
selected = cmds.ls(sl=True, l=True)
selectConfig()
cmds.select(selected, r=True)
lib.printInfo("-> SYSTEM CHECK SUCCESSFUL")
def changeStyle():
"""Resets MNPR to load a new style"""
# reset stylization
cmds.mnpr(resetStylization=True)
# delete old config node
if cmds.objExists(mnpr_info.configNode):
cmds.delete(mnpr_info.configNode)
# flush undo
cmds.flushUndo()
print("style deleted")
# deregister node
cmds.mnpr(rn=False)
# register node
cmds.mnpr(rn=True)
# create new config node
selectConfig()
# refresh AETemplate
mnpr_runner.reloadConfig()
# set new media type
mnpr_info.media = cmds.mnpr(style=True, q=True)
# rebuild opened UI's
import mnpr_UIs
if cmds.window(mnpr_UIs.BreakdownUI.windowTitle, exists=True):
mnpr_runner.openOverrideSettings(rebuild=True)
import mnpr_FX
if cmds.window(mnpr_FX.MNPR_FX_UI.windowTitle, exists=True):
mnpr_runner.openPaintFX(rebuild=True)
lib.printInfo("Style changed")
def togglePlugin(force=""):
"""
Toggles active or forces desired plugin prototype
Args:
force (str): plugin name to force
"""
if force:
unloadPlugin(mnpr_info.prototype)
mnpr_info.prototype = force
check()
else:
# toggle loaded prototype
if cmds.pluginInfo(mnpr_info.prototype, loaded=True, q=True):
unloadPlugin(mnpr_info.prototype)
else:
check()
def unloadPlugin(plugin):
"""
Unloads plugin and cleans scene from plugin traces
Args:
plugin (str): name of plugin to be unloaded
"""
# check which prototype is active
if cmds.pluginInfo(plugin, loaded=True, q=True):
# remove traces and unload
if cmds.objExists(mnpr_info.configNode):
cmds.delete(mnpr_info.configNode) # delete config node
cmds.flushUndo() # clear undo queue
cmds.unloadPlugin(plugin) # unload plugin
lib.printInfo("->PLUGIN SUCCESSFULLY UNLOADED")
def showShaderAttr():
""" Select material and show in attribute editor """
if cmds.ls(sl=True):
cmds.hyperShade(smn=True)
mel.eval("openAEWindow")
else:
cmds.warning("Select object with shader")
def refreshShaders():
""" Refreshes object-space plugin shaders """
shaderDir = systemDir("shaders")
if os.name == 'nt' and mnpr_info.backend == 'dx11':
shaderFile = os.path.join(shaderDir, "PrototypeC.fx")
if not os.path.isfile(shaderFile):
shaderFile = os.path.join(shaderDir, "prototypeC.fxo")
shaders = cmds.ls(type="dx11Shader")
else:
shaderFile = os.path.join(shaderDir, "PrototypeC.ogsfx")
shaders = cmds.ls(type="GLSLShader")
for shader in shaders:
cmds.setAttr("{0}.shader".format(shader), shaderFile, type="string")
lib.printInfo('Shaders refreshed')
return True
def updateShaderFX():
""" Updates shaderFX shaders"""
shaderDir = systemDir("shaders")
materials = cmds.ls(type="ShaderfxShader")
counter = 0
for mat in materials:
counter += 1
# get materials attributes
matAttrs = {}
mnpr_matPresets.getMaterialAttrs(mat, matAttrs)
# load new graph
shaderFile = os.path.join(shaderDir, "{0}.sfx".format(matAttrs["graph"]))
cmds.shaderfx(sfxnode=mat, loadGraph=shaderFile)
# set attributes
mnpr_matPresets.setMaterialAttrs(mat, matAttrs)
print("{0} has been updated to the latest version".format(mat))
print("{0}/{1} materials updated".format(counter, len(materials)))
lib.printInfo('Shaders updated')
def dx112glsl():
""" Converts dx11 materials to glsl materials """
check()
dx11Shaders = cmds.ls(type="dx11Shader")
print(dx11Shaders)
for dx11Shader in dx11Shaders:
print("Transfering {0} shader".format(dx11Shader))
# get all attributes
attributes = cmds.listAttr(dx11Shader, ud=True, st="x*", k=True)
print(attributes)
# get all connected nodes
connectedNodes = cmds.listConnections(dx11Shader, t="file", c=True, p=True)
print(connectedNodes)
# get all shapes
cmds.select(dx11Shader, r=True)
cmds.hyperShade(objects="")
shapes = cmds.ls(sl=True)
print(shapes)
# create glsl shader
shader = cmds.shadingNode('GLSLShader', asShader=True, n="{0}_GL".format(dx11Shader))
cmds.select(shapes, r=True)
cmds.hyperShade(assign=shader)
print(">>> Shader {0} created".format(shader))
# assign attributes
shaderFile = os.path.join(mnpr_info.environment,"shaders","PrototypeC.ogsfx")
cmds.setAttr("{0}.shader".format(shader), shaderFile, type="string")
print("Setting attributes for {0}".format(shader))
for attr in attributes:
value = cmds.getAttr("{0}.{1}".format(dx11Shader, attr))
try:
if type(value) == type([]):
cmds.setAttr("{0}.{1}".format(shader, attr), value[0][0], value[0][1], value[0][2], typ="double3")
else:
cmds.setAttr("{0}.{1}".format(shader, attr), value)
except:
print("Found problemt when setting {0}.{1}, skipping for now".format(shader, attr))
# connect nodes
if connectedNodes:
for i in range(0, len(connectedNodes), 2):
inputAttr = connectedNodes[i].split(".")[1]
cmds.connectAttr(connectedNodes[i+1], "{0}.{1}".format(shader, inputAttr))
# set control sets
if cmds.attributeQuery("Color0_Source", node=shader, ex=True):
cmds.setAttr("{0}.Color0_Source".format(shader), "color:controlSetA", type="string" )
if cmds.attributeQuery("Color1_Source", node=shader, ex=True):
cmds.setAttr("{0}.Color1_Source".format(shader), "color:controlSetB", type="string" )
if cmds.attributeQuery("Color2_Source", node=shader, ex=True):
cmds.setAttr("{0}.Color2_Source".format(shader), "color:controlSetC", type="string" )
# delete dx11 shader
#cmds.delete(dx11Shader)
def dx112sfx(graph="mnpr_uber"):
"""
Converts dx11 materials to shaderFX materials
Args:
graph (str): ShaderFX graph name (filename)
"""
check()
dx11Shaders = cmds.ls(type="dx11Shader")
prototypeCNodes = []
for dx11Shader in dx11Shaders:
shaderPath = cmds.getAttr("{0}.shader".format(dx11Shader))
if "rototypeC" not in shaderPath:
continue
prototypeCNodes.append(dx11Shader)
print("Converting {0} shader".format(dx11Shader))
# get all attributes
attributes = cmds.listAttr(dx11Shader, ud=True, st="x*", k=True)
print(attributes)
# get all connected nodes
connectedNodes = cmds.listConnections(dx11Shader, t="file", c=True)
print(connectedNodes)
# get all shapes
cmds.select(dx11Shader, r=True)
cmds.hyperShade(objects="")
shapes = cmds.ls(sl=True)
print(shapes)
# create shaderFX shader
shader = cmds.shadingNode('ShaderfxShader', asShader=True, name="{0}".format(dx11Shader.replace("_WC", "_SFX")))
cmds.select(shapes, r=True)
cmds.hyperShade(assign=shader)
shaderFile = os.path.join(mnpr_info.environment, "shaders", "{0}.sfx".format(graph))
cmds.shaderfx(sfxnode=shader, loadGraph=shaderFile)
print(">>> Shader {0} created".format(shader))
# assign settings
vtxControl = bool(cmds.getAttr("{0}.{1}".format(dx11Shader, "xUseControl")))
if vtxControl:
nodeId = cmds.shaderfx(sfxnode=shader, getNodeIDByName="vtxControls")
cmds.shaderfx(sfxnode=shader, edit_bool=(nodeId, "value", vtxControl))
shadows = bool(cmds.getAttr("{0}.{1}".format(dx11Shader, "xUseShadows")))
if not shadows:
nodeId = cmds.shaderfx(sfxnode=shader, getNodeIDByName="Shadow")
cmds.shaderfx(sfxnode=shader, edit_bool=(nodeId, "value", shadows))
specularity = bool(cmds.getAttr("{0}.{1}".format(dx11Shader, "xSpecular")))
if specularity:
nodeId = cmds.shaderfx(sfxnode=shader, getNodeIDByName="Specularity")
cmds.shaderfx(sfxnode=shader, edit_bool=(nodeId, "value", specularity))
# assign attributes
print("Setting attributes for {0}".format(shader))
for attr in attributes:
value = cmds.getAttr("{0}.{1}".format(dx11Shader, attr))
if attr in dx2sfxAttr:
lib.setAttr(shader, dx2sfxAttr[attr], value)
# assign textures
if connectedNodes:
for i in range(0, len(connectedNodes), 2):
textureDir = cmds.getAttr("{0}.{1}".format(connectedNodes[i+1], "fileTextureName"))
attr = connectedNodes[i].split(".")[1]
lib.setAttr(shader, dx2sfxAttr[attr], textureDir)
# delete prototypeC shaders
cmds.delete(prototypeCNodes)
def systemDir(folder=''):
"""
Returns the system directory
Args:
folder (str): folder to append to system directory
Returns:
(str): path to system directory
"""
rootDir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
return os.path.join(rootDir, folder)
def selectConfig():
"""Select configuration node and re-check connections"""
# delete old configuration nodes
if cmds.objExists("NPRConfig"):
cmds.delete("NPRConfig")
if not cmds.objExists(mnpr_info.configNode):
print(mnpr_info.configNode)
cmds.createNode("mnprConfig", n=mnpr_info.configNode)
cmds.connectAttr("{0}.evaluate".format(mnpr_info.configNode), "persp.visibility", f=True)
mel.eval("AttributeEditor")
lib.printInfo("-> CONFIG NODE CREATED AND CONNECTED")
else:
cmds.select(mnpr_info.configNode)
mel.eval("AttributeEditor")
lib.printInfo("Selected {0} configuration node".format(mnpr_info.prototype))
def optimizePerformance():
"""Function to optimize performance by disabling some Maya functions"""
cmds.evaluationManager(mode="off") # set up animation evaluation to DG
def renderFrame(saveDir, width, height, renderSize=1, imgFormat=".jpg", override=mnpr_info.prototype):
"""
Renders current frame in the viewport
Args:
saveDir (str): save directory
width (int): width in pixels
height (int): height in pixels
renderSize (float): render size (factor)
imgFormat (str): .jpg, .exr, etc)
override (str): name of desired override (if any)
"""
check() # check that everything is in order
renderSize = resolutionCheck(width, height, renderSize) # make sure resolution is reasonable
# get working values to be changed
workingRenderSize = cmds.getAttr("{0}.renderScale".format(mnpr_info.configNode))
workingColorDepth = cmds.getAttr("{0}.colorDepth".format(mnpr_info.configNode))
# set desired attributes
if workingColorDepth != 2:
lib.setAttr(mnpr_info.configNode, "colorDepth", 2)
if renderSize != workingRenderSize:
lib.setAttr(mnpr_info.configNode, "renderScale", renderSize)
# prepare renderer
cmds.mnpr(g=True) # enable mnprGamma
mnprOperations = len(cmds.mnpr(lsO=True))
cmds.mnpr(renderOperation=mnprOperations-1, s=0) # HUD
cmds.mnpr(renderOperation=mnprOperations-2, s=0) # UI
cmds.refresh()
# render frame
try:
screenshotPath = lib.screenshot(saveDir, width, height, format=imgFormat, override=override) # render the frame
except WindowsError:
print("Screenshot saving has been canceled")
except:
traceback.print_exc()
if screenshotPath:
# bring everything back to normal
cmds.mnpr(renderOperation=mnprOperations-1, s=1) # HUD
cmds.mnpr(renderOperation=mnprOperations-2, s=1) # UI
lib.setAttr(mnpr_info.configNode, "renderScale", workingRenderSize)
lib.setAttr(mnpr_info.configNode, "colorDepth", workingColorDepth)
cmds.mnpr(g=False)
cmds.refresh()
return screenshotPath
def playblast(saveDir, width, height, renderCamera, modelPanel, renderSize=1):
"""
Playblasts the timeslider
Args:
saveDir (str): save directory with *.mov extension
width (int): width in pixels
height: height in pixels
renderCamera: camera to playblast from
modelPanel: modelPanel to playblast from
renderSize: render size (factor)
"""
check() # check that everything is in order
renderSize = resolutionCheck(width, height, renderSize) # make sure resolution is reasonable
aPlayBackSliderPython = mel.eval('$tmpVar=$gPlayBackSlider')
audioNode = cmds.timeControl(aPlayBackSliderPython, q=True, s=True) # get audio node
# get working values to be changed
workingRenderSize = cmds.getAttr("{0}.renderScale".format(mnpr_info.configNode))
workingColorDepth = cmds.getAttr("{0}.colorDepth".format(mnpr_info.configNode))
workingCamera = cmds.modelEditor(modelPanel, cam=True, q=True)
workingCameraShape = cmds.listRelatives(workingCamera, s=True)
if workingCameraShape:
workingCameraShape = workingCameraShape[0]
else:
# we already have the shape
workingCameraShape = workingCamera
# set desired attributes
cmds.mnpr(g=True)
mnprOperations = len(cmds.mnpr(lsO=True))
cmds.mnpr(renderOperation=mnprOperations-1, s=0) # HUD
cmds.mnpr(renderOperation=mnprOperations-2, s=0) # UI
cmds.modelEditor(modelPanel, cam=renderCamera, e=True) # change modelPanel
lib.setAttr(mnpr_info.configNode, "renderScale", renderSize)
lib.setAttr(mnpr_info.configNode, "colorDepth", 2) # needs to be 32bit to avoid artefacts
cmds.refresh()
# try playblasting
try:
cmds.playblast(f=saveDir, format="qt", w=width, h=height, percent=100, qlt=100, v=True, fo=True, os=True,
s=audioNode, compression="PNG")
except RuntimeError:
try:
cmds.playblast(f=saveDir, format="avi", w=width, h=height, percent=100, qlt=100, v=True, fo=True, os=True,
s=audioNode)
except RuntimeError:
cmds.error("Video cannot be playblasted as qt or avi, please check the installed codecs.")
# bring everything back to normal
cmds.mnpr(renderOperation=mnprOperations-1, s=1) # HUD
cmds.mnpr(renderOperation=mnprOperations-2, s=1) # UI
cmds.modelEditor(modelPanel, cam=workingCameraShape, e=True)
lib.setAttr(mnpr_info.configNode, "renderScale", workingRenderSize)
lib.setAttr(mnpr_info.configNode, "colorDepth", workingColorDepth)
cmds.mnpr(g=False)
cmds.refresh()
lib.printInfo("Video has been successfully playblasted to: {0}".format(saveDir))
def resolutionCheck(width, height, renderSize=1.0):
"""
Checks if resolution is between reasonable hardware limitations
Args:
width (int): viewport width
height (int): viewport height
renderSize (float): render size (factor)
Returns:
renderSize (int): viable render size (factor)
"""
if (width*renderSize > 16384) or (height*renderSize > 16384):
cmds.warning("Resolution too high to supersample, reducing render size")
return resolutionCheck(width, height, renderSize/2.0)
else:
if (width * height * pow(renderSize, 2)) > 150000000:
confirm = cmds.confirmDialog(title='Crash Warning',
message='Rendering a frame at such high resolutions might take long and even crash Maya\nWould you like to continue anyway?',
icn="warning", button=['Yes', 'No'], defaultButton='Yes',
cancelButton='No', dismissString='No', ma='center')
if confirm == 'No':
cmds.error("Frame capture cancelled by user")
return renderSize
def updateAE():
mel.eval("refreshEditorTemplates;")
return True
| [
1,
9995,
13,
29992,
506,
1947,
29901,
539,
341,
1806,
13,
29992,
19033,
29901,
1678,
2045,
597,
3292,
29889,
510,
29914,
12846,
609,
267,
311,
6400,
29914,
29924,
29940,
10593,
13,
462,
462,
1669,
903,
13,
29871,
903,
4770,
903,
1649,
29871,
903,
4770,
29871,
903,
4770,
29871,
903,
4770,
268,
903,
1649,
903,
259,
903,
903,
1649,
29989,
891,
29918,
903,
1649,
903,
4770,
903,
1649,
13,
891,
22868,
421,
903,
12926,
22868,
12926,
22868,
12926,
525,
1649,
29989,
259,
847,
4770,
29989,
891,
891,
847,
4770,
29989,
4770,
29914,
903,
320,
22868,
421,
903,
320,
13,
891,
891,
891,
891,
891,
891,
891,
891,
891,
891,
19925,
891,
891,
418,
320,
1649,
320,
891,
29918,
29989,
320,
1649,
320,
3830,
29871,
4770,
29914,
891,
891,
891,
891,
891,
13,
891,
29918,
29989,
891,
29918,
29989,
891,
29918,
29989,
29918,
29989,
891,
29918,
29989,
869,
1649,
29914,
29989,
29918,
29989,
418,
891,
22359,
7998,
1649,
29892,
891,
22359,
7998,
1649,
29905,
22359,
29989,
29918,
29989,
891,
29918,
29989,
891,
29918,
29989,
13,
462,
891,
29918,
29989,
462,
891,
22359,
29914,
13,
29992,
7727,
29901,
539,
341,
29940,
10593,
4475,
3168,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
2897,
13,
5215,
9637,
1627,
13,
5215,
1122,
29874,
29889,
9006,
29879,
408,
9920,
29879,
13,
5215,
1122,
29874,
29889,
12873,
408,
9232,
13,
5215,
1302,
459,
14868,
408,
4303,
13,
5215,
28597,
558,
29918,
3888,
13,
5215,
28597,
558,
29918,
27492,
13,
5215,
28597,
558,
29918,
2922,
13504,
1691,
13,
13,
23521,
558,
29918,
3888,
29889,
1359,
16288,
580,
13,
13,
8235,
29906,
4668,
29916,
25098,
353,
8853,
29916,
11403,
3306,
21898,
1115,
376,
2499,
2580,
29877,
29918,
21898,
613,
13,
795,
376,
29916,
3306,
29911,
524,
1115,
376,
3306,
29918,
29911,
524,
613,
13,
795,
376,
29916,
11403,
19077,
21898,
1115,
376,
19077,
29918,
3388,
613,
13,
795,
376,
29916,
29943,
3466,
29965,
1115,
376,
797,
1765,
29918,
29965,
613,
13,
795,
376,
29916,
29943,
3466,
29963,
1115,
376,
797,
1765,
29918,
29963,
613,
13,
795,
376,
29916,
29933,
3427,
8498,
386,
1115,
376,
29933,
3427,
29918,
8498,
386,
613,
13,
795,
376,
29916,
11403,
10299,
1070,
21898,
1115,
376,
10299,
1070,
29918,
3388,
613,
13,
795,
376,
29916,
10299,
1070,
1115,
376,
10299,
1070,
29918,
29934,
3028,
29918,
6880,
613,
13,
795,
376,
29916,
10299,
26023,
3958,
1115,
376,
10299,
1070,
29918,
26023,
3958,
613,
13,
795,
376,
29916,
10299,
4300,
862,
3819,
1115,
376,
10299,
1070,
29918,
4300,
862,
3819,
613,
13,
795,
376,
29916,
11403,
2713,
23626,
1115,
12633,
13,
795,
376,
29916,
2713,
6986,
8498,
386,
29933,
3173,
1115,
12633,
13,
795,
376,
29916,
26023,
1509,
29943,
7168,
1115,
376,
26023,
1509,
29918,
29943,
7168,
613,
13,
795,
376,
29916,
2713,
1943,
3306,
1115,
376,
2713,
1943,
29918,
3306,
613,
13,
795,
376,
29916,
2713,
1943,
29956,
2390,
1115,
376,
2713,
1943,
29918,
29956,
2390,
613,
13,
795,
376,
29916,
11403,
4640,
2713,
1943,
1115,
376,
2713,
1943,
29918,
4640,
613,
13,
795,
376,
29916,
29928,
309,
1082,
1115,
376,
29928,
309,
1082,
29918,
28939,
613,
13,
795,
376,
29916,
29907,
574,
12361,
1115,
376,
29907,
574,
12361,
613,
13,
795,
376,
29916,
29928,
309,
1082,
13799,
1115,
376,
29928,
309,
1082,
29918,
13799,
613,
13,
795,
376,
29916,
16382,
13799,
1115,
376,
16382,
4366,
29918,
29934,
3028,
29918,
6880,
613,
13,
795,
376,
29916,
16382,
4300,
862,
3819,
1115,
376,
16382,
4366,
29918,
4300,
862,
3819,
613,
13,
795,
376,
29916,
4178,
7681,
9085,
3306,
1115,
12633,
13,
795,
376,
29916,
6069,
4763,
1115,
12633,
13,
795,
376,
29916,
6069,
5044,
1115,
12633,
13,
795,
376,
29916,
29928,
935,
3853,
2710,
1115,
12633,
13,
795,
376,
29916,
6330,
26887,
1115,
376,
2499,
2580,
29877,
29918,
21898,
29918,
2283,
613,
13,
795,
376,
29916,
19077,
26887,
1115,
376,
19077,
29918,
3388,
29918,
2283,
613,
13,
795,
376,
29916,
10299,
26887,
1115,
376,
10299,
1070,
29918,
3388,
29918,
2283,
29908,
13,
795,
500,
13,
13,
13,
1753,
1423,
7295,
13,
1678,
9995,
29924,
6926,
1854,
4129,
338,
2734,
1492,
15945,
29908,
13,
1678,
1596,
703,
14816,
1254,
12665,
23557,
15842,
426,
29900,
29913,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
16309,
876,
13,
1678,
396,
1423,
1776,
637,
13,
1678,
1776,
637,
353,
4303,
29889,
657,
9966,
3195,
7490,
580,
13,
1678,
9920,
29879,
29889,
4299,
15280,
29898,
1493,
637,
29892,
270,
7508,
29922,
5574,
29892,
321,
29922,
5574,
29897,
29871,
396,
2479,
1426,
1973,
13,
13,
1678,
396,
7079,
4225,
304,
367,
7500,
13,
1678,
28597,
558,
29918,
3888,
29889,
1359,
21323,
580,
13,
13,
1678,
396,
29871,
29941,
5499,
6263,
18224,
1818,
367,
7500,
13,
1678,
9920,
29879,
29889,
1359,
16288,
877,
845,
1664,
26753,
16288,
742,
11813,
29922,
5574,
29897,
13,
1678,
565,
9920,
29879,
29889,
12717,
29898,
593,
29922,
5574,
29892,
3855,
29922,
5574,
1125,
13,
4706,
9920,
29879,
29889,
1359,
16288,
877,
8235,
29896,
29896,
2713,
1664,
742,
11813,
29922,
5574,
29897,
29871,
396,
18164,
313,
6194,
528,
1943,
26753,
16288,
297,
278,
5434,
29897,
13,
1678,
9920,
29879,
29889,
1359,
16288,
877,
3820,
2536,
2713,
1664,
742,
11813,
29922,
5574,
29897,
29871,
396,
18164,
313,
6194,
528,
1664,
26753,
16288,
297,
278,
5434,
29897,
13,
13,
1678,
396,
1776,
637,
4050,
261,
1818,
367,
731,
13,
1678,
9232,
29889,
14513,
703,
842,
21323,
2855,
4640,
797,
3195,
7490,
325,
29886,
29906,
21323,
426,
29900,
29913,
426,
29896,
3400,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
16309,
29892,
1776,
637,
876,
13,
13,
1678,
396,
6623,
2927,
310,
15883,
701,
2479,
13,
1678,
9920,
29879,
29889,
4990,
3306,
703,
2813,
29879,
3373,
9323,
4775,
29879,
613,
29871,
29906,
29892,
270,
555,
424,
29922,
5574,
29897,
13,
1678,
9920,
29879,
29889,
4990,
3306,
703,
2813,
29879,
3373,
9323,
9065,
613,
29871,
29906,
29892,
270,
555,
424,
29922,
5574,
29897,
13,
13,
1678,
396,
1207,
1854,
263,
2295,
2943,
4864,
13,
1678,
565,
451,
9920,
29879,
29889,
5415,
24217,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
1125,
13,
4706,
4629,
353,
9920,
29879,
29889,
3137,
29898,
2536,
29922,
5574,
29892,
301,
29922,
5574,
29897,
13,
4706,
1831,
3991,
580,
13,
4706,
9920,
29879,
29889,
2622,
29898,
8391,
29892,
364,
29922,
5574,
29897,
13,
13,
1678,
4303,
29889,
2158,
3401,
703,
976,
28962,
1254,
12665,
23557,
20134,
26925,
29943,
13309,
1159,
13,
13,
13,
1753,
1735,
5568,
7295,
13,
1678,
9995,
1666,
1691,
341,
29940,
10593,
304,
2254,
263,
716,
3114,
15945,
29908,
13,
1678,
396,
10092,
380,
2904,
2133,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
12071,
855,
2904,
2133,
29922,
5574,
29897,
13,
13,
1678,
396,
5217,
2030,
2295,
2943,
13,
1678,
565,
9920,
29879,
29889,
5415,
24217,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
1125,
13,
4706,
9920,
29879,
29889,
8143,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29897,
13,
1678,
396,
28371,
563,
29877,
13,
1678,
9920,
29879,
29889,
23126,
25263,
29877,
580,
13,
1678,
1596,
703,
3293,
11132,
1159,
13,
1678,
396,
589,
387,
1531,
2943,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
27539,
29922,
8824,
29897,
13,
1678,
396,
6036,
2943,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
27539,
29922,
5574,
29897,
13,
1678,
396,
1653,
716,
2295,
2943,
13,
1678,
1831,
3991,
580,
13,
1678,
396,
11086,
319,
2544,
331,
2341,
13,
1678,
28597,
558,
29918,
27492,
29889,
28120,
3991,
580,
13,
13,
1678,
396,
731,
716,
5745,
1134,
13,
1678,
28597,
558,
29918,
3888,
29889,
9799,
353,
9920,
29879,
29889,
23521,
558,
29898,
3293,
29922,
5574,
29892,
3855,
29922,
5574,
29897,
13,
13,
1678,
396,
337,
4282,
6496,
3740,
29915,
29879,
13,
1678,
1053,
28597,
558,
29918,
3120,
29879,
13,
1678,
565,
9920,
29879,
29889,
7165,
29898,
23521,
558,
29918,
3120,
29879,
29889,
20130,
557,
3204,
3120,
29889,
7165,
7030,
29892,
4864,
29922,
5574,
1125,
13,
4706,
28597,
558,
29918,
27492,
29889,
3150,
4640,
9585,
29898,
276,
4282,
29922,
5574,
29897,
13,
1678,
1053,
28597,
558,
29918,
26753,
13,
1678,
565,
9920,
29879,
29889,
7165,
29898,
23521,
558,
29918,
26753,
29889,
29924,
29940,
10593,
29918,
26753,
29918,
3120,
29889,
7165,
7030,
29892,
4864,
29922,
5574,
1125,
13,
4706,
28597,
558,
29918,
27492,
29889,
3150,
28939,
26753,
29898,
276,
4282,
29922,
5574,
29897,
13,
13,
1678,
4303,
29889,
2158,
3401,
703,
5568,
3939,
1159,
13,
13,
13,
1753,
20429,
16288,
29898,
10118,
13776,
1125,
13,
1678,
9995,
13,
1678,
323,
468,
29887,
793,
6136,
470,
8249,
7429,
7079,
22267,
13,
1678,
826,
3174,
29901,
13,
4706,
4889,
313,
710,
1125,
7079,
1024,
304,
4889,
13,
1678,
9995,
13,
1678,
565,
4889,
29901,
13,
4706,
443,
1359,
16288,
29898,
23521,
558,
29918,
3888,
29889,
16309,
29897,
13,
4706,
28597,
558,
29918,
3888,
29889,
16309,
353,
4889,
13,
4706,
1423,
580,
13,
1678,
1683,
29901,
13,
4706,
396,
20429,
7500,
22267,
13,
4706,
565,
9920,
29879,
29889,
8582,
3401,
29898,
23521,
558,
29918,
3888,
29889,
16309,
29892,
7500,
29922,
5574,
29892,
3855,
29922,
5574,
1125,
13,
9651,
443,
1359,
16288,
29898,
23521,
558,
29918,
3888,
29889,
16309,
29897,
13,
4706,
1683,
29901,
13,
9651,
1423,
580,
13,
13,
13,
1753,
443,
1359,
16288,
29898,
8582,
1125,
13,
1678,
9995,
13,
1678,
853,
18132,
7079,
322,
4531,
550,
9088,
515,
7079,
26695,
13,
1678,
826,
3174,
29901,
13,
4706,
7079,
313,
710,
1125,
1024,
310,
7079,
304,
367,
443,
15638,
13,
1678,
9995,
13,
1678,
396,
1423,
607,
22267,
338,
6136,
13,
1678,
565,
9920,
29879,
29889,
8582,
3401,
29898,
8582,
29892,
7500,
29922,
5574,
29892,
3855,
29922,
5574,
1125,
13,
4706,
396,
3349,
26695,
322,
443,
1359,
13,
4706,
565,
9920,
29879,
29889,
5415,
24217,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
1125,
13,
9651,
9920,
29879,
29889,
8143,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29897,
29871,
396,
5217,
2295,
2943,
13,
4706,
9920,
29879,
29889,
23126,
25263,
29877,
580,
29871,
396,
2821,
563,
29877,
9521,
13,
4706,
9920,
29879,
29889,
348,
1359,
16288,
29898,
8582,
29897,
29871,
396,
443,
1359,
7079,
13,
4706,
4303,
29889,
2158,
3401,
703,
976,
7390,
23338,
1177,
20134,
26925,
29943,
3299,
29979,
8291,
3927,
29909,
2287,
29928,
1159,
13,
13,
13,
1753,
1510,
2713,
1664,
25098,
7295,
13,
1678,
9995,
7605,
5518,
322,
1510,
297,
5352,
6920,
9995,
13,
1678,
565,
9920,
29879,
29889,
3137,
29898,
2536,
29922,
5574,
1125,
13,
4706,
9920,
29879,
29889,
24947,
2713,
1943,
29898,
3844,
29876,
29922,
5574,
29897,
13,
4706,
9232,
29889,
14513,
703,
3150,
16036,
5907,
1159,
13,
1678,
1683,
29901,
13,
4706,
9920,
29879,
29889,
27392,
703,
3549,
1203,
411,
528,
1664,
1159,
13,
13,
13,
1753,
11086,
2713,
24574,
7295,
13,
1678,
9995,
9897,
3781,
267,
1203,
29899,
3493,
7079,
528,
24574,
9995,
13,
1678,
528,
1664,
9170,
353,
1788,
9170,
703,
845,
24574,
1159,
13,
13,
1678,
565,
2897,
29889,
978,
1275,
525,
593,
29915,
322,
28597,
558,
29918,
3888,
29889,
27852,
1275,
525,
8235,
29896,
29896,
2396,
13,
4706,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
845,
1664,
9170,
29892,
376,
1184,
10414,
29907,
29889,
11093,
1159,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
845,
1664,
2283,
1125,
13,
9651,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
845,
1664,
9170,
29892,
376,
16309,
29907,
29889,
11093,
29877,
1159,
13,
4706,
528,
24574,
353,
9920,
29879,
29889,
3137,
29898,
1853,
543,
8235,
29896,
29896,
2713,
1664,
1159,
13,
1678,
1683,
29901,
13,
4706,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
845,
1664,
9170,
29892,
376,
1184,
10414,
29907,
29889,
468,
4668,
29916,
1159,
13,
4706,
528,
24574,
353,
9920,
29879,
29889,
3137,
29898,
1853,
543,
7239,
12750,
2713,
1664,
1159,
13,
13,
1678,
363,
528,
1664,
297,
528,
24574,
29901,
13,
4706,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
845,
1664,
1642,
4830,
29898,
845,
1664,
511,
528,
1664,
2283,
29892,
1134,
543,
1807,
1159,
13,
1678,
4303,
29889,
2158,
3401,
877,
2713,
24574,
11086,
287,
1495,
13,
1678,
736,
5852,
13,
13,
13,
1753,
2767,
2713,
1664,
26753,
7295,
13,
1678,
9995,
5020,
15190,
528,
1664,
26753,
528,
24574,
15945,
29908,
13,
1678,
528,
1664,
9170,
353,
1788,
9170,
703,
845,
24574,
1159,
13,
1678,
17279,
353,
9920,
29879,
29889,
3137,
29898,
1853,
543,
2713,
1664,
11093,
2713,
1664,
1159,
13,
13,
1678,
6795,
353,
29871,
29900,
13,
1678,
363,
1775,
297,
17279,
29901,
13,
4706,
6795,
4619,
29871,
29896,
13,
4706,
396,
679,
17279,
8393,
13,
4706,
1775,
25098,
29879,
353,
6571,
13,
4706,
28597,
558,
29918,
2922,
13504,
1691,
29889,
657,
24095,
25098,
29879,
29898,
2922,
29892,
1775,
25098,
29879,
29897,
13,
13,
4706,
396,
2254,
716,
3983,
13,
4706,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
845,
1664,
9170,
29892,
29850,
29900,
1836,
4668,
29916,
1642,
4830,
29898,
2922,
25098,
29879,
3366,
4262,
3108,
876,
13,
4706,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
2922,
29892,
2254,
9527,
29922,
845,
1664,
2283,
29897,
13,
13,
4706,
396,
731,
8393,
13,
4706,
28597,
558,
29918,
2922,
13504,
1691,
29889,
842,
24095,
25098,
29879,
29898,
2922,
29892,
1775,
25098,
29879,
29897,
13,
13,
4706,
1596,
703,
29912,
29900,
29913,
756,
1063,
4784,
304,
278,
9281,
1873,
1642,
4830,
29898,
2922,
876,
13,
4706,
1596,
703,
29912,
29900,
6822,
29912,
29896,
29913,
17279,
4784,
1642,
4830,
29898,
11808,
29892,
7431,
29898,
15388,
29879,
4961,
13,
13,
1678,
4303,
29889,
2158,
3401,
877,
2713,
24574,
4784,
1495,
13,
13,
13,
1753,
15414,
29896,
29896,
29906,
3820,
2536,
7295,
13,
1678,
9995,
1281,
369,
1372,
15414,
29896,
29896,
17279,
304,
3144,
2536,
17279,
9995,
13,
1678,
1423,
580,
13,
1678,
15414,
29896,
29896,
2713,
24574,
353,
9920,
29879,
29889,
3137,
29898,
1853,
543,
8235,
29896,
29896,
2713,
1664,
1159,
13,
1678,
1596,
29898,
8235,
29896,
29896,
2713,
24574,
29897,
13,
1678,
363,
15414,
29896,
29896,
2713,
1664,
297,
15414,
29896,
29896,
2713,
24574,
29901,
13,
4706,
1596,
703,
4300,
571,
292,
426,
29900,
29913,
528,
1664,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
876,
13,
4706,
396,
679,
599,
8393,
13,
4706,
8393,
353,
9920,
29879,
29889,
1761,
25098,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
11430,
29922,
5574,
29892,
380,
543,
29916,
29930,
613,
413,
29922,
5574,
29897,
13,
4706,
1596,
29898,
15697,
29897,
13,
4706,
396,
679,
599,
6631,
7573,
13,
4706,
6631,
20284,
353,
9920,
29879,
29889,
1761,
20971,
1953,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
260,
543,
1445,
613,
274,
29922,
5574,
29892,
282,
29922,
5574,
29897,
13,
4706,
1596,
29898,
18045,
20284,
29897,
13,
4706,
396,
679,
599,
25834,
13,
4706,
9920,
29879,
29889,
2622,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
364,
29922,
5574,
29897,
13,
4706,
9920,
29879,
29889,
24947,
2713,
1943,
29898,
12650,
543,
1159,
13,
4706,
25834,
353,
9920,
29879,
29889,
3137,
29898,
2536,
29922,
5574,
29897,
13,
4706,
1596,
29898,
845,
11603,
29897,
13,
268,
13,
4706,
396,
1653,
3144,
2536,
528,
1664,
13,
4706,
528,
1664,
353,
9920,
29879,
29889,
845,
9382,
4247,
877,
7239,
12750,
2713,
1664,
742,
408,
2713,
1664,
29922,
5574,
29892,
302,
10724,
29900,
2403,
7239,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
876,
13,
4706,
9920,
29879,
29889,
2622,
29898,
845,
11603,
29892,
364,
29922,
5574,
29897,
13,
4706,
9920,
29879,
29889,
24947,
2713,
1943,
29898,
16645,
29922,
845,
1664,
29897,
13,
4706,
1596,
703,
6778,
29958,
1383,
1664,
426,
29900,
29913,
2825,
1642,
4830,
29898,
845,
1664,
876,
13,
4706,
396,
3566,
8393,
13,
4706,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
23521,
558,
29918,
3888,
29889,
20944,
1699,
845,
24574,
3284,
1184,
10414,
29907,
29889,
468,
4668,
29916,
1159,
13,
4706,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
845,
1664,
1642,
4830,
29898,
845,
1664,
511,
528,
1664,
2283,
29892,
1134,
543,
1807,
1159,
13,
4706,
1596,
703,
29020,
8393,
363,
426,
29900,
29913,
1642,
4830,
29898,
845,
1664,
876,
13,
4706,
363,
12421,
297,
8393,
29901,
13,
9651,
995,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
12421,
876,
13,
9651,
1018,
29901,
13,
18884,
565,
1134,
29898,
1767,
29897,
1275,
1134,
29898,
2636,
1125,
13,
462,
1678,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
845,
1664,
29892,
12421,
511,
995,
29961,
29900,
3816,
29900,
1402,
995,
29961,
29900,
3816,
29896,
1402,
995,
29961,
29900,
3816,
29906,
1402,
2393,
543,
8896,
29941,
1159,
13,
18884,
1683,
29901,
13,
462,
1678,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
845,
1664,
29892,
12421,
511,
995,
29897,
13,
9651,
5174,
29901,
13,
18884,
1596,
703,
9692,
1108,
29873,
746,
4444,
426,
29900,
1836,
29912,
29896,
1118,
14993,
3262,
363,
1286,
1642,
4830,
29898,
845,
1664,
29892,
12421,
876,
13,
4706,
396,
4511,
7573,
13,
4706,
565,
6631,
20284,
29901,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
18045,
20284,
511,
29871,
29906,
1125,
13,
18884,
1881,
25098,
353,
6631,
20284,
29961,
29875,
1822,
5451,
17350,
1159,
29961,
29896,
29962,
13,
18884,
9920,
29879,
29889,
6915,
25098,
29898,
18045,
20284,
29961,
29875,
29974,
29896,
1402,
29850,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
845,
1664,
29892,
1881,
25098,
876,
13,
4706,
396,
731,
2761,
6166,
13,
4706,
565,
9920,
29879,
29889,
12715,
3010,
703,
3306,
29900,
29918,
4435,
613,
2943,
29922,
845,
1664,
29892,
429,
29922,
5574,
1125,
13,
9651,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
3306,
29900,
29918,
4435,
1642,
4830,
29898,
845,
1664,
511,
376,
2780,
29901,
6451,
2697,
29909,
613,
1134,
543,
1807,
29908,
1723,
13,
4706,
565,
9920,
29879,
29889,
12715,
3010,
703,
3306,
29896,
29918,
4435,
613,
2943,
29922,
845,
1664,
29892,
429,
29922,
5574,
1125,
13,
9651,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
3306,
29896,
29918,
4435,
1642,
4830,
29898,
845,
1664,
511,
376,
2780,
29901,
6451,
2697,
29933,
613,
1134,
543,
1807,
29908,
1723,
13,
4706,
565,
9920,
29879,
29889,
12715,
3010,
703,
3306,
29906,
29918,
4435,
613,
2943,
29922,
845,
1664,
29892,
429,
29922,
5574,
1125,
13,
9651,
9920,
29879,
29889,
842,
25098,
703,
29912,
29900,
1836,
3306,
29906,
29918,
4435,
1642,
4830,
29898,
845,
1664,
511,
376,
2780,
29901,
6451,
2697,
29907,
613,
1134,
543,
1807,
29908,
1723,
13,
4706,
396,
5217,
15414,
29896,
29896,
528,
1664,
13,
4706,
396,
9006,
29879,
29889,
8143,
29898,
8235,
29896,
29896,
2713,
1664,
29897,
13,
13,
13,
1753,
15414,
29896,
29896,
29906,
4668,
29916,
29898,
4262,
543,
23521,
558,
29918,
11234,
29908,
1125,
13,
1678,
9995,
13,
1678,
1281,
369,
1372,
15414,
29896,
29896,
17279,
304,
528,
1664,
26753,
17279,
13,
1678,
826,
3174,
29901,
13,
4706,
3983,
313,
710,
1125,
1383,
1664,
26753,
3983,
1024,
313,
9507,
29897,
13,
1678,
9995,
13,
1678,
1423,
580,
13,
1678,
15414,
29896,
29896,
2713,
24574,
353,
9920,
29879,
29889,
3137,
29898,
1853,
543,
8235,
29896,
29896,
2713,
1664,
1159,
13,
1678,
22267,
13778,
2631,
353,
5159,
13,
1678,
363,
15414,
29896,
29896,
2713,
1664,
297,
15414,
29896,
29896,
2713,
24574,
29901,
13,
4706,
528,
1664,
2605,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
845,
1664,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
876,
13,
4706,
565,
376,
307,
10414,
29907,
29908,
451,
297,
528,
1664,
2605,
29901,
13,
9651,
6773,
13,
4706,
22267,
13778,
2631,
29889,
4397,
29898,
8235,
29896,
29896,
2713,
1664,
29897,
13,
13,
4706,
1596,
703,
1168,
369,
1259,
426,
29900,
29913,
528,
1664,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
876,
13,
4706,
396,
679,
599,
8393,
13,
4706,
8393,
353,
9920,
29879,
29889,
1761,
25098,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
11430,
29922,
5574,
29892,
380,
543,
29916,
29930,
613,
413,
29922,
5574,
29897,
13,
4706,
1596,
29898,
15697,
29897,
13,
4706,
396,
679,
599,
6631,
7573,
13,
4706,
6631,
20284,
353,
9920,
29879,
29889,
1761,
20971,
1953,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
260,
543,
1445,
613,
274,
29922,
5574,
29897,
13,
4706,
1596,
29898,
18045,
20284,
29897,
13,
4706,
396,
679,
599,
25834,
13,
4706,
9920,
29879,
29889,
2622,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
364,
29922,
5574,
29897,
13,
4706,
9920,
29879,
29889,
24947,
2713,
1943,
29898,
12650,
543,
1159,
13,
4706,
25834,
353,
9920,
29879,
29889,
3137,
29898,
2536,
29922,
5574,
29897,
13,
4706,
1596,
29898,
845,
11603,
29897,
13,
13,
4706,
396,
1653,
528,
1664,
26753,
528,
1664,
13,
4706,
528,
1664,
353,
9920,
29879,
29889,
845,
9382,
4247,
877,
2713,
1664,
11093,
2713,
1664,
742,
408,
2713,
1664,
29922,
5574,
29892,
1024,
10724,
29900,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29889,
6506,
703,
29918,
29956,
29907,
613,
11119,
20322,
29990,
29908,
4961,
13,
4706,
9920,
29879,
29889,
2622,
29898,
845,
11603,
29892,
364,
29922,
5574,
29897,
13,
4706,
9920,
29879,
29889,
24947,
2713,
1943,
29898,
16645,
29922,
845,
1664,
29897,
13,
4706,
528,
1664,
2283,
353,
2897,
29889,
2084,
29889,
7122,
29898,
23521,
558,
29918,
3888,
29889,
20944,
29892,
376,
845,
24574,
613,
29850,
29900,
1836,
4668,
29916,
1642,
4830,
29898,
4262,
876,
13,
4706,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
2254,
9527,
29922,
845,
1664,
2283,
29897,
13,
4706,
1596,
703,
6778,
29958,
1383,
1664,
426,
29900,
29913,
2825,
1642,
4830,
29898,
845,
1664,
876,
13,
4706,
396,
3566,
6055,
13,
4706,
325,
7508,
4809,
353,
6120,
29898,
9006,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
376,
29916,
11403,
4809,
29908,
4961,
13,
4706,
565,
325,
7508,
4809,
29901,
13,
9651,
2943,
1204,
353,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
679,
4247,
1367,
2059,
1170,
543,
29894,
7508,
17825,
1159,
13,
9651,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
3863,
29918,
11227,
7607,
3177,
1204,
29892,
376,
1767,
613,
325,
7508,
4809,
876,
13,
4706,
528,
23626,
353,
6120,
29898,
9006,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
376,
29916,
11403,
2713,
23626,
29908,
4961,
13,
4706,
565,
451,
528,
23626,
29901,
13,
9651,
2943,
1204,
353,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
679,
4247,
1367,
2059,
1170,
543,
2713,
6986,
1159,
13,
9651,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
3863,
29918,
11227,
7607,
3177,
1204,
29892,
376,
1767,
613,
528,
23626,
876,
13,
4706,
1580,
1070,
537,
353,
6120,
29898,
9006,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
376,
29916,
10299,
1070,
29908,
4961,
13,
4706,
565,
1580,
1070,
537,
29901,
13,
9651,
2943,
1204,
353,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
679,
4247,
1367,
2059,
1170,
543,
10299,
1070,
537,
1159,
13,
9651,
9920,
29879,
29889,
845,
1664,
11093,
29898,
4668,
29916,
3177,
29922,
845,
1664,
29892,
3863,
29918,
11227,
7607,
3177,
1204,
29892,
376,
1767,
613,
1580,
1070,
537,
876,
13,
4706,
396,
3566,
8393,
13,
4706,
1596,
703,
29020,
8393,
363,
426,
29900,
29913,
1642,
4830,
29898,
845,
1664,
876,
13,
4706,
363,
12421,
297,
8393,
29901,
13,
9651,
995,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
8235,
29896,
29896,
2713,
1664,
29892,
12421,
876,
13,
9651,
565,
12421,
297,
15414,
29906,
4668,
29916,
25098,
29901,
13,
18884,
4303,
29889,
842,
25098,
29898,
845,
1664,
29892,
15414,
29906,
4668,
29916,
25098,
29961,
5552,
1402,
995,
29897,
13,
4706,
396,
3566,
1426,
1973,
13,
4706,
565,
6631,
20284,
29901,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
18045,
20284,
511,
29871,
29906,
1125,
13,
18884,
18459,
9170,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
29912,
29896,
29913,
1642,
4830,
29898,
18045,
20284,
29961,
29875,
29974,
29896,
1402,
376,
1445,
21898,
1170,
5783,
13,
18884,
12421,
353,
6631,
20284,
29961,
29875,
1822,
5451,
17350,
1159,
29961,
29896,
29962,
13,
18884,
4303,
29889,
842,
25098,
29898,
845,
1664,
29892,
15414,
29906,
4668,
29916,
25098,
29961,
5552,
1402,
18459,
9170,
29897,
13,
13,
1678,
396,
5217,
22267,
29907,
528,
24574,
13,
1678,
9920,
29879,
29889,
8143,
29898,
16309,
13778,
2631,
29897,
13,
13,
13,
1753,
1788,
9170,
29898,
12083,
2433,
29374,
13,
1678,
9995,
13,
1678,
16969,
278,
1788,
3884,
13,
1678,
826,
3174,
29901,
13,
4706,
4138,
313,
710,
1125,
4138,
304,
9773,
304,
1788,
3884,
13,
13,
1678,
16969,
29901,
13,
4706,
313,
710,
1125,
2224,
304,
1788,
3884,
13,
1678,
9995,
13,
1678,
3876,
9170,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
4961,
13,
1678,
736,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
9170,
29892,
4138,
29897,
13,
13,
13,
1753,
1831,
3991,
7295,
13,
1678,
9995,
3549,
5285,
2943,
322,
337,
29899,
3198,
12368,
15945,
29908,
13,
1678,
396,
5217,
2030,
5285,
7573,
13,
1678,
565,
9920,
29879,
29889,
5415,
24217,
703,
29940,
10593,
3991,
29908,
1125,
13,
4706,
9920,
29879,
29889,
8143,
703,
29940,
10593,
3991,
1159,
13,
13,
1678,
565,
451,
9920,
29879,
29889,
5415,
24217,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
1125,
13,
4706,
1596,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29897,
13,
4706,
9920,
29879,
29889,
3258,
4247,
703,
23521,
558,
3991,
613,
302,
29922,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29897,
13,
13,
4706,
9920,
29879,
29889,
6915,
25098,
703,
29912,
29900,
1836,
24219,
403,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
511,
376,
6774,
29886,
29889,
28814,
613,
285,
29922,
5574,
29897,
13,
4706,
9232,
29889,
14513,
703,
6708,
15280,
1159,
13,
4706,
4303,
29889,
2158,
3401,
703,
976,
8707,
18667,
11698,
2287,
14602,
29928,
5300,
8707,
8186,
1783,
3352,
1159,
13,
1678,
1683,
29901,
13,
4706,
9920,
29879,
29889,
2622,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29897,
13,
4706,
9232,
29889,
14513,
703,
6708,
15280,
1159,
13,
4706,
4303,
29889,
2158,
3401,
703,
8592,
426,
29900,
29913,
5285,
2943,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
16309,
876,
13,
13,
13,
1753,
24656,
5894,
13390,
7295,
13,
1678,
9995,
6678,
304,
24656,
4180,
491,
766,
17961,
777,
2610,
29874,
3168,
15945,
29908,
13,
1678,
9920,
29879,
29889,
24219,
362,
3260,
29898,
8513,
543,
2696,
1159,
29871,
396,
731,
701,
9612,
17983,
304,
360,
29954,
13,
13,
13,
1753,
4050,
4308,
29898,
7620,
9170,
29892,
2920,
29892,
3171,
29892,
4050,
3505,
29922,
29896,
29892,
10153,
5809,
29569,
6173,
613,
5712,
29922,
23521,
558,
29918,
3888,
29889,
16309,
1125,
13,
1678,
9995,
13,
1678,
390,
21043,
1857,
3515,
297,
278,
1776,
637,
13,
1678,
826,
3174,
29901,
13,
4706,
4078,
9170,
313,
710,
1125,
4078,
3884,
13,
4706,
2920,
313,
524,
1125,
2920,
297,
17036,
13,
4706,
3171,
313,
524,
1125,
3171,
297,
17036,
13,
4706,
4050,
3505,
313,
7411,
1125,
4050,
2159,
313,
19790,
29897,
13,
4706,
10153,
5809,
313,
710,
1125,
869,
6173,
29892,
869,
735,
29878,
29892,
2992,
29897,
13,
4706,
5712,
313,
710,
1125,
1024,
310,
7429,
5712,
313,
361,
738,
29897,
13,
1678,
9995,
13,
1678,
1423,
580,
29871,
396,
1423,
393,
4129,
338,
297,
1797,
13,
1678,
4050,
3505,
353,
10104,
5596,
29898,
2103,
29892,
3171,
29892,
4050,
3505,
29897,
29871,
396,
1207,
1854,
10104,
338,
15590,
13,
13,
1678,
396,
679,
1985,
1819,
304,
367,
3939,
13,
1678,
1985,
10716,
3505,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
9482,
17185,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
876,
13,
1678,
1985,
3306,
8498,
386,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
2780,
8498,
386,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
876,
13,
13,
1678,
396,
731,
7429,
8393,
13,
1678,
565,
1985,
3306,
8498,
386,
2804,
29871,
29906,
29901,
13,
4706,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
2780,
8498,
386,
613,
29871,
29906,
29897,
13,
1678,
565,
4050,
3505,
2804,
1985,
10716,
3505,
29901,
13,
4706,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
9482,
17185,
613,
4050,
3505,
29897,
13,
1678,
396,
19012,
4050,
261,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
29887,
29922,
5574,
29897,
29871,
396,
9025,
28597,
558,
6642,
13,
1678,
28597,
558,
7094,
800,
353,
7431,
29898,
9006,
29879,
29889,
23521,
558,
29898,
3137,
29949,
29922,
5574,
876,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29896,
29892,
269,
29922,
29900,
29897,
29871,
396,
379,
15789,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29906,
29892,
269,
29922,
29900,
29897,
29871,
396,
3740,
13,
1678,
9920,
29879,
29889,
22379,
580,
13,
13,
1678,
396,
4050,
3515,
13,
1678,
1018,
29901,
13,
4706,
17286,
2605,
353,
4303,
29889,
29879,
24546,
8711,
29898,
7620,
9170,
29892,
2920,
29892,
3171,
29892,
3402,
29922,
2492,
5809,
29892,
5712,
29922,
15752,
29897,
29871,
396,
4050,
278,
3515,
13,
1678,
5174,
3852,
2392,
29901,
13,
4706,
1596,
703,
29903,
24546,
8711,
14238,
756,
1063,
508,
346,
839,
1159,
13,
1678,
5174,
29901,
13,
4706,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
13,
13,
1678,
565,
17286,
2605,
29901,
13,
4706,
396,
6963,
4129,
1250,
304,
4226,
13,
4706,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29896,
29892,
269,
29922,
29896,
29897,
29871,
396,
379,
15789,
13,
4706,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29906,
29892,
269,
29922,
29896,
29897,
29871,
396,
3740,
13,
4706,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
9482,
17185,
613,
1985,
10716,
3505,
29897,
13,
4706,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
2780,
8498,
386,
613,
1985,
3306,
8498,
386,
29897,
13,
4706,
9920,
29879,
29889,
23521,
558,
29898,
29887,
29922,
8824,
29897,
13,
4706,
9920,
29879,
29889,
22379,
580,
13,
4706,
736,
17286,
2605,
13,
13,
13,
1753,
1708,
23190,
29898,
7620,
9170,
29892,
2920,
29892,
3171,
29892,
4050,
20717,
29892,
1904,
7490,
29892,
4050,
3505,
29922,
29896,
1125,
13,
1678,
9995,
13,
1678,
7412,
2204,
19416,
278,
3064,
29880,
1241,
13,
1678,
826,
3174,
29901,
13,
4706,
4078,
9170,
313,
710,
1125,
4078,
3884,
411,
20611,
13529,
6081,
13,
4706,
2920,
313,
524,
1125,
29871,
2920,
297,
17036,
13,
4706,
3171,
29901,
29871,
3171,
297,
17036,
13,
4706,
4050,
20717,
29901,
10656,
304,
1708,
23190,
515,
13,
4706,
1904,
7490,
29901,
1904,
7490,
304,
1708,
23190,
515,
13,
4706,
4050,
3505,
29901,
4050,
2159,
313,
19790,
29897,
13,
1678,
9995,
13,
1678,
1423,
580,
29871,
396,
1423,
393,
4129,
338,
297,
1797,
13,
1678,
4050,
3505,
353,
10104,
5596,
29898,
2103,
29892,
3171,
29892,
4050,
3505,
29897,
29871,
396,
1207,
1854,
10104,
338,
15590,
13,
1678,
263,
13454,
5841,
16973,
1241,
11980,
353,
9232,
29889,
14513,
877,
29938,
7050,
9037,
6080,
29887,
13454,
5841,
16973,
1241,
1495,
13,
1678,
10348,
4247,
353,
9920,
29879,
29889,
2230,
4809,
29898,
29874,
13454,
5841,
16973,
1241,
11980,
29892,
3855,
29922,
5574,
29892,
269,
29922,
5574,
29897,
29871,
396,
679,
10348,
2943,
13,
13,
1678,
396,
679,
1985,
1819,
304,
367,
3939,
13,
1678,
1985,
10716,
3505,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
9482,
17185,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
876,
13,
1678,
1985,
3306,
8498,
386,
353,
9920,
29879,
29889,
657,
25098,
703,
29912,
29900,
1836,
2780,
8498,
386,
1642,
4830,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
876,
13,
1678,
1985,
20717,
353,
9920,
29879,
29889,
4299,
15280,
29898,
4299,
7490,
29892,
3949,
29922,
5574,
29892,
3855,
29922,
5574,
29897,
13,
1678,
1985,
20717,
24111,
353,
9920,
29879,
29889,
1761,
9662,
5056,
29898,
22899,
20717,
29892,
269,
29922,
5574,
29897,
13,
1678,
565,
1985,
20717,
24111,
29901,
13,
4706,
1985,
20717,
24111,
353,
1985,
20717,
24111,
29961,
29900,
29962,
13,
1678,
1683,
29901,
13,
4706,
396,
591,
2307,
505,
278,
8267,
13,
4706,
1985,
20717,
24111,
353,
1985,
20717,
13,
268,
13,
13,
1678,
396,
731,
7429,
8393,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
29887,
29922,
5574,
29897,
13,
1678,
28597,
558,
7094,
800,
353,
7431,
29898,
9006,
29879,
29889,
23521,
558,
29898,
3137,
29949,
29922,
5574,
876,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29896,
29892,
269,
29922,
29900,
29897,
29871,
396,
379,
15789,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29906,
29892,
269,
29922,
29900,
29897,
29871,
396,
3740,
13,
1678,
9920,
29879,
29889,
4299,
15280,
29898,
4299,
7490,
29892,
3949,
29922,
9482,
20717,
29892,
321,
29922,
5574,
29897,
29871,
396,
1735,
1904,
7490,
13,
1678,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
9482,
17185,
613,
4050,
3505,
29897,
13,
1678,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
2780,
8498,
386,
613,
29871,
29906,
29897,
29871,
396,
4225,
304,
367,
29871,
29941,
29906,
2966,
304,
4772,
20160,
17028,
29879,
13,
1678,
9920,
29879,
29889,
22379,
580,
13,
13,
1678,
396,
1018,
1708,
23190,
292,
13,
1678,
1018,
29901,
13,
4706,
9920,
29879,
29889,
1456,
23190,
29898,
29888,
29922,
7620,
9170,
29892,
3402,
543,
17915,
613,
281,
29922,
2103,
29892,
298,
29922,
3545,
29892,
10151,
29922,
29896,
29900,
29900,
29892,
29871,
1519,
29873,
29922,
29896,
29900,
29900,
29892,
325,
29922,
5574,
29892,
1701,
29922,
5574,
29892,
2897,
29922,
5574,
29892,
13,
462,
539,
269,
29922,
18494,
4247,
29892,
24221,
543,
29925,
9312,
1159,
13,
1678,
5174,
24875,
2392,
29901,
13,
4706,
1018,
29901,
13,
9651,
9920,
29879,
29889,
1456,
23190,
29898,
29888,
29922,
7620,
9170,
29892,
3402,
543,
17345,
613,
281,
29922,
2103,
29892,
298,
29922,
3545,
29892,
10151,
29922,
29896,
29900,
29900,
29892,
29871,
1519,
29873,
29922,
29896,
29900,
29900,
29892,
325,
29922,
5574,
29892,
1701,
29922,
5574,
29892,
2897,
29922,
5574,
29892,
13,
462,
965,
269,
29922,
18494,
4247,
29897,
13,
4706,
5174,
24875,
2392,
29901,
13,
9651,
9920,
29879,
29889,
2704,
703,
15167,
2609,
367,
1708,
23190,
287,
408,
3855,
29873,
470,
1029,
29875,
29892,
3113,
1423,
278,
5130,
775,
2395,
23157,
13,
13,
1678,
396,
6963,
4129,
1250,
304,
4226,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29896,
29892,
269,
29922,
29896,
29897,
29871,
396,
379,
15789,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
9482,
10925,
29922,
23521,
558,
7094,
800,
29899,
29906,
29892,
269,
29922,
29896,
29897,
29871,
396,
3740,
13,
1678,
9920,
29879,
29889,
4299,
15280,
29898,
4299,
7490,
29892,
3949,
29922,
22899,
20717,
24111,
29892,
321,
29922,
5574,
29897,
13,
1678,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
9482,
17185,
613,
1985,
10716,
3505,
29897,
13,
1678,
4303,
29889,
842,
25098,
29898,
23521,
558,
29918,
3888,
29889,
2917,
4247,
29892,
376,
2780,
8498,
386,
613,
1985,
3306,
8498,
386,
29897,
13,
1678,
9920,
29879,
29889,
23521,
558,
29898,
29887,
29922,
8824,
29897,
13,
1678,
9920,
29879,
29889,
22379,
580,
13,
13,
1678,
4303,
29889,
2158,
3401,
703,
15167,
756,
1063,
8472,
1708,
23190,
287,
304,
29901,
426,
29900,
29913,
1642,
4830,
29898,
7620,
9170,
876,
13,
13,
13,
1753,
10104,
5596,
29898,
2103,
29892,
3171,
29892,
4050,
3505,
29922,
29896,
29889,
29900,
1125,
13,
1678,
9995,
13,
1678,
5399,
29879,
565,
10104,
338,
1546,
15590,
12837,
27028,
13,
1678,
826,
3174,
29901,
13,
4706,
2920,
313,
524,
1125,
1776,
637,
2920,
13,
4706,
3171,
313,
524,
1125,
1776,
637,
3171,
13,
4706,
4050,
3505,
313,
7411,
1125,
4050,
2159,
313,
19790,
29897,
13,
13,
1678,
16969,
29901,
13,
4706,
4050,
3505,
313,
524,
1125,
3516,
519,
4050,
2159,
313,
19790,
29897,
13,
1678,
9995,
13,
1678,
565,
313,
2103,
29930,
9482,
3505,
1405,
29871,
29896,
29953,
29941,
29947,
29946,
29897,
470,
313,
3545,
29930,
9482,
3505,
1405,
29871,
29896,
29953,
29941,
29947,
29946,
1125,
13,
4706,
9920,
29879,
29889,
27392,
703,
12375,
918,
2086,
1880,
304,
480,
6774,
981,
29892,
27668,
4050,
2159,
1159,
13,
4706,
736,
10104,
5596,
29898,
2103,
29892,
3171,
29892,
4050,
3505,
29914,
29906,
29889,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
565,
313,
2103,
334,
3171,
334,
4764,
29898,
9482,
3505,
29892,
29871,
29906,
876,
1405,
29871,
29896,
29945,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29901,
13,
9651,
9659,
353,
9920,
29879,
29889,
26897,
7647,
29898,
3257,
2433,
20647,
1161,
24412,
742,
13,
462,
462,
308,
2643,
2433,
10716,
292,
263,
3515,
472,
1316,
1880,
10104,
29879,
1795,
2125,
1472,
322,
1584,
8095,
2610,
29874,
29905,
29876,
29956,
483,
366,
763,
304,
6773,
8763,
29973,
742,
13,
462,
462,
308,
16077,
29876,
543,
27392,
613,
2826,
29922,
1839,
8241,
742,
525,
3782,
7464,
2322,
3125,
2433,
8241,
742,
13,
462,
462,
308,
12611,
3125,
2433,
3782,
742,
18918,
1231,
2433,
3782,
742,
611,
2433,
5064,
1495,
13,
9651,
565,
9659,
1275,
525,
3782,
2396,
13,
18884,
9920,
29879,
29889,
2704,
703,
4308,
10446,
12611,
839,
491,
1404,
1159,
13,
1678,
736,
4050,
3505,
13,
13,
13,
1753,
2767,
16036,
7295,
13,
1678,
9232,
29889,
14513,
703,
22379,
15280,
5776,
9884,
29936,
1159,
13,
1678,
736,
5852,
13,
2
] |
src/data_management/dto/Data.py | chrissteffen98/KraftKonnect | 0 | 77386 | <filename>src/data_management/dto/Data.py
from dataclasses import dataclass
from time import time_ns
@dataclass
class Data:
__slots__ = ['key', 'time', 'value']
key: int
time: int
value: str
| [
1,
529,
9507,
29958,
4351,
29914,
1272,
29918,
21895,
29914,
29881,
517,
29914,
1469,
29889,
2272,
13,
3166,
848,
13203,
1053,
848,
1990,
13,
3166,
931,
1053,
931,
29918,
1983,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
3630,
29901,
13,
1678,
4770,
2536,
1862,
1649,
353,
6024,
1989,
742,
525,
2230,
742,
525,
1767,
2033,
13,
1678,
1820,
29901,
938,
13,
1678,
931,
29901,
938,
13,
1678,
995,
29901,
851,
13,
13,
2
] |
algorithm/hash/horner_hash.py | joway/PyAlgorithm | 1 | 190480 | from algorithm.calculation.horner import horner
def horner_hash(key, size):
_BASE = 32
return horner(key, _BASE) % size
if __name__ == '__main__':
print(horner_hash('test', 10))
| [
1,
515,
5687,
29889,
15807,
362,
29889,
2015,
1089,
1053,
4029,
1089,
13,
13,
13,
1753,
4029,
1089,
29918,
8568,
29898,
1989,
29892,
2159,
1125,
13,
1678,
903,
25416,
353,
29871,
29941,
29906,
13,
1678,
736,
4029,
1089,
29898,
1989,
29892,
903,
25416,
29897,
1273,
2159,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1596,
29898,
2015,
1089,
29918,
8568,
877,
1688,
742,
29871,
29896,
29900,
876,
13,
2
] |
telegrampy/ext/commands/help.py | Fyssion/telegram.py | 0 | 32155 | <filename>telegrampy/ext/commands/help.py<gh_stars>0
"""
MIT License
Copyright (c) 2020-2021 ilovetocode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
from __future__ import annotations
import html
import itertools
from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar
from .cog import Cog
from .core import Command
from .errors import CommandError
if TYPE_CHECKING:
from .bot import Bot
CommandT = TypeVar("CommandT", bound="Command")
class _HelpCommandImplementation(Command):
"""Class that interfaces with :class:`telegrampy.ext.commands.Command`."""
def __init__(self, help_cmd: HelpCommand, bot: Bot, command_attrs: Dict[str, Any]):
self.help_cmd: HelpCommand = help_cmd
super().__init__(help_cmd, **command_attrs)
self.bot: Bot = bot
class HelpCommand:
"""Help command template.
Attributes
----------
ctx: :class:`telegrampy.ext.commands.Context`
The :class:`telegrampy.ext.commands.Context` for the command
bot: :class:`telegrampy.ext.commands.Bot`
The :class:`telegrampy.ext.commands.Bot` from the Context
"""
def __init__(self, **options: Any) -> None:
self.command_attrs: Dict[str, Any] = options.pop('command_attrs', {})
self.command_attrs.setdefault("name", "help")
self.command_attrs.setdefault("description", "The help command")
self.command_attrs.setdefault("aliases", ["start"])
self._implementation: Optional[_HelpCommandImplementation] = None
def _add_to_bot(self, bot: Bot) -> None:
implementation = _HelpCommandImplementation(self, bot, self.command_attrs)
bot.add_command(implementation)
self._implementation = implementation
def _remove_from_bot(self, bot: Bot) -> None:
if self._implementation is None:
raise RuntimeError("Help command is not implemented.")
bot.remove_command(self._implementation.name)
self._implementation = None
async def get_command_signature(self, command: Command) -> str:
"""|coro|
The method that gets a formatted command signature
Example:
/help [command]
"""
name = html.escape(command.name)
sig = html.escape(command.signature)
return f"/{name} {sig}"
async def send_bot_help(self) -> None:
"""|coro|
The method that sends help for the bot.
This is called when no query is provided.
This method should handle the sending of the help message.
"""
raise NotImplementedError("Subclasses must implement this.")
async def send_cog_help(self, cog: Cog) -> None:
"""|coro|
The method that sends help for a cog.
This is called when a cog matches the query.
This method should handle the sending of the help message.
Parameters
----------
cog: :class:`telegrampy.ext.commands.Cog`
The cog that matched the query
"""
raise NotImplementedError("Subclasses must implement this.")
async def send_command_help(self, command: Command) -> None:
"""The method that sends help for a command.
This is called when a command matches the query.
This method should handle the sending of the help message.
Parameters
----------
command: :class:`telegrampy.ext.commands.Command`
The command that matched the query
"""
raise NotImplementedError("Subclasses must implement this.")
async def send_not_found(self, query: str) -> None:
"""|coro|
The method that sends a 'not found' message or similar.
This method is called when no match is found for the query.
Parameters
----------
query: :class:`str`
The user's query
"""
await self.ctx.send(f"A command or cog named '{query}' was not found.")
async def help_callback(self, query: Optional[str]) -> None:
"""|coro|
The callback that searches for a matching commmand or cog.
This should not be overridden unless it is necessary.
Parameters
----------
query: Optional[:class:`str`]
The user's query. Defaults to ``None``.
"""
bot = self.bot
# Send the bot help if there is no query
if query is None:
await self.send_bot_help()
return
# Check if the query matches a cog
cogs = bot.cogs
if query in cogs.keys():
cog = cogs[query]
await self.send_cog_help(cog)
return
# If not, check if the query matches a command
command = bot.get_command(query)
if command:
await self.send_command_help(command)
return
# If neither, send the not found message
await self.send_not_found(query)
async def __call__(self, ctx, *, command=None):
self.ctx = ctx
self.bot = ctx.bot
await self.help_callback(command)
class DefaultHelpCommand(HelpCommand):
"""The default help command.
This help command mimics BotFather's help command look.
Parameters
----------
no_category: Optional[:class:`str`]
The heading for commands without a category.
Defaults to "No Category".
sort_commands: Optional[:class:`bool`]
Whether to sort the commands.
Defaults to ``True``.
"""
if TYPE_CHECKING:
no_category: str
sort_commands: bool
def __init__(self, **options: Any):
self.no_category: str = options.pop("no_category", "No Category")
self.sort_commands: bool = options.pop("sort_commands", True)
super().__init__(**options)
def get_ending_note(self) -> str:
"""Returns the command's ending note."""
if self._implementation is None:
raise RuntimeError("Help command is not implemented.")
name = self._implementation.name
return (
f"Type /{name} [command] for more info on a command.\n"
f"You can also type /{name} [category] for more info on a category."
)
async def format_commands(self, commands: List[Command], *, heading: str) -> List[str]:
"""|coro|
The method that formats a given list of commands.
Parameters
----------
commands: List[:class`telegrampy.ext.commands.Command`]
The list of commands to format.
heading: :class:`str`
The heading to display.
"""
if not commands:
return []
formatted = []
formatted.append(f"<b>{html.escape(heading)}:</b>")
def make_entry(sig, doc, *, alias_for=None):
alias = f"[Alias for {alias_for}] " if alias_for else ""
if doc:
return f"{sig} - {alias}{html.escape(doc)}"
else:
entry = f"{sig}"
if alias:
entry += f" {alias}"
return entry
for command in commands:
if command.hidden:
continue
sig = await self.get_command_signature(command)
doc = command.description
formatted.append(make_entry(sig, doc))
return formatted
async def format_command(self, command: Command) -> List[str]:
"""|coro|
The method that formats an individual command.
Parameters
------------
command: :class:`Command`
The command to format.
"""
help_text = [await self.get_command_signature(command)]
if command.description:
help_text.append(html.escape(command.description))
if command.aliases:
help_text.append(f"Aliases: {', '.join(command.aliases)}")
return help_text
async def filter_commands(self, commands: List[CommandT]) -> List[CommandT]:
"""|coro|
Takes a list of commands and filters them.
Parameters
----------
commands: List[:class:`telegrampy.ext.commands.Command`]
The commands to filter.
Returns
-------
List[:class:`telegrampy.ext.commands.Command`]
The filtered commands.
"""
filtered_commands = []
async def predicate(command):
try:
return await command.can_run(self.ctx)
except CommandError:
return False
for command in commands:
if not command.hidden and await predicate(command):
filtered_commands.append(command)
return filtered_commands
async def send_help_text(self, help_text: List[str]) -> None:
message = "\n".join(help_text)
await self.ctx.send(message, parse_mode="HTML")
async def send_bot_help(self) -> None:
bot = self.bot
help_text = []
if bot.description:
# <description> portion
help_text.append(html.escape(bot.description))
help_text.append("") # blank line
no_category = self.no_category
def get_category(command, *, no_category=no_category):
cog = command.cog
return cog.qualified_name if cog is not None else no_category
to_iterate = itertools.groupby(bot.commands, key=get_category)
# Now we can add the commands to the page.
for category, commands in to_iterate:
commands = await self.filter_commands(sorted(commands, key=lambda c: c.name) if self.sort_commands else list(commands))
if not commands:
continue
added = await self.format_commands(commands, heading=category)
if added:
help_text.extend(added)
help_text.append("") # blank line
note = self.get_ending_note()
if note:
# help_text.append("") # blank line
help_text.append(html.escape(note))
await self.send_help_text(help_text)
async def send_cog_help(self, cog: Cog) -> None:
help_text = []
if cog.description:
help_text.append(html.escape(cog.description))
help_text.append("") # blank line
commands = await self.filter_commands(cog.commands)
help_text.extend(await self.format_commands(commands, heading="Commands"))
note = self.get_ending_note()
if note:
help_text.append("") # blank line
help_text.append(html.escape(note))
await self.send_help_text(help_text)
async def send_command_help(self, command: Command) -> None:
await self.send_help_text(await self.format_command(command))
| [
1,
529,
9507,
29958,
15494,
629,
1160,
29891,
29914,
1062,
29914,
26381,
29914,
8477,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
26349,
19245,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
29899,
29906,
29900,
29906,
29896,
980,
586,
10896,
401,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
974,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
13,
262,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
13,
517,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
13,
9708,
583,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
338,
13,
29888,
595,
3276,
304,
437,
577,
29892,
4967,
304,
278,
1494,
5855,
29901,
13,
13,
1576,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
5134,
297,
599,
13,
9708,
583,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
13,
28350,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
613,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29979,
8079,
13764,
29979,
476,
22255,
29892,
8528,
15094,
1799,
6323,
13,
29902,
3580,
5265,
3352,
29892,
2672,
6154,
15789,
4214,
350,
2692,
6058,
27848,
3352,
7495,
6093,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
13,
29943,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
5300,
405,
1164,
1177,
15860,
1177,
1692,
13780,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
13,
20656,
29950,
24125,
6323,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
20700,
17705,
6181,
15842,
13764,
29979,
315,
4375,
7833,
29892,
21330,
1529,
1692,
29903,
6323,
438,
29911,
4448,
13,
5265,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13764,
319,
9838,
8079,
8707,
29911,
4717,
1783,
29892,
323,
8476,
6323,
438,
29911,
4448,
22119,
1660,
29892,
9033,
3235,
4214,
3895,
29892,
13,
12015,
8079,
6323,
2672,
8707,
8186,
9838,
22659,
6093,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
6093,
13,
6156,
7818,
12982,
1525,
29889,
13,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
3472,
13,
5215,
4256,
8504,
13,
3166,
19229,
1053,
323,
6959,
29918,
3210,
16658,
4214,
29892,
3139,
29892,
360,
919,
29892,
2391,
29892,
28379,
29892,
5167,
9037,
13,
13,
3166,
869,
29883,
468,
1053,
315,
468,
13,
3166,
869,
3221,
1053,
10516,
13,
3166,
869,
12523,
1053,
10516,
2392,
13,
13,
361,
323,
6959,
29918,
3210,
16658,
4214,
29901,
13,
1678,
515,
869,
7451,
1053,
11273,
13,
13,
1678,
10516,
29911,
353,
5167,
9037,
703,
6255,
29911,
613,
3216,
543,
6255,
1159,
13,
13,
13,
1990,
903,
29648,
6255,
1888,
14607,
29898,
6255,
1125,
13,
1678,
9995,
2385,
393,
19510,
411,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
6255,
29952,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1371,
29918,
9006,
29901,
22305,
6255,
29892,
9225,
29901,
11273,
29892,
1899,
29918,
5552,
29879,
29901,
360,
919,
29961,
710,
29892,
3139,
29962,
1125,
13,
4706,
1583,
29889,
8477,
29918,
9006,
29901,
22305,
6255,
353,
1371,
29918,
9006,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8477,
29918,
9006,
29892,
3579,
6519,
29918,
5552,
29879,
29897,
13,
4706,
1583,
29889,
7451,
29901,
11273,
353,
9225,
13,
13,
13,
1990,
22305,
6255,
29901,
13,
1678,
9995,
29648,
1899,
4472,
29889,
13,
13,
1678,
6212,
5026,
13,
1678,
448,
1378,
29899,
13,
1678,
12893,
29901,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
2677,
29952,
13,
4706,
450,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
2677,
29952,
363,
278,
1899,
13,
1678,
9225,
29901,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
29933,
327,
29952,
13,
4706,
450,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
29933,
327,
29952,
515,
278,
15228,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
6768,
29901,
3139,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
6519,
29918,
5552,
29879,
29901,
360,
919,
29961,
710,
29892,
3139,
29962,
353,
3987,
29889,
7323,
877,
6519,
29918,
5552,
29879,
742,
426,
1800,
13,
4706,
1583,
29889,
6519,
29918,
5552,
29879,
29889,
842,
4381,
703,
978,
613,
376,
8477,
1159,
13,
4706,
1583,
29889,
6519,
29918,
5552,
29879,
29889,
842,
4381,
703,
8216,
613,
376,
1576,
1371,
1899,
1159,
13,
4706,
1583,
29889,
6519,
29918,
5552,
29879,
29889,
842,
4381,
703,
2606,
2129,
613,
6796,
2962,
20068,
13,
13,
4706,
1583,
3032,
21382,
29901,
28379,
28513,
29648,
6255,
1888,
14607,
29962,
353,
6213,
13,
13,
1678,
822,
903,
1202,
29918,
517,
29918,
7451,
29898,
1311,
29892,
9225,
29901,
11273,
29897,
1599,
6213,
29901,
13,
4706,
5314,
353,
903,
29648,
6255,
1888,
14607,
29898,
1311,
29892,
9225,
29892,
1583,
29889,
6519,
29918,
5552,
29879,
29897,
13,
4706,
9225,
29889,
1202,
29918,
6519,
29898,
21382,
29897,
13,
4706,
1583,
3032,
21382,
353,
5314,
13,
13,
1678,
822,
903,
5992,
29918,
3166,
29918,
7451,
29898,
1311,
29892,
9225,
29901,
11273,
29897,
1599,
6213,
29901,
13,
4706,
565,
1583,
3032,
21382,
338,
6213,
29901,
13,
9651,
12020,
24875,
2392,
703,
29648,
1899,
338,
451,
8762,
23157,
13,
13,
4706,
9225,
29889,
5992,
29918,
6519,
29898,
1311,
3032,
21382,
29889,
978,
29897,
13,
4706,
1583,
3032,
21382,
353,
6213,
13,
13,
1678,
7465,
822,
679,
29918,
6519,
29918,
4530,
1535,
29898,
1311,
29892,
1899,
29901,
10516,
29897,
1599,
851,
29901,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
4947,
263,
20917,
1899,
12608,
13,
13,
4706,
8741,
29901,
13,
4706,
847,
8477,
518,
6519,
29962,
13,
4706,
9995,
13,
4706,
1024,
353,
3472,
29889,
21587,
29898,
6519,
29889,
978,
29897,
13,
4706,
4365,
353,
3472,
29889,
21587,
29898,
6519,
29889,
4530,
1535,
29897,
13,
4706,
736,
285,
29908,
19248,
978,
29913,
426,
18816,
5038,
13,
13,
1678,
7465,
822,
3638,
29918,
7451,
29918,
8477,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
16003,
1371,
363,
278,
9225,
29889,
13,
13,
4706,
910,
338,
2000,
746,
694,
2346,
338,
4944,
29889,
13,
4706,
910,
1158,
881,
4386,
278,
9348,
310,
278,
1371,
2643,
29889,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
703,
4035,
13203,
1818,
2334,
445,
23157,
13,
13,
1678,
7465,
822,
3638,
29918,
29883,
468,
29918,
8477,
29898,
1311,
29892,
274,
468,
29901,
315,
468,
29897,
1599,
6213,
29901,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
16003,
1371,
363,
263,
274,
468,
29889,
13,
13,
4706,
910,
338,
2000,
746,
263,
274,
468,
7087,
278,
2346,
29889,
13,
4706,
910,
1158,
881,
4386,
278,
9348,
310,
278,
1371,
2643,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
274,
468,
29901,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
29907,
468,
29952,
13,
9651,
450,
274,
468,
393,
19228,
278,
2346,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
703,
4035,
13203,
1818,
2334,
445,
23157,
13,
13,
1678,
7465,
822,
3638,
29918,
6519,
29918,
8477,
29898,
1311,
29892,
1899,
29901,
10516,
29897,
1599,
6213,
29901,
13,
4706,
9995,
1576,
1158,
393,
16003,
1371,
363,
263,
1899,
29889,
13,
13,
4706,
910,
338,
2000,
746,
263,
1899,
7087,
278,
2346,
29889,
13,
4706,
910,
1158,
881,
4386,
278,
9348,
310,
278,
1371,
2643,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
1899,
29901,
584,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
6255,
29952,
13,
9651,
450,
1899,
393,
19228,
278,
2346,
13,
4706,
9995,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
703,
4035,
13203,
1818,
2334,
445,
23157,
13,
13,
1678,
7465,
822,
3638,
29918,
1333,
29918,
11940,
29898,
1311,
29892,
2346,
29901,
851,
29897,
1599,
6213,
29901,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
16003,
263,
525,
1333,
1476,
29915,
2643,
470,
2788,
29889,
13,
13,
4706,
910,
1158,
338,
2000,
746,
694,
1993,
338,
1476,
363,
278,
2346,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
2346,
29901,
584,
1990,
18078,
710,
29952,
13,
9651,
450,
1404,
29915,
29879,
2346,
13,
4706,
9995,
13,
4706,
7272,
1583,
29889,
13073,
29889,
6717,
29898,
29888,
29908,
29909,
1899,
470,
274,
468,
4257,
22372,
1972,
10162,
471,
451,
1476,
23157,
13,
13,
1678,
7465,
822,
1371,
29918,
14035,
29898,
1311,
29892,
2346,
29901,
28379,
29961,
710,
2314,
1599,
6213,
29901,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
6939,
393,
29645,
363,
263,
9686,
844,
29885,
392,
470,
274,
468,
29889,
13,
13,
4706,
910,
881,
451,
367,
20831,
1145,
6521,
372,
338,
5181,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
2346,
29901,
28379,
7503,
1990,
18078,
710,
29952,
29962,
13,
9651,
450,
1404,
29915,
29879,
2346,
29889,
13109,
29879,
304,
4954,
8516,
29952,
1412,
13,
4706,
9995,
13,
4706,
9225,
353,
1583,
29889,
7451,
13,
13,
4706,
396,
15076,
278,
9225,
1371,
565,
727,
338,
694,
2346,
13,
4706,
565,
2346,
338,
6213,
29901,
13,
9651,
7272,
1583,
29889,
6717,
29918,
7451,
29918,
8477,
580,
13,
9651,
736,
13,
13,
4706,
396,
5399,
565,
278,
2346,
7087,
263,
274,
468,
13,
4706,
274,
12099,
353,
9225,
29889,
29883,
12099,
13,
13,
4706,
565,
2346,
297,
274,
12099,
29889,
8149,
7295,
13,
9651,
274,
468,
353,
274,
12099,
29961,
1972,
29962,
13,
9651,
7272,
1583,
29889,
6717,
29918,
29883,
468,
29918,
8477,
29898,
29883,
468,
29897,
13,
9651,
736,
13,
13,
4706,
396,
960,
451,
29892,
1423,
565,
278,
2346,
7087,
263,
1899,
13,
4706,
1899,
353,
9225,
29889,
657,
29918,
6519,
29898,
1972,
29897,
13,
4706,
565,
1899,
29901,
13,
9651,
7272,
1583,
29889,
6717,
29918,
6519,
29918,
8477,
29898,
6519,
29897,
13,
9651,
736,
13,
13,
4706,
396,
960,
9561,
29892,
3638,
278,
451,
1476,
2643,
13,
4706,
7272,
1583,
29889,
6717,
29918,
1333,
29918,
11940,
29898,
1972,
29897,
13,
13,
1678,
7465,
822,
4770,
4804,
12035,
1311,
29892,
12893,
29892,
334,
29892,
1899,
29922,
8516,
1125,
13,
4706,
1583,
29889,
13073,
353,
12893,
13,
4706,
1583,
29889,
7451,
353,
12893,
29889,
7451,
13,
4706,
7272,
1583,
29889,
8477,
29918,
14035,
29898,
6519,
29897,
13,
13,
13,
1990,
13109,
29648,
6255,
29898,
29648,
6255,
1125,
13,
1678,
9995,
1576,
2322,
1371,
1899,
29889,
13,
13,
1678,
910,
1371,
1899,
286,
326,
1199,
11273,
29943,
1624,
29915,
29879,
1371,
1899,
1106,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
694,
29918,
7320,
29901,
28379,
7503,
1990,
18078,
710,
29952,
29962,
13,
4706,
450,
28435,
363,
8260,
1728,
263,
7663,
29889,
13,
4706,
13109,
29879,
304,
376,
3782,
17943,
1642,
13,
1678,
2656,
29918,
26381,
29901,
28379,
7503,
1990,
18078,
11227,
29952,
29962,
13,
4706,
26460,
304,
2656,
278,
8260,
29889,
13,
4706,
13109,
29879,
304,
4954,
5574,
29952,
1412,
13,
1678,
9995,
13,
13,
1678,
565,
323,
6959,
29918,
3210,
16658,
4214,
29901,
13,
4706,
694,
29918,
7320,
29901,
851,
13,
4706,
2656,
29918,
26381,
29901,
6120,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
6768,
29901,
3139,
1125,
13,
4706,
1583,
29889,
1217,
29918,
7320,
29901,
851,
353,
3987,
29889,
7323,
703,
1217,
29918,
7320,
613,
376,
3782,
17943,
1159,
13,
4706,
1583,
29889,
6605,
29918,
26381,
29901,
6120,
353,
3987,
29889,
7323,
703,
6605,
29918,
26381,
613,
5852,
29897,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
6768,
29897,
13,
13,
1678,
822,
679,
29918,
2548,
29918,
6812,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
9995,
11609,
29879,
278,
1899,
29915,
29879,
17140,
4443,
1213,
15945,
13,
4706,
565,
1583,
3032,
21382,
338,
6213,
29901,
13,
9651,
12020,
24875,
2392,
703,
29648,
1899,
338,
451,
8762,
23157,
13,
13,
4706,
1024,
353,
1583,
3032,
21382,
29889,
978,
13,
4706,
736,
313,
13,
9651,
285,
29908,
1542,
847,
29912,
978,
29913,
518,
6519,
29962,
363,
901,
5235,
373,
263,
1899,
7790,
29876,
29908,
13,
9651,
285,
29908,
3492,
508,
884,
1134,
847,
29912,
978,
29913,
518,
7320,
29962,
363,
901,
5235,
373,
263,
7663,
1213,
13,
4706,
1723,
13,
13,
1678,
7465,
822,
3402,
29918,
26381,
29898,
1311,
29892,
8260,
29901,
2391,
29961,
6255,
1402,
334,
29892,
28435,
29901,
851,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
21971,
263,
2183,
1051,
310,
8260,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
8260,
29901,
2391,
7503,
1990,
29952,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
6255,
29952,
29962,
13,
9651,
450,
1051,
310,
8260,
304,
3402,
29889,
13,
4706,
28435,
29901,
584,
1990,
18078,
710,
29952,
13,
9651,
450,
28435,
304,
2479,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
8260,
29901,
13,
9651,
736,
5159,
13,
13,
4706,
20917,
353,
5159,
13,
13,
4706,
20917,
29889,
4397,
29898,
29888,
29908,
29966,
29890,
26208,
1420,
29889,
21587,
29898,
2813,
292,
2915,
29901,
829,
29890,
29958,
1159,
13,
13,
4706,
822,
1207,
29918,
8269,
29898,
18816,
29892,
1574,
29892,
334,
29892,
13995,
29918,
1454,
29922,
8516,
1125,
13,
9651,
13995,
353,
285,
29908,
29961,
29909,
18849,
363,
426,
19973,
29918,
1454,
6525,
376,
565,
13995,
29918,
1454,
1683,
5124,
13,
13,
9651,
565,
1574,
29901,
13,
18884,
736,
285,
29908,
29912,
18816,
29913,
448,
426,
19973,
1157,
1420,
29889,
21587,
29898,
1514,
2915,
29908,
13,
9651,
1683,
29901,
13,
18884,
6251,
353,
285,
29908,
29912,
18816,
5038,
13,
18884,
565,
13995,
29901,
13,
462,
1678,
6251,
4619,
285,
29908,
426,
19973,
5038,
13,
18884,
736,
6251,
13,
13,
4706,
363,
1899,
297,
8260,
29901,
13,
9651,
565,
1899,
29889,
10892,
29901,
13,
18884,
6773,
13,
13,
9651,
4365,
353,
7272,
1583,
29889,
657,
29918,
6519,
29918,
4530,
1535,
29898,
6519,
29897,
13,
9651,
1574,
353,
1899,
29889,
8216,
13,
9651,
20917,
29889,
4397,
29898,
5675,
29918,
8269,
29898,
18816,
29892,
1574,
876,
13,
13,
4706,
736,
20917,
13,
13,
1678,
7465,
822,
3402,
29918,
6519,
29898,
1311,
29892,
1899,
29901,
10516,
29897,
1599,
2391,
29961,
710,
5387,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
450,
1158,
393,
21971,
385,
5375,
1899,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
5634,
13,
4706,
1899,
29901,
584,
1990,
18078,
6255,
29952,
13,
9651,
450,
1899,
304,
3402,
29889,
13,
4706,
9995,
13,
13,
4706,
1371,
29918,
726,
353,
518,
20675,
1583,
29889,
657,
29918,
6519,
29918,
4530,
1535,
29898,
6519,
4638,
13,
13,
4706,
565,
1899,
29889,
8216,
29901,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
1420,
29889,
21587,
29898,
6519,
29889,
8216,
876,
13,
4706,
565,
1899,
29889,
2606,
2129,
29901,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
29888,
29908,
29909,
492,
2129,
29901,
426,
742,
15300,
7122,
29898,
6519,
29889,
2606,
2129,
2915,
1159,
13,
13,
4706,
736,
1371,
29918,
726,
13,
13,
1678,
7465,
822,
4175,
29918,
26381,
29898,
1311,
29892,
8260,
29901,
2391,
29961,
6255,
29911,
2314,
1599,
2391,
29961,
6255,
29911,
5387,
13,
4706,
9995,
29989,
2616,
29877,
29989,
13,
13,
4706,
323,
6926,
263,
1051,
310,
8260,
322,
18094,
963,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
8260,
29901,
2391,
7503,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
6255,
29952,
29962,
13,
9651,
450,
8260,
304,
4175,
29889,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
2391,
7503,
1990,
18078,
15494,
629,
1160,
29891,
29889,
1062,
29889,
26381,
29889,
6255,
29952,
29962,
13,
9651,
450,
22289,
8260,
29889,
13,
4706,
9995,
13,
13,
4706,
22289,
29918,
26381,
353,
5159,
13,
13,
4706,
7465,
822,
24384,
29898,
6519,
1125,
13,
9651,
1018,
29901,
13,
18884,
736,
7272,
1899,
29889,
3068,
29918,
3389,
29898,
1311,
29889,
13073,
29897,
13,
9651,
5174,
10516,
2392,
29901,
13,
18884,
736,
7700,
13,
13,
4706,
363,
1899,
297,
8260,
29901,
13,
9651,
565,
451,
1899,
29889,
10892,
322,
7272,
24384,
29898,
6519,
1125,
13,
18884,
22289,
29918,
26381,
29889,
4397,
29898,
6519,
29897,
13,
13,
4706,
736,
22289,
29918,
26381,
13,
13,
1678,
7465,
822,
3638,
29918,
8477,
29918,
726,
29898,
1311,
29892,
1371,
29918,
726,
29901,
2391,
29961,
710,
2314,
1599,
6213,
29901,
13,
4706,
2643,
353,
6634,
29876,
1642,
7122,
29898,
8477,
29918,
726,
29897,
13,
4706,
7272,
1583,
29889,
13073,
29889,
6717,
29898,
4906,
29892,
6088,
29918,
8513,
543,
7020,
1159,
13,
13,
1678,
7465,
822,
3638,
29918,
7451,
29918,
8477,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
9225,
353,
1583,
29889,
7451,
13,
13,
4706,
1371,
29918,
726,
353,
5159,
13,
13,
4706,
565,
9225,
29889,
8216,
29901,
13,
9651,
396,
529,
8216,
29958,
11910,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
1420,
29889,
21587,
29898,
7451,
29889,
8216,
876,
13,
9651,
1371,
29918,
726,
29889,
4397,
703,
1159,
29871,
396,
9654,
1196,
13,
13,
4706,
694,
29918,
7320,
353,
1583,
29889,
1217,
29918,
7320,
13,
13,
4706,
822,
679,
29918,
7320,
29898,
6519,
29892,
334,
29892,
694,
29918,
7320,
29922,
1217,
29918,
7320,
1125,
13,
9651,
274,
468,
353,
1899,
29889,
29883,
468,
13,
9651,
736,
274,
468,
29889,
15380,
2164,
29918,
978,
565,
274,
468,
338,
451,
6213,
1683,
694,
29918,
7320,
13,
13,
4706,
304,
29918,
1524,
403,
353,
4256,
8504,
29889,
27789,
29898,
7451,
29889,
26381,
29892,
1820,
29922,
657,
29918,
7320,
29897,
13,
13,
4706,
396,
2567,
591,
508,
788,
278,
8260,
304,
278,
1813,
29889,
13,
4706,
363,
7663,
29892,
8260,
297,
304,
29918,
1524,
403,
29901,
13,
9651,
8260,
353,
7272,
1583,
29889,
4572,
29918,
26381,
29898,
24582,
29898,
26381,
29892,
1820,
29922,
2892,
274,
29901,
274,
29889,
978,
29897,
565,
1583,
29889,
6605,
29918,
26381,
1683,
1051,
29898,
26381,
876,
13,
9651,
565,
451,
8260,
29901,
13,
18884,
6773,
13,
13,
9651,
2715,
353,
7272,
1583,
29889,
4830,
29918,
26381,
29898,
26381,
29892,
28435,
29922,
7320,
29897,
13,
9651,
565,
2715,
29901,
13,
18884,
1371,
29918,
726,
29889,
21843,
29898,
23959,
29897,
13,
18884,
1371,
29918,
726,
29889,
4397,
703,
1159,
29871,
396,
9654,
1196,
13,
13,
4706,
4443,
353,
1583,
29889,
657,
29918,
2548,
29918,
6812,
580,
13,
4706,
565,
4443,
29901,
13,
9651,
396,
1371,
29918,
726,
29889,
4397,
703,
1159,
29871,
396,
9654,
1196,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
1420,
29889,
21587,
29898,
6812,
876,
13,
13,
4706,
7272,
1583,
29889,
6717,
29918,
8477,
29918,
726,
29898,
8477,
29918,
726,
29897,
13,
13,
1678,
7465,
822,
3638,
29918,
29883,
468,
29918,
8477,
29898,
1311,
29892,
274,
468,
29901,
315,
468,
29897,
1599,
6213,
29901,
13,
4706,
1371,
29918,
726,
353,
5159,
13,
13,
4706,
565,
274,
468,
29889,
8216,
29901,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
1420,
29889,
21587,
29898,
29883,
468,
29889,
8216,
876,
13,
9651,
1371,
29918,
726,
29889,
4397,
703,
1159,
29871,
396,
9654,
1196,
13,
13,
4706,
8260,
353,
7272,
1583,
29889,
4572,
29918,
26381,
29898,
29883,
468,
29889,
26381,
29897,
13,
13,
4706,
1371,
29918,
726,
29889,
21843,
29898,
20675,
1583,
29889,
4830,
29918,
26381,
29898,
26381,
29892,
28435,
543,
5261,
4167,
5783,
13,
13,
4706,
4443,
353,
1583,
29889,
657,
29918,
2548,
29918,
6812,
580,
13,
4706,
565,
4443,
29901,
13,
9651,
1371,
29918,
726,
29889,
4397,
703,
1159,
29871,
396,
9654,
1196,
13,
9651,
1371,
29918,
726,
29889,
4397,
29898,
1420,
29889,
21587,
29898,
6812,
876,
13,
13,
4706,
7272,
1583,
29889,
6717,
29918,
8477,
29918,
726,
29898,
8477,
29918,
726,
29897,
13,
13,
1678,
7465,
822,
3638,
29918,
6519,
29918,
8477,
29898,
1311,
29892,
1899,
29901,
10516,
29897,
1599,
6213,
29901,
13,
4706,
7272,
1583,
29889,
6717,
29918,
8477,
29918,
726,
29898,
20675,
1583,
29889,
4830,
29918,
6519,
29898,
6519,
876,
13,
2
] |
PyCAD/GraphicsCanvas.py | danheeks/HeeksCAM | 5 | 74649 | import wx
from wx import glcanvas
import sys
import math
import os
full_path_here = os.path.abspath( __file__ )
full_path_here = full_path_here.replace("\\", "/")
slash = full_path_here.rfind("/")
res_folder = full_path_here
if slash != -1:
res_folder = full_path_here[0:slash]
class GraphicsCanvas(glcanvas.GLCanvas):
def __init__(self, parent):
glcanvas.GLCanvas.__init__(self, parent,-1, attribList=[glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24])
self.context = glcanvas.GLContext(self)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_SIZE, self.OnSize)
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouse)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
self.Bind(wx.EVT_MENU, self.OnMenu, None, 10000, 12000)
self.viewport= wx.GetApp().Viewport()
self.Resize()
self.paint_callbacks = []
self.context_menu_enabled = True
def OnSize(self, event):
self.Resize()
event.Skip()
def OnMenu(self, event):
index = event.GetId() - 10000
tool = self.tools[index]
tool.Run()
def AppendToolsToMenu(self, menu, tools):
for tool in tools:
if tool.IsSeparator():
menu.AppendSeparator()
elif tool.IsAToolList():
sub_menu = wx.Menu()
self.AppendToolsToMenu(sub_menu, tool.GetChildTools())
menu.AppendMenu(wx.ID_ANY, tool.GetTitle(), sub_menu)
else:
item = wx.MenuItem(menu, 10000 + self.next_tool_id, text = tool.GetTitle(), help = tool.GetToolTip())
str = tool.BitmapPath()
if len(str)>0:
try:
image = wx.Image(res_folder + '/bitmaps/' + str + '.png')
image.Rescale(24, 24)
item.SetBitmap(wx.BitmapFromImage(image))
except:
pass
menu.AppendItem(item)
self.next_tool_id = self.next_tool_id + 1
self.tools.append(tool)
def OnMouse(self, event):
if event.RightUp():
if self.context_menu_enabled:
tools = wx.GetApp().GetDropDownTools(event.GetX(), event.GetY(), False, event.m_controlDown)
if len(tools) > 0:
self.next_tool_id = 0
self.tools = []
menu = wx.Menu()
self.AppendToolsToMenu(menu, tools)
self.PopupMenu(menu)
else:
wx.GetApp().OnMouseEvent(self.viewport, event)
if self.viewport.need_update: self.Update()
if self.viewport.need_refresh: self.Refresh()
event.Skip()
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing on MSW
def Resize(self):
s = self.GetClientSize()
self.viewport.WidthAndHeightChanged(s.GetWidth(), s.GetHeight())
self.Refresh()
def OnPaint(self, event):
dc = wx.PaintDC(self)
self.SetCurrent(self.context)
wx.GetApp().glCommands(self.viewport)
for callback in self.paint_callbacks:
callback()
self.SwapBuffers()
return
| [
1,
1053,
26437,
30004,
13,
3166,
26437,
1053,
3144,
15257,
30004,
13,
5215,
10876,
30004,
13,
5215,
5844,
30004,
13,
30004,
13,
5215,
2897,
30004,
13,
8159,
29918,
2084,
29918,
4150,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
4770,
1445,
1649,
1723,
30004,
13,
8159,
29918,
2084,
29918,
4150,
353,
2989,
29918,
2084,
29918,
4150,
29889,
6506,
703,
1966,
613,
5591,
1159,
30004,
13,
17057,
353,
2989,
29918,
2084,
29918,
4150,
29889,
29878,
2886,
11974,
1159,
30004,
13,
690,
29918,
12083,
353,
2989,
29918,
2084,
29918,
4150,
30004,
13,
361,
24765,
2804,
448,
29896,
29901,
30004,
13,
1678,
620,
29918,
12083,
353,
2989,
29918,
2084,
29918,
4150,
29961,
29900,
29901,
17057,
29962,
30004,
13,
30004,
13,
1990,
29247,
21960,
29898,
3820,
15257,
29889,
7239,
21960,
1125,
30004,
13,
259,
822,
4770,
2344,
12035,
1311,
29892,
3847,
1125,
30004,
13,
418,
3144,
15257,
29889,
7239,
21960,
17255,
2344,
12035,
1311,
29892,
3847,
6653,
29896,
29892,
1098,
1091,
1293,
11759,
3820,
15257,
29889,
29956,
29990,
29918,
7239,
29918,
29934,
29954,
5688,
29892,
3144,
15257,
29889,
29956,
29990,
29918,
7239,
29918,
3970,
7466,
1307,
7838,
28483,
29892,
3144,
15257,
29889,
29956,
29990,
29918,
7239,
29918,
2287,
29925,
4690,
29918,
14226,
29892,
29871,
29906,
29946,
2314,
30004,
13,
418,
1583,
29889,
4703,
353,
3144,
15257,
29889,
7239,
2677,
29898,
1311,
8443,
13,
418,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
7228,
10192,
29892,
1583,
29889,
2951,
28939,
8443,
13,
418,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
14226,
29892,
1583,
29889,
2951,
3505,
8443,
13,
418,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
6720,
17171,
29918,
22240,
3919,
29903,
29892,
1583,
29889,
2951,
14346,
8443,
13,
418,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
1001,
8127,
29918,
29933,
11375,
29954,
1672,
18783,
29892,
1583,
29889,
2951,
2110,
559,
10581,
8443,
13,
418,
1583,
29889,
15708,
29898,
23310,
29889,
22240,
29911,
29918,
29924,
1430,
29965,
29892,
1583,
29889,
2951,
6823,
29892,
6213,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
29892,
29871,
29896,
29906,
29900,
29900,
29900,
8443,
13,
418,
1583,
29889,
1493,
637,
29922,
26437,
29889,
2577,
2052,
2141,
1043,
637,
26471,
13,
418,
1583,
29889,
1666,
675,
26471,
13,
418,
1583,
29889,
29886,
2365,
29918,
14035,
29879,
353,
5159,
30004,
13,
418,
1583,
29889,
4703,
29918,
6510,
29918,
17590,
353,
5852,
30004,
13,
30004,
13,
259,
822,
1551,
3505,
29898,
1311,
29892,
1741,
1125,
30004,
13,
539,
1583,
29889,
1666,
675,
26471,
13,
539,
1741,
29889,
15797,
666,
26471,
13,
30004,
13,
259,
822,
1551,
6823,
29898,
1311,
29892,
1741,
1125,
30004,
13,
418,
2380,
353,
1741,
29889,
2577,
1204,
580,
448,
29871,
29896,
29900,
29900,
29900,
29900,
30004,
13,
418,
5780,
353,
1583,
29889,
8504,
29961,
2248,
29962,
30004,
13,
418,
5780,
29889,
6558,
26471,
13,
30004,
13,
259,
822,
22871,
24183,
1762,
6823,
29898,
1311,
29892,
6143,
29892,
8492,
1125,
30004,
13,
418,
363,
5780,
297,
8492,
29901,
30004,
13,
308,
565,
5780,
29889,
3624,
2008,
17954,
7295,
30004,
13,
9651,
6143,
29889,
18277,
2008,
17954,
26471,
13,
308,
25342,
5780,
29889,
3624,
1299,
1507,
1293,
7295,
30004,
13,
9651,
1014,
29918,
6510,
353,
26437,
29889,
6823,
26471,
13,
9651,
1583,
29889,
18277,
24183,
1762,
6823,
29898,
1491,
29918,
6510,
29892,
5780,
29889,
2577,
5938,
24183,
3101,
30004,
13,
9651,
6143,
29889,
18277,
6823,
29898,
23310,
29889,
1367,
29918,
2190,
29979,
29892,
5780,
29889,
2577,
7030,
3285,
1014,
29918,
6510,
8443,
13,
308,
1683,
29901,
30004,
13,
9651,
2944,
353,
26437,
29889,
21331,
29898,
6510,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
718,
1583,
29889,
4622,
29918,
10154,
29918,
333,
29892,
1426,
353,
5780,
29889,
2577,
7030,
3285,
1371,
353,
5780,
29889,
2577,
12229,
29911,
666,
3101,
30004,
13,
9651,
851,
353,
5780,
29889,
15184,
2605,
26471,
13,
9651,
565,
7431,
29898,
710,
15410,
29900,
29901,
30004,
13,
18884,
1018,
29901,
30004,
13,
462,
1678,
1967,
353,
26437,
29889,
2940,
29898,
690,
29918,
12083,
718,
8207,
2966,
10339,
22208,
718,
851,
718,
15300,
2732,
1495,
30004,
13,
462,
1678,
1967,
29889,
1666,
29883,
744,
29898,
29906,
29946,
29892,
29871,
29906,
29946,
8443,
13,
462,
1678,
2944,
29889,
2697,
15184,
29898,
23310,
29889,
15184,
4591,
2940,
29898,
3027,
876,
30004,
13,
18884,
5174,
29901,
30004,
13,
462,
1678,
1209,
30004,
13,
9651,
6143,
29889,
18277,
2001,
29898,
667,
8443,
13,
9651,
1583,
29889,
4622,
29918,
10154,
29918,
333,
353,
1583,
29889,
4622,
29918,
10154,
29918,
333,
718,
29871,
29896,
30004,
13,
9651,
1583,
29889,
8504,
29889,
4397,
29898,
10154,
8443,
13,
30004,
13,
259,
822,
1551,
14346,
29898,
1311,
29892,
1741,
1125,
30004,
13,
418,
565,
1741,
29889,
7341,
3373,
7295,
30004,
13,
308,
565,
1583,
29889,
4703,
29918,
6510,
29918,
17590,
29901,
30004,
13,
632,
8492,
353,
26437,
29889,
2577,
2052,
2141,
2577,
15063,
6767,
24183,
29898,
3696,
29889,
2577,
29990,
3285,
1741,
29889,
2577,
29979,
3285,
7700,
29892,
1741,
29889,
29885,
29918,
6451,
6767,
8443,
13,
632,
565,
7431,
29898,
8504,
29897,
1405,
29871,
29900,
29901,
30004,
13,
18884,
1583,
29889,
4622,
29918,
10154,
29918,
333,
353,
29871,
29900,
30004,
13,
18884,
1583,
29889,
8504,
353,
5159,
30004,
13,
18884,
6143,
353,
26437,
29889,
6823,
26471,
13,
18884,
1583,
29889,
18277,
24183,
1762,
6823,
29898,
6510,
29892,
8492,
8443,
13,
18884,
1583,
29889,
12310,
786,
6823,
29898,
6510,
8443,
13,
418,
1683,
29901,
30004,
13,
308,
26437,
29889,
2577,
2052,
2141,
2951,
14346,
2624,
29898,
1311,
29889,
1493,
637,
29892,
1741,
8443,
13,
30004,
13,
418,
565,
1583,
29889,
1493,
637,
29889,
26180,
29918,
5504,
29901,
1583,
29889,
6422,
26471,
13,
418,
565,
1583,
29889,
1493,
637,
29889,
26180,
29918,
22379,
29901,
1583,
29889,
27132,
26471,
13,
418,
1741,
29889,
15797,
666,
26471,
13,
30004,
13,
259,
822,
1551,
2110,
559,
10581,
29898,
1311,
29892,
1741,
1125,
30004,
13,
418,
1209,
396,
1938,
3078,
29892,
304,
4772,
11013,
292,
373,
10888,
29956,
30004,
13,
30004,
13,
259,
822,
2538,
675,
29898,
1311,
1125,
30004,
13,
418,
269,
353,
1583,
29889,
2577,
4032,
3505,
26471,
13,
418,
1583,
29889,
1493,
637,
29889,
6110,
2855,
7011,
7590,
29898,
29879,
29889,
2577,
6110,
3285,
269,
29889,
2577,
7011,
3101,
30004,
13,
418,
1583,
29889,
27132,
26471,
13,
30004,
13,
259,
822,
1551,
28939,
29898,
1311,
29892,
1741,
1125,
30004,
13,
418,
270,
29883,
353,
26437,
29889,
28939,
12696,
29898,
1311,
8443,
13,
418,
1583,
29889,
2697,
7583,
29898,
1311,
29889,
4703,
8443,
13,
418,
26437,
29889,
2577,
2052,
2141,
3820,
5261,
4167,
29898,
1311,
29889,
1493,
637,
8443,
13,
418,
363,
6939,
297,
1583,
29889,
29886,
2365,
29918,
14035,
29879,
29901,
30004,
13,
3986,
6939,
26471,
13,
418,
1583,
29889,
10840,
481,
29933,
3096,
414,
26471,
13,
418,
736,
30004,
13,
2
] |
src/legohdl/workspace.py | c-rus/legoHDL | 6 | 14983 | # ------------------------------------------------------------------------------
# Project: legohdl
# Script: workspace.py
# Author: <NAME>
# Description:
# The Workspace class. A Workspace object has a path and a list of available
# vendors. This is what the user keeps their work's scope within for a given
# "organization".
# ------------------------------------------------------------------------------
import os, shutil, glob
import logging as log
from datetime import datetime
from .vendor import Vendor
from .apparatus import Apparatus as apt
from .cfg import Cfg, Section, Key
from .map import Map
from .git import Git
from .block import Block
class Workspace:
#store all workspaces in dictionary
Jar = Map()
#active-workspace is a workspace object
_ActiveWorkspace = None
DIR = apt.fs(apt.HIDDEN+"workspaces/")
LOG_FILE = "refresh.log"
MIN_RATE = -1
MAX_RATE = 1440
def __init__(self, name, path, vendors=[], ask=True):
'''
Create a workspace instance.
Parameters:
name (str): the identity for the workspace
path (str): the local path where blocks will be looked for
vendors ([str]): the list of vendors that are tied to this workspace
ask (bool): will ask user if wishing to enter workspace path
Returns:
None
'''
self._name = name
#do not create workspace if the name is already taken
if(self.getName().lower() in self.Jar.keys()):
log.error("Skipping workspace "+self.getName()+" due to duplicate naming conflict.")
return
#set the path
self._path = ''
self.setPath(path)
#do not create workspace if the path is empty
if(self.getPath() == ''):
if(ask == False):
log.error("Skipping workspace "+self.getName()+" due to empty local path.")
return
else:
#keep asking to set path until one is decided/input
try:
path = input("Enter path for workspace "+self.getName()+": ")
except KeyboardInterrupt:
apt.CFG.remove('workspace.'+self.getName())
Workspace.save(inc_active=False)
print()
exit(log.info("Workspace not created."))
while(self.setPath(path) == False):
try:
path = input("Enter path for workspace "+self.getName()+": ")
except KeyboardInterrupt:
apt.CFG.remove('workspace.'+self.getName())
Workspace.save(inc_active=False)
print()
exit(log.info("Workspace not created."))
self._ws_dir = apt.fs(self.DIR+self.getName()+"/")
#ensure all workspace hidden directories exist
if(os.path.isdir(self.getDir()) == False):
log.info("Setting up workspace "+self.getName()+"...")
os.makedirs(self.getDir(), exist_ok=True)
#create workspace's cache where installed blocks will be stored
os.makedirs(self.getDir()+"cache", exist_ok=True)
#create the refresh log if DNE
if(os.path.isfile(self.getDir()+self.LOG_FILE) == False):
open(self.getDir()+self.LOG_FILE, 'w').close()
self._vendors = []
#find all vendor objects by name and store in list
for vndr in vendors:
if(vndr.lower() in Vendor.Jar.keys()):
self._vendors += [Vendor.Jar[vndr]]
else:
log.warning("Could not link unknown vendor "+vndr+" to "+self.getName()+".")
pass
#add to class Jar
self.Jar[self.getName()] = self
pass
def setPath(self, p):
'''
Set the workspace's local path to a new value. Will ask user if okay
to create the path if DNE.
Parameters:
p (str): the path string
Returns:
(bool): true if successfully changed the path attribute
'''
#cannot set an empty path
if(p == '' or p == None):
log.info("Local path for workspace "+self.getName()+" cannot be empty.")
return False
p = apt.fs(p)
#create the workspace's local path if it does not exist
if(os.path.exists(p) == False):
#prompt user
carry_on = apt.confirmation("Workspace "+self.getName()+"'s local path does not exist. Create "+p+"?")
if(carry_on):
os.makedirs(p, exist_ok=True)
self._path = p
return True
else:
log.info("Did not set "+p+" as local path.")
return False
else:
self._path = p
return True
def setName(self, n):
'''
Change the workspace's name if the name is not already taken.
Parameters:
n (str): new name for workspace
Returns:
(bool): true if name successfully altered and updated in Jar
'''
if(n == '' or n == None):
log.error("Workspace name cannot be empty.")
return False
if(n.lower() in self.Jar.keys()):
log.error("Cannot rename workspace to "+n+" due to name conflict.")
return False
else:
#remove old name from Jar
if(self.getName().lower() in self.Jar.keys()):
del self.Jar[self.getName()]
#rename hidden directory if exists
new_dir = apt.fs(self.DIR+n+"/")
if(hasattr(self, "_ws_dir")):
os.rename(self.getDir(), new_dir)
#set the hidden workspace directory
self._ws_dir = new_dir
#change to new name
self._name = n
#update the Jar
self.Jar[self.getName()] = self
return True
def remove(self):
'''
Removes the workspace object from the Jar and its hidden directory.
Parameters:
None
Returns:
None
'''
log.info("Removing workspace "+self.getName()+"...")
#delete the hidden workspace directory
shutil.rmtree(self.getDir(), onerror=apt.rmReadOnly)
#remove from class Jar
del self.Jar[self.getName()]
#remove from cfg file
apt.CFG.remove('workspace.'+self.getName())
apt.CFG.write()
pass
def linkVendor(self, vndr):
'''
Attempts to add a vendor to the workspace's vendor list.
Parameters:
vndr (str): name of the vendor to add
Returns:
(bool): true if the vendor list was modified (successful add)
'''
if(vndr.lower() in Vendor.Jar.keys()):
vndr_obj = Vendor.Jar[vndr]
if(vndr_obj in self.getVendors()):
log.info("Vendor "+vndr_obj.getName()+" is already linked to this workspace.")
return False
else:
log.info("Linking vendor "+vndr_obj.getName()+" to the workspace...")
self._vendors += [vndr_obj]
return True
else:
log.warning("Could not link unknown vendor "+vndr+" to "+self.getName()+".")
return False
def setVendors(self, vndrs):
'''
Overrides entire _vendors attr by setting it equal to 'vndrs'.
Parameters:
vndrs ([str]): list of vendors
Returns:
(bool): success if all vendors listed were added
'''
#reset vendors list
self._vendors = []
success = True
#iterate through every given vendor
for vndr in vndrs:
#verify the vendor exists
if(vndr.lower() in Vendor.Jar.keys()):
vndr_obj = Vendor.Jar[vndr]
#check if the vendor has already been linked
if(vndr_obj in self.getVendors()):
log.info("Vendor "+vndr_obj.getName()+" is already linked to this workspace.")
#link the vendor to this workspace
else:
log.info("Linking vendor "+vndr_obj.getName()+" to the workspace...")
self._vendors += [vndr_obj]
else:
log.warning("Could not link unknown vendor "+vndr+" to "+self.getName()+".")
sucess = False
return success
def unlinkVendor(self, vndr):
'''
Attempts to remove a vendor from the workspace's vendor list.
Parameters:
vndr (str): name of the vendor to remove
Returns:
(bool): true if the vendor list was modified (successful remove)
'''
if(vndr.lower() in Vendor.Jar.keys()):
vndr_obj = Vendor.Jar[vndr]
if(vndr_obj not in self.getVendors()):
log.info("Vendor "+vndr_obj.getName()+" is already unlinked from the workspace.")
return False
else:
log.info("Unlinking vendor "+vndr_obj.getName()+" from the workspace...")
self._vendors.remove(vndr_obj)
return True
else:
log.warning("Could not unlink unknown vendor "+vndr+" from "+self.getName()+".")
return False
def loadBlocks(self, id_dsgns=False):
'''
Loads all blocks found at all levels: dnld (workspace path), instl (workspace
cache), avail (workspace vendors).
When id_dsgns is True, this method uses the 'multi-develop' setting to
determine which level has precedence in loadHDL().
'multi-develop' set to False will only loadHDL() from cache. 'multi-develop'
set to True will first try to loadHDL() from dnld, and if DNE, then try
to loadHDL() from block's cache.
Either way, if inside a current block, that block's HDL will be loaded over
its cache.
Dynamically creates _visible_blocks ([Block]) attribute to be reused.
Parameters:
id_dsgns (bool): identify design units (loadHDL) from blocks
Returns:
_visible_blocks ([Block]): list of all block objects in cache or path
'''
if(hasattr(self, "_visible_blocks")):
return self._visible_blocks
self._visible_blocks = []
#read the setting for multi-develop
mult_dev = apt.getMultiDevelop()
#1. Search for downloaded blocks
#glob on the local workspace path
#print("Local Blocks on:",self.getPath())
marker_files = glob.glob(self.getPath()+"**/*/"+apt.MARKER, recursive=True)
#iterate through all found downloads
for mf in marker_files:
b = Block(mf, self, Block.Level.DNLD)
#if the user is within a current block, load the HDL from its DNLD level (not INSTL)
if(mult_dev == True or Block.getCurrent(bypass=True) == b):
self._visible_blocks += [b]
if(id_dsgns):
b.loadHDL()
pass
#2. Search for installed blocks
#glob on the workspace cache path
#print("Cache Blocks on:",self.getCachePath())
marker_files = glob.glob(self.getCachePath()+"**/*/"+apt.MARKER, recursive=True)
#iterate through all found installations
for mf in marker_files:
#the block must also have a valid git repository at its root
root,_ = os.path.split(mf)
#note: only the head installation has the git repository
if(Git.isValidRepo(root, remote=False)):
b = Block(mf, self, Block.Level.INSTL)
#get the spot for this block's download
dnld_b = Block.Inventory[b.M()][b.L()][b.N()][Block.Level.DNLD.value]
#add this block if a download DNE or the dnld does not match current when
#not in multi-develop mode
if(dnld_b == None or (mult_dev == False and Block.getCurrent(bypass=True) != dnld_b)):
self._visible_blocks += [b]
if(id_dsgns):
b.loadHDL()
pass
#3. Search for available blocks
#glob on each vendor path
marker_files = []
#find all marker files in each of the workspace's vendors
for vndr in self.getVendors():
marker_files += glob.glob(vndr.getVendorDir()+"**/*/"+apt.MARKER, recursive=True)
#iterate through all found availables
for mf in marker_files:
b = Block(mf, self, Block.Level.AVAIL)
#do not add this block to list of visible blocks because it has no
#units associated with it, only metadata
pass
#4. ID all specific version blocks if identifying designs (except current block)
spec_vers_blocks = []
for vis_block in self._visible_blocks:
if(vis_block == Block.getCurrent(bypass=True)):
continue
for spec_block in vis_block.getInstalls().values():
spec_vers_blocks += [spec_block]
if(id_dsgns):
spec_block.loadHDL()
pass
pass
self._visible_blocks += spec_vers_blocks
return self._visible_blocks
def shortcut(self, title, req_entity=False, visibility=True, ref_current=True):
'''
Returns the Block from a shortened title. If title is empty and
'ref_current' is set, then tries to refer to the current block.
Sometimes an entity is required for certain commands; so it can be
assumed entity (instead of block name) if only thing given.
Parameters:
title (str): partial or full M.L.N with optional E attached
req_entity (bool): determine if only thing given then it is an entity
visibility (bool): determine if to only look for visible blocks
ref_current (bool): determine if to try to assign empty title to current block
Returns:
(Block): the identified block from the shortened title
'''
if(title == None):
title = ''
#split into pieces
pieces = title.split('.')
sects = ['']*3
diff = 3 - len(pieces)
for i in range(len(pieces)-1, -1, -1):
sects[diff+i] = pieces[i]
#check final piece if it has an entity attached
entity = ''
if(sects[2].count(apt.ENTITY_DELIM)):
i = sects[2].find(apt.ENTITY_DELIM)
entity = sects[2][i+1:]
sects[2] = sects[2][:i]
#assume only name given is actually the entity
elif(req_entity):
entity = sects[2]
sects[2] = ''
# [!] load all necessary blocks before searching
blocks = self.loadBlocks()
#use all blocks when visibility is off :todo: is this design intent?
if(visibility == False):
blocks = Block.getAllBlocks()
#track list of possible blocks as moving up the chain
possible_blocks = []
#search for an entity
if(len(entity)):
#collect list of all entities
reg = Map()
reg[entity] = []
#iterate through every block and create a mapping for their entity names
for bk in blocks:
#get the entity names from this block
es = bk.loadHDL(returnnames=True)
#print(es)
#create mappings of entity names to their block owners
for e in es:
if(e.lower() not in reg.keys()):
reg[e] = []
reg[e] += [bk]
#see how many blocks were fit to entity name's mapping
num_blocks = len(reg[entity])
#algorithm only detected one possible solution
if(num_blocks == 1):
#make sure rest of sections are correct before returning result
potential = reg[entity][0]
title = potential.getTitle(index=2, dist=2)
#verify each part of block identifier matches what was requested
for i in range(len(sects)):
#print(sects[i])
if(len(sects[i]) and sects[i].lower() != title[i].lower()):
return None
pass
return potential
#algorithm detected multiple possible solutions (cannot infer)
elif(num_blocks > 1):
possible_blocks = reg[entity]
#only was given an entity name, algorithm cannot solve requested entity
if(len(sects[2]) == 0):
log.info("Ambiguous unit; conflicts with")
#display the units/titles that conflict with input
for bk in reg[entity]:
print('\t '+bk.getFull()+":"+entity)
print()
exit()
#no blocks matched the entity name being passed
else:
return None
pass
#search through all block names
for start in range(len(sects)-1, -1, -1):
term = sects[start]
#exit loop if next term is empty
if(len(term) == 0):
break
reg = Map()
reg[term] = []
for bk in blocks:
t = bk.getTitle(index=start, dist=0)[0]
#store the block under the given section name
if(t.lower() not in reg.keys()):
reg[t] = []
reg[t] += [bk]
#count how many blocks occupy this same name
num_blocks = len(reg[term])
#algorithm only detected one possible solution
if(num_blocks == 1):
#make sure rest of sections are correct before returning result
potential = reg[term][0]
title = potential.getTitle(index=2, dist=2)
#verify each part of block identifier matches what was requested
for i in range(len(sects)):
#print(sects[i])
if(len(sects[i]) and sects[i].lower() != title[i].lower()):
return None
pass
return potential
#algorithm detected multiple solutions (cannot infer on this step)
elif(num_blocks > 1):
#compare with blocks for a match and dwindle down choices
next_blocks = []
for bk in reg[term]:
if(bk in possible_blocks or (start == len(sects)-1 and entity == '')):
next_blocks += [bk]
#dwindled down to a single block
if(len(next_blocks) == 1):
#print("FOUND:",next_blocks[0].getTitle(index=2, dist=2))
return next_blocks[0]
#carry on to using next title section
if(len(sects[start-1])):
#continue to using next term
possible_blocks = next_blocks
continue
else:
#ran out of guesses...report the conflicting titles/units
if(req_entity):
log.info("Ambiguous unit; conflicts with")
else:
log.info("Ambiguous title; conflicts with")
for bk in reg[term]:
if(req_entity):
print('\t '+bk.getFull()+":"+entity)
else:
print('\t '+bk.getFull())
exit(print())
pass
#using the current block if title is empty string
if(ref_current and (title == '' or title == None)):
return Block.getCurrent()
#return None if all attempts have failed and not returned anything yet
return None
def decodeUnits(self):
'''
Decodes every available unit to get the complete graphing data structure.
Parameters:
None
Returns:
None
'''
blocks = self.loadBlocks()
#print(blocks)
log.info("Collecting all unit data...")
for b in blocks:
us = b.loadHDL()
for u in us.values():
u.getLanguageFile().decode(u, recursive=False)
log.info("done.")
pass
def listBlocks(self, title, alpha=False, instl=False, dnld=False, avail=False):
'''
Print a formatted table of the available blocks.
Parameters:
title (str): block title to be broken into parts for searching
alpha (bool): determine if to alphabetize the block list order (L.N.V)
instl (bool): determine if to capture only blocks that are installed
dnld (bool): determine if to capture only blocks that are downloaded
avail (bool): determine if to capture blocks available from vendor
Returns:
None
'''
#[!] load the necessary blocks
self.loadBlocks()
#collect if multi-develop is on
mult_dev = apt.getMultiDevelop()
#split the title into parts
M,L,N,_ = Block.snapTitle(title, inc_ent=False)
#get all blocks from the catalog
#store each block's text line in a map to sort keys for alpha flag
catalog = Map()
#iterate through every vendor
for vndr_k,vndrs in Block.Inventory.items():
if(vndr_k.startswith(M.lower()) == False):
continue
#iterate through every library
for lib_k,libs in vndrs.items():
if(lib_k.startswith(L.lower()) == False):
continue
#iterate through every block
for blk_k,lvls in libs.items():
if(blk_k.startswith(N.lower()) == False):
continue
downloaded = installed = available = ' '
disp_d = disp_i = disp_a = False
#if none were set on command-line default to display everything
if((dnld or instl or avail) == False):
dnld = instl = avail = True
#with each lower level, overwrite the block object to print
if(lvls[Block.Level.AVAIL.value] != None):
bk = lvls[Block.Level.AVAIL.value]
available = 'A'
disp_a = True
if(lvls[Block.Level.INSTL.value] != None):
bk = lvls[Block.Level.INSTL.value]
installed = 'I'
disp_i = True
if(lvls[Block.Level.DNLD.value] != None):
if(dnld):
bk = lvls[Block.Level.DNLD.value]
downloaded = 'D'
# if(mult_dev):
# downloaded = 'D'
# installed = installed.lower()
disp_d = True
#one condition pair must be true to display the block
if((disp_a and avail) or (disp_i and instl) or (disp_d and dnld)):
pass
else:
continue
#character to separate different status bits
spacer = ' '
#format the status column's data
sts = downloaded + spacer + installed + spacer + available
#leave version empty if its been unreleased
v = '' if(bk.getVersion() == '0.0.0') else bk.getVersion()
#check if can be updated
#prioritize installation level for checking updates
instllr = bk.getLvlBlock(Block.Level.INSTL)
cmp_v = instllr.getVersion() if(instllr != None and mult_dev == False) else bk.getVersion()
#a '^' is an update symbol indicating the latest referenced version (dnld or instl) is not the actually the latest version found
if(Block.cmpVer(bk.getHighestAvailVersion(), cmp_v) != cmp_v):
sts = sts+' ^'
v = cmp_v
#format the data to print to the console and store in catalog (L.N.V str format)
catalog[bk.L()+'.'+bk.N()+'.'+bk.M()] = '{:<16}'.format(bk.L())+' '+'{:<20}'.format(bk.N())+' '+'{:<8}'.format(sts)+' '+'{:<10}'.format(v)+' '+'{:<16}'.format(bk.M())
pass
pass
keys = list(catalog.keys())
#check if to sort by alphabet
if(alpha):
keys.sort()
#print(keys)
print('{:<16}'.format("Library"),'{:<20}'.format("Block"),'{:<8}'.format("Status"+("*"*int(mult_dev))),'{:<10}'.format("Version"),'{:<16}'.format("Vendor"))
print("-"*16+" "+"-"*20+" "+"-"*8+" "+"-"*10+" "+"-"*16)
#iterate through catalog and print each textline
for k in keys:
print(catalog[k])
pass
def listUnits(self, title, alpha=False, usable=False, ignore_tb=False):
'''
Print a formatted table of all the design units.
Parameters:
title (str): block title to be broken into parts for searching
alpha (bool): determine if to alphabetize the block list order (E.V.L.N)
usable (bool): determine if to display units that can be used
ignore_tb (bool): determine if to ignore testbench files
Returns:
None
'''
#[!] load blocks into inventory
visible = self.loadBlocks()
#:todo: add flag to print 'variations' of an entity/unit (what specific version names exist)
#todo: print status of the unit and which status is usable (D or I)
M,L,N,V,E = Block.snapTitle(title, inc_ent=True)
#print(M,L,N,V,E)
#store each entity's print line in map (key = <unit>:<block-id>) to ensure uniqueness
catalog = Map()
for bk in Block.getAllBlocks():
#for lvl in Block.Inventory[bk.M()][bk.L()][bk.N()]:
block_title = bk.getFull(inc_ver=False)
if(bk.M().lower().startswith(M.lower()) == False):
continue
if(bk.L().lower().startswith(L.lower()) == False):
continue
if(bk.N().lower().startswith(N.lower()) == False):
continue
#collect all units
if(apt.getMultiDevelop() == False):
if(bk.getLvlBlock(Block.Level.INSTL) != None):
bk = bk.getLvlBlock(Block.Level.INSTL)
#skip this block if only displaying usable units and multi-develop off
elif(usable):
continue
units = bk.loadHDL(returnnames=False).values()
for u in units:
if(len(E) and u.E().lower().startswith(E.lower()) == False):
continue
if(ignore_tb and u.isTb()):
continue
#format if unit is visible/usable
vis = '-'
if(bk in visible):
vis = 'yes'
#format design unit name according to its natural language
dsgn = u.getDesign().name.lower()
if(u.getLang() == u.Language.VERILOG and dsgn == 'entity'):
dsgn = 'module'
catalog[u.E()+':'+block_title] = '{:<22}'.format(u.E())+' '+'{:<7}'.format(vis)+' '+'{:<10}'.format(dsgn)+' '+'{:<38}'.format(block_title)
pass
pass
keys = list(catalog.keys())
#check if to sort by alphabet
if(alpha):
keys.sort()
#print to console
print('{:<22}'.format("Unit"),'{:<7}'.format("Usable"),'{:<10}'.format("Type"),'{:<38}'.format("Block"))
print("-"*22+" "+"-"*7+" "+"-"*10+" "+"-"*38)
for k in keys:
print(catalog[k])
pass
pass
@classmethod
def tidy(cls):
'''
Removes any stale hidden workspace directories that aren't mapped to a
workspace found in the class Jar container.
Parameters:
None
Returns:
None
'''
#list all hidden workspace directories
hidden_dirs = os.listdir(cls.DIR)
for hd in hidden_dirs:
if(hd.lower() not in cls.Jar.keys()):
log.info("Removing stale workspace data for "+hd+"...")
if(os.path.isdir(cls.DIR+hd)):
shutil.rmtree(cls.DIR+hd, onerror=apt.rmReadOnly)
#remove all files from workspace directory
else:
os.remove(cls.DIR+hd)
pass
def autoRefresh(self, rate):
'''
Automatically refreshes all vendors for the given workspace. Reads its
log file to determine if past next interval for refresh.
Parameters:
rate (int): how often to ask a refresh within a 24-hour period
Returns:
None
'''
def timeToFloat(prt):
'''
Converts a time object into a float type.
Parameters:
prt (datetime): iso format of current time
Returns:
(float): 0.00 (inclusive) - 24.00 (exclusive)
'''
time_stamp = str(prt).split(' ')[1]
time_sects = time_stamp.split(':')
hrs = int(time_sects[0])
#convert to 'hours'.'minutes'
time_fmt = (float(hrs)+(float(float(time_sects[1])/60)))
return time_fmt
refresh = False
last_punch = None
stage = 1
cur_time = datetime.now()
#do not perform refresh if the rate is 0
if(rate == 0):
return
#always refresh if the rate is set below 0 (-1)
elif(rate <= self.MIN_RATE):
refresh = True
#divide the 24 hour period into even checkpoints
max_hours = float(24)
spacing = float(max_hours / rate)
intervals = []
for i in range(rate):
intervals += [spacing*i]
#ensure log file exists
if(os.path.exists(self.getDir()+self.LOG_FILE) == False):
open(self.getDir()+self.LOG_FILE, 'w').close()
#read log file
#read when the last refresh time occurred
with open(self.getDir()+self.LOG_FILE, 'r') as log_file:
#read the latest date
data = log_file.readlines()
#no refreshes have occurred so automatically need a refresh
if(len(data) == 0):
last_punch = cur_time
refresh = True
else:
last_punch = datetime.fromisoformat(data[0])
#determine if its time to refresh
#get latest time that was punched
last_time_fmt = timeToFloat(last_punch)
#determine the next checkpoint available for today
next_checkpoint = max_hours
for i in range(len(intervals)):
if(last_time_fmt < intervals[i]):
next_checkpoint = intervals[i]
stage = i + 1
break
#print('next checkpoint',next_checkpoint)
cur_time_fmt = timeToFloat(cur_time)
#check if the time has occurred on a previous day, (automatically update because its a new day)
next_day = cur_time.year > last_punch.year or cur_time.month > last_punch.month or cur_time.day > last_punch.day
#print(next_day)
#print("currently",cur_time_fmt)
#determine if the current time has passed the next checkpoint or if its a new day
if(next_day or cur_time_fmt >= next_checkpoint):
last_punch = cur_time
refresh = True
log_file.close()
#determine if its time to refresh
if(refresh):
#display what interval is being refreshed on the day
infoo = "("+str(stage)+"/"+str(rate)+")" if(rate > 0) else ''
log.info("Automatically refreshing workspace "+self.getName()+" vendors... "+infoo)
#refresh all vendors attached to this workspace
for vndr in self.getVendors():
vndr.refresh()
pass
#write updated time value to log file
with open(self.getDir()+self.LOG_FILE, 'w') as lf:
lf.write(str(cur_time))
pass
@classmethod
def load(cls):
'''Load all workspaces from settings.'''
wspcs = apt.CFG.get('workspace', dtype=Section)
for ws in wspcs.keys():
#skip over immediate keys
if(isinstance(wspcs[ws], Section) == False):
continue
path = ''
vendors = '()'
#verify that a path key and vendors key exists under each workspace
apt.CFG.set('workspace.'+ws+'.path', path, override=False)
apt.CFG.set('workspace.'+ws+'.vendors', vendors, override=False)
#retrieve path and vendors keys
if('path' in wspcs[ws].keys()):
path = wspcs[ws]['path']._val
if('vendors' in wspcs[ws].keys()):
vendors = Cfg.castList(wspcs[ws]['vendors']._val)
#create Workspace objects
Workspace(wspcs[ws]._name, path, vendors)
pass
#save if made any changes
if(apt.CFG._modified):
apt.CFG.write()
pass
@classmethod
def save(cls, inc_active=True):
'''
Serializes the Workspace objects and saves them to the settings dictionary.
Parameters:
inc_active (bool): determine if to save the active workspace to settings
Returns:
None
'''
serialized = {}
#serialize the Workspace objects into dictionary format for settings
for ws in cls.Jar.values():
#do not save any workspace that has no path
if(ws.getPath() == ''):
continue
serialized[ws.getName()] = {}
serialized[ws.getName()]['path'] = ws.getPath()
serialized[ws.getName()]['vendors'] = Cfg.castStr(ws.getVendors(returnnames=True, lowercase=False), tab_cnt=2, drop_list=False)
#update settings dictionary
apt.CFG.set('workspace', Section(serialized), override=True)
#update active workspace
if(inc_active):
if(cls.getActive() != None):
apt.CFG.set('general.active-workspace', cls.getActive().getName())
else:
apt.CFG.set('general.active-workspace', '')
apt.save()
pass
@classmethod
def inWorkspace(cls):
'''
Determine if an active workspace is selected.
Parameters:
None
Returns:
(bool): true if ActiveWorkspace is not None
'''
return cls._ActiveWorkspace != None
@classmethod
def setActiveWorkspace(cls, ws):
'''
Set the active workspace after initializing all workspaces into Jar. If
the input name is invalid, it will set the first workspace in the Jar as
active if one is not already assigned.
Parameters:
ws (str): workspace name
Returns:
(bool): true if active-workspace was set
'''
#properly set the active workspace from one found in Jar
if(ws != None and ws.lower() in cls.Jar.keys()):
re_assign = (cls._ActiveWorkspace != None)
#set the active workspace obj from found workspace
cls._ActiveWorkspace = cls.Jar[ws]
#only give prompt if reassigning the active-workspace
if(re_assign):
log.info("Assigning workspace "+cls._ActiveWorkspace.getName()+" as active workspace...")
return True
#try to randomly assign active workspace if not already assigned.
elif(len(cls.Jar.keys()) and cls._ActiveWorkspace == None):
random_ws = list(cls.Jar.keys())[0]
cls._ActiveWorkspace = cls.Jar[random_ws]
msgi = "No active workspace set."
if(ws != ''):
msgi = "Workspace "+ws+" does not exist."
log.info(msgi+" Auto-assigning active workspace to "+cls._ActiveWorkspace.getName()+"...")
return True
#still was not able to set the active workspace with the given argument
elif(cls._ActiveWorkspace != None):
log.info("Workspace "+ws+" does not exist. Keeping "+cls._ActiveWorkspace.getName()+" as active.")
else:
log.error("No workspace set as active.")
return False
def isLinked(self):
'''Returns if any vendors are tied to this workspace (bool).'''
return len(self.getVendors())
def getPath(self):
'''Returns the local path where downloaded blocks are located (str).'''
return self._path
def getDir(self):
'''Returns the base hidden directory where the workspace data is kept (str).'''
return self._ws_dir
def getCachePath(self):
'''Returns the hidden directory where workspace installations are kept. (str).'''
return self.getDir()+"cache/"
def getName(self):
'''Returns the workspace's identifier (str).'''
return self._name
def isActive(self):
'''Returns is this workspace is the active workspace (bool).'''
return self == self.getActive()
def getVendors(self, returnnames=False, lowercase=True):
'''
Return the vendor objects associated with the given workspace.
Parameters:
returnnames (bool): true will return vendor names
lowercase (bool): true will return lower-case names if returnnames is enabled
Returns:
([Vendor]) or ([str]): list of available vendors
'''
if(returnnames):
vndr_names = []
for vndr in self._vendors:
name = vndr.getName()
if(lowercase):
name = name.lower()
vndr_names += [name]
return vndr_names
else:
return self._vendors
@classmethod
def printList(cls):
'''
Prints formatted list for workspaces with vendor availability and which is active.
Parameters:
None
Returns:
None
'''
print('{:<16}'.format("Workspace"),'{:<6}'.format("Active"),'{:<40}'.format("Path"),'{:<14}'.format("Vendors"))
print("-"*16+" "+"-"*6+" "+"-"*40+" "+"-"*14+" ")
for ws in cls.Jar.values():
vndrs = apt.listToStr(ws.getVendors(returnnames=True))
act = 'yes' if(ws == cls.getActive()) else '-'
print('{:<16}'.format(ws.getName()),'{:<6}'.format(act),'{:<40}'.format(ws.getPath()),'{:<14}'.format(vndrs))
pass
pass
@classmethod
def printAll(cls):
for key,ws in cls.Jar.items():
print('key:',key)
print(ws)
@classmethod
def getActive(cls):
'''Returns the active workspace and will exit on error (Workspace).'''
if(cls._ActiveWorkspace == None):
exit(log.error("Not in a workspace!"))
return cls._ActiveWorkspace
# uncomment to use for debugging
# def __str__(self):
# return f'''
# ID: {hex(id(self))}
# Name: {self.getName()}
# Path: {self.getPath()}
# Active: {self.isActive()}
# Hidden directory: {self.getDir()}
# Linked to: {self.isLinked()}
# Vendors: {self.getVendors(returnnames=True)}
# '''
pass | [
1,
396,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
29937,
8010,
29901,
2814,
1148,
11671,
13,
29937,
14415,
29901,
664,
3493,
29889,
2272,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
12953,
29901,
13,
29937,
259,
450,
5244,
3493,
770,
29889,
319,
5244,
3493,
1203,
756,
263,
2224,
322,
263,
1051,
310,
3625,
13,
29937,
259,
9691,
943,
29889,
910,
338,
825,
278,
1404,
14874,
1009,
664,
29915,
29879,
6874,
2629,
363,
263,
2183,
13,
29937,
259,
376,
6388,
2133,
1642,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
13,
5215,
2897,
29892,
528,
4422,
29892,
13149,
13,
5215,
12183,
408,
1480,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
869,
19167,
1053,
478,
12184,
13,
3166,
869,
932,
279,
2389,
1053,
27466,
2389,
408,
10882,
13,
3166,
869,
16859,
1053,
315,
16434,
29892,
9779,
29892,
7670,
13,
3166,
869,
1958,
1053,
7315,
13,
3166,
869,
5559,
1053,
11786,
13,
3166,
869,
1271,
1053,
15658,
13,
13,
13,
1990,
5244,
3493,
29901,
13,
13,
1678,
396,
8899,
599,
664,
22854,
297,
8600,
13,
1678,
15864,
353,
7315,
580,
13,
13,
1678,
396,
4925,
29899,
1287,
3493,
338,
263,
664,
3493,
1203,
13,
1678,
903,
9966,
5531,
3493,
353,
6213,
13,
13,
1678,
360,
8193,
353,
10882,
29889,
5847,
29898,
2156,
29889,
29950,
1367,
29928,
1430,
13578,
1287,
22854,
29914,
1159,
13,
1678,
25401,
29918,
7724,
353,
376,
22379,
29889,
1188,
29908,
13,
13,
1678,
341,
1177,
29918,
29934,
3040,
353,
448,
29896,
13,
1678,
18134,
29918,
29934,
3040,
353,
29871,
29896,
29946,
29946,
29900,
13,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
2224,
29892,
9691,
943,
11759,
1402,
2244,
29922,
5574,
1125,
13,
4706,
14550,
13,
4706,
6204,
263,
664,
3493,
2777,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
1024,
313,
710,
1125,
278,
10110,
363,
278,
664,
3493,
13,
9651,
2224,
313,
710,
1125,
278,
1887,
2224,
988,
10930,
674,
367,
5148,
363,
13,
9651,
9691,
943,
9310,
710,
29962,
1125,
278,
1051,
310,
9691,
943,
393,
526,
21351,
304,
445,
664,
3493,
13,
9651,
2244,
313,
11227,
1125,
674,
2244,
1404,
565,
6398,
292,
304,
3896,
664,
3493,
2224,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
1583,
3032,
978,
353,
1024,
13,
4706,
396,
1867,
451,
1653,
664,
3493,
565,
278,
1024,
338,
2307,
4586,
13,
4706,
565,
29898,
1311,
29889,
19629,
2141,
13609,
580,
297,
1583,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
9651,
1480,
29889,
2704,
703,
29903,
1984,
3262,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
2861,
304,
7929,
22006,
14529,
23157,
13,
9651,
736,
13,
13,
4706,
396,
842,
278,
2224,
13,
4706,
1583,
3032,
2084,
353,
6629,
13,
4706,
1583,
29889,
842,
2605,
29898,
2084,
29897,
13,
4706,
396,
1867,
451,
1653,
664,
3493,
565,
278,
2224,
338,
4069,
13,
4706,
565,
29898,
1311,
29889,
657,
2605,
580,
1275,
6629,
1125,
13,
9651,
565,
29898,
1278,
1275,
7700,
1125,
13,
18884,
1480,
29889,
2704,
703,
29903,
1984,
3262,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
2861,
304,
4069,
1887,
2224,
23157,
13,
18884,
736,
13,
9651,
1683,
29901,
13,
18884,
396,
17462,
6721,
304,
731,
2224,
2745,
697,
338,
8459,
29914,
2080,
13,
18884,
1018,
29901,
13,
462,
1678,
2224,
353,
1881,
703,
10399,
2224,
363,
664,
3493,
15691,
1311,
29889,
19629,
580,
29974,
1115,
16521,
13,
18884,
5174,
7670,
3377,
4074,
6685,
29901,
13,
462,
1678,
10882,
29889,
9207,
29954,
29889,
5992,
877,
1287,
3493,
6169,
29974,
1311,
29889,
19629,
3101,
13,
462,
1678,
5244,
3493,
29889,
7620,
29898,
3742,
29918,
4925,
29922,
8824,
29897,
13,
462,
1678,
1596,
580,
13,
462,
1678,
6876,
29898,
1188,
29889,
3888,
703,
5531,
3493,
451,
2825,
1213,
876,
13,
18884,
1550,
29898,
1311,
29889,
842,
2605,
29898,
2084,
29897,
1275,
7700,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
2224,
353,
1881,
703,
10399,
2224,
363,
664,
3493,
15691,
1311,
29889,
19629,
580,
29974,
1115,
16521,
13,
462,
1678,
5174,
7670,
3377,
4074,
6685,
29901,
13,
462,
4706,
10882,
29889,
9207,
29954,
29889,
5992,
877,
1287,
3493,
6169,
29974,
1311,
29889,
19629,
3101,
13,
462,
4706,
5244,
3493,
29889,
7620,
29898,
3742,
29918,
4925,
29922,
8824,
29897,
13,
462,
4706,
1596,
580,
13,
462,
4706,
6876,
29898,
1188,
29889,
3888,
703,
5531,
3493,
451,
2825,
1213,
876,
13,
308,
13,
4706,
1583,
3032,
5652,
29918,
3972,
353,
10882,
29889,
5847,
29898,
1311,
29889,
9464,
29974,
1311,
29889,
19629,
580,
13578,
29914,
1159,
13,
308,
13,
4706,
396,
7469,
599,
664,
3493,
7934,
17525,
1863,
13,
4706,
565,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
1311,
29889,
657,
9170,
3101,
1275,
7700,
1125,
13,
9651,
1480,
29889,
3888,
703,
29020,
701,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
856,
1159,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
657,
9170,
3285,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
396,
3258,
664,
3493,
29915,
29879,
7090,
988,
5130,
10930,
674,
367,
6087,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
1311,
29889,
657,
9170,
580,
13578,
8173,
613,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
396,
3258,
278,
11086,
1480,
565,
360,
8186,
13,
4706,
565,
29898,
359,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29897,
1275,
7700,
1125,
13,
9651,
1722,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29892,
525,
29893,
2824,
5358,
580,
13,
13,
4706,
1583,
3032,
29894,
355,
943,
353,
5159,
13,
4706,
396,
2886,
599,
27042,
3618,
491,
1024,
322,
3787,
297,
1051,
13,
4706,
363,
325,
299,
29878,
297,
9691,
943,
29901,
13,
9651,
565,
29898,
29894,
299,
29878,
29889,
13609,
580,
297,
478,
12184,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
18884,
1583,
3032,
29894,
355,
943,
4619,
518,
29963,
12184,
29889,
29967,
279,
29961,
29894,
299,
29878,
5262,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
27392,
703,
23323,
451,
1544,
9815,
27042,
15691,
29894,
299,
29878,
13578,
304,
15691,
1311,
29889,
19629,
580,
29974,
1642,
1159,
13,
9651,
1209,
13,
13,
4706,
396,
1202,
304,
770,
15864,
13,
4706,
1583,
29889,
29967,
279,
29961,
1311,
29889,
19629,
580,
29962,
353,
1583,
13,
4706,
1209,
13,
13,
13,
1678,
822,
731,
2605,
29898,
1311,
29892,
282,
1125,
13,
4706,
14550,
13,
4706,
3789,
278,
664,
3493,
29915,
29879,
1887,
2224,
304,
263,
716,
995,
29889,
2811,
2244,
1404,
565,
20759,
13,
4706,
304,
1653,
278,
2224,
565,
360,
8186,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
282,
313,
710,
1125,
278,
2224,
1347,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
8472,
3939,
278,
2224,
5352,
13,
4706,
14550,
13,
4706,
396,
29883,
6735,
731,
385,
4069,
2224,
13,
4706,
565,
29898,
29886,
1275,
6629,
470,
282,
1275,
6213,
1125,
13,
9651,
1480,
29889,
3888,
703,
7717,
2224,
363,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
2609,
367,
4069,
23157,
13,
9651,
736,
7700,
13,
13,
4706,
282,
353,
10882,
29889,
5847,
29898,
29886,
29897,
13,
4706,
396,
3258,
278,
664,
3493,
29915,
29879,
1887,
2224,
565,
372,
947,
451,
1863,
13,
4706,
565,
29898,
359,
29889,
2084,
29889,
9933,
29898,
29886,
29897,
1275,
7700,
1125,
13,
9651,
396,
14032,
415,
1404,
13,
9651,
8677,
29918,
265,
353,
10882,
29889,
26897,
362,
703,
5531,
3493,
15691,
1311,
29889,
19629,
580,
13578,
29915,
29879,
1887,
2224,
947,
451,
1863,
29889,
6204,
15691,
29886,
29974,
8652,
1159,
13,
9651,
565,
29898,
4287,
719,
29918,
265,
1125,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
29886,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
18884,
1583,
3032,
2084,
353,
282,
13,
18884,
736,
5852,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
3888,
703,
9260,
451,
731,
15691,
29886,
13578,
408,
1887,
2224,
23157,
13,
18884,
736,
7700,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
2084,
353,
282,
13,
9651,
736,
5852,
13,
13,
13,
1678,
822,
731,
1170,
29898,
1311,
29892,
302,
1125,
13,
4706,
14550,
13,
4706,
10726,
278,
664,
3493,
29915,
29879,
1024,
565,
278,
1024,
338,
451,
2307,
4586,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
302,
313,
710,
1125,
716,
1024,
363,
664,
3493,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
1024,
8472,
10551,
287,
322,
4784,
297,
15864,
13,
4706,
14550,
13,
4706,
565,
29898,
29876,
1275,
6629,
470,
302,
1275,
6213,
1125,
13,
9651,
1480,
29889,
2704,
703,
5531,
3493,
1024,
2609,
367,
4069,
23157,
13,
9651,
736,
7700,
13,
13,
4706,
565,
29898,
29876,
29889,
13609,
580,
297,
1583,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
9651,
1480,
29889,
2704,
703,
29089,
19508,
664,
3493,
304,
15691,
29876,
13578,
2861,
304,
1024,
14529,
23157,
13,
9651,
736,
7700,
13,
4706,
1683,
29901,
13,
9651,
396,
5992,
2030,
1024,
515,
15864,
13,
9651,
565,
29898,
1311,
29889,
19629,
2141,
13609,
580,
297,
1583,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
18884,
628,
1583,
29889,
29967,
279,
29961,
1311,
29889,
19629,
580,
29962,
13,
13,
9651,
396,
1267,
420,
7934,
3884,
565,
4864,
13,
9651,
716,
29918,
3972,
353,
10882,
29889,
5847,
29898,
1311,
29889,
9464,
29974,
29876,
13578,
29914,
1159,
13,
9651,
565,
29898,
5349,
5552,
29898,
1311,
29892,
11119,
5652,
29918,
3972,
5783,
29901,
13,
18884,
2897,
29889,
1267,
420,
29898,
1311,
29889,
657,
9170,
3285,
716,
29918,
3972,
29897,
13,
9651,
396,
842,
278,
7934,
664,
3493,
3884,
13,
9651,
1583,
3032,
5652,
29918,
3972,
353,
716,
29918,
3972,
13,
13,
9651,
396,
3167,
304,
716,
1024,
13,
9651,
1583,
3032,
978,
353,
302,
13,
9651,
396,
5504,
278,
15864,
13,
9651,
1583,
29889,
29967,
279,
29961,
1311,
29889,
19629,
580,
29962,
353,
1583,
13,
9651,
736,
5852,
13,
13,
13,
1678,
822,
3349,
29898,
1311,
1125,
13,
4706,
14550,
13,
4706,
5240,
586,
267,
278,
664,
3493,
1203,
515,
278,
15864,
322,
967,
7934,
3884,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6213,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
1480,
29889,
3888,
703,
7301,
21081,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
856,
1159,
13,
4706,
396,
8143,
278,
7934,
664,
3493,
3884,
13,
4706,
528,
4422,
29889,
1758,
8336,
29898,
1311,
29889,
657,
9170,
3285,
373,
2704,
29922,
2156,
29889,
1758,
6359,
11730,
29897,
13,
4706,
396,
5992,
515,
770,
15864,
13,
4706,
628,
1583,
29889,
29967,
279,
29961,
1311,
29889,
19629,
580,
29962,
13,
4706,
396,
5992,
515,
274,
16434,
934,
13,
4706,
10882,
29889,
9207,
29954,
29889,
5992,
877,
1287,
3493,
6169,
29974,
1311,
29889,
19629,
3101,
13,
4706,
10882,
29889,
9207,
29954,
29889,
3539,
580,
13,
4706,
1209,
13,
13,
13,
1678,
822,
1544,
29963,
12184,
29898,
1311,
29892,
325,
299,
29878,
1125,
13,
4706,
14550,
13,
4706,
6212,
3456,
29879,
304,
788,
263,
27042,
304,
278,
664,
3493,
29915,
29879,
27042,
1051,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
325,
299,
29878,
313,
710,
1125,
1024,
310,
278,
27042,
304,
788,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
278,
27042,
1051,
471,
9120,
313,
8698,
1319,
788,
29897,
13,
4706,
14550,
13,
4706,
565,
29898,
29894,
299,
29878,
29889,
13609,
580,
297,
478,
12184,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
9651,
325,
299,
29878,
29918,
5415,
353,
478,
12184,
29889,
29967,
279,
29961,
29894,
299,
29878,
29962,
13,
9651,
565,
29898,
29894,
299,
29878,
29918,
5415,
297,
1583,
29889,
657,
29963,
355,
943,
580,
1125,
13,
18884,
1480,
29889,
3888,
703,
29963,
12184,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
338,
2307,
9024,
304,
445,
664,
3493,
23157,
13,
18884,
736,
7700,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
3888,
703,
6595,
292,
27042,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
304,
278,
664,
3493,
856,
1159,
13,
18884,
1583,
3032,
29894,
355,
943,
4619,
518,
29894,
299,
29878,
29918,
5415,
29962,
13,
18884,
736,
5852,
13,
4706,
1683,
29901,
13,
9651,
1480,
29889,
27392,
703,
23323,
451,
1544,
9815,
27042,
15691,
29894,
299,
29878,
13578,
304,
15691,
1311,
29889,
19629,
580,
29974,
1642,
1159,
13,
9651,
736,
7700,
13,
13,
13,
1678,
822,
731,
29963,
355,
943,
29898,
1311,
29892,
325,
299,
2288,
1125,
13,
4706,
14550,
13,
4706,
6811,
24040,
4152,
903,
29894,
355,
943,
12421,
491,
4444,
372,
5186,
304,
525,
29894,
299,
2288,
4286,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
325,
299,
2288,
9310,
710,
29962,
1125,
1051,
310,
9691,
943,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
2551,
565,
599,
9691,
943,
9904,
892,
2715,
13,
4706,
14550,
13,
4706,
396,
12071,
9691,
943,
1051,
13,
4706,
1583,
3032,
29894,
355,
943,
353,
5159,
13,
4706,
2551,
353,
5852,
13,
4706,
396,
1524,
403,
1549,
1432,
2183,
27042,
13,
4706,
363,
325,
299,
29878,
297,
325,
299,
2288,
29901,
13,
9651,
396,
27902,
278,
27042,
4864,
13,
9651,
565,
29898,
29894,
299,
29878,
29889,
13609,
580,
297,
478,
12184,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
18884,
325,
299,
29878,
29918,
5415,
353,
478,
12184,
29889,
29967,
279,
29961,
29894,
299,
29878,
29962,
13,
18884,
396,
3198,
565,
278,
27042,
756,
2307,
1063,
9024,
13,
18884,
565,
29898,
29894,
299,
29878,
29918,
5415,
297,
1583,
29889,
657,
29963,
355,
943,
580,
1125,
13,
462,
1678,
1480,
29889,
3888,
703,
29963,
12184,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
338,
2307,
9024,
304,
445,
664,
3493,
23157,
13,
18884,
396,
2324,
278,
27042,
304,
445,
664,
3493,
13,
18884,
1683,
29901,
13,
462,
1678,
1480,
29889,
3888,
703,
6595,
292,
27042,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
304,
278,
664,
3493,
856,
1159,
13,
462,
1678,
1583,
3032,
29894,
355,
943,
4619,
518,
29894,
299,
29878,
29918,
5415,
29962,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
27392,
703,
23323,
451,
1544,
9815,
27042,
15691,
29894,
299,
29878,
13578,
304,
15691,
1311,
29889,
19629,
580,
29974,
1642,
1159,
13,
18884,
480,
985,
353,
7700,
13,
4706,
736,
2551,
13,
13,
13,
1678,
822,
443,
2324,
29963,
12184,
29898,
1311,
29892,
325,
299,
29878,
1125,
13,
4706,
14550,
13,
4706,
6212,
3456,
29879,
304,
3349,
263,
27042,
515,
278,
664,
3493,
29915,
29879,
27042,
1051,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
325,
299,
29878,
313,
710,
1125,
1024,
310,
278,
27042,
304,
3349,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
278,
27042,
1051,
471,
9120,
313,
8698,
1319,
3349,
29897,
13,
4706,
14550,
13,
4706,
565,
29898,
29894,
299,
29878,
29889,
13609,
580,
297,
478,
12184,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
9651,
325,
299,
29878,
29918,
5415,
353,
478,
12184,
29889,
29967,
279,
29961,
29894,
299,
29878,
29962,
13,
9651,
565,
29898,
29894,
299,
29878,
29918,
5415,
451,
297,
1583,
29889,
657,
29963,
355,
943,
580,
1125,
13,
18884,
1480,
29889,
3888,
703,
29963,
12184,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
338,
2307,
443,
2324,
287,
515,
278,
664,
3493,
23157,
13,
18884,
736,
7700,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
3888,
703,
2525,
2324,
292,
27042,
15691,
29894,
299,
29878,
29918,
5415,
29889,
19629,
580,
13578,
515,
278,
664,
3493,
856,
1159,
13,
18884,
1583,
3032,
29894,
355,
943,
29889,
5992,
29898,
29894,
299,
29878,
29918,
5415,
29897,
13,
18884,
736,
5852,
13,
4706,
1683,
29901,
13,
9651,
1480,
29889,
27392,
703,
23323,
451,
443,
2324,
9815,
27042,
15691,
29894,
299,
29878,
13578,
515,
15691,
1311,
29889,
19629,
580,
29974,
1642,
1159,
13,
9651,
736,
7700,
13,
13,
268,
13,
1678,
822,
2254,
7445,
29879,
29898,
1311,
29892,
1178,
29918,
29881,
5311,
1983,
29922,
8824,
1125,
13,
4706,
14550,
13,
4706,
4309,
7925,
599,
10930,
1476,
472,
599,
11174,
29901,
270,
29876,
430,
313,
1287,
3493,
2224,
511,
832,
29880,
313,
1287,
3493,
13,
4706,
7090,
511,
20847,
313,
1287,
3493,
9691,
943,
467,
13,
13,
4706,
1932,
1178,
29918,
29881,
5311,
1983,
338,
5852,
29892,
445,
1158,
3913,
278,
525,
9910,
29899,
4888,
29915,
4444,
304,
29871,
13,
4706,
8161,
607,
3233,
756,
9399,
663,
297,
2254,
29950,
19558,
2141,
29871,
13,
308,
13,
4706,
525,
9910,
29899,
4888,
29915,
731,
304,
7700,
674,
871,
2254,
29950,
19558,
580,
515,
7090,
29889,
525,
9910,
29899,
4888,
29915,
29871,
13,
4706,
731,
304,
5852,
674,
937,
1018,
304,
2254,
29950,
19558,
580,
515,
270,
29876,
430,
29892,
322,
565,
360,
8186,
29892,
769,
1018,
13,
4706,
304,
2254,
29950,
19558,
580,
515,
2908,
29915,
29879,
7090,
29889,
13,
13,
4706,
20370,
982,
29892,
565,
2768,
263,
1857,
2908,
29892,
393,
2908,
29915,
29879,
18435,
29931,
674,
367,
7500,
975,
13,
4706,
967,
7090,
29889,
13,
13,
4706,
22554,
1711,
10017,
903,
12872,
29918,
1271,
29879,
9310,
7445,
2314,
5352,
304,
367,
337,
3880,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
1178,
29918,
29881,
5311,
1983,
313,
11227,
1125,
12439,
2874,
10340,
313,
1359,
29950,
19558,
29897,
515,
10930,
13,
4706,
16969,
29901,
13,
9651,
903,
12872,
29918,
1271,
29879,
9310,
7445,
29962,
1125,
1051,
310,
599,
2908,
3618,
297,
7090,
470,
2224,
13,
4706,
14550,
13,
4706,
565,
29898,
5349,
5552,
29898,
1311,
29892,
11119,
12872,
29918,
1271,
29879,
5783,
29901,
13,
9651,
736,
1583,
3032,
12872,
29918,
1271,
29879,
13,
13,
4706,
1583,
3032,
12872,
29918,
1271,
29879,
353,
5159,
13,
13,
4706,
396,
949,
278,
4444,
363,
2473,
29899,
4888,
13,
4706,
1773,
29918,
3359,
353,
10882,
29889,
657,
15329,
21956,
580,
13,
13,
4706,
396,
29896,
29889,
11856,
363,
16532,
10930,
13,
13,
4706,
396,
23705,
373,
278,
1887,
664,
3493,
2224,
13,
4706,
396,
2158,
703,
7717,
15658,
29879,
373,
29901,
613,
1311,
29889,
657,
2605,
3101,
13,
4706,
17456,
29918,
5325,
353,
13149,
29889,
23705,
29898,
1311,
29889,
657,
2605,
580,
13578,
1068,
29914,
3877,
17969,
2156,
29889,
1529,
29934,
29968,
1001,
29892,
16732,
29922,
5574,
29897,
13,
4706,
396,
1524,
403,
1549,
599,
1476,
5142,
29879,
13,
4706,
363,
286,
29888,
297,
17456,
29918,
5325,
29901,
13,
9651,
289,
353,
15658,
29898,
29885,
29888,
29892,
1583,
29892,
15658,
29889,
10108,
29889,
28307,
10249,
29897,
13,
9651,
396,
361,
278,
1404,
338,
2629,
263,
1857,
2908,
29892,
2254,
278,
18435,
29931,
515,
967,
360,
29940,
10249,
3233,
313,
1333,
2672,
1254,
29931,
29897,
13,
9651,
565,
29898,
4713,
29918,
3359,
1275,
5852,
470,
15658,
29889,
657,
7583,
29898,
29890,
1478,
465,
29922,
5574,
29897,
1275,
289,
1125,
13,
18884,
1583,
3032,
12872,
29918,
1271,
29879,
4619,
518,
29890,
29962,
13,
18884,
565,
29898,
333,
29918,
29881,
5311,
1983,
1125,
13,
462,
1678,
289,
29889,
1359,
29950,
19558,
580,
13,
9651,
1209,
13,
13,
4706,
396,
29906,
29889,
11856,
363,
5130,
10930,
13,
13,
4706,
396,
23705,
373,
278,
664,
3493,
7090,
2224,
13,
4706,
396,
2158,
703,
10408,
15658,
29879,
373,
29901,
613,
1311,
29889,
657,
10408,
2605,
3101,
13,
4706,
17456,
29918,
5325,
353,
13149,
29889,
23705,
29898,
1311,
29889,
657,
10408,
2605,
580,
13578,
1068,
29914,
3877,
17969,
2156,
29889,
1529,
29934,
29968,
1001,
29892,
16732,
29922,
5574,
29897,
13,
4706,
396,
1524,
403,
1549,
599,
1476,
2601,
800,
13,
4706,
363,
286,
29888,
297,
17456,
29918,
5325,
29901,
13,
9651,
396,
1552,
2908,
1818,
884,
505,
263,
2854,
6315,
9810,
472,
967,
3876,
13,
9651,
3876,
29892,
29918,
353,
2897,
29889,
2084,
29889,
5451,
29898,
29885,
29888,
29897,
13,
9651,
396,
6812,
29901,
871,
278,
2343,
11161,
756,
278,
6315,
9810,
13,
9651,
565,
29898,
28712,
29889,
275,
7211,
5612,
29877,
29898,
4632,
29892,
7592,
29922,
8824,
22164,
13,
18884,
289,
353,
15658,
29898,
29885,
29888,
29892,
1583,
29892,
15658,
29889,
10108,
29889,
25580,
29931,
29897,
13,
18884,
396,
657,
278,
9758,
363,
445,
2908,
29915,
29879,
5142,
29871,
13,
18884,
270,
29876,
430,
29918,
29890,
353,
15658,
29889,
797,
23886,
29961,
29890,
29889,
29924,
580,
3816,
29890,
29889,
29931,
580,
3816,
29890,
29889,
29940,
580,
3816,
7445,
29889,
10108,
29889,
28307,
10249,
29889,
1767,
29962,
13,
18884,
396,
1202,
445,
2908,
565,
263,
5142,
360,
8186,
470,
278,
270,
29876,
430,
947,
451,
1993,
1857,
746,
13,
18884,
396,
1333,
297,
2473,
29899,
4888,
4464,
13,
18884,
565,
29898,
5200,
430,
29918,
29890,
1275,
6213,
470,
313,
4713,
29918,
3359,
1275,
7700,
322,
15658,
29889,
657,
7583,
29898,
29890,
1478,
465,
29922,
5574,
29897,
2804,
270,
29876,
430,
29918,
29890,
22164,
13,
462,
1678,
1583,
3032,
12872,
29918,
1271,
29879,
4619,
518,
29890,
29962,
13,
462,
1678,
565,
29898,
333,
29918,
29881,
5311,
1983,
1125,
13,
462,
4706,
289,
29889,
1359,
29950,
19558,
580,
13,
9651,
1209,
13,
13,
4706,
396,
29941,
29889,
11856,
363,
3625,
10930,
13,
632,
13,
4706,
396,
23705,
373,
1269,
27042,
2224,
13,
4706,
17456,
29918,
5325,
353,
5159,
13,
4706,
396,
2886,
599,
17456,
2066,
297,
1269,
310,
278,
664,
3493,
29915,
29879,
9691,
943,
13,
4706,
363,
325,
299,
29878,
297,
1583,
29889,
657,
29963,
355,
943,
7295,
13,
9651,
17456,
29918,
5325,
4619,
13149,
29889,
23705,
29898,
29894,
299,
29878,
29889,
657,
29963,
12184,
9170,
580,
13578,
1068,
29914,
3877,
17969,
2156,
29889,
1529,
29934,
29968,
1001,
29892,
16732,
29922,
5574,
29897,
13,
4706,
396,
1524,
403,
1549,
599,
1476,
20847,
1849,
13,
4706,
363,
286,
29888,
297,
17456,
29918,
5325,
29901,
13,
9651,
289,
353,
15658,
29898,
29885,
29888,
29892,
1583,
29892,
15658,
29889,
10108,
29889,
26612,
6227,
29897,
13,
9651,
396,
1867,
451,
788,
445,
2908,
304,
1051,
310,
7962,
10930,
1363,
372,
756,
694,
13,
9651,
396,
348,
1169,
6942,
411,
372,
29892,
871,
15562,
13,
9651,
1209,
13,
13,
4706,
396,
29946,
29889,
3553,
599,
2702,
1873,
10930,
565,
2893,
9215,
25517,
313,
19499,
1857,
2908,
29897,
13,
4706,
1580,
29918,
874,
29918,
1271,
29879,
353,
5159,
13,
4706,
363,
1998,
29918,
1271,
297,
1583,
3032,
12872,
29918,
1271,
29879,
29901,
13,
9651,
565,
29898,
1730,
29918,
1271,
1275,
15658,
29889,
657,
7583,
29898,
29890,
1478,
465,
29922,
5574,
22164,
13,
18884,
6773,
13,
9651,
363,
1580,
29918,
1271,
297,
1998,
29918,
1271,
29889,
657,
3379,
4293,
2141,
5975,
7295,
13,
18884,
1580,
29918,
874,
29918,
1271,
29879,
4619,
518,
6550,
29918,
1271,
29962,
13,
18884,
565,
29898,
333,
29918,
29881,
5311,
1983,
1125,
13,
462,
1678,
1580,
29918,
1271,
29889,
1359,
29950,
19558,
580,
13,
18884,
1209,
13,
9651,
1209,
13,
4706,
1583,
3032,
12872,
29918,
1271,
29879,
4619,
1580,
29918,
874,
29918,
1271,
29879,
13,
13,
4706,
736,
1583,
3032,
12872,
29918,
1271,
29879,
13,
13,
13,
1678,
822,
21697,
29898,
1311,
29892,
3611,
29892,
12428,
29918,
10041,
29922,
8824,
29892,
26401,
29922,
5574,
29892,
2143,
29918,
3784,
29922,
5574,
1125,
13,
4706,
14550,
13,
4706,
16969,
278,
15658,
515,
263,
3273,
6419,
3611,
29889,
960,
3611,
338,
4069,
322,
29871,
13,
4706,
525,
999,
29918,
3784,
29915,
338,
731,
29892,
769,
14335,
304,
2737,
304,
278,
1857,
2908,
29889,
13,
13,
4706,
18512,
385,
7855,
338,
3734,
363,
3058,
8260,
29936,
577,
372,
508,
367,
13,
4706,
12023,
7855,
313,
2611,
1479,
310,
2908,
1024,
29897,
565,
871,
2655,
2183,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
3611,
313,
710,
1125,
7687,
470,
2989,
341,
29889,
29931,
29889,
29940,
411,
13136,
382,
10959,
13,
9651,
12428,
29918,
10041,
313,
11227,
1125,
8161,
565,
871,
2655,
2183,
769,
372,
338,
385,
7855,
13,
9651,
26401,
313,
11227,
1125,
8161,
565,
304,
871,
1106,
363,
7962,
10930,
13,
9651,
2143,
29918,
3784,
313,
11227,
1125,
8161,
565,
304,
1018,
304,
3566,
4069,
3611,
304,
1857,
2908,
13,
4706,
16969,
29901,
13,
9651,
313,
7445,
1125,
278,
15659,
2908,
515,
278,
3273,
6419,
3611,
13,
4706,
14550,
13,
4706,
565,
29898,
3257,
1275,
6213,
1125,
13,
9651,
3611,
353,
6629,
13,
4706,
396,
5451,
964,
12785,
13,
4706,
12785,
353,
3611,
29889,
5451,
12839,
1495,
13,
4706,
21149,
29879,
353,
6024,
2033,
29930,
29941,
13,
4706,
2923,
353,
29871,
29941,
448,
7431,
29898,
12343,
778,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
12343,
778,
6817,
29896,
29892,
448,
29896,
29892,
448,
29896,
1125,
13,
9651,
21149,
29879,
29961,
12765,
29974,
29875,
29962,
353,
12785,
29961,
29875,
29962,
13,
4706,
396,
3198,
2186,
8424,
565,
372,
756,
385,
7855,
10959,
13,
4706,
7855,
353,
6629,
13,
4706,
565,
29898,
8803,
29879,
29961,
29906,
1822,
2798,
29898,
2156,
29889,
3919,
11937,
29918,
2287,
5265,
29924,
22164,
13,
9651,
474,
353,
21149,
29879,
29961,
29906,
1822,
2886,
29898,
2156,
29889,
3919,
11937,
29918,
2287,
5265,
29924,
29897,
13,
9651,
7855,
353,
21149,
29879,
29961,
29906,
3816,
29875,
29974,
29896,
17531,
13,
9651,
21149,
29879,
29961,
29906,
29962,
353,
21149,
29879,
29961,
29906,
3816,
29901,
29875,
29962,
13,
4706,
396,
465,
2017,
871,
1024,
2183,
338,
2869,
278,
7855,
13,
4706,
25342,
29898,
7971,
29918,
10041,
1125,
13,
9651,
7855,
353,
21149,
29879,
29961,
29906,
29962,
13,
9651,
21149,
29879,
29961,
29906,
29962,
353,
6629,
13,
13,
4706,
396,
518,
29991,
29962,
2254,
599,
5181,
10930,
1434,
11975,
13,
4706,
10930,
353,
1583,
29889,
1359,
7445,
29879,
580,
539,
13,
4706,
396,
1509,
599,
10930,
746,
26401,
338,
1283,
584,
29873,
8144,
29901,
338,
445,
2874,
7609,
29973,
13,
4706,
565,
29898,
28814,
1275,
7700,
1125,
13,
9651,
10930,
353,
15658,
29889,
657,
3596,
7445,
29879,
580,
13,
308,
13,
4706,
396,
11294,
1051,
310,
1950,
10930,
408,
8401,
701,
278,
9704,
13,
4706,
1950,
29918,
1271,
29879,
353,
5159,
13,
13,
4706,
396,
4478,
363,
385,
7855,
13,
4706,
565,
29898,
2435,
29898,
10041,
22164,
13,
9651,
396,
15914,
1051,
310,
599,
16212,
13,
9651,
1072,
353,
7315,
580,
13,
9651,
1072,
29961,
10041,
29962,
353,
5159,
13,
9651,
396,
1524,
403,
1549,
1432,
2908,
322,
1653,
263,
10417,
363,
1009,
7855,
2983,
13,
9651,
363,
289,
29895,
297,
10930,
29901,
13,
18884,
396,
657,
278,
7855,
2983,
515,
445,
2908,
13,
18884,
831,
353,
289,
29895,
29889,
1359,
29950,
19558,
29898,
2457,
7039,
29922,
5574,
29897,
13,
18884,
396,
2158,
29898,
267,
29897,
13,
18884,
396,
3258,
611,
27775,
310,
7855,
2983,
304,
1009,
2908,
1914,
414,
13,
18884,
363,
321,
297,
831,
29901,
13,
462,
1678,
565,
29898,
29872,
29889,
13609,
580,
451,
297,
1072,
29889,
8149,
580,
1125,
13,
462,
4706,
1072,
29961,
29872,
29962,
353,
5159,
13,
462,
1678,
1072,
29961,
29872,
29962,
4619,
518,
29890,
29895,
29962,
13,
13,
9651,
396,
4149,
920,
1784,
10930,
892,
6216,
304,
7855,
1024,
29915,
29879,
10417,
13,
9651,
954,
29918,
1271,
29879,
353,
7431,
29898,
1727,
29961,
10041,
2314,
13,
9651,
396,
20567,
871,
17809,
697,
1950,
1650,
13,
9651,
565,
29898,
1949,
29918,
1271,
29879,
1275,
29871,
29896,
1125,
13,
18884,
396,
5675,
1854,
1791,
310,
13926,
526,
1959,
1434,
7863,
1121,
13,
18884,
7037,
353,
1072,
29961,
10041,
3816,
29900,
29962,
13,
18884,
3611,
353,
7037,
29889,
657,
7030,
29898,
2248,
29922,
29906,
29892,
1320,
29922,
29906,
29897,
13,
18884,
396,
27902,
1269,
760,
310,
2908,
15882,
7087,
825,
471,
13877,
13,
18884,
363,
474,
297,
3464,
29898,
2435,
29898,
8803,
29879,
22164,
13,
462,
1678,
396,
2158,
29898,
8803,
29879,
29961,
29875,
2314,
13,
462,
1678,
565,
29898,
2435,
29898,
8803,
29879,
29961,
29875,
2314,
322,
21149,
29879,
29961,
29875,
1822,
13609,
580,
2804,
3611,
29961,
29875,
1822,
13609,
580,
1125,
13,
462,
4706,
736,
6213,
13,
462,
1678,
1209,
13,
18884,
736,
7037,
13,
9651,
396,
20567,
17809,
2999,
1950,
6851,
313,
29883,
6735,
10115,
29897,
13,
9651,
25342,
29898,
1949,
29918,
1271,
29879,
1405,
29871,
29896,
1125,
13,
18884,
1950,
29918,
1271,
29879,
353,
1072,
29961,
10041,
29962,
13,
18884,
396,
6194,
471,
2183,
385,
7855,
1024,
29892,
5687,
2609,
4505,
13877,
7855,
13,
18884,
565,
29898,
2435,
29898,
8803,
29879,
29961,
29906,
2314,
1275,
29871,
29900,
1125,
13,
462,
1678,
1480,
29889,
3888,
703,
6833,
3752,
17269,
5190,
29936,
28792,
411,
1159,
13,
462,
1678,
396,
4990,
278,
10340,
29914,
23545,
793,
393,
14529,
411,
1881,
13,
462,
1678,
363,
289,
29895,
297,
1072,
29961,
10041,
5387,
13,
462,
4706,
1596,
28909,
29873,
525,
29974,
29890,
29895,
29889,
657,
13658,
580,
29974,
4710,
29974,
10041,
29897,
13,
462,
1678,
1596,
580,
13,
462,
1678,
6876,
580,
13,
9651,
396,
1217,
10930,
19228,
278,
7855,
1024,
1641,
4502,
13,
9651,
1683,
29901,
13,
18884,
736,
6213,
13,
9651,
1209,
13,
4706,
396,
4478,
1549,
599,
2908,
2983,
13,
4706,
363,
1369,
297,
3464,
29898,
2435,
29898,
8803,
29879,
6817,
29896,
29892,
448,
29896,
29892,
448,
29896,
1125,
13,
9651,
1840,
353,
21149,
29879,
29961,
2962,
29962,
13,
9651,
396,
13322,
2425,
565,
2446,
1840,
338,
4069,
13,
9651,
565,
29898,
2435,
29898,
8489,
29897,
1275,
29871,
29900,
1125,
13,
18884,
2867,
13,
9651,
1072,
353,
7315,
580,
13,
9651,
1072,
29961,
8489,
29962,
353,
5159,
13,
9651,
363,
289,
29895,
297,
10930,
29901,
13,
18884,
260,
353,
289,
29895,
29889,
657,
7030,
29898,
2248,
29922,
2962,
29892,
1320,
29922,
29900,
9601,
29900,
29962,
13,
18884,
396,
8899,
278,
2908,
1090,
278,
2183,
4004,
1024,
13,
18884,
565,
29898,
29873,
29889,
13609,
580,
451,
297,
1072,
29889,
8149,
580,
1125,
13,
462,
1678,
1072,
29961,
29873,
29962,
353,
5159,
13,
18884,
1072,
29961,
29873,
29962,
4619,
518,
29890,
29895,
29962,
13,
9651,
396,
2798,
920,
1784,
10930,
6919,
29891,
445,
1021,
1024,
13,
9651,
954,
29918,
1271,
29879,
353,
7431,
29898,
1727,
29961,
8489,
2314,
13,
9651,
396,
20567,
871,
17809,
697,
1950,
1650,
13,
9651,
565,
29898,
1949,
29918,
1271,
29879,
1275,
29871,
29896,
1125,
13,
18884,
396,
5675,
1854,
1791,
310,
13926,
526,
1959,
1434,
7863,
1121,
13,
18884,
7037,
353,
1072,
29961,
8489,
3816,
29900,
29962,
13,
18884,
3611,
353,
7037,
29889,
657,
7030,
29898,
2248,
29922,
29906,
29892,
1320,
29922,
29906,
29897,
13,
18884,
396,
27902,
1269,
760,
310,
2908,
15882,
7087,
825,
471,
13877,
13,
18884,
363,
474,
297,
3464,
29898,
2435,
29898,
8803,
29879,
22164,
13,
462,
1678,
396,
2158,
29898,
8803,
29879,
29961,
29875,
2314,
13,
462,
1678,
565,
29898,
2435,
29898,
8803,
29879,
29961,
29875,
2314,
322,
21149,
29879,
29961,
29875,
1822,
13609,
580,
2804,
3611,
29961,
29875,
1822,
13609,
580,
1125,
13,
462,
4706,
736,
6213,
13,
462,
1678,
1209,
13,
18884,
736,
7037,
13,
9651,
396,
20567,
17809,
2999,
6851,
313,
29883,
6735,
10115,
373,
445,
4331,
29897,
13,
9651,
25342,
29898,
1949,
29918,
1271,
29879,
1405,
29871,
29896,
1125,
13,
18884,
396,
18307,
411,
10930,
363,
263,
1993,
322,
11988,
513,
280,
1623,
19995,
13,
18884,
2446,
29918,
1271,
29879,
353,
5159,
13,
18884,
363,
289,
29895,
297,
1072,
29961,
8489,
5387,
13,
462,
1678,
565,
29898,
29890,
29895,
297,
1950,
29918,
1271,
29879,
470,
313,
2962,
1275,
7431,
29898,
8803,
29879,
6817,
29896,
322,
7855,
1275,
6629,
22164,
13,
462,
4706,
2446,
29918,
1271,
29879,
4619,
518,
29890,
29895,
29962,
13,
18884,
396,
29881,
14800,
839,
1623,
304,
263,
2323,
2908,
13,
18884,
565,
29898,
2435,
29898,
4622,
29918,
1271,
29879,
29897,
1275,
29871,
29896,
1125,
13,
462,
1678,
396,
2158,
703,
5800,
18783,
29901,
613,
4622,
29918,
1271,
29879,
29961,
29900,
1822,
657,
7030,
29898,
2248,
29922,
29906,
29892,
1320,
29922,
29906,
876,
13,
462,
1678,
736,
2446,
29918,
1271,
29879,
29961,
29900,
29962,
13,
18884,
396,
4287,
719,
373,
304,
773,
2446,
3611,
4004,
13,
18884,
565,
29898,
2435,
29898,
8803,
29879,
29961,
2962,
29899,
29896,
12622,
29901,
13,
462,
1678,
396,
19878,
304,
773,
2446,
1840,
13,
462,
1678,
1950,
29918,
1271,
29879,
353,
2446,
29918,
1271,
29879,
13,
462,
1678,
6773,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
661,
714,
310,
4140,
267,
856,
12276,
278,
9476,
1259,
17735,
29914,
348,
1169,
13,
462,
1678,
565,
29898,
7971,
29918,
10041,
1125,
795,
13,
462,
4706,
1480,
29889,
3888,
703,
6833,
3752,
17269,
5190,
29936,
28792,
411,
1159,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1480,
29889,
3888,
703,
6833,
3752,
17269,
3611,
29936,
28792,
411,
1159,
13,
462,
1678,
363,
289,
29895,
297,
1072,
29961,
8489,
5387,
13,
462,
4706,
565,
29898,
7971,
29918,
10041,
1125,
13,
462,
9651,
1596,
28909,
29873,
525,
29974,
29890,
29895,
29889,
657,
13658,
580,
29974,
4710,
29974,
10041,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
1596,
28909,
29873,
525,
29974,
29890,
29895,
29889,
657,
13658,
3101,
13,
462,
1678,
6876,
29898,
2158,
3101,
13,
9651,
1209,
13,
4706,
396,
4746,
278,
1857,
2908,
565,
3611,
338,
4069,
1347,
13,
4706,
565,
29898,
999,
29918,
3784,
322,
313,
3257,
1275,
6629,
470,
3611,
1275,
6213,
22164,
13,
9651,
736,
15658,
29889,
657,
7583,
580,
13,
4706,
396,
2457,
6213,
565,
599,
14734,
505,
5229,
322,
451,
4133,
3099,
3447,
13,
4706,
736,
6213,
13,
13,
268,
13,
1678,
822,
21822,
2525,
1169,
29898,
1311,
1125,
13,
4706,
14550,
13,
4706,
3826,
2631,
1432,
3625,
5190,
304,
679,
278,
4866,
3983,
292,
848,
3829,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6213,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
10930,
353,
1583,
29889,
1359,
7445,
29879,
580,
13,
4706,
396,
2158,
29898,
1271,
29879,
29897,
13,
4706,
1480,
29889,
3888,
703,
28916,
292,
599,
5190,
848,
856,
1159,
13,
4706,
363,
289,
297,
10930,
29901,
13,
9651,
502,
353,
289,
29889,
1359,
29950,
19558,
580,
13,
9651,
363,
318,
297,
502,
29889,
5975,
7295,
13,
18884,
318,
29889,
657,
21233,
2283,
2141,
13808,
29898,
29884,
29892,
16732,
29922,
8824,
29897,
13,
4706,
1480,
29889,
3888,
703,
15091,
23157,
13,
4706,
1209,
13,
13,
13,
1678,
822,
1051,
7445,
29879,
29898,
1311,
29892,
3611,
29892,
15595,
29922,
8824,
29892,
832,
29880,
29922,
8824,
29892,
270,
29876,
430,
29922,
8824,
29892,
20847,
29922,
8824,
1125,
13,
4706,
14550,
13,
4706,
13905,
263,
20917,
1591,
310,
278,
3625,
10930,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
3611,
313,
710,
1125,
2908,
3611,
304,
367,
9391,
964,
5633,
363,
11975,
13,
9651,
15595,
313,
11227,
1125,
8161,
565,
304,
22968,
675,
278,
2908,
1051,
1797,
313,
29931,
29889,
29940,
29889,
29963,
29897,
13,
9651,
832,
29880,
313,
11227,
1125,
8161,
565,
304,
10446,
871,
10930,
393,
526,
5130,
13,
9651,
270,
29876,
430,
313,
11227,
1125,
8161,
565,
304,
10446,
871,
10930,
393,
526,
16532,
13,
9651,
20847,
313,
11227,
1125,
8161,
565,
304,
10446,
10930,
3625,
515,
27042,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
14330,
29991,
29962,
2254,
278,
5181,
10930,
13,
4706,
1583,
29889,
1359,
7445,
29879,
580,
13,
13,
4706,
396,
15914,
565,
2473,
29899,
4888,
338,
373,
13,
4706,
1773,
29918,
3359,
353,
10882,
29889,
657,
15329,
21956,
580,
13,
13,
4706,
396,
5451,
278,
3611,
964,
5633,
13,
4706,
341,
29892,
29931,
29892,
29940,
29892,
29918,
353,
15658,
29889,
29879,
8971,
7030,
29898,
3257,
29892,
5528,
29918,
296,
29922,
8824,
29897,
13,
13,
4706,
396,
657,
599,
10930,
515,
278,
16653,
13,
13,
4706,
396,
8899,
1269,
2908,
29915,
29879,
1426,
1196,
297,
263,
2910,
304,
2656,
6611,
363,
15595,
7353,
13,
4706,
16653,
353,
7315,
580,
13,
13,
4706,
396,
1524,
403,
1549,
1432,
27042,
13,
4706,
363,
325,
299,
29878,
29918,
29895,
29892,
29894,
299,
2288,
297,
15658,
29889,
797,
23886,
29889,
7076,
7295,
13,
9651,
565,
29898,
29894,
299,
29878,
29918,
29895,
29889,
27382,
2541,
29898,
29924,
29889,
13609,
3101,
1275,
7700,
1125,
13,
18884,
6773,
13,
9651,
396,
1524,
403,
1549,
1432,
3489,
13,
9651,
363,
4303,
29918,
29895,
29892,
10254,
297,
325,
299,
2288,
29889,
7076,
7295,
13,
18884,
565,
29898,
1982,
29918,
29895,
29889,
27382,
2541,
29898,
29931,
29889,
13609,
3101,
1275,
7700,
1125,
13,
462,
1678,
6773,
13,
18884,
396,
1524,
403,
1549,
1432,
2908,
13,
18884,
363,
1999,
29895,
29918,
29895,
29892,
28463,
3137,
297,
4303,
29879,
29889,
7076,
7295,
13,
462,
1678,
565,
29898,
2204,
29895,
29918,
29895,
29889,
27382,
2541,
29898,
29940,
29889,
13609,
3101,
1275,
7700,
1125,
13,
462,
4706,
6773,
13,
462,
1678,
16532,
353,
5130,
353,
3625,
353,
525,
525,
13,
462,
1678,
12272,
29918,
29881,
353,
12272,
29918,
29875,
353,
12272,
29918,
29874,
353,
29871,
7700,
13,
462,
1678,
396,
361,
5642,
892,
731,
373,
1899,
29899,
1220,
2322,
304,
2479,
4129,
13,
462,
1678,
565,
3552,
5200,
430,
470,
832,
29880,
470,
20847,
29897,
1275,
7700,
1125,
13,
462,
4706,
270,
29876,
430,
353,
832,
29880,
353,
20847,
353,
5852,
13,
13,
462,
1678,
396,
2541,
1269,
5224,
3233,
29892,
26556,
278,
2908,
1203,
304,
1596,
13,
462,
1678,
565,
29898,
28463,
3137,
29961,
7445,
29889,
10108,
29889,
26612,
6227,
29889,
1767,
29962,
2804,
6213,
1125,
13,
462,
4706,
289,
29895,
353,
301,
29894,
3137,
29961,
7445,
29889,
10108,
29889,
26612,
6227,
29889,
1767,
29962,
13,
462,
4706,
3625,
353,
525,
29909,
29915,
13,
462,
4706,
12272,
29918,
29874,
353,
5852,
13,
462,
1678,
565,
29898,
28463,
3137,
29961,
7445,
29889,
10108,
29889,
25580,
29931,
29889,
1767,
29962,
2804,
6213,
1125,
13,
462,
4706,
289,
29895,
353,
301,
29894,
3137,
29961,
7445,
29889,
10108,
29889,
25580,
29931,
29889,
1767,
29962,
13,
462,
4706,
5130,
353,
525,
29902,
29915,
13,
462,
4706,
12272,
29918,
29875,
353,
5852,
13,
462,
1678,
565,
29898,
28463,
3137,
29961,
7445,
29889,
10108,
29889,
28307,
10249,
29889,
1767,
29962,
2804,
6213,
1125,
13,
462,
4706,
565,
29898,
5200,
430,
1125,
13,
462,
9651,
289,
29895,
353,
301,
29894,
3137,
29961,
7445,
29889,
10108,
29889,
28307,
10249,
29889,
1767,
29962,
13,
462,
4706,
16532,
353,
525,
29928,
29915,
13,
462,
4706,
396,
565,
29898,
4713,
29918,
3359,
1125,
13,
462,
4706,
396,
268,
16532,
353,
525,
29928,
29915,
13,
462,
4706,
396,
268,
5130,
353,
5130,
29889,
13609,
580,
13,
462,
4706,
12272,
29918,
29881,
353,
5852,
13,
462,
1678,
396,
650,
4195,
5101,
1818,
367,
1565,
304,
2479,
278,
2908,
13,
462,
1678,
565,
3552,
2218,
29886,
29918,
29874,
322,
20847,
29897,
470,
313,
2218,
29886,
29918,
29875,
322,
832,
29880,
29897,
470,
313,
2218,
29886,
29918,
29881,
322,
270,
29876,
430,
22164,
13,
462,
4706,
1209,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
6773,
13,
13,
462,
1678,
396,
18609,
304,
5004,
1422,
4660,
9978,
13,
462,
1678,
26325,
261,
353,
525,
525,
13,
462,
1678,
396,
4830,
278,
4660,
1897,
29915,
29879,
848,
13,
462,
1678,
380,
29879,
353,
16532,
718,
26325,
261,
718,
5130,
718,
26325,
261,
718,
3625,
13,
462,
1678,
396,
280,
1351,
1873,
4069,
565,
967,
1063,
443,
276,
4611,
13,
462,
1678,
325,
353,
6629,
565,
29898,
29890,
29895,
29889,
657,
6594,
580,
1275,
525,
29900,
29889,
29900,
29889,
29900,
1495,
1683,
289,
29895,
29889,
657,
6594,
580,
13,
13,
462,
1678,
396,
3198,
565,
508,
367,
4784,
13,
462,
1678,
396,
29886,
13479,
277,
675,
11161,
3233,
363,
8454,
11217,
13,
462,
1678,
832,
645,
29878,
353,
289,
29895,
29889,
657,
29931,
20901,
7445,
29898,
7445,
29889,
10108,
29889,
25580,
29931,
29897,
13,
462,
1678,
274,
1526,
29918,
29894,
353,
832,
645,
29878,
29889,
657,
6594,
580,
565,
29898,
2611,
645,
29878,
2804,
6213,
322,
1773,
29918,
3359,
1275,
7700,
29897,
1683,
289,
29895,
29889,
657,
6594,
580,
13,
462,
1678,
396,
29874,
525,
29985,
29915,
338,
385,
2767,
5829,
23941,
278,
9281,
16180,
1873,
313,
5200,
430,
470,
832,
29880,
29897,
338,
451,
278,
2869,
278,
9281,
1873,
1476,
13,
462,
1678,
565,
29898,
7445,
29889,
21058,
6565,
29898,
29890,
29895,
29889,
657,
16382,
342,
12810,
737,
6594,
3285,
274,
1526,
29918,
29894,
29897,
2804,
274,
1526,
29918,
29894,
1125,
13,
462,
4706,
380,
29879,
353,
380,
29879,
23097,
29871,
6228,
29915,
13,
462,
4706,
325,
353,
274,
1526,
29918,
29894,
13,
462,
1678,
396,
4830,
278,
848,
304,
1596,
304,
278,
2991,
322,
3787,
297,
16653,
313,
29931,
29889,
29940,
29889,
29963,
851,
3402,
29897,
13,
462,
1678,
16653,
29961,
29890,
29895,
29889,
29931,
580,
29974,
4286,
18717,
29890,
29895,
29889,
29940,
580,
29974,
4286,
18717,
29890,
29895,
29889,
29924,
580,
29962,
353,
22372,
29901,
29966,
29896,
29953,
29913,
4286,
4830,
29898,
29890,
29895,
29889,
29931,
3101,
23097,
525,
23097,
25641,
29966,
29906,
29900,
29913,
4286,
4830,
29898,
29890,
29895,
29889,
29940,
3101,
23097,
525,
23097,
25641,
29966,
29947,
29913,
4286,
4830,
29898,
303,
29879,
7240,
29915,
525,
23097,
25641,
29966,
29896,
29900,
29913,
4286,
4830,
29898,
29894,
7240,
29915,
525,
23097,
25641,
29966,
29896,
29953,
29913,
4286,
4830,
29898,
29890,
29895,
29889,
29924,
3101,
13,
462,
1678,
1209,
13,
9651,
1209,
13,
13,
4706,
6611,
353,
1051,
29898,
28045,
29889,
8149,
3101,
13,
4706,
396,
3198,
565,
304,
2656,
491,
22968,
9651,
13,
4706,
565,
29898,
2312,
1125,
13,
9651,
6611,
29889,
6605,
580,
13,
4706,
396,
2158,
29898,
8149,
29897,
13,
13,
4706,
1596,
877,
25641,
29966,
29896,
29953,
29913,
4286,
4830,
703,
12284,
4968,
29915,
25641,
29966,
29906,
29900,
29913,
4286,
4830,
703,
7445,
4968,
29915,
25641,
29966,
29947,
29913,
4286,
4830,
703,
5709,
17969,
703,
20605,
29930,
524,
29898,
4713,
29918,
3359,
876,
511,
29915,
25641,
29966,
29896,
29900,
29913,
4286,
4830,
703,
6594,
4968,
29915,
25641,
29966,
29896,
29953,
29913,
4286,
4830,
703,
29963,
12184,
5783,
13,
4706,
1596,
703,
29899,
29908,
29930,
29896,
29953,
13578,
376,
13578,
29899,
29908,
29930,
29906,
29900,
13578,
376,
13578,
29899,
29908,
29930,
29947,
13578,
376,
13578,
29899,
29908,
29930,
29896,
29900,
13578,
376,
13578,
29899,
29908,
29930,
29896,
29953,
29897,
13,
13,
4706,
396,
1524,
403,
1549,
16653,
322,
1596,
1269,
1426,
1220,
13,
4706,
363,
413,
297,
6611,
29901,
13,
9651,
1596,
29898,
28045,
29961,
29895,
2314,
13,
4706,
1209,
13,
13,
13,
1678,
822,
1051,
2525,
1169,
29898,
1311,
29892,
3611,
29892,
15595,
29922,
8824,
29892,
502,
519,
29922,
8824,
29892,
11455,
29918,
22625,
29922,
8824,
1125,
13,
4706,
14550,
13,
4706,
13905,
263,
20917,
1591,
310,
599,
278,
2874,
10340,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
3611,
313,
710,
1125,
2908,
3611,
304,
367,
9391,
964,
5633,
363,
11975,
13,
9651,
15595,
313,
11227,
1125,
8161,
565,
304,
22968,
675,
278,
2908,
1051,
1797,
313,
29923,
29889,
29963,
29889,
29931,
29889,
29940,
29897,
13,
9651,
502,
519,
313,
11227,
1125,
8161,
565,
304,
2479,
10340,
393,
508,
367,
1304,
13,
9651,
11455,
29918,
22625,
313,
11227,
1125,
8161,
565,
304,
11455,
1243,
1785,
305,
2066,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
14330,
29991,
29962,
2254,
10930,
964,
11817,
706,
13,
4706,
7962,
353,
1583,
29889,
1359,
7445,
29879,
580,
13,
13,
4706,
396,
29901,
29873,
8144,
29901,
788,
7353,
304,
1596,
525,
5927,
800,
29915,
310,
385,
7855,
29914,
5441,
313,
5816,
2702,
1873,
2983,
1863,
29897,
13,
13,
4706,
396,
29873,
8144,
29901,
1596,
4660,
310,
278,
5190,
322,
607,
4660,
338,
502,
519,
313,
29928,
470,
306,
29897,
13,
4706,
341,
29892,
29931,
29892,
29940,
29892,
29963,
29892,
29923,
353,
15658,
29889,
29879,
8971,
7030,
29898,
3257,
29892,
5528,
29918,
296,
29922,
5574,
29897,
13,
4706,
396,
2158,
29898,
29924,
29892,
29931,
29892,
29940,
29892,
29963,
29892,
29923,
29897,
13,
13,
4706,
396,
8899,
1269,
7855,
29915,
29879,
1596,
1196,
297,
2910,
313,
1989,
353,
529,
5441,
23917,
29966,
1271,
29899,
333,
12948,
304,
9801,
20498,
18543,
13,
4706,
16653,
353,
7315,
580,
13,
4706,
363,
289,
29895,
297,
15658,
29889,
657,
3596,
7445,
29879,
7295,
13,
9651,
396,
1454,
301,
20901,
297,
15658,
29889,
797,
23886,
29961,
29890,
29895,
29889,
29924,
580,
3816,
29890,
29895,
29889,
29931,
580,
3816,
29890,
29895,
29889,
29940,
580,
5387,
13,
9651,
2908,
29918,
3257,
353,
289,
29895,
29889,
657,
13658,
29898,
3742,
29918,
369,
29922,
8824,
29897,
13,
9651,
565,
29898,
29890,
29895,
29889,
29924,
2141,
13609,
2141,
27382,
2541,
29898,
29924,
29889,
13609,
3101,
1275,
7700,
1125,
13,
18884,
6773,
13,
9651,
565,
29898,
29890,
29895,
29889,
29931,
2141,
13609,
2141,
27382,
2541,
29898,
29931,
29889,
13609,
3101,
1275,
7700,
1125,
13,
18884,
6773,
13,
9651,
565,
29898,
29890,
29895,
29889,
29940,
2141,
13609,
2141,
27382,
2541,
29898,
29940,
29889,
13609,
3101,
1275,
7700,
1125,
13,
18884,
6773,
13,
9651,
396,
15914,
599,
10340,
13,
9651,
565,
29898,
2156,
29889,
657,
15329,
21956,
580,
1275,
7700,
1125,
13,
18884,
565,
29898,
29890,
29895,
29889,
657,
29931,
20901,
7445,
29898,
7445,
29889,
10108,
29889,
25580,
29931,
29897,
2804,
6213,
1125,
13,
462,
1678,
289,
29895,
353,
289,
29895,
29889,
657,
29931,
20901,
7445,
29898,
7445,
29889,
10108,
29889,
25580,
29931,
29897,
13,
18884,
396,
11014,
445,
2908,
565,
871,
16384,
502,
519,
10340,
322,
2473,
29899,
4888,
1283,
13,
18884,
25342,
29898,
27979,
1125,
13,
462,
1678,
6773,
13,
632,
13,
9651,
10340,
353,
289,
29895,
29889,
1359,
29950,
19558,
29898,
2457,
7039,
29922,
8824,
467,
5975,
580,
13,
13,
9651,
363,
318,
297,
10340,
29901,
13,
18884,
565,
29898,
2435,
29898,
29923,
29897,
322,
318,
29889,
29923,
2141,
13609,
2141,
27382,
2541,
29898,
29923,
29889,
13609,
3101,
1275,
7700,
1125,
13,
462,
1678,
6773,
13,
18884,
565,
29898,
17281,
29918,
22625,
322,
318,
29889,
275,
29911,
29890,
580,
1125,
13,
462,
1678,
6773,
13,
18884,
396,
4830,
565,
5190,
338,
7962,
29914,
27979,
13,
18884,
1998,
353,
17411,
29915,
13,
18884,
565,
29898,
29890,
29895,
297,
7962,
1125,
13,
462,
1678,
1998,
353,
525,
3582,
29915,
13,
18884,
396,
4830,
2874,
5190,
1024,
5034,
304,
967,
5613,
4086,
13,
18884,
18031,
5138,
353,
318,
29889,
657,
4002,
647,
2141,
978,
29889,
13609,
580,
13,
18884,
565,
29898,
29884,
29889,
657,
29931,
574,
580,
1275,
318,
29889,
21233,
29889,
5348,
29902,
14480,
322,
18031,
5138,
1275,
525,
10041,
29374,
13,
462,
1678,
18031,
5138,
353,
525,
5453,
29915,
13,
18884,
16653,
29961,
29884,
29889,
29923,
580,
29974,
2396,
18717,
1271,
29918,
3257,
29962,
353,
22372,
29901,
29966,
29906,
29906,
29913,
4286,
4830,
29898,
29884,
29889,
29923,
3101,
23097,
525,
23097,
25641,
29966,
29955,
29913,
4286,
4830,
29898,
1730,
7240,
29915,
525,
23097,
25641,
29966,
29896,
29900,
29913,
4286,
4830,
29898,
6289,
5138,
7240,
29915,
525,
23097,
25641,
29966,
29941,
29947,
29913,
4286,
4830,
29898,
1271,
29918,
3257,
29897,
13,
18884,
1209,
13,
13,
9651,
1209,
13,
13,
4706,
6611,
353,
1051,
29898,
28045,
29889,
8149,
3101,
13,
4706,
396,
3198,
565,
304,
2656,
491,
22968,
9651,
13,
4706,
565,
29898,
2312,
1125,
13,
9651,
6611,
29889,
6605,
580,
13,
13,
4706,
396,
2158,
304,
2991,
13,
4706,
1596,
877,
25641,
29966,
29906,
29906,
29913,
4286,
4830,
703,
8325,
4968,
29915,
25641,
29966,
29955,
29913,
4286,
4830,
703,
15922,
519,
4968,
29915,
25641,
29966,
29896,
29900,
29913,
4286,
4830,
703,
1542,
4968,
29915,
25641,
29966,
29941,
29947,
29913,
4286,
4830,
703,
7445,
5783,
13,
4706,
1596,
703,
29899,
29908,
29930,
29906,
29906,
13578,
376,
13578,
29899,
29908,
29930,
29955,
13578,
376,
13578,
29899,
29908,
29930,
29896,
29900,
13578,
376,
13578,
29899,
29908,
29930,
29941,
29947,
29897,
13,
4706,
363,
413,
297,
6611,
29901,
13,
9651,
1596,
29898,
28045,
29961,
29895,
2314,
13,
9651,
1209,
13,
4706,
1209,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
10668,
29891,
29898,
25932,
1125,
13,
4706,
14550,
13,
4706,
5240,
586,
267,
738,
380,
744,
7934,
664,
3493,
17525,
393,
9455,
29915,
29873,
20545,
304,
263,
13,
4706,
664,
3493,
1476,
297,
278,
770,
15864,
5639,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6213,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
396,
1761,
599,
7934,
664,
3493,
17525,
13,
4706,
7934,
29918,
3972,
29879,
353,
2897,
29889,
1761,
3972,
29898,
25932,
29889,
9464,
29897,
13,
4706,
363,
298,
29881,
297,
7934,
29918,
3972,
29879,
29901,
13,
9651,
565,
29898,
16440,
29889,
13609,
580,
451,
297,
1067,
29879,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
18884,
1480,
29889,
3888,
703,
7301,
21081,
380,
744,
664,
3493,
848,
363,
15691,
16440,
13578,
856,
1159,
29871,
13,
18884,
565,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
25932,
29889,
9464,
29974,
16440,
22164,
13,
462,
1678,
528,
4422,
29889,
1758,
8336,
29898,
25932,
29889,
9464,
29974,
16440,
29892,
373,
2704,
29922,
2156,
29889,
1758,
6359,
11730,
29897,
13,
18884,
396,
5992,
599,
2066,
515,
664,
3493,
3884,
13,
18884,
1683,
29901,
13,
462,
1678,
2897,
29889,
5992,
29898,
25932,
29889,
9464,
29974,
16440,
29897,
13,
4706,
1209,
13,
13,
13,
1678,
822,
4469,
27132,
29898,
1311,
29892,
6554,
1125,
13,
4706,
14550,
13,
4706,
15854,
19574,
11086,
267,
599,
9691,
943,
363,
278,
2183,
664,
3493,
29889,
7523,
29879,
967,
13,
4706,
1480,
934,
304,
8161,
565,
4940,
2446,
7292,
363,
11086,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6554,
313,
524,
1125,
920,
4049,
304,
2244,
263,
11086,
2629,
263,
29871,
29906,
29946,
29899,
18721,
3785,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
13,
13,
4706,
822,
931,
1762,
11031,
29898,
558,
29873,
1125,
13,
9651,
14550,
13,
9651,
1281,
369,
1372,
263,
931,
1203,
964,
263,
5785,
1134,
29889,
13,
13,
9651,
12662,
2699,
29901,
13,
18884,
544,
29873,
313,
12673,
1125,
338,
29877,
3402,
310,
1857,
931,
13,
9651,
16969,
29901,
13,
18884,
313,
7411,
1125,
29871,
29900,
29889,
29900,
29900,
313,
262,
7009,
573,
29897,
448,
29871,
29906,
29946,
29889,
29900,
29900,
313,
735,
7009,
573,
29897,
13,
9651,
14550,
13,
9651,
931,
29918,
303,
1160,
353,
851,
29898,
558,
29873,
467,
5451,
877,
525,
9601,
29896,
29962,
13,
9651,
931,
29918,
8803,
29879,
353,
931,
29918,
303,
1160,
29889,
5451,
877,
29901,
1495,
13,
9651,
298,
2288,
353,
938,
29898,
2230,
29918,
8803,
29879,
29961,
29900,
2314,
13,
9651,
396,
13441,
304,
525,
29882,
2470,
4286,
29915,
1195,
2667,
29915,
13,
9651,
931,
29918,
23479,
353,
313,
7411,
29898,
1092,
29879,
7240,
29898,
7411,
29898,
7411,
29898,
2230,
29918,
8803,
29879,
29961,
29896,
2314,
29914,
29953,
29900,
4961,
13,
9651,
736,
931,
29918,
23479,
13,
13,
13,
4706,
11086,
353,
7700,
13,
4706,
1833,
29918,
29886,
3322,
353,
6213,
13,
4706,
7408,
353,
29871,
29896,
13,
4706,
3151,
29918,
2230,
353,
12865,
29889,
3707,
580,
13,
13,
4706,
396,
1867,
451,
2189,
11086,
565,
278,
6554,
338,
29871,
29900,
13,
4706,
565,
29898,
10492,
1275,
29871,
29900,
1125,
13,
9651,
736,
13,
4706,
396,
21936,
11086,
565,
278,
6554,
338,
731,
2400,
29871,
29900,
8521,
29896,
29897,
13,
4706,
25342,
29898,
10492,
5277,
1583,
29889,
16173,
29918,
29934,
3040,
1125,
13,
9651,
11086,
353,
5852,
13,
13,
4706,
396,
4563,
680,
278,
29871,
29906,
29946,
7234,
3785,
964,
1584,
1423,
9748,
13,
4706,
4236,
29918,
29882,
2470,
353,
5785,
29898,
29906,
29946,
29897,
13,
4706,
29250,
353,
5785,
29898,
3317,
29918,
29882,
2470,
847,
6554,
29897,
13,
4706,
18747,
353,
5159,
13,
4706,
363,
474,
297,
3464,
29898,
10492,
1125,
13,
9651,
18747,
4619,
518,
1028,
9390,
29930,
29875,
29962,
13,
308,
13,
4706,
396,
7469,
1480,
934,
4864,
13,
4706,
565,
29898,
359,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29897,
1275,
7700,
1125,
13,
9651,
1722,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29892,
525,
29893,
2824,
5358,
580,
13,
13,
4706,
396,
949,
1480,
934,
13,
4706,
396,
949,
746,
278,
1833,
11086,
931,
10761,
13,
4706,
411,
1722,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29892,
525,
29878,
1495,
408,
1480,
29918,
1445,
29901,
13,
9651,
396,
949,
278,
9281,
2635,
13,
9651,
848,
353,
1480,
29918,
1445,
29889,
949,
9012,
580,
13,
9651,
396,
1217,
11086,
267,
505,
10761,
577,
6336,
817,
263,
11086,
13,
9651,
565,
29898,
2435,
29898,
1272,
29897,
1275,
29871,
29900,
1125,
13,
18884,
1833,
29918,
29886,
3322,
353,
3151,
29918,
2230,
13,
18884,
11086,
353,
5852,
13,
9651,
1683,
29901,
13,
18884,
1833,
29918,
29886,
3322,
353,
12865,
29889,
3166,
10718,
4830,
29898,
1272,
29961,
29900,
2314,
13,
18884,
396,
4801,
837,
457,
565,
967,
931,
304,
11086,
13,
18884,
396,
657,
9281,
931,
393,
471,
282,
3322,
287,
13,
18884,
1833,
29918,
2230,
29918,
23479,
353,
931,
1762,
11031,
29898,
4230,
29918,
29886,
3322,
29897,
13,
18884,
396,
4801,
837,
457,
278,
2446,
1423,
3149,
3625,
363,
9826,
13,
18884,
2446,
29918,
3198,
3149,
353,
4236,
29918,
29882,
2470,
13,
18884,
363,
474,
297,
3464,
29898,
2435,
29898,
19207,
29879,
22164,
13,
462,
1678,
565,
29898,
4230,
29918,
2230,
29918,
23479,
529,
18747,
29961,
29875,
29962,
1125,
13,
462,
4706,
2446,
29918,
3198,
3149,
353,
18747,
29961,
29875,
29962,
13,
462,
4706,
7408,
353,
474,
718,
29871,
29896,
13,
462,
4706,
2867,
13,
18884,
396,
2158,
877,
4622,
1423,
3149,
742,
4622,
29918,
3198,
3149,
29897,
13,
18884,
3151,
29918,
2230,
29918,
23479,
353,
931,
1762,
11031,
29898,
2764,
29918,
2230,
29897,
13,
18884,
396,
3198,
565,
278,
931,
756,
10761,
373,
263,
3517,
2462,
29892,
313,
17405,
19574,
2767,
1363,
967,
263,
716,
2462,
29897,
13,
18884,
2446,
29918,
3250,
353,
3151,
29918,
2230,
29889,
6360,
1405,
1833,
29918,
29886,
3322,
29889,
6360,
470,
3151,
29918,
2230,
29889,
10874,
1405,
1833,
29918,
29886,
3322,
29889,
10874,
470,
3151,
29918,
2230,
29889,
3250,
1405,
1833,
29918,
29886,
3322,
29889,
3250,
13,
18884,
396,
2158,
29898,
4622,
29918,
3250,
29897,
13,
18884,
396,
2158,
703,
3784,
368,
613,
2764,
29918,
2230,
29918,
23479,
29897,
13,
18884,
396,
4801,
837,
457,
565,
278,
1857,
931,
756,
4502,
278,
2446,
1423,
3149,
470,
565,
967,
263,
716,
2462,
13,
18884,
565,
29898,
4622,
29918,
3250,
470,
3151,
29918,
2230,
29918,
23479,
6736,
2446,
29918,
3198,
3149,
1125,
13,
462,
1678,
1833,
29918,
29886,
3322,
353,
3151,
29918,
2230,
13,
462,
1678,
11086,
353,
5852,
13,
9651,
1480,
29918,
1445,
29889,
5358,
580,
13,
13,
4706,
396,
4801,
837,
457,
565,
967,
931,
304,
11086,
13,
4706,
565,
29898,
22379,
1125,
13,
9651,
396,
4990,
825,
7292,
338,
1641,
11086,
287,
373,
278,
2462,
13,
9651,
5235,
29877,
353,
376,
703,
29974,
710,
29898,
19190,
7240,
29908,
12975,
29974,
710,
29898,
10492,
7240,
1159,
29908,
565,
29898,
10492,
1405,
29871,
29900,
29897,
1683,
6629,
13,
9651,
1480,
29889,
3888,
703,
28451,
19574,
2143,
690,
2790,
664,
3493,
15691,
1311,
29889,
19629,
580,
13578,
9691,
943,
856,
15691,
3888,
29877,
29897,
13,
9651,
396,
22379,
599,
9691,
943,
10959,
304,
445,
664,
3493,
13,
9651,
363,
325,
299,
29878,
297,
1583,
29889,
657,
29963,
355,
943,
7295,
13,
18884,
325,
299,
29878,
29889,
22379,
580,
13,
18884,
1209,
13,
13,
9651,
396,
3539,
4784,
931,
995,
304,
1480,
934,
13,
9651,
411,
1722,
29898,
1311,
29889,
657,
9170,
580,
29974,
1311,
29889,
14480,
29918,
7724,
29892,
525,
29893,
1495,
408,
301,
29888,
29901,
13,
18884,
301,
29888,
29889,
3539,
29898,
710,
29898,
2764,
29918,
2230,
876,
13,
13,
4706,
1209,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
2254,
29898,
25932,
1125,
13,
4706,
14550,
5896,
599,
664,
22854,
515,
6055,
29889,
12008,
13,
13,
4706,
16438,
2395,
353,
10882,
29889,
9207,
29954,
29889,
657,
877,
1287,
3493,
742,
26688,
29922,
13438,
29897,
13,
308,
13,
4706,
363,
16904,
297,
16438,
2395,
29889,
8149,
7295,
13,
9651,
396,
11014,
975,
16800,
6611,
13,
9651,
565,
29898,
275,
8758,
29898,
29893,
1028,
2395,
29961,
5652,
1402,
9779,
29897,
1275,
7700,
1125,
13,
18884,
6773,
13,
9651,
2224,
353,
6629,
13,
9651,
9691,
943,
353,
525,
580,
29915,
13,
9651,
396,
27902,
393,
263,
2224,
1820,
322,
9691,
943,
1820,
4864,
1090,
1269,
664,
3493,
13,
9651,
10882,
29889,
9207,
29954,
29889,
842,
877,
1287,
3493,
6169,
29974,
5652,
29974,
4286,
2084,
742,
2224,
29892,
5712,
29922,
8824,
29897,
13,
9651,
10882,
29889,
9207,
29954,
29889,
842,
877,
1287,
3493,
6169,
29974,
5652,
29974,
4286,
29894,
355,
943,
742,
9691,
943,
29892,
5712,
29922,
8824,
29897,
13,
13,
9651,
396,
276,
509,
2418,
2224,
322,
9691,
943,
6611,
13,
9651,
565,
877,
2084,
29915,
297,
16438,
2395,
29961,
5652,
1822,
8149,
580,
1125,
13,
18884,
2224,
353,
16438,
2395,
29961,
5652,
22322,
2084,
13359,
29918,
791,
13,
9651,
565,
877,
29894,
355,
943,
29915,
297,
16438,
2395,
29961,
5652,
1822,
8149,
580,
1125,
13,
18884,
9691,
943,
353,
315,
16434,
29889,
4384,
1293,
29898,
29893,
1028,
2395,
29961,
5652,
22322,
29894,
355,
943,
13359,
29918,
791,
29897,
13,
9651,
396,
3258,
5244,
3493,
3618,
13,
9651,
5244,
3493,
29898,
29893,
1028,
2395,
29961,
5652,
1822,
29918,
978,
29892,
2224,
29892,
9691,
943,
29897,
13,
9651,
1209,
13,
13,
4706,
396,
7620,
565,
1754,
738,
3620,
13,
4706,
565,
29898,
2156,
29889,
9207,
29954,
3032,
1545,
2164,
1125,
13,
9651,
10882,
29889,
9207,
29954,
29889,
3539,
580,
13,
4706,
1209,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4078,
29898,
25932,
29892,
5528,
29918,
4925,
29922,
5574,
1125,
13,
4706,
14550,
13,
4706,
18896,
7093,
278,
5244,
3493,
3618,
322,
27401,
963,
304,
278,
6055,
8600,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
5528,
29918,
4925,
313,
11227,
1125,
8161,
565,
304,
4078,
278,
6136,
664,
3493,
304,
6055,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
7797,
1891,
353,
6571,
13,
4706,
396,
643,
6646,
278,
5244,
3493,
3618,
964,
8600,
3402,
363,
6055,
13,
4706,
363,
16904,
297,
1067,
29879,
29889,
29967,
279,
29889,
5975,
7295,
13,
9651,
396,
1867,
451,
4078,
738,
664,
3493,
393,
756,
694,
2224,
13,
9651,
565,
29898,
5652,
29889,
657,
2605,
580,
1275,
6629,
1125,
13,
18884,
6773,
13,
9651,
7797,
1891,
29961,
5652,
29889,
19629,
580,
29962,
353,
6571,
13,
9651,
7797,
1891,
29961,
5652,
29889,
19629,
580,
22322,
2084,
2033,
353,
16904,
29889,
657,
2605,
580,
13,
9651,
7797,
1891,
29961,
5652,
29889,
19629,
580,
22322,
29894,
355,
943,
2033,
353,
315,
16434,
29889,
4384,
5015,
29898,
5652,
29889,
657,
29963,
355,
943,
29898,
2457,
7039,
29922,
5574,
29892,
5224,
4878,
29922,
8824,
511,
4434,
29918,
20047,
29922,
29906,
29892,
5768,
29918,
1761,
29922,
8824,
29897,
13,
308,
13,
4706,
396,
5504,
6055,
8600,
13,
4706,
10882,
29889,
9207,
29954,
29889,
842,
877,
1287,
3493,
742,
9779,
29898,
15550,
1891,
511,
5712,
29922,
5574,
29897,
13,
308,
13,
4706,
396,
5504,
6136,
664,
3493,
13,
4706,
565,
29898,
3742,
29918,
4925,
1125,
13,
9651,
565,
29898,
25932,
29889,
657,
9966,
580,
2804,
6213,
1125,
13,
18884,
10882,
29889,
9207,
29954,
29889,
842,
877,
17492,
29889,
4925,
29899,
1287,
3493,
742,
1067,
29879,
29889,
657,
9966,
2141,
19629,
3101,
13,
9651,
1683,
29901,
13,
18884,
10882,
29889,
9207,
29954,
29889,
842,
877,
17492,
29889,
4925,
29899,
1287,
3493,
742,
27255,
13,
13,
4706,
10882,
29889,
7620,
580,
13,
4706,
1209,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
297,
5531,
3493,
29898,
25932,
1125,
13,
4706,
14550,
13,
4706,
5953,
837,
457,
565,
385,
6136,
664,
3493,
338,
4629,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6213,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
10731,
5531,
3493,
338,
451,
6213,
13,
4706,
14550,
13,
4706,
736,
1067,
29879,
3032,
9966,
5531,
3493,
2804,
6213,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
731,
9966,
5531,
3493,
29898,
25932,
29892,
16904,
1125,
13,
4706,
14550,
13,
4706,
3789,
278,
6136,
664,
3493,
1156,
2847,
5281,
599,
664,
22854,
964,
15864,
29889,
960,
13,
4706,
278,
1881,
1024,
338,
8340,
29892,
372,
674,
731,
278,
937,
664,
3493,
297,
278,
15864,
408,
13,
4706,
6136,
565,
697,
338,
451,
2307,
9859,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
16904,
313,
710,
1125,
664,
3493,
1024,
13,
4706,
16969,
29901,
13,
9651,
313,
11227,
1125,
1565,
565,
6136,
29899,
1287,
3493,
471,
731,
13,
4706,
14550,
13,
4706,
396,
771,
546,
368,
731,
278,
6136,
664,
3493,
515,
697,
1476,
297,
15864,
13,
4706,
565,
29898,
5652,
2804,
6213,
322,
16904,
29889,
13609,
580,
297,
1067,
29879,
29889,
29967,
279,
29889,
8149,
580,
1125,
13,
9651,
337,
29918,
16645,
353,
313,
25932,
3032,
9966,
5531,
3493,
2804,
6213,
29897,
13,
9651,
396,
842,
278,
6136,
664,
3493,
5446,
515,
1476,
664,
3493,
13,
9651,
1067,
29879,
3032,
9966,
5531,
3493,
353,
1067,
29879,
29889,
29967,
279,
29961,
5652,
29962,
13,
9651,
396,
6194,
2367,
9508,
565,
337,
16645,
292,
278,
6136,
29899,
1287,
3493,
13,
9651,
565,
29898,
276,
29918,
16645,
1125,
13,
18884,
1480,
29889,
3888,
703,
7900,
647,
292,
664,
3493,
15691,
25932,
3032,
9966,
5531,
3493,
29889,
19629,
580,
13578,
408,
6136,
664,
3493,
856,
1159,
13,
13,
9651,
736,
5852,
13,
4706,
396,
2202,
304,
20459,
3566,
6136,
664,
3493,
565,
451,
2307,
9859,
29889,
13,
4706,
25342,
29898,
2435,
29898,
25932,
29889,
29967,
279,
29889,
8149,
3101,
322,
1067,
29879,
3032,
9966,
5531,
3493,
1275,
6213,
1125,
13,
9651,
4036,
29918,
5652,
353,
1051,
29898,
25932,
29889,
29967,
279,
29889,
8149,
3101,
29961,
29900,
29962,
13,
9651,
1067,
29879,
3032,
9966,
5531,
3493,
353,
1067,
29879,
29889,
29967,
279,
29961,
8172,
29918,
5652,
29962,
13,
9651,
10887,
3146,
353,
376,
3782,
6136,
664,
3493,
731,
1213,
13,
9651,
565,
29898,
5652,
2804,
6629,
1125,
13,
18884,
10887,
3146,
353,
376,
5531,
3493,
15691,
5652,
13578,
947,
451,
1863,
1213,
13,
9651,
1480,
29889,
3888,
29898,
1516,
3146,
13578,
11133,
29899,
16645,
292,
6136,
664,
3493,
304,
15691,
25932,
3032,
9966,
5531,
3493,
29889,
19629,
580,
13578,
856,
1159,
13,
9651,
736,
5852,
13,
4706,
396,
303,
453,
471,
451,
2221,
304,
731,
278,
6136,
664,
3493,
411,
278,
2183,
2980,
13,
4706,
25342,
29898,
25932,
3032,
9966,
5531,
3493,
2804,
6213,
1125,
13,
9651,
1480,
29889,
3888,
703,
5531,
3493,
15691,
5652,
13578,
947,
451,
1863,
29889,
19152,
292,
15691,
25932,
3032,
9966,
5531,
3493,
29889,
19629,
580,
13578,
408,
6136,
23157,
13,
4706,
1683,
29901,
13,
9651,
1480,
29889,
2704,
703,
3782,
664,
3493,
731,
408,
6136,
23157,
13,
13,
4706,
736,
7700,
13,
13,
13,
1678,
822,
338,
6595,
287,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
565,
738,
9691,
943,
526,
21351,
304,
445,
664,
3493,
313,
11227,
467,
12008,
13,
4706,
736,
7431,
29898,
1311,
29889,
657,
29963,
355,
943,
3101,
13,
13,
13,
1678,
822,
679,
2605,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
278,
1887,
2224,
988,
16532,
10930,
526,
5982,
313,
710,
467,
12008,
13,
4706,
736,
1583,
3032,
2084,
13,
13,
13,
1678,
822,
679,
9170,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
278,
2967,
7934,
3884,
988,
278,
664,
3493,
848,
338,
8126,
313,
710,
467,
12008,
13,
4706,
736,
1583,
3032,
5652,
29918,
3972,
13,
13,
13,
1678,
822,
679,
10408,
2605,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
278,
7934,
3884,
988,
664,
3493,
2601,
800,
526,
8126,
29889,
313,
710,
467,
12008,
13,
4706,
736,
1583,
29889,
657,
9170,
580,
13578,
8173,
12975,
13,
13,
13,
1678,
822,
679,
1170,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
278,
664,
3493,
29915,
29879,
15882,
313,
710,
467,
12008,
13,
4706,
736,
1583,
3032,
978,
13,
13,
13,
1678,
822,
338,
9966,
29898,
1311,
1125,
13,
4706,
14550,
11609,
29879,
338,
445,
664,
3493,
338,
278,
6136,
664,
3493,
313,
11227,
467,
12008,
13,
4706,
736,
1583,
1275,
1583,
29889,
657,
9966,
580,
13,
13,
13,
1678,
822,
679,
29963,
355,
943,
29898,
1311,
29892,
736,
7039,
29922,
8824,
29892,
5224,
4878,
29922,
5574,
1125,
13,
4706,
14550,
13,
4706,
7106,
278,
27042,
3618,
6942,
411,
278,
2183,
664,
3493,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
736,
7039,
313,
11227,
1125,
1565,
674,
736,
27042,
2983,
13,
9651,
5224,
4878,
313,
11227,
1125,
1565,
674,
736,
5224,
29899,
4878,
2983,
565,
736,
7039,
338,
9615,
13,
4706,
16969,
29901,
13,
9651,
9310,
29963,
12184,
2314,
470,
9310,
710,
29962,
1125,
1051,
310,
3625,
9691,
943,
13,
632,
13,
4706,
14550,
13,
4706,
565,
29898,
2457,
7039,
1125,
13,
9651,
325,
299,
29878,
29918,
7039,
353,
5159,
13,
9651,
363,
325,
299,
29878,
297,
1583,
3032,
29894,
355,
943,
29901,
13,
18884,
1024,
353,
325,
299,
29878,
29889,
19629,
580,
13,
18884,
565,
29898,
13609,
4878,
1125,
13,
462,
1678,
1024,
353,
1024,
29889,
13609,
580,
13,
18884,
325,
299,
29878,
29918,
7039,
4619,
518,
978,
29962,
13,
9651,
736,
325,
299,
29878,
29918,
7039,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
3032,
29894,
355,
943,
13,
13,
268,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
1596,
1293,
29898,
25932,
1125,
13,
4706,
14550,
13,
4706,
1588,
9466,
20917,
1051,
363,
664,
22854,
411,
27042,
20847,
3097,
322,
607,
338,
6136,
29889,
13,
13,
4706,
12662,
2699,
29901,
13,
9651,
6213,
13,
4706,
16969,
29901,
13,
9651,
6213,
13,
4706,
14550,
13,
4706,
1596,
877,
25641,
29966,
29896,
29953,
29913,
4286,
4830,
703,
5531,
3493,
4968,
29915,
25641,
29966,
29953,
29913,
4286,
4830,
703,
9966,
4968,
29915,
25641,
29966,
29946,
29900,
29913,
4286,
4830,
703,
2605,
4968,
29915,
25641,
29966,
29896,
29946,
29913,
4286,
4830,
703,
29963,
355,
943,
5783,
13,
4706,
1596,
703,
29899,
29908,
29930,
29896,
29953,
13578,
376,
13578,
29899,
29908,
29930,
29953,
13578,
376,
13578,
29899,
29908,
29930,
29946,
29900,
13578,
376,
13578,
29899,
29908,
29930,
29896,
29946,
13578,
16521,
13,
4706,
363,
16904,
297,
1067,
29879,
29889,
29967,
279,
29889,
5975,
7295,
13,
9651,
325,
299,
2288,
353,
10882,
29889,
1761,
1762,
5015,
29898,
5652,
29889,
657,
29963,
355,
943,
29898,
2457,
7039,
29922,
5574,
876,
13,
9651,
1044,
353,
525,
3582,
29915,
565,
29898,
5652,
1275,
1067,
29879,
29889,
657,
9966,
3101,
1683,
17411,
29915,
13,
9651,
1596,
877,
25641,
29966,
29896,
29953,
29913,
4286,
4830,
29898,
5652,
29889,
19629,
25739,
29915,
25641,
29966,
29953,
29913,
4286,
4830,
29898,
627,
511,
29915,
25641,
29966,
29946,
29900,
29913,
4286,
4830,
29898,
5652,
29889,
657,
2605,
25739,
29915,
25641,
29966,
29896,
29946,
29913,
4286,
4830,
29898,
29894,
299,
2288,
876,
13,
9651,
1209,
13,
4706,
1209,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
1596,
3596,
29898,
25932,
1125,
13,
4706,
363,
1820,
29892,
5652,
297,
1067,
29879,
29889,
29967,
279,
29889,
7076,
7295,
13,
9651,
1596,
877,
1989,
29901,
742,
1989,
29897,
13,
9651,
1596,
29898,
5652,
29897,
13,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
679,
9966,
29898,
25932,
1125,
13,
4706,
14550,
11609,
29879,
278,
6136,
664,
3493,
322,
674,
6876,
373,
1059,
313,
5531,
3493,
467,
12008,
13,
4706,
565,
29898,
25932,
3032,
9966,
5531,
3493,
1275,
6213,
1125,
13,
9651,
6876,
29898,
1188,
29889,
2704,
703,
3664,
297,
263,
664,
3493,
3850,
876,
13,
4706,
736,
1067,
29879,
3032,
9966,
5531,
3493,
13,
13,
13,
1678,
396,
443,
9342,
304,
671,
363,
13490,
13,
1678,
396,
822,
4770,
710,
12035,
1311,
1125,
13,
1678,
396,
268,
736,
285,
12008,
13,
1678,
396,
268,
3553,
29901,
426,
20970,
29898,
333,
29898,
1311,
876,
29913,
13,
1678,
396,
268,
4408,
29901,
426,
1311,
29889,
19629,
28296,
13,
1678,
396,
268,
10802,
29901,
426,
1311,
29889,
657,
2605,
28296,
13,
1678,
396,
268,
10731,
29901,
426,
1311,
29889,
275,
9966,
28296,
13,
1678,
396,
268,
379,
4215,
3884,
29901,
426,
1311,
29889,
657,
9170,
28296,
13,
1678,
396,
268,
28547,
304,
29901,
426,
1311,
29889,
275,
6595,
287,
28296,
13,
1678,
396,
268,
478,
355,
943,
29901,
426,
1311,
29889,
657,
29963,
355,
943,
29898,
2457,
7039,
29922,
5574,
2915,
13,
1678,
396,
268,
14550,
13,
13,
13,
1678,
1209,
2
] |
Sorting/insertion_sort.py | lakshyarawal/pythonPractice | 0 | 3711 | <filename>Sorting/insertion_sort.py
""" Insertion Sort Algorithm:"""
"""Implementation"""
def insertion_sort(arr) -> list:
n = len(arr)
for i in range(1, n):
swap_index = i
for j in range(i-1, -1, -1):
if arr[swap_index] < arr[j]:
arr[swap_index], arr[j] = arr[j], arr[swap_index]
swap_index -= 1
else:
break
return arr
def main():
arr_input = [10, 5, 30, 1, 2, 5, 10, 10]
a2 = insertion_sort(arr_input)
print(a2)
# Using the special variable
# __name__
if __name__ == "__main__":
main()
| [
1,
529,
9507,
29958,
13685,
292,
29914,
7851,
291,
29918,
6605,
29889,
2272,
13,
15945,
29908,
24505,
291,
20025,
29068,
6160,
15945,
13,
13,
13,
15945,
29908,
1888,
14607,
15945,
29908,
13,
13,
13,
1753,
4635,
291,
29918,
6605,
29898,
2749,
29897,
1599,
1051,
29901,
13,
1678,
302,
353,
7431,
29898,
2749,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
302,
1125,
13,
4706,
17945,
29918,
2248,
353,
474,
13,
4706,
363,
432,
297,
3464,
29898,
29875,
29899,
29896,
29892,
448,
29896,
29892,
448,
29896,
1125,
13,
9651,
565,
3948,
29961,
26276,
29918,
2248,
29962,
529,
3948,
29961,
29926,
5387,
13,
18884,
3948,
29961,
26276,
29918,
2248,
1402,
3948,
29961,
29926,
29962,
353,
3948,
29961,
29926,
1402,
3948,
29961,
26276,
29918,
2248,
29962,
13,
18884,
17945,
29918,
2248,
22361,
29871,
29896,
13,
9651,
1683,
29901,
13,
18884,
2867,
13,
1678,
736,
3948,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
3948,
29918,
2080,
353,
518,
29896,
29900,
29892,
29871,
29945,
29892,
29871,
29941,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29945,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29962,
13,
1678,
263,
29906,
353,
4635,
291,
29918,
6605,
29898,
2749,
29918,
2080,
29897,
13,
1678,
1596,
29898,
29874,
29906,
29897,
13,
13,
13,
29937,
5293,
278,
4266,
2286,
13,
29937,
4770,
978,
1649,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
routemaster/migrations/versions/4ff14db28f2d_rename_labels_table.py | thread/routemaster | 13 | 181287 | """
Rename labels table
Revision ID: <KEY>
Revises: 3d0b226940eb
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '3d0b226940eb'
branch_labels = None
depends_on = None
def upgrade():
op.rename_table('label_history', 'history')
def downgrade():
op.rename_table('history', 'label_history')
| [
1,
9995,
13,
29934,
3871,
11073,
1591,
13,
13,
1123,
4924,
3553,
29901,
529,
10818,
29958,
13,
1123,
1730,
267,
29901,
29871,
29941,
29881,
29900,
29890,
29906,
29906,
29953,
29929,
29946,
29900,
774,
13,
15945,
29908,
13,
5215,
4576,
284,
305,
6764,
408,
872,
13,
13,
3166,
20712,
29890,
293,
1053,
1015,
13,
13,
3166,
4576,
284,
305,
6764,
29889,
15321,
781,
29879,
1053,
27035,
13,
13,
29937,
26554,
2893,
14903,
29892,
1304,
491,
319,
2409,
29890,
293,
29889,
13,
276,
4924,
353,
12801,
10818,
16299,
13,
3204,
29918,
276,
4924,
353,
525,
29941,
29881,
29900,
29890,
29906,
29906,
29953,
29929,
29946,
29900,
774,
29915,
13,
17519,
29918,
21134,
353,
6213,
13,
2716,
1975,
29918,
265,
353,
6213,
13,
13,
13,
1753,
14955,
7295,
13,
1678,
1015,
29889,
1267,
420,
29918,
2371,
877,
1643,
29918,
18434,
742,
525,
18434,
1495,
13,
13,
13,
1753,
1623,
8228,
7295,
13,
1678,
1015,
29889,
1267,
420,
29918,
2371,
877,
18434,
742,
525,
1643,
29918,
18434,
1495,
13,
2
] |
experiments/testing_env/ppo_baseline.py | michalnand/reinforcement_learning_experiments | 0 | 145401 | <gh_stars>0
import numpy
import time
from tunnel_env import *
import RLAgents
import models.ppo_baseline.model.src.model as Model
import models.ppo_baseline.model.src.config as Config
path = "models/ppo_baseline/model/"
config = Config.Config()
envs = TunnelEnv(config.actors)
agent = RLAgents.AgentPPO(envs, Model, Config)
max_iterations = 1*(10**5)
#trainig = RLAgents.TrainingIterations(envs, agent, max_iterations, path, 1000)
#trainig.run()
agent.load(path)
agent.disable_training()
while True:
reward, done = agent.main()
envs.render()
time.sleep(0.01)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
13,
5215,
931,
13,
3166,
26086,
29918,
6272,
1053,
334,
13,
13,
5215,
390,
4375,
29887,
1237,
13,
13,
5215,
4733,
29889,
9759,
29918,
6500,
5570,
29889,
4299,
29889,
4351,
29889,
4299,
9651,
408,
8125,
13,
5215,
4733,
29889,
9759,
29918,
6500,
5570,
29889,
4299,
29889,
4351,
29889,
2917,
965,
408,
12782,
13,
13,
13,
2084,
353,
376,
9794,
29914,
9759,
29918,
6500,
5570,
29914,
4299,
12975,
13,
13,
2917,
29871,
353,
12782,
29889,
3991,
580,
13,
264,
4270,
1678,
353,
323,
16163,
21745,
29898,
2917,
29889,
627,
943,
29897,
13,
13,
14748,
259,
353,
390,
4375,
29887,
1237,
29889,
19661,
29925,
13152,
29898,
264,
4270,
29892,
8125,
29892,
12782,
29897,
29871,
13,
13,
3317,
29918,
1524,
800,
353,
29871,
29896,
16395,
29896,
29900,
1068,
29945,
29897,
29871,
13,
13,
29937,
14968,
335,
353,
390,
4375,
29887,
1237,
29889,
5323,
2827,
13463,
800,
29898,
264,
4270,
29892,
10823,
29892,
4236,
29918,
1524,
800,
29892,
2224,
29892,
29871,
29896,
29900,
29900,
29900,
29897,
13,
29937,
14968,
335,
29889,
3389,
580,
29871,
13,
13,
13,
14748,
29889,
1359,
29898,
2084,
29897,
13,
14748,
29889,
20472,
29918,
26495,
580,
13,
8000,
5852,
29901,
13,
1678,
20751,
29892,
2309,
353,
10823,
29889,
3396,
580,
13,
13,
1678,
427,
4270,
29889,
9482,
580,
13,
1678,
931,
29889,
17059,
29898,
29900,
29889,
29900,
29896,
29897,
13,
2
] |
tradingTest/__init__.py | brtkev/trading-strategy-tester | 0 | 191797 | from os import close, truncate
from app import trades_analitics
from . import utils, strategy, technicalAnalisys as ta
class TradingTest():
def __init__(self):
self.trades = []
self.position = None
def test(self, props : dict) :
import time
# get symbol data
data = utils.getHistorial(props)
print("len ", len(data))
print(time.strftime("%Y %b %d", time.gmtime(data[0][0]/1000)))
strat = strategy.rideLong
strat.setup(data)
for i in range( 201, len(data)):
if strat.position:
strat.shouldClose(i, data)
else:
strat.shouldOpen(i, data)
strat.getStats(len(data))
return
self.dataLen = len(data)
# iterate over data
for i in range(201, len(data)):
#if onTrade get exit validity
if self.position:
#if valid exit
shouldClose = strat.close(self.position, data, i)
if shouldClose:
self.position.update(shouldClose)
self.trades.append(self.position)
self.position = None
#if not onTrade get trade validity
if not self.position:
#if valid enter trade
side = strat.open(data, i)
if side:
self.position = self.open(data, i, side)
self.strat = strat
def open(self, data, index, side):
if type(side) == dict:
side['index'] = index
side['bar'] = data[index]
return side
return {
'bar' : data[index],
'index' : index,
'side' : side
}
def tradeAnalytics(self):
def iterateTrades():
currWinningStreak = currLosingStreak = 0
for trade in self.trades:
TradesAnalisys.count += 1
closeP = float(trade['bar'][4])
tradeSize = ta.qtyToTrade(100, closeP, trade['sl'], 0.5)
TradesAnalisys.avgTradeSize += tradeSize
TradesAnalisys.avgChange += ta.percentChange(trade['sl'], closeP)
TradesAnalisys.fees += tradeSize * 0.02 / 100
TradesAnalisys.avgCandles += trade['closeIndex'] - trade['index']
if tradeSize > 100:
print(tradeSize, ta.percentChange(trade['sl'], closeP))
if trade['status'] == 'win':
TradesAnalisys.wins += 1
TradesAnalisys.gain += 2
TradesAnalisys.gainInAsset += 2 * 100 * 0.5/100
currLosingStreak = 0
currWinningStreak += 1
else:
TradesAnalisys.loses += 1
TradesAnalisys.gain -= 1
TradesAnalisys.gainInAsset -= 100 * 0.5 / 100
currLosingStreak += 1
currWinningStreak = 0
if TradesAnalisys.losingStreak < currLosingStreak:
TradesAnalisys.losingStreak = currLosingStreak
if TradesAnalisys.winningStreak < currWinningStreak:
TradesAnalisys.winningStreak = currWinningStreak
TradesAnalisys.avgTradeSize /= TradesAnalisys.count
TradesAnalisys.avgChange /= TradesAnalisys.count
TradesAnalisys.avgCandles /= TradesAnalisys.count
iterateTrades()
print("count", TradesAnalisys.count)
print("wins", TradesAnalisys.wins)
print("loses", TradesAnalisys.loses)
print("gain", TradesAnalisys.gain)
print("winrate", round(100*TradesAnalisys.wins/TradesAnalisys.count,2))
print()
print("biggest winning streak", TradesAnalisys.winningStreak)
print("biggest losing streak", TradesAnalisys.losingStreak)
print("avg trade size", TradesAnalisys.avgTradeSize)
print("avg trade change", TradesAnalisys.avgChange)
print("avg candles per trade", TradesAnalisys.avgCandles)
print()
print("gain in asset", TradesAnalisys.gainInAsset)
print("fees", TradesAnalisys.fees)
class TradesAnalisys:
count = 0
wins = 0
loses = 0
change = 0
gain = 0
losingStreak = 0
winningStreak = 0
avgChange = 0
avgCandles = 0
gainInAsset = 0
fees = 0
avgTradeSize = 0 | [
1,
515,
2897,
1053,
3802,
29892,
21022,
403,
13,
13,
3166,
623,
1053,
534,
3076,
29918,
7054,
277,
1199,
13,
3166,
869,
1053,
3667,
29879,
29892,
13705,
29892,
16905,
2744,
5711,
952,
408,
11062,
13,
13,
13,
1990,
1605,
9382,
3057,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
509,
3076,
353,
5159,
13,
4706,
1583,
29889,
3283,
353,
6213,
13,
13,
13,
1678,
822,
1243,
29898,
1311,
29892,
17761,
584,
9657,
29897,
584,
13,
4706,
1053,
931,
13,
4706,
396,
679,
5829,
848,
13,
4706,
848,
353,
3667,
29879,
29889,
657,
29950,
2118,
616,
29898,
11030,
29897,
13,
13,
4706,
1596,
703,
2435,
9162,
7431,
29898,
1272,
876,
13,
4706,
1596,
29898,
2230,
29889,
710,
615,
603,
11702,
29979,
1273,
29890,
1273,
29881,
613,
931,
29889,
29887,
29885,
2230,
29898,
1272,
29961,
29900,
3816,
29900,
16261,
29896,
29900,
29900,
29900,
4961,
13,
13,
4706,
26742,
353,
13705,
29889,
2426,
8208,
13,
4706,
26742,
29889,
14669,
29898,
1272,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
29871,
29906,
29900,
29896,
29892,
7431,
29898,
1272,
22164,
13,
9651,
565,
26742,
29889,
3283,
29901,
13,
18884,
26742,
29889,
9344,
11123,
29898,
29875,
29892,
848,
29897,
13,
9651,
1683,
29901,
13,
18884,
26742,
29889,
9344,
6585,
29898,
29875,
29892,
848,
29897,
13,
13,
4706,
26742,
29889,
657,
25060,
29898,
2435,
29898,
1272,
876,
13,
4706,
736,
13,
13,
4706,
1583,
29889,
1272,
21515,
353,
7431,
29898,
1272,
29897,
13,
4706,
396,
13649,
975,
848,
13,
4706,
363,
474,
297,
3464,
29898,
29906,
29900,
29896,
29892,
7431,
29898,
1272,
22164,
13,
632,
13,
9651,
396,
361,
373,
5323,
311,
679,
6876,
2854,
537,
13,
9651,
565,
1583,
29889,
3283,
29901,
13,
18884,
396,
361,
2854,
6876,
13,
18884,
881,
11123,
353,
26742,
29889,
5358,
29898,
1311,
29889,
3283,
29892,
848,
29892,
474,
29897,
13,
18884,
565,
881,
11123,
29901,
13,
462,
1678,
1583,
29889,
3283,
29889,
5504,
29898,
9344,
11123,
29897,
13,
462,
1678,
1583,
29889,
509,
3076,
29889,
4397,
29898,
1311,
29889,
3283,
29897,
13,
462,
1678,
1583,
29889,
3283,
353,
6213,
13,
13,
13,
9651,
396,
361,
451,
373,
5323,
311,
679,
11302,
2854,
537,
13,
9651,
565,
451,
1583,
29889,
3283,
29901,
13,
18884,
396,
361,
2854,
3896,
11302,
13,
18884,
2625,
353,
26742,
29889,
3150,
29898,
1272,
29892,
474,
29897,
13,
18884,
565,
2625,
29901,
13,
462,
1678,
1583,
29889,
3283,
353,
1583,
29889,
3150,
29898,
1272,
29892,
474,
29892,
2625,
29897,
13,
13,
4706,
1583,
29889,
710,
271,
353,
26742,
13,
13,
1678,
822,
1722,
29898,
1311,
29892,
848,
29892,
2380,
29892,
2625,
1125,
13,
4706,
565,
1134,
29898,
2975,
29897,
1275,
9657,
29901,
13,
9651,
2625,
1839,
2248,
2033,
353,
2380,
13,
9651,
2625,
1839,
1646,
2033,
353,
848,
29961,
2248,
29962,
13,
9651,
736,
2625,
13,
632,
13,
4706,
736,
426,
13,
9651,
525,
1646,
29915,
584,
848,
29961,
2248,
1402,
13,
9651,
525,
2248,
29915,
584,
2380,
29892,
13,
9651,
525,
2975,
29915,
584,
2625,
13,
4706,
500,
13,
13,
1678,
822,
11302,
21067,
22026,
29898,
1311,
1125,
308,
13,
308,
13,
4706,
822,
13649,
2308,
3076,
7295,
13,
9651,
16256,
17734,
1076,
855,
276,
557,
353,
16256,
29931,
14556,
855,
276,
557,
353,
29871,
29900,
13,
9651,
363,
11302,
297,
1583,
29889,
509,
3076,
29901,
13,
18884,
1605,
3076,
2744,
5711,
952,
29889,
2798,
4619,
29871,
29896,
13,
18884,
3802,
29925,
353,
5785,
29898,
3018,
311,
1839,
1646,
2033,
29961,
29946,
2314,
13,
18884,
11302,
3505,
353,
11062,
29889,
29939,
1017,
1762,
5323,
311,
29898,
29896,
29900,
29900,
29892,
3802,
29925,
29892,
11302,
1839,
2536,
7464,
29871,
29900,
29889,
29945,
29897,
13,
18884,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
5323,
311,
3505,
4619,
11302,
3505,
13,
18884,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
7277,
4619,
11062,
29889,
25376,
7277,
29898,
3018,
311,
1839,
2536,
7464,
3802,
29925,
29897,
13,
18884,
1605,
3076,
2744,
5711,
952,
29889,
1725,
267,
4619,
11302,
3505,
334,
29871,
29900,
29889,
29900,
29906,
847,
29871,
29896,
29900,
29900,
13,
18884,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
29907,
392,
793,
4619,
11302,
1839,
5358,
3220,
2033,
448,
11302,
1839,
2248,
2033,
13,
18884,
565,
11302,
3505,
1405,
29871,
29896,
29900,
29900,
29901,
13,
462,
1678,
1596,
29898,
3018,
311,
3505,
29892,
11062,
29889,
25376,
7277,
29898,
3018,
311,
1839,
2536,
7464,
3802,
29925,
876,
13,
13,
18884,
565,
11302,
1839,
4882,
2033,
1275,
525,
5080,
2396,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
29893,
1144,
4619,
29871,
29896,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
4619,
29871,
29906,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
797,
26405,
4619,
29871,
29906,
334,
29871,
29896,
29900,
29900,
334,
29871,
29900,
29889,
29945,
29914,
29896,
29900,
29900,
29871,
13,
13,
462,
1678,
16256,
29931,
14556,
855,
276,
557,
353,
29871,
29900,
13,
462,
1678,
16256,
17734,
1076,
855,
276,
557,
4619,
29871,
29896,
13,
18884,
1683,
29901,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
5409,
267,
4619,
29871,
29896,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
22361,
29871,
29896,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
797,
26405,
22361,
29871,
29896,
29900,
29900,
334,
29871,
29900,
29889,
29945,
847,
29871,
29896,
29900,
29900,
13,
13,
462,
1678,
16256,
29931,
14556,
855,
276,
557,
4619,
29871,
29896,
13,
462,
1678,
16256,
17734,
1076,
855,
276,
557,
353,
29871,
29900,
13,
13,
18884,
565,
1605,
3076,
2744,
5711,
952,
29889,
5409,
292,
855,
276,
557,
529,
16256,
29931,
14556,
855,
276,
557,
29901,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
5409,
292,
855,
276,
557,
353,
16256,
29931,
14556,
855,
276,
557,
13,
18884,
565,
1605,
3076,
2744,
5711,
952,
29889,
5080,
1076,
855,
276,
557,
529,
16256,
17734,
1076,
855,
276,
557,
29901,
13,
462,
1678,
1605,
3076,
2744,
5711,
952,
29889,
5080,
1076,
855,
276,
557,
353,
16256,
17734,
1076,
855,
276,
557,
13,
9651,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
5323,
311,
3505,
847,
29922,
1605,
3076,
2744,
5711,
952,
29889,
2798,
13,
9651,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
7277,
847,
29922,
1605,
3076,
2744,
5711,
952,
29889,
2798,
13,
9651,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
29907,
392,
793,
847,
29922,
1605,
3076,
2744,
5711,
952,
29889,
2798,
13,
13,
4706,
13649,
2308,
3076,
580,
13,
4706,
1596,
703,
2798,
613,
1605,
3076,
2744,
5711,
952,
29889,
2798,
29897,
13,
4706,
1596,
703,
29893,
1144,
613,
1605,
3076,
2744,
5711,
952,
29889,
29893,
1144,
29897,
13,
4706,
1596,
703,
5409,
267,
613,
1605,
3076,
2744,
5711,
952,
29889,
5409,
267,
29897,
13,
4706,
1596,
703,
29887,
475,
613,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
29897,
13,
4706,
1596,
703,
5080,
10492,
613,
4513,
29898,
29896,
29900,
29900,
29930,
2308,
3076,
2744,
5711,
952,
29889,
29893,
1144,
29914,
2308,
3076,
2744,
5711,
952,
29889,
2798,
29892,
29906,
876,
13,
4706,
1596,
580,
13,
4706,
1596,
703,
3752,
7118,
15613,
12243,
557,
613,
1605,
3076,
2744,
5711,
952,
29889,
5080,
1076,
855,
276,
557,
29897,
13,
4706,
1596,
703,
3752,
7118,
19035,
12243,
557,
613,
1605,
3076,
2744,
5711,
952,
29889,
5409,
292,
855,
276,
557,
29897,
13,
4706,
1596,
703,
485,
29887,
11302,
2159,
613,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
5323,
311,
3505,
29897,
13,
4706,
1596,
703,
485,
29887,
11302,
1735,
613,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
7277,
29897,
13,
4706,
1596,
703,
485,
29887,
23794,
793,
639,
11302,
613,
1605,
3076,
2744,
5711,
952,
29889,
485,
29887,
29907,
392,
793,
29897,
13,
4706,
1596,
580,
13,
4706,
1596,
703,
29887,
475,
297,
24342,
613,
1605,
3076,
2744,
5711,
952,
29889,
29887,
475,
797,
26405,
29897,
13,
4706,
1596,
703,
1725,
267,
613,
1605,
3076,
2744,
5711,
952,
29889,
1725,
267,
29897,
13,
1990,
1605,
3076,
2744,
5711,
952,
29901,
13,
1678,
2302,
353,
29871,
29900,
13,
1678,
21614,
353,
29871,
29900,
13,
1678,
1232,
267,
353,
29871,
29900,
13,
1678,
1735,
353,
29871,
29900,
13,
1678,
11581,
29871,
353,
29871,
29900,
13,
1678,
19035,
855,
276,
557,
353,
29871,
29900,
13,
1678,
15613,
855,
276,
557,
353,
29871,
29900,
13,
1678,
1029,
29887,
7277,
353,
29871,
29900,
13,
1678,
1029,
29887,
29907,
392,
793,
353,
29871,
29900,
13,
13,
1678,
11581,
797,
26405,
353,
29871,
29900,
13,
1678,
1238,
267,
353,
29871,
29900,
13,
1678,
1029,
29887,
5323,
311,
3505,
353,
29871,
29900,
2
] |
examples/python/partner_data.py | linways/SSO-with-JWT | 0 | 156782 | <filename>examples/python/partner_data.py<gh_stars>0
# For demonstration this will serve as the database of partners
# For real implementation this will come from a database.
# Both partnerId and key should be shared between services.
partners = {
'abcd123' : { # this is partner ssoId (abcd123)
'name': 'Partner 1 inc.',
'shared_key' : '<KEY>',
'is_active' : True
},
'abcd1234':{ # this is partner ssoId (abcd1234)
'name' : 'Partner 2 inc.',
'shared_key' : '<KEY>',
'is_active' : False
}
}
| [
1,
529,
9507,
29958,
19057,
29914,
4691,
29914,
1595,
1089,
29918,
1272,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
29937,
1152,
9004,
362,
445,
674,
9080,
408,
278,
2566,
310,
22056,
13,
29937,
1152,
1855,
5314,
445,
674,
2041,
515,
263,
2566,
29889,
13,
29937,
9134,
18096,
1204,
322,
1820,
881,
367,
7258,
1546,
5786,
29889,
13,
13,
1595,
8397,
353,
426,
13,
1678,
525,
370,
2252,
29896,
29906,
29941,
29915,
584,
426,
268,
396,
445,
338,
18096,
269,
578,
1204,
313,
370,
2252,
29896,
29906,
29941,
29897,
13,
4706,
525,
978,
2396,
525,
7439,
1089,
29871,
29896,
5528,
29889,
742,
13,
308,
525,
12366,
29918,
1989,
29915,
584,
12801,
10818,
29958,
742,
13,
308,
525,
275,
29918,
4925,
29915,
584,
5852,
13,
1678,
2981,
13,
1678,
525,
370,
2252,
29896,
29906,
29941,
29946,
2396,
29912,
259,
396,
445,
338,
18096,
269,
578,
1204,
313,
370,
2252,
29896,
29906,
29941,
29946,
29897,
13,
4706,
525,
978,
29915,
584,
525,
7439,
1089,
29871,
29906,
5528,
29889,
742,
13,
4706,
525,
12366,
29918,
1989,
29915,
584,
12801,
10818,
29958,
742,
13,
4706,
525,
275,
29918,
4925,
29915,
584,
7700,
13,
1678,
500,
13,
29913,
13,
2
] |
mycarehub/screeningtools/management/commands/load_screeningquestions.py | savannahghi/mycarehub-backend | 1 | 155003 | import json
import os
import sys
from pathlib import Path
from django.core.management.base import BaseCommand
from django.db import transaction
from mycarehub.screeningtools.models import ScreeningToolsQuestion
class Command(BaseCommand):
help = "Loads the screening tool questions to the database"
@transaction.atomic
def handle(self, *args, **options):
base_path = Path(__file__).parent.parent.parent.parent.parent.resolve()
sys.path.append(str(base_path))
data_dir = os.path.join(base_path, "data")
source_file_screeningtools = os.path.join(data_dir, "screeningtools.json")
data_screeningtools = json.load(open(file=source_file_screeningtools))
count = len(data_screeningtools)
for screeningtool in data_screeningtools:
if ScreeningToolsQuestion.objects.filter(question=screeningtool["question"]).exists():
continue
r, created = ScreeningToolsQuestion.objects.get_or_create(
question=screeningtool["question"],
tool_type=screeningtool["tool_type"],
response_choices=screeningtool["response_choices"],
response_type=screeningtool["response_type"],
response_category=screeningtool["response_category"],
sequence=screeningtool["sequence"],
meta=screeningtool["meta"],
)
r.save()
print(f"screeningtool: {screeningtool}; Created: {created}; {count}")
| [
1,
1053,
4390,
13,
5215,
2897,
13,
5215,
10876,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
3166,
9557,
29889,
2585,
1053,
10804,
13,
13,
3166,
590,
18020,
29882,
431,
29889,
10525,
292,
8504,
29889,
9794,
1053,
22666,
292,
24183,
16492,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
1371,
353,
376,
5896,
29879,
278,
4315,
292,
5780,
5155,
304,
278,
2566,
29908,
13,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
2967,
29918,
2084,
353,
10802,
22168,
1445,
1649,
467,
3560,
29889,
3560,
29889,
3560,
29889,
3560,
29889,
3560,
29889,
17863,
580,
13,
4706,
10876,
29889,
2084,
29889,
4397,
29898,
710,
29898,
3188,
29918,
2084,
876,
13,
4706,
848,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3188,
29918,
2084,
29892,
376,
1272,
1159,
13,
4706,
2752,
29918,
1445,
29918,
10525,
292,
8504,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29892,
376,
10525,
292,
8504,
29889,
3126,
1159,
13,
13,
4706,
848,
29918,
10525,
292,
8504,
353,
4390,
29889,
1359,
29898,
3150,
29898,
1445,
29922,
4993,
29918,
1445,
29918,
10525,
292,
8504,
876,
13,
4706,
2302,
353,
7431,
29898,
1272,
29918,
10525,
292,
8504,
29897,
13,
13,
4706,
363,
4315,
292,
10154,
297,
848,
29918,
10525,
292,
8504,
29901,
13,
9651,
565,
22666,
292,
24183,
16492,
29889,
12650,
29889,
4572,
29898,
12470,
29922,
10525,
292,
10154,
3366,
12470,
3108,
467,
9933,
7295,
13,
18884,
6773,
13,
9651,
364,
29892,
2825,
353,
22666,
292,
24183,
16492,
29889,
12650,
29889,
657,
29918,
272,
29918,
3258,
29898,
13,
18884,
1139,
29922,
10525,
292,
10154,
3366,
12470,
12436,
13,
18884,
5780,
29918,
1853,
29922,
10525,
292,
10154,
3366,
10154,
29918,
1853,
12436,
13,
18884,
2933,
29918,
1859,
1575,
29922,
10525,
292,
10154,
3366,
5327,
29918,
1859,
1575,
12436,
13,
18884,
2933,
29918,
1853,
29922,
10525,
292,
10154,
3366,
5327,
29918,
1853,
12436,
13,
18884,
2933,
29918,
7320,
29922,
10525,
292,
10154,
3366,
5327,
29918,
7320,
12436,
13,
18884,
5665,
29922,
10525,
292,
10154,
3366,
16506,
12436,
13,
18884,
12700,
29922,
10525,
292,
10154,
3366,
7299,
12436,
13,
9651,
1723,
13,
9651,
364,
29889,
7620,
580,
13,
9651,
1596,
29898,
29888,
29908,
10525,
292,
10154,
29901,
426,
10525,
292,
10154,
3400,
6760,
630,
29901,
426,
11600,
3400,
426,
2798,
27195,
13,
2
] |
code4/Item.py | weijie88/spider_files | 0 | 92048 | <reponame>weijie88/spider_files<filename>code4/Item.py<gh_stars>0
class Stock():
def __init__(self,code,name,price):
self.code = code
self.name = name
self.price = price
def __str__(self):
return 'code{},name{},price{}'.format(self.code,self.name,self.price) | [
1,
529,
276,
1112,
420,
29958,
705,
823,
347,
29947,
29947,
29914,
1028,
1241,
29918,
5325,
29966,
9507,
29958,
401,
29946,
29914,
2001,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
1990,
10224,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
401,
29892,
978,
29892,
9175,
1125,
13,
4706,
1583,
29889,
401,
353,
775,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
9175,
353,
8666,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
525,
401,
29912,
1118,
978,
29912,
1118,
9175,
8875,
4286,
4830,
29898,
1311,
29889,
401,
29892,
1311,
29889,
978,
29892,
1311,
29889,
9175,
29897,
2
] |
abc_anno/attempt01.py | Preocts/python_play_carton | 0 | 132106 | <reponame>Preocts/python_play_carton<gh_stars>0
from __future__ import annotations
from abc import ABC
from abc import abstractmethod
class Parent(ABC):
@abstractmethod
def method_string(self) -> str:
raise NotImplementedError()
class ChildOne(Parent):
def method_string(self) -> str:
return "hello"
class ChildTwo(Parent):
def method_string(self) -> str:
return "Goodbye"
def getChild(number: int) -> Parent:
return ChildTwo() if number else ChildOne()
def getChilren(number: int) -> list[Parent]:
if number:
return [ChildTwo() for _ in range(10)]
return [ChildOne() for _ in range(10)]
| [
1,
529,
276,
1112,
420,
29958,
6572,
20082,
29879,
29914,
4691,
29918,
1456,
29918,
13823,
265,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
3166,
25638,
1053,
16417,
13,
3166,
25638,
1053,
9846,
5696,
13,
13,
13,
1990,
22280,
29898,
19658,
1125,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
1158,
29918,
1807,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
13,
1990,
10517,
6716,
29898,
9780,
1125,
13,
1678,
822,
1158,
29918,
1807,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
376,
12199,
29908,
13,
13,
13,
1990,
10517,
13985,
29898,
9780,
1125,
13,
1678,
822,
1158,
29918,
1807,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
376,
18420,
26966,
29908,
13,
13,
13,
1753,
679,
5938,
29898,
4537,
29901,
938,
29897,
1599,
22280,
29901,
13,
1678,
736,
10517,
13985,
580,
565,
1353,
1683,
10517,
6716,
580,
13,
13,
13,
1753,
679,
1451,
309,
1267,
29898,
4537,
29901,
938,
29897,
1599,
1051,
29961,
9780,
5387,
13,
1678,
565,
1353,
29901,
13,
4706,
736,
518,
5938,
13985,
580,
363,
903,
297,
3464,
29898,
29896,
29900,
4638,
13,
1678,
736,
518,
5938,
6716,
580,
363,
903,
297,
3464,
29898,
29896,
29900,
4638,
13,
2
] |
tcfcli/libs/tcsam/events.py | dorasang/tcfcli | 0 | 1615774 | <filename>tcfcli/libs/tcsam/events.py
from tcfcli.libs.tcsam.model import *
class Timer(ProperModel):
PROPER = {
"CronExpression": {
MUST: True,
TYPE: mstr,
VALUE: None
},
"Enable": {
MUST: False,
TYPE: mstr,
VALUE: ["OPEN", "CLOSE"]
}
}
def __init__(self, model, dft={}):
super(Timer, self).__init__(model)
def trigger_desc(self):
return getattr(self, "CronExpression", None)
class COS(ProperModel):
PROPER = {
"Events": {
MUST: True,
TYPE: mstr,
VALUE: None
},
"Filter": {
MUST: False,
TYPE: mmap,
VALUE: None
},
"Enable": {
MUST: False,
TYPE: mstr,
VALUE: ["OPEN", "CLOSE"]
}
}
def __init__(self, model, dft={}):
super(COS, self).__init__(model)
def trigger_desc(self):
return {"event": getattr(self, "Events"), "filter": getattr(self, "Filter", None)}
class APIGW(ProperModel):
PROPER = {
"StageName": {
MUST: False,
TYPE: mstr,
VALUE: ["test", "prepub", "release"]
},
"HttpMethod": {
MUST: False,
TYPE: mstr,
VALUE: ["ANY", "GET", "POST", "PUT", "DELETE", "HEAD"]
}
}
def __init__(self, model, dft={}):
super(APIGW, self).__init__(model)
def trigger_desc(self):
ret = {
"api": {
"authRequired": "FALSE",
"requestConfig": {
"method": getattr(self, "HttpMethod", None)
}
},
"service": {
"serviceName": "SCF_API_SERVICE"
},
"release": {
"environmentName": getattr(self, "StageName", None)
}
}
return ret
class CMQ(ProperModel):
PROPER = {
"Enable": {
MUST: False,
TYPE: mstr,
VALUE: ["OPEN", "CLOSE"]
}
}
def __init__(self, model, dft={}):
super(CMQ, self).__init__(model)
def trigger_desc(self):
return getattr(self, "Name", None)
class Events(TypeModel):
AVA_TYPE = {
"Timer": Timer,
"COS": COS,
"APIGW": APIGW,
"CMQ": CMQ
}
def __init__(self, model, dft={}):
super(Events, self).__init__(model, dft)
def to_json(self):
return self._serialize() | [
1,
529,
9507,
29958,
29873,
6854,
11303,
29914,
10254,
29914,
29873,
2395,
314,
29914,
13604,
29889,
2272,
13,
3166,
260,
6854,
11303,
29889,
10254,
29889,
29873,
2395,
314,
29889,
4299,
1053,
334,
13,
13,
13,
1990,
29168,
29898,
1184,
546,
3195,
1125,
13,
1678,
13756,
13171,
353,
426,
13,
4706,
376,
29907,
1617,
10960,
1115,
426,
13,
9651,
341,
17321,
29901,
5852,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6213,
13,
4706,
2981,
13,
4706,
376,
20701,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6796,
4590,
1430,
613,
376,
29907,
3927,
1660,
3108,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
270,
615,
3790,
29913,
1125,
13,
4706,
2428,
29898,
14745,
29892,
1583,
467,
1649,
2344,
12035,
4299,
29897,
13,
13,
1678,
822,
7135,
29918,
14273,
29898,
1311,
1125,
13,
4706,
736,
679,
5552,
29898,
1311,
29892,
376,
29907,
1617,
10960,
613,
6213,
29897,
13,
13,
13,
1990,
315,
3267,
29898,
1184,
546,
3195,
1125,
13,
1678,
13756,
13171,
353,
426,
13,
4706,
376,
13634,
1115,
426,
13,
9651,
341,
17321,
29901,
5852,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6213,
13,
4706,
2981,
13,
4706,
376,
5072,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
1958,
29892,
13,
9651,
12599,
4462,
29901,
6213,
13,
4706,
2981,
13,
4706,
376,
20701,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6796,
4590,
1430,
613,
376,
29907,
3927,
1660,
3108,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
270,
615,
3790,
29913,
1125,
13,
4706,
2428,
29898,
3217,
29903,
29892,
1583,
467,
1649,
2344,
12035,
4299,
29897,
13,
13,
1678,
822,
7135,
29918,
14273,
29898,
1311,
1125,
13,
4706,
736,
8853,
3696,
1115,
679,
5552,
29898,
1311,
29892,
376,
13634,
4968,
376,
4572,
1115,
679,
5552,
29898,
1311,
29892,
376,
5072,
613,
6213,
2915,
13,
13,
13,
1990,
3450,
29954,
29956,
29898,
1184,
546,
3195,
1125,
13,
1678,
13756,
13171,
353,
426,
13,
4706,
376,
27276,
1170,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6796,
1688,
613,
376,
1457,
5467,
613,
376,
14096,
3108,
13,
4706,
2981,
13,
4706,
376,
5506,
4062,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6796,
2190,
29979,
613,
376,
7194,
613,
376,
5438,
613,
376,
12336,
613,
376,
2287,
18476,
613,
376,
23252,
3108,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
270,
615,
3790,
29913,
1125,
13,
4706,
2428,
29898,
8787,
29954,
29956,
29892,
1583,
467,
1649,
2344,
12035,
4299,
29897,
13,
13,
1678,
822,
7135,
29918,
14273,
29898,
1311,
1125,
13,
4706,
3240,
353,
426,
13,
9651,
376,
2754,
1115,
426,
13,
18884,
376,
5150,
19347,
1115,
376,
25717,
613,
13,
18884,
376,
3827,
3991,
1115,
426,
13,
462,
1678,
376,
5696,
1115,
679,
5552,
29898,
1311,
29892,
376,
5506,
4062,
613,
6213,
29897,
13,
18884,
500,
13,
9651,
2981,
13,
9651,
376,
5509,
1115,
426,
13,
18884,
376,
5509,
1170,
1115,
376,
7187,
29943,
29918,
8787,
29918,
6304,
19059,
29908,
13,
9651,
2981,
13,
9651,
376,
14096,
1115,
426,
13,
18884,
376,
20944,
1170,
1115,
679,
5552,
29898,
1311,
29892,
376,
27276,
1170,
613,
6213,
29897,
13,
9651,
500,
13,
4706,
500,
13,
4706,
736,
3240,
13,
13,
13,
1990,
315,
25566,
29898,
1184,
546,
3195,
1125,
13,
1678,
13756,
13171,
353,
426,
13,
4706,
376,
20701,
1115,
426,
13,
9651,
341,
17321,
29901,
7700,
29892,
13,
9651,
323,
6959,
29901,
286,
710,
29892,
13,
9651,
12599,
4462,
29901,
6796,
4590,
1430,
613,
376,
29907,
3927,
1660,
3108,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
270,
615,
3790,
29913,
1125,
13,
4706,
2428,
29898,
24494,
29984,
29892,
1583,
467,
1649,
2344,
12035,
4299,
29897,
13,
13,
1678,
822,
7135,
29918,
14273,
29898,
1311,
1125,
13,
4706,
736,
679,
5552,
29898,
1311,
29892,
376,
1170,
613,
6213,
29897,
13,
13,
13,
1990,
28488,
29898,
1542,
3195,
1125,
13,
1678,
16884,
29909,
29918,
11116,
353,
426,
13,
4706,
376,
14745,
1115,
29168,
29892,
13,
4706,
376,
3217,
29903,
1115,
315,
3267,
29892,
13,
4706,
376,
8787,
29954,
29956,
1115,
3450,
29954,
29956,
29892,
13,
4706,
376,
24494,
29984,
1115,
315,
25566,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
270,
615,
3790,
29913,
1125,
13,
4706,
2428,
29898,
13634,
29892,
1583,
467,
1649,
2344,
12035,
4299,
29892,
270,
615,
29897,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
643,
6646,
580,
2
] |
contractor/tscript/runner_test.py | T3kton/contractor | 5 | 1601633 | import pytest
import pickle
import time
from contractor.tscript.parser import parse
from contractor.tscript.runner import Runner, ExecutionError, UnrecoverableError, ParamaterError, NotDefinedError, Timeout, Pause
# TODO: test the assignment deepcopy, ie: a = {}, b = a make sure changes to b are not reflected in a
class testExternalObject( object ):
TSCRIPT_NAME = 'test_obj'
def __init__( self, dataRW, dataWO, dataRO ):
super().__init__()
self.dataRW = dataRW
self.dataWO = dataWO
self.dataRO = dataRO
def getValues( self ):
return {
'dataRW': ( lambda: self.dataRW, lambda val: setattr( self, 'dataRW', val ) ),
'dataWO': ( None, lambda val: setattr( self, 'dataWO', val ) ),
'dataRO': ( lambda: self.dataRO, None )
}
def getFunctions( self ): # TODO: test exteral object functions, also module override
result = {}
return result
def __reduce__( self ):
return ( self.__class__, ( self.dataRW, self.dataWO, self.dataRO ) )
def test_begin():
runner = Runner( parse( '' ) )
assert runner.state == []
assert runner.status[0][0] == 0.0
runner.run()
assert runner.state == 'DONE'
assert runner.status[0][0] == 100.0
assert runner.done
runner.run()
assert runner.state == 'DONE'
assert runner.status[0][0] == 100.0
assert runner.done
runner = Runner( parse( 'begin()end' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
runner = Runner( parse( 'begin()end' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
def test_values():
runner = Runner( parse( 'myvar = 5' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 5 }
runner = Runner( parse( 'myvar = "asdf"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 'asdf' }
runner = Runner( parse( 'myvar = othervar' ) )
assert runner.variable_map == {}
runner.variable_map[ 'othervar' ] = 2.1
runner.run()
assert runner.done
assert runner.variable_map == { 'othervar': 2.1, 'myvar': 2.1 }
runner = Runner( parse( 'thevar' ) )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'asdf = asdf' ) )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'adsf.asdf[1] = 123' ) )
assert runner.variable_map == {}
with pytest.raises( ParamaterError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
def test_array():
runner = Runner( parse( 'myvar = []' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [] }
runner = Runner( parse( 'myvar = [1,2,3]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3 ] }
runner = Runner( parse( 'myvar = [1,(1+1),"asdf"]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, "asdf" ] }
runner = Runner( parse( 'myvar = [1,2,3]\nasdf = myvar[2]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3 ], 'asdf': 3 }
runner = Runner( parse( 'myvar = [1,2,3]\nasdf = myvar[ ( 1 + 1 ) ]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3 ], 'asdf': 3 }
runner = Runner( parse( 'myvar = [1,2,3]\nappend( array=myvar, value=5 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 5 ] }
runner = Runner( parse( 'myvar = [1,2,3]\nthelen = len( array=myvar )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3 ], 'thelen': 3 }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nlittle = slice( array=myvar, start=2, end=4 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 4, 5, 6, 7, 8 ], 'little': [ 3, 4 ] }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nlittle = pop( array=myvar, index=1 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 3, 4, 5, 6, 7, 8 ], 'little': 2 }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nlittle = index( array=myvar, value=4 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 4, 5, 6, 7, 8 ], 'little': 3 }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nmyvar[2] = "hello"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 'hello', 4, 5, 6, 7, 8 ] }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nmyvar[ ( 1 + 3 ) ] = "by"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 4, 'by', 6, 7, 8 ] }
runner = Runner( parse( 'myvar = [1,2,3,4,5,6,7,8]\nmyvar[ ( len( array=myvar ) - 1 ) ] = "end"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 4, 5, 6, 7, 'end' ] }
runner = Runner( parse( 'myvar = [1,2,3,4,5]\nmyvar[ ( len( array=myvar ) - 1 ) ] = "end"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': [ 1, 2, 3, 4, 'end' ] }
def test_map():
runner = Runner( parse( 'myvar = {}' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': {} }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3}' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 3 } }
runner = Runner( parse( 'myvar = { aa=1, bb=(1+1), cc="asdf" }' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': "asdf" } }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3}\nasdf = myvar["cc"]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 3 }, 'asdf': 3 }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3}\nbob="bb"\nasdf = myvar[bob]' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 3 }, 'asdf': 2, 'bob': 'bb' }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3}\nthelen = len( array=myvar )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 3 }, 'thelen': 3 }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3,dd=4,ee=5,ff=6}\nmyvar["cc"] = "hello"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 'hello', 'dd': 4, 'ee': 5, 'ff': 6 } }
runner = Runner( parse( 'myvar = {aa=1,bb=2,cc=3,dd=4,ee=5,ff=6}\nbob = "ee"\nmyvar[ bob ] = "by"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'aa': 1, 'bb': 2, 'cc': 3, 'dd': 4, 'ee': 'by', 'ff': 6 }, 'bob': 'ee' }
runner = Runner( parse( 'myvar = {}\nmyvar[ "hi" ] = "stuff"' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': { 'hi': 'stuff' } }
def test_module_values(): # TODO: add pickling testing
runner = Runner( parse( 'asdf = testing.bigstuff' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'asdf': 'the big stuff' }
runner = Runner( parse( 'testing.littlestuff = 42' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == {}
runner = Runner( parse( 'asdf = testing.otherstuff' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'asdf': None }
runner = Runner( parse( 'asdf = testing.otherstuff\ntesting.otherstuff = "hello"\nqwerty = testing.otherstuff' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'asdf': None, 'qwerty': 'hello' }
runner = Runner( parse( 'asdf = testing.bogus' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'testing.bogus = 100' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'asdf = bogus.bogus' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'bogus.bogus = 100' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
with pytest.raises( NotDefinedError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
def test_object_values():
runner = Runner( parse( '' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
buff = pickle.dumps( runner )
runner2 = pickle.loads( buff )
assert runner2.object_list[0].dataRW == 'mod me'
assert runner2.object_list[0].dataWO == 'write me'
assert runner2.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = test_obj.dataRW' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
runner.run()
assert runner.variable_map == { 'var': 'mod me' }
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = test_obj.dataRO' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
runner.run()
assert runner.variable_map == { 'var': 'read me' }
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = test_obj.dataWO' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
with pytest.raises( ParamaterError ):
runner.run()
assert runner.variable_map == {}
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = "hi there"\ntest_obj.dataRW = var' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
runner.run()
assert runner.variable_map == { 'var': 'hi there' }
assert runner.object_list[0].dataRW == 'hi there'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = "hi there"\ntest_obj.dataRO = var' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
with pytest.raises( ParamaterError ):
runner.run()
assert runner.variable_map == { 'var': 'hi there' }
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = "hi there"\ntest_obj.dataWO = var' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
runner.run()
assert runner.variable_map == { 'var': 'hi there' }
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'hi there'
assert runner.object_list[0].dataRO == 'read me'
runner = Runner( parse( 'var = "iclke me pickle me tickle me too"\ntest_obj.dataRW = var' ) )
runner.registerObject( testExternalObject( 'mod me', 'write me', 'read me' ) )
assert runner.variable_map == {}
assert runner.object_list[0].dataRW == 'mod me'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
buff = pickle.dumps( runner )
runner2 = pickle.loads( buff )
assert runner2.object_list[0].dataRW == 'mod me'
assert runner2.object_list[0].dataWO == 'write me'
assert runner2.object_list[0].dataRO == 'read me'
runner.run()
assert runner.variable_map == { 'var': 'iclke me pickle me tickle me too' }
assert runner.object_list[0].dataRW == 'iclke me pickle me tickle me too'
assert runner.object_list[0].dataWO == 'write me'
assert runner.object_list[0].dataRO == 'read me'
assert runner2.object_list[0].dataRW == 'mod me'
assert runner2.object_list[0].dataWO == 'write me'
assert runner2.object_list[0].dataRO == 'read me'
buff = pickle.dumps( runner )
runner3 = pickle.loads( buff )
assert runner3.object_list[0].dataRW == 'iclke me pickle me tickle me too'
assert runner3.object_list[0].dataWO == 'write me'
assert runner3.object_list[0].dataRO == 'read me'
def test_infix():
runner = Runner( parse( 'myvar = ( 1 + 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 3 }
runner = Runner( parse( 'myvar = ( "1" . "2" )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': '12' }
runner = Runner( parse( 'myvar = ( 1 - 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': -1 }
runner = Runner( parse( 'myvar = ( 1 * 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 2 }
runner = Runner( parse( 'myvar = ( 1.0 / 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 0.5 }
runner = Runner( parse( 'myvar = ( 1 % 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 1 }
runner = Runner( parse( 'myvar = ( 1 ^ 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 1 }
runner = Runner( parse( 'myvar = ( 5 & 4 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 4 }
runner = Runner( parse( 'myvar = ( 5 | 4 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 5 }
runner = Runner( parse( 'myvar = ( 5 . "a" )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': '5a' }
runner = Runner( parse( 'myvar = ( "a" . 2.0 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': 'a2.0' }
runner = Runner( parse( 'myvar = ( ( 1 + 3 ) . ( " d " . True ) )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': '4 d True' }
runner = Runner( parse( 'myvar = ( 5 + "a" )' ) )
assert runner.variable_map == {}
with pytest.raises( ParamaterError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'myvar = ( "a" + 2.0 )' ) )
assert runner.variable_map == {}
with pytest.raises( ParamaterError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'myvar = ( True and False )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': False }
runner = Runner( parse( 'myvar = ( True or False )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': True }
runner = Runner( parse( 'myvar = ( 1 > 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': False }
runner = Runner( parse( 'myvar = ( 1 < 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': True }
runner = Runner( parse( 'myvar = ( 1 == 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': False }
runner = Runner( parse( 'myvar = ( 1 != 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': True }
runner = Runner( parse( 'myvar = ( 1 >= 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': False }
runner = Runner( parse( 'myvar = ( 1 <= 2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': True }
runner = Runner( parse( 'test = 2\nmyvar = ( test + test )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'test': 2, 'myvar': 4 }
runner = Runner( parse( 'myvar = ( 1 == 2 )\nvar2 = not myvar' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'myvar': False, 'var2': True }
runner = Runner( parse( 'var2 = not 0' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'var2': True }
runner = Runner( parse( 'var2 = not 1' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'var2': False }
def test_pause_error():
runner = Runner( parse( 'pause( msg="the message" )' ) )
assert runner.variable_map == {}
with pytest.raises( Pause ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'the message'
assert not runner.done
assert not runner.aborted
assert runner.run() == ''
assert runner.done
assert not runner.aborted
assert runner.run() == 'done'
assert runner.variable_map == {}
runner = Runner( parse( 'error( msg="oops fix it" )' ) )
assert runner.variable_map == {}
with pytest.raises( ExecutionError ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'oops fix it'
assert not runner.done
assert not runner.aborted
assert runner.run() == ''
assert runner.done
assert not runner.aborted
assert runner.run() == 'done'
assert runner.variable_map == {}
runner = Runner( parse( 'fatal_error( msg="the world is over, go home" )' ) )
assert runner.variable_map == {}
with pytest.raises( UnrecoverableError ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'the world is over, go home'
assert not runner.done
assert runner.aborted
assert runner.run() == 'aborted'
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'pause( msg="you should do something" )\nerror( msg="seriously do it" )\nfatal_error( msg="to late now" )' ) )
assert runner.variable_map == {}
with pytest.raises( Pause ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'you should do something'
assert not runner.done
assert not runner.aborted
with pytest.raises( ExecutionError ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'seriously do it'
assert not runner.done
assert not runner.aborted
with pytest.raises( UnrecoverableError ) as execinfo:
runner.run()
assert str( execinfo.value ) == 'to late now'
assert not runner.done
assert runner.aborted
assert runner.run() == 'aborted'
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
def test_builtin_functions():
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = len( array=ary )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': 4 }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\n333\nvar = len( array=ary )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': 4 }
runner = Runner( parse( '333\nary = [ 1,2,3,4 ]\n333\nvar = len( array=ary )\n333' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': 4 }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = slice( array=ary, start=2, end=3 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': [ 3 ] }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = slice( array=ary, start=0, end=2 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': [ 1, 2 ] }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = pop( array=ary, index=0 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 2, 3, 4 ], 'var': 1 }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = pop( array=ary, index=-1 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3 ], 'var': 4 }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = pop( array=ary )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3 ], 'var': 4 }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nappend( array=ary, value=5 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4, 5 ] }
runner = Runner( parse( 'ary = [ 1,2,3,4 ]\nvar = index( array=ary, value=3 )' ) )
assert runner.variable_map == {}
runner.run()
assert runner.done
assert runner.variable_map == { 'ary': [ 1, 2, 3, 4 ], 'var': 2 }
def test_delay():
runner = Runner( parse( 'delay( seconds=5 )' ) )
assert runner.run() == 'Waiting for 4 more seconds'
assert runner.done is False
time.sleep( 1 )
runner.run() == 'Waiting for 3 more seconds'
assert runner.done is False
time.sleep( 5 )
runner.run()
assert runner.done
runner = Runner( parse( 'delay( minutes=5 )' ) )
assert runner.run() == 'Waiting for 299 more seconds'
assert runner.done is False
time.sleep( 1 )
assert runner.run() == 'Waiting for 298 more seconds'
runner = Runner( parse( 'delay( hours=2 )' ) )
assert runner.run() == 'Waiting for 7199 more seconds'
assert runner.done is False
time.sleep( 2 )
assert runner.run() == 'Waiting for 7197 more seconds'
def test_object_functions(): # TODO: this and pickleing too
pass
def test_module_functions():
runner = Runner( parse( 'var = testing.constant()' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 42 }
runner = Runner( parse( 'var = testing.multiply( value=4321 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 43210 }
runner = Runner( parse( 'var = testing.multiply( value=4321 )\nvar2 = testing.multiply( value=12 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 43210, 'var2': 120 }
runner = Runner( parse( 'var = ( testing.multiply( value=2 ) + testing.multiply( value=3 ) )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 50 }
runner = Runner( parse( 'var = testing.multiply( value=testing.multiply( value=11 ) )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 1100 }
runner = Runner( parse( '321\nvar = testing.multiply( value=testing.multiply( value=11 ) )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.variable_map == {}
assert runner.status[0][0] == 0.0
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
assert runner.variable_map == { 'var': 1100 }
runner = Runner( parse( 'testing.count( stop_at=2, count_by=1 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status[0][0] == 0.0
assert runner.run() == 'at 1 of 2'
assert runner.status[0][0] == 0.0
assert not runner.done
assert runner.run() == 'at 2 of 2'
assert runner.status[0][0] == 0.0
assert not runner.done
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
runner = Runner( parse( 'testing.count( stop_at="asd", count_by=1 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status[0][0] == 0.0
with pytest.raises( ParamaterError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.run() == 'aborted'
assert runner.status[0][0] == 100.0
runner = Runner( parse( 'testing.count( stop_at=2, count_by=1 )\ntesting.count( stop_at=1, count_by=1 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status[0][0] == 0.0
assert runner.run() == 'at 1 of 2'
assert runner.status[0][0] == 0.0
assert not runner.done
assert runner.run() == 'at 2 of 2'
assert not runner.done
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'count', 'dispatched': False } ) ]
assert runner.run() == 'at 1 of 1'
assert not runner.done
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'count', 'dispatched': False } ) ]
assert runner.run() == ''
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.run() == 'done'
def test_external_remote_functions():
runner = Runner( parse( 'testing.remote()' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.line == 0
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Script not Running', None )
assert runner.run() == 'Not Initilized'
assert not runner.done
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Not Expecting Anything', None )
assert runner.toSubcontractor( [] ) is None
assert runner.toSubcontractor( [ 'sdf', 'were' ] ) is None
assert runner.toSubcontractor( [ 'rfrf', 'testing', 'sdf' ] ) == { 'cookie': runner.contractor_cookie, 'module': 'testing', 'function': 'remote_func', 'paramaters': 'the count "1"' }
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': True } ) ]
assert runner.line == 1
assert runner.run() == 'Not Initilized'
assert not runner.done
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': True } ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.fromSubcontractor( 'Bad Cookie', True ) == ( 'Bad Cookie', None )
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Accepted', 'Current State "True"' )
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Not Expecting Anything', None )
assert runner.toSubcontractor( [ 'testing' ] ) == { 'cookie': runner.contractor_cookie, 'module': 'testing', 'function': 'remote_func', 'paramaters': 'the count "2"' }
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': True } ) ]
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Accepted', 'Current State "True"' )
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.run() == ''
assert runner.done
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.fromSubcontractor( runner.contractor_cookie, True ) == ( 'Script not Running', None )
assert runner.run() == 'done'
assert runner.line is None
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
runner = Runner( parse( 'var1 = testing.remote()' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.variable_map == {}
assert runner.run() == 'Not Initilized'
assert not runner.done
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.toSubcontractor( [ 'testing' ] ) == { 'cookie': runner.contractor_cookie, 'module': 'testing', 'function': 'remote_func', 'paramaters': 'the count "1"' }
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': True } ) ]
assert runner.variable_map == {}
assert runner.fromSubcontractor( runner.contractor_cookie, 'the sky is falling' ) == ( 'Accepted', 'Current State "the sky is falling"' )
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.variable_map == {}
assert runner.run() == ''
assert runner.done
assert runner.run() == 'done'
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.variable_map == { 'var1': 'the sky is falling' }
runner = Runner( parse( 'testing.remote()' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.variable_map == {}
assert runner.run() == 'Not Initilized'
assert not runner.done
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': 'testing', 'name': 'remote', 'dispatched': False } ) ]
assert runner.toSubcontractor( [ 'testing' ] ) == { 'cookie': runner.contractor_cookie, 'module': 'testing', 'function': 'remote_func', 'paramaters': 'the count "1"' }
assert runner.variable_map == {}
assert runner.fromSubcontractor( runner.contractor_cookie, 'Bad' ) == ( 'Accepted', 'Current State "Bad"' )
assert runner.variable_map == {}
with pytest.raises( UnrecoverableError ):
runner.run()
assert not runner.done
assert runner.aborted
assert runner.run() == 'aborted'
assert runner.toSubcontractor( [ 'testing' ] ) is None
assert runner.variable_map == {}
# TODO: test function rollback
def test_serilizer():
runner = Runner( parse( 'testing.count( stop_at=2, count_by=1 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 0.0
assert not runner.done
runner.run()
assert runner.status[0][0] == 0.0
assert not runner.done
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
runner = Runner( parse( 'testing.count( stop_at=2, count_by=1 )' ) )
runner.registerModule( 'contractor.tscript.runner_plugins_test' )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 0.0
assert not runner.done
buff = pickle.dumps( runner )
# origional sould play out as normal
runner.run()
assert runner.status[0][0] == 0.0
assert not runner.done
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
# copy should do the same thing
runner2 = pickle.loads( buff )
runner2.run()
assert runner2.status[0][0] == 0.0
assert not runner2.done
runner2.run()
assert runner2.status[0][0] == 100.0
assert runner2.done
def test_while():
# first we will test the ttl
runner = Runner( parse( 'while True do 1' ) )
assert runner.status[0][0] == 0.0
with pytest.raises( Timeout ):
runner.run( 0 )
assert runner.status[0][0] == 0.0
assert not runner.done
# ok, now we can have some fun
runner = Runner( parse( 'while True do 1' ) )
assert runner.status[0][0] == 0.0
with pytest.raises( Timeout ):
runner.run( 10 )
assert runner.status[0][0] == 0.0
assert not runner.done
runner = Runner( parse( 'cnt = 1\nwhile ( cnt >= 1 ) do cnt = ( cnt + 1 )' ) )
assert runner.status[0][0] == 0.0
for i in range( 0, 100 ): # just do this infinite loop for a long time, make sure it dosen't have other problems
with pytest.raises( Timeout ):
runner.run( i )
runner.status # make sure nothing bad happens while computing status
assert runner.status[0][0] == 50.0
assert not runner.done
runner = Runner( parse( 'cnt = 1\nwhile True do cnt = ( cnt + 1 )' ) )
assert runner.status[0][0] == 0.0
with pytest.raises( Timeout ):
runner.run( 20 )
assert runner.status[0][0] == 50.0
assert not runner.done
assert runner.variable_map == { 'cnt': 3 }
with pytest.raises( Timeout ):
runner.run( 20 )
assert runner.status[0][0] == 50.0
assert not runner.done
assert runner.variable_map == { 'cnt': 6 }
runner = Runner( parse( 'while False do asdf = 5' ) )
assert runner.status[0][0] == 0.0
runner.run( 500 )
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == {}
runner = Runner( parse( 'cnt = 1\nwhile ( cnt < 10 ) do cnt = ( cnt + 1 )' ) )
assert runner.status[0][0] == 0.0
runner.run( 500 )
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'cnt': 10 }
def test_ifelse():
runner = Runner( parse( 'if False then var = 1' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == {}
runner = Runner( parse( 'if True then var = 1' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'var': 1 }
runner = Runner( parse( 'if False then var = 1 else var = 2' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'var': 2 }
runner = Runner( parse( 'asd = 1\nif ( asd == 1 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 3 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 1, 'var': "a" }
runner = Runner( parse( 'asd = 2\nif ( asd == 1 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 3 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 2, 'var': "b" }
runner = Runner( parse( 'asd = 9\nif ( asd == 1 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 3 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 9, 'var': "d" }
runner = Runner( parse( 'asd = 1\nif ( asd == 1 ) then var = "a" elif ( asd == 1 ) then var = "b" elif ( asd == 1 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 1, 'var': "a" }
runner = Runner( parse( 'asd = 1\nif ( asd == 2 ) then var = "a" elif ( asd == 1 ) then var = "b" elif ( asd == 1 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 1, 'var': "b" }
runner = Runner( parse( 'asd = 1\nif ( asd == 2 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 1 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 1, 'var': "c" }
runner = Runner( parse( 'asd = 1\nif ( asd == 2 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 2 ) then var = "c" else var = "d"' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'asd': 1, 'var': "d" }
runner = Runner( parse( 'asd = 1\nif ( asd == 2 ) then var = "a" elif ( asd == 2 ) then var = "b" elif ( asd == 2 ) then var = "c" else var = "d"\nwhile True do 10' ) )
assert runner.status[0][0] == 0.0
for i in range( 0, 10 ): # just do this infinite loop for a long time, make sure it dosen't have other problems
with pytest.raises( Timeout ):
runner.run( i )
runner.status # make sure nothing bad happens while computing status
assert runner.status[0][0] == 66.66666666666667
assert not runner.done
def test_jumppoint():
runner = Runner( parse( 'abc = 1\n:jump_a\ndce = 2' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'abc': 1, 'dce': 2 }
runner = Runner( parse( 'goto jump_a\nabc = 1\n:jump_a\ndce = 2' ) )
assert runner.status[0][0] == 0.0
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'dce': 2 }
runner = Runner( parse( 'goto jump_b\nabc = 1\n:jump_a\ndce = 2' ) )
assert runner.status[0][0] == 0.0
with pytest.raises( NotDefinedError ):
runner.run()
assert runner.status[0][0] == 100.0
assert not runner.done
assert runner.aborted
assert runner.variable_map == {}
runner = Runner( parse( 'goto jump_b\nabc = 1\n:jump_a\ndce = 2' ) )
assert runner.status[0][0] == 0.0
runner.goto( 'jump_a' )
with pytest.raises( Timeout ):
runner.run( 2 )
assert runner.line == 3
runner.run()
assert runner.status[0][0] == 100.0
assert runner.done
assert runner.variable_map == { 'dce': 2 }
# test jumping over a blocking function
# test jumping over one function to another, making sure that the function returns are not crossed, and the jumped over function dosen't get it's return value accepted
# test the contractor_cookie is getting rolled over correctly
# try something with a better progress
# test serilize and unserilize, especially with all the block options
# test getting status, going to need a function that can paus executeion both for the value and also for the index
def test_status():
runner = Runner( parse( 'begin()\n42\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'pause( msg="" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( '42\npause( msg="" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'pause( msg="1" )\npause( msg="2" )\npause( msg="3" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 33.333333333333336, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 66.66666666666667, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'begin()\npause( msg="" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'begin()\n42\npause( msg="" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( '12\nbegin()\n42\npause( msg="" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 75.0, 'Scope', {} ), ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( '12\nbegin()\n42\npause( msg="" )\nend\n34' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'while True do pause( msg="" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'expression' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'expression' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( 'while True do begin()\n5\npause( msg="" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'While', { 'doing': 'expression' } ), ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'While', { 'doing': 'expression' } ), ( 50.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( 'while True do begin()\n5\npause( msg="" )\n6\npause( msg="" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 25.0, 'Scope', {} ), ( 25.0, 'While', { 'doing': 'expression' } ), ( 25.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 75.0, 'Scope', {} ), ( 75.0, 'While', { 'doing': 'expression' } ), ( 75.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( 'while pause( msg="" ) do 5' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'while not pause( msg="" ) do 5' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( '( not pause( msg="cond" ) | True )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( '( True | not pause( msg="cond" ) )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'while not pause( msg="cond" ) do begin()\npause( msg="exp" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'expression' } ), ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'expression' } ), ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( 'while not pause( msg="cond" ) do begin()\n12\npause( msg="exp" )\n34\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 33.333333333333336, 'Scope', {} ), ( 33.333333333333336, 'While', { 'doing': 'expression' } ), ( 33.333333333333336, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'While', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 33.333333333333336, 'Scope', {} ), ( 33.333333333333336, 'While', { 'doing': 'expression' } ), ( 33.333333333333336, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner = Runner( parse( 'if True then pause( msg="exp" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'IfElse', { 'doing': 'expression' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if pause( msg="cond" ) then 5' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'IfElse', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if not pause( msg="cond" ) then 5' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'IfElse', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if False then 23 else pause( msg="cond" )' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'IfElse', { 'doing': 'expression' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if not pause( msg="cond" ) then begin()\npause( msg="exp" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'IfElse', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 0.0, 'Scope', {} ), ( 0.0, 'IfElse', { 'doing': 'expression' } ), ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if False then 1 elif not pause( msg="cond" ) then begin()\npause( msg="exp" )\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'IfElse', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'IfElse', { 'doing': 'expression' } ), ( 0.0, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
runner = Runner( parse( 'if False then 1 elif not pause( msg="cond" ) then begin()\n5\npause( msg="exp" )\n6\nend' ) )
assert runner.status == [ ( 0.0, 'Scope', None ) ]
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 50.0, 'Scope', {} ), ( 50.0, 'IfElse', { 'doing': 'condition' } ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
with pytest.raises( Pause ):
runner.run()
assert runner.status == [ ( 66.66666666666667, 'Scope', {} ), ( 66.66666666666667, 'IfElse', { 'doing': 'expression' } ), ( 33.333333333333336, 'Scope', {} ), ( 0.0, 'Function', { 'module': None, 'name': 'pause' } ) ]
assert not runner.done
runner.run()
assert runner.status == [ ( 100.0, 'Scope', None ) ]
assert runner.done
def test_exists():
runner = Runner( parse( 'aa = 1' ) )
runner.run()
assert runner.variable_map == { 'aa': 1 }
runner = Runner( parse( 'aa = bb' ) )
with pytest.raises( NotDefinedError ):
runner.run()
runner = Runner( parse( 'aa = exists( bb )' ) )
runner.run()
assert runner.variable_map == { 'aa': False }
runner = Runner( parse( 'bb = 1\naa = exists( bb )' ) )
runner.run()
assert runner.variable_map == { 'aa': True, 'bb': 1 }
runner = Runner( parse( 'bb = [ 1, 2 ]\naa = exists( bb )' ) )
runner.run()
assert runner.variable_map == { 'aa': True, 'bb': [ 1, 2 ] }
runner = Runner( parse( 'bb = [ 1, 2 ]\naa = exists( bb[ 3 ] )' ) )
runner.run()
assert runner.variable_map == { 'aa': False, 'bb': [ 1, 2 ] }
| [
1,
1053,
11451,
1688,
13,
5215,
5839,
280,
13,
5215,
931,
13,
13,
3166,
8078,
272,
29889,
1372,
924,
29889,
16680,
1053,
6088,
13,
3166,
8078,
272,
29889,
1372,
924,
29889,
27492,
1053,
7525,
1089,
29892,
11080,
918,
2392,
29892,
853,
3757,
957,
519,
2392,
29892,
12662,
1008,
2392,
29892,
2216,
3206,
1312,
2392,
29892,
5974,
449,
29892,
349,
1071,
13,
13,
29937,
14402,
29901,
1243,
278,
12827,
6483,
8552,
29892,
19282,
29901,
263,
353,
24335,
289,
353,
263,
29871,
1207,
1854,
3620,
304,
289,
526,
451,
25312,
297,
263,
13,
13,
13,
1990,
1243,
25865,
2061,
29898,
1203,
29871,
1125,
13,
29871,
323,
7187,
24290,
29918,
5813,
353,
525,
1688,
29918,
5415,
29915,
13,
13,
29871,
822,
4770,
2344,
12035,
1583,
29892,
848,
29934,
29956,
29892,
848,
29956,
29949,
29892,
848,
1672,
29871,
1125,
13,
1678,
2428,
2141,
1649,
2344,
1649,
580,
13,
1678,
1583,
29889,
1272,
29934,
29956,
353,
848,
29934,
29956,
13,
1678,
1583,
29889,
1272,
29956,
29949,
353,
848,
29956,
29949,
13,
1678,
1583,
29889,
1272,
1672,
353,
848,
1672,
13,
13,
29871,
822,
679,
9065,
29898,
1583,
29871,
1125,
13,
1678,
736,
426,
13,
632,
525,
1272,
29934,
29956,
2396,
313,
14013,
29901,
1583,
29889,
1272,
29934,
29956,
29892,
14013,
659,
29901,
731,
5552,
29898,
1583,
29892,
525,
1272,
29934,
29956,
742,
659,
1723,
10353,
13,
632,
525,
1272,
29956,
29949,
2396,
313,
6213,
29892,
14013,
659,
29901,
731,
5552,
29898,
1583,
29892,
525,
1272,
29956,
29949,
742,
659,
1723,
10353,
13,
632,
525,
1272,
1672,
2396,
313,
14013,
29901,
1583,
29889,
1272,
1672,
29892,
6213,
1723,
13,
9651,
500,
13,
13,
29871,
822,
679,
6678,
29879,
29898,
1583,
29871,
1125,
29871,
396,
14402,
29901,
1243,
429,
357,
284,
1203,
3168,
29892,
884,
3883,
5712,
13,
1678,
1121,
353,
6571,
13,
13,
1678,
736,
1121,
13,
13,
29871,
822,
4770,
17469,
12035,
1583,
29871,
1125,
13,
1678,
736,
313,
1583,
17255,
1990,
1649,
29892,
313,
1583,
29889,
1272,
29934,
29956,
29892,
1583,
29889,
1272,
29956,
29949,
29892,
1583,
29889,
1272,
1672,
1723,
1723,
13,
13,
13,
1753,
1243,
29918,
463,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
6629,
1723,
1723,
13,
29871,
4974,
28877,
29889,
3859,
1275,
5159,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
3859,
1275,
525,
29928,
12413,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
3859,
1275,
525,
29928,
12413,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
463,
580,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
463,
580,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
13,
13,
1753,
1243,
29918,
5975,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29945,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
376,
294,
2176,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
525,
294,
2176,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
916,
1707,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
11918,
29918,
1958,
29961,
525,
1228,
1707,
29915,
4514,
353,
29871,
29906,
29889,
29896,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1228,
1707,
2396,
29871,
29906,
29889,
29896,
29892,
525,
1357,
1707,
2396,
29871,
29906,
29889,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1552,
1707,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
408,
2176,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
328,
4668,
29889,
294,
2176,
29961,
29896,
29962,
353,
29871,
29896,
29906,
29941,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
13,
1753,
1243,
29918,
2378,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
5159,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
5159,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29962,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
22657,
29896,
29974,
29896,
511,
29908,
294,
2176,
3108,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
376,
294,
2176,
29908,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
10725,
22911,
2176,
353,
590,
1707,
29961,
29906,
29962,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
21251,
525,
294,
2176,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
10725,
22911,
2176,
353,
590,
1707,
29961,
313,
29871,
29896,
718,
29871,
29896,
1723,
4514,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
21251,
525,
294,
2176,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
10725,
29876,
4397,
29898,
1409,
29922,
1357,
1707,
29892,
995,
29922,
29945,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29945,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
10725,
20800,
4498,
353,
7431,
29898,
1409,
29922,
1357,
1707,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
21251,
525,
386,
4498,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
12938,
1992,
353,
22780,
29898,
1409,
29922,
1357,
1707,
29892,
1369,
29922,
29906,
29892,
1095,
29922,
29946,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
21251,
525,
29880,
1992,
2396,
518,
29871,
29941,
29892,
29871,
29946,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
12938,
1992,
353,
1835,
29898,
1409,
29922,
1357,
1707,
29892,
2380,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
21251,
525,
29880,
1992,
2396,
29871,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
12938,
1992,
353,
2380,
29898,
1409,
29922,
1357,
1707,
29892,
995,
29922,
29946,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
21251,
525,
29880,
1992,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
29876,
1357,
1707,
29961,
29906,
29962,
353,
376,
12199,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
525,
12199,
742,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
29876,
1357,
1707,
29961,
313,
29871,
29896,
718,
29871,
29941,
1723,
4514,
353,
376,
1609,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
525,
1609,
742,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
10725,
29876,
1357,
1707,
29961,
313,
7431,
29898,
1409,
29922,
1357,
1707,
1723,
448,
29871,
29896,
1723,
4514,
353,
376,
355,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
525,
355,
29915,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
10725,
29876,
1357,
1707,
29961,
313,
7431,
29898,
1409,
29922,
1357,
1707,
1723,
448,
29871,
29896,
1723,
4514,
353,
376,
355,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
525,
355,
29915,
4514,
500,
13,
13,
13,
1753,
1243,
29918,
1958,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
6571,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
6571,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
10162,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
29871,
29941,
500,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
29099,
29922,
29896,
29892,
289,
29890,
7607,
29896,
29974,
29896,
511,
21759,
543,
294,
2176,
29908,
500,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
376,
294,
2176,
29908,
500,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
1012,
22911,
2176,
353,
590,
1707,
3366,
617,
3108,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
29871,
29941,
2981,
525,
294,
2176,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
1012,
9877,
711,
543,
1327,
26732,
22911,
2176,
353,
590,
1707,
29961,
29890,
711,
29962,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
29871,
29941,
2981,
525,
294,
2176,
2396,
29871,
29906,
29892,
525,
29890,
711,
2396,
525,
1327,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
1012,
20800,
4498,
353,
7431,
29898,
1409,
29922,
1357,
1707,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
29871,
29941,
2981,
525,
386,
4498,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
29892,
1289,
29922,
29946,
29892,
3905,
29922,
29945,
29892,
600,
29922,
29953,
1012,
29876,
1357,
1707,
3366,
617,
3108,
353,
376,
12199,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
525,
12199,
742,
525,
1289,
2396,
29871,
29946,
29892,
525,
3905,
2396,
29871,
29945,
29892,
525,
600,
2396,
29871,
29953,
500,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
7340,
29922,
29896,
29892,
1327,
29922,
29906,
29892,
617,
29922,
29941,
29892,
1289,
29922,
29946,
29892,
3905,
29922,
29945,
29892,
600,
29922,
29953,
1012,
9877,
711,
353,
376,
3905,
26732,
29876,
1357,
1707,
29961,
289,
711,
4514,
353,
376,
1609,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
7340,
2396,
29871,
29896,
29892,
525,
1327,
2396,
29871,
29906,
29892,
525,
617,
2396,
29871,
29941,
29892,
525,
1289,
2396,
29871,
29946,
29892,
525,
3905,
2396,
525,
1609,
742,
525,
600,
2396,
29871,
29953,
2981,
525,
29890,
711,
2396,
525,
3905,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
426,
1012,
29876,
1357,
1707,
29961,
376,
2918,
29908,
4514,
353,
376,
303,
3096,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
426,
525,
2918,
2396,
525,
303,
3096,
29915,
500,
500,
13,
13,
13,
1753,
1243,
29918,
5453,
29918,
5975,
7295,
29871,
396,
14402,
29901,
788,
5839,
1847,
6724,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
6724,
29889,
3752,
303,
3096,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
2176,
2396,
525,
1552,
4802,
6433,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
29880,
986,
29880,
342,
3096,
353,
29871,
29946,
29906,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
6724,
29889,
1228,
303,
3096,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
2176,
2396,
6213,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
6724,
29889,
1228,
303,
3096,
29905,
593,
342,
292,
29889,
1228,
303,
3096,
353,
376,
12199,
26732,
29876,
29939,
556,
1017,
353,
6724,
29889,
1228,
303,
3096,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
2176,
2396,
6213,
29892,
525,
29939,
556,
1017,
2396,
525,
12199,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
6724,
29889,
29890,
468,
375,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
29890,
468,
375,
353,
29871,
29896,
29900,
29900,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
2176,
353,
26652,
375,
29889,
29890,
468,
375,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29890,
468,
375,
29889,
29890,
468,
375,
353,
29871,
29896,
29900,
29900,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
13,
1753,
1243,
29918,
3318,
29918,
5975,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
6629,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
29871,
20487,
353,
5839,
280,
29889,
29881,
17204,
29898,
28877,
1723,
13,
13,
29871,
28877,
29906,
353,
5839,
280,
29889,
18132,
29898,
20487,
1723,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
1243,
29918,
5415,
29889,
1272,
29934,
29956,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
1545,
592,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
1243,
29918,
5415,
29889,
1272,
1672,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
949,
592,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
1243,
29918,
5415,
29889,
1272,
29956,
29949,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
376,
2918,
727,
26732,
593,
342,
29918,
5415,
29889,
1272,
29934,
29956,
353,
722,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
2918,
727,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
2918,
727,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
376,
2918,
727,
26732,
593,
342,
29918,
5415,
29889,
1272,
1672,
353,
722,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
2918,
727,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
376,
2918,
727,
26732,
593,
342,
29918,
5415,
29889,
1272,
29956,
29949,
353,
722,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
2918,
727,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
2918,
727,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
376,
293,
29880,
446,
592,
5839,
280,
592,
16892,
280,
592,
2086,
26732,
593,
342,
29918,
5415,
29889,
1272,
29934,
29956,
353,
722,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
2061,
29898,
1243,
25865,
2061,
29898,
525,
1545,
592,
742,
525,
3539,
592,
742,
525,
949,
592,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
29871,
20487,
353,
5839,
280,
29889,
29881,
17204,
29898,
28877,
1723,
13,
29871,
28877,
29906,
353,
5839,
280,
29889,
18132,
29898,
20487,
1723,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
525,
293,
29880,
446,
592,
5839,
280,
592,
16892,
280,
592,
2086,
29915,
500,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
293,
29880,
446,
592,
5839,
280,
592,
16892,
280,
592,
2086,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
1545,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29906,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
29871,
20487,
353,
5839,
280,
29889,
29881,
17204,
29898,
28877,
1723,
13,
29871,
28877,
29941,
353,
5839,
280,
29889,
18132,
29898,
20487,
1723,
13,
29871,
4974,
28877,
29941,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29934,
29956,
1275,
525,
293,
29880,
446,
592,
5839,
280,
592,
16892,
280,
592,
2086,
29915,
13,
29871,
4974,
28877,
29941,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
29956,
29949,
1275,
525,
3539,
592,
29915,
13,
29871,
4974,
28877,
29941,
29889,
3318,
29918,
1761,
29961,
29900,
1822,
1272,
1672,
1275,
525,
949,
592,
29915,
13,
13,
13,
1753,
1243,
29918,
262,
5878,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
718,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29941,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
376,
29896,
29908,
869,
376,
29906,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
525,
29896,
29906,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
448,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
448,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
334,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
29889,
29900,
847,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29900,
29889,
29945,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
1273,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
6228,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29945,
669,
29871,
29946,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29945,
891,
29871,
29946,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
29871,
29945,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29945,
869,
376,
29874,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
525,
29945,
29874,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
376,
29874,
29908,
869,
29871,
29906,
29889,
29900,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
525,
29874,
29906,
29889,
29900,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
313,
29871,
29896,
718,
29871,
29941,
1723,
869,
313,
376,
270,
376,
869,
5852,
1723,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
525,
29946,
270,
5852,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29945,
718,
376,
29874,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
376,
29874,
29908,
718,
29871,
29906,
29889,
29900,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
5852,
322,
7700,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
7700,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
5852,
470,
7700,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
1405,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
7700,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
529,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
1275,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
7700,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
2804,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
6736,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
7700,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
5277,
29871,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1688,
353,
29871,
29906,
29905,
29876,
1357,
1707,
353,
313,
1243,
718,
1243,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1688,
2396,
29871,
29906,
29892,
525,
1357,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1357,
1707,
353,
313,
29871,
29896,
1275,
29871,
29906,
1723,
29905,
29876,
1707,
29906,
353,
451,
590,
1707,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1357,
1707,
2396,
7700,
29892,
525,
1707,
29906,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
29906,
353,
451,
29871,
29900,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
29906,
2396,
5852,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
29906,
353,
451,
29871,
29896,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
29906,
2396,
7700,
500,
13,
13,
13,
1753,
1243,
29918,
29886,
1071,
29918,
2704,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29886,
1071,
29898,
10191,
543,
1552,
2643,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
1552,
2643,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
2704,
29898,
10191,
543,
29877,
3554,
2329,
372,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
11080,
918,
2392,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
29877,
3554,
2329,
372,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29888,
2075,
29918,
2704,
29898,
10191,
543,
1552,
3186,
338,
975,
29892,
748,
3271,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
853,
3757,
957,
519,
2392,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
1552,
3186,
338,
975,
29892,
748,
3271,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
370,
18054,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29886,
1071,
29898,
10191,
543,
6293,
881,
437,
1554,
29908,
1723,
29905,
1089,
729,
29898,
10191,
543,
643,
17365,
437,
372,
29908,
1723,
29905,
29876,
29888,
2075,
29918,
2704,
29898,
10191,
543,
517,
5683,
1286,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
6293,
881,
437,
1554,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
11080,
918,
2392,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
643,
17365,
437,
372,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
451,
28877,
29889,
370,
18054,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
853,
3757,
957,
519,
2392,
1723,
408,
2279,
3888,
29901,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
851,
29898,
2279,
3888,
29889,
1767,
1723,
1275,
525,
517,
5683,
1286,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
370,
18054,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
13,
1753,
1243,
29918,
16145,
262,
29918,
12171,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
7431,
29898,
1409,
29922,
653,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
29941,
29941,
29941,
29905,
29876,
1707,
353,
7431,
29898,
1409,
29922,
653,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29941,
29941,
29941,
29905,
29876,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
29941,
29941,
29941,
29905,
29876,
1707,
353,
7431,
29898,
1409,
29922,
653,
1723,
29905,
29876,
29941,
29941,
29941,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
22780,
29898,
1409,
29922,
653,
29892,
1369,
29922,
29906,
29892,
1095,
29922,
29941,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
518,
29871,
29941,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
22780,
29898,
1409,
29922,
653,
29892,
1369,
29922,
29900,
29892,
1095,
29922,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
518,
29871,
29896,
29892,
29871,
29906,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
1835,
29898,
1409,
29922,
653,
29892,
2380,
29922,
29900,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
1835,
29898,
1409,
29922,
653,
29892,
2380,
10457,
29896,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
21251,
525,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
1835,
29898,
1409,
29922,
653,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
21251,
525,
1707,
2396,
29871,
29946,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
4397,
29898,
1409,
29922,
653,
29892,
995,
29922,
29945,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
653,
353,
518,
29871,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
4514,
29905,
29876,
1707,
353,
2380,
29898,
1409,
29922,
653,
29892,
995,
29922,
29941,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
653,
2396,
518,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
21251,
525,
1707,
2396,
29871,
29906,
500,
13,
13,
13,
1753,
1243,
29918,
18829,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
18829,
29898,
6923,
29922,
29945,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29946,
901,
6923,
29915,
13,
29871,
4974,
28877,
29889,
15091,
338,
7700,
13,
29871,
931,
29889,
17059,
29898,
29871,
29896,
1723,
13,
29871,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29941,
901,
6923,
29915,
13,
29871,
4974,
28877,
29889,
15091,
338,
7700,
13,
29871,
931,
29889,
17059,
29898,
29871,
29945,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
18829,
29898,
6233,
29922,
29945,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29906,
29929,
29929,
901,
6923,
29915,
13,
29871,
4974,
28877,
29889,
15091,
338,
7700,
13,
29871,
931,
29889,
17059,
29898,
29871,
29896,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29906,
29929,
29947,
901,
6923,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
18829,
29898,
6199,
29922,
29906,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29955,
29896,
29929,
29929,
901,
6923,
29915,
13,
29871,
4974,
28877,
29889,
15091,
338,
7700,
13,
29871,
931,
29889,
17059,
29898,
29871,
29906,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15716,
292,
363,
29871,
29955,
29896,
29929,
29955,
901,
6923,
29915,
13,
13,
13,
1753,
1243,
29918,
3318,
29918,
12171,
7295,
29871,
396,
14402,
29901,
445,
322,
5839,
280,
292,
2086,
13,
29871,
1209,
13,
13,
13,
1753,
1243,
29918,
5453,
29918,
12171,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
6724,
29889,
23362,
580,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29946,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
6724,
29889,
18056,
368,
29898,
995,
29922,
29946,
29941,
29906,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29946,
29941,
29906,
29896,
29900,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
6724,
29889,
18056,
368,
29898,
995,
29922,
29946,
29941,
29906,
29896,
1723,
29905,
29876,
1707,
29906,
353,
6724,
29889,
18056,
368,
29898,
995,
29922,
29896,
29906,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29946,
29941,
29906,
29896,
29900,
29892,
525,
1707,
29906,
2396,
29871,
29896,
29906,
29900,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
313,
6724,
29889,
18056,
368,
29898,
995,
29922,
29906,
1723,
718,
6724,
29889,
18056,
368,
29898,
995,
29922,
29941,
1723,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29945,
29900,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
353,
6724,
29889,
18056,
368,
29898,
995,
29922,
13424,
29889,
18056,
368,
29898,
995,
29922,
29896,
29896,
1723,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29896,
29896,
29900,
29900,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29941,
29906,
29896,
29905,
29876,
1707,
353,
6724,
29889,
18056,
368,
29898,
995,
29922,
13424,
29889,
18056,
368,
29898,
995,
29922,
29896,
29896,
1723,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29896,
29896,
29900,
29900,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
2798,
29898,
5040,
29918,
271,
29922,
29906,
29892,
2302,
29918,
1609,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
271,
29871,
29896,
310,
29871,
29906,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
271,
29871,
29906,
310,
29871,
29906,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
2798,
29898,
5040,
29918,
271,
543,
294,
29881,
613,
2302,
29918,
1609,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
12662,
1008,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
370,
18054,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
2798,
29898,
5040,
29918,
271,
29922,
29906,
29892,
2302,
29918,
1609,
29922,
29896,
1723,
29905,
593,
342,
292,
29889,
2798,
29898,
5040,
29918,
271,
29922,
29896,
29892,
2302,
29918,
1609,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
271,
29871,
29896,
310,
29871,
29906,
29915,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
271,
29871,
29906,
310,
29871,
29906,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
2798,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
271,
29871,
29896,
310,
29871,
29896,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
2798,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
13,
13,
1753,
1243,
29918,
23176,
29918,
16674,
29918,
12171,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
16674,
580,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
1220,
1275,
29871,
29900,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
4081,
451,
19509,
742,
6213,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
3664,
10886,
309,
1891,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
3664,
1222,
1103,
292,
530,
1541,
292,
742,
6213,
1723,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
5159,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
29879,
2176,
742,
525,
29893,
406,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
29878,
1341,
29888,
742,
525,
13424,
742,
525,
29879,
2176,
29915,
4514,
1723,
1275,
426,
525,
21509,
2396,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
5453,
2396,
525,
13424,
742,
525,
2220,
2396,
525,
16674,
29918,
9891,
742,
525,
3207,
10412,
2396,
525,
1552,
2302,
376,
29896,
29908,
29915,
500,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
5852,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
1220,
1275,
29871,
29896,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
3664,
10886,
309,
1891,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
5852,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
525,
22050,
17278,
347,
742,
5852,
1723,
1275,
313,
525,
22050,
17278,
347,
742,
6213,
1723,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
23965,
287,
742,
525,
7583,
4306,
376,
5574,
29908,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
3664,
1222,
1103,
292,
530,
1541,
292,
742,
6213,
1723,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
1275,
426,
525,
21509,
2396,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
5453,
2396,
525,
13424,
742,
525,
2220,
2396,
525,
16674,
29918,
9891,
742,
525,
3207,
10412,
2396,
525,
1552,
2302,
376,
29906,
29908,
29915,
500,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
5852,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
23965,
287,
742,
525,
7583,
4306,
376,
5574,
29908,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
5852,
1723,
1275,
313,
525,
4081,
451,
19509,
742,
6213,
1723,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
1220,
338,
6213,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1707,
29896,
353,
6724,
29889,
16674,
580,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
3664,
10886,
309,
1891,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
1275,
426,
525,
21509,
2396,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
5453,
2396,
525,
13424,
742,
525,
2220,
2396,
525,
16674,
29918,
9891,
742,
525,
3207,
10412,
2396,
525,
1552,
2302,
376,
29896,
29908,
29915,
500,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
5852,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
1552,
14744,
338,
20327,
29915,
1723,
1275,
313,
525,
23965,
287,
742,
525,
7583,
4306,
376,
1552,
14744,
338,
20327,
29908,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
6629,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
15091,
29915,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
29896,
2396,
525,
1552,
14744,
338,
20327,
29915,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
16674,
580,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
3664,
10886,
309,
1891,
29915,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
525,
13424,
742,
525,
978,
2396,
525,
16674,
742,
525,
13369,
287,
2396,
7700,
500,
1723,
4514,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
1275,
426,
525,
21509,
2396,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
5453,
2396,
525,
13424,
742,
525,
2220,
2396,
525,
16674,
29918,
9891,
742,
525,
3207,
10412,
2396,
525,
1552,
2302,
376,
29896,
29908,
29915,
500,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
4974,
28877,
29889,
3166,
4035,
1285,
28891,
29898,
28877,
29889,
1285,
28891,
29918,
21509,
29892,
525,
22050,
29915,
1723,
1275,
313,
525,
23965,
287,
742,
525,
7583,
4306,
376,
22050,
29908,
29915,
1723,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
853,
3757,
957,
519,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
3389,
580,
1275,
525,
370,
18054,
29915,
13,
29871,
4974,
28877,
29889,
517,
4035,
1285,
28891,
29898,
518,
525,
13424,
29915,
4514,
1723,
338,
6213,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
29937,
14402,
29901,
1243,
740,
9679,
1627,
13,
13,
13,
1753,
1243,
29918,
643,
309,
3950,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
2798,
29898,
5040,
29918,
271,
29922,
29906,
29892,
2302,
29918,
1609,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
13424,
29889,
2798,
29898,
5040,
29918,
271,
29922,
29906,
29892,
2302,
29918,
1609,
29922,
29896,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
9573,
7355,
29898,
525,
1285,
28891,
29889,
1372,
924,
29889,
27492,
29918,
12800,
29918,
1688,
29915,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
20487,
353,
5839,
280,
29889,
29881,
17204,
29898,
28877,
1723,
13,
29871,
396,
1677,
1848,
269,
483,
29871,
1708,
714,
408,
4226,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
396,
3509,
881,
437,
278,
1021,
2655,
13,
29871,
28877,
29906,
353,
5839,
280,
29889,
18132,
29898,
20487,
1723,
13,
29871,
28877,
29906,
29889,
3389,
580,
13,
29871,
4974,
28877,
29906,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29906,
29889,
15091,
13,
29871,
28877,
29906,
29889,
3389,
580,
13,
29871,
4974,
28877,
29906,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29906,
29889,
15091,
13,
13,
13,
1753,
1243,
29918,
8000,
7295,
13,
29871,
396,
937,
591,
674,
1243,
278,
260,
15206,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
5852,
437,
29871,
29896,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
1678,
28877,
29889,
3389,
29898,
29871,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
396,
3431,
29892,
1286,
591,
508,
505,
777,
2090,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
5852,
437,
29871,
29896,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
1678,
28877,
29889,
3389,
29898,
29871,
29896,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
20047,
353,
29871,
29896,
29905,
29876,
8000,
313,
274,
593,
6736,
29871,
29896,
1723,
437,
274,
593,
353,
313,
274,
593,
718,
29871,
29896,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
363,
474,
297,
3464,
29898,
29871,
29900,
29892,
29871,
29896,
29900,
29900,
29871,
1125,
29871,
396,
925,
437,
445,
10362,
2425,
363,
263,
1472,
931,
29892,
1207,
1854,
372,
3248,
264,
29915,
29873,
505,
916,
4828,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
418,
28877,
29889,
3389,
29898,
474,
1723,
13,
1678,
28877,
29889,
4882,
29871,
396,
1207,
1854,
3078,
4319,
5930,
1550,
20602,
4660,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29945,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
20047,
353,
29871,
29896,
29905,
29876,
8000,
5852,
437,
274,
593,
353,
313,
274,
593,
718,
29871,
29896,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
1678,
28877,
29889,
3389,
29898,
29871,
29906,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29945,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
20047,
2396,
29871,
29941,
500,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
1678,
28877,
29889,
3389,
29898,
29871,
29906,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29945,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
20047,
2396,
29871,
29953,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
7700,
437,
408,
2176,
353,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
29898,
29871,
29945,
29900,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
20047,
353,
29871,
29896,
29905,
29876,
8000,
313,
274,
593,
529,
29871,
29896,
29900,
1723,
437,
274,
593,
353,
313,
274,
593,
718,
29871,
29896,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
29898,
29871,
29945,
29900,
29900,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
20047,
2396,
29871,
29896,
29900,
500,
13,
13,
13,
1753,
1243,
29918,
361,
2870,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
7700,
769,
722,
353,
29871,
29896,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
5852,
769,
722,
353,
29871,
29896,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
7700,
769,
722,
353,
29871,
29896,
1683,
722,
353,
29871,
29906,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
1707,
2396,
29871,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29941,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29896,
29892,
525,
1707,
2396,
376,
29874,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29906,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29941,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29906,
29892,
525,
1707,
2396,
376,
29890,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29929,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29941,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29929,
29892,
525,
1707,
2396,
376,
29881,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29896,
29892,
525,
1707,
2396,
376,
29874,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29896,
29892,
525,
1707,
2396,
376,
29890,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29896,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29896,
29892,
525,
1707,
2396,
376,
29883,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
29908,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
294,
29881,
2396,
29871,
29896,
29892,
525,
1707,
2396,
376,
29881,
29908,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
294,
29881,
353,
29871,
29896,
29905,
29876,
361,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29874,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29890,
29908,
25342,
313,
408,
29881,
1275,
29871,
29906,
1723,
769,
722,
353,
376,
29883,
29908,
1683,
722,
353,
376,
29881,
26732,
29876,
8000,
5852,
437,
29871,
29896,
29900,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
363,
474,
297,
3464,
29898,
29871,
29900,
29892,
29871,
29896,
29900,
29871,
1125,
29871,
396,
925,
437,
445,
10362,
2425,
363,
263,
1472,
931,
29892,
1207,
1854,
372,
3248,
264,
29915,
29873,
505,
916,
4828,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
418,
28877,
29889,
3389,
29898,
474,
1723,
13,
1678,
28877,
29889,
4882,
29871,
396,
1207,
1854,
3078,
4319,
5930,
1550,
20602,
4660,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29953,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
13,
1753,
1243,
29918,
29926,
398,
407,
2461,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
10736,
353,
29871,
29896,
29905,
29876,
29901,
29926,
3427,
29918,
29874,
29905,
299,
346,
353,
29871,
29906,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
10736,
2396,
29871,
29896,
29892,
525,
29881,
346,
2396,
29871,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
27102,
12500,
29918,
29874,
29905,
7183,
29883,
353,
29871,
29896,
29905,
29876,
29901,
29926,
3427,
29918,
29874,
29905,
299,
346,
353,
29871,
29906,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
29881,
346,
2396,
29871,
29906,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
27102,
12500,
29918,
29890,
29905,
7183,
29883,
353,
29871,
29896,
29905,
29876,
29901,
29926,
3427,
29918,
29874,
29905,
299,
346,
353,
29871,
29906,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
370,
18054,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
6571,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
27102,
12500,
29918,
29890,
29905,
7183,
29883,
353,
29871,
29896,
29905,
29876,
29901,
29926,
3427,
29918,
29874,
29905,
299,
346,
353,
29871,
29906,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29900,
29889,
29900,
13,
29871,
28877,
29889,
27102,
29898,
525,
29926,
3427,
29918,
29874,
29915,
1723,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
5974,
449,
29871,
1125,
13,
1678,
28877,
29889,
3389,
29898,
29871,
29906,
1723,
13,
29871,
4974,
28877,
29889,
1220,
1275,
29871,
29941,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
29961,
29900,
3816,
29900,
29962,
1275,
29871,
29896,
29900,
29900,
29889,
29900,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
29881,
346,
2396,
29871,
29906,
500,
13,
13,
29937,
1243,
12500,
292,
975,
263,
23473,
740,
13,
29937,
1243,
12500,
292,
975,
697,
740,
304,
1790,
29892,
3907,
1854,
393,
278,
740,
3639,
526,
451,
21692,
29892,
322,
278,
12500,
287,
975,
740,
3248,
264,
29915,
29873,
679,
372,
29915,
29879,
736,
995,
9259,
13,
29937,
1243,
278,
8078,
272,
29918,
21509,
338,
2805,
29081,
975,
5149,
13,
29937,
1018,
1554,
411,
263,
2253,
6728,
13,
29937,
1243,
724,
309,
675,
322,
443,
643,
309,
675,
29892,
7148,
411,
599,
278,
2908,
3987,
13,
29937,
1243,
2805,
4660,
29892,
2675,
304,
817,
263,
740,
393,
508,
282,
1485,
6222,
291,
1716,
363,
278,
995,
322,
884,
363,
278,
2380,
13,
13,
13,
1753,
1243,
29918,
4882,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
463,
580,
29905,
29876,
29946,
29906,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29886,
1071,
29898,
10191,
13776,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29946,
29906,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29886,
1071,
29898,
10191,
543,
29896,
29908,
1723,
29905,
9302,
1071,
29898,
10191,
543,
29906,
29908,
1723,
29905,
9302,
1071,
29898,
10191,
543,
29941,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29953,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
463,
580,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
463,
580,
29905,
29876,
29946,
29906,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29896,
29906,
29905,
29876,
463,
580,
29905,
29876,
29946,
29906,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29955,
29945,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29896,
29906,
29905,
29876,
463,
580,
29905,
29876,
29946,
29906,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29905,
29876,
29941,
29946,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
5852,
437,
19957,
29898,
10191,
13776,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
5852,
437,
3380,
580,
29905,
29876,
29945,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
5852,
437,
3380,
580,
29905,
29876,
29945,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
29953,
29905,
9302,
1071,
29898,
10191,
13776,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29906,
29945,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29906,
29945,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29906,
29945,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29955,
29945,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29955,
29945,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29955,
29945,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
19957,
29898,
10191,
13776,
1723,
437,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
451,
19957,
29898,
10191,
13776,
1723,
437,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29898,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
891,
5852,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
29898,
5852,
891,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
437,
3380,
580,
29905,
9302,
1071,
29898,
10191,
543,
4548,
29908,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
8000,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
437,
3380,
580,
29905,
29876,
29896,
29906,
29905,
9302,
1071,
29898,
10191,
543,
4548,
29908,
1723,
29905,
29876,
29941,
29946,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
8809,
488,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
5852,
769,
19957,
29898,
10191,
543,
4548,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
19957,
29898,
10191,
543,
1116,
29908,
1723,
769,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
769,
29871,
29945,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
7700,
769,
29871,
29906,
29941,
1683,
19957,
29898,
10191,
543,
1116,
29908,
1723,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
769,
3380,
580,
29905,
9302,
1071,
29898,
10191,
543,
4548,
29908,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
7700,
769,
29871,
29896,
25342,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
769,
3380,
580,
29905,
9302,
1071,
29898,
10191,
543,
4548,
29908,
1723,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
361,
7700,
769,
29871,
29896,
25342,
451,
19957,
29898,
10191,
543,
1116,
29908,
1723,
769,
3380,
580,
29905,
29876,
29945,
29905,
9302,
1071,
29898,
10191,
543,
4548,
29908,
1723,
29905,
29876,
29953,
29905,
29876,
355,
29915,
1723,
1723,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29945,
29900,
29889,
29900,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
16122,
29915,
500,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
349,
1071,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29953,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29953,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29953,
29955,
29892,
525,
3644,
27406,
742,
426,
525,
1867,
292,
2396,
525,
17471,
29915,
500,
10353,
313,
29871,
29941,
29941,
29889,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29941,
29953,
29892,
525,
15289,
742,
6571,
10353,
313,
29871,
29900,
29889,
29900,
29892,
525,
6678,
742,
426,
525,
5453,
2396,
6213,
29892,
525,
978,
2396,
525,
29886,
1071,
29915,
500,
1723,
4514,
13,
29871,
4974,
451,
28877,
29889,
15091,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
4882,
1275,
518,
313,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
525,
15289,
742,
6213,
1723,
4514,
13,
29871,
4974,
28877,
29889,
15091,
13,
13,
13,
1753,
1243,
29918,
9933,
7295,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
7340,
353,
29871,
29896,
29915,
1723,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
7340,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
7340,
353,
289,
29890,
29915,
1723,
1723,
13,
29871,
411,
11451,
1688,
29889,
336,
4637,
29898,
2216,
3206,
1312,
2392,
29871,
1125,
13,
1678,
28877,
29889,
3389,
580,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
7340,
353,
4864,
29898,
289,
29890,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
7340,
2396,
7700,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1327,
353,
29871,
29896,
29905,
1056,
29874,
353,
4864,
29898,
289,
29890,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
7340,
2396,
5852,
29892,
525,
1327,
2396,
29871,
29896,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1327,
353,
518,
29871,
29896,
29892,
29871,
29906,
4514,
29905,
1056,
29874,
353,
4864,
29898,
289,
29890,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
7340,
2396,
5852,
29892,
525,
1327,
2396,
518,
29871,
29896,
29892,
29871,
29906,
4514,
500,
13,
13,
29871,
28877,
353,
7525,
1089,
29898,
6088,
29898,
525,
1327,
353,
518,
29871,
29896,
29892,
29871,
29906,
4514,
29905,
1056,
29874,
353,
4864,
29898,
289,
29890,
29961,
29871,
29941,
4514,
1723,
29915,
1723,
1723,
13,
29871,
28877,
29889,
3389,
580,
13,
29871,
4974,
28877,
29889,
11918,
29918,
1958,
1275,
426,
525,
7340,
2396,
7700,
29892,
525,
1327,
2396,
518,
29871,
29896,
29892,
29871,
29906,
4514,
500,
13,
2
] |
jp.atcoder/abc055/abc055_a/8213706.py | kagemeka/atcoder-submissions | 1 | 1602121 | meals = int(input())
x = 800 * meals
y = 200 * (meals // 15)
print(x - y)
| [
1,
592,
1338,
353,
938,
29898,
2080,
3101,
30004,
13,
29916,
353,
29871,
29947,
29900,
29900,
334,
592,
1338,
30004,
13,
29891,
353,
29871,
29906,
29900,
29900,
334,
313,
1004,
1338,
849,
29871,
29896,
29945,
8443,
13,
2158,
29898,
29916,
448,
343,
29897,
13,
2
] |
src/processTypes/bind.py | Razikus/TotallyDockerVolumeBackuper | 0 | 49277 | <gh_stars>0
from docker.types import Mount
import datetime
def processMount(mount):
result = dict()
result["type"] = mount["Type"]
result["source"] = mount["Source"]
return result
def getMountType(mount, target):
return Mount(type=mount["type"], source=mount["source"], target=target)
def getBackupName(mount):
now = datetime.datetime.now()
prefix = now.strftime('%Y%m%d%H%M%S')
return prefix + mount["type"] + mount["source"].replace("/", "-") + ".tar.gz"
def getSourceName(mount):
return mount["source"] | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
10346,
29889,
8768,
1053,
8040,
13,
5215,
12865,
13,
13,
1753,
1889,
27648,
29898,
16476,
1125,
13,
1678,
1121,
353,
9657,
580,
13,
1678,
1121,
3366,
1853,
3108,
353,
5766,
3366,
1542,
3108,
13,
1678,
1121,
3366,
4993,
3108,
353,
5766,
3366,
4435,
3108,
13,
1678,
736,
1121,
13,
13,
1753,
679,
27648,
1542,
29898,
16476,
29892,
3646,
1125,
13,
1678,
736,
8040,
29898,
1853,
29922,
16476,
3366,
1853,
12436,
2752,
29922,
16476,
3366,
4993,
12436,
3646,
29922,
5182,
29897,
13,
13,
1753,
679,
5841,
786,
1170,
29898,
16476,
1125,
13,
1678,
1286,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
1678,
10944,
353,
1286,
29889,
710,
615,
603,
877,
29995,
29979,
29995,
29885,
29995,
29881,
29995,
29950,
29995,
29924,
29995,
29903,
1495,
13,
1678,
736,
10944,
718,
5766,
3366,
1853,
3108,
718,
5766,
3366,
4993,
16862,
6506,
11974,
613,
11663,
1159,
718,
11393,
12637,
29889,
18828,
29908,
13,
13,
1753,
679,
4435,
1170,
29898,
16476,
1125,
13,
1678,
736,
5766,
3366,
4993,
3108,
2
] |
vega/report/__init__.py | jie311/vega | 724 | 80649 | from .report_server import ReportServer
from .report_client import ReportClient
from .record import ReportRecord
from .nsga_iii import NonDominatedSorting, SortAndSelectPopulation
| [
1,
515,
869,
12276,
29918,
2974,
1053,
13969,
6004,
13,
3166,
869,
12276,
29918,
4645,
1053,
13969,
4032,
13,
3166,
869,
11651,
1053,
13969,
9182,
13,
3166,
869,
1983,
3249,
29918,
25609,
1053,
10050,
29928,
5817,
630,
13685,
292,
29892,
20025,
2855,
3549,
12310,
2785,
13,
2
] |
source/code/build-instance-scheduler-template.py | liangruibupt/aws-instance-scheduler | 0 | 4620 | ######################################################################################################################
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/ #
# #
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################
import json
import sys
from collections import OrderedDict
def get_versioned_template(template_filename, bucket, solution, version, region):
with open(template_filename, "rt") as f:
template_text = "".join(f.readlines())
template_text = template_text.replace("%bucket%", bucket)
template_text = template_text.replace("%solution%", solution)
template_text = template_text.replace("%version%", version)
if region == 'cn-north-1' or region == 'cn-northwest-1':
arn_prefix = "arn:aws-cn"
else:
arn_prefix = "arn:aws"
template_text = template_text.replace("%arn_prefix%", arn_prefix)
return json.loads(template_text, object_pairs_hook=OrderedDict)
def main(template_file, bucket, solution, version, region):
template = get_versioned_template(template_file, bucket, solution, version, region)
print(json.dumps(template, indent=4))
main(template_file=sys.argv[1], bucket=sys.argv[2], solution=sys.argv[3], version=sys.argv[4], region=sys.argv[5])
exit(0)
| [
1,
835,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
2277,
29937,
13,
29937,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
16631,
29889,
510,
29892,
9266,
29889,
470,
967,
23736,
1078,
29889,
2178,
26863,
2538,
9841,
29889,
462,
462,
965,
396,
13,
29937,
462,
462,
462,
462,
462,
462,
462,
1678,
396,
13,
29937,
29871,
10413,
21144,
1090,
278,
13380,
19245,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
2564,
887,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
268,
396,
13,
29937,
29871,
411,
278,
19245,
29889,
319,
3509,
310,
278,
19245,
338,
5982,
472,
462,
462,
462,
632,
396,
13,
29937,
462,
462,
462,
462,
462,
462,
462,
1678,
396,
13,
29937,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
462,
462,
462,
462,
1669,
396,
13,
29937,
462,
462,
462,
462,
462,
462,
462,
1678,
396,
13,
29937,
29871,
470,
297,
278,
376,
506,
1947,
29908,
934,
10259,
1384,
292,
445,
934,
29889,
910,
934,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
396,
13,
29937,
29871,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
4653,
470,
2411,
2957,
29889,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
1678,
396,
13,
29937,
29871,
322,
27028,
1090,
278,
19245,
29889,
462,
462,
462,
462,
18884,
396,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
4136,
2277,
13,
13,
5215,
4390,
13,
5215,
10876,
13,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
13,
13,
1753,
679,
29918,
3259,
287,
29918,
6886,
29898,
6886,
29918,
9507,
29892,
20968,
29892,
1650,
29892,
1873,
29892,
5120,
1125,
13,
1678,
411,
1722,
29898,
6886,
29918,
9507,
29892,
376,
2273,
1159,
408,
285,
29901,
13,
4706,
4472,
29918,
726,
353,
376,
1642,
7122,
29898,
29888,
29889,
949,
9012,
3101,
13,
4706,
4472,
29918,
726,
353,
4472,
29918,
726,
29889,
6506,
11702,
21454,
29995,
613,
20968,
29897,
13,
4706,
4472,
29918,
726,
353,
4472,
29918,
726,
29889,
6506,
11702,
2929,
918,
29995,
613,
1650,
29897,
13,
4706,
4472,
29918,
726,
353,
4472,
29918,
726,
29889,
6506,
11702,
3259,
29995,
613,
1873,
29897,
13,
4706,
565,
5120,
1275,
525,
18038,
29899,
29876,
2072,
29899,
29896,
29915,
470,
5120,
1275,
525,
18038,
29899,
29876,
2072,
5933,
29899,
29896,
2396,
13,
9651,
564,
29876,
29918,
13506,
353,
376,
2753,
29901,
10467,
29899,
18038,
29908,
13,
4706,
1683,
29901,
13,
9651,
564,
29876,
29918,
13506,
353,
376,
2753,
29901,
10467,
29908,
13,
4706,
4472,
29918,
726,
353,
4472,
29918,
726,
29889,
6506,
11702,
2753,
29918,
13506,
29995,
613,
564,
29876,
29918,
13506,
29897,
13,
4706,
736,
4390,
29889,
18132,
29898,
6886,
29918,
726,
29892,
1203,
29918,
29886,
7121,
29918,
20849,
29922,
7514,
287,
21533,
29897,
13,
13,
13,
1753,
1667,
29898,
6886,
29918,
1445,
29892,
20968,
29892,
1650,
29892,
1873,
29892,
5120,
1125,
13,
1678,
4472,
353,
679,
29918,
3259,
287,
29918,
6886,
29898,
6886,
29918,
1445,
29892,
20968,
29892,
1650,
29892,
1873,
29892,
5120,
29897,
13,
1678,
1596,
29898,
3126,
29889,
29881,
17204,
29898,
6886,
29892,
29536,
29922,
29946,
876,
13,
13,
13,
3396,
29898,
6886,
29918,
1445,
29922,
9675,
29889,
19218,
29961,
29896,
1402,
20968,
29922,
9675,
29889,
19218,
29961,
29906,
1402,
1650,
29922,
9675,
29889,
19218,
29961,
29941,
1402,
1873,
29922,
9675,
29889,
19218,
29961,
29946,
1402,
5120,
29922,
9675,
29889,
19218,
29961,
29945,
2314,
13,
13,
13322,
29898,
29900,
29897,
13,
2
] |
openspectra/ui/imagedisplay.py | pblottiere/openspectra | 8 | 1616698 | <gh_stars>1-10
# Developed by <NAME> and <NAME> on 1/21/19 6:29 PM.
# Last modified 1/21/19 6:29 PM
# Copyright (c) 2019. All rights reserved.
import itertools
import time
from enum import Enum
from math import floor
from typing import List
from PyQt5.QtCore import pyqtSignal, Qt, QEvent, QObject, QTimer, QSize, pyqtSlot, QRect, QPoint
from PyQt5.QtGui import QPalette, QImage, QPixmap, QMouseEvent, QResizeEvent, QCloseEvent, QPaintEvent, QPainter, \
QPolygon, QCursor, QColor, QBrush, QPainterPath, QPolygonF
from PyQt5.QtWidgets import QScrollArea, QLabel, QSizePolicy, QMainWindow, QDockWidget, QWidget, QPushButton, \
QHBoxLayout, QApplication, QStyle
import numpy as np
from numpy import ma
from openspectra.image import Image, BandDescriptor
from openspectra.openspecrtra_tools import RegionOfInterest
from openspectra.openspectra_file import OpenSpectraHeader
from openspectra.utils import LogHelper, Logger, Singleton
class ColorPicker(metaclass=Singleton):
def __init__(self):
self.__colors = [Qt.red, Qt.green, Qt.blue, Qt.cyan, Qt.yellow,
Qt.magenta, Qt.gray, Qt.darkRed, Qt.darkGreen, Qt.darkBlue,
Qt.darkCyan, Qt.darkMagenta, Qt.darkYellow, Qt.darkGray,
Qt.lightGray]
self.__index = 0
def current_color(self) -> QColor:
return self.__colors[self.__index]
def next_color(self) -> QColor:
self.__index += 1
if self.__index >= len(self.__colors):
self.reset()
return self.__colors[self.__index]
def reset(self):
self.__index = 0
class AdjustedMouseEvent(QObject):
def __init__(self, event:QMouseEvent, x_scale:float, y_scale:float):
super().__init__(None)
self.__event = event
self.__pixel_x = floor(event.x() * x_scale)
self.__pixel_y = floor(event.y() * y_scale)
self.__pixel_pos = (self.__pixel_x, self.__pixel_y)
def mouse_event(self) -> QMouseEvent:
return self.__event
def pixel_x(self) -> int:
return self.__pixel_x
def pixel_y(self) -> int:
return self.__pixel_y
def pixel_pos(self) -> (int, int):
return self.__pixel_pos
class RegionDisplayItem(QObject):
toggled = pyqtSignal(QObject)
closed = pyqtSignal(QObject)
def __init__(self, x_zoom_factor: float, y_zoom_factor:float, color:QColor, is_on:bool,
painter_path:QPainterPath=None, points:List[QPoint]=None):
super().__init__(None)
self.__x_zoom_factor = x_zoom_factor
self.__y_zoom_factor = y_zoom_factor
self.__color = color
self.__is_on = is_on
self.__painter_path = painter_path
self.__points = points
def painter_path(self) -> QPainterPath:
return self.__painter_path
def points(self) -> List[QPoint]:
return self.__points
def append_points(self, points:List[QPoint]):
self.__points.extend(points)
def color(self) -> QColor:
return self.__color
def is_on(self) -> bool:
return self.__is_on
def set_is_on(self, is_on:bool):
self.__is_on = is_on
self.toggled.emit(self)
def close(self):
self.closed.emit(self)
def x_zoom_factor(self) -> float:
return self.__x_zoom_factor
def y_zoom_factor(self) -> float:
return self.__y_zoom_factor
class WindowCloseEvent(QObject):
def __init__(self, target:QMainWindow):
super().__init__(None)
self.__target = target
def target(self) -> QMainWindow:
return self.__target
class AreaSelectedEvent(QObject):
def __init__(self, region:RegionOfInterest, display_item:RegionDisplayItem):
super().__init__(None)
self.__region = region
self.__display_item = display_item
def region(self) -> RegionOfInterest:
return self.__region
def display_item(self) -> RegionDisplayItem:
return self.__display_item
class ImageResizeEvent(QObject):
def __init__(self, image_size:QSize, viewport_size:QSize):
super().__init__(None)
self.__image_size = image_size
self.__viewport_size = viewport_size
def image_size(self) -> QSize:
return self.__image_size
def viewport_size(self) -> QSize:
return self.__viewport_size
class ViewZoomChangeEvent(QObject):
def __init__(self, factor:float, size:QSize):
super().__init__(None)
self.__factor = factor
self.__size = size
def factor(self) -> float:
return self.__factor
def size(self) -> QSize:
return self.__size
class ViewLocationChangeEvent(QObject):
def __init__(self, center:QPoint):
super().__init__(None)
self.__center = center
def center(self) -> QPoint:
return self.__center
def scale(self, scale_factor:float):
self.__center *= scale_factor
class ViewChangeEvent(QObject):
def __init__(self, center:QPoint, size:QSize):
super().__init__(None)
self.__center = center
self.__size = size
def size(self) -> QSize:
return self.__size
def center(self) -> QPoint:
return self.__center
def scale(self, scale_factor:float):
self.__center *= scale_factor
self.__size *= scale_factor
class MouseCoordinates(QLabel):
__LOG:Logger = LogHelper.logger("MouseCoordinates")
def __init__(self, map_info:OpenSpectraHeader.MapInfo=None, parent=None):
super().__init__(parent)
self.__map_info = map_info
if self.__map_info is not None:
self.__formatter = " sample: {0} line: {1}, x: {2:.3f}, y: {3:.3f}"
else:
self.__formatter = " sample: {0} line: {1}"
@pyqtSlot(AdjustedMouseEvent)
def on_mouse_move(self, event:AdjustedMouseEvent):
# users are accustom to screen coordinates being 1 based
if self.__map_info is not None:
coords = self.__map_info.calculate_coordinates(event.pixel_x(), event.pixel_y())
self.setText(self.__formatter.format(event.pixel_x() + 1, event.pixel_y() + 1,
coords[0], coords[1]))
else:
self.setText(" sample: {0} line: {1}".format(
event.pixel_x() + 1, event.pixel_y() + 1))
class ZoomWidget(QWidget):
zoom_in = pyqtSignal()
zoom_out = pyqtSignal()
reset_zoom = pyqtSignal()
def __init__(self, parent=None, initial_zoom:float=1.0):
super().__init__(parent)
self.__factor_label = QLabel()
self.__factor_label.setFixedHeight(12)
self.__factor_label.setFixedWidth(40)
self.set_zoom_label(initial_zoom)
layout = QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.setAlignment(Qt.AlignRight)
layout.addWidget(self.__factor_label)
self.setLayout(layout)
def set_zoom_label(self, new_zoom_factor:float):
self.__factor_label.setText("{:5.2f}".format(new_zoom_factor))
class ReversePixelCalculator():
"""For a given pixel selected on a zoomed in image get_points returns
all of the pixels that should be drawn on the zoomed image to cover
the same area as would be in the 1 to 1 image"""
__LOG: Logger = LogHelper.logger("ReversePixelCalculator")
def __init__(self, x_size:int, y_size:int, x_zoom_factor:float, y_zoom_factor:float):
if x_zoom_factor < 1.0 or y_zoom_factor < 1.0:
raise ValueError("Zoom factors should be at least 1.0 or greater")
self.update_params(x_size, y_size, x_zoom_factor, y_zoom_factor)
def update_params(self, x_size:int, y_size:int, x_zoom_factor:float, y_zoom_factor:float):
self.__x_max = x_size
self.__y_max = y_size
self.__x_zoom = x_zoom_factor
self.__y_zoom = y_zoom_factor
def get_points(self, x:int, y:int) -> List[QPoint]:
if x >= self.__x_max:
raise ValueError("x value must be less than {0}".format(self.__x_max))
if y >= self.__y_max:
raise ValueError("y value must be less than {0}".format(self.__y_max))
x_mapped = floor(x/self.__x_zoom)
y_mapped = floor(y/self.__y_zoom)
x_min = x_max = x
x_val = x - 1
while floor(x_val/self.__x_zoom) == x_mapped:
x_min = x_val
x_val = x_val - 1
x_val = x + 1
while floor(x_val/self.__x_zoom) == x_mapped:
x_max = x_val
x_val = x_val + 1
y_min = y_max = y
y_val = y - 1
while floor(y_val/self.__y_zoom) == y_mapped:
y_min = y_val
y_val = y_val - 1
y_val = y + 1
while floor(y_val/self.__y_zoom) == y_mapped:
y_max = y_val
y_val = y_val + 1
point_list:List[QPoint] = list()
for x_point in range(x_min, x_max + 1):
for y_point in range(y_min, y_max + 1):
point_list.append(QPoint(x_point, y_point))
ReversePixelCalculator.__LOG.debug("x_map: {0}, y_map: {1}, x_min: {2}, x_max: {3}, y_min: {4}, y_max: {5}".
format(x_mapped, y_mapped, x_min, x_max, y_min, y_max))
return point_list
class ImageLabel(QLabel):
__LOG:Logger = LogHelper.logger("ImageLabel")
class Action(Enum):
Nothing = 0
Dragging = 1
Drawing = 2
Picking = 3
# on double click we get both clicked and doubleClicked
# decide if we need both and fix
area_selected = pyqtSignal(AreaSelectedEvent)
left_clicked = pyqtSignal(AdjustedMouseEvent)
right_clicked = pyqtSignal(AdjustedMouseEvent)
double_clicked = pyqtSignal(AdjustedMouseEvent)
mouse_move = pyqtSignal(AdjustedMouseEvent)
locator_moved = pyqtSignal(ViewLocationChangeEvent)
def __init__(self, image_descriptor:BandDescriptor, location_rect:bool=True,
pixel_select:bool=False, parent=None):
super().__init__(parent)
# Install our event filter
self.installEventFilter(self)
# Image descriptor
self.__descriptor = image_descriptor
# mouse location
self.__last_mouse_loc:QPoint = None
# Parameters related to the image size
self.__initial_size:QSize = None
self.__width_scale_factor = 1.0
self.__height_scale_factor = 1.0
# Cursors we'll use
self.__default_cursor = self.cursor()
self.__drag_cursor = QCursor(Qt.ClosedHandCursor)
self.__draw_cursor = QCursor(Qt.CrossCursor)
self.__pick_cursor = QCursor(Qt.PointingHandCursor)
# Initialize the locator if we have one
if location_rect:
# Initial size doesn't really matter,
# it will get adjusted based on the zoom window size
self.__locator_rect = QRect(0, 0, 50, 50)
else:
self.__locator_rect = None
# The list of regions of interest
self.__region_display_items:List[RegionDisplayItem] = list()
# Color picker for region of interest displays
self.__color_picker = ColorPicker()
# Polygon selection items
self.__polygon:QPolygon = None
self.__polygon_bounds:QRect = None
# Pixel selection items
self.__pixel_select:bool = pixel_select
self.__pixel_mapper:ReversePixelCalculator = None
self.__pixel_list:np.ndarray = None
self.__region_display_item = None
self.__current_action = ImageLabel.Action.Nothing
def has_locator(self) -> bool:
return self.__locator_rect is not None
def locator_position(self) -> QPoint:
assert self.__locator_rect is not None
return self.__unscale_point(self.__locator_rect.center())
def set_locator_position(self, postion:QPoint):
# calls to this method should always be in 1 to 1 coordinates
if self.has_locator():
new_position: QPoint = self.__scale_point(postion)
ImageLabel.__LOG.debug("setting locator position: {0}, scaled pos: {1}", postion, new_position)
self.__locator_rect.moveCenter(new_position)
self.update()
def locator_size(self) -> QSize:
assert self.__locator_rect is not None
return self.__unscale_size(self.__locator_rect.size())
def set_locator_size(self, size:QSize):
# calls to this method should always be in 1 to 1 coordinates
if self.has_locator():
new_size: QSize = self.__scale_size(size)
ImageLabel.__LOG.debug("setting locator size: {0}, scaled size: {1}", size, new_size)
self.__locator_rect.setSize(new_size)
self.update()
@pyqtSlot(AreaSelectedEvent)
def add_selected_area(self, event:AreaSelectedEvent):
display_item = event.display_item()
display_item.toggled.connect(self.__handle_region_toggled)
display_item.closed.connect(self.__handle__region_closed)
self.__region_display_items.append(display_item)
self.update()
def remove_all_regions(self):
self.__region_display_items.clear()
self.__clear_selected_area()
self.__color_picker.reset()
self.update()
def setPixmap(self, pixel_map:QPixmap):
locator_size:QSize = None
locator_position:QPoint = None
# If zoom changed we need to end any pixel selecting in progress
if self.__current_action == ImageLabel.Action.Picking:
self.__end_pixel_select()
if self.has_locator():
locator_size = self.locator_size()
locator_position = self.locator_position()
super().setPixmap(pixel_map)
ImageLabel.__LOG.debug("super().setPixmap called")
size = self.pixmap().size()
if self.__initial_size is not None:
self.__width_scale_factor = size.width() / self.__initial_size.width()
self.__height_scale_factor = size.height() / self.__initial_size.height()
ImageLabel.__LOG.debug("setting image size: {0}, scale factor w: {1}, h: {2}",
size, self.__width_scale_factor, self.__height_scale_factor)
# reset locator if we have one
if self.has_locator():
self.set_locator_size(locator_size)
self.set_locator_position(locator_position)
# If there's a pixel mapper update it too
if self.__pixel_mapper is not None:
self.__pixel_mapper.update_params(
self.pixmap().size().width(), self.pixmap().size().height(),
self.__width_scale_factor, self.__height_scale_factor)
self.setMinimumSize(size)
self.setMaximumSize(size)
def changeEvent(self, event:QEvent):
ImageLabel.__LOG.debug("ImageLabel.changeEvent called...")
if event.type() == QEvent.ParentChange and self.pixmap() is not None \
and self.__initial_size is None:
self.__initial_size = self.pixmap().size()
def mouseMoveEvent(self, event:QMouseEvent):
if self.__current_action == ImageLabel.Action.Drawing and self.__polygon is not None:
# ImageLabel.__LOG.debug("drawing mouse move event, pos: {0}, size: {1}", event.pos(), self.pixmap().size())
self.__polygon << event.pos()
self.update()
elif self.__current_action == ImageLabel.Action.Dragging and \
self.__last_mouse_loc is not None and self.__locator_rect is not None:
# ImageLabel.__LOG.debug("dragging mouse move event, pos: {0}, size: {1}", event.pos(), self.pixmap().size())
center = self.__locator_rect.center()
center += event.pos() - self.__last_mouse_loc
self.__locator_rect.moveCenter(center)
self.__last_mouse_loc = event.pos()
self.locator_moved.emit(ViewLocationChangeEvent(self.__unscale_point(center)))
self.update()
else:
# don't emit pixel locations when drawing or dragging. It doesn't
# really make sense and for some reason when the mouse is held down
# we get event even after we are no longer on the image creating
# out of range problems
# ImageLabel.__LOG.debug("mouse move event, pos: {0}, size: {1}", event.pos(), self.pixmap().size())
adjusted_move = self.__create_adjusted_mouse_event(event)
self.mouse_move.emit(adjusted_move)
def mousePressEvent(self, event:QMouseEvent):
# only expect right clicks here due to event filter
adjust_mouse_event = self.__create_adjusted_mouse_event(event)
ImageLabel.__LOG.debug("mousePressEvent left: {0} or right: {1}, adj pos: {2}",
event.button() == Qt.LeftButton, event.button() == Qt.RightButton,
adjust_mouse_event.pixel_pos())
# Check if we're selecting pixels and if so do it
self.__select_pixel(adjust_mouse_event)
self.right_clicked.emit(adjust_mouse_event)
self.update()
def mouseReleaseEvent(self, event:QMouseEvent):
ImageLabel.__LOG.debug("mouseReleaseEvent left: {0} or right: {1}",
event.button() == Qt.LeftButton, event.button() == Qt.RightButton)
if self.__current_action == ImageLabel.Action.Dragging:
self.__current_action = ImageLabel.Action.Nothing
self.setCursor(self.__default_cursor)
self.update()
elif self.__current_action == ImageLabel.Action.Drawing:
self.__current_action = ImageLabel.Action.Nothing
self.setCursor(self.__default_cursor)
# trigger the collection of spectra plots points
self.__get_select_polygon()
self.update()
elif self.__current_action == ImageLabel.Action.Picking and event.button() == Qt.LeftButton:
self.__end_pixel_select()
self.update()
# Then it's a left click
elif self.__last_mouse_loc is not None:
self.left_clicked.emit(self.__create_adjusted_mouse_event(event))
self.__last_mouse_loc = None
def mouseDoubleClickEvent(self, event:QMouseEvent):
ImageLabel.__LOG.debug("mouseDoubleClickEvent")
self.double_clicked.emit(self.__create_adjusted_mouse_event(event))
def eventFilter(self, object:QObject, event:QEvent):
if isinstance(event, QMouseEvent):
image_size:QSize = self.pixmap().size()
if event.x() >= image_size.width() or event.y() >= image_size.height():
# suppress mouse events outside the image,
# can happen when mouse button is held while moving mouse
return True
if event.type() == QEvent.MouseButtonPress and event.button() == Qt.LeftButton:
self.__last_mouse_loc = event.pos()
QTimer.singleShot(300, self.__pressed)
# event was handled
return True
# Mask right clicks from the mouse release handler
if event.type() == QEvent.MouseButtonRelease and event.button() == Qt.RightButton:
# event was handled
return True
return False
def paintEvent(self, paint_event:QPaintEvent):
# first render the image
super().paintEvent(paint_event)
# not sure why but it seems we need to create the painter each time
painter = QPainter(self)
brush:QBrush = QBrush(Qt.SolidPattern)
# draw the polgon that is in the process of being created
if self.__polygon is not None:
painter.setPen(self.__color_picker.current_color())
brush.setColor(self.__color_picker.current_color())
path:QPainterPath = QPainterPath()
path.addPolygon(QPolygonF(self.__polygon))
path.closeSubpath()
painter.fillPath(path, brush)
if self.__current_action == ImageLabel.Action.Drawing:
self.__polygon_bounds = self.__polygon.boundingRect()
# draw locator in red if present
painter.setPen(Qt.red)
if self.__locator_rect is not None:
painter.drawRect(self.__locator_rect)
# paint the selected regions scaling each one appropriately
for region_item in self.__region_display_items:
# ImageLabel.__LOG.debug("Region: {0}, is on: {1}", region_item.color(), region_item.is_on())
if region_item.is_on():
painter.scale(self.__width_scale_factor/region_item.x_zoom_factor(),
self.__height_scale_factor/region_item.y_zoom_factor())
painter.setPen(region_item.color())
brush.setColor(region_item.color())
if region_item.painter_path() is not None:
painter.fillPath(region_item.painter_path(), brush)
elif region_item.points() is not None:
for point in region_item.points():
painter.drawPoints(point)
painter.resetTransform()
def __scale_point(self, point:QPoint) -> QPoint:
new_point:QPoint = QPoint(point)
if self.__width_scale_factor != 1.0:
new_point.setX(floor(new_point.x() * self.__width_scale_factor))
if self.__height_scale_factor != 1.0:
new_point.setY(floor(new_point.y() * self.__height_scale_factor))
return new_point
def __scale_size(self, size:QSize) -> QSize:
new_size: QSize = QSize(size)
if self.__width_scale_factor != 1.0:
new_size.setWidth(floor(new_size.width() * self.__width_scale_factor))
if self.__height_scale_factor != 1.0:
new_size.setHeight(floor(new_size.height() * self.__height_scale_factor))
return new_size
def __unscale_point(self, point:QPoint) -> QPoint:
new_point:QPoint = QPoint(point)
if self.__width_scale_factor != 1.0:
new_point.setX(floor(new_point.x() / self.__width_scale_factor))
if self.__height_scale_factor != 1.0:
new_point.setY(floor(new_point.y() / self.__height_scale_factor))
return new_point
def __unscale_size(self, size:QSize) -> QSize:
new_size:QSize = QSize(size)
if self.__width_scale_factor != 1.0:
new_size.setWidth(floor(new_size.width() / self.__width_scale_factor))
if self.__height_scale_factor != 1.0:
new_size.setHeight(floor(new_size.height() / self.__height_scale_factor))
return new_size
def __clear_selected_area(self):
self.__polygon_bounds = None
self.__polygon = None
self.update()
@pyqtSlot(RegionDisplayItem)
def __handle__region_closed(self, target:RegionDisplayItem):
if target in self.__region_display_items:
self.__region_display_items.remove(target)
self.update()
else:
ImageLabel.__LOG.warning("Call to remove non-existent region ignored")
@pyqtSlot(RegionDisplayItem)
def __handle_region_toggled(self, target:RegionDisplayItem):
self.update()
def __select_pixel(self, adjusted_mouse_event:AdjustedMouseEvent):
ImageLabel.__LOG.debug("__select_pixel called with current action: {0}".format(self.__current_action))
if self.__current_action == ImageLabel.Action.Nothing and self.__pixel_select:
self.__current_action = ImageLabel.Action.Picking
self.setCursor(self.__pick_cursor)
# Create of update the pixel mapper
if self.__pixel_mapper is None:
self.__pixel_mapper = ReversePixelCalculator(
self.pixmap().size().width(), self.pixmap().size().height(),
self.__width_scale_factor, self.__height_scale_factor)
else:
self.__pixel_mapper.update_params(
self.pixmap().size().width(), self.pixmap().size().height(),
self.__width_scale_factor, self.__height_scale_factor)
# Create a RegionDisplayItem and wire it up
color = self.__color_picker.current_color()
self.__region_display_item = RegionDisplayItem(self.__width_scale_factor, self.__height_scale_factor,
color, True, points=self.__pixel_mapper.get_points(
adjusted_mouse_event.mouse_event().x(), adjusted_mouse_event.mouse_event().y()))
self.__region_display_item.closed.connect(self.__handle__region_closed)
self.__region_display_item.toggled.connect(self.__handle_region_toggled)
# Add it to the list of RegionDisplayItems
self.__region_display_items.append(self.__region_display_item)
# Create a new pixel list and add the selected adjusted pixel to list being
# gathered for the RegionOfInterest
self.__pixel_list = np.array([adjusted_mouse_event.pixel_x(), adjusted_mouse_event.pixel_y()]).reshape(1, 2)
elif self.__current_action == ImageLabel.Action.Picking and self.__region_display_item is not None:
# We're already in the process of selecting pixels so append to the RegionDisplayItems
self.__region_display_item.append_points(self.__pixel_mapper.get_points(
adjusted_mouse_event.mouse_event().x(), adjusted_mouse_event.mouse_event().y()))
# And append to the pixel list
self.__pixel_list = np.append(self.__pixel_list,
np.array([adjusted_mouse_event.pixel_x(), adjusted_mouse_event.pixel_y()]).reshape(1, 2),
axis=0)
def __end_pixel_select(self):
self.__current_action = ImageLabel.Action.Nothing
self.setCursor(self.__default_cursor)
self.__get_selected_pixels()
def __get_selected_pixels(self):
if len(self.__pixel_list) > 0:
# Create region of interest. The collection of points has already been
# converted to 1 to 1 space.
region = RegionOfInterest(np.array(self.__pixel_list), 1.0, 1.0,
self.__initial_size.height(), self.__initial_size.width(), self.__descriptor)
self.__pixel_list = None
self.area_selected.emit(AreaSelectedEvent(region, self.__region_display_item))
self.__color_picker.next_color()
self.__region_display_item = None
def __get_select_polygon(self):
if self.__polygon_bounds is not None:
if self.__polygon_bounds.size().height() > 1 and \
self.__polygon_bounds.size().width() > 1:
# point_list = self.__path.data()
# for point in point_list:
# ImageLabel.__LOG.debug("Polygon point: {0}", point)
x1, y1, x2, y2 = self.__polygon_bounds.getCoords()
ImageLabel.__LOG.debug("Selected coords, x1: {0}, y1: {1}, x2: {2}, y2: {3}, size: {4}",
x1, y1, x2, y2, self.__polygon_bounds.size())
# can get negative x1 & y1 if user drags off image to the left or top
if x1 < 0 : x1 = 0
if y1 < 0 : y1 = 0
# testing showed lower and right edges seemed to clip at the
# correct last pixels but make sure that doesn't change
image_size = self.pixmap().size()
ImageLabel.__LOG.debug("Image w: {0}, h: {1}", image_size.width(), image_size.height())
if x2 > image_size.width() - 1 : x2 = image_size.width() - 1
if y2 > image_size.height() - 1 : y2 = image_size.height() - 1
# create an array of pixel locations contained by the
# adjusted bounding rectangle coordinates
x_range = ma.arange(x1, x2 + 1)
y_range = ma.arange(y1, y2 + 1)
points = ma.array(list(itertools.product(x_range, y_range)))
# check to see which points also fall inside of the polygon
for i in range(len(points)):
point = QPoint(points[i][0], points[i][1])
if not self.__polygon.containsPoint(point, Qt.WindingFill):
points[i] = ma.masked
# ImageLabel.__LOG.debug("Point out: {0}", point)
ImageLabel.__LOG.debug("Points size: {0}, count: {1}", points.size, points.count())
# make sure we haven't masked all the elements
if points.count() > 0:
# extract the non-masked points and reshape the result back to a list of pairs
points = points[~points.mask].reshape(floor(points.count() / 2), 2)
ImageLabel.__LOG.debug("Final points shape: {0}, size: {1}, count: {2}",
points.shape, points.size, points.count())
# capture the region of interest and save to the map
region = RegionOfInterest(points,
self.__width_scale_factor, self.__height_scale_factor,
self.__initial_size.height(), self.__initial_size.width(), self.__descriptor)
color = self.__color_picker.current_color()
# Save the final version of the polygon as a QPainterPath it's more
# efficient for reuse and has more flexible painting options
painter_path = QPainterPath()
painter_path.addPolygon(QPolygonF(self.__polygon))
painter_path.closeSubpath()
display_item = RegionDisplayItem(self.__width_scale_factor, self.__height_scale_factor,
color, True, painter_path)
display_item.closed.connect(self.__handle__region_closed)
display_item.toggled.connect(self.__handle_region_toggled)
self.__region_display_items.append(display_item)
self.area_selected.emit(AreaSelectedEvent(region, display_item))
self.__color_picker.next_color()
self.__clear_selected_area()
else:
ImageLabel.__LOG.debug("No points found in region, size: {0}", self.__polygon_bounds.size())
self.__clear_selected_area()
else:
ImageLabel.__LOG.debug("Zero dimension polygon rejected, size: {0}", self.__polygon_bounds.size())
self.__clear_selected_area()
def __pressed(self):
# ImageLabel.__LOG.debug("press called, last_mouse_loc: {0}", self.__last_mouse_loc)
if self.__last_mouse_loc is not None:
if self.__locator_rect is not None and self.__locator_rect.contains(self.__last_mouse_loc):
self.__current_action = ImageLabel.Action.Dragging
self.setCursor(self.__drag_cursor)
# ImageLabel.__LOG.debug("press called, drag start")
elif self.__width_scale_factor >= 1.0 or self.__height_scale_factor >= 1.0:
# need to limit region selection to scale factors greater than 1.0
# or else we end up with a region whose pixel coverage is sparse
self.__current_action = ImageLabel.Action.Drawing
self.setCursor(self.__draw_cursor)
self.__color_picker.current_color()
self.__polygon = QPolygon()
# ImageLabel.__LOG.debug("press called, draw start")
def __create_adjusted_mouse_event(self, event:QMouseEvent):
return AdjustedMouseEvent(event, 1 / self.__width_scale_factor, 1 / self.__height_scale_factor)
class ImageDisplay(QScrollArea):
__LOG:Logger = LogHelper.logger("ImageDisplay")
area_selected = pyqtSignal(AreaSelectedEvent)
left_clicked = pyqtSignal(AdjustedMouseEvent)
right_clicked = pyqtSignal(AdjustedMouseEvent)
mouse_move = pyqtSignal(AdjustedMouseEvent)
image_resized = pyqtSignal(ImageResizeEvent)
viewport_changed = pyqtSignal(ViewChangeEvent)
locator_moved = pyqtSignal(ViewLocationChangeEvent)
viewport_scrolled = pyqtSignal(ViewLocationChangeEvent)
def __init__(self, image:Image, qimage_format:QImage.Format=QImage.Format_Grayscale8,
location_rect:bool=True, pixel_select:bool=False, parent=None):
super().__init__(parent)
self.__margin_width = 4
self.__margin_height = 4
self.__image = image
self.__qimage_format = qimage_format
self.__image_label = ImageLabel(self.__image.descriptor(), location_rect, pixel_select, self)
self.__image_label.setBackgroundRole(QPalette.Base)
self.__image_label.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
self.__image_label.setMouseTracking(True)
self.__image_label.area_selected.connect(self.area_selected)
self.__image_label.left_clicked.connect(self.left_clicked)
self.__image_label.right_clicked.connect(self.right_clicked)
self.__image_label.double_clicked.connect(self.__double_click_handler)
self.__image_label.mouse_move.connect(self.mouse_move)
self.__image_label.locator_moved.connect(self.locator_moved)
self.__last_scrollbar_action:int = -1
self.horizontalScrollBar().valueChanged.connect(self.__handle_horizontal_bar_changed)
self.horizontalScrollBar().actionTriggered.connect(self.__handle_bar_action)
self.verticalScrollBar().valueChanged.connect(self.__handle_vertical_bar_changed)
self.verticalScrollBar().actionTriggered.connect(self.__handle_bar_action)
self.setBackgroundRole(QPalette.Dark)
self.__display_image()
@pyqtSlot(int)
def __handle_bar_action(self, action:int):
# Action are triggered by user interactions with the scroll bars so capture
# the action when it happens so we can use it to filter scroll bar value changed events
# ImageDisplay.__LOG.debug("bar action handled: {0}", action)
self.__last_scrollbar_action = action
@pyqtSlot(int)
def __handle_horizontal_bar_changed(self, value:int):
# Events here when the user moves the scrollbar or we call setValue() on the scrollbar
# Only emit if the an action was set meaning it came from a user interaction rather than a call to setValue
# ImageDisplay.__LOG.debug("Horiz scroll change to: {0}, last action: {1}", value, self.__last_scrollbar_action)
if self.__last_scrollbar_action != -1:
self.viewport_scrolled.emit(ViewLocationChangeEvent(self.get_view_center()))
self.__last_scrollbar_action = -1
@pyqtSlot(int)
def __handle_vertical_bar_changed(self, value:int):
# Events here when the user moves the scrollbar or we call setValue() on the scrollbar
# Only emit if the an action was set meaning it came from a user interaction rather than a call to setValue
# ImageDisplay.__LOG.debug("Vert scroll change to: {0}, last action: {1}", value, self.__last_scrollbar_action)
if self.__last_scrollbar_action != -1:
self.viewport_scrolled.emit(ViewLocationChangeEvent(self.get_view_center()))
self.__last_scrollbar_action = -1
def __display_image(self):
# height and width of the image in pixels or the 1 to 1 size
image_height, image_width = self.__image.image_shape()
self.__image_size = QSize(image_width, image_height)
self.__qimage:QImage = QImage(self.__image.image_data(), self.__image_size.width(),
self.__image_size.height(), self.__image.bytes_per_line(), self.__qimage_format)
self.__pix_map:QPixmap = QPixmap.fromImage(self.__qimage)
self.__image_label.setPixmap(self.__pix_map)
self.setWidget(self.__image_label)
# small margins to give a little extra room so the cursor doesn't change too soon.
self.setViewportMargins(self.__margin_width, self.__margin_height,
self.__margin_width, self.__margin_height)
self.show()
# TODO not sure we need this but keep it for the example for now
@pyqtSlot(AdjustedMouseEvent)
def __double_click_handler(self, event:AdjustedMouseEvent):
ImageDisplay.__LOG.debug("Double clicked x: {0} y: {1}",
event.pixel_x() + 1, event.pixel_y() + 1)
def __set_pixmap(self):
self.__image_label.setPixmap(self.__pix_map)
new_size = self.__pix_map.size()
ImageDisplay.__LOG.debug("setting image size: {0}", new_size)
self.resize(new_size)
self.image_resized.emit(ImageResizeEvent(new_size, self.viewport().size()))
def __update_scroll_bars(self, old_viewport_size:QSize, new_viewport_size:QSize):
doc_width = self.__image_label.size().width()
if new_viewport_size.width() > doc_width:
# doing this eliminates flicker when viewport is larger than doc
if self.horizontalScrollBar().maximum() != 0:
self.horizontalScrollBar().setMaximum(0)
elif old_viewport_size.width() != new_viewport_size.width():
new_max_width = doc_width - new_viewport_size.width()
new_horiz_step = doc_width - new_max_width
ImageDisplay.__LOG.debug("Resizing horizontal scroll max to {0}, step {1}, doc size {2}",
new_max_width, new_horiz_step, self.__image_label.size().width())
self.horizontalScrollBar().setPageStep(new_horiz_step)
self.horizontalScrollBar().setMaximum(new_max_width)
doc_height = self.__image_label.height()
if new_viewport_size.height() > doc_height:
if self.verticalScrollBar().maximum() != 0:
self.verticalScrollBar().setMaximum(0)
elif old_viewport_size.height() != new_viewport_size.height():
new_max_height = doc_height - new_viewport_size.height()
new_vert_step = doc_height - new_max_height
ImageDisplay.__LOG.debug("Resizing vertical scroll max to {0}, step {1}, doc size {2}",
new_max_height, new_vert_step, self.__image_label.size().width())
self.verticalScrollBar().setPageStep(new_vert_step)
self.verticalScrollBar().setMaximum(new_max_height)
def get_view_center(self) -> QPoint:
# x is horizontal scroll bar, y is vertical scroll bar
x = floor(self.horizontalScrollBar().pageStep()/2) + self.horizontalScrollBar().value()
y = floor(self.verticalScrollBar().pageStep()/2) + self.verticalScrollBar().value()
return QPoint(x, y)
def center_in_viewport(self, center:QPoint):
# x is horizontal scroll bar, y is vertical scroll bar
new_x = center.x()
new_y = center.y()
if 0 < new_x <= self.__image_label.size().width() and \
0 < new_y <= self.__image_label.size().height():
h_val = new_x - floor(self.horizontalScrollBar().pageStep()/2)
if h_val < 0:
h_val = 0
v_val = new_y - floor(self.verticalScrollBar().pageStep()/2)
if v_val < 0:
v_val = 0
self.horizontalScrollBar().setValue(h_val)
self.verticalScrollBar().setValue(v_val)
def locator_position(self) -> QPoint:
return self.__image_label.locator_position()
def set_locator_position(self, postion:QPoint):
self.__image_label.set_locator_position(postion)
def locator_size(self) -> QSize:
return self.__image_label.locator_size()
def set_locator_size(self, size:QSize):
self.__image_label.set_locator_size(size)
def refresh_image(self):
self.__display_image()
def remove_all_regions(self):
self.__image_label.remove_all_regions()
def scale_image(self, factor:float):
"""Changes the scale relative to the original image size maintaining aspect ratio.
The image is reset from the original QImage each time to prevent degradation"""
ImageDisplay.__LOG.debug("scaling image by: {0}", factor)
pix_map = QPixmap.fromImage(self.__qimage)
if factor != 1.0:
new_size = self.__image_size * factor
# Use Qt.FastTransformation so pixels can be distinguished when zoomed in
pix_map = pix_map.scaled(new_size, Qt.KeepAspectRatio, Qt.FastTransformation)
self.__pix_map = pix_map
self.__set_pixmap()
def scale_to_size(self, new_size:QSize):
"""Scale the image to the given size maintaining aspect ratio. See http://doc.qt.io/qt-5/qpixmap.html#scaled
for information about how the aspect ratio is handled using Qt.KeepAspectRatio
Do not call repeatedly without a call to reset_size as image will blur with repeated scaling"""
# Use Qt.FastTransformation so pixels can be distinguished when zoomed in
self.__pix_map = self.__pix_map.scaled(new_size, Qt.KeepAspectRatio, Qt.FastTransformation)
ImageDisplay.__LOG.debug("scaling to size: {0}", new_size)
self.__set_pixmap()
def scale_to_height(self, height:int):
"""Scale the image to the given height maintaining aspect ratio.
Do not call repeatedly without a call to reset_size as image will blur with repeated scaling"""
if self.__image_label.has_locator():
ImageDisplay.__LOG.debug("scale_to_height locator size: {0}, pos: {1}", self.__image_label.locator_size(), self.__image_label.locator_position())
# Use Qt.FastTransformation so pixels can be distinguished when zoomed in
self.__pix_map = self.__pix_map.scaledToHeight(height, Qt.FastTransformation)
ImageDisplay.__LOG.debug("scaling to height: {0}", height)
self.__set_pixmap()
def scale_to_width(self, width:int):
"""Scale the image to the given width maintaining aspect ratio.
Do not call repeatedly without a call to reset_size as image will blur with repeated scaling"""
# Use Qt.FastTransformation so pixels can be distinguished when zoomed in
self.__pix_map = self.__pix_map.scaledToWidth(width, Qt.FastTransformation)
ImageDisplay.__LOG.debug("scaling to width: {0}", width)
self.__set_pixmap()
def reset_size(self):
"""reset the image size to 1 to 1"""
# Reload the image, repeated scaling blurs the image
if self.__image_label.has_locator():
ImageDisplay.__LOG.debug("reset_size locator size: {0}, pos: {1}", self.__image_label.locator_size(),
self.__image_label.locator_position())
self.__pix_map = QPixmap.fromImage(self.__qimage)
self.__set_pixmap()
def original_image_width(self) -> int:
"""image width in pixels at 1 to 1"""
return self.__image_size.width()
def image_width(self) -> int:
"""current image width"""
return self.__pix_map.size().width()
def original_image_height(self) -> int:
"""image height in pixels at 1 to 1"""
return self.__image_size.height()
def image_height(self) -> int:
"""current image height"""
return self.__pix_map.size().height()
def margin_width(self) -> int:
return self.__margin_width
def margin_height(self) -> int:
return self.__margin_height
def add_selected_area(self, area:AreaSelectedEvent):
self.__image_label.add_selected_area(area)
def save_image(self, file_name:str):
if not file_name.endswith(".jpg") and not file_name.endswith(".png") and not file_name.endswith(".xpm"):
file_name += ".jpg"
self.__pix_map.save(file_name, quality=100)
def resize(self, size:QSize):
ImageDisplay.__LOG.debug("Resizing widget to: {0}", size)
# This adjust my size and the display widget and causes the scroll bars to update properly
self.widget().resize(size)
ImageDisplay.__LOG.debug("After resize widget my size: {0}, viewport: {1}, widget: {2}",
self.size(), self.viewport().size(), self.widget().size())
def resizeEvent(self, event:QResizeEvent):
# Note that this only triggers on a user resize of the containing window, not when image size changes
# It gets resize events from the framework when the user changes the window size before the Window gets it
# old size and event size here are viewport sizes
ImageDisplay.__LOG.debug("resizeEvent old size: {0}, new size: {1}", event.oldSize(), event.size())
ImageDisplay.__LOG.debug("resizeEvent viewport size: {0}", self.viewport().size())
# adjust the scrollbars
self.__update_scroll_bars(event.oldSize(), event.size())
self.viewport_changed.emit(ViewChangeEvent(self.get_view_center(), event.size()))
class ImageDisplayWindow(QMainWindow):
__LOG:Logger = LogHelper.logger("ImageDisplayWindow")
pixel_selected = pyqtSignal(AdjustedMouseEvent)
mouse_moved = pyqtSignal(AdjustedMouseEvent)
area_selected = pyqtSignal(AreaSelectedEvent)
closed = pyqtSignal(WindowCloseEvent)
def __init__(self, image:Image, label:str, qimage_format:QImage.Format,
screen_geometry:QRect, location_rect:bool=True, pixel_select:bool=False,
map_info:OpenSpectraHeader.MapInfo=None, parent=None):
super().__init__(parent)
self._map_info = map_info
self.__image = image
self.__image_label = label
self._image_display = ImageDisplay(self.__image, qimage_format, location_rect, pixel_select, self)
self.__init_ui()
self._margin_width = self._image_display.margin_width()
self._margin_height = self._image_display.margin_height()
ImageDisplayWindow.__LOG.debug("margin_width: {0}, margin_height {1}", self._margin_width, self._margin_height)
self._scroll_bar_width = QApplication.style().pixelMetric(QStyle.PM_ScrollBarExtent)
ImageDisplayWindow.__LOG.debug("scroll_bar_width: {0}", self._scroll_bar_width)
self._title_bar_height = QApplication.style().pixelMetric(QStyle.PM_TitleBarHeight)
ImageDisplayWindow.__LOG.debug("title_bar_height: {0}", self._title_bar_height)
self._frame_width = QApplication.style().pixelMetric(QStyle.PM_DefaultFrameWidth)
ImageDisplayWindow.__LOG.debug("frame_width: {0}", self._frame_width)
self._screen_geometry = screen_geometry
ImageDisplayWindow.__LOG.debug("screen geometry: {0}", self._screen_geometry)
def __init_ui(self):
self.setWindowTitle(self.__image_label)
self.setCentralWidget(self._image_display)
self._image_display.setAlignment(Qt.AlignHCenter)
self._mouse_widget = QDockWidget("Mouse", self)
self._mouse_widget.setFeatures(QDockWidget.NoDockWidgetFeatures)
self._mouse_widget.setTitleBarWidget(QWidget(None))
self._mouse_viewer = MouseCoordinates(self._map_info)
# set to fixed height so we know how to layout the image display window
self._mouse_viewer.setFixedHeight(16)
self._image_display.mouse_move.connect(self._mouse_viewer.on_mouse_move)
self._image_display.left_clicked.connect(self.pixel_selected)
self._image_display.mouse_move.connect(self.mouse_moved)
self._image_display.area_selected.connect(self.area_selected)
self._mouse_widget.setWidget(self._mouse_viewer)
self.addDockWidget(Qt.BottomDockWidgetArea, self._mouse_widget)
def image_label(self) -> str:
return self.__image_label
@pyqtSlot(AreaSelectedEvent)
def handle_region_selected(self, event:AreaSelectedEvent):
"""Handle area select events from another associated window"""
self._image_display.add_selected_area(event)
def remove_all_regions(self):
self._image_display.remove_all_regions()
def refresh_image(self):
self._image_display.refresh_image()
def save_image(self, file_name:str):
self._image_display.save_image(file_name)
def closeEvent(self, event:QCloseEvent):
MainImageDisplayWindow.__LOG.debug("About to emit closed...")
self.closed.emit(WindowCloseEvent(self))
# accepting hides the window
event.accept()
class ZoomImageDisplayWindow(ImageDisplayWindow):
__LOG:Logger = LogHelper.logger("ZoomImageDisplayWindow")
zoom_changed = pyqtSignal(ViewZoomChangeEvent)
location_changed = pyqtSignal(ViewLocationChangeEvent)
view_changed = pyqtSignal(ViewChangeEvent)
def __init__(self, image:Image, label, qimage_format:QImage.Format,
screen_geometry:QRect, zoom_factor:float, map_info:OpenSpectraHeader.MapInfo=None,
parent=None):
super().__init__(image, label, qimage_format, screen_geometry, False, True, map_info, parent)
self.__last_display_center:QPoint = None
self._image_display.image_resized.connect(self.__handle_image_resize)
self._image_display.viewport_changed.connect(self.__handle_view_changed)
self._image_display.viewport_scrolled.connect(self.__handle_image_scroll)
# TODO for testing only, remove if not used otherwise
self._image_display.right_clicked.connect(self.__handle_right_click)
self.__zoom_factor = zoom_factor
self.__current_zoom = 1.0
self.__zoom_widget = ZoomWidget(self, self.__current_zoom)
self.__zoom_dock_widget = QDockWidget("Mouse", self)
self.__zoom_dock_widget.setTitleBarWidget(QWidget(None))
self.__zoom_dock_widget.setWidget(self.__zoom_widget)
self.addDockWidget(Qt.BottomDockWidgetArea, self.__zoom_dock_widget)
# make it so min size provides a veiwport of 150 x 150
self.__minimum_size = QSize(150, 150)
self.setMinimumSize(self.__minimum_size)
# initial size setting, figure out a more sensible way to determine initial size
self.__nom_size = QSize(400, 350)
self.resize(self.__nom_size)
@pyqtSlot()
def handle_zoom_in(self):
self.__last_display_center = self._image_display.get_view_center() / self.__current_zoom
self.__current_zoom *= self.__zoom_factor
self.__set_zoom()
@pyqtSlot()
def handle_zoom_out(self):
self.__last_display_center = self._image_display.get_view_center() / self.__current_zoom
self.__current_zoom *= 1 / self.__zoom_factor
# limit zoom out to going back to 1 to 1
if self.__current_zoom < 1.0:
self.__current_zoom = 1.0
self.__set_zoom()
@pyqtSlot()
def handle_zoom_reset(self):
self.__last_display_center = self._image_display.get_view_center() / self.__current_zoom
self.__current_zoom = 1.0
self.__set_zoom()
@pyqtSlot(float)
def handle_zoom_factor_changed(self, value:float):
self.__zoom_factor = value
@pyqtSlot(ImageResizeEvent)
def __handle_image_resize(self, event:ImageResizeEvent):
"""Receives notice of the new image size"""
ZoomImageDisplayWindow.__LOG.debug("image resize event, new size: {0}, last center: {1}, new viewport size: {2}",
event.image_size(), self.__last_display_center, event.viewport_size())
if self.__last_display_center is not None:
new_center:QPoint = self.__last_display_center * self.__current_zoom
ZoomImageDisplayWindow.__LOG.debug("new center: {0}", new_center)
self._image_display.center_in_viewport(new_center)
self.zoom_changed.emit(ViewZoomChangeEvent(self.__current_zoom, event.viewport_size() / self.__current_zoom))
# TODO for testing only, remove if not used otherwise
@pyqtSlot(AdjustedMouseEvent)
def __handle_right_click(self, event:AdjustedMouseEvent):
ZoomImageDisplayWindow.__LOG.debug("My size: {0}", self.size())
ZoomImageDisplayWindow.__LOG.debug("ImageDisplay size: {0}", self._image_display.size())
ZoomImageDisplayWindow.__LOG.debug("ImageDisplay.viewport size: {0}", self._image_display.viewport().size())
def __handle_view_changed(self, event:ViewChangeEvent):
# Handle when viewport is resized
event.scale(1 / self.__current_zoom)
self.view_changed.emit(event)
@pyqtSlot(ViewLocationChangeEvent)
def __handle_image_scroll(self, event:ViewLocationChangeEvent):
# Handle when scrollbars move
ZoomImageDisplayWindow.__LOG.debug("image scroll handled, center: {0}", event.center())
event.scale(1 / self.__current_zoom)
self.location_changed.emit(event)
def __set_zoom(self):
self._image_display.scale_image(self.__current_zoom)
self.__zoom_widget.set_zoom_label(self.__current_zoom)
def __center_in_viewport(self, center:QPoint):
# Logging here is huge overkill uncomment to debug only
# ZoomImageDisplayWindow.__LOG.debug("centering view to: {0}", center)
self._image_display.center_in_viewport(center)
@pyqtSlot(ViewLocationChangeEvent)
def handle_location_changed(self, event:ViewLocationChangeEvent):
# Handles when the locator is moved in the main window
self.__center_in_viewport(event.center() * self.__current_zoom)
class MainImageDisplayWindow(ImageDisplayWindow):
__LOG:Logger = LogHelper.logger("MainImageDisplayWindow")
view_location_changed = pyqtSignal(ViewLocationChangeEvent)
def __init__(self, image:Image, label, qimage_format:QImage.Format,
screen_geometry:QRect, map_info:OpenSpectraHeader.MapInfo=None,
parent=None):
super().__init__(image, label, qimage_format, screen_geometry, True, False, map_info, parent)
self._image_display.right_clicked.connect(self.__handle_right_click)
self._image_display.image_resized.connect(self.__handle_image_resize)
self._image_display.locator_moved.connect(self.__handle_location_changed)
# Prevents context menus from showing on right click
# Only way I could find to prevent the dock widget context menu from
# appearing on right click event even though it doesn't seem
# it actually makes up to this window
self.setContextMenuPolicy(Qt.PreventContextMenu)
self.__calculate_sizes()
def __calculate_sizes(self):
self.__mouse_viewer_height = self._mouse_viewer.height()
MainImageDisplayWindow.__LOG.debug("mouse_viewer_height: {0}", self.__mouse_viewer_height)
self.__oversize_width = self._screen_geometry.width() - self._frame_width * 2
self.__oversize_height = self._screen_geometry.height() - self._title_bar_height
# figure out how much screen space we have for size image to fit
fit_height = self._screen_geometry.height() - self._title_bar_height - \
self.__mouse_viewer_height - self._frame_width * 2 - self._margin_height * 2
fit_width = self._screen_geometry.width() - self._frame_width * 2 - self._margin_width * 2
# This is the image size we'll ask for when we want to fit to available screen
self.__fit_to_size = QSize(fit_width, fit_height)
MainImageDisplayWindow.__LOG.debug("fit w: {0}, h: {1}", self.__fit_to_size.width(), self.__fit_to_size.height())
self.__init_size()
def __init_size(self):
MainImageDisplayWindow.__LOG.debug("self._image_display.image_width(): {0}", self._image_display.original_image_width())
MainImageDisplayWindow.__LOG.debug("self._image_display.image_height(): {0}", self._image_display.original_image_height())
self.__set_for_image_size(QSize(self._image_display.original_image_width(), self._image_display.original_image_height()))
self.__is_one_to_one = True
def __set_for_image_size(self, size:QSize):
MainImageDisplayWindow.__LOG.debug("Setting size for image size: {0}", size)
self.__no_scroll_width = size.width() + self._frame_width * 2 + self._margin_width * 2
self.__scroll_width = self.__no_scroll_width + self._scroll_bar_width
self.__no_scroll_height = size.height() + self._frame_width * 2 + self._margin_height * 2 + self.__mouse_viewer_height
self.__scroll_height = self.__no_scroll_height + self._scroll_bar_width
MainImageDisplayWindow.__LOG.debug("no scroll w: {0}, h: {1}, scroll w: {2}, h: {3}",
self.__no_scroll_width, self.__no_scroll_height, self.__scroll_width, self.__scroll_height)
min_width = self.__no_scroll_width
min_height = self.__no_scroll_height
if min_height > self._screen_geometry.height() and min_width > self._screen_geometry.width():
min_height = self.__oversize_height
min_width = self.__oversize_width
elif min_height > self._screen_geometry.height():
min_width = self.__scroll_width
min_height = self.__oversize_height
elif min_width > self._screen_geometry.width():
min_height = self.__scroll_height
min_width = self.__oversize_width
self.setMinimumSize(min_width, min_height)
self.resize(min_width, min_height)
@pyqtSlot(AdjustedMouseEvent)
def __handle_right_click(self, event:AdjustedMouseEvent):
MainImageDisplayWindow.__LOG.debug("Got right click!")
if self.__is_one_to_one:
self.__is_one_to_one = False
if self._image_display.height() > self.__fit_to_size.height() and self._image_display.width() > self.__fit_to_size.width():
self._image_display.scale_to_size(self.__fit_to_size)
elif self._image_display.height() > self.__fit_to_size.height():
self._image_display.scale_to_height(self.__fit_to_size.height())
elif self._image_display.width() > self.__fit_to_size.width():
self._image_display.scale_to_width(self.__fit_to_size.width())
else:
self.__is_one_to_one = True
else:
self._image_display.reset_size()
self.__is_one_to_one = True
@pyqtSlot(ImageResizeEvent)
def __handle_image_resize(self, event:ImageResizeEvent):
MainImageDisplayWindow.__LOG.debug("image resize event, new image size: {0}, viewport size: {1}",
event.image_size(), event.viewport_size())
self.__set_for_image_size(event.image_size())
MainImageDisplayWindow.__LOG.debug("window new size: {0}", self.size())
@pyqtSlot(ViewZoomChangeEvent)
def __handle_zoom_changed(self, event:ViewZoomChangeEvent):
# Handle a zoom change in the zoom window
MainImageDisplayWindow.__LOG.debug("new zoom factor: {0}, size: {1}", event.factor(), event.size())
current_location = self._image_display.locator_position()
self._image_display.set_locator_size(event.size())
self._image_display.set_locator_position(current_location)
@pyqtSlot(ViewLocationChangeEvent)
def __handle_zoom_window_location_changed(self, event:ViewLocationChangeEvent):
# Handle image being scrolled in the zoom window
self._image_display.set_locator_position(event.center())
@pyqtSlot(ViewLocationChangeEvent)
def __handle_location_changed(self, event:ViewLocationChangeEvent):
# Handle locator moves in my ImageDisplay
# TODO if nothing else needs to be done, hook signal to signal, logging is huge overkill here
# MainImageDisplayWindow.__LOG.debug("handle view location to: {0}", event.center())
self.view_location_changed.emit(event)
@pyqtSlot(ViewChangeEvent)
def __handle_view_changed(self, event:ViewChangeEvent):
MainImageDisplayWindow.__LOG.debug("handle view changed to size: {0}, loc: {1}", event.size(), event.center())
self._image_display.set_locator_size(event.size())
self._image_display.set_locator_position(event.center())
def connect_zoom_window(self, window:ZoomImageDisplayWindow):
window.zoom_changed.connect(self.__handle_zoom_changed)
window.location_changed.connect(self.__handle_zoom_window_location_changed)
window.view_changed.connect(self.__handle_view_changed)
self.view_location_changed.connect(window.handle_location_changed)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
29871,
10682,
287,
491,
529,
5813,
29958,
322,
529,
5813,
29958,
373,
29871,
29896,
29914,
29906,
29896,
29914,
29896,
29929,
29871,
29953,
29901,
29906,
29929,
11278,
29889,
13,
29937,
29871,
9208,
9120,
29871,
29896,
29914,
29906,
29896,
29914,
29896,
29929,
29871,
29953,
29901,
29906,
29929,
11278,
13,
29937,
29871,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
29889,
2178,
10462,
21676,
29889,
13,
13,
5215,
4256,
8504,
13,
5215,
931,
13,
3166,
14115,
1053,
1174,
398,
13,
3166,
5844,
1053,
11904,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
10772,
17303,
29945,
29889,
17303,
9203,
1053,
11451,
17915,
10140,
284,
29892,
14705,
29892,
660,
2624,
29892,
660,
2061,
29892,
660,
14745,
29892,
660,
3505,
29892,
11451,
17915,
29903,
8276,
29892,
660,
7364,
29892,
660,
5228,
13,
3166,
10772,
17303,
29945,
29889,
17303,
28707,
1053,
660,
29925,
26456,
29892,
660,
2940,
29892,
660,
29925,
861,
1958,
29892,
660,
14346,
2624,
29892,
660,
1666,
675,
2624,
29892,
660,
11123,
2624,
29892,
660,
28939,
2624,
29892,
660,
29925,
475,
357,
29892,
320,
13,
1678,
660,
7713,
17125,
29892,
660,
19890,
29892,
660,
3306,
29892,
660,
27680,
29892,
660,
29925,
475,
357,
2605,
29892,
660,
7713,
17125,
29943,
13,
3166,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
10463,
13799,
29892,
660,
4775,
29892,
660,
3505,
15644,
29892,
660,
6330,
5907,
29892,
660,
29928,
1698,
8801,
29892,
660,
8801,
29892,
660,
27031,
3125,
29892,
320,
13,
1678,
660,
29950,
3313,
3453,
29892,
660,
4873,
29892,
660,
5568,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
12655,
1053,
611,
13,
13,
3166,
13246,
1103,
336,
29889,
3027,
1053,
7084,
29892,
5158,
19124,
13,
3166,
13246,
1103,
336,
29889,
22156,
3135,
2273,
336,
29918,
8504,
1053,
11069,
2776,
4074,
342,
13,
3166,
13246,
1103,
336,
29889,
22156,
1103,
336,
29918,
1445,
1053,
4673,
29903,
1103,
336,
7850,
13,
3166,
13246,
1103,
336,
29889,
13239,
1053,
4522,
10739,
29892,
28468,
29892,
6106,
11285,
13,
13,
13,
1990,
9159,
13954,
29898,
2527,
562,
605,
29922,
10873,
11285,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
17255,
27703,
353,
518,
17303,
29889,
1127,
29892,
14705,
29889,
12692,
29892,
14705,
29889,
9539,
29892,
14705,
29889,
1270,
273,
29892,
14705,
29889,
29136,
29892,
13,
9651,
14705,
29889,
11082,
6381,
29892,
14705,
29889,
21012,
29892,
14705,
29889,
26031,
9039,
29892,
14705,
29889,
26031,
24599,
29892,
14705,
29889,
26031,
21319,
29892,
13,
9651,
14705,
29889,
26031,
29907,
10094,
29892,
14705,
29889,
26031,
19095,
6381,
29892,
14705,
29889,
26031,
29979,
4743,
29892,
14705,
29889,
26031,
29954,
764,
29892,
13,
9651,
14705,
29889,
4366,
29954,
764,
29962,
13,
4706,
1583,
17255,
2248,
353,
29871,
29900,
13,
13,
1678,
822,
1857,
29918,
2780,
29898,
1311,
29897,
1599,
660,
3306,
29901,
13,
4706,
736,
1583,
17255,
27703,
29961,
1311,
17255,
2248,
29962,
13,
13,
1678,
822,
2446,
29918,
2780,
29898,
1311,
29897,
1599,
660,
3306,
29901,
13,
4706,
1583,
17255,
2248,
4619,
29871,
29896,
13,
4706,
565,
1583,
17255,
2248,
6736,
7431,
29898,
1311,
17255,
27703,
1125,
13,
9651,
1583,
29889,
12071,
580,
13,
4706,
736,
1583,
17255,
27703,
29961,
1311,
17255,
2248,
29962,
13,
13,
1678,
822,
10092,
29898,
1311,
1125,
13,
4706,
1583,
17255,
2248,
353,
29871,
29900,
13,
13,
13,
1990,
2087,
5143,
287,
14346,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
29892,
921,
29918,
7052,
29901,
7411,
29892,
343,
29918,
7052,
29901,
7411,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
3696,
353,
1741,
13,
4706,
1583,
17255,
29886,
15711,
29918,
29916,
353,
11904,
29898,
3696,
29889,
29916,
580,
334,
921,
29918,
7052,
29897,
13,
4706,
1583,
17255,
29886,
15711,
29918,
29891,
353,
11904,
29898,
3696,
29889,
29891,
580,
334,
343,
29918,
7052,
29897,
13,
4706,
1583,
17255,
29886,
15711,
29918,
1066,
353,
313,
1311,
17255,
29886,
15711,
29918,
29916,
29892,
1583,
17255,
29886,
15711,
29918,
29891,
29897,
13,
13,
1678,
822,
9495,
29918,
3696,
29898,
1311,
29897,
1599,
660,
14346,
2624,
29901,
13,
4706,
736,
1583,
17255,
3696,
13,
13,
1678,
822,
15526,
29918,
29916,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
29886,
15711,
29918,
29916,
13,
13,
1678,
822,
15526,
29918,
29891,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
29886,
15711,
29918,
29891,
13,
13,
1678,
822,
15526,
29918,
1066,
29898,
1311,
29897,
1599,
313,
524,
29892,
938,
1125,
13,
4706,
736,
1583,
17255,
29886,
15711,
29918,
1066,
13,
13,
13,
1990,
11069,
9323,
2001,
29898,
29984,
2061,
1125,
13,
13,
1678,
17304,
839,
353,
11451,
17915,
10140,
284,
29898,
29984,
2061,
29897,
13,
1678,
5764,
353,
11451,
17915,
10140,
284,
29898,
29984,
2061,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
921,
29918,
2502,
290,
29918,
19790,
29901,
5785,
29892,
343,
29918,
2502,
290,
29918,
19790,
29901,
7411,
29892,
2927,
29901,
29984,
3306,
29892,
338,
29918,
265,
29901,
11227,
29892,
13,
9651,
23187,
29918,
2084,
29901,
29984,
29925,
475,
357,
2605,
29922,
8516,
29892,
3291,
29901,
1293,
29961,
29984,
5228,
13192,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
29916,
29918,
2502,
290,
29918,
19790,
353,
921,
29918,
2502,
290,
29918,
19790,
13,
4706,
1583,
17255,
29891,
29918,
2502,
290,
29918,
19790,
353,
343,
29918,
2502,
290,
29918,
19790,
13,
4706,
1583,
17255,
2780,
353,
2927,
13,
4706,
1583,
17255,
275,
29918,
265,
353,
338,
29918,
265,
13,
4706,
1583,
17255,
29886,
475,
357,
29918,
2084,
353,
23187,
29918,
2084,
13,
4706,
1583,
17255,
9748,
353,
3291,
13,
13,
1678,
822,
23187,
29918,
2084,
29898,
1311,
29897,
1599,
660,
29925,
475,
357,
2605,
29901,
13,
4706,
736,
1583,
17255,
29886,
475,
357,
29918,
2084,
13,
13,
1678,
822,
3291,
29898,
1311,
29897,
1599,
2391,
29961,
29984,
5228,
5387,
13,
4706,
736,
1583,
17255,
9748,
13,
13,
1678,
822,
9773,
29918,
9748,
29898,
1311,
29892,
3291,
29901,
1293,
29961,
29984,
5228,
29962,
1125,
13,
4706,
1583,
17255,
9748,
29889,
21843,
29898,
9748,
29897,
13,
13,
1678,
822,
2927,
29898,
1311,
29897,
1599,
660,
3306,
29901,
13,
4706,
736,
1583,
17255,
2780,
13,
13,
1678,
822,
338,
29918,
265,
29898,
1311,
29897,
1599,
6120,
29901,
13,
4706,
736,
1583,
17255,
275,
29918,
265,
13,
13,
1678,
822,
731,
29918,
275,
29918,
265,
29898,
1311,
29892,
338,
29918,
265,
29901,
11227,
1125,
13,
4706,
1583,
17255,
275,
29918,
265,
353,
338,
29918,
265,
13,
4706,
1583,
29889,
29873,
468,
29887,
839,
29889,
21976,
29898,
1311,
29897,
13,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
1583,
29889,
15603,
29889,
21976,
29898,
1311,
29897,
13,
13,
1678,
822,
921,
29918,
2502,
290,
29918,
19790,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
736,
1583,
17255,
29916,
29918,
2502,
290,
29918,
19790,
13,
13,
1678,
822,
343,
29918,
2502,
290,
29918,
19790,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
736,
1583,
17255,
29891,
29918,
2502,
290,
29918,
19790,
13,
13,
13,
1990,
18379,
11123,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3646,
29901,
29984,
6330,
5907,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
5182,
353,
3646,
13,
13,
1678,
822,
3646,
29898,
1311,
29897,
1599,
660,
6330,
5907,
29901,
13,
4706,
736,
1583,
17255,
5182,
13,
13,
13,
1990,
18320,
8592,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5120,
29901,
18457,
2776,
4074,
342,
29892,
2479,
29918,
667,
29901,
18457,
9323,
2001,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
12803,
353,
5120,
13,
4706,
1583,
17255,
4990,
29918,
667,
353,
2479,
29918,
667,
13,
13,
1678,
822,
5120,
29898,
1311,
29897,
1599,
11069,
2776,
4074,
342,
29901,
13,
4706,
736,
1583,
17255,
12803,
13,
13,
1678,
822,
2479,
29918,
667,
29898,
1311,
29897,
1599,
11069,
9323,
2001,
29901,
13,
4706,
736,
1583,
17255,
4990,
29918,
667,
13,
13,
13,
1990,
7084,
1666,
675,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29918,
2311,
29901,
29984,
3505,
29892,
1776,
637,
29918,
2311,
29901,
29984,
3505,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
3027,
29918,
2311,
353,
1967,
29918,
2311,
13,
4706,
1583,
17255,
1493,
637,
29918,
2311,
353,
1776,
637,
29918,
2311,
13,
13,
1678,
822,
1967,
29918,
2311,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
736,
1583,
17255,
3027,
29918,
2311,
13,
13,
1678,
822,
1776,
637,
29918,
2311,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
736,
1583,
17255,
1493,
637,
29918,
2311,
13,
13,
13,
1990,
4533,
29999,
29667,
7277,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7329,
29901,
7411,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
19790,
353,
7329,
13,
4706,
1583,
17255,
2311,
353,
2159,
13,
13,
1678,
822,
7329,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
736,
1583,
17255,
19790,
13,
13,
1678,
822,
2159,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
736,
1583,
17255,
2311,
13,
13,
13,
1990,
4533,
6508,
7277,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4818,
29901,
29984,
5228,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
5064,
353,
4818,
13,
13,
1678,
822,
4818,
29898,
1311,
29897,
1599,
660,
5228,
29901,
13,
4706,
736,
1583,
17255,
5064,
13,
13,
1678,
822,
6287,
29898,
1311,
29892,
6287,
29918,
19790,
29901,
7411,
1125,
13,
4706,
1583,
17255,
5064,
334,
29922,
6287,
29918,
19790,
13,
13,
13,
1990,
4533,
7277,
2624,
29898,
29984,
2061,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4818,
29901,
29984,
5228,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
8516,
29897,
13,
4706,
1583,
17255,
5064,
353,
4818,
13,
4706,
1583,
17255,
2311,
353,
2159,
13,
13,
1678,
822,
2159,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
736,
1583,
17255,
2311,
13,
13,
1678,
822,
4818,
29898,
1311,
29897,
1599,
660,
5228,
29901,
13,
4706,
736,
1583,
17255,
5064,
13,
13,
1678,
822,
6287,
29898,
1311,
29892,
6287,
29918,
19790,
29901,
7411,
1125,
13,
4706,
1583,
17255,
5064,
334,
29922,
6287,
29918,
19790,
13,
4706,
1583,
17255,
2311,
334,
29922,
6287,
29918,
19790,
13,
13,
13,
1990,
25992,
7967,
24266,
29898,
2239,
1107,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
14346,
7967,
24266,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2910,
29918,
3888,
29901,
6585,
29903,
1103,
336,
7850,
29889,
3388,
3401,
29922,
8516,
29892,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
4706,
1583,
17255,
1958,
29918,
3888,
353,
2910,
29918,
3888,
13,
4706,
565,
1583,
17255,
1958,
29918,
3888,
338,
451,
6213,
29901,
13,
9651,
1583,
17255,
689,
2620,
353,
376,
4559,
29901,
426,
29900,
29913,
1196,
29901,
426,
29896,
1118,
921,
29901,
426,
29906,
29901,
29889,
29941,
29888,
1118,
343,
29901,
426,
29941,
29901,
29889,
29941,
29888,
5038,
13,
4706,
1683,
29901,
13,
9651,
1583,
17255,
689,
2620,
353,
376,
4559,
29901,
426,
29900,
29913,
1196,
29901,
426,
29896,
5038,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
822,
373,
29918,
15769,
29918,
11631,
29898,
1311,
29892,
1741,
29901,
3253,
5143,
287,
14346,
2624,
1125,
13,
4706,
396,
4160,
526,
1035,
1796,
304,
4315,
10350,
1641,
29871,
29896,
2729,
13,
4706,
565,
1583,
17255,
1958,
29918,
3888,
338,
451,
6213,
29901,
13,
9651,
1302,
4339,
353,
1583,
17255,
1958,
29918,
3888,
29889,
15807,
403,
29918,
1111,
24266,
29898,
3696,
29889,
29886,
15711,
29918,
29916,
3285,
1741,
29889,
29886,
15711,
29918,
29891,
3101,
13,
9651,
1583,
29889,
12038,
29898,
1311,
17255,
689,
2620,
29889,
4830,
29898,
3696,
29889,
29886,
15711,
29918,
29916,
580,
718,
29871,
29896,
29892,
1741,
29889,
29886,
15711,
29918,
29891,
580,
718,
29871,
29896,
29892,
13,
18884,
1302,
4339,
29961,
29900,
1402,
1302,
4339,
29961,
29896,
12622,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
12038,
703,
4559,
29901,
426,
29900,
29913,
1196,
29901,
426,
29896,
29913,
1642,
4830,
29898,
13,
18884,
1741,
29889,
29886,
15711,
29918,
29916,
580,
718,
29871,
29896,
29892,
1741,
29889,
29886,
15711,
29918,
29891,
580,
718,
29871,
29896,
876,
13,
13,
13,
1990,
17421,
290,
8801,
29898,
29984,
8801,
1125,
13,
13,
1678,
19342,
29918,
262,
353,
11451,
17915,
10140,
284,
580,
13,
1678,
19342,
29918,
449,
353,
11451,
17915,
10140,
284,
580,
13,
1678,
10092,
29918,
2502,
290,
353,
11451,
17915,
10140,
284,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3847,
29922,
8516,
29892,
2847,
29918,
2502,
290,
29901,
7411,
29922,
29896,
29889,
29900,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
13,
4706,
1583,
17255,
19790,
29918,
1643,
353,
660,
4775,
580,
13,
4706,
1583,
17255,
19790,
29918,
1643,
29889,
842,
26262,
7011,
29898,
29896,
29906,
29897,
13,
4706,
1583,
17255,
19790,
29918,
1643,
29889,
842,
26262,
6110,
29898,
29946,
29900,
29897,
13,
4706,
1583,
29889,
842,
29918,
2502,
290,
29918,
1643,
29898,
11228,
29918,
2502,
290,
29897,
13,
13,
4706,
5912,
353,
660,
29950,
3313,
3453,
580,
13,
4706,
5912,
29889,
842,
21002,
29924,
1191,
1144,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
4706,
5912,
29889,
842,
14658,
29898,
17303,
29889,
2499,
647,
7341,
29897,
13,
4706,
5912,
29889,
1202,
8801,
29898,
1311,
17255,
19790,
29918,
1643,
29897,
13,
4706,
1583,
29889,
842,
3453,
29898,
2680,
29897,
13,
13,
1678,
822,
731,
29918,
2502,
290,
29918,
1643,
29898,
1311,
29892,
716,
29918,
2502,
290,
29918,
19790,
29901,
7411,
1125,
13,
4706,
1583,
17255,
19790,
29918,
1643,
29889,
12038,
703,
25641,
29945,
29889,
29906,
29888,
29913,
1642,
4830,
29898,
1482,
29918,
2502,
290,
29918,
19790,
876,
13,
13,
13,
1990,
830,
3901,
29637,
27065,
1061,
7295,
13,
1678,
9995,
2831,
263,
2183,
15526,
4629,
373,
263,
19342,
287,
297,
1967,
679,
29918,
9748,
3639,
13,
1678,
599,
310,
278,
17036,
393,
881,
367,
12061,
373,
278,
19342,
287,
1967,
304,
4612,
13,
1678,
278,
1021,
4038,
408,
723,
367,
297,
278,
29871,
29896,
304,
29871,
29896,
1967,
15945,
29908,
13,
13,
1678,
4770,
14480,
29901,
28468,
353,
4522,
10739,
29889,
21707,
703,
1123,
3901,
29637,
27065,
1061,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
921,
29918,
2311,
29901,
524,
29892,
343,
29918,
2311,
29901,
524,
29892,
921,
29918,
2502,
290,
29918,
19790,
29901,
7411,
29892,
343,
29918,
2502,
290,
29918,
19790,
29901,
7411,
1125,
13,
4706,
565,
921,
29918,
2502,
290,
29918,
19790,
529,
29871,
29896,
29889,
29900,
470,
343,
29918,
2502,
290,
29918,
19790,
529,
29871,
29896,
29889,
29900,
29901,
13,
9651,
12020,
7865,
2392,
703,
29999,
29667,
13879,
881,
367,
472,
3203,
29871,
29896,
29889,
29900,
470,
7621,
1159,
13,
13,
4706,
1583,
29889,
5504,
29918,
7529,
29898,
29916,
29918,
2311,
29892,
343,
29918,
2311,
29892,
921,
29918,
2502,
290,
29918,
19790,
29892,
343,
29918,
2502,
290,
29918,
19790,
29897,
13,
13,
1678,
822,
2767,
29918,
7529,
29898,
1311,
29892,
921,
29918,
2311,
29901,
524,
29892,
343,
29918,
2311,
29901,
524,
29892,
921,
29918,
2502,
290,
29918,
19790,
29901,
7411,
29892,
343,
29918,
2502,
290,
29918,
19790,
29901,
7411,
1125,
13,
4706,
1583,
17255,
29916,
29918,
3317,
353,
921,
29918,
2311,
13,
4706,
1583,
17255,
29891,
29918,
3317,
353,
343,
29918,
2311,
13,
4706,
1583,
17255,
29916,
29918,
2502,
290,
353,
921,
29918,
2502,
290,
29918,
19790,
13,
4706,
1583,
17255,
29891,
29918,
2502,
290,
353,
343,
29918,
2502,
290,
29918,
19790,
13,
13,
1678,
822,
679,
29918,
9748,
29898,
1311,
29892,
921,
29901,
524,
29892,
343,
29901,
524,
29897,
1599,
2391,
29961,
29984,
5228,
5387,
13,
4706,
565,
921,
6736,
1583,
17255,
29916,
29918,
3317,
29901,
13,
9651,
12020,
7865,
2392,
703,
29916,
995,
1818,
367,
3109,
1135,
426,
29900,
29913,
1642,
4830,
29898,
1311,
17255,
29916,
29918,
3317,
876,
13,
13,
4706,
565,
343,
6736,
1583,
17255,
29891,
29918,
3317,
29901,
13,
9651,
12020,
7865,
2392,
703,
29891,
995,
1818,
367,
3109,
1135,
426,
29900,
29913,
1642,
4830,
29898,
1311,
17255,
29891,
29918,
3317,
876,
13,
13,
4706,
921,
29918,
655,
2986,
353,
11904,
29898,
29916,
29914,
1311,
17255,
29916,
29918,
2502,
290,
29897,
13,
4706,
343,
29918,
655,
2986,
353,
11904,
29898,
29891,
29914,
1311,
17255,
29891,
29918,
2502,
290,
29897,
13,
13,
4706,
921,
29918,
1195,
353,
921,
29918,
3317,
353,
921,
13,
4706,
921,
29918,
791,
353,
921,
448,
29871,
29896,
13,
4706,
1550,
11904,
29898,
29916,
29918,
791,
29914,
1311,
17255,
29916,
29918,
2502,
290,
29897,
1275,
921,
29918,
655,
2986,
29901,
13,
9651,
921,
29918,
1195,
353,
921,
29918,
791,
13,
9651,
921,
29918,
791,
353,
921,
29918,
791,
448,
29871,
29896,
13,
13,
4706,
921,
29918,
791,
353,
921,
718,
29871,
29896,
13,
4706,
1550,
11904,
29898,
29916,
29918,
791,
29914,
1311,
17255,
29916,
29918,
2502,
290,
29897,
1275,
921,
29918,
655,
2986,
29901,
13,
9651,
921,
29918,
3317,
353,
921,
29918,
791,
13,
9651,
921,
29918,
791,
353,
921,
29918,
791,
718,
29871,
29896,
13,
13,
4706,
343,
29918,
1195,
353,
343,
29918,
3317,
353,
343,
13,
4706,
343,
29918,
791,
353,
343,
448,
29871,
29896,
13,
4706,
1550,
11904,
29898,
29891,
29918,
791,
29914,
1311,
17255,
29891,
29918,
2502,
290,
29897,
1275,
343,
29918,
655,
2986,
29901,
13,
9651,
343,
29918,
1195,
353,
343,
29918,
791,
13,
9651,
343,
29918,
791,
353,
343,
29918,
791,
448,
29871,
29896,
13,
13,
4706,
343,
29918,
791,
353,
343,
718,
29871,
29896,
13,
4706,
1550,
11904,
29898,
29891,
29918,
791,
29914,
1311,
17255,
29891,
29918,
2502,
290,
29897,
1275,
343,
29918,
655,
2986,
29901,
13,
9651,
343,
29918,
3317,
353,
343,
29918,
791,
13,
9651,
343,
29918,
791,
353,
343,
29918,
791,
718,
29871,
29896,
13,
13,
4706,
1298,
29918,
1761,
29901,
1293,
29961,
29984,
5228,
29962,
353,
1051,
580,
13,
4706,
363,
921,
29918,
3149,
297,
3464,
29898,
29916,
29918,
1195,
29892,
921,
29918,
3317,
718,
29871,
29896,
1125,
13,
9651,
363,
343,
29918,
3149,
297,
3464,
29898,
29891,
29918,
1195,
29892,
343,
29918,
3317,
718,
29871,
29896,
1125,
13,
18884,
1298,
29918,
1761,
29889,
4397,
29898,
29984,
5228,
29898,
29916,
29918,
3149,
29892,
343,
29918,
3149,
876,
13,
13,
4706,
830,
3901,
29637,
27065,
1061,
17255,
14480,
29889,
8382,
703,
29916,
29918,
1958,
29901,
426,
29900,
1118,
343,
29918,
1958,
29901,
426,
29896,
1118,
921,
29918,
1195,
29901,
426,
29906,
1118,
921,
29918,
3317,
29901,
426,
29941,
1118,
343,
29918,
1195,
29901,
426,
29946,
1118,
343,
29918,
3317,
29901,
426,
29945,
29913,
1642,
13,
9651,
3402,
29898,
29916,
29918,
655,
2986,
29892,
343,
29918,
655,
2986,
29892,
921,
29918,
1195,
29892,
921,
29918,
3317,
29892,
343,
29918,
1195,
29892,
343,
29918,
3317,
876,
13,
13,
4706,
736,
1298,
29918,
1761,
13,
13,
13,
1990,
7084,
4775,
29898,
2239,
1107,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
2940,
4775,
1159,
13,
13,
1678,
770,
9123,
29898,
16854,
1125,
13,
4706,
9531,
353,
29871,
29900,
13,
4706,
12225,
3460,
353,
29871,
29896,
13,
4706,
18492,
292,
353,
29871,
29906,
13,
4706,
23868,
292,
353,
29871,
29941,
13,
13,
1678,
396,
373,
3765,
2828,
591,
679,
1716,
11484,
322,
3765,
4164,
287,
13,
1678,
396,
11097,
565,
591,
817,
1716,
322,
2329,
13,
1678,
4038,
29918,
8391,
353,
11451,
17915,
10140,
284,
29898,
13799,
8592,
2624,
29897,
13,
1678,
2175,
29918,
3808,
287,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
1492,
29918,
3808,
287,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
3765,
29918,
3808,
287,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
9495,
29918,
11631,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
1180,
1061,
29918,
29885,
8238,
353,
11451,
17915,
10140,
284,
29898,
1043,
6508,
7277,
2624,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29918,
2783,
11709,
29901,
29933,
392,
19124,
29892,
4423,
29918,
1621,
29901,
11227,
29922,
5574,
29892,
13,
9651,
15526,
29918,
2622,
29901,
11227,
29922,
8824,
29892,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
13,
4706,
396,
16052,
1749,
1741,
4175,
13,
4706,
1583,
29889,
6252,
2624,
5072,
29898,
1311,
29897,
13,
13,
4706,
396,
7084,
553,
11709,
13,
4706,
1583,
17255,
2783,
11709,
353,
1967,
29918,
2783,
11709,
13,
13,
4706,
396,
9495,
4423,
13,
4706,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
29901,
29984,
5228,
353,
6213,
13,
13,
4706,
396,
12662,
2699,
4475,
304,
278,
1967,
2159,
13,
4706,
1583,
17255,
11228,
29918,
2311,
29901,
29984,
3505,
353,
6213,
13,
4706,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
353,
29871,
29896,
29889,
29900,
13,
4706,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
353,
29871,
29896,
29889,
29900,
13,
13,
4706,
396,
315,
1295,
943,
591,
29915,
645,
671,
13,
4706,
1583,
17255,
4381,
29918,
18127,
353,
1583,
29889,
18127,
580,
13,
4706,
1583,
17255,
20515,
29918,
18127,
353,
660,
19890,
29898,
17303,
29889,
6821,
2662,
3481,
19890,
29897,
13,
4706,
1583,
17255,
4012,
29918,
18127,
353,
660,
19890,
29898,
17303,
29889,
29907,
2124,
19890,
29897,
13,
4706,
1583,
17255,
23945,
29918,
18127,
353,
660,
19890,
29898,
17303,
29889,
5228,
292,
3481,
19890,
29897,
13,
13,
4706,
396,
25455,
278,
1180,
1061,
565,
591,
505,
697,
13,
4706,
565,
4423,
29918,
1621,
29901,
13,
9651,
396,
17250,
2159,
1838,
29915,
29873,
2289,
4383,
29892,
13,
9651,
396,
372,
674,
679,
10365,
287,
2729,
373,
278,
19342,
3474,
2159,
13,
9651,
1583,
17255,
2029,
1061,
29918,
1621,
353,
660,
7364,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29945,
29900,
29892,
29871,
29945,
29900,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
17255,
2029,
1061,
29918,
1621,
353,
6213,
13,
13,
4706,
396,
450,
1051,
310,
12786,
310,
4066,
13,
4706,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29901,
1293,
29961,
18457,
9323,
2001,
29962,
353,
1051,
580,
13,
13,
4706,
396,
9159,
5839,
261,
363,
5120,
310,
4066,
14423,
13,
4706,
1583,
17255,
2780,
29918,
13908,
353,
9159,
13954,
580,
13,
13,
4706,
396,
2043,
17125,
9262,
4452,
13,
4706,
1583,
17255,
3733,
17125,
29901,
29984,
7713,
17125,
353,
6213,
13,
4706,
1583,
17255,
3733,
17125,
29918,
23687,
29901,
29984,
7364,
353,
6213,
13,
13,
4706,
396,
349,
15711,
9262,
4452,
13,
4706,
1583,
17255,
29886,
15711,
29918,
2622,
29901,
11227,
353,
15526,
29918,
2622,
13,
4706,
1583,
17255,
29886,
15711,
29918,
655,
2496,
29901,
1123,
3901,
29637,
27065,
1061,
353,
6213,
13,
4706,
1583,
17255,
29886,
15711,
29918,
1761,
29901,
9302,
29889,
299,
2378,
353,
6213,
13,
4706,
1583,
17255,
12803,
29918,
4990,
29918,
667,
353,
6213,
13,
13,
4706,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
26521,
13,
13,
1678,
822,
756,
29918,
2029,
1061,
29898,
1311,
29897,
1599,
6120,
29901,
13,
4706,
736,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
13,
13,
1678,
822,
1180,
1061,
29918,
3283,
29898,
1311,
29897,
1599,
660,
5228,
29901,
13,
4706,
4974,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
13,
4706,
736,
1583,
17255,
348,
7052,
29918,
3149,
29898,
1311,
17255,
2029,
1061,
29918,
1621,
29889,
5064,
3101,
13,
13,
1678,
822,
731,
29918,
2029,
1061,
29918,
3283,
29898,
1311,
29892,
1400,
291,
29901,
29984,
5228,
1125,
13,
4706,
396,
5717,
304,
445,
1158,
881,
2337,
367,
297,
29871,
29896,
304,
29871,
29896,
10350,
13,
4706,
565,
1583,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
716,
29918,
3283,
29901,
660,
5228,
353,
1583,
17255,
7052,
29918,
3149,
29898,
2490,
291,
29897,
13,
9651,
7084,
4775,
17255,
14480,
29889,
8382,
703,
26740,
1180,
1061,
2602,
29901,
426,
29900,
1118,
6287,
29881,
926,
29901,
426,
29896,
17671,
1400,
291,
29892,
716,
29918,
3283,
29897,
13,
9651,
1583,
17255,
2029,
1061,
29918,
1621,
29889,
11631,
13409,
29898,
1482,
29918,
3283,
29897,
13,
9651,
1583,
29889,
5504,
580,
13,
13,
1678,
822,
1180,
1061,
29918,
2311,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
4974,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
13,
4706,
736,
1583,
17255,
348,
7052,
29918,
2311,
29898,
1311,
17255,
2029,
1061,
29918,
1621,
29889,
2311,
3101,
13,
13,
1678,
822,
731,
29918,
2029,
1061,
29918,
2311,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
396,
5717,
304,
445,
1158,
881,
2337,
367,
297,
29871,
29896,
304,
29871,
29896,
10350,
13,
4706,
565,
1583,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
716,
29918,
2311,
29901,
660,
3505,
353,
1583,
17255,
7052,
29918,
2311,
29898,
2311,
29897,
13,
9651,
7084,
4775,
17255,
14480,
29889,
8382,
703,
26740,
1180,
1061,
2159,
29901,
426,
29900,
1118,
6287,
29881,
2159,
29901,
426,
29896,
17671,
2159,
29892,
716,
29918,
2311,
29897,
13,
9651,
1583,
17255,
2029,
1061,
29918,
1621,
29889,
842,
3505,
29898,
1482,
29918,
2311,
29897,
13,
9651,
1583,
29889,
5504,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
13799,
8592,
2624,
29897,
13,
1678,
822,
788,
29918,
8391,
29918,
6203,
29898,
1311,
29892,
1741,
29901,
13799,
8592,
2624,
1125,
13,
4706,
2479,
29918,
667,
353,
1741,
29889,
4990,
29918,
667,
580,
13,
4706,
2479,
29918,
667,
29889,
29873,
468,
29887,
839,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
12803,
29918,
29873,
468,
29887,
839,
29897,
13,
4706,
2479,
29918,
667,
29889,
15603,
29889,
6915,
29898,
1311,
17255,
8411,
1649,
12803,
29918,
15603,
29897,
13,
4706,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29889,
4397,
29898,
4990,
29918,
667,
29897,
13,
4706,
1583,
29889,
5504,
580,
13,
13,
1678,
822,
3349,
29918,
497,
29918,
1727,
1080,
29898,
1311,
1125,
13,
4706,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29889,
8551,
580,
13,
4706,
1583,
17255,
8551,
29918,
8391,
29918,
6203,
580,
13,
4706,
1583,
17255,
2780,
29918,
13908,
29889,
12071,
580,
13,
4706,
1583,
29889,
5504,
580,
13,
13,
1678,
822,
731,
29925,
861,
1958,
29898,
1311,
29892,
15526,
29918,
1958,
29901,
29984,
29925,
861,
1958,
1125,
13,
4706,
1180,
1061,
29918,
2311,
29901,
29984,
3505,
353,
6213,
13,
4706,
1180,
1061,
29918,
3283,
29901,
29984,
5228,
353,
6213,
13,
13,
4706,
396,
960,
19342,
3939,
591,
817,
304,
1095,
738,
15526,
18851,
297,
6728,
13,
4706,
565,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
29925,
860,
292,
29901,
13,
9651,
1583,
17255,
355,
29918,
29886,
15711,
29918,
2622,
580,
13,
13,
4706,
565,
1583,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
1180,
1061,
29918,
2311,
353,
1583,
29889,
2029,
1061,
29918,
2311,
580,
13,
9651,
1180,
1061,
29918,
3283,
353,
1583,
29889,
2029,
1061,
29918,
3283,
580,
13,
13,
4706,
2428,
2141,
842,
29925,
861,
1958,
29898,
29886,
15711,
29918,
1958,
29897,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
9136,
2141,
842,
29925,
861,
1958,
2000,
1159,
13,
4706,
2159,
353,
1583,
29889,
29886,
861,
1958,
2141,
2311,
580,
13,
13,
4706,
565,
1583,
17255,
11228,
29918,
2311,
338,
451,
6213,
29901,
13,
9651,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
353,
2159,
29889,
2103,
580,
847,
1583,
17255,
11228,
29918,
2311,
29889,
2103,
580,
13,
9651,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
353,
2159,
29889,
3545,
580,
847,
1583,
17255,
11228,
29918,
2311,
29889,
3545,
580,
13,
9651,
7084,
4775,
17255,
14480,
29889,
8382,
703,
26740,
1967,
2159,
29901,
426,
29900,
1118,
6287,
7329,
281,
29901,
426,
29896,
1118,
298,
29901,
426,
29906,
17671,
13,
18884,
2159,
29892,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29897,
13,
13,
4706,
396,
10092,
1180,
1061,
565,
591,
505,
697,
13,
4706,
565,
1583,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
1583,
29889,
842,
29918,
2029,
1061,
29918,
2311,
29898,
2029,
1061,
29918,
2311,
29897,
13,
9651,
1583,
29889,
842,
29918,
2029,
1061,
29918,
3283,
29898,
2029,
1061,
29918,
3283,
29897,
13,
13,
4706,
396,
960,
727,
29915,
29879,
263,
15526,
611,
2496,
2767,
372,
2086,
13,
4706,
565,
1583,
17255,
29886,
15711,
29918,
655,
2496,
338,
451,
6213,
29901,
13,
9651,
1583,
17255,
29886,
15711,
29918,
655,
2496,
29889,
5504,
29918,
7529,
29898,
13,
462,
1678,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
2103,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
3545,
3285,
13,
462,
1678,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29897,
13,
13,
4706,
1583,
29889,
842,
8140,
12539,
3505,
29898,
2311,
29897,
13,
4706,
1583,
29889,
842,
7976,
12539,
3505,
29898,
2311,
29897,
13,
13,
1678,
822,
1735,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
2624,
1125,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
2940,
4775,
29889,
3167,
2624,
2000,
856,
1159,
13,
4706,
565,
1741,
29889,
1853,
580,
1275,
660,
2624,
29889,
9780,
7277,
322,
1583,
29889,
29886,
861,
1958,
580,
338,
451,
6213,
320,
13,
18884,
322,
1583,
17255,
11228,
29918,
2311,
338,
6213,
29901,
13,
9651,
1583,
17255,
11228,
29918,
2311,
353,
1583,
29889,
29886,
861,
1958,
2141,
2311,
580,
13,
13,
1678,
822,
9495,
16619,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
1125,
13,
4706,
565,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
16327,
322,
1583,
17255,
3733,
17125,
338,
451,
6213,
29901,
13,
9651,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
4012,
292,
9495,
4337,
1741,
29892,
926,
29901,
426,
29900,
1118,
2159,
29901,
426,
29896,
17671,
1741,
29889,
1066,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
3101,
13,
9651,
1583,
17255,
3733,
17125,
3532,
1741,
29889,
1066,
580,
13,
9651,
1583,
29889,
5504,
580,
13,
4706,
25342,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
23978,
3460,
322,
320,
13,
18884,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
338,
451,
6213,
322,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
29901,
13,
9651,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
20515,
3460,
9495,
4337,
1741,
29892,
926,
29901,
426,
29900,
1118,
2159,
29901,
426,
29896,
17671,
1741,
29889,
1066,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
3101,
13,
9651,
4818,
353,
1583,
17255,
2029,
1061,
29918,
1621,
29889,
5064,
580,
13,
9651,
4818,
4619,
1741,
29889,
1066,
580,
448,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
13,
9651,
1583,
17255,
2029,
1061,
29918,
1621,
29889,
11631,
13409,
29898,
5064,
29897,
13,
9651,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
353,
1741,
29889,
1066,
580,
13,
9651,
1583,
29889,
2029,
1061,
29918,
29885,
8238,
29889,
21976,
29898,
1043,
6508,
7277,
2624,
29898,
1311,
17255,
348,
7052,
29918,
3149,
29898,
5064,
4961,
13,
9651,
1583,
29889,
5504,
580,
13,
4706,
1683,
29901,
13,
9651,
396,
1016,
29915,
29873,
20076,
15526,
14354,
746,
11580,
470,
8338,
3460,
29889,
29871,
739,
1838,
29915,
29873,
13,
9651,
396,
2289,
1207,
4060,
322,
363,
777,
2769,
746,
278,
9495,
338,
4934,
1623,
13,
9651,
396,
591,
679,
1741,
1584,
1156,
591,
526,
694,
5520,
373,
278,
1967,
4969,
13,
9651,
396,
714,
310,
3464,
4828,
13,
9651,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
15769,
4337,
1741,
29892,
926,
29901,
426,
29900,
1118,
2159,
29901,
426,
29896,
17671,
1741,
29889,
1066,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
3101,
13,
9651,
10365,
287,
29918,
11631,
353,
1583,
17255,
3258,
29918,
328,
5143,
287,
29918,
15769,
29918,
3696,
29898,
3696,
29897,
13,
9651,
1583,
29889,
15769,
29918,
11631,
29889,
21976,
29898,
328,
5143,
287,
29918,
11631,
29897,
13,
13,
1678,
822,
9495,
10923,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
1125,
13,
4706,
396,
871,
2149,
1492,
19367,
1244,
2861,
304,
1741,
4175,
13,
4706,
10365,
29918,
15769,
29918,
3696,
353,
1583,
17255,
3258,
29918,
328,
5143,
287,
29918,
15769,
29918,
3696,
29898,
3696,
29897,
13,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
15769,
10923,
2624,
2175,
29901,
426,
29900,
29913,
470,
1492,
29901,
426,
29896,
1118,
12109,
926,
29901,
426,
29906,
17671,
13,
9651,
1741,
29889,
3092,
580,
1275,
14705,
29889,
8091,
3125,
29892,
1741,
29889,
3092,
580,
1275,
14705,
29889,
7341,
3125,
29892,
13,
9651,
10365,
29918,
15769,
29918,
3696,
29889,
29886,
15711,
29918,
1066,
3101,
13,
13,
4706,
396,
5399,
565,
591,
29915,
276,
18851,
17036,
322,
565,
577,
437,
372,
13,
4706,
1583,
17255,
2622,
29918,
29886,
15711,
29898,
328,
5143,
29918,
15769,
29918,
3696,
29897,
13,
13,
4706,
1583,
29889,
1266,
29918,
3808,
287,
29889,
21976,
29898,
328,
5143,
29918,
15769,
29918,
3696,
29897,
13,
4706,
1583,
29889,
5504,
580,
13,
13,
1678,
822,
9495,
19729,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
1125,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
15769,
19729,
2624,
2175,
29901,
426,
29900,
29913,
470,
1492,
29901,
426,
29896,
17671,
13,
9651,
1741,
29889,
3092,
580,
1275,
14705,
29889,
8091,
3125,
29892,
1741,
29889,
3092,
580,
1275,
14705,
29889,
7341,
3125,
29897,
13,
13,
4706,
565,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
23978,
3460,
29901,
13,
9651,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
26521,
13,
9651,
1583,
29889,
842,
19890,
29898,
1311,
17255,
4381,
29918,
18127,
29897,
13,
9651,
1583,
29889,
5504,
580,
13,
13,
4706,
25342,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
16327,
29901,
13,
9651,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
26521,
13,
9651,
1583,
29889,
842,
19890,
29898,
1311,
17255,
4381,
29918,
18127,
29897,
13,
9651,
396,
7135,
278,
4333,
310,
6683,
336,
24580,
3291,
13,
9651,
1583,
17255,
657,
29918,
2622,
29918,
3733,
17125,
580,
13,
9651,
1583,
29889,
5504,
580,
13,
13,
4706,
25342,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
29925,
860,
292,
322,
1741,
29889,
3092,
580,
1275,
14705,
29889,
8091,
3125,
29901,
13,
9651,
1583,
17255,
355,
29918,
29886,
15711,
29918,
2622,
580,
13,
9651,
1583,
29889,
5504,
580,
13,
13,
4706,
396,
1987,
372,
29915,
29879,
263,
2175,
2828,
13,
4706,
25342,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
1563,
29918,
3808,
287,
29889,
21976,
29898,
1311,
17255,
3258,
29918,
328,
5143,
287,
29918,
15769,
29918,
3696,
29898,
3696,
876,
13,
13,
4706,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
353,
6213,
13,
13,
1678,
822,
9495,
11843,
4164,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
1125,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
15769,
11843,
4164,
2624,
1159,
13,
4706,
1583,
29889,
8896,
29918,
3808,
287,
29889,
21976,
29898,
1311,
17255,
3258,
29918,
328,
5143,
287,
29918,
15769,
29918,
3696,
29898,
3696,
876,
13,
13,
1678,
822,
1741,
5072,
29898,
1311,
29892,
1203,
29901,
29984,
2061,
29892,
1741,
29901,
29984,
2624,
1125,
13,
4706,
565,
338,
8758,
29898,
3696,
29892,
660,
14346,
2624,
1125,
13,
9651,
1967,
29918,
2311,
29901,
29984,
3505,
353,
1583,
29889,
29886,
861,
1958,
2141,
2311,
580,
13,
9651,
565,
1741,
29889,
29916,
580,
6736,
1967,
29918,
2311,
29889,
2103,
580,
470,
1741,
29889,
29891,
580,
6736,
1967,
29918,
2311,
29889,
3545,
7295,
13,
18884,
396,
21301,
9495,
4959,
5377,
278,
1967,
29892,
13,
18884,
396,
508,
3799,
746,
9495,
2826,
338,
4934,
1550,
8401,
9495,
13,
18884,
736,
5852,
13,
13,
9651,
565,
1741,
29889,
1853,
580,
1275,
660,
2624,
29889,
14346,
3125,
10923,
322,
1741,
29889,
3092,
580,
1275,
14705,
29889,
8091,
3125,
29901,
13,
18884,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
353,
1741,
29889,
1066,
580,
13,
18884,
660,
14745,
29889,
14369,
2713,
327,
29898,
29941,
29900,
29900,
29892,
1583,
17255,
13120,
29897,
13,
18884,
396,
1741,
471,
16459,
13,
18884,
736,
5852,
13,
13,
9651,
396,
341,
1278,
1492,
19367,
515,
278,
9495,
6507,
7834,
13,
9651,
565,
1741,
29889,
1853,
580,
1275,
660,
2624,
29889,
14346,
3125,
19729,
322,
1741,
29889,
3092,
580,
1275,
14705,
29889,
7341,
3125,
29901,
13,
18884,
396,
1741,
471,
16459,
13,
18884,
736,
5852,
13,
13,
4706,
736,
7700,
13,
13,
1678,
822,
10675,
2624,
29898,
1311,
29892,
10675,
29918,
3696,
29901,
29984,
28939,
2624,
1125,
13,
4706,
396,
937,
4050,
278,
1967,
13,
4706,
2428,
2141,
29886,
2365,
2624,
29898,
29886,
2365,
29918,
3696,
29897,
13,
4706,
396,
451,
1854,
2020,
541,
372,
2444,
591,
817,
304,
1653,
278,
23187,
1269,
931,
13,
4706,
23187,
353,
660,
29925,
475,
357,
29898,
1311,
29897,
13,
4706,
1506,
1878,
29901,
29984,
27680,
353,
660,
27680,
29898,
17303,
29889,
13296,
333,
17144,
29897,
13,
13,
4706,
396,
4216,
278,
1248,
28517,
393,
338,
297,
278,
1889,
310,
1641,
2825,
13,
4706,
565,
1583,
17255,
3733,
17125,
338,
451,
6213,
29901,
13,
9651,
23187,
29889,
842,
29925,
264,
29898,
1311,
17255,
2780,
29918,
13908,
29889,
3784,
29918,
2780,
3101,
13,
9651,
1506,
1878,
29889,
842,
3306,
29898,
1311,
17255,
2780,
29918,
13908,
29889,
3784,
29918,
2780,
3101,
13,
9651,
2224,
29901,
29984,
29925,
475,
357,
2605,
353,
660,
29925,
475,
357,
2605,
580,
13,
9651,
2224,
29889,
1202,
7713,
17125,
29898,
29984,
7713,
17125,
29943,
29898,
1311,
17255,
3733,
17125,
876,
13,
9651,
2224,
29889,
5358,
4035,
2084,
580,
13,
9651,
23187,
29889,
5589,
2605,
29898,
2084,
29892,
1506,
1878,
29897,
13,
13,
9651,
565,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
16327,
29901,
13,
18884,
1583,
17255,
3733,
17125,
29918,
23687,
353,
1583,
17255,
3733,
17125,
29889,
9917,
292,
7364,
580,
13,
13,
4706,
396,
4216,
1180,
1061,
297,
2654,
565,
2198,
13,
4706,
23187,
29889,
842,
29925,
264,
29898,
17303,
29889,
1127,
29897,
13,
4706,
565,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
29901,
13,
9651,
23187,
29889,
4012,
7364,
29898,
1311,
17255,
2029,
1061,
29918,
1621,
29897,
13,
13,
4706,
396,
10675,
278,
4629,
12786,
21640,
1269,
697,
7128,
2486,
13,
4706,
363,
5120,
29918,
667,
297,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29901,
13,
9651,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
18457,
29901,
426,
29900,
1118,
338,
373,
29901,
426,
29896,
17671,
5120,
29918,
667,
29889,
2780,
3285,
5120,
29918,
667,
29889,
275,
29918,
265,
3101,
13,
9651,
565,
5120,
29918,
667,
29889,
275,
29918,
265,
7295,
13,
18884,
23187,
29889,
7052,
29898,
1311,
17255,
2103,
29918,
7052,
29918,
19790,
29914,
12803,
29918,
667,
29889,
29916,
29918,
2502,
290,
29918,
19790,
3285,
13,
462,
1678,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29914,
12803,
29918,
667,
29889,
29891,
29918,
2502,
290,
29918,
19790,
3101,
13,
18884,
23187,
29889,
842,
29925,
264,
29898,
12803,
29918,
667,
29889,
2780,
3101,
13,
18884,
1506,
1878,
29889,
842,
3306,
29898,
12803,
29918,
667,
29889,
2780,
3101,
13,
13,
18884,
565,
5120,
29918,
667,
29889,
29886,
475,
357,
29918,
2084,
580,
338,
451,
6213,
29901,
13,
462,
1678,
23187,
29889,
5589,
2605,
29898,
12803,
29918,
667,
29889,
29886,
475,
357,
29918,
2084,
3285,
1506,
1878,
29897,
13,
18884,
25342,
5120,
29918,
667,
29889,
9748,
580,
338,
451,
6213,
29901,
13,
462,
1678,
363,
1298,
297,
5120,
29918,
667,
29889,
9748,
7295,
13,
462,
4706,
23187,
29889,
4012,
20325,
29898,
3149,
29897,
13,
13,
18884,
23187,
29889,
12071,
13372,
580,
13,
13,
1678,
822,
4770,
7052,
29918,
3149,
29898,
1311,
29892,
1298,
29901,
29984,
5228,
29897,
1599,
660,
5228,
29901,
13,
4706,
716,
29918,
3149,
29901,
29984,
5228,
353,
660,
5228,
29898,
3149,
29897,
13,
4706,
565,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
3149,
29889,
842,
29990,
29898,
14939,
29898,
1482,
29918,
3149,
29889,
29916,
580,
334,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
565,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
3149,
29889,
842,
29979,
29898,
14939,
29898,
1482,
29918,
3149,
29889,
29891,
580,
334,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
736,
716,
29918,
3149,
13,
13,
1678,
822,
4770,
7052,
29918,
2311,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
29897,
1599,
660,
3505,
29901,
13,
4706,
716,
29918,
2311,
29901,
660,
3505,
353,
660,
3505,
29898,
2311,
29897,
13,
4706,
565,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
2311,
29889,
842,
6110,
29898,
14939,
29898,
1482,
29918,
2311,
29889,
2103,
580,
334,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
565,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
2311,
29889,
842,
7011,
29898,
14939,
29898,
1482,
29918,
2311,
29889,
3545,
580,
334,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
736,
716,
29918,
2311,
13,
13,
1678,
822,
4770,
348,
7052,
29918,
3149,
29898,
1311,
29892,
1298,
29901,
29984,
5228,
29897,
1599,
660,
5228,
29901,
13,
4706,
716,
29918,
3149,
29901,
29984,
5228,
353,
660,
5228,
29898,
3149,
29897,
13,
4706,
565,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
3149,
29889,
842,
29990,
29898,
14939,
29898,
1482,
29918,
3149,
29889,
29916,
580,
847,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
565,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
3149,
29889,
842,
29979,
29898,
14939,
29898,
1482,
29918,
3149,
29889,
29891,
580,
847,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
736,
716,
29918,
3149,
13,
13,
1678,
822,
4770,
348,
7052,
29918,
2311,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
29897,
1599,
660,
3505,
29901,
13,
4706,
716,
29918,
2311,
29901,
29984,
3505,
353,
660,
3505,
29898,
2311,
29897,
13,
4706,
565,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
2311,
29889,
842,
6110,
29898,
14939,
29898,
1482,
29918,
2311,
29889,
2103,
580,
847,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
565,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
2311,
29889,
842,
7011,
29898,
14939,
29898,
1482,
29918,
2311,
29889,
3545,
580,
847,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
876,
13,
13,
4706,
736,
716,
29918,
2311,
13,
13,
1678,
822,
4770,
8551,
29918,
8391,
29918,
6203,
29898,
1311,
1125,
13,
4706,
1583,
17255,
3733,
17125,
29918,
23687,
353,
6213,
13,
4706,
1583,
17255,
3733,
17125,
353,
6213,
13,
4706,
1583,
29889,
5504,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
18457,
9323,
2001,
29897,
13,
1678,
822,
4770,
8411,
1649,
12803,
29918,
15603,
29898,
1311,
29892,
3646,
29901,
18457,
9323,
2001,
1125,
13,
4706,
565,
3646,
297,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29901,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29889,
5992,
29898,
5182,
29897,
13,
9651,
1583,
29889,
5504,
580,
13,
4706,
1683,
29901,
13,
9651,
7084,
4775,
17255,
14480,
29889,
27392,
703,
5594,
304,
3349,
1661,
29899,
735,
9696,
5120,
17262,
1159,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
18457,
9323,
2001,
29897,
13,
1678,
822,
4770,
8411,
29918,
12803,
29918,
29873,
468,
29887,
839,
29898,
1311,
29892,
3646,
29901,
18457,
9323,
2001,
1125,
13,
4706,
1583,
29889,
5504,
580,
13,
13,
1678,
822,
4770,
2622,
29918,
29886,
15711,
29898,
1311,
29892,
10365,
287,
29918,
15769,
29918,
3696,
29901,
3253,
5143,
287,
14346,
2624,
1125,
13,
4706,
7084,
4775,
17255,
14480,
29889,
8382,
703,
1649,
2622,
29918,
29886,
15711,
2000,
411,
1857,
3158,
29901,
426,
29900,
29913,
1642,
4830,
29898,
1311,
17255,
3784,
29918,
2467,
876,
13,
4706,
565,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
26521,
322,
1583,
17255,
29886,
15711,
29918,
2622,
29901,
13,
9651,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
29925,
860,
292,
13,
9651,
1583,
29889,
842,
19890,
29898,
1311,
17255,
23945,
29918,
18127,
29897,
13,
13,
9651,
396,
6204,
310,
2767,
278,
15526,
611,
2496,
13,
9651,
565,
1583,
17255,
29886,
15711,
29918,
655,
2496,
338,
6213,
29901,
13,
18884,
1583,
17255,
29886,
15711,
29918,
655,
2496,
353,
830,
3901,
29637,
27065,
1061,
29898,
13,
462,
1678,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
2103,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
3545,
3285,
13,
462,
1678,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
17255,
29886,
15711,
29918,
655,
2496,
29889,
5504,
29918,
7529,
29898,
13,
462,
1678,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
2103,
3285,
1583,
29889,
29886,
861,
1958,
2141,
2311,
2141,
3545,
3285,
13,
462,
1678,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29897,
13,
13,
9651,
396,
6204,
263,
11069,
9323,
2001,
322,
8014,
372,
701,
13,
9651,
2927,
353,
1583,
17255,
2780,
29918,
13908,
29889,
3784,
29918,
2780,
580,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
667,
353,
11069,
9323,
2001,
29898,
1311,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29892,
13,
18884,
2927,
29892,
5852,
29892,
3291,
29922,
1311,
17255,
29886,
15711,
29918,
655,
2496,
29889,
657,
29918,
9748,
29898,
13,
462,
1678,
10365,
287,
29918,
15769,
29918,
3696,
29889,
15769,
29918,
3696,
2141,
29916,
3285,
10365,
287,
29918,
15769,
29918,
3696,
29889,
15769,
29918,
3696,
2141,
29891,
22130,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
667,
29889,
15603,
29889,
6915,
29898,
1311,
17255,
8411,
1649,
12803,
29918,
15603,
29897,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
667,
29889,
29873,
468,
29887,
839,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
12803,
29918,
29873,
468,
29887,
839,
29897,
13,
13,
9651,
396,
3462,
372,
304,
278,
1051,
310,
11069,
9323,
6913,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29889,
4397,
29898,
1311,
17255,
12803,
29918,
4990,
29918,
667,
29897,
13,
13,
9651,
396,
6204,
263,
716,
15526,
1051,
322,
788,
278,
4629,
10365,
287,
15526,
304,
1051,
1641,
13,
9651,
396,
22229,
363,
278,
11069,
2776,
4074,
342,
13,
9651,
1583,
17255,
29886,
15711,
29918,
1761,
353,
7442,
29889,
2378,
4197,
328,
5143,
287,
29918,
15769,
29918,
3696,
29889,
29886,
15711,
29918,
29916,
3285,
10365,
287,
29918,
15769,
29918,
3696,
29889,
29886,
15711,
29918,
29891,
580,
14664,
690,
14443,
29898,
29896,
29892,
29871,
29906,
29897,
13,
13,
4706,
25342,
1583,
17255,
3784,
29918,
2467,
1275,
7084,
4775,
29889,
4276,
29889,
29925,
860,
292,
322,
1583,
17255,
12803,
29918,
4990,
29918,
667,
338,
451,
6213,
29901,
13,
9651,
396,
1334,
29915,
276,
2307,
297,
278,
1889,
310,
18851,
17036,
577,
9773,
304,
278,
11069,
9323,
6913,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
667,
29889,
4397,
29918,
9748,
29898,
1311,
17255,
29886,
15711,
29918,
655,
2496,
29889,
657,
29918,
9748,
29898,
13,
18884,
10365,
287,
29918,
15769,
29918,
3696,
29889,
15769,
29918,
3696,
2141,
29916,
3285,
10365,
287,
29918,
15769,
29918,
3696,
29889,
15769,
29918,
3696,
2141,
29891,
22130,
13,
13,
9651,
396,
1126,
9773,
304,
278,
15526,
1051,
13,
9651,
1583,
17255,
29886,
15711,
29918,
1761,
353,
7442,
29889,
4397,
29898,
1311,
17255,
29886,
15711,
29918,
1761,
29892,
13,
18884,
7442,
29889,
2378,
4197,
328,
5143,
287,
29918,
15769,
29918,
3696,
29889,
29886,
15711,
29918,
29916,
3285,
10365,
287,
29918,
15769,
29918,
3696,
29889,
29886,
15711,
29918,
29891,
580,
14664,
690,
14443,
29898,
29896,
29892,
29871,
29906,
511,
13,
18884,
9685,
29922,
29900,
29897,
13,
13,
1678,
822,
4770,
355,
29918,
29886,
15711,
29918,
2622,
29898,
1311,
1125,
13,
4706,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
26521,
13,
4706,
1583,
29889,
842,
19890,
29898,
1311,
17255,
4381,
29918,
18127,
29897,
13,
4706,
1583,
17255,
657,
29918,
8391,
29918,
29886,
861,
1379,
580,
13,
13,
1678,
822,
4770,
657,
29918,
8391,
29918,
29886,
861,
1379,
29898,
1311,
1125,
13,
4706,
565,
7431,
29898,
1311,
17255,
29886,
15711,
29918,
1761,
29897,
1405,
29871,
29900,
29901,
13,
9651,
396,
6204,
5120,
310,
4066,
29889,
29871,
450,
4333,
310,
3291,
756,
2307,
1063,
13,
9651,
396,
11543,
304,
29871,
29896,
304,
29871,
29896,
2913,
29889,
13,
9651,
5120,
353,
11069,
2776,
4074,
342,
29898,
9302,
29889,
2378,
29898,
1311,
17255,
29886,
15711,
29918,
1761,
511,
29871,
29896,
29889,
29900,
29892,
29871,
29896,
29889,
29900,
29892,
13,
18884,
1583,
17255,
11228,
29918,
2311,
29889,
3545,
3285,
1583,
17255,
11228,
29918,
2311,
29889,
2103,
3285,
1583,
17255,
2783,
11709,
29897,
13,
13,
9651,
1583,
17255,
29886,
15711,
29918,
1761,
353,
6213,
13,
13,
9651,
1583,
29889,
6203,
29918,
8391,
29889,
21976,
29898,
13799,
8592,
2624,
29898,
12803,
29892,
1583,
17255,
12803,
29918,
4990,
29918,
667,
876,
13,
9651,
1583,
17255,
2780,
29918,
13908,
29889,
4622,
29918,
2780,
580,
13,
9651,
1583,
17255,
12803,
29918,
4990,
29918,
667,
353,
6213,
13,
13,
1678,
822,
4770,
657,
29918,
2622,
29918,
3733,
17125,
29898,
1311,
1125,
13,
4706,
565,
1583,
17255,
3733,
17125,
29918,
23687,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
2311,
2141,
3545,
580,
1405,
29871,
29896,
322,
320,
13,
1669,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
2311,
2141,
2103,
580,
1405,
29871,
29896,
29901,
13,
13,
18884,
396,
1298,
29918,
1761,
353,
1583,
17255,
2084,
29889,
1272,
580,
13,
18884,
396,
363,
1298,
297,
1298,
29918,
1761,
29901,
13,
18884,
396,
268,
7084,
4775,
17255,
14480,
29889,
8382,
703,
7713,
17125,
1298,
29901,
426,
29900,
17671,
1298,
29897,
13,
13,
18884,
921,
29896,
29892,
343,
29896,
29892,
921,
29906,
29892,
343,
29906,
353,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
657,
7967,
4339,
580,
13,
18884,
7084,
4775,
17255,
14480,
29889,
8382,
703,
8592,
1302,
4339,
29892,
921,
29896,
29901,
426,
29900,
1118,
343,
29896,
29901,
426,
29896,
1118,
921,
29906,
29901,
426,
29906,
1118,
343,
29906,
29901,
426,
29941,
1118,
2159,
29901,
426,
29946,
17671,
13,
462,
1678,
921,
29896,
29892,
343,
29896,
29892,
921,
29906,
29892,
343,
29906,
29892,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
2311,
3101,
13,
13,
18884,
396,
508,
679,
8178,
921,
29896,
669,
343,
29896,
565,
1404,
8338,
29879,
1283,
1967,
304,
278,
2175,
470,
2246,
13,
18884,
565,
921,
29896,
529,
29871,
29900,
584,
921,
29896,
353,
29871,
29900,
13,
18884,
565,
343,
29896,
529,
29871,
29900,
584,
343,
29896,
353,
29871,
29900,
13,
13,
18884,
396,
6724,
10018,
5224,
322,
1492,
12770,
6140,
304,
20102,
472,
278,
13,
18884,
396,
1959,
1833,
17036,
541,
1207,
1854,
393,
1838,
29915,
29873,
1735,
13,
18884,
1967,
29918,
2311,
353,
1583,
29889,
29886,
861,
1958,
2141,
2311,
580,
13,
18884,
7084,
4775,
17255,
14480,
29889,
8382,
703,
2940,
281,
29901,
426,
29900,
1118,
298,
29901,
426,
29896,
17671,
1967,
29918,
2311,
29889,
2103,
3285,
1967,
29918,
2311,
29889,
3545,
3101,
13,
18884,
565,
921,
29906,
1405,
1967,
29918,
2311,
29889,
2103,
580,
448,
29871,
29896,
584,
921,
29906,
353,
1967,
29918,
2311,
29889,
2103,
580,
448,
29871,
29896,
13,
18884,
565,
343,
29906,
1405,
1967,
29918,
2311,
29889,
3545,
580,
448,
29871,
29896,
584,
343,
29906,
353,
1967,
29918,
2311,
29889,
3545,
580,
448,
29871,
29896,
13,
13,
18884,
396,
1653,
385,
1409,
310,
15526,
14354,
11122,
491,
278,
13,
18884,
396,
10365,
287,
3216,
292,
16701,
10350,
13,
18884,
921,
29918,
3881,
353,
611,
29889,
279,
927,
29898,
29916,
29896,
29892,
921,
29906,
718,
29871,
29896,
29897,
13,
18884,
343,
29918,
3881,
353,
611,
29889,
279,
927,
29898,
29891,
29896,
29892,
343,
29906,
718,
29871,
29896,
29897,
13,
18884,
3291,
353,
611,
29889,
2378,
29898,
1761,
29898,
1524,
8504,
29889,
4704,
29898,
29916,
29918,
3881,
29892,
343,
29918,
3881,
4961,
13,
13,
18884,
396,
1423,
304,
1074,
607,
3291,
884,
6416,
2768,
310,
278,
29807,
13,
18884,
363,
474,
297,
3464,
29898,
2435,
29898,
9748,
22164,
13,
462,
1678,
1298,
353,
660,
5228,
29898,
9748,
29961,
29875,
3816,
29900,
1402,
3291,
29961,
29875,
3816,
29896,
2314,
13,
462,
1678,
565,
451,
1583,
17255,
3733,
17125,
29889,
11516,
5228,
29898,
3149,
29892,
14705,
29889,
29956,
4015,
20876,
1125,
13,
462,
4706,
3291,
29961,
29875,
29962,
353,
611,
29889,
13168,
287,
13,
462,
4706,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
5228,
714,
29901,
426,
29900,
17671,
1298,
29897,
13,
13,
18884,
7084,
4775,
17255,
14480,
29889,
8382,
703,
20325,
2159,
29901,
426,
29900,
1118,
2302,
29901,
426,
29896,
17671,
3291,
29889,
2311,
29892,
3291,
29889,
2798,
3101,
13,
13,
18884,
396,
1207,
1854,
591,
7359,
29915,
29873,
11105,
287,
599,
278,
3161,
13,
18884,
565,
3291,
29889,
2798,
580,
1405,
29871,
29900,
29901,
13,
462,
1678,
396,
6597,
278,
1661,
29899,
13168,
287,
3291,
322,
620,
14443,
278,
1121,
1250,
304,
263,
1051,
310,
11000,
13,
462,
1678,
3291,
353,
3291,
29961,
30022,
9748,
29889,
13168,
1822,
690,
14443,
29898,
14939,
29898,
9748,
29889,
2798,
580,
847,
29871,
29906,
511,
29871,
29906,
29897,
13,
13,
462,
1678,
7084,
4775,
17255,
14480,
29889,
8382,
703,
15790,
3291,
8267,
29901,
426,
29900,
1118,
2159,
29901,
426,
29896,
1118,
2302,
29901,
426,
29906,
17671,
13,
462,
4706,
3291,
29889,
12181,
29892,
3291,
29889,
2311,
29892,
3291,
29889,
2798,
3101,
13,
13,
462,
1678,
396,
10446,
278,
5120,
310,
4066,
322,
4078,
304,
278,
2910,
13,
462,
1678,
5120,
353,
11069,
2776,
4074,
342,
29898,
9748,
29892,
13,
462,
4706,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29892,
13,
462,
4706,
1583,
17255,
11228,
29918,
2311,
29889,
3545,
3285,
1583,
17255,
11228,
29918,
2311,
29889,
2103,
3285,
1583,
17255,
2783,
11709,
29897,
13,
462,
1678,
2927,
353,
1583,
17255,
2780,
29918,
13908,
29889,
3784,
29918,
2780,
580,
13,
13,
462,
1678,
396,
16913,
278,
2186,
1873,
310,
278,
29807,
408,
263,
660,
29925,
475,
357,
2605,
372,
29915,
29879,
901,
13,
462,
1678,
396,
8543,
363,
24270,
322,
756,
901,
25706,
20413,
3987,
13,
462,
1678,
23187,
29918,
2084,
353,
660,
29925,
475,
357,
2605,
580,
13,
462,
1678,
23187,
29918,
2084,
29889,
1202,
7713,
17125,
29898,
29984,
7713,
17125,
29943,
29898,
1311,
17255,
3733,
17125,
876,
13,
462,
1678,
23187,
29918,
2084,
29889,
5358,
4035,
2084,
580,
13,
13,
462,
1678,
2479,
29918,
667,
353,
11069,
9323,
2001,
29898,
1311,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29892,
13,
462,
4706,
2927,
29892,
5852,
29892,
23187,
29918,
2084,
29897,
13,
462,
1678,
2479,
29918,
667,
29889,
15603,
29889,
6915,
29898,
1311,
17255,
8411,
1649,
12803,
29918,
15603,
29897,
13,
462,
1678,
2479,
29918,
667,
29889,
29873,
468,
29887,
839,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
12803,
29918,
29873,
468,
29887,
839,
29897,
13,
462,
1678,
1583,
17255,
12803,
29918,
4990,
29918,
7076,
29889,
4397,
29898,
4990,
29918,
667,
29897,
13,
13,
462,
1678,
1583,
29889,
6203,
29918,
8391,
29889,
21976,
29898,
13799,
8592,
2624,
29898,
12803,
29892,
2479,
29918,
667,
876,
13,
462,
1678,
1583,
17255,
2780,
29918,
13908,
29889,
4622,
29918,
2780,
580,
13,
462,
1678,
1583,
17255,
8551,
29918,
8391,
29918,
6203,
580,
13,
13,
18884,
1683,
29901,
13,
462,
1678,
7084,
4775,
17255,
14480,
29889,
8382,
703,
3782,
3291,
1476,
297,
5120,
29892,
2159,
29901,
426,
29900,
17671,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
2311,
3101,
13,
462,
1678,
1583,
17255,
8551,
29918,
8391,
29918,
6203,
580,
13,
9651,
1683,
29901,
13,
18884,
7084,
4775,
17255,
14480,
29889,
8382,
703,
24214,
9927,
29807,
22225,
29892,
2159,
29901,
426,
29900,
17671,
1583,
17255,
3733,
17125,
29918,
23687,
29889,
2311,
3101,
13,
18884,
1583,
17255,
8551,
29918,
8391,
29918,
6203,
580,
13,
13,
1678,
822,
4770,
13120,
29898,
1311,
1125,
13,
4706,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
2139,
2000,
29892,
1833,
29918,
15769,
29918,
2029,
29901,
426,
29900,
17671,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
29897,
13,
4706,
565,
1583,
17255,
4230,
29918,
15769,
29918,
2029,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
17255,
2029,
1061,
29918,
1621,
338,
451,
6213,
322,
1583,
17255,
2029,
1061,
29918,
1621,
29889,
11516,
29898,
1311,
17255,
4230,
29918,
15769,
29918,
2029,
1125,
13,
18884,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
23978,
3460,
13,
18884,
1583,
29889,
842,
19890,
29898,
1311,
17255,
20515,
29918,
18127,
29897,
13,
18884,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
2139,
2000,
29892,
8338,
1369,
1159,
13,
9651,
25342,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
6736,
29871,
29896,
29889,
29900,
470,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
6736,
29871,
29896,
29889,
29900,
29901,
13,
18884,
396,
817,
304,
4046,
5120,
9262,
304,
6287,
13879,
7621,
1135,
29871,
29896,
29889,
29900,
13,
18884,
396,
470,
1683,
591,
1095,
701,
411,
263,
5120,
5069,
15526,
23746,
338,
29234,
13,
18884,
1583,
17255,
3784,
29918,
2467,
353,
7084,
4775,
29889,
4276,
29889,
16327,
13,
18884,
1583,
29889,
842,
19890,
29898,
1311,
17255,
4012,
29918,
18127,
29897,
13,
18884,
1583,
17255,
2780,
29918,
13908,
29889,
3784,
29918,
2780,
580,
13,
18884,
1583,
17255,
3733,
17125,
353,
660,
7713,
17125,
580,
13,
18884,
396,
7084,
4775,
17255,
14480,
29889,
8382,
703,
2139,
2000,
29892,
4216,
1369,
1159,
13,
13,
1678,
822,
4770,
3258,
29918,
328,
5143,
287,
29918,
15769,
29918,
3696,
29898,
1311,
29892,
1741,
29901,
29984,
14346,
2624,
1125,
13,
4706,
736,
2087,
5143,
287,
14346,
2624,
29898,
3696,
29892,
29871,
29896,
847,
1583,
17255,
2103,
29918,
7052,
29918,
19790,
29892,
29871,
29896,
847,
1583,
17255,
3545,
29918,
7052,
29918,
19790,
29897,
13,
13,
13,
1990,
7084,
9323,
29898,
29984,
10463,
13799,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
2940,
9323,
1159,
13,
13,
1678,
4038,
29918,
8391,
353,
11451,
17915,
10140,
284,
29898,
13799,
8592,
2624,
29897,
13,
1678,
2175,
29918,
3808,
287,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
1492,
29918,
3808,
287,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
9495,
29918,
11631,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
1967,
29918,
690,
1891,
353,
11451,
17915,
10140,
284,
29898,
2940,
1666,
675,
2624,
29897,
13,
1678,
1776,
637,
29918,
15033,
353,
11451,
17915,
10140,
284,
29898,
1043,
7277,
2624,
29897,
13,
1678,
1180,
1061,
29918,
29885,
8238,
353,
11451,
17915,
10140,
284,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
1776,
637,
29918,
1557,
24476,
353,
11451,
17915,
10140,
284,
29898,
1043,
6508,
7277,
2624,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29901,
2940,
29892,
3855,
3027,
29918,
4830,
29901,
29984,
2940,
29889,
5809,
29922,
29984,
2940,
29889,
5809,
29918,
29954,
764,
7052,
29947,
29892,
13,
9651,
4423,
29918,
1621,
29901,
11227,
29922,
5574,
29892,
15526,
29918,
2622,
29901,
11227,
29922,
8824,
29892,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
13,
4706,
1583,
17255,
9264,
29918,
2103,
353,
29871,
29946,
13,
4706,
1583,
17255,
9264,
29918,
3545,
353,
29871,
29946,
13,
13,
4706,
1583,
17255,
3027,
353,
1967,
13,
4706,
1583,
17255,
29939,
3027,
29918,
4830,
353,
3855,
3027,
29918,
4830,
13,
13,
4706,
1583,
17255,
3027,
29918,
1643,
353,
7084,
4775,
29898,
1311,
17255,
3027,
29889,
2783,
11709,
3285,
4423,
29918,
1621,
29892,
15526,
29918,
2622,
29892,
1583,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
10581,
16727,
29898,
29984,
29925,
26456,
29889,
5160,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
3505,
15644,
29898,
29984,
3505,
15644,
29889,
17273,
4395,
29892,
660,
3505,
15644,
29889,
17273,
4395,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
14346,
17936,
292,
29898,
5574,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
6203,
29918,
8391,
29889,
6915,
29898,
1311,
29889,
6203,
29918,
8391,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
1563,
29918,
3808,
287,
29889,
6915,
29898,
1311,
29889,
1563,
29918,
3808,
287,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
1266,
29918,
3808,
287,
29889,
6915,
29898,
1311,
29889,
1266,
29918,
3808,
287,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
8896,
29918,
3808,
287,
29889,
6915,
29898,
1311,
17255,
8896,
29918,
3808,
29918,
13789,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
15769,
29918,
11631,
29889,
6915,
29898,
1311,
29889,
15769,
29918,
11631,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
29885,
8238,
29889,
6915,
29898,
1311,
29889,
2029,
1061,
29918,
29885,
8238,
29897,
13,
13,
4706,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
29901,
524,
353,
448,
29896,
13,
4706,
1583,
29889,
22672,
10463,
4297,
2141,
1767,
7590,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
22672,
29918,
1646,
29918,
15033,
29897,
13,
4706,
1583,
29889,
22672,
10463,
4297,
2141,
2467,
20211,
287,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1646,
29918,
2467,
29897,
13,
4706,
1583,
29889,
18575,
10463,
4297,
2141,
1767,
7590,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
18575,
29918,
1646,
29918,
15033,
29897,
13,
4706,
1583,
29889,
18575,
10463,
4297,
2141,
2467,
20211,
287,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1646,
29918,
2467,
29897,
13,
13,
4706,
1583,
29889,
842,
10581,
16727,
29898,
29984,
29925,
26456,
29889,
29928,
935,
29897,
13,
4706,
1583,
17255,
4990,
29918,
3027,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
524,
29897,
13,
1678,
822,
4770,
8411,
29918,
1646,
29918,
2467,
29898,
1311,
29892,
3158,
29901,
524,
1125,
13,
4706,
396,
9123,
526,
19799,
491,
1404,
22060,
411,
278,
6355,
22306,
577,
10446,
13,
4706,
396,
278,
3158,
746,
372,
5930,
577,
591,
508,
671,
372,
304,
4175,
6355,
2594,
995,
3939,
4959,
13,
4706,
396,
7084,
9323,
17255,
14480,
29889,
8382,
703,
1646,
3158,
16459,
29901,
426,
29900,
17671,
3158,
29897,
13,
4706,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
353,
3158,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
524,
29897,
13,
1678,
822,
4770,
8411,
29918,
22672,
29918,
1646,
29918,
15033,
29898,
1311,
29892,
995,
29901,
524,
1125,
13,
4706,
396,
28488,
1244,
746,
278,
1404,
16229,
278,
6355,
1646,
470,
591,
1246,
731,
1917,
580,
373,
278,
6355,
1646,
13,
4706,
396,
9333,
20076,
565,
278,
385,
3158,
471,
731,
6593,
372,
2996,
515,
263,
1404,
14881,
3265,
1135,
263,
1246,
304,
731,
1917,
13,
4706,
396,
7084,
9323,
17255,
14480,
29889,
8382,
703,
17241,
466,
6355,
1735,
304,
29901,
426,
29900,
1118,
1833,
3158,
29901,
426,
29896,
17671,
995,
29892,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
29897,
13,
4706,
565,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
2804,
448,
29896,
29901,
13,
9651,
1583,
29889,
1493,
637,
29918,
1557,
24476,
29889,
21976,
29898,
1043,
6508,
7277,
2624,
29898,
1311,
29889,
657,
29918,
1493,
29918,
5064,
22130,
13,
9651,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
353,
448,
29896,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
524,
29897,
13,
1678,
822,
4770,
8411,
29918,
18575,
29918,
1646,
29918,
15033,
29898,
1311,
29892,
995,
29901,
524,
1125,
13,
4706,
396,
28488,
1244,
746,
278,
1404,
16229,
278,
6355,
1646,
470,
591,
1246,
731,
1917,
580,
373,
278,
6355,
1646,
13,
4706,
396,
9333,
20076,
565,
278,
385,
3158,
471,
731,
6593,
372,
2996,
515,
263,
1404,
14881,
3265,
1135,
263,
1246,
304,
731,
1917,
13,
4706,
396,
7084,
9323,
17255,
14480,
29889,
8382,
703,
9114,
6355,
1735,
304,
29901,
426,
29900,
1118,
1833,
3158,
29901,
426,
29896,
17671,
995,
29892,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
29897,
13,
4706,
565,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
2804,
448,
29896,
29901,
13,
9651,
1583,
29889,
1493,
637,
29918,
1557,
24476,
29889,
21976,
29898,
1043,
6508,
7277,
2624,
29898,
1311,
29889,
657,
29918,
1493,
29918,
5064,
22130,
13,
9651,
1583,
17255,
4230,
29918,
10510,
1646,
29918,
2467,
353,
448,
29896,
13,
13,
1678,
822,
4770,
4990,
29918,
3027,
29898,
1311,
1125,
13,
4706,
396,
3171,
322,
2920,
310,
278,
1967,
297,
17036,
470,
278,
29871,
29896,
304,
29871,
29896,
2159,
13,
4706,
1967,
29918,
3545,
29892,
1967,
29918,
2103,
353,
1583,
17255,
3027,
29889,
3027,
29918,
12181,
580,
13,
4706,
1583,
17255,
3027,
29918,
2311,
353,
660,
3505,
29898,
3027,
29918,
2103,
29892,
1967,
29918,
3545,
29897,
13,
13,
4706,
1583,
17255,
29939,
3027,
29901,
29984,
2940,
353,
660,
2940,
29898,
1311,
17255,
3027,
29889,
3027,
29918,
1272,
3285,
1583,
17255,
3027,
29918,
2311,
29889,
2103,
3285,
13,
9651,
1583,
17255,
3027,
29918,
2311,
29889,
3545,
3285,
1583,
17255,
3027,
29889,
13193,
29918,
546,
29918,
1220,
3285,
1583,
17255,
29939,
3027,
29918,
4830,
29897,
13,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
29901,
29984,
29925,
861,
1958,
353,
660,
29925,
861,
1958,
29889,
3166,
2940,
29898,
1311,
17255,
29939,
3027,
29897,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
29925,
861,
1958,
29898,
1311,
17255,
29886,
861,
29918,
1958,
29897,
13,
4706,
1583,
29889,
842,
8801,
29898,
1311,
17255,
3027,
29918,
1643,
29897,
13,
13,
4706,
396,
2319,
15276,
1144,
304,
2367,
263,
2217,
4805,
5716,
577,
278,
10677,
1838,
29915,
29873,
1735,
2086,
4720,
29889,
13,
4706,
1583,
29889,
842,
1043,
637,
29924,
1191,
1144,
29898,
1311,
17255,
9264,
29918,
2103,
29892,
1583,
17255,
9264,
29918,
3545,
29892,
13,
9651,
1583,
17255,
9264,
29918,
2103,
29892,
1583,
17255,
9264,
29918,
3545,
29897,
13,
13,
4706,
1583,
29889,
4294,
580,
13,
13,
1678,
396,
14402,
451,
1854,
591,
817,
445,
541,
3013,
372,
363,
278,
1342,
363,
1286,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
822,
4770,
8896,
29918,
3808,
29918,
13789,
29898,
1311,
29892,
1741,
29901,
3253,
5143,
287,
14346,
2624,
1125,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
11843,
11484,
921,
29901,
426,
29900,
29913,
343,
29901,
426,
29896,
17671,
13,
9651,
1741,
29889,
29886,
15711,
29918,
29916,
580,
718,
29871,
29896,
29892,
1741,
29889,
29886,
15711,
29918,
29891,
580,
718,
29871,
29896,
29897,
13,
13,
1678,
822,
4770,
842,
29918,
29886,
861,
1958,
29898,
1311,
1125,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
29925,
861,
1958,
29898,
1311,
17255,
29886,
861,
29918,
1958,
29897,
13,
4706,
716,
29918,
2311,
353,
1583,
17255,
29886,
861,
29918,
1958,
29889,
2311,
580,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
26740,
1967,
2159,
29901,
426,
29900,
17671,
716,
29918,
2311,
29897,
13,
4706,
1583,
29889,
21476,
29898,
1482,
29918,
2311,
29897,
13,
4706,
1583,
29889,
3027,
29918,
690,
1891,
29889,
21976,
29898,
2940,
1666,
675,
2624,
29898,
1482,
29918,
2311,
29892,
1583,
29889,
1493,
637,
2141,
2311,
22130,
13,
13,
1678,
822,
4770,
5504,
29918,
10510,
29918,
28408,
29898,
1311,
29892,
2030,
29918,
1493,
637,
29918,
2311,
29901,
29984,
3505,
29892,
716,
29918,
1493,
637,
29918,
2311,
29901,
29984,
3505,
1125,
13,
4706,
1574,
29918,
2103,
353,
1583,
17255,
3027,
29918,
1643,
29889,
2311,
2141,
2103,
580,
13,
4706,
565,
716,
29918,
1493,
637,
29918,
2311,
29889,
2103,
580,
1405,
1574,
29918,
2103,
29901,
13,
9651,
396,
2599,
445,
10397,
1078,
285,
1406,
261,
746,
1776,
637,
338,
7200,
1135,
1574,
13,
9651,
565,
1583,
29889,
22672,
10463,
4297,
2141,
27525,
398,
580,
2804,
29871,
29900,
29901,
13,
18884,
1583,
29889,
22672,
10463,
4297,
2141,
842,
7976,
12539,
29898,
29900,
29897,
13,
4706,
25342,
2030,
29918,
1493,
637,
29918,
2311,
29889,
2103,
580,
2804,
716,
29918,
1493,
637,
29918,
2311,
29889,
2103,
7295,
13,
9651,
716,
29918,
3317,
29918,
2103,
353,
29871,
1574,
29918,
2103,
448,
716,
29918,
1493,
637,
29918,
2311,
29889,
2103,
580,
13,
9651,
716,
29918,
2015,
466,
29918,
10568,
353,
1574,
29918,
2103,
448,
716,
29918,
3317,
29918,
2103,
13,
13,
9651,
7084,
9323,
17255,
14480,
29889,
8382,
703,
1666,
5281,
14698,
6355,
4236,
304,
426,
29900,
1118,
4331,
426,
29896,
1118,
1574,
2159,
426,
29906,
17671,
13,
18884,
716,
29918,
3317,
29918,
2103,
29892,
716,
29918,
2015,
466,
29918,
10568,
29892,
1583,
17255,
3027,
29918,
1643,
29889,
2311,
2141,
2103,
3101,
13,
9651,
1583,
29889,
22672,
10463,
4297,
2141,
842,
5074,
14448,
29898,
1482,
29918,
2015,
466,
29918,
10568,
29897,
13,
9651,
1583,
29889,
22672,
10463,
4297,
2141,
842,
7976,
12539,
29898,
1482,
29918,
3317,
29918,
2103,
29897,
13,
13,
4706,
1574,
29918,
3545,
353,
1583,
17255,
3027,
29918,
1643,
29889,
3545,
580,
13,
4706,
565,
716,
29918,
1493,
637,
29918,
2311,
29889,
3545,
580,
1405,
1574,
29918,
3545,
29901,
13,
9651,
565,
1583,
29889,
18575,
10463,
4297,
2141,
27525,
398,
580,
2804,
29871,
29900,
29901,
13,
18884,
1583,
29889,
18575,
10463,
4297,
2141,
842,
7976,
12539,
29898,
29900,
29897,
13,
4706,
25342,
2030,
29918,
1493,
637,
29918,
2311,
29889,
3545,
580,
2804,
716,
29918,
1493,
637,
29918,
2311,
29889,
3545,
7295,
13,
9651,
716,
29918,
3317,
29918,
3545,
353,
1574,
29918,
3545,
448,
716,
29918,
1493,
637,
29918,
2311,
29889,
3545,
580,
13,
9651,
716,
29918,
1765,
29918,
10568,
353,
1574,
29918,
3545,
448,
716,
29918,
3317,
29918,
3545,
13,
13,
9651,
7084,
9323,
17255,
14480,
29889,
8382,
703,
1666,
5281,
11408,
6355,
4236,
304,
426,
29900,
1118,
4331,
426,
29896,
1118,
1574,
2159,
426,
29906,
17671,
13,
18884,
716,
29918,
3317,
29918,
3545,
29892,
716,
29918,
1765,
29918,
10568,
29892,
1583,
17255,
3027,
29918,
1643,
29889,
2311,
2141,
2103,
3101,
13,
9651,
1583,
29889,
18575,
10463,
4297,
2141,
842,
5074,
14448,
29898,
1482,
29918,
1765,
29918,
10568,
29897,
13,
9651,
1583,
29889,
18575,
10463,
4297,
2141,
842,
7976,
12539,
29898,
1482,
29918,
3317,
29918,
3545,
29897,
13,
13,
1678,
822,
679,
29918,
1493,
29918,
5064,
29898,
1311,
29897,
1599,
660,
5228,
29901,
13,
4706,
396,
921,
338,
14698,
6355,
2594,
29892,
343,
338,
11408,
6355,
2594,
13,
4706,
921,
353,
11904,
29898,
1311,
29889,
22672,
10463,
4297,
2141,
3488,
14448,
580,
29914,
29906,
29897,
718,
1583,
29889,
22672,
10463,
4297,
2141,
1767,
580,
13,
4706,
343,
353,
11904,
29898,
1311,
29889,
18575,
10463,
4297,
2141,
3488,
14448,
580,
29914,
29906,
29897,
718,
1583,
29889,
18575,
10463,
4297,
2141,
1767,
580,
13,
4706,
736,
660,
5228,
29898,
29916,
29892,
343,
29897,
13,
13,
1678,
822,
4818,
29918,
262,
29918,
1493,
637,
29898,
1311,
29892,
4818,
29901,
29984,
5228,
1125,
13,
4706,
396,
921,
338,
14698,
6355,
2594,
29892,
343,
338,
11408,
6355,
2594,
13,
4706,
716,
29918,
29916,
353,
4818,
29889,
29916,
580,
13,
4706,
716,
29918,
29891,
353,
4818,
29889,
29891,
580,
13,
4706,
565,
29871,
29900,
529,
716,
29918,
29916,
5277,
1583,
17255,
3027,
29918,
1643,
29889,
2311,
2141,
2103,
580,
322,
320,
13,
462,
29900,
529,
716,
29918,
29891,
5277,
1583,
17255,
3027,
29918,
1643,
29889,
2311,
2141,
3545,
7295,
13,
9651,
298,
29918,
791,
353,
716,
29918,
29916,
448,
11904,
29898,
1311,
29889,
22672,
10463,
4297,
2141,
3488,
14448,
580,
29914,
29906,
29897,
13,
9651,
565,
298,
29918,
791,
529,
29871,
29900,
29901,
13,
18884,
298,
29918,
791,
353,
29871,
29900,
13,
13,
9651,
325,
29918,
791,
353,
716,
29918,
29891,
448,
11904,
29898,
1311,
29889,
18575,
10463,
4297,
2141,
3488,
14448,
580,
29914,
29906,
29897,
13,
9651,
565,
325,
29918,
791,
529,
29871,
29900,
29901,
13,
18884,
325,
29918,
791,
353,
29871,
29900,
13,
13,
9651,
1583,
29889,
22672,
10463,
4297,
2141,
842,
1917,
29898,
29882,
29918,
791,
29897,
13,
9651,
1583,
29889,
18575,
10463,
4297,
2141,
842,
1917,
29898,
29894,
29918,
791,
29897,
13,
13,
1678,
822,
1180,
1061,
29918,
3283,
29898,
1311,
29897,
1599,
660,
5228,
29901,
13,
4706,
736,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
3283,
580,
13,
13,
1678,
822,
731,
29918,
2029,
1061,
29918,
3283,
29898,
1311,
29892,
1400,
291,
29901,
29984,
5228,
1125,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
29918,
2029,
1061,
29918,
3283,
29898,
2490,
291,
29897,
13,
13,
1678,
822,
1180,
1061,
29918,
2311,
29898,
1311,
29897,
1599,
660,
3505,
29901,
13,
4706,
736,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
2311,
580,
13,
13,
1678,
822,
731,
29918,
2029,
1061,
29918,
2311,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
842,
29918,
2029,
1061,
29918,
2311,
29898,
2311,
29897,
13,
13,
1678,
822,
11086,
29918,
3027,
29898,
1311,
1125,
13,
4706,
1583,
17255,
4990,
29918,
3027,
580,
13,
13,
1678,
822,
3349,
29918,
497,
29918,
1727,
1080,
29898,
1311,
1125,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
5992,
29918,
497,
29918,
1727,
1080,
580,
13,
13,
1678,
822,
6287,
29918,
3027,
29898,
1311,
29892,
7329,
29901,
7411,
1125,
13,
4706,
9995,
21459,
278,
6287,
6198,
304,
278,
2441,
1967,
2159,
7344,
292,
9565,
11959,
29889,
13,
4706,
450,
1967,
338,
10092,
515,
278,
2441,
660,
2940,
1269,
931,
304,
5557,
316,
5105,
362,
15945,
29908,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
19529,
292,
1967,
491,
29901,
426,
29900,
17671,
7329,
29897,
13,
4706,
9277,
29918,
1958,
353,
660,
29925,
861,
1958,
29889,
3166,
2940,
29898,
1311,
17255,
29939,
3027,
29897,
13,
4706,
565,
7329,
2804,
29871,
29896,
29889,
29900,
29901,
13,
9651,
716,
29918,
2311,
353,
1583,
17255,
3027,
29918,
2311,
334,
7329,
13,
9651,
396,
4803,
14705,
29889,
29943,
579,
4300,
5404,
577,
17036,
508,
367,
20660,
746,
19342,
287,
297,
13,
9651,
9277,
29918,
1958,
353,
9277,
29918,
1958,
29889,
7052,
29881,
29898,
1482,
29918,
2311,
29892,
14705,
29889,
9598,
1022,
2887,
1103,
29934,
20819,
29892,
14705,
29889,
29943,
579,
4300,
5404,
29897,
13,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
353,
9277,
29918,
1958,
13,
4706,
1583,
17255,
842,
29918,
29886,
861,
1958,
580,
13,
13,
1678,
822,
6287,
29918,
517,
29918,
2311,
29898,
1311,
29892,
716,
29918,
2311,
29901,
29984,
3505,
1125,
13,
4706,
9995,
17185,
278,
1967,
304,
278,
2183,
2159,
7344,
292,
9565,
11959,
29889,
2823,
1732,
597,
1514,
29889,
17915,
29889,
601,
29914,
17915,
29899,
29945,
29914,
29939,
29886,
861,
1958,
29889,
1420,
29937,
7052,
29881,
13,
4706,
363,
2472,
1048,
920,
278,
9565,
11959,
338,
16459,
773,
14705,
29889,
9598,
1022,
2887,
1103,
29934,
20819,
13,
4706,
1938,
451,
1246,
28424,
1728,
263,
1246,
304,
10092,
29918,
2311,
408,
1967,
674,
1999,
332,
411,
10324,
21640,
15945,
29908,
13,
13,
4706,
396,
4803,
14705,
29889,
29943,
579,
4300,
5404,
577,
17036,
508,
367,
20660,
746,
19342,
287,
297,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
353,
1583,
17255,
29886,
861,
29918,
1958,
29889,
7052,
29881,
29898,
1482,
29918,
2311,
29892,
14705,
29889,
9598,
1022,
2887,
1103,
29934,
20819,
29892,
14705,
29889,
29943,
579,
4300,
5404,
29897,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
19529,
292,
304,
2159,
29901,
426,
29900,
17671,
716,
29918,
2311,
29897,
13,
4706,
1583,
17255,
842,
29918,
29886,
861,
1958,
580,
13,
13,
1678,
822,
6287,
29918,
517,
29918,
3545,
29898,
1311,
29892,
3171,
29901,
524,
1125,
13,
4706,
9995,
17185,
278,
1967,
304,
278,
2183,
3171,
7344,
292,
9565,
11959,
29889,
13,
4706,
1938,
451,
1246,
28424,
1728,
263,
1246,
304,
10092,
29918,
2311,
408,
1967,
674,
1999,
332,
411,
10324,
21640,
15945,
29908,
13,
13,
4706,
565,
1583,
17255,
3027,
29918,
1643,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
7084,
9323,
17255,
14480,
29889,
8382,
703,
7052,
29918,
517,
29918,
3545,
1180,
1061,
2159,
29901,
426,
29900,
1118,
926,
29901,
426,
29896,
17671,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
2311,
3285,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
3283,
3101,
13,
13,
4706,
396,
4803,
14705,
29889,
29943,
579,
4300,
5404,
577,
17036,
508,
367,
20660,
746,
19342,
287,
297,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
353,
1583,
17255,
29886,
861,
29918,
1958,
29889,
7052,
29881,
1762,
7011,
29898,
3545,
29892,
14705,
29889,
29943,
579,
4300,
5404,
29897,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
19529,
292,
304,
3171,
29901,
426,
29900,
17671,
3171,
29897,
13,
4706,
1583,
17255,
842,
29918,
29886,
861,
1958,
580,
13,
13,
1678,
822,
6287,
29918,
517,
29918,
2103,
29898,
1311,
29892,
2920,
29901,
524,
1125,
13,
4706,
9995,
17185,
278,
1967,
304,
278,
2183,
2920,
7344,
292,
9565,
11959,
29889,
13,
4706,
1938,
451,
1246,
28424,
1728,
263,
1246,
304,
10092,
29918,
2311,
408,
1967,
674,
1999,
332,
411,
10324,
21640,
15945,
29908,
13,
13,
4706,
396,
4803,
14705,
29889,
29943,
579,
4300,
5404,
577,
17036,
508,
367,
20660,
746,
19342,
287,
297,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
353,
1583,
17255,
29886,
861,
29918,
1958,
29889,
7052,
29881,
1762,
6110,
29898,
2103,
29892,
14705,
29889,
29943,
579,
4300,
5404,
29897,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
19529,
292,
304,
2920,
29901,
426,
29900,
17671,
2920,
29897,
13,
4706,
1583,
17255,
842,
29918,
29886,
861,
1958,
580,
13,
13,
1678,
822,
10092,
29918,
2311,
29898,
1311,
1125,
13,
4706,
9995,
12071,
278,
1967,
2159,
304,
29871,
29896,
304,
29871,
29896,
15945,
29908,
13,
4706,
396,
6376,
29877,
328,
278,
1967,
29892,
10324,
21640,
1999,
1295,
278,
1967,
13,
4706,
565,
1583,
17255,
3027,
29918,
1643,
29889,
5349,
29918,
2029,
1061,
7295,
13,
9651,
7084,
9323,
17255,
14480,
29889,
8382,
703,
12071,
29918,
2311,
1180,
1061,
2159,
29901,
426,
29900,
1118,
926,
29901,
426,
29896,
17671,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
2311,
3285,
13,
18884,
1583,
17255,
3027,
29918,
1643,
29889,
2029,
1061,
29918,
3283,
3101,
13,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
353,
660,
29925,
861,
1958,
29889,
3166,
2940,
29898,
1311,
17255,
29939,
3027,
29897,
13,
4706,
1583,
17255,
842,
29918,
29886,
861,
1958,
580,
13,
13,
1678,
822,
2441,
29918,
3027,
29918,
2103,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
3027,
2920,
297,
17036,
472,
29871,
29896,
304,
29871,
29896,
15945,
29908,
13,
4706,
736,
1583,
17255,
3027,
29918,
2311,
29889,
2103,
580,
13,
13,
1678,
822,
1967,
29918,
2103,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
3784,
1967,
2920,
15945,
29908,
13,
4706,
736,
1583,
17255,
29886,
861,
29918,
1958,
29889,
2311,
2141,
2103,
580,
13,
13,
1678,
822,
2441,
29918,
3027,
29918,
3545,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
3027,
3171,
297,
17036,
472,
29871,
29896,
304,
29871,
29896,
15945,
29908,
13,
4706,
736,
1583,
17255,
3027,
29918,
2311,
29889,
3545,
580,
13,
13,
1678,
822,
1967,
29918,
3545,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
3784,
1967,
3171,
15945,
29908,
13,
4706,
736,
1583,
17255,
29886,
861,
29918,
1958,
29889,
2311,
2141,
3545,
580,
13,
13,
1678,
822,
5906,
29918,
2103,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
9264,
29918,
2103,
13,
13,
1678,
822,
5906,
29918,
3545,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
736,
1583,
17255,
9264,
29918,
3545,
13,
13,
1678,
822,
788,
29918,
8391,
29918,
6203,
29898,
1311,
29892,
4038,
29901,
13799,
8592,
2624,
1125,
13,
4706,
1583,
17255,
3027,
29918,
1643,
29889,
1202,
29918,
8391,
29918,
6203,
29898,
6203,
29897,
13,
13,
1678,
822,
4078,
29918,
3027,
29898,
1311,
29892,
934,
29918,
978,
29901,
710,
1125,
13,
4706,
565,
451,
934,
29918,
978,
29889,
1975,
2541,
17350,
6173,
1159,
322,
451,
934,
29918,
978,
29889,
1975,
2541,
17350,
2732,
1159,
322,
451,
934,
29918,
978,
29889,
1975,
2541,
17350,
29916,
3358,
29908,
1125,
13,
9651,
934,
29918,
978,
4619,
11393,
6173,
29908,
13,
4706,
1583,
17255,
29886,
861,
29918,
1958,
29889,
7620,
29898,
1445,
29918,
978,
29892,
11029,
29922,
29896,
29900,
29900,
29897,
13,
13,
1678,
822,
19490,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
1666,
5281,
11109,
304,
29901,
426,
29900,
17671,
2159,
29897,
13,
4706,
396,
910,
10365,
590,
2159,
322,
278,
2479,
11109,
322,
9946,
278,
6355,
22306,
304,
2767,
6284,
13,
4706,
1583,
29889,
8030,
2141,
21476,
29898,
2311,
29897,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
13555,
19490,
11109,
590,
2159,
29901,
426,
29900,
1118,
1776,
637,
29901,
426,
29896,
1118,
11109,
29901,
426,
29906,
17671,
13,
9651,
1583,
29889,
2311,
3285,
1583,
29889,
1493,
637,
2141,
2311,
3285,
1583,
29889,
8030,
2141,
2311,
3101,
13,
13,
1678,
822,
19490,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
1666,
675,
2624,
1125,
13,
4706,
396,
3940,
393,
445,
871,
23660,
373,
263,
1404,
19490,
310,
278,
6943,
3474,
29892,
451,
746,
1967,
2159,
3620,
13,
4706,
396,
739,
4947,
19490,
4959,
515,
278,
6890,
746,
278,
1404,
3620,
278,
3474,
2159,
1434,
278,
18379,
4947,
372,
13,
4706,
396,
2030,
2159,
322,
1741,
2159,
1244,
526,
1776,
637,
15786,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
21476,
2624,
2030,
2159,
29901,
426,
29900,
1118,
716,
2159,
29901,
426,
29896,
17671,
1741,
29889,
1025,
3505,
3285,
1741,
29889,
2311,
3101,
13,
4706,
7084,
9323,
17255,
14480,
29889,
8382,
703,
21476,
2624,
1776,
637,
2159,
29901,
426,
29900,
17671,
1583,
29889,
1493,
637,
2141,
2311,
3101,
13,
13,
4706,
396,
10365,
278,
6355,
28408,
13,
4706,
1583,
17255,
5504,
29918,
10510,
29918,
28408,
29898,
3696,
29889,
1025,
3505,
3285,
1741,
29889,
2311,
3101,
13,
4706,
1583,
29889,
1493,
637,
29918,
15033,
29889,
21976,
29898,
1043,
7277,
2624,
29898,
1311,
29889,
657,
29918,
1493,
29918,
5064,
3285,
1741,
29889,
2311,
22130,
13,
13,
13,
1990,
7084,
9323,
5907,
29898,
29984,
6330,
5907,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
2940,
9323,
5907,
1159,
13,
13,
1678,
15526,
29918,
8391,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
9495,
29918,
29885,
8238,
353,
11451,
17915,
10140,
284,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
4038,
29918,
8391,
353,
11451,
17915,
10140,
284,
29898,
13799,
8592,
2624,
29897,
13,
1678,
5764,
353,
11451,
17915,
10140,
284,
29898,
5907,
11123,
2624,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29901,
2940,
29892,
3858,
29901,
710,
29892,
3855,
3027,
29918,
4830,
29901,
29984,
2940,
29889,
5809,
29892,
13,
9651,
4315,
29918,
19156,
29901,
29984,
7364,
29892,
4423,
29918,
1621,
29901,
11227,
29922,
5574,
29892,
15526,
29918,
2622,
29901,
11227,
29922,
8824,
29892,
13,
9651,
2910,
29918,
3888,
29901,
6585,
29903,
1103,
336,
7850,
29889,
3388,
3401,
29922,
8516,
29892,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3560,
29897,
13,
13,
4706,
1583,
3032,
1958,
29918,
3888,
353,
2910,
29918,
3888,
13,
13,
4706,
1583,
17255,
3027,
353,
1967,
13,
4706,
1583,
17255,
3027,
29918,
1643,
353,
3858,
13,
4706,
1583,
3032,
3027,
29918,
4990,
353,
7084,
9323,
29898,
1311,
17255,
3027,
29892,
3855,
3027,
29918,
4830,
29892,
4423,
29918,
1621,
29892,
15526,
29918,
2622,
29892,
1583,
29897,
13,
4706,
1583,
17255,
2344,
29918,
1481,
580,
13,
13,
4706,
1583,
3032,
9264,
29918,
2103,
353,
1583,
3032,
3027,
29918,
4990,
29889,
9264,
29918,
2103,
580,
13,
4706,
1583,
3032,
9264,
29918,
3545,
353,
1583,
3032,
3027,
29918,
4990,
29889,
9264,
29918,
3545,
580,
13,
4706,
7084,
9323,
5907,
17255,
14480,
29889,
8382,
703,
9264,
29918,
2103,
29901,
426,
29900,
1118,
5906,
29918,
3545,
426,
29896,
17671,
1583,
3032,
9264,
29918,
2103,
29892,
1583,
3032,
9264,
29918,
3545,
29897,
13,
13,
4706,
1583,
3032,
10510,
29918,
1646,
29918,
2103,
353,
660,
4873,
29889,
3293,
2141,
29886,
15711,
10095,
2200,
29898,
29984,
5568,
29889,
13427,
29918,
10463,
4297,
5647,
296,
29897,
13,
4706,
7084,
9323,
5907,
17255,
14480,
29889,
8382,
703,
10510,
29918,
1646,
29918,
2103,
29901,
426,
29900,
17671,
1583,
3032,
10510,
29918,
1646,
29918,
2103,
29897,
13,
13,
4706,
1583,
3032,
3257,
29918,
1646,
29918,
3545,
353,
660,
4873,
29889,
3293,
2141,
29886,
15711,
10095,
2200,
29898,
29984,
5568,
29889,
13427,
29918,
7030,
4297,
7011,
29897,
13,
4706,
7084,
9323,
5907,
17255,
14480,
29889,
8382,
703,
3257,
29918,
1646,
29918,
3545,
29901,
426,
29900,
17671,
1583,
3032,
3257,
29918,
1646,
29918,
3545,
29897,
13,
13,
4706,
1583,
3032,
2557,
29918,
2103,
353,
660,
4873,
29889,
3293,
2141,
29886,
15711,
10095,
2200,
29898,
29984,
5568,
29889,
13427,
29918,
4592,
4308,
6110,
29897,
13,
4706,
7084,
9323,
5907,
17255,
14480,
29889,
8382,
703,
2557,
29918,
2103,
29901,
426,
29900,
17671,
1583,
3032,
2557,
29918,
2103,
29897,
13,
13,
4706,
1583,
3032,
10525,
29918,
19156,
353,
4315,
29918,
19156,
13,
4706,
7084,
9323,
5907,
17255,
14480,
29889,
8382,
703,
10525,
16303,
29901,
426,
29900,
17671,
1583,
3032,
10525,
29918,
19156,
29897,
13,
13,
1678,
822,
4770,
2344,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
29889,
842,
5907,
7030,
29898,
1311,
17255,
3027,
29918,
1643,
29897,
13,
13,
4706,
1583,
29889,
842,
23369,
1705,
8801,
29898,
1311,
3032,
3027,
29918,
4990,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
14658,
29898,
17303,
29889,
2499,
647,
29950,
13409,
29897,
13,
13,
4706,
1583,
3032,
15769,
29918,
8030,
353,
660,
29928,
1698,
8801,
703,
14346,
613,
1583,
29897,
13,
4706,
1583,
3032,
15769,
29918,
8030,
29889,
842,
8263,
3698,
29898,
29984,
29928,
1698,
8801,
29889,
3782,
29928,
1698,
8801,
8263,
3698,
29897,
13,
4706,
1583,
3032,
15769,
29918,
8030,
29889,
842,
7030,
4297,
8801,
29898,
29984,
8801,
29898,
8516,
876,
13,
4706,
1583,
3032,
15769,
29918,
29894,
15580,
353,
25992,
7967,
24266,
29898,
1311,
3032,
1958,
29918,
3888,
29897,
13,
4706,
396,
731,
304,
4343,
3171,
577,
591,
1073,
920,
304,
5912,
278,
1967,
2479,
3474,
13,
4706,
1583,
3032,
15769,
29918,
29894,
15580,
29889,
842,
26262,
7011,
29898,
29896,
29953,
29897,
13,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
15769,
29918,
11631,
29889,
6915,
29898,
1311,
3032,
15769,
29918,
29894,
15580,
29889,
265,
29918,
15769,
29918,
11631,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1563,
29918,
3808,
287,
29889,
6915,
29898,
1311,
29889,
29886,
15711,
29918,
8391,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
15769,
29918,
11631,
29889,
6915,
29898,
1311,
29889,
15769,
29918,
29885,
8238,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
6203,
29918,
8391,
29889,
6915,
29898,
1311,
29889,
6203,
29918,
8391,
29897,
13,
13,
4706,
1583,
3032,
15769,
29918,
8030,
29889,
842,
8801,
29898,
1311,
3032,
15769,
29918,
29894,
15580,
29897,
13,
4706,
1583,
29889,
1202,
29928,
1698,
8801,
29898,
17303,
29889,
15342,
29928,
1698,
8801,
13799,
29892,
1583,
3032,
15769,
29918,
8030,
29897,
13,
13,
1678,
822,
1967,
29918,
1643,
29898,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
17255,
3027,
29918,
1643,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
13799,
8592,
2624,
29897,
13,
1678,
822,
4386,
29918,
12803,
29918,
8391,
29898,
1311,
29892,
1741,
29901,
13799,
8592,
2624,
1125,
13,
4706,
9995,
13554,
4038,
1831,
4959,
515,
1790,
6942,
3474,
15945,
29908,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1202,
29918,
8391,
29918,
6203,
29898,
3696,
29897,
13,
13,
1678,
822,
3349,
29918,
497,
29918,
1727,
1080,
29898,
1311,
1125,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
5992,
29918,
497,
29918,
1727,
1080,
580,
13,
13,
1678,
822,
11086,
29918,
3027,
29898,
1311,
1125,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
22379,
29918,
3027,
580,
13,
13,
1678,
822,
4078,
29918,
3027,
29898,
1311,
29892,
934,
29918,
978,
29901,
710,
1125,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
7620,
29918,
3027,
29898,
1445,
29918,
978,
29897,
13,
13,
1678,
822,
3802,
2624,
29898,
1311,
29892,
1741,
29901,
29984,
11123,
2624,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
28173,
304,
20076,
5764,
856,
1159,
13,
4706,
1583,
29889,
15603,
29889,
21976,
29898,
5907,
11123,
2624,
29898,
1311,
876,
13,
4706,
396,
25967,
298,
2247,
278,
3474,
13,
4706,
1741,
29889,
16044,
580,
13,
13,
13,
1990,
17421,
290,
2940,
9323,
5907,
29898,
2940,
9323,
5907,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
29999,
29667,
2940,
9323,
5907,
1159,
13,
13,
1678,
19342,
29918,
15033,
353,
11451,
17915,
10140,
284,
29898,
1043,
29999,
29667,
7277,
2624,
29897,
13,
1678,
4423,
29918,
15033,
353,
11451,
17915,
10140,
284,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
1776,
29918,
15033,
353,
11451,
17915,
10140,
284,
29898,
1043,
7277,
2624,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29901,
2940,
29892,
3858,
29892,
3855,
3027,
29918,
4830,
29901,
29984,
2940,
29889,
5809,
29892,
13,
9651,
4315,
29918,
19156,
29901,
29984,
7364,
29892,
19342,
29918,
19790,
29901,
7411,
29892,
2910,
29918,
3888,
29901,
6585,
29903,
1103,
336,
7850,
29889,
3388,
3401,
29922,
8516,
29892,
13,
9651,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3027,
29892,
3858,
29892,
3855,
3027,
29918,
4830,
29892,
4315,
29918,
19156,
29892,
7700,
29892,
5852,
29892,
2910,
29918,
3888,
29892,
3847,
29897,
13,
13,
4706,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
29901,
29984,
5228,
353,
6213,
13,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
3027,
29918,
690,
1891,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
3027,
29918,
21476,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1493,
637,
29918,
15033,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1493,
29918,
15033,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1493,
637,
29918,
1557,
24476,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
3027,
29918,
10510,
29897,
13,
13,
4706,
396,
14402,
363,
6724,
871,
29892,
3349,
565,
451,
1304,
6467,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1266,
29918,
3808,
287,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1266,
29918,
3808,
29897,
13,
13,
4706,
1583,
17255,
2502,
290,
29918,
19790,
353,
19342,
29918,
19790,
13,
4706,
1583,
17255,
3784,
29918,
2502,
290,
353,
29871,
29896,
29889,
29900,
13,
4706,
1583,
17255,
2502,
290,
29918,
8030,
353,
17421,
290,
8801,
29898,
1311,
29892,
1583,
17255,
3784,
29918,
2502,
290,
29897,
13,
13,
4706,
1583,
17255,
2502,
290,
29918,
29881,
1698,
29918,
8030,
353,
660,
29928,
1698,
8801,
703,
14346,
613,
1583,
29897,
13,
4706,
1583,
17255,
2502,
290,
29918,
29881,
1698,
29918,
8030,
29889,
842,
7030,
4297,
8801,
29898,
29984,
8801,
29898,
8516,
876,
13,
4706,
1583,
17255,
2502,
290,
29918,
29881,
1698,
29918,
8030,
29889,
842,
8801,
29898,
1311,
17255,
2502,
290,
29918,
8030,
29897,
13,
4706,
1583,
29889,
1202,
29928,
1698,
8801,
29898,
17303,
29889,
15342,
29928,
1698,
8801,
13799,
29892,
1583,
17255,
2502,
290,
29918,
29881,
1698,
29918,
8030,
29897,
13,
13,
4706,
396,
1207,
372,
577,
1375,
2159,
8128,
263,
2453,
9429,
637,
310,
29871,
29896,
29945,
29900,
921,
29871,
29896,
29945,
29900,
13,
4706,
1583,
17255,
1195,
12539,
29918,
2311,
353,
660,
3505,
29898,
29896,
29945,
29900,
29892,
29871,
29896,
29945,
29900,
29897,
13,
4706,
1583,
29889,
842,
8140,
12539,
3505,
29898,
1311,
17255,
1195,
12539,
29918,
2311,
29897,
13,
13,
4706,
396,
2847,
2159,
4444,
29892,
4377,
714,
263,
901,
25182,
982,
304,
8161,
2847,
2159,
13,
4706,
1583,
17255,
11522,
29918,
2311,
353,
660,
3505,
29898,
29946,
29900,
29900,
29892,
29871,
29941,
29945,
29900,
29897,
13,
4706,
1583,
29889,
21476,
29898,
1311,
17255,
11522,
29918,
2311,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
580,
13,
1678,
822,
4386,
29918,
2502,
290,
29918,
262,
29898,
1311,
1125,
13,
4706,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
353,
1583,
3032,
3027,
29918,
4990,
29889,
657,
29918,
1493,
29918,
5064,
580,
847,
1583,
17255,
3784,
29918,
2502,
290,
13,
4706,
1583,
17255,
3784,
29918,
2502,
290,
334,
29922,
1583,
17255,
2502,
290,
29918,
19790,
13,
4706,
1583,
17255,
842,
29918,
2502,
290,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
580,
13,
1678,
822,
4386,
29918,
2502,
290,
29918,
449,
29898,
1311,
1125,
13,
4706,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
353,
1583,
3032,
3027,
29918,
4990,
29889,
657,
29918,
1493,
29918,
5064,
580,
847,
1583,
17255,
3784,
29918,
2502,
290,
13,
4706,
1583,
17255,
3784,
29918,
2502,
290,
334,
29922,
29871,
29896,
847,
1583,
17255,
2502,
290,
29918,
19790,
13,
4706,
396,
4046,
19342,
714,
304,
2675,
1250,
304,
29871,
29896,
304,
29871,
29896,
13,
4706,
565,
1583,
17255,
3784,
29918,
2502,
290,
529,
29871,
29896,
29889,
29900,
29901,
13,
9651,
1583,
17255,
3784,
29918,
2502,
290,
353,
29871,
29896,
29889,
29900,
13,
4706,
1583,
17255,
842,
29918,
2502,
290,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
580,
13,
1678,
822,
4386,
29918,
2502,
290,
29918,
12071,
29898,
1311,
1125,
13,
4706,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
353,
1583,
3032,
3027,
29918,
4990,
29889,
657,
29918,
1493,
29918,
5064,
580,
847,
1583,
17255,
3784,
29918,
2502,
290,
13,
4706,
1583,
17255,
3784,
29918,
2502,
290,
353,
29871,
29896,
29889,
29900,
13,
4706,
1583,
17255,
842,
29918,
2502,
290,
580,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
7411,
29897,
13,
1678,
822,
4386,
29918,
2502,
290,
29918,
19790,
29918,
15033,
29898,
1311,
29892,
995,
29901,
7411,
1125,
13,
4706,
1583,
17255,
2502,
290,
29918,
19790,
353,
995,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
2940,
1666,
675,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
3027,
29918,
21476,
29898,
1311,
29892,
1741,
29901,
2940,
1666,
675,
2624,
1125,
13,
4706,
9995,
10380,
3145,
8369,
310,
278,
716,
1967,
2159,
15945,
29908,
13,
4706,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
3027,
19490,
1741,
29892,
716,
2159,
29901,
426,
29900,
1118,
1833,
4818,
29901,
426,
29896,
1118,
716,
1776,
637,
2159,
29901,
426,
29906,
17671,
13,
9651,
1741,
29889,
3027,
29918,
2311,
3285,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
29892,
1741,
29889,
1493,
637,
29918,
2311,
3101,
13,
4706,
565,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
338,
451,
6213,
29901,
13,
9651,
716,
29918,
5064,
29901,
29984,
5228,
353,
1583,
17255,
4230,
29918,
4990,
29918,
5064,
334,
1583,
17255,
3784,
29918,
2502,
290,
13,
9651,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
1482,
4818,
29901,
426,
29900,
17671,
716,
29918,
5064,
29897,
13,
9651,
1583,
3032,
3027,
29918,
4990,
29889,
5064,
29918,
262,
29918,
1493,
637,
29898,
1482,
29918,
5064,
29897,
13,
9651,
1583,
29889,
2502,
290,
29918,
15033,
29889,
21976,
29898,
1043,
29999,
29667,
7277,
2624,
29898,
1311,
17255,
3784,
29918,
2502,
290,
29892,
1741,
29889,
1493,
637,
29918,
2311,
580,
847,
1583,
17255,
3784,
29918,
2502,
290,
876,
13,
13,
1678,
396,
14402,
363,
6724,
871,
29892,
3349,
565,
451,
1304,
6467,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
1266,
29918,
3808,
29898,
1311,
29892,
1741,
29901,
3253,
5143,
287,
14346,
2624,
1125,
13,
4706,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
3421,
2159,
29901,
426,
29900,
17671,
1583,
29889,
2311,
3101,
13,
4706,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
2940,
9323,
2159,
29901,
426,
29900,
17671,
1583,
3032,
3027,
29918,
4990,
29889,
2311,
3101,
13,
4706,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
2940,
9323,
29889,
1493,
637,
2159,
29901,
426,
29900,
17671,
1583,
3032,
3027,
29918,
4990,
29889,
1493,
637,
2141,
2311,
3101,
13,
13,
1678,
822,
4770,
8411,
29918,
1493,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
7277,
2624,
1125,
13,
4706,
396,
29273,
746,
1776,
637,
338,
620,
1891,
13,
4706,
1741,
29889,
7052,
29898,
29896,
847,
1583,
17255,
3784,
29918,
2502,
290,
29897,
13,
4706,
1583,
29889,
1493,
29918,
15033,
29889,
21976,
29898,
3696,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
3027,
29918,
10510,
29898,
1311,
29892,
1741,
29901,
1043,
6508,
7277,
2624,
1125,
13,
4706,
396,
29273,
746,
6355,
28408,
4337,
13,
4706,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
3027,
6355,
16459,
29892,
4818,
29901,
426,
29900,
17671,
1741,
29889,
5064,
3101,
13,
4706,
1741,
29889,
7052,
29898,
29896,
847,
1583,
17255,
3784,
29918,
2502,
290,
29897,
13,
4706,
1583,
29889,
5479,
29918,
15033,
29889,
21976,
29898,
3696,
29897,
13,
13,
1678,
822,
4770,
842,
29918,
2502,
290,
29898,
1311,
1125,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
7052,
29918,
3027,
29898,
1311,
17255,
3784,
29918,
2502,
290,
29897,
13,
4706,
1583,
17255,
2502,
290,
29918,
8030,
29889,
842,
29918,
2502,
290,
29918,
1643,
29898,
1311,
17255,
3784,
29918,
2502,
290,
29897,
13,
13,
1678,
822,
4770,
5064,
29918,
262,
29918,
1493,
637,
29898,
1311,
29892,
4818,
29901,
29984,
5228,
1125,
13,
4706,
396,
4522,
3460,
1244,
338,
12176,
975,
21174,
443,
9342,
304,
4744,
871,
13,
4706,
396,
17421,
290,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
9525,
1776,
304,
29901,
426,
29900,
17671,
4818,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
5064,
29918,
262,
29918,
1493,
637,
29898,
5064,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
822,
4386,
29918,
5479,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
6508,
7277,
2624,
1125,
13,
4706,
396,
5166,
793,
746,
278,
1180,
1061,
338,
6153,
297,
278,
1667,
3474,
13,
4706,
1583,
17255,
5064,
29918,
262,
29918,
1493,
637,
29898,
3696,
29889,
5064,
580,
334,
1583,
17255,
3784,
29918,
2502,
290,
29897,
13,
13,
13,
1990,
4241,
2940,
9323,
5907,
29898,
2940,
9323,
5907,
1125,
13,
13,
1678,
4770,
14480,
29901,
16363,
353,
4522,
10739,
29889,
21707,
703,
6330,
2940,
9323,
5907,
1159,
13,
13,
1678,
1776,
29918,
5479,
29918,
15033,
353,
11451,
17915,
10140,
284,
29898,
1043,
6508,
7277,
2624,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1967,
29901,
2940,
29892,
3858,
29892,
3855,
3027,
29918,
4830,
29901,
29984,
2940,
29889,
5809,
29892,
13,
9651,
4315,
29918,
19156,
29901,
29984,
7364,
29892,
2910,
29918,
3888,
29901,
6585,
29903,
1103,
336,
7850,
29889,
3388,
3401,
29922,
8516,
29892,
13,
9651,
3847,
29922,
8516,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
3027,
29892,
3858,
29892,
3855,
3027,
29918,
4830,
29892,
4315,
29918,
19156,
29892,
5852,
29892,
7700,
29892,
2910,
29918,
3888,
29892,
3847,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
1266,
29918,
3808,
287,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1266,
29918,
3808,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
3027,
29918,
690,
1891,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
3027,
29918,
21476,
29897,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
2029,
1061,
29918,
29885,
8238,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
5479,
29918,
15033,
29897,
13,
13,
4706,
396,
4721,
794,
29879,
3030,
1757,
375,
515,
6445,
373,
1492,
2828,
13,
4706,
396,
9333,
982,
306,
1033,
1284,
304,
5557,
278,
23630,
11109,
3030,
6143,
515,
13,
4706,
396,
21534,
373,
1492,
2828,
1741,
1584,
2466,
372,
1838,
29915,
29873,
2833,
13,
4706,
396,
372,
2869,
3732,
701,
304,
445,
3474,
13,
4706,
1583,
29889,
842,
2677,
6823,
15644,
29898,
17303,
29889,
6572,
794,
2677,
6823,
29897,
13,
13,
4706,
1583,
17255,
15807,
403,
29918,
29879,
7093,
580,
13,
13,
1678,
822,
4770,
15807,
403,
29918,
29879,
7093,
29898,
1311,
1125,
13,
4706,
1583,
17255,
15769,
29918,
29894,
15580,
29918,
3545,
353,
1583,
3032,
15769,
29918,
29894,
15580,
29889,
3545,
580,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
15769,
29918,
29894,
15580,
29918,
3545,
29901,
426,
29900,
17671,
1583,
17255,
15769,
29918,
29894,
15580,
29918,
3545,
29897,
13,
13,
4706,
1583,
17255,
29877,
874,
675,
29918,
2103,
353,
1583,
3032,
10525,
29918,
19156,
29889,
2103,
580,
448,
1583,
3032,
2557,
29918,
2103,
334,
29871,
29906,
13,
4706,
1583,
17255,
29877,
874,
675,
29918,
3545,
353,
1583,
3032,
10525,
29918,
19156,
29889,
3545,
580,
448,
1583,
3032,
3257,
29918,
1646,
29918,
3545,
13,
13,
4706,
396,
4377,
714,
920,
1568,
4315,
2913,
591,
505,
363,
2159,
1967,
304,
6216,
13,
4706,
6216,
29918,
3545,
353,
1583,
3032,
10525,
29918,
19156,
29889,
3545,
580,
448,
1583,
3032,
3257,
29918,
1646,
29918,
3545,
448,
320,
13,
462,
268,
1583,
17255,
15769,
29918,
29894,
15580,
29918,
3545,
448,
1583,
3032,
2557,
29918,
2103,
334,
29871,
29906,
448,
1583,
3032,
9264,
29918,
3545,
334,
29871,
29906,
13,
4706,
6216,
29918,
2103,
353,
1583,
3032,
10525,
29918,
19156,
29889,
2103,
580,
448,
1583,
3032,
2557,
29918,
2103,
334,
29871,
29906,
448,
1583,
3032,
9264,
29918,
2103,
334,
29871,
29906,
13,
13,
4706,
396,
910,
338,
278,
1967,
2159,
591,
29915,
645,
2244,
363,
746,
591,
864,
304,
6216,
304,
3625,
4315,
13,
4706,
1583,
17255,
9202,
29918,
517,
29918,
2311,
353,
660,
3505,
29898,
9202,
29918,
2103,
29892,
6216,
29918,
3545,
29897,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
9202,
281,
29901,
426,
29900,
1118,
298,
29901,
426,
29896,
17671,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
2103,
3285,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
3545,
3101,
13,
13,
4706,
1583,
17255,
2344,
29918,
2311,
580,
13,
13,
1678,
822,
4770,
2344,
29918,
2311,
29898,
1311,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
1311,
3032,
3027,
29918,
4990,
29889,
3027,
29918,
2103,
7295,
426,
29900,
17671,
1583,
3032,
3027,
29918,
4990,
29889,
13492,
29918,
3027,
29918,
2103,
3101,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
1311,
3032,
3027,
29918,
4990,
29889,
3027,
29918,
3545,
7295,
426,
29900,
17671,
1583,
3032,
3027,
29918,
4990,
29889,
13492,
29918,
3027,
29918,
3545,
3101,
13,
4706,
1583,
17255,
842,
29918,
1454,
29918,
3027,
29918,
2311,
29898,
29984,
3505,
29898,
1311,
3032,
3027,
29918,
4990,
29889,
13492,
29918,
3027,
29918,
2103,
3285,
1583,
3032,
3027,
29918,
4990,
29889,
13492,
29918,
3027,
29918,
3545,
22130,
13,
4706,
1583,
17255,
275,
29918,
650,
29918,
517,
29918,
650,
353,
5852,
13,
13,
1678,
822,
4770,
842,
29918,
1454,
29918,
3027,
29918,
2311,
29898,
1311,
29892,
2159,
29901,
29984,
3505,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
29020,
2159,
363,
1967,
2159,
29901,
426,
29900,
17671,
2159,
29897,
13,
4706,
1583,
17255,
1217,
29918,
10510,
29918,
2103,
353,
2159,
29889,
2103,
580,
718,
1583,
3032,
2557,
29918,
2103,
334,
29871,
29906,
718,
1583,
3032,
9264,
29918,
2103,
334,
29871,
29906,
13,
4706,
1583,
17255,
10510,
29918,
2103,
353,
1583,
17255,
1217,
29918,
10510,
29918,
2103,
718,
1583,
3032,
10510,
29918,
1646,
29918,
2103,
13,
13,
4706,
1583,
17255,
1217,
29918,
10510,
29918,
3545,
353,
2159,
29889,
3545,
580,
718,
1583,
3032,
2557,
29918,
2103,
334,
29871,
29906,
718,
1583,
3032,
9264,
29918,
3545,
334,
29871,
29906,
718,
1583,
17255,
15769,
29918,
29894,
15580,
29918,
3545,
13,
4706,
1583,
17255,
10510,
29918,
3545,
353,
1583,
17255,
1217,
29918,
10510,
29918,
3545,
718,
1583,
3032,
10510,
29918,
1646,
29918,
2103,
13,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
1217,
6355,
281,
29901,
426,
29900,
1118,
298,
29901,
426,
29896,
1118,
6355,
281,
29901,
426,
29906,
1118,
298,
29901,
426,
29941,
17671,
13,
9651,
1583,
17255,
1217,
29918,
10510,
29918,
2103,
29892,
1583,
17255,
1217,
29918,
10510,
29918,
3545,
29892,
1583,
17255,
10510,
29918,
2103,
29892,
1583,
17255,
10510,
29918,
3545,
29897,
13,
13,
4706,
1375,
29918,
2103,
353,
1583,
17255,
1217,
29918,
10510,
29918,
2103,
13,
4706,
1375,
29918,
3545,
353,
1583,
17255,
1217,
29918,
10510,
29918,
3545,
13,
13,
4706,
565,
1375,
29918,
3545,
1405,
1583,
3032,
10525,
29918,
19156,
29889,
3545,
580,
322,
1375,
29918,
2103,
1405,
1583,
3032,
10525,
29918,
19156,
29889,
2103,
7295,
13,
9651,
1375,
29918,
3545,
353,
1583,
17255,
29877,
874,
675,
29918,
3545,
13,
9651,
1375,
29918,
2103,
353,
1583,
17255,
29877,
874,
675,
29918,
2103,
13,
13,
4706,
25342,
1375,
29918,
3545,
1405,
1583,
3032,
10525,
29918,
19156,
29889,
3545,
7295,
13,
9651,
1375,
29918,
2103,
353,
1583,
17255,
10510,
29918,
2103,
13,
9651,
1375,
29918,
3545,
353,
1583,
17255,
29877,
874,
675,
29918,
3545,
13,
13,
4706,
25342,
1375,
29918,
2103,
1405,
1583,
3032,
10525,
29918,
19156,
29889,
2103,
7295,
13,
9651,
1375,
29918,
3545,
353,
1583,
17255,
10510,
29918,
3545,
13,
9651,
1375,
29918,
2103,
353,
1583,
17255,
29877,
874,
675,
29918,
2103,
13,
13,
4706,
1583,
29889,
842,
8140,
12539,
3505,
29898,
1195,
29918,
2103,
29892,
1375,
29918,
3545,
29897,
13,
4706,
1583,
29889,
21476,
29898,
1195,
29918,
2103,
29892,
1375,
29918,
3545,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
3253,
5143,
287,
14346,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
1266,
29918,
3808,
29898,
1311,
29892,
1741,
29901,
3253,
5143,
287,
14346,
2624,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
29954,
327,
1492,
2828,
29991,
1159,
13,
4706,
565,
1583,
17255,
275,
29918,
650,
29918,
517,
29918,
650,
29901,
13,
9651,
1583,
17255,
275,
29918,
650,
29918,
517,
29918,
650,
353,
7700,
13,
9651,
565,
1583,
3032,
3027,
29918,
4990,
29889,
3545,
580,
1405,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
3545,
580,
322,
1583,
3032,
3027,
29918,
4990,
29889,
2103,
580,
1405,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
2103,
7295,
13,
18884,
1583,
3032,
3027,
29918,
4990,
29889,
7052,
29918,
517,
29918,
2311,
29898,
1311,
17255,
9202,
29918,
517,
29918,
2311,
29897,
13,
9651,
25342,
1583,
3032,
3027,
29918,
4990,
29889,
3545,
580,
1405,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
3545,
7295,
13,
18884,
1583,
3032,
3027,
29918,
4990,
29889,
7052,
29918,
517,
29918,
3545,
29898,
1311,
17255,
9202,
29918,
517,
29918,
2311,
29889,
3545,
3101,
13,
9651,
25342,
1583,
3032,
3027,
29918,
4990,
29889,
2103,
580,
1405,
1583,
17255,
9202,
29918,
517,
29918,
2311,
29889,
2103,
7295,
13,
18884,
1583,
3032,
3027,
29918,
4990,
29889,
7052,
29918,
517,
29918,
2103,
29898,
1311,
17255,
9202,
29918,
517,
29918,
2311,
29889,
2103,
3101,
13,
9651,
1683,
29901,
13,
18884,
1583,
17255,
275,
29918,
650,
29918,
517,
29918,
650,
353,
5852,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
3027,
29918,
4990,
29889,
12071,
29918,
2311,
580,
13,
9651,
1583,
17255,
275,
29918,
650,
29918,
517,
29918,
650,
353,
5852,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
2940,
1666,
675,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
3027,
29918,
21476,
29898,
1311,
29892,
1741,
29901,
2940,
1666,
675,
2624,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
3027,
19490,
1741,
29892,
716,
1967,
2159,
29901,
426,
29900,
1118,
1776,
637,
2159,
29901,
426,
29896,
17671,
13,
9651,
1741,
29889,
3027,
29918,
2311,
3285,
1741,
29889,
1493,
637,
29918,
2311,
3101,
13,
4706,
1583,
17255,
842,
29918,
1454,
29918,
3027,
29918,
2311,
29898,
3696,
29889,
3027,
29918,
2311,
3101,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
7165,
716,
2159,
29901,
426,
29900,
17671,
1583,
29889,
2311,
3101,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
29999,
29667,
7277,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
2502,
290,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
29999,
29667,
7277,
2624,
1125,
13,
4706,
396,
29273,
263,
19342,
1735,
297,
278,
19342,
3474,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
1482,
19342,
7329,
29901,
426,
29900,
1118,
2159,
29901,
426,
29896,
17671,
1741,
29889,
19790,
3285,
1741,
29889,
2311,
3101,
13,
4706,
1857,
29918,
5479,
353,
1583,
3032,
3027,
29918,
4990,
29889,
2029,
1061,
29918,
3283,
580,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
29918,
2029,
1061,
29918,
2311,
29898,
3696,
29889,
2311,
3101,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
29918,
2029,
1061,
29918,
3283,
29898,
3784,
29918,
5479,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
2502,
290,
29918,
7165,
29918,
5479,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
6508,
7277,
2624,
1125,
13,
4706,
396,
29273,
1967,
1641,
885,
24476,
297,
278,
19342,
3474,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
29918,
2029,
1061,
29918,
3283,
29898,
3696,
29889,
5064,
3101,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
6508,
7277,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
5479,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
6508,
7277,
2624,
1125,
13,
4706,
396,
29273,
1180,
1061,
16229,
297,
590,
7084,
9323,
13,
4706,
396,
14402,
565,
3078,
1683,
4225,
304,
367,
2309,
29892,
12422,
7182,
304,
7182,
29892,
12183,
338,
12176,
975,
21174,
1244,
13,
4706,
396,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
8411,
1776,
4423,
304,
29901,
426,
29900,
17671,
1741,
29889,
5064,
3101,
13,
4706,
1583,
29889,
1493,
29918,
5479,
29918,
15033,
29889,
21976,
29898,
3696,
29897,
13,
13,
1678,
732,
2272,
17915,
29903,
8276,
29898,
1043,
7277,
2624,
29897,
13,
1678,
822,
4770,
8411,
29918,
1493,
29918,
15033,
29898,
1311,
29892,
1741,
29901,
1043,
7277,
2624,
1125,
13,
4706,
4241,
2940,
9323,
5907,
17255,
14480,
29889,
8382,
703,
8411,
1776,
3939,
304,
2159,
29901,
426,
29900,
1118,
1180,
29901,
426,
29896,
17671,
1741,
29889,
2311,
3285,
1741,
29889,
5064,
3101,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
29918,
2029,
1061,
29918,
2311,
29898,
3696,
29889,
2311,
3101,
13,
4706,
1583,
3032,
3027,
29918,
4990,
29889,
842,
29918,
2029,
1061,
29918,
3283,
29898,
3696,
29889,
5064,
3101,
13,
13,
1678,
822,
4511,
29918,
2502,
290,
29918,
7165,
29898,
1311,
29892,
3474,
29901,
29999,
29667,
2940,
9323,
5907,
1125,
13,
4706,
3474,
29889,
2502,
290,
29918,
15033,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
2502,
290,
29918,
15033,
29897,
13,
4706,
3474,
29889,
5479,
29918,
15033,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
2502,
290,
29918,
7165,
29918,
5479,
29918,
15033,
29897,
13,
4706,
3474,
29889,
1493,
29918,
15033,
29889,
6915,
29898,
1311,
17255,
8411,
29918,
1493,
29918,
15033,
29897,
13,
4706,
1583,
29889,
1493,
29918,
5479,
29918,
15033,
29889,
6915,
29898,
7165,
29889,
8411,
29918,
5479,
29918,
15033,
29897,
13,
2
] |
src/minah/explicit.py | chohanjoo/VOICE-CATCHER | 1 | 97312 | from datetime import datetime
import re
__formatted_date_regex__ = "(\d{2,4}[\/|.|\-])?\d{1,2}(\/|\.|-)\d{1,2}( \d{1,2}:\d{1,2}(:\d{1,2})?)?"
__formatted_date_pattern__ = re.compile(__formatted_date_regex__)
__DATETIME__ = 0
__YEAR__ = 1
__DELIMITER__ = 2
__TIME__ = 3
__SECOND__ = 4
def parse(sentence):
result = []
for m in __formatted_date_pattern__.finditer(sentence):
df = ""
if m.group(__YEAR__) is not None:
df += "%Y{0}" if len(m.group(__YEAR__))>3 else "%y{0}"
df += "%m{0}%d"
if m.group(__TIME__) is not None:
df += " %H:%M"
if m.group(__SECOND__) is not None:
df += ":%S"
df = df.format(m.group(__DELIMITER__))
result += [[m.group(0), datetime.strptime(m.group(0), df)]]
return result
| [
1,
515,
12865,
1053,
12865,
13,
5215,
337,
13,
13,
1649,
689,
19667,
29918,
1256,
29918,
13087,
1649,
353,
376,
1194,
29881,
29912,
29906,
29892,
29946,
4400,
25558,
29989,
29889,
4295,
29899,
2314,
29973,
29905,
29881,
29912,
29896,
29892,
29906,
4678,
29914,
4295,
29889,
29989,
29899,
2144,
29881,
29912,
29896,
29892,
29906,
2119,
320,
29881,
29912,
29896,
29892,
29906,
29913,
3583,
29881,
29912,
29896,
29892,
29906,
2119,
3583,
29881,
29912,
29896,
29892,
29906,
1800,
7897,
3026,
13,
1649,
689,
19667,
29918,
1256,
29918,
11037,
1649,
353,
337,
29889,
12198,
22168,
689,
19667,
29918,
1256,
29918,
13087,
1649,
29897,
13,
13,
1649,
25832,
2544,
8890,
1649,
29871,
353,
29871,
29900,
13,
1649,
29979,
26441,
1649,
418,
353,
29871,
29896,
13,
1649,
2287,
5265,
26349,
1001,
1649,
353,
29871,
29906,
13,
1649,
15307,
1649,
418,
353,
29871,
29941,
13,
1649,
1660,
6007,
29928,
1649,
1678,
353,
29871,
29946,
13,
13,
1753,
6088,
29898,
18616,
663,
1125,
13,
1678,
1121,
353,
5159,
13,
1678,
363,
286,
297,
4770,
689,
19667,
29918,
1256,
29918,
11037,
26914,
2886,
1524,
29898,
18616,
663,
1125,
13,
4706,
4489,
353,
5124,
13,
4706,
565,
286,
29889,
2972,
22168,
29979,
26441,
1649,
29897,
338,
451,
6213,
29901,
13,
9651,
4489,
4619,
11860,
29979,
29912,
29900,
5038,
565,
7431,
29898,
29885,
29889,
2972,
22168,
29979,
26441,
1649,
876,
29958,
29941,
1683,
11860,
29891,
29912,
29900,
5038,
13,
4706,
4489,
4619,
11860,
29885,
29912,
29900,
10560,
29881,
29908,
13,
4706,
565,
286,
29889,
2972,
22168,
15307,
1649,
29897,
338,
451,
6213,
29901,
13,
632,
4489,
4619,
376,
1273,
29950,
16664,
29924,
29908,
13,
632,
565,
286,
29889,
2972,
22168,
1660,
6007,
29928,
1649,
29897,
338,
451,
6213,
29901,
13,
462,
4489,
4619,
376,
16664,
29903,
29908,
13,
4706,
4489,
353,
4489,
29889,
4830,
29898,
29885,
29889,
2972,
22168,
2287,
5265,
26349,
1001,
1649,
876,
13,
4706,
1121,
4619,
5519,
29885,
29889,
2972,
29898,
29900,
511,
12865,
29889,
710,
415,
603,
29898,
29885,
29889,
2972,
29898,
29900,
511,
4489,
4638,
29962,
13,
1678,
736,
1121,
13,
2
] |
geotrek/trekking/__init__.py | pierreloicq/Geotrek-admin | 50 | 91775 | <filename>geotrek/trekking/__init__.py
default_app_config = 'geotrek.trekking.apps.TrekkingConfig'
| [
1,
529,
9507,
29958,
479,
327,
22218,
29914,
2484,
6859,
292,
29914,
1649,
2344,
26914,
2272,
13,
4381,
29918,
932,
29918,
2917,
353,
525,
479,
327,
22218,
29889,
2484,
6859,
292,
29889,
13371,
29889,
29911,
276,
6859,
292,
3991,
29915,
13,
2
] |
src/apps/startposes/models/__init__.py | sanderland/katago-server | 27 | 21054 | <filename>src/apps/startposes/models/__init__.py<gh_stars>10-100
from .startpos import StartPos, StartPosCumWeightOnly
| [
1,
529,
9507,
29958,
4351,
29914,
13371,
29914,
2962,
10590,
29914,
9794,
29914,
1649,
2344,
26914,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
869,
2962,
1066,
1053,
7370,
9135,
29892,
7370,
9135,
29907,
398,
22676,
11730,
13,
2
] |
datalite3/constraints.py | afdaniele/datalite3 | 0 | 95137 | """
datalite3.constraints module introduces constraint
types that can be used to hint field variables,
that can be used to signal datalite decorator
constraints in the database.
"""
from typing import TypeVar, Union, Tuple, List
T = TypeVar('T')
# TODO: starting with Python 3.9 the Annotated type is available.
# This is a good replacement for the Generic classes used for Unique and Primary.
# Docs says:
# Specifically, a type T can be annotated with metadata x via the typehint
# Annotated[T, x]. This metadata can be used for either static analysis or at runtime.
# If a library (or tool) encounters a typehint Annotated[T, x] and has no special
# logic for metadata x, it should ignore it and simply treat the type as T.
class ConstraintFailedError(Exception):
"""
This exception is raised when a Constraint fails.
"""
pass
"""
Dataclass fields hinted with this type signals
datalite that the bound column of this
field in the table is NOT NULL and UNIQUE.
"""
Unique = Union[T, Tuple[T]]
"""
Dataclass fields hinted with this type signals
datalite that the bound column of this
field in the table is part of the PRIMARY KEY.
"""
Primary = Union[T, List[T]]
| [
1,
9995,
13,
29881,
2075,
568,
29941,
29889,
13646,
29879,
3883,
4547,
778,
7276,
13,
1678,
4072,
393,
508,
367,
1304,
304,
13182,
1746,
3651,
29892,
13,
1678,
393,
508,
367,
1304,
304,
7182,
1418,
284,
568,
10200,
1061,
13,
1678,
11938,
297,
278,
2566,
29889,
13,
15945,
29908,
13,
3166,
19229,
1053,
5167,
9037,
29892,
7761,
29892,
12603,
552,
29892,
2391,
13,
13,
29911,
353,
5167,
9037,
877,
29911,
1495,
13,
13,
13,
29937,
14402,
29901,
6257,
411,
5132,
29871,
29941,
29889,
29929,
278,
530,
1333,
630,
1134,
338,
3625,
29889,
13,
29937,
539,
910,
338,
263,
1781,
16920,
363,
278,
3251,
293,
4413,
1304,
363,
853,
1387,
322,
28267,
29889,
13,
29937,
539,
360,
12332,
4083,
29901,
13,
29937,
9651,
26321,
29892,
263,
1134,
323,
508,
367,
9732,
630,
411,
15562,
921,
3025,
278,
1134,
29882,
524,
13,
29937,
9651,
530,
1333,
630,
29961,
29911,
29892,
921,
1822,
910,
15562,
508,
367,
1304,
363,
2845,
2294,
7418,
470,
472,
10073,
29889,
13,
29937,
9651,
960,
263,
3489,
313,
272,
5780,
29897,
2094,
1309,
2153,
263,
1134,
29882,
524,
530,
1333,
630,
29961,
29911,
29892,
921,
29962,
322,
756,
694,
4266,
13,
29937,
9651,
5900,
363,
15562,
921,
29892,
372,
881,
11455,
372,
322,
3763,
7539,
278,
1134,
408,
323,
29889,
13,
13,
13,
1990,
1281,
4151,
524,
17776,
2392,
29898,
2451,
1125,
13,
1678,
9995,
13,
1678,
910,
3682,
338,
10425,
746,
263,
1281,
4151,
524,
8465,
29889,
13,
1678,
9995,
13,
1678,
1209,
13,
13,
13,
15945,
29908,
13,
1469,
1990,
4235,
13182,
287,
411,
445,
1134,
18470,
13,
1678,
1418,
284,
568,
393,
278,
3216,
1897,
310,
445,
13,
1678,
1746,
297,
278,
1591,
338,
6058,
4265,
322,
8291,
29902,
11144,
29889,
13,
15945,
29908,
13,
8110,
802,
353,
7761,
29961,
29911,
29892,
12603,
552,
29961,
29911,
5262,
13,
13,
13,
15945,
29908,
13,
1469,
1990,
4235,
13182,
287,
411,
445,
1134,
18470,
13,
1678,
1418,
284,
568,
393,
278,
3216,
1897,
310,
445,
13,
1678,
1746,
297,
278,
1591,
338,
760,
310,
278,
29778,
14636,
29889,
13,
15945,
29908,
13,
26666,
353,
7761,
29961,
29911,
29892,
2391,
29961,
29911,
5262,
13,
2
] |
29 Execution_Time/time123.py | codewithsandy/Python-Basic-Exp | 3 | 125178 | import time
initial = time.time()
#print(initial)
k = 0
while(k<10):
print("This is sandy program")
k+=1
print("while loop execution time: ", time.time() - initial, "Seconds")
initial2 = time.time()
for i in range(1000000):
print("T")
print("for loop execution time: ", time.time() - initial2, "Seconds")
localtime = time.asctime(time.localtime(time.time()))
print(localtime) | [
1,
1053,
931,
13,
13,
11228,
353,
931,
29889,
2230,
580,
13,
29937,
2158,
29898,
11228,
29897,
13,
29895,
353,
29871,
29900,
13,
8000,
29898,
29895,
29966,
29896,
29900,
1125,
13,
1678,
1596,
703,
4013,
338,
11982,
29891,
1824,
1159,
13,
1678,
413,
23661,
29896,
13,
2158,
703,
8000,
2425,
8225,
931,
29901,
9162,
931,
29889,
2230,
580,
448,
2847,
29892,
376,
27535,
1159,
13,
13,
11228,
29906,
353,
931,
29889,
2230,
580,
13,
1454,
474,
297,
3464,
29898,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
1125,
13,
1678,
1596,
703,
29911,
1159,
13,
2158,
703,
1454,
2425,
8225,
931,
29901,
9162,
931,
29889,
2230,
580,
448,
2847,
29906,
29892,
376,
27535,
1159,
13,
13,
2997,
2230,
353,
931,
29889,
294,
312,
603,
29898,
2230,
29889,
2997,
2230,
29898,
2230,
29889,
2230,
22130,
13,
2158,
29898,
2997,
2230,
29897,
2
] |
aprsmon.py | ZigmundRat/weakmon | 0 | 174044 | <reponame>ZigmundRat/weakmon<filename>aprsmon.py
#!/usr/local/bin/python
#
# decode APRS packets.
#
# needs a sound card connected to a radio
# tuned to 144.390 in FM.
#
# to read from a .wav file, use ./aprsrecv.py -file xxx.wav
#
import aprsrecv
import weakargs
import weakaudio
import weakcat
import sys
def cb(fate, msg, start, space_to_mark, snr):
# fate=0 -- unlikely to be correct.
# fate=1 -- CRC failed but syntax look OK.
# fate=2 -- CRC is correct.
if fate >= 2:
print("%.1f %s" % (snr, msg))
def main():
parser = weakargs.stdparse('Decode APRS.')
args = weakargs.parse_args(parser)
if args.cat != None:
cat = weakcat.open(args.cat)
cat.set_fm_data()
# cat.sdr.setgain(0)
cat.setf(0, 144390000)
if args.card == None:
parser.error("aprsmon requires -card")
ar = aprsrecv.APRSRecv()
ar.callback = cb
ar.opencard(args.card)
ar.gocard()
sys.exit(0)
main()
| [
1,
529,
276,
1112,
420,
29958,
29999,
335,
15282,
29934,
271,
29914,
25129,
3712,
29966,
9507,
29958,
481,
2288,
3712,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2997,
29914,
2109,
29914,
4691,
13,
13,
29937,
13,
29937,
21822,
319,
10593,
29903,
23912,
29889,
13,
29937,
13,
29937,
4225,
263,
6047,
5881,
6631,
304,
263,
7155,
13,
29937,
18515,
287,
304,
29871,
29896,
29946,
29946,
29889,
29941,
29929,
29900,
297,
20499,
29889,
13,
29937,
13,
29937,
304,
1303,
515,
263,
869,
29893,
485,
934,
29892,
671,
11431,
481,
2288,
3757,
29894,
29889,
2272,
448,
1445,
921,
4419,
29889,
29893,
485,
13,
29937,
13,
13,
5215,
21783,
29879,
3757,
29894,
13,
5215,
8062,
5085,
13,
5215,
8062,
18494,
13,
5215,
8062,
4117,
13,
5215,
10876,
13,
13,
1753,
26324,
29898,
29888,
403,
29892,
10191,
29892,
1369,
29892,
2913,
29918,
517,
29918,
3502,
29892,
5807,
29878,
1125,
13,
1678,
396,
23779,
29922,
29900,
1192,
25057,
304,
367,
1959,
29889,
13,
1678,
396,
23779,
29922,
29896,
1192,
315,
10363,
5229,
541,
5877,
1106,
9280,
29889,
13,
1678,
396,
23779,
29922,
29906,
1192,
315,
10363,
338,
1959,
29889,
13,
1678,
565,
23779,
6736,
29871,
29906,
29901,
13,
4706,
1596,
11702,
29889,
29896,
29888,
1273,
29879,
29908,
1273,
313,
16586,
29878,
29892,
10191,
876,
13,
13,
1753,
1667,
7295,
13,
1678,
13812,
353,
8062,
5085,
29889,
4172,
5510,
877,
2772,
401,
319,
10593,
29903,
29889,
1495,
13,
1678,
6389,
353,
8062,
5085,
29889,
5510,
29918,
5085,
29898,
16680,
29897,
13,
268,
13,
1678,
565,
6389,
29889,
4117,
2804,
6213,
29901,
13,
4706,
6635,
353,
8062,
4117,
29889,
3150,
29898,
5085,
29889,
4117,
29897,
13,
4706,
6635,
29889,
842,
29918,
24826,
29918,
1272,
580,
13,
4706,
396,
6635,
29889,
4928,
29878,
29889,
842,
29887,
475,
29898,
29900,
29897,
13,
4706,
6635,
29889,
842,
29888,
29898,
29900,
29892,
29871,
29896,
29946,
29946,
29941,
29929,
29900,
29900,
29900,
29900,
29897,
13,
13,
1678,
565,
6389,
29889,
7543,
1275,
6213,
29901,
13,
4706,
13812,
29889,
2704,
703,
481,
2288,
3712,
6858,
448,
7543,
1159,
13,
13,
1678,
564,
353,
21783,
29879,
3757,
29894,
29889,
3301,
12445,
4789,
29894,
580,
13,
1678,
564,
29889,
14035,
353,
26324,
13,
1678,
564,
29889,
3150,
7543,
29898,
5085,
29889,
7543,
29897,
13,
1678,
564,
29889,
29887,
542,
538,
580,
13,
13,
1678,
10876,
29889,
13322,
29898,
29900,
29897,
13,
13,
3396,
580,
13,
2
] |
recipes_api/app/recipe/views.py | maransowthri/django_rest_udemy | 0 | 185220 | <gh_stars>0
from rest_framework import viewsets, mixins, status
from rest_framework.response import Response
from rest_framework.decorators import action
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from recipe.models import Tag, Ingredient, Recipe
from recipe.serializers import TagSerializer, IngredientSerializer, \
RecipeSerializer, RecipeDetailSerializer, \
RecipeImageSerializer
class BaseRecipeViewSet(viewsets.GenericViewSet,
mixins.ListModelMixin,
mixins.CreateModelMixin):
authentication_classes = (TokenAuthentication,)
permission_classes = (IsAuthenticated,)
def perform_create(self, serializer):
serializer.save(user=self.request.user)
def get_queryset(self):
queryset = self.queryset
params = self.request.query_params.get('assigned_only')
if params:
params_numbers = list(map(int, params.split(',')))
queryset = queryset.filter(pk__in=params_numbers)
return queryset.filter(user=self.request.user).order_by('-name')
class TagsView(BaseRecipeViewSet):
serializer_class = TagSerializer
queryset = Tag.objects.all()
class IngredientsView(BaseRecipeViewSet):
queryset = Ingredient.objects.all()
serializer_class = IngredientSerializer
class RecipesView(viewsets.ModelViewSet):
authentication_classes = (TokenAuthentication,)
serializer_class = RecipeSerializer
permission_classes = (IsAuthenticated,)
queryset = Recipe.objects.all()
def get_queryset(self):
queryset = self.queryset
tags_params = self.request.query_params.get('tags')
if tags_params:
tags = list(map(int, tags_params.split(',')))
queryset = queryset.filter(tags__id__in=tags)
ingredients_params = self.request.query_params.get('ingredients')
if ingredients_params:
ingredients = list(map(int, ingredients_params.split(',')))
queryset = queryset.filter(ingredients__id__in=ingredients)
return queryset.filter(user=self.request.user)
def perform_create(self, serializer):
return serializer.save(user=self.request.user)
def get_serializer_class(self):
if self.action == 'retrieve':
return RecipeDetailSerializer
elif self.action == 'upload-image':
return RecipeImageSerializer
return RecipeSerializer
@action(methods=['POST'], detail=True, url_path='upload-image')
def upload_image(self, request, pk=None):
recipe = self.get_object()
serializer = self.get_serializer(
recipe,
data=request.data
)
if serializer.is_valid():
serializer.save()
return Response(
serializer.data,
status=status.HTTP_201_CREATED
)
return Response(
serializer.errors,
status=status.HTTP_400_BAD_REQUEST
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1791,
29918,
4468,
1053,
1776,
7224,
29892,
6837,
1144,
29892,
4660,
13,
3166,
1791,
29918,
4468,
29889,
5327,
1053,
13291,
13,
3166,
1791,
29918,
4468,
29889,
19557,
4097,
1053,
3158,
13,
3166,
1791,
29918,
4468,
29889,
23055,
1053,
25159,
16746,
13,
3166,
1791,
29918,
4468,
29889,
17858,
6847,
1053,
1317,
6444,
4173,
630,
13,
13,
3166,
9522,
412,
29889,
9794,
1053,
10522,
29892,
22607,
1127,
993,
29892,
830,
24044,
13,
3166,
9522,
412,
29889,
15550,
19427,
1053,
10522,
17679,
29892,
22607,
1127,
993,
17679,
29892,
320,
13,
462,
1669,
830,
24044,
17679,
29892,
830,
24044,
16570,
17679,
29892,
320,
13,
462,
1669,
830,
24044,
2940,
17679,
13,
13,
13,
1990,
7399,
1123,
24044,
1043,
2697,
29898,
1493,
7224,
29889,
15809,
1043,
2697,
29892,
13,
462,
4706,
6837,
1144,
29889,
1293,
3195,
29924,
861,
262,
29892,
13,
462,
4706,
6837,
1144,
29889,
4391,
3195,
29924,
861,
262,
1125,
13,
1678,
10760,
29918,
13203,
353,
313,
6066,
16746,
29892,
29897,
13,
1678,
10751,
29918,
13203,
353,
313,
3624,
6444,
4173,
630,
29892,
29897,
13,
13,
1678,
822,
2189,
29918,
3258,
29898,
1311,
29892,
7797,
3950,
1125,
13,
4706,
7797,
3950,
29889,
7620,
29898,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
29897,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
1125,
13,
4706,
2346,
842,
353,
1583,
29889,
1972,
842,
13,
4706,
8636,
353,
1583,
29889,
3827,
29889,
1972,
29918,
7529,
29889,
657,
877,
465,
12961,
29918,
6194,
1495,
13,
4706,
565,
8636,
29901,
13,
9651,
8636,
29918,
20326,
353,
1051,
29898,
1958,
29898,
524,
29892,
8636,
29889,
5451,
29898,
3788,
4961,
13,
9651,
2346,
842,
353,
2346,
842,
29889,
4572,
29898,
20571,
1649,
262,
29922,
7529,
29918,
20326,
29897,
13,
4706,
736,
2346,
842,
29889,
4572,
29898,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
467,
2098,
29918,
1609,
877,
29899,
978,
1495,
13,
13,
13,
1990,
917,
1043,
29898,
5160,
1123,
24044,
1043,
2697,
1125,
13,
1678,
7797,
3950,
29918,
1990,
353,
10522,
17679,
13,
1678,
2346,
842,
353,
10522,
29889,
12650,
29889,
497,
580,
13,
13,
13,
1990,
22607,
1127,
10070,
1043,
29898,
5160,
1123,
24044,
1043,
2697,
1125,
13,
1678,
2346,
842,
353,
22607,
1127,
993,
29889,
12650,
29889,
497,
580,
13,
1678,
7797,
3950,
29918,
1990,
353,
22607,
1127,
993,
17679,
13,
13,
13,
1990,
830,
455,
5547,
1043,
29898,
1493,
7224,
29889,
3195,
1043,
2697,
1125,
13,
1678,
10760,
29918,
13203,
353,
313,
6066,
16746,
29892,
29897,
13,
1678,
7797,
3950,
29918,
1990,
353,
830,
24044,
17679,
13,
1678,
10751,
29918,
13203,
353,
313,
3624,
6444,
4173,
630,
29892,
29897,
13,
1678,
2346,
842,
353,
830,
24044,
29889,
12650,
29889,
497,
580,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
1125,
13,
4706,
2346,
842,
353,
1583,
29889,
1972,
842,
13,
4706,
8282,
29918,
7529,
353,
1583,
29889,
3827,
29889,
1972,
29918,
7529,
29889,
657,
877,
11338,
1495,
13,
4706,
565,
8282,
29918,
7529,
29901,
13,
9651,
8282,
353,
1051,
29898,
1958,
29898,
524,
29892,
8282,
29918,
7529,
29889,
5451,
29898,
3788,
4961,
13,
9651,
2346,
842,
353,
2346,
842,
29889,
4572,
29898,
11338,
1649,
333,
1649,
262,
29922,
11338,
29897,
13,
4706,
2348,
1127,
10070,
29918,
7529,
353,
1583,
29889,
3827,
29889,
1972,
29918,
7529,
29889,
657,
877,
292,
1127,
10070,
1495,
13,
4706,
565,
2348,
1127,
10070,
29918,
7529,
29901,
13,
9651,
2348,
1127,
10070,
353,
1051,
29898,
1958,
29898,
524,
29892,
2348,
1127,
10070,
29918,
7529,
29889,
5451,
29898,
3788,
4961,
13,
9651,
2346,
842,
353,
2346,
842,
29889,
4572,
29898,
292,
1127,
10070,
1649,
333,
1649,
262,
29922,
292,
1127,
10070,
29897,
13,
4706,
736,
2346,
842,
29889,
4572,
29898,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
29897,
13,
13,
1678,
822,
2189,
29918,
3258,
29898,
1311,
29892,
7797,
3950,
1125,
13,
4706,
736,
7797,
3950,
29889,
7620,
29898,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
29897,
13,
13,
1678,
822,
679,
29918,
15550,
3950,
29918,
1990,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
2467,
1275,
525,
276,
509,
2418,
2396,
13,
9651,
736,
830,
24044,
16570,
17679,
13,
4706,
25342,
1583,
29889,
2467,
1275,
525,
9009,
29899,
3027,
2396,
13,
9651,
736,
830,
24044,
2940,
17679,
13,
4706,
736,
830,
24044,
17679,
13,
13,
1678,
732,
2467,
29898,
23515,
29922,
1839,
5438,
7464,
9493,
29922,
5574,
29892,
3142,
29918,
2084,
2433,
9009,
29899,
3027,
1495,
13,
1678,
822,
6441,
29918,
3027,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
9522,
412,
353,
1583,
29889,
657,
29918,
3318,
580,
13,
4706,
7797,
3950,
353,
1583,
29889,
657,
29918,
15550,
3950,
29898,
13,
9651,
9522,
412,
29892,
13,
9651,
848,
29922,
3827,
29889,
1272,
13,
4706,
1723,
13,
4706,
565,
7797,
3950,
29889,
275,
29918,
3084,
7295,
13,
9651,
7797,
3950,
29889,
7620,
580,
13,
9651,
736,
13291,
29898,
13,
18884,
7797,
3950,
29889,
1272,
29892,
13,
18884,
4660,
29922,
4882,
29889,
10493,
29918,
29906,
29900,
29896,
29918,
27045,
29928,
13,
9651,
1723,
13,
4706,
736,
13291,
29898,
13,
9651,
7797,
3950,
29889,
12523,
29892,
13,
9651,
4660,
29922,
4882,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
4706,
1723,
13,
2
] |
fabfile.py | hirokazumiyaji/blue-green-sample | 0 | 47430 | # coding: utf-8
from __future__ import absolute_import, print_function, unicode_literals
from datetime import datetime
import time
from fabric.api import cd, sudo, run as fabrun, env, settings, abort, hide
env.use_ssh_config = True
env.ssh_config_path = "ssh.config"
CONTAINER_PORT = {
"blue": "4567",
"green": "4568",
}
RUN_FORMAT = "docker run -d -p {}:4567 -e SERVER_COLOR={} --name {} -t server"
def production():
env.hosts = ["default"]
def build():
with cd("/src"):
sudo("docker build -t server:latest .")
def deploy():
prepare()
run()
switch()
stop()
def prepare():
result = sudo("ls /etc/nginx/switch/blue", warn_only=True)
if result.succeeded:
env.current = "blue"
env.next = "green"
else:
env.current = "green"
env.next = "blue"
result = sudo("docker ps | grep server | awk '{print $1}'")
if result.succeeded:
env.current_container_id = result.stdout
def _curl(port):
endpoint = "http://localhost:{}".format(port)
with hide('running', 'stdout', 'stderr', 'warnings'):
return fabrun(
"curl -LI {} -o /dev/null -w '%{{http_code}}\n' -s".format(
endpoint))
def run():
server_name = "{}_{}".format(
env.next, datetime.now().strftime("%Y%m%d%H%M%S"))
run_result = sudo(RUN_FORMAT.format(
CONTAINER_PORT[env.next], env.next, server_name
))
with settings(warn_only=True, quiet=True):
for i in range(5):
result = _curl(CONTAINER_PORT[env.next])
if result.stdout == "200":
break
time.sleep(.5)
if result.stdout != "200":
stop(run_result.stdout)
abort("request failed.")
def switch():
sudo("mkdir -p /etc/nginx/switch")
sudo("touch /etc/nginx/switch/{}".format(env.next))
sudo("rm -f /etc/nginx/switch/{}".format(env.current))
def stop(container_id=None):
if container_id is None:
container_id = env.current_container_id
if container_id:
sudo("docker stop {}".format(container_id))
def ps(run_only="true"):
if run_only in ["true", "True"]:
sudo("docker ps")
else:
sudo("docker ps -a")
def images():
sudo("docker images")
def cleancontainer():
sudo("docker rm `docker ps -a -q`", warn_only=True)
def removeimage():
sudo("docker rmi $(docker images | awk '/^<none>/ { print $3 }')", warn_only=True)
| [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
13,
3166,
12865,
1053,
12865,
13,
5215,
931,
13,
13,
3166,
18187,
29889,
2754,
1053,
14965,
29892,
9196,
29892,
1065,
408,
10135,
3389,
29892,
8829,
29892,
6055,
29892,
27450,
29892,
9563,
13,
13,
6272,
29889,
1509,
29918,
15269,
29918,
2917,
353,
5852,
13,
6272,
29889,
15269,
29918,
2917,
29918,
2084,
353,
376,
15269,
29889,
2917,
29908,
13,
13,
6007,
6040,
1177,
1001,
29918,
15082,
353,
426,
13,
1678,
376,
9539,
1115,
376,
29946,
29945,
29953,
29955,
613,
13,
1678,
376,
12692,
1115,
376,
29946,
29945,
29953,
29947,
613,
13,
29913,
13,
13,
29934,
3904,
29918,
19094,
1299,
353,
376,
14695,
1065,
448,
29881,
448,
29886,
426,
6177,
29946,
29945,
29953,
29955,
448,
29872,
26996,
5348,
29918,
15032,
1955,
3790,
29913,
1192,
978,
6571,
448,
29873,
1923,
29908,
13,
13,
13,
1753,
5802,
7295,
13,
1678,
8829,
29889,
23525,
353,
6796,
4381,
3108,
13,
13,
13,
1753,
2048,
7295,
13,
1678,
411,
14965,
11974,
4351,
29908,
1125,
13,
4706,
9196,
703,
14695,
2048,
448,
29873,
1923,
29901,
12333,
869,
1159,
13,
13,
13,
1753,
7246,
7295,
13,
1678,
19012,
580,
13,
1678,
1065,
580,
13,
1678,
4607,
580,
13,
1678,
5040,
580,
13,
13,
13,
1753,
19012,
7295,
13,
1678,
1121,
353,
9196,
703,
3137,
847,
7070,
29914,
23257,
29914,
15123,
29914,
9539,
613,
29383,
29918,
6194,
29922,
5574,
29897,
13,
1678,
565,
1121,
29889,
29879,
1682,
3947,
287,
29901,
13,
4706,
8829,
29889,
3784,
353,
376,
9539,
29908,
13,
4706,
8829,
29889,
4622,
353,
376,
12692,
29908,
13,
1678,
1683,
29901,
13,
4706,
8829,
29889,
3784,
353,
376,
12692,
29908,
13,
4706,
8829,
29889,
4622,
353,
376,
9539,
29908,
13,
13,
1678,
1121,
353,
9196,
703,
14695,
6529,
891,
12680,
1923,
891,
13689,
22372,
2158,
395,
29896,
10162,
1159,
13,
1678,
565,
1121,
29889,
29879,
1682,
3947,
287,
29901,
13,
4706,
8829,
29889,
3784,
29918,
7611,
29918,
333,
353,
1121,
29889,
25393,
13,
13,
13,
1753,
903,
18963,
29898,
637,
1125,
13,
1678,
16248,
353,
376,
1124,
597,
7640,
29901,
8875,
1642,
4830,
29898,
637,
29897,
13,
13,
1678,
411,
9563,
877,
21094,
742,
525,
25393,
742,
525,
303,
20405,
742,
525,
25442,
886,
29374,
13,
4706,
736,
10135,
3389,
29898,
13,
9651,
376,
18963,
448,
5265,
6571,
448,
29877,
847,
3359,
29914,
4304,
448,
29893,
14210,
6224,
1124,
29918,
401,
4229,
29876,
29915,
448,
29879,
1642,
4830,
29898,
13,
18884,
16248,
876,
13,
13,
1753,
1065,
7295,
13,
1678,
1923,
29918,
978,
353,
29850,
3227,
29913,
1642,
4830,
29898,
13,
4706,
8829,
29889,
4622,
29892,
12865,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
29995,
29885,
29995,
29881,
29995,
29950,
29995,
29924,
29995,
29903,
5783,
13,
1678,
1065,
29918,
2914,
353,
9196,
29898,
29934,
3904,
29918,
19094,
1299,
29889,
4830,
29898,
13,
4706,
8707,
6040,
1177,
1001,
29918,
15082,
29961,
6272,
29889,
4622,
1402,
8829,
29889,
4622,
29892,
1923,
29918,
978,
13,
268,
876,
13,
13,
1678,
411,
6055,
29898,
25442,
29918,
6194,
29922,
5574,
29892,
11813,
29922,
5574,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
29945,
1125,
13,
9651,
1121,
353,
903,
18963,
29898,
6007,
6040,
1177,
1001,
29918,
15082,
29961,
6272,
29889,
4622,
2314,
13,
9651,
565,
1121,
29889,
25393,
1275,
376,
29906,
29900,
29900,
1115,
13,
18884,
2867,
13,
9651,
931,
29889,
17059,
11891,
29945,
29897,
13,
13,
1678,
565,
1121,
29889,
25393,
2804,
376,
29906,
29900,
29900,
1115,
13,
4706,
5040,
29898,
3389,
29918,
2914,
29889,
25393,
29897,
13,
4706,
27450,
703,
3827,
5229,
23157,
13,
13,
13,
1753,
4607,
7295,
13,
1678,
9196,
703,
11256,
3972,
448,
29886,
847,
7070,
29914,
23257,
29914,
15123,
1159,
13,
1678,
9196,
703,
16747,
847,
7070,
29914,
23257,
29914,
15123,
29914,
8875,
1642,
4830,
29898,
6272,
29889,
4622,
876,
13,
1678,
9196,
703,
1758,
448,
29888,
847,
7070,
29914,
23257,
29914,
15123,
29914,
8875,
1642,
4830,
29898,
6272,
29889,
3784,
876,
13,
13,
13,
1753,
5040,
29898,
7611,
29918,
333,
29922,
8516,
1125,
13,
1678,
565,
5639,
29918,
333,
338,
6213,
29901,
13,
4706,
5639,
29918,
333,
353,
8829,
29889,
3784,
29918,
7611,
29918,
333,
13,
13,
1678,
565,
5639,
29918,
333,
29901,
13,
4706,
9196,
703,
14695,
5040,
6571,
1642,
4830,
29898,
7611,
29918,
333,
876,
13,
13,
13,
1753,
6529,
29898,
3389,
29918,
6194,
543,
3009,
29908,
1125,
13,
1678,
565,
1065,
29918,
6194,
297,
6796,
3009,
613,
376,
5574,
3108,
29901,
13,
4706,
9196,
703,
14695,
6529,
1159,
13,
1678,
1683,
29901,
13,
4706,
9196,
703,
14695,
6529,
448,
29874,
1159,
13,
13,
13,
1753,
4558,
7295,
13,
1678,
9196,
703,
14695,
4558,
1159,
13,
13,
13,
1753,
5941,
7611,
7295,
13,
1678,
9196,
703,
14695,
20241,
421,
14695,
6529,
448,
29874,
448,
29939,
29952,
613,
29383,
29918,
6194,
29922,
5574,
29897,
13,
13,
13,
1753,
3349,
3027,
7295,
13,
1678,
9196,
703,
14695,
364,
2460,
2427,
14695,
4558,
891,
13689,
8207,
29985,
29966,
9290,
20690,
426,
1596,
395,
29941,
500,
1495,
613,
29383,
29918,
6194,
29922,
5574,
29897,
13,
2
] |
utils.py | iqDF/tsn-pytorch | 2 | 69405 | import os
import glob
from pathlib import Path
#-----------------------
# Write
#-----------------------
def safe_mkdir(directory):
try:
os.mkdir(directory)
except (FileExistsError, OSError):
pass # folder has been created previously
return os.path.abspath(directory)
#-----------------------
# Search
#-----------------------
def abs_listdir(
directory
):
"""
Parameters:
.. directory (str): abspath to directory/folder
Returns:
.. files (list): abspaths to files in directory
"""
return [
os.path.abspath(os.path.join(directory, f))
for f in os.listdir(directory)
]
def search_files_recursively(
directory,
prefix='',
by_extensions = [],
abspaths = True
):
"""
Parameters:
.. directory (str): abspath to directory
.. by_extensions (list/array): extension file to look for. None means look for any file.
Returns:
.. files (list): all files that matches with extension (and other filter if added in the future...)
"""
if by_extensions:
patterns = list(map(lambda x: '**/' + prefix + '*' + x, by_extensions))
files = []
for pattern in patterns:
files.extend(Path(directory).glob(pattern))
else:
files = list(Path(directory).glob('**/' + prefix + '*.*'))
if abspaths:
return sorted([
os.path.abspath(str(f))
for f in files
])
else:
return sorted([
str(f) for f in files
])
#-----------------------
# Others
#-----------------------
def clean_filename(filename):
"""
"""
return filename.replace(' ', '_').replace('.','')
def get_basename(filename):
"""
Parameters:
.. filename (str): file name with extension
Returns:
.. basename (str): file name without extension
"""
basename, _ = os.path.splitext(os.path.basename(filename))
return basename
| [
1,
1053,
2897,
13,
5215,
13149,
13,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
13,
29937,
2683,
26589,
13,
29937,
14350,
13,
29937,
2683,
26589,
13,
13,
1753,
9109,
29918,
11256,
3972,
29898,
12322,
1125,
13,
1678,
1018,
29901,
29871,
13,
4706,
2897,
29889,
11256,
3972,
29898,
12322,
29897,
13,
1678,
5174,
313,
2283,
24217,
2392,
29892,
438,
29173,
1125,
13,
4706,
1209,
29871,
396,
4138,
756,
1063,
2825,
9251,
13,
13,
1678,
736,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
12322,
29897,
13,
13,
13,
29937,
2683,
26589,
13,
29937,
11856,
13,
29937,
2683,
26589,
13,
13,
1753,
6425,
29918,
1761,
3972,
29898,
13,
1678,
3884,
13,
1125,
13,
1678,
9995,
13,
1678,
12662,
2699,
29901,
13,
4706,
6317,
3884,
313,
710,
1125,
633,
1028,
493,
304,
3884,
29914,
12083,
13,
268,
13,
1678,
16969,
29901,
13,
4706,
6317,
2066,
313,
1761,
1125,
633,
1028,
493,
29879,
304,
2066,
297,
3884,
13,
1678,
9995,
13,
1678,
736,
518,
13,
4706,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
12322,
29892,
285,
876,
13,
4706,
363,
285,
297,
2897,
29889,
1761,
3972,
29898,
12322,
29897,
13,
1678,
4514,
13,
13,
13,
1753,
2740,
29918,
5325,
29918,
3757,
1295,
3598,
29898,
13,
1678,
3884,
29892,
13,
1678,
10944,
2433,
742,
13,
1678,
491,
29918,
24299,
353,
19997,
13,
1678,
633,
1028,
493,
29879,
353,
5852,
13,
1125,
13,
1678,
9995,
13,
1678,
12662,
2699,
29901,
13,
4706,
6317,
3884,
313,
710,
1125,
633,
1028,
493,
304,
3884,
13,
4706,
6317,
491,
29918,
24299,
313,
1761,
29914,
2378,
1125,
6081,
934,
304,
1106,
363,
29889,
6213,
2794,
1106,
363,
738,
934,
29889,
13,
268,
13,
1678,
16969,
29901,
13,
4706,
6317,
2066,
313,
1761,
1125,
599,
2066,
393,
7087,
411,
6081,
313,
392,
916,
4175,
565,
2715,
297,
278,
5434,
11410,
13,
1678,
9995,
13,
1678,
565,
491,
29918,
24299,
29901,
13,
4706,
15038,
353,
1051,
29898,
1958,
29898,
2892,
921,
29901,
525,
1068,
22208,
718,
10944,
718,
525,
29930,
29915,
718,
921,
29892,
491,
29918,
24299,
876,
13,
4706,
2066,
353,
5159,
13,
4706,
363,
4766,
297,
15038,
29901,
13,
9651,
2066,
29889,
21843,
29898,
2605,
29898,
12322,
467,
23705,
29898,
11037,
876,
13,
13,
1678,
1683,
29901,
13,
4706,
2066,
353,
1051,
29898,
2605,
29898,
12322,
467,
23705,
877,
1068,
22208,
718,
10944,
718,
525,
29930,
5575,
8785,
13,
268,
13,
1678,
565,
633,
1028,
493,
29879,
29901,
13,
4706,
736,
12705,
4197,
13,
9651,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
710,
29898,
29888,
876,
13,
9651,
363,
285,
297,
2066,
13,
308,
2314,
13,
13,
1678,
1683,
29901,
13,
4706,
736,
12705,
4197,
13,
9651,
851,
29898,
29888,
29897,
363,
285,
297,
2066,
13,
308,
2314,
13,
13,
13,
29937,
2683,
26589,
13,
29937,
438,
3341,
13,
29937,
2683,
26589,
13,
13,
1753,
5941,
29918,
9507,
29898,
9507,
1125,
13,
1678,
9995,
13,
1678,
9995,
13,
1678,
736,
10422,
29889,
6506,
877,
13420,
22868,
2824,
6506,
12839,
3788,
1495,
13,
13,
13,
1753,
679,
29918,
6500,
3871,
29898,
9507,
1125,
13,
1678,
9995,
13,
1678,
12662,
2699,
29901,
13,
4706,
6317,
10422,
313,
710,
1125,
934,
1024,
411,
6081,
13,
13,
1678,
16969,
29901,
13,
4706,
6317,
2362,
3871,
313,
710,
1125,
934,
1024,
1728,
6081,
13,
1678,
9995,
13,
1678,
2362,
3871,
29892,
903,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
9507,
876,
13,
1678,
736,
2362,
3871,
13,
2
] |
Data Analysis/csv remove other label.py | byew/python-do-differernt-csv | 0 | 18492 | import pandas as pd
exa = pd.read_csv('en_dup.csv')
exa.loc[exa['label'] =='F', 'label']= 0
exa.loc[exa['label'] =='T', 'label']= 1
exa.loc[exa['label'] =='U', 'label']= 2
#不读取label2, 只读取0,1标签
exa0 = exa.loc[exa["label"] == 0]
exa1 = exa.loc[exa["label"] == 1]
exa = [exa0, exa1]
exa = pd.concat(exa)
exa.to_csv('train.csv', index=0)
| [
1,
1053,
11701,
408,
10518,
13,
13,
13,
735,
29874,
353,
10518,
29889,
949,
29918,
7638,
877,
264,
29918,
20908,
29889,
7638,
1495,
13,
13,
735,
29874,
29889,
2029,
29961,
735,
29874,
1839,
1643,
2033,
1275,
29915,
29943,
742,
525,
1643,
2033,
29922,
29871,
29900,
13,
735,
29874,
29889,
2029,
29961,
735,
29874,
1839,
1643,
2033,
1275,
29915,
29911,
742,
525,
1643,
2033,
29922,
29871,
29896,
13,
735,
29874,
29889,
2029,
29961,
735,
29874,
1839,
1643,
2033,
1275,
29915,
29965,
742,
525,
1643,
2033,
29922,
29871,
29906,
13,
13,
29937,
30413,
235,
178,
190,
30683,
1643,
29906,
29892,
29871,
31557,
235,
178,
190,
30683,
29900,
30214,
29896,
31062,
234,
176,
193,
13,
13,
735,
29874,
29900,
353,
429,
29874,
29889,
2029,
29961,
735,
29874,
3366,
1643,
3108,
1275,
29871,
29900,
29962,
13,
735,
29874,
29896,
353,
429,
29874,
29889,
2029,
29961,
735,
29874,
3366,
1643,
3108,
1275,
29871,
29896,
29962,
13,
13,
735,
29874,
353,
518,
735,
29874,
29900,
29892,
429,
29874,
29896,
29962,
13,
735,
29874,
353,
10518,
29889,
17685,
29898,
735,
29874,
29897,
13,
13,
735,
29874,
29889,
517,
29918,
7638,
877,
14968,
29889,
7638,
742,
2380,
29922,
29900,
29897,
13,
2
] |
Solutions/346.py | ruppysuppy/Daily-Coding-Problem-Solutions | 70 | 23193 | """
Problem:
You are given a huge list of airline ticket prices between different cities around the
world on a given day. These are all direct flights. Each element in the list has the
format (source_city, destination, price).
Consider a user who is willing to take up to k connections from their origin city A to
their destination B. Find the cheapest fare possible for this journey and print the
itinerary for that journey.
For example, our traveler wants to go from JFK to LAX with up to 3 connections, and our
input flights are as follows:
[
('JFK', 'ATL', 150),
('ATL', 'SFO', 400),
('ORD', 'LAX', 200),
('LAX', 'DFW', 80),
('JFK', 'HKG', 800),
('ATL', 'ORD', 90),
('JFK', 'LAX', 500),
]
Due to some improbably low flight prices, the cheapest itinerary would be
JFK -> ATL -> ORD -> LAX, costing $440.
"""
from sys import maxsize
from typing import Dict, List, Optional, Tuple
from DataStructures.Graph import GraphDirectedWeighted
from DataStructures.PriorityQueue import MinPriorityQueue
def modified_dijkstra(
graph: GraphDirectedWeighted, start: str, k: int
) -> Tuple[Dict[str, int], Dict[str, Optional[str]]]:
dist = {node: maxsize for node in graph.connections}
parent = {node: None for node in graph.connections}
dist[start] = 0
priority_queue = MinPriorityQueue()
[priority_queue.push(node, weight) for node, weight in dist.items()]
while not priority_queue.is_empty():
node = priority_queue.extract_min()
ancestors = 0
parent_node = parent[node]
# calculating ancestors
while parent_node:
ancestors += 1
parent_node = parent[parent_node]
# limiting distance update till k moves
if ancestors <= k:
for neighbour in graph.connections[node]:
if dist[neighbour] > dist[node] + graph.connections[node][neighbour]:
dist[neighbour] = dist[node] + graph.connections[node][neighbour]
parent[neighbour] = node
priority_queue.update_key(neighbour, dist[neighbour])
return dist, parent
def generate_path(
flights: List[Tuple[str, str, int]], start: str, dest: str, k: int
) -> Tuple[int, List[str]]:
# graph generation
graph = GraphDirectedWeighted()
for src, dest, wt in flights:
graph.add_edge(src, dest, wt)
# running dijkstra's algorithm
dist, parent = modified_dijkstra(graph, start, k)
# getting the cost and path
if not parent[dest]:
return []
path, cost = [dest], dist[dest]
curr = parent[dest]
while curr:
path.append(curr)
curr = parent[curr]
return cost, path[::-1]
if __name__ == "__main__":
flights = [
("JFK", "ATL", 150),
("ATL", "SFO", 400),
("ORD", "LAX", 200),
("LAX", "DFW", 80),
("JFK", "HKG", 800),
("ATL", "ORD", 90),
("JFK", "LAX", 500),
]
print(generate_path(flights, "JFK", "LAX", 3))
"""
SPECS:
TIME COMPLEXITY: O(e x v x log(v))
SPACE COMPLEXITY: O(v ^ 2)
[even though dijkstra's algorithm runs in O(e x log(v)) to lock maximum k moves, the
compleity increases to O(e x v x log(v))]
"""
| [
1,
9995,
13,
26604,
29901,
13,
13,
3492,
526,
2183,
263,
12176,
1051,
310,
4799,
1220,
23381,
26094,
1546,
1422,
14368,
2820,
278,
13,
11526,
373,
263,
2183,
2462,
29889,
4525,
526,
599,
1513,
1652,
5861,
29889,
7806,
1543,
297,
278,
1051,
756,
278,
13,
4830,
313,
4993,
29918,
12690,
29892,
12551,
29892,
8666,
467,
13,
13,
13696,
1241,
263,
1404,
1058,
338,
17762,
304,
2125,
701,
304,
413,
12368,
515,
1009,
3978,
4272,
319,
304,
13,
1552,
381,
12551,
350,
29889,
10987,
278,
923,
13198,
20036,
1950,
363,
445,
16342,
322,
1596,
278,
13,
277,
4983,
653,
363,
393,
16342,
29889,
13,
13,
2831,
1342,
29892,
1749,
9850,
261,
10753,
304,
748,
515,
435,
29943,
29968,
304,
365,
6604,
411,
701,
304,
29871,
29941,
12368,
29892,
322,
1749,
13,
2080,
1652,
5861,
526,
408,
4477,
29901,
13,
13,
29961,
13,
1678,
6702,
29967,
29943,
29968,
742,
525,
1299,
29931,
742,
29871,
29896,
29945,
29900,
511,
13,
1678,
6702,
1299,
29931,
742,
525,
29903,
5800,
742,
29871,
29946,
29900,
29900,
511,
13,
1678,
6702,
25593,
742,
525,
4375,
29990,
742,
29871,
29906,
29900,
29900,
511,
13,
1678,
6702,
4375,
29990,
742,
525,
4037,
29956,
742,
29871,
29947,
29900,
511,
13,
1678,
6702,
29967,
29943,
29968,
742,
525,
29950,
29968,
29954,
742,
29871,
29947,
29900,
29900,
511,
13,
1678,
6702,
1299,
29931,
742,
525,
25593,
742,
29871,
29929,
29900,
511,
13,
1678,
6702,
29967,
29943,
29968,
742,
525,
4375,
29990,
742,
29871,
29945,
29900,
29900,
511,
13,
29962,
13,
29928,
434,
304,
777,
4857,
14815,
4482,
16286,
26094,
29892,
278,
923,
13198,
372,
4983,
653,
723,
367,
13,
29967,
29943,
29968,
1599,
319,
14632,
1599,
6323,
29928,
1599,
365,
6604,
29892,
3438,
292,
395,
29946,
29946,
29900,
29889,
13,
15945,
29908,
13,
13,
3166,
10876,
1053,
4236,
2311,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
29892,
28379,
29892,
12603,
552,
13,
13,
3166,
3630,
19560,
1973,
29889,
9527,
1053,
12367,
17392,
287,
22676,
287,
13,
3166,
3630,
19560,
1973,
29889,
29925,
21766,
10620,
1053,
3080,
29925,
21766,
10620,
13,
13,
13,
1753,
9120,
29918,
29881,
13535,
4151,
29898,
13,
1678,
3983,
29901,
12367,
17392,
287,
22676,
287,
29892,
1369,
29901,
851,
29892,
413,
29901,
938,
13,
29897,
1599,
12603,
552,
29961,
21533,
29961,
710,
29892,
938,
1402,
360,
919,
29961,
710,
29892,
28379,
29961,
710,
5262,
5387,
13,
1678,
1320,
353,
426,
3177,
29901,
4236,
2311,
363,
2943,
297,
3983,
29889,
11958,
1953,
29913,
13,
1678,
3847,
353,
426,
3177,
29901,
6213,
363,
2943,
297,
3983,
29889,
11958,
1953,
29913,
13,
1678,
1320,
29961,
2962,
29962,
353,
29871,
29900,
13,
1678,
20136,
29918,
9990,
353,
3080,
29925,
21766,
10620,
580,
13,
1678,
518,
29886,
21766,
29918,
9990,
29889,
5910,
29898,
3177,
29892,
7688,
29897,
363,
2943,
29892,
7688,
297,
1320,
29889,
7076,
580,
29962,
13,
13,
1678,
1550,
451,
20136,
29918,
9990,
29889,
275,
29918,
6310,
7295,
13,
4706,
2943,
353,
20136,
29918,
9990,
29889,
21111,
29918,
1195,
580,
13,
4706,
19525,
943,
353,
29871,
29900,
13,
4706,
3847,
29918,
3177,
353,
3847,
29961,
3177,
29962,
13,
4706,
396,
25202,
19525,
943,
13,
4706,
1550,
3847,
29918,
3177,
29901,
13,
9651,
19525,
943,
4619,
29871,
29896,
13,
9651,
3847,
29918,
3177,
353,
3847,
29961,
3560,
29918,
3177,
29962,
13,
4706,
396,
4046,
292,
5418,
2767,
3428,
413,
16229,
13,
4706,
565,
19525,
943,
5277,
413,
29901,
13,
9651,
363,
17647,
297,
3983,
29889,
11958,
1953,
29961,
3177,
5387,
13,
18884,
565,
1320,
29961,
484,
1141,
6526,
29962,
1405,
1320,
29961,
3177,
29962,
718,
3983,
29889,
11958,
1953,
29961,
3177,
3816,
484,
1141,
6526,
5387,
13,
462,
1678,
1320,
29961,
484,
1141,
6526,
29962,
353,
1320,
29961,
3177,
29962,
718,
3983,
29889,
11958,
1953,
29961,
3177,
3816,
484,
1141,
6526,
29962,
13,
462,
1678,
3847,
29961,
484,
1141,
6526,
29962,
353,
2943,
13,
462,
1678,
20136,
29918,
9990,
29889,
5504,
29918,
1989,
29898,
484,
1141,
6526,
29892,
1320,
29961,
484,
1141,
6526,
2314,
13,
1678,
736,
1320,
29892,
3847,
13,
13,
13,
1753,
5706,
29918,
2084,
29898,
13,
1678,
1652,
5861,
29901,
2391,
29961,
23215,
552,
29961,
710,
29892,
851,
29892,
938,
20526,
1369,
29901,
851,
29892,
2731,
29901,
851,
29892,
413,
29901,
938,
13,
29897,
1599,
12603,
552,
29961,
524,
29892,
2391,
29961,
710,
5262,
29901,
13,
1678,
396,
3983,
12623,
13,
1678,
3983,
353,
12367,
17392,
287,
22676,
287,
580,
13,
1678,
363,
4765,
29892,
2731,
29892,
281,
29873,
297,
1652,
5861,
29901,
13,
4706,
3983,
29889,
1202,
29918,
12864,
29898,
4351,
29892,
2731,
29892,
281,
29873,
29897,
13,
1678,
396,
2734,
652,
25467,
4151,
29915,
29879,
5687,
13,
1678,
1320,
29892,
3847,
353,
9120,
29918,
29881,
13535,
4151,
29898,
4262,
29892,
1369,
29892,
413,
29897,
13,
1678,
396,
2805,
278,
3438,
322,
2224,
13,
1678,
565,
451,
3847,
29961,
7854,
5387,
13,
4706,
736,
5159,
13,
1678,
2224,
29892,
3438,
353,
518,
7854,
1402,
1320,
29961,
7854,
29962,
13,
1678,
16256,
353,
3847,
29961,
7854,
29962,
13,
1678,
1550,
16256,
29901,
13,
4706,
2224,
29889,
4397,
29898,
21962,
29897,
13,
4706,
16256,
353,
3847,
29961,
21962,
29962,
13,
1678,
736,
3438,
29892,
2224,
29961,
1057,
29899,
29896,
29962,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1652,
5861,
353,
518,
13,
4706,
4852,
29967,
29943,
29968,
613,
376,
1299,
29931,
613,
29871,
29896,
29945,
29900,
511,
13,
4706,
4852,
1299,
29931,
613,
376,
29903,
5800,
613,
29871,
29946,
29900,
29900,
511,
13,
4706,
4852,
25593,
613,
376,
4375,
29990,
613,
29871,
29906,
29900,
29900,
511,
13,
4706,
4852,
4375,
29990,
613,
376,
4037,
29956,
613,
29871,
29947,
29900,
511,
13,
4706,
4852,
29967,
29943,
29968,
613,
376,
29950,
29968,
29954,
613,
29871,
29947,
29900,
29900,
511,
13,
4706,
4852,
1299,
29931,
613,
376,
25593,
613,
29871,
29929,
29900,
511,
13,
4706,
4852,
29967,
29943,
29968,
613,
376,
4375,
29990,
613,
29871,
29945,
29900,
29900,
511,
13,
1678,
4514,
13,
1678,
1596,
29898,
17158,
29918,
2084,
29898,
1579,
5861,
29892,
376,
29967,
29943,
29968,
613,
376,
4375,
29990,
613,
29871,
29941,
876,
13,
13,
13,
15945,
29908,
13,
29903,
4162,
9295,
29901,
13,
13,
15307,
4810,
3580,
1307,
29990,
11937,
29901,
438,
29898,
29872,
921,
325,
921,
1480,
29898,
29894,
876,
13,
5550,
11538,
4810,
3580,
1307,
29990,
11937,
29901,
438,
29898,
29894,
6228,
29871,
29906,
29897,
13,
29961,
11884,
2466,
652,
25467,
4151,
29915,
29879,
5687,
6057,
297,
438,
29898,
29872,
921,
1480,
29898,
29894,
876,
304,
7714,
7472,
413,
16229,
29892,
278,
13,
5729,
537,
16415,
304,
438,
29898,
29872,
921,
325,
921,
1480,
29898,
29894,
28166,
13,
15945,
29908,
13,
2
] |
ui/aura_extra/aura_extra.gyp | hefen1/chromium | 0 | 79614 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
# GN version: //ui/aura_extra
'target_name': 'aura_extra',
'type': '<(component)',
'dependencies': [
'../../base/base.gyp:base',
'../../skia/skia.gyp:skia',
'../aura/aura.gyp:aura',
'../base/ui_base.gyp:ui_base',
'../events/events.gyp:events',
'../gfx/gfx.gyp:gfx',
'../gfx/gfx.gyp:gfx_geometry',
],
'defines': [
'AURA_EXTRA_IMPLEMENTATION',
],
'sources': [
'aura_extra_export.h',
'image_window_delegate.cc',
'image_window_delegate.h',
],
},
],
}
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29945,
450,
678,
456,
1974,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
350,
7230,
29899,
3293,
19405,
393,
508,
367,
13,
29937,
1476,
297,
278,
365,
2965,
1430,
1660,
934,
29889,
13,
13,
29912,
13,
29871,
525,
20897,
2396,
426,
13,
1678,
525,
27433,
1974,
29918,
401,
2396,
29871,
29896,
29892,
13,
29871,
2981,
13,
29871,
525,
5182,
29879,
2396,
518,
13,
1678,
426,
13,
418,
396,
402,
29940,
1873,
29901,
849,
1481,
29914,
29874,
2002,
29918,
17833,
13,
418,
525,
5182,
29918,
978,
2396,
525,
29874,
2002,
29918,
17833,
742,
13,
418,
525,
1853,
2396,
12801,
29898,
9700,
29897,
742,
13,
418,
525,
22594,
2396,
518,
13,
4706,
525,
21546,
3188,
29914,
3188,
29889,
29887,
1478,
29901,
3188,
742,
13,
4706,
525,
21546,
808,
423,
29914,
808,
423,
29889,
29887,
1478,
29901,
808,
423,
742,
13,
4706,
525,
6995,
29874,
2002,
29914,
29874,
2002,
29889,
29887,
1478,
29901,
29874,
2002,
742,
13,
4706,
525,
6995,
3188,
29914,
1481,
29918,
3188,
29889,
29887,
1478,
29901,
1481,
29918,
3188,
742,
13,
4706,
525,
6995,
13604,
29914,
13604,
29889,
29887,
1478,
29901,
13604,
742,
13,
4706,
525,
6995,
29887,
11093,
29914,
29887,
11093,
29889,
29887,
1478,
29901,
29887,
11093,
742,
13,
4706,
525,
6995,
29887,
11093,
29914,
29887,
11093,
29889,
29887,
1478,
29901,
29887,
11093,
29918,
19156,
742,
13,
418,
21251,
13,
418,
525,
1753,
1475,
2396,
518,
13,
4706,
525,
29909,
4574,
29909,
29918,
12194,
4717,
29918,
29902,
3580,
1307,
13780,
8098,
742,
13,
418,
21251,
13,
418,
525,
29879,
2863,
2396,
518,
13,
4706,
525,
29874,
2002,
29918,
17833,
29918,
15843,
29889,
29882,
742,
13,
4706,
525,
3027,
29918,
7165,
29918,
21234,
29889,
617,
742,
13,
4706,
525,
3027,
29918,
7165,
29918,
21234,
29889,
29882,
742,
13,
418,
21251,
13,
1678,
2981,
13,
29871,
21251,
13,
29913,
13,
2
] |
bsp_for_art-badge/rtconfig.py | Rbb666/SDK | 0 | 143508 | import os
# toolchains options
ARCH='arm'
CPU='cortex-m4'
CROSS_TOOL='gcc'
# bsp lib config
BSP_LIBRARY_TYPE = None
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if os.getenv('RTT_ROOT'):
RTT_ROOT = os.getenv('RTT_ROOT')
RTT_ROOT = os.path.normpath(os.getcwd() + '../../rt-thread')
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = r'/usr/bin'
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar':
PLATFORM = 'iar'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0'
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
BUILD = 'debug'
if PLATFORM == 'gcc':
# toolchains
PREFIX = 'arm-none-eabi-'
CC = PREFIX + 'gcc'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
CXX = PREFIX + 'g++'
LINK = PREFIX + 'gcc'
TARGET_EXT = 'elf'
SIZE = PREFIX + 'size'
OBJDUMP = PREFIX + 'objdump'
OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS = DEVICE + ' -Dgcc'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/link_scripts/link.lds'
CPATH = ''
LPATH = ''
if BUILD == 'debug':
CFLAGS += ' -O0 -gdwarf-2'
AFLAGS += ' -gdwarf-2'
else:
CFLAGS += ' -O2'
CXXFLAGS = CFLAGS
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'armcc':
# toolchains
CC = 'armcc'
CXX = 'armcc'
AS = 'armasm'
AR = 'armar'
LINK = 'armlink'
TARGET_EXT = 'axf'
DEVICE = ' --cpu Cortex-M4'
CFLAGS = DEVICE + ' --c99 --apcs=interwork'
AFLAGS = DEVICE
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-apollo2.map --scatter rtthread.sct'
LFLAGS += ' --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab)'
EXEC_PATH += '/ARM/ARMCC/bin'
if BUILD == 'debug':
CFLAGS += ' -g -O0'
AFLAGS += ' -g'
else:
CFLAGS += ' -O2'
CXXFLAGS = CFLAGS
CFLAGS += ' -std=c99'
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
| [
1,
1053,
2897,
13,
13,
29937,
5780,
305,
2708,
3987,
13,
1718,
3210,
2433,
2817,
29915,
13,
6271,
29965,
2433,
2616,
4776,
29899,
29885,
29946,
29915,
13,
29907,
1672,
1799,
29918,
4986,
5607,
2433,
19644,
29915,
13,
13,
29937,
289,
1028,
4303,
2295,
13,
29933,
5550,
29918,
5265,
15176,
19926,
29918,
11116,
353,
6213,
13,
13,
361,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
4174,
29374,
13,
1678,
315,
1672,
1799,
29918,
4986,
5607,
353,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
4174,
1495,
13,
361,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
21289,
29374,
13,
1678,
390,
19988,
29918,
21289,
353,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
21289,
1495,
13,
13,
13079,
29911,
29918,
21289,
353,
2897,
29889,
2084,
29889,
12324,
2084,
29898,
359,
29889,
657,
29883,
9970,
580,
718,
525,
21546,
2273,
29899,
7097,
1495,
13,
13,
29937,
4891,
29918,
10154,
8128,
278,
4891,
6516,
13,
29937,
8528,
11206,
29918,
10145,
338,
278,
6516,
6222,
2224,
29892,
363,
1342,
29892,
5920,
29903,
473,
29883,
708,
29892,
4813,
309,
341,
17359,
29892,
306,
1718,
13,
361,
29871,
315,
1672,
1799,
29918,
4986,
5607,
1275,
525,
19644,
2396,
13,
1678,
16507,
1299,
19094,
1678,
353,
525,
19644,
29915,
13,
1678,
8528,
11206,
29918,
10145,
259,
353,
364,
29915,
29914,
4855,
29914,
2109,
29915,
13,
23681,
315,
1672,
1799,
29918,
4986,
5607,
1275,
525,
446,
309,
2396,
13,
1678,
16507,
1299,
19094,
1678,
353,
525,
2817,
617,
29915,
13,
1678,
8528,
11206,
29918,
10145,
259,
353,
364,
29915,
29907,
8419,
9598,
309,
29918,
29894,
29945,
29915,
13,
23681,
315,
1672,
1799,
29918,
4986,
5607,
1275,
525,
4447,
2396,
13,
1678,
16507,
1299,
19094,
1678,
353,
525,
4447,
29915,
13,
1678,
8528,
11206,
29918,
10145,
259,
353,
364,
29915,
29907,
8419,
9283,
12745,
313,
29916,
29947,
29953,
6802,
29902,
1718,
23985,
29914,
6026,
2580,
7176,
5244,
1785,
305,
29871,
29947,
29889,
29900,
29915,
13,
13,
361,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
5746,
11206,
29918,
10145,
29374,
13,
1678,
8528,
11206,
29918,
10145,
353,
2897,
29889,
657,
6272,
877,
13079,
29911,
29918,
5746,
11206,
29918,
10145,
1495,
13,
13,
29933,
25282,
353,
525,
8382,
29915,
13,
13,
361,
16507,
1299,
19094,
1275,
525,
19644,
2396,
13,
1678,
396,
5780,
305,
2708,
13,
1678,
349,
1525,
25634,
353,
525,
2817,
29899,
9290,
29899,
29872,
19266,
29899,
29915,
13,
1678,
19178,
353,
349,
1525,
25634,
718,
525,
19644,
29915,
13,
1678,
3339,
353,
349,
1525,
25634,
718,
525,
19644,
29915,
13,
1678,
9033,
353,
349,
1525,
25634,
718,
525,
279,
29915,
13,
1678,
315,
6247,
353,
349,
1525,
25634,
718,
525,
29887,
1817,
29915,
13,
1678,
21724,
29968,
353,
349,
1525,
25634,
718,
525,
19644,
29915,
13,
1678,
323,
1718,
7194,
29918,
12194,
353,
525,
761,
29915,
13,
1678,
22717,
10721,
353,
349,
1525,
25634,
718,
525,
2311,
29915,
13,
1678,
438,
29933,
29967,
14849,
3580,
353,
349,
1525,
25634,
718,
525,
5415,
15070,
29915,
13,
1678,
438,
29933,
29967,
6271,
29979,
353,
349,
1525,
25634,
718,
525,
5415,
8552,
29915,
13,
13,
1678,
5012,
19059,
353,
525,
448,
14047,
3746,
29922,
2616,
4776,
29899,
29885,
29946,
448,
29885,
386,
3774,
448,
29885,
29888,
3746,
29922,
18091,
29894,
29946,
29899,
1028,
29899,
29881,
29896,
29953,
448,
29885,
7411,
29899,
19266,
29922,
6800,
448,
600,
651,
29899,
27117,
448,
29888,
1272,
29899,
27117,
29915,
13,
1678,
17861,
4375,
10749,
353,
5012,
19059,
718,
525,
448,
29928,
19644,
29915,
13,
1678,
319,
18823,
10749,
353,
525,
448,
29883,
29915,
718,
5012,
19059,
718,
525,
448,
29916,
24367,
1358,
29899,
2541,
29899,
8223,
448,
29956,
29874,
6653,
29885,
6574,
4019,
29899,
277,
29922,
386,
3774,
525,
13,
1678,
365,
18823,
10749,
353,
5012,
19059,
718,
525,
448,
29956,
29880,
7839,
27354,
29899,
27117,
6653,
3388,
29922,
2273,
7097,
29889,
1958,
6653,
25029,
6653,
29884,
29892,
27175,
29918,
4598,
448,
29911,
7613,
29914,
2324,
29918,
16713,
29914,
2324,
29889,
430,
29879,
29915,
13,
13,
1678,
315,
10145,
353,
6629,
13,
1678,
365,
10145,
353,
6629,
13,
13,
1678,
565,
350,
25282,
1275,
525,
8382,
2396,
13,
4706,
17861,
4375,
10749,
4619,
525,
448,
29949,
29900,
448,
29887,
29881,
4495,
29888,
29899,
29906,
29915,
13,
4706,
319,
18823,
10749,
4619,
525,
448,
29887,
29881,
4495,
29888,
29899,
29906,
29915,
13,
1678,
1683,
29901,
13,
4706,
17861,
4375,
10749,
4619,
525,
448,
29949,
29906,
29915,
13,
13,
1678,
315,
6247,
18823,
10749,
353,
17861,
4375,
10749,
13,
13,
1678,
11971,
29918,
24705,
353,
438,
29933,
29967,
6271,
29979,
718,
525,
448,
29949,
7581,
395,
29911,
1718,
7194,
364,
29873,
7097,
29889,
2109,
29905,
29876,
29915,
718,
22717,
10721,
718,
525,
395,
29911,
1718,
7194,
320,
29876,
29915,
13,
13,
23681,
16507,
1299,
19094,
1275,
525,
2817,
617,
2396,
13,
1678,
396,
5780,
305,
2708,
13,
1678,
19178,
353,
525,
2817,
617,
29915,
13,
1678,
315,
6247,
353,
525,
2817,
617,
29915,
13,
1678,
3339,
353,
525,
2817,
11625,
29915,
13,
1678,
9033,
353,
525,
2817,
279,
29915,
13,
1678,
21724,
29968,
353,
525,
279,
828,
682,
29915,
13,
1678,
323,
1718,
7194,
29918,
12194,
353,
525,
1165,
29888,
29915,
13,
13,
1678,
5012,
19059,
353,
525,
1192,
21970,
2994,
4776,
29899,
29924,
29946,
29915,
13,
1678,
17861,
4375,
10749,
353,
5012,
19059,
718,
525,
1192,
29883,
29929,
29929,
1192,
481,
2395,
29922,
1639,
1287,
29915,
13,
1678,
319,
18823,
10749,
353,
5012,
19059,
13,
1678,
365,
18823,
10749,
353,
5012,
19059,
718,
525,
1192,
3888,
15786,
1192,
3888,
2025,
1338,
1192,
3888,
443,
3880,
1192,
3888,
325,
1600,
414,
1192,
1761,
364,
29873,
7097,
29899,
481,
324,
417,
29906,
29889,
1958,
1192,
1557,
2620,
364,
29873,
7097,
29889,
29879,
312,
29915,
13,
13,
1678,
365,
18823,
10749,
4619,
525,
1192,
17462,
20611,
29877,
11891,
29878,
2034,
29918,
9144,
5575,
29897,
259,
1192,
17462,
20611,
29877,
29898,
9998,
962,
8863,
29897,
1192,
17462,
20611,
29877,
29898,
21819,
962,
8863,
16029,
29871,
13,
13,
1678,
8528,
11206,
29918,
10145,
4619,
8207,
1718,
29924,
29914,
1718,
29924,
4174,
29914,
2109,
29915,
13,
13,
1678,
565,
350,
25282,
1275,
525,
8382,
2396,
13,
4706,
17861,
4375,
10749,
4619,
525,
448,
29887,
448,
29949,
29900,
29915,
13,
4706,
319,
18823,
10749,
4619,
525,
448,
29887,
29915,
13,
1678,
1683,
29901,
13,
4706,
17861,
4375,
10749,
4619,
525,
448,
29949,
29906,
29915,
13,
13,
13,
1678,
315,
6247,
18823,
10749,
353,
17861,
4375,
10749,
29871,
13,
1678,
17861,
4375,
10749,
4619,
525,
448,
4172,
29922,
29883,
29929,
29929,
29915,
13,
13,
1678,
11971,
29918,
24705,
353,
525,
3166,
761,
1192,
2109,
395,
29911,
1718,
7194,
1192,
4905,
364,
29873,
7097,
29889,
2109,
320,
29876,
3166,
761,
448,
29920,
395,
29911,
1718,
7194,
29915,
13,
2
] |
sdk/python/gittaggers.py | coolmaksat/arvados | 1 | 86102 | <reponame>coolmaksat/arvados
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
from setuptools.command.egg_info import egg_info
import subprocess
import time
class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
If a build tag has already been set (e.g., "egg_info -b", building
from source package), leave it alone.
"""
def git_latest_tag(self):
gittags = subprocess.check_output(['git', 'tag', '-l']).split()
gittags.sort(key=lambda s: [int(u) for u in s.split(b'.')],reverse=True)
return str(next(iter(gittags)).decode('utf-8'))
def git_timestamp_tag(self):
gitinfo = subprocess.check_output(
['git', 'log', '--first-parent', '--max-count=1',
'--format=format:%ct', '.']).strip()
return time.strftime('.%Y%m%d%H%M%S', time.gmtime(int(gitinfo)))
def tags(self):
if self.tag_build is None:
self.tag_build = self.git_latest_tag()+self.git_timestamp_tag()
return egg_info.tags(self)
| [
1,
529,
276,
1112,
420,
29958,
1111,
324,
29885,
10327,
271,
29914,
279,
29894,
2255,
13,
29937,
14187,
1266,
313,
29907,
29897,
450,
826,
29894,
2255,
13189,
943,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
10937,
29928,
29990,
29899,
29931,
293,
1947,
29899,
12889,
29901,
13380,
29899,
29906,
29889,
29900,
13,
13,
3166,
731,
21245,
8789,
29889,
6519,
29889,
387,
29887,
29918,
3888,
1053,
19710,
29918,
3888,
13,
5215,
1014,
5014,
13,
5215,
931,
13,
13,
1990,
382,
1505,
3401,
4591,
28712,
29898,
387,
29887,
29918,
3888,
1125,
13,
1678,
9995,
8176,
278,
2048,
411,
6315,
9063,
14334,
29889,
13,
13,
1678,
960,
263,
2048,
4055,
756,
2307,
1063,
731,
313,
29872,
29889,
29887,
1696,
376,
387,
29887,
29918,
3888,
448,
29890,
613,
5214,
13,
1678,
515,
2752,
3577,
511,
5967,
372,
7432,
29889,
13,
1678,
9995,
13,
1678,
822,
6315,
29918,
12333,
29918,
4039,
29898,
1311,
1125,
13,
4706,
330,
986,
810,
353,
1014,
5014,
29889,
3198,
29918,
4905,
18959,
5559,
742,
525,
4039,
742,
17411,
29880,
2033,
467,
5451,
580,
13,
4706,
330,
986,
810,
29889,
6605,
29898,
1989,
29922,
2892,
269,
29901,
518,
524,
29898,
29884,
29897,
363,
318,
297,
269,
29889,
5451,
29898,
29890,
4286,
1495,
1402,
24244,
29922,
5574,
29897,
13,
4706,
736,
851,
29898,
4622,
29898,
1524,
29898,
29887,
986,
810,
8106,
13808,
877,
9420,
29899,
29947,
8785,
13,
13,
1678,
822,
6315,
29918,
16394,
29918,
4039,
29898,
1311,
1125,
13,
4706,
6315,
3888,
353,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
13,
9651,
6024,
5559,
742,
525,
1188,
742,
525,
489,
4102,
29899,
3560,
742,
525,
489,
3317,
29899,
2798,
29922,
29896,
742,
13,
632,
525,
489,
4830,
29922,
4830,
16664,
312,
742,
15300,
2033,
467,
17010,
580,
13,
4706,
736,
931,
29889,
710,
615,
603,
12839,
29995,
29979,
29995,
29885,
29995,
29881,
29995,
29950,
29995,
29924,
29995,
29903,
742,
931,
29889,
29887,
29885,
2230,
29898,
524,
29898,
5559,
3888,
4961,
13,
13,
1678,
822,
8282,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
4039,
29918,
4282,
338,
6213,
29901,
13,
9651,
1583,
29889,
4039,
29918,
4282,
353,
1583,
29889,
5559,
29918,
12333,
29918,
4039,
580,
29974,
1311,
29889,
5559,
29918,
16394,
29918,
4039,
580,
13,
4706,
736,
19710,
29918,
3888,
29889,
11338,
29898,
1311,
29897,
13,
2
] |
clastic/tests/test_obj_browser.py | mahmoud/clastic | 140 | 43708 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
import pytest
from clastic.contrib.obj_browser import create_app
_IS_PYPY = '__pypy__' in sys.builtin_module_names
@pytest.mark.skipif(_IS_PYPY, reason='pypy gc cannot support obj browsing')
def test_flaw_basic():
app = create_app()
cl = app.get_local_client()
resp = cl.get('/')
assert resp.status_code == 302 # take me to the default
resp = cl.get('/', follow_redirects=True)
assert resp.status_code == 200 # default should be sys
assert 'modules' in resp.get_data(True)
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
5215,
10876,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
1067,
6288,
29889,
21570,
29889,
5415,
29918,
15965,
1053,
1653,
29918,
932,
13,
13,
13,
29918,
3235,
29918,
20055,
20055,
353,
525,
1649,
29886,
1478,
29891,
1649,
29915,
297,
10876,
29889,
16145,
262,
29918,
5453,
29918,
7039,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
361,
7373,
3235,
29918,
20055,
20055,
29892,
2769,
2433,
29886,
1478,
29891,
330,
29883,
2609,
2304,
5446,
3347,
2976,
1495,
13,
1753,
1243,
29918,
29888,
10653,
29918,
16121,
7295,
13,
1678,
623,
353,
1653,
29918,
932,
580,
13,
13,
1678,
1067,
353,
623,
29889,
657,
29918,
2997,
29918,
4645,
580,
13,
13,
1678,
4613,
353,
1067,
29889,
657,
11219,
1495,
13,
1678,
4974,
4613,
29889,
4882,
29918,
401,
1275,
29871,
29941,
29900,
29906,
29871,
396,
2125,
592,
304,
278,
2322,
13,
1678,
4613,
353,
1067,
29889,
657,
11219,
742,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
13,
1678,
4974,
4613,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
29871,
396,
2322,
881,
367,
10876,
13,
1678,
4974,
525,
7576,
29915,
297,
4613,
29889,
657,
29918,
1272,
29898,
5574,
29897,
13,
2
] |
cinder/tests/volume/drivers/netapp/eseries/test_iscsi.py | kazum/cinder | 0 | 109701 | # Copyright (c) 2014 <NAME>. All rights reserved.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
Mock unit tests for the NetApp E-series iscsi driver
"""
import mock
from cinder import test
from cinder.tests.volume.drivers.netapp import fakes as na_fakes
from cinder.volume.drivers.netapp.eseries import client as es_client
from cinder.volume.drivers.netapp.eseries import iscsi as es_iscsi
from cinder.volume.drivers.netapp import utils as na_utils
class NetAppEseriesISCSIDriverTestCase(test.TestCase):
def setUp(self):
super(NetAppEseriesISCSIDriverTestCase, self).setUp()
kwargs = {'configuration': self.get_config_eseries()}
self.driver = es_iscsi.NetAppEseriesISCSIDriver(**kwargs)
def get_config_eseries(self):
config = na_fakes.create_configuration_eseries()
config.netapp_storage_protocol = 'iscsi'
config.netapp_login = 'rw'
config.netapp_password = 'rw'
config.netapp_server_hostname = '127.0.0.1'
config.netapp_transport_type = 'http'
config.netapp_server_port = '8080'
config.netapp_storage_pools = 'DDP'
config.netapp_storage_family = 'eseries'
config.netapp_sa_password = '<PASSWORD>'
config.netapp_controller_ips = '10.11.12.13,10.11.12.14'
config.netapp_webservice_path = '/devmgr/v2'
return config
@mock.patch.object(es_iscsi.NetAppEseriesISCSIDriver,
'_check_mode_get_or_register_storage_system')
@mock.patch.object(es_client, 'RestClient', mock.Mock())
@mock.patch.object(na_utils, 'check_flags', mock.Mock())
def test_do_setup(self, mock_check_flags):
self.driver.do_setup(mock.Mock())
self.assertTrue(mock_check_flags.called)
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
529,
5813,
15513,
29871,
2178,
10462,
21676,
29889,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
366,
1122,
13,
29937,
1678,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
887,
1122,
4017,
13,
29937,
1678,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
308,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
1678,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
1678,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
13,
29937,
1678,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
2823,
278,
13,
29937,
1678,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
27028,
13,
29937,
1678,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
18680,
5190,
6987,
363,
278,
12670,
2052,
382,
29899,
13757,
338,
29883,
1039,
7156,
13,
15945,
29908,
13,
13,
5215,
11187,
13,
13,
3166,
274,
4995,
1053,
1243,
13,
3166,
274,
4995,
29889,
21150,
29889,
24623,
29889,
24477,
874,
29889,
1212,
932,
1053,
285,
6926,
408,
1055,
29918,
29888,
6926,
13,
3166,
274,
4995,
29889,
24623,
29889,
24477,
874,
29889,
1212,
932,
29889,
267,
6358,
1053,
3132,
408,
831,
29918,
4645,
13,
3166,
274,
4995,
29889,
24623,
29889,
24477,
874,
29889,
1212,
932,
29889,
267,
6358,
1053,
338,
29883,
1039,
408,
831,
29918,
10669,
1039,
13,
3166,
274,
4995,
29889,
24623,
29889,
24477,
874,
29889,
1212,
932,
1053,
3667,
29879,
408,
1055,
29918,
13239,
13,
13,
13,
1990,
12670,
2052,
29923,
13757,
3235,
9295,
1367,
3511,
3057,
8259,
29898,
1688,
29889,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
6779,
2052,
29923,
13757,
3235,
9295,
1367,
3511,
3057,
8259,
29892,
1583,
467,
842,
3373,
580,
13,
13,
4706,
9049,
5085,
353,
11117,
13305,
2396,
1583,
29889,
657,
29918,
2917,
29918,
267,
6358,
28296,
13,
13,
4706,
1583,
29889,
9465,
353,
831,
29918,
10669,
1039,
29889,
6779,
2052,
29923,
13757,
3235,
9295,
1367,
3511,
29898,
1068,
19290,
29897,
13,
13,
1678,
822,
679,
29918,
2917,
29918,
267,
6358,
29898,
1311,
1125,
13,
4706,
2295,
353,
1055,
29918,
29888,
6926,
29889,
3258,
29918,
13305,
29918,
267,
6358,
580,
13,
4706,
2295,
29889,
1212,
932,
29918,
12925,
29918,
20464,
353,
525,
10669,
1039,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
7507,
353,
525,
13975,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
5630,
353,
525,
13975,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
2974,
29918,
28988,
353,
525,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
27882,
29918,
1853,
353,
525,
1124,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
2974,
29918,
637,
353,
525,
29947,
29900,
29947,
29900,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
12925,
29918,
1129,
3775,
353,
525,
7858,
29925,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
12925,
29918,
11922,
353,
525,
267,
6358,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
4977,
29918,
5630,
353,
12801,
25711,
17013,
16299,
13,
4706,
2295,
29889,
1212,
932,
29918,
8299,
29918,
4512,
353,
525,
29896,
29900,
29889,
29896,
29896,
29889,
29896,
29906,
29889,
29896,
29941,
29892,
29896,
29900,
29889,
29896,
29896,
29889,
29896,
29906,
29889,
29896,
29946,
29915,
13,
4706,
2295,
29889,
1212,
932,
29918,
2676,
5509,
29918,
2084,
353,
8207,
3359,
29885,
629,
29914,
29894,
29906,
29915,
13,
4706,
736,
2295,
13,
13,
1678,
732,
17640,
29889,
5041,
29889,
3318,
29898,
267,
29918,
10669,
1039,
29889,
6779,
2052,
29923,
13757,
3235,
9295,
1367,
3511,
29892,
13,
462,
539,
22868,
3198,
29918,
8513,
29918,
657,
29918,
272,
29918,
9573,
29918,
12925,
29918,
5205,
1495,
13,
1678,
732,
17640,
29889,
5041,
29889,
3318,
29898,
267,
29918,
4645,
29892,
525,
15078,
4032,
742,
11187,
29889,
18680,
3101,
13,
1678,
732,
17640,
29889,
5041,
29889,
3318,
29898,
1056,
29918,
13239,
29892,
525,
3198,
29918,
15764,
742,
11187,
29889,
18680,
3101,
13,
1678,
822,
1243,
29918,
1867,
29918,
14669,
29898,
1311,
29892,
11187,
29918,
3198,
29918,
15764,
1125,
13,
4706,
1583,
29889,
9465,
29889,
1867,
29918,
14669,
29898,
17640,
29889,
18680,
3101,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
17640,
29918,
3198,
29918,
15764,
29889,
13998,
29897,
13,
2
] |
nrftool/command/erase.py | pauloborges/nrftool | 7 | 186411 | # coding: utf-8
"""
Copyright (c) 2014 <NAME>
Check LICENSE for details.
"""
from .jlink import ExecJLinkScriptCommand
class Erase(ExecJLinkScriptCommand):
SCRIPT = "erase.jlink"
def execute(self):
return super(Erase, self).execute(self.SCRIPT)
| [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
529,
5813,
29958,
13,
13,
5596,
365,
2965,
1430,
1660,
363,
4902,
29889,
13,
15945,
29908,
13,
13,
3166,
869,
29926,
2324,
1053,
11080,
29967,
6595,
4081,
6255,
13,
13,
1990,
1425,
559,
29898,
5379,
29967,
6595,
4081,
6255,
1125,
13,
12,
7187,
24290,
353,
376,
261,
559,
29889,
29926,
2324,
29908,
13,
13,
12,
1753,
6222,
29898,
1311,
1125,
13,
12,
12,
2457,
2428,
29898,
2110,
559,
29892,
1583,
467,
7978,
29898,
1311,
29889,
7187,
24290,
29897,
13,
2
] |
visualization/extract_slice.py | d-v-b/CNNectome | 0 | 141603 | <filename>visualization/extract_slice.py
import h5py
import matplotlib.image
import numpy as np
def extract_slice(data_file, dataset, slice_, target):
hf = h5py.File(data_file, "r")
print(hf.keys()) # [dataset]
hf_ds = hf[dataset]
img_slice = hf_ds[:, slice_, :].squeeze()
print(np.sum(img_slice))
img_slice = np.clip((img_slice * 128 + 127).round(), 0, 255).astype("uint8")
img_rgb_ready = np.stack((img_slice, img_slice, img_slice), axis=2)
print(img_rgb_ready.shape)
matplotlib.image.imsave(target, img_rgb_ready)
if __name__ == "__main__":
data_file1 = "/groups/saalfeld/saalfeldlab/larissa/data/cremi-2017/sample_C_cleftsonly_bin.hdf"
data_file2 = "/nrs/saalfeld/heinrichl/synapses/cremi_all_0116_01/prediction_cremi_warped_sampleC_550000.hdf"
data_file_3 = "/groups/saalfeld/saalfeldlab/larissa/data/gunpowder/cremi/gt_xz.h5"
dataset1 = "volumes/raw"
dataset2 = "syncleft_dist"
dataset3 = "data"
slice_ = 1550
slice_3 = 550
target1 = "/groups/saalfeld/home/heinrichl/figures/raw_xz.png"
target2 = "/groups/saalfeld/home/heinrichl/figures/pred_xz.png"
target3 = "/groups/saalfeld/home/heinrichl/figures/gt_xz.png"
# extract_slice(data_file1, dataset1, slice_, target1)
# extract_slice(data_file2, dataset2, slice_, target2)
extract_slice(data_file_3, dataset3, slice_3, target3)
| [
1,
529,
9507,
29958,
20119,
2133,
29914,
21111,
29918,
18337,
29889,
2272,
13,
5215,
298,
29945,
2272,
13,
5215,
22889,
29889,
3027,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
6597,
29918,
18337,
29898,
1272,
29918,
1445,
29892,
8783,
29892,
22780,
3383,
3646,
1125,
13,
1678,
298,
29888,
353,
298,
29945,
2272,
29889,
2283,
29898,
1272,
29918,
1445,
29892,
376,
29878,
1159,
13,
1678,
1596,
29898,
29882,
29888,
29889,
8149,
3101,
29871,
396,
518,
24713,
29962,
13,
1678,
298,
29888,
29918,
6289,
353,
298,
29888,
29961,
24713,
29962,
13,
1678,
10153,
29918,
18337,
353,
298,
29888,
29918,
6289,
7503,
29892,
22780,
3383,
584,
1822,
29879,
802,
29872,
911,
580,
13,
1678,
1596,
29898,
9302,
29889,
2083,
29898,
2492,
29918,
18337,
876,
13,
1678,
10153,
29918,
18337,
353,
7442,
29889,
24049,
3552,
2492,
29918,
18337,
334,
29871,
29896,
29906,
29947,
718,
29871,
29896,
29906,
29955,
467,
14486,
3285,
29871,
29900,
29892,
29871,
29906,
29945,
29945,
467,
579,
668,
703,
13470,
29947,
1159,
13,
1678,
10153,
29918,
23973,
29918,
2040,
353,
7442,
29889,
1429,
3552,
2492,
29918,
18337,
29892,
10153,
29918,
18337,
29892,
10153,
29918,
18337,
511,
9685,
29922,
29906,
29897,
13,
1678,
1596,
29898,
2492,
29918,
23973,
29918,
2040,
29889,
12181,
29897,
13,
1678,
22889,
29889,
3027,
29889,
326,
7620,
29898,
5182,
29892,
10153,
29918,
23973,
29918,
2040,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
848,
29918,
1445,
29896,
353,
5591,
13155,
29914,
4977,
3131,
2495,
29914,
4977,
3131,
2495,
8205,
29914,
4675,
16343,
29914,
1272,
29914,
1037,
2460,
29899,
29906,
29900,
29896,
29955,
29914,
11249,
29918,
29907,
29918,
29883,
1563,
1100,
368,
29918,
2109,
29889,
29882,
2176,
29908,
13,
1678,
848,
29918,
1445,
29906,
353,
5591,
29876,
2288,
29914,
4977,
3131,
2495,
29914,
12880,
4018,
29880,
29914,
19274,
2547,
267,
29914,
1037,
2460,
29918,
497,
29918,
29900,
29896,
29896,
29953,
29918,
29900,
29896,
29914,
11965,
2463,
29918,
1037,
2460,
29918,
4495,
9795,
29918,
11249,
29907,
29918,
29945,
29945,
29900,
29900,
29900,
29900,
29889,
29882,
2176,
29908,
13,
1678,
848,
29918,
1445,
29918,
29941,
353,
5591,
13155,
29914,
4977,
3131,
2495,
29914,
4977,
3131,
2495,
8205,
29914,
4675,
16343,
29914,
1272,
29914,
28798,
12248,
672,
29914,
1037,
2460,
29914,
4141,
29918,
29916,
29920,
29889,
29882,
29945,
29908,
13,
1678,
8783,
29896,
353,
376,
1555,
9351,
29914,
1610,
29908,
13,
1678,
8783,
29906,
353,
376,
16593,
1563,
29918,
5721,
29908,
13,
1678,
8783,
29941,
353,
376,
1272,
29908,
13,
1678,
22780,
29918,
353,
29871,
29896,
29945,
29945,
29900,
13,
1678,
22780,
29918,
29941,
353,
29871,
29945,
29945,
29900,
13,
1678,
3646,
29896,
353,
5591,
13155,
29914,
4977,
3131,
2495,
29914,
5184,
29914,
12880,
4018,
29880,
29914,
1003,
1973,
29914,
1610,
29918,
29916,
29920,
29889,
2732,
29908,
13,
1678,
3646,
29906,
353,
5591,
13155,
29914,
4977,
3131,
2495,
29914,
5184,
29914,
12880,
4018,
29880,
29914,
1003,
1973,
29914,
11965,
29918,
29916,
29920,
29889,
2732,
29908,
13,
1678,
3646,
29941,
353,
5591,
13155,
29914,
4977,
3131,
2495,
29914,
5184,
29914,
12880,
4018,
29880,
29914,
1003,
1973,
29914,
4141,
29918,
29916,
29920,
29889,
2732,
29908,
13,
13,
1678,
396,
6597,
29918,
18337,
29898,
1272,
29918,
1445,
29896,
29892,
8783,
29896,
29892,
22780,
3383,
3646,
29896,
29897,
13,
1678,
396,
6597,
29918,
18337,
29898,
1272,
29918,
1445,
29906,
29892,
8783,
29906,
29892,
22780,
3383,
3646,
29906,
29897,
13,
1678,
6597,
29918,
18337,
29898,
1272,
29918,
1445,
29918,
29941,
29892,
8783,
29941,
29892,
22780,
29918,
29941,
29892,
3646,
29941,
29897,
13,
2
] |
xmmdet/__init__.py | www516717402/edgeai-mmdetection | 0 | 91057 | <reponame>www516717402/edgeai-mmdetection<filename>xmmdet/__init__.py
import mmcv
from mmdet import *
from .ops import *
from .core import *
from .datasets import *
from .models import *
from .utils import *
from .apis import *
| [
1,
529,
276,
1112,
420,
29958,
1636,
29945,
29896,
29953,
29955,
29896,
29955,
29946,
29900,
29906,
29914,
12864,
1794,
29899,
29885,
3487,
2650,
428,
29966,
9507,
29958,
29916,
29885,
3487,
300,
29914,
1649,
2344,
26914,
2272,
13,
5215,
5654,
11023,
13,
3166,
286,
3487,
300,
1053,
334,
13,
3166,
869,
3554,
1053,
334,
13,
3166,
869,
3221,
1053,
334,
13,
3166,
869,
14538,
1691,
1053,
334,
13,
3166,
869,
9794,
1053,
334,
13,
3166,
869,
13239,
1053,
334,
13,
3166,
869,
11355,
1053,
334,
13,
2
] |
1d/stencil.py | hertzsprung/high-order-transport | 0 | 89143 | import numpy as np
class Stencil:
'''
Initialise a Stencil instance with relative cell indices where
-1 and 0 are the adjacent cells upwind and downwind of the target face
respectively.
'''
def __init__(self, indices):
self.indices = np.array(indices)
def cellCentres(self, mesh, index):
origin = mesh.cellCentre(index)
Cs = []
for i in self.indices:
C = mesh.cellCentre(index + i)
if i < 0 and C > origin:
C -= 1
if i > 0 and C < origin:
C += 1
Cs += [C]
return np.array(Cs)
def relativeCellCentres(self, mesh, index):
origin = mesh.faceCentre(index)
Cs = []
for i in self.indices:
C = mesh.cellCentre(index + i)
if i < 0 and C > origin:
C -= 1
if i > 0 and C < origin:
C += 1
Cs += [C]
return np.array(Cs) - origin
def relativeFaceCentres(self, mesh, index):
origin = mesh.faceCentre(index)
Cfs = []
for i in np.append(self.indices, self.indices[-1]+1):
Cf = mesh.faceCentre(index + i)
if i < 0 and Cf > origin:
Cf -= 1
if i > 0 and Cf < origin:
Cf += 1
Cfs += [Cf]
return np.array(Cfs) - origin
def __len__(self):
return len(self.indices)
def __radd__(self, other):
return other + self.indices
def __repr__(self):
return str(self.indices)
| [
1,
1053,
12655,
408,
7442,
13,
13,
1990,
624,
3977,
309,
29901,
13,
1678,
14550,
13,
1678,
17250,
895,
263,
624,
3977,
309,
2777,
411,
6198,
3038,
16285,
988,
13,
1678,
448,
29896,
322,
29871,
29900,
526,
278,
20114,
9101,
701,
14800,
322,
1623,
14800,
310,
278,
3646,
3700,
13,
1678,
8307,
29889,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
16285,
1125,
13,
4706,
1583,
29889,
513,
1575,
353,
7442,
29889,
2378,
29898,
513,
1575,
29897,
13,
13,
1678,
822,
3038,
23369,
690,
29898,
1311,
29892,
27716,
29892,
2380,
1125,
13,
4706,
3978,
353,
27716,
29889,
3729,
29907,
14056,
29898,
2248,
29897,
13,
13,
4706,
24277,
353,
5159,
13,
13,
4706,
363,
474,
297,
1583,
29889,
513,
1575,
29901,
13,
9651,
315,
353,
27716,
29889,
3729,
29907,
14056,
29898,
2248,
718,
474,
29897,
13,
9651,
565,
474,
529,
29871,
29900,
322,
315,
1405,
3978,
29901,
13,
18884,
315,
22361,
29871,
29896,
13,
13,
9651,
565,
474,
1405,
29871,
29900,
322,
315,
529,
3978,
29901,
13,
18884,
315,
4619,
29871,
29896,
13,
13,
9651,
24277,
4619,
518,
29907,
29962,
13,
13,
4706,
736,
7442,
29889,
2378,
29898,
29907,
29879,
29897,
13,
13,
1678,
822,
6198,
4617,
23369,
690,
29898,
1311,
29892,
27716,
29892,
2380,
1125,
13,
4706,
3978,
353,
27716,
29889,
2161,
29907,
14056,
29898,
2248,
29897,
13,
13,
4706,
24277,
353,
5159,
13,
13,
4706,
363,
474,
297,
1583,
29889,
513,
1575,
29901,
13,
9651,
315,
353,
27716,
29889,
3729,
29907,
14056,
29898,
2248,
718,
474,
29897,
13,
9651,
565,
474,
529,
29871,
29900,
322,
315,
1405,
3978,
29901,
13,
18884,
315,
22361,
29871,
29896,
13,
13,
9651,
565,
474,
1405,
29871,
29900,
322,
315,
529,
3978,
29901,
13,
18884,
315,
4619,
29871,
29896,
13,
13,
9651,
24277,
4619,
518,
29907,
29962,
13,
13,
4706,
736,
7442,
29889,
2378,
29898,
29907,
29879,
29897,
448,
3978,
13,
13,
1678,
822,
6198,
23360,
23369,
690,
29898,
1311,
29892,
27716,
29892,
2380,
1125,
13,
4706,
3978,
353,
27716,
29889,
2161,
29907,
14056,
29898,
2248,
29897,
13,
13,
4706,
315,
5847,
353,
5159,
13,
13,
4706,
363,
474,
297,
7442,
29889,
4397,
29898,
1311,
29889,
513,
1575,
29892,
1583,
29889,
513,
1575,
14352,
29896,
10062,
29896,
1125,
13,
9651,
315,
29888,
353,
27716,
29889,
2161,
29907,
14056,
29898,
2248,
718,
474,
29897,
13,
9651,
565,
474,
529,
29871,
29900,
322,
315,
29888,
1405,
3978,
29901,
13,
18884,
315,
29888,
22361,
29871,
29896,
13,
13,
9651,
565,
474,
1405,
29871,
29900,
322,
315,
29888,
529,
3978,
29901,
13,
18884,
315,
29888,
4619,
29871,
29896,
13,
13,
9651,
315,
5847,
4619,
518,
29907,
29888,
29962,
13,
13,
4706,
736,
7442,
29889,
2378,
29898,
29907,
5847,
29897,
448,
3978,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
513,
1575,
29897,
13,
13,
1678,
822,
4770,
29878,
1202,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
916,
718,
1583,
29889,
513,
1575,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
851,
29898,
1311,
29889,
513,
1575,
29897,
13,
2
] |
deprecated/nexus_server/nexus_db.py | utarsuno/quasar_source | 7 | 28870 | # coding=utf-8
"""This module, nexus_db.py, defines a basic started database for the Nexus Server."""
import pika
import json
import time
from scripts.docker.wait_for_rabbit_host import WaitForRabbitMQHost
from libraries.database_abstraction.sql.sqlite import sqlite_db
from libraries.database_abstraction.sql.sqlite import table_abstraction
from libraries.database_abstraction.sql.query_abstraction import sql_query
######################################################################
db = sqlite_db.SQLiteDB('/v/db.sqlite', False, True)
todo_lists = table_abstraction.TableAbstraction('todo_lists')
todo_lists.add_column_string('table_id', nullable=False, unique=True)
todo_lists.add_column_string('px', nullable=False, unique=False)
todo_lists.add_column_string('py', nullable=False, unique=False)
todo_lists.add_column_string('pz', nullable=False, unique=False)
todo_lists.add_column_string('nx', nullable=False, unique=False)
todo_lists.add_column_string('ny', nullable=False, unique=False)
todo_lists.add_column_string('nz', nullable=False, unique=False)
todo_rows = table_abstraction.TableAbstraction('todo_rows')
todo_rows.add_column_string('table_id', nullable=False, unique=False)
todo_rows.add_column_string('row_id', nullable=False, unique=False)
todo_rows.add_column_string('description', nullable=False, unique=False)
todo_rows.add_column_string('time', nullable=False, unique=False)
todo_rows.add_column_string('difficulty', nullable=False, unique=False)
todo_rows.add_column_string('importance', nullable=False, unique=False)
todo_rows.add_column_string('completed', nullable=False, unique=False)
######################################################################
TEMP = '/Users/utarsuno/git_repos/quasar_source/generated_output/local/personal'
class NexusDatabase(object):
"""API for the Nexus Server's DB."""
def __init__(self, path: str):
self._db = sqlite_db.SQLiteDB(path, False, True)
self._schema_users = self._load_schema_users()
self._schema_worlds = self._load_schema_worlds()
self._schema_entities_root = self._load_schema_entities_root()
self._schema_entities_data = self._load_schema_entities_data()
def _load_schema_users(self):
"""Loads the users table schema."""
users = table_abstraction.TableAbstraction('user')
users.add_column_row_id_alias()
users.add_column_string('email', nullable=False, unique=True, indexed=True)
users.add_column_string('password', nullable=False, unique=False, indexed=False)
#users.add_column_string('meta_data', nullable=True, unique=False, indexed=False)
return users
def _load_schema_worlds(self):
"""Loads the worlds table schema."""
worlds = table_abstraction.TableAbstraction('world')
worlds.add_column_row_id_alias()
#worlds.add_column_string('meta_data', nullable=True, unique=False, indexed=False)
return worlds
def _load_schema_entities_root(self):
"""Loads the entities root table schema."""
entities_root = table_abstraction.TableAbstraction('entity_root')
entities_root.add_column_row_id_alias()
entities_root.add_column_foreign_key(self._schema_worlds.primary_key)
return entities_root
def _load_schema_entities_data(self):
"""Loads the entities root table schema."""
entities_data = table_abstraction.TableAbstraction('entity_data')
entities_data.add_column_row_id_alias()
return entities_data
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
13,
15945,
29908,
4013,
3883,
29892,
452,
29916,
375,
29918,
2585,
29889,
2272,
29892,
17645,
263,
6996,
4687,
2566,
363,
278,
405,
735,
375,
5656,
1213,
15945,
13,
13,
5215,
282,
4106,
13,
5215,
4390,
13,
5215,
931,
13,
3166,
12078,
29889,
14695,
29889,
10685,
29918,
1454,
29918,
336,
1327,
277,
29918,
3069,
1053,
20340,
2831,
29934,
370,
2966,
25566,
8514,
13,
3166,
9562,
29889,
9803,
29918,
370,
4151,
428,
29889,
2850,
29889,
22793,
1053,
21120,
29918,
2585,
13,
3166,
9562,
29889,
9803,
29918,
370,
4151,
428,
29889,
2850,
29889,
22793,
1053,
1591,
29918,
370,
4151,
428,
13,
3166,
9562,
29889,
9803,
29918,
370,
4151,
428,
29889,
2850,
29889,
1972,
29918,
370,
4151,
428,
1053,
4576,
29918,
1972,
13,
13,
13383,
13383,
13383,
13383,
4136,
2277,
13,
2585,
353,
21120,
29918,
2585,
29889,
4176,
568,
4051,
11219,
29894,
29914,
2585,
29889,
22793,
742,
7700,
29892,
5852,
29897,
13,
29873,
8144,
29918,
21513,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
29873,
8144,
29918,
21513,
1495,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
2371,
29918,
333,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
5574,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
1756,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
2272,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
29886,
29920,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
23818,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
1460,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
21513,
29889,
1202,
29918,
4914,
29918,
1807,
877,
29876,
29920,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
29873,
8144,
29918,
5727,
1495,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
2371,
29918,
333,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
798,
29918,
333,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
8216,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
2230,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
12765,
3953,
29891,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
5215,
749,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
29873,
8144,
29918,
5727,
29889,
1202,
29918,
4914,
29918,
1807,
877,
5729,
9446,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29897,
13,
13383,
13383,
13383,
13383,
4136,
2277,
13,
13,
13,
4330,
3580,
353,
8207,
5959,
29914,
329,
1503,
9447,
29914,
5559,
29918,
276,
1066,
29914,
339,
294,
279,
29918,
4993,
29914,
13525,
29918,
4905,
29914,
2997,
29914,
10532,
284,
29915,
13,
13,
13,
1990,
405,
735,
375,
9112,
29898,
3318,
1125,
13,
1678,
9995,
8787,
363,
278,
405,
735,
375,
5656,
29915,
29879,
6535,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2224,
29901,
851,
1125,
13,
4706,
1583,
3032,
2585,
462,
259,
353,
21120,
29918,
2585,
29889,
4176,
568,
4051,
29898,
2084,
29892,
7700,
29892,
5852,
29897,
13,
4706,
1583,
3032,
11010,
29918,
7193,
308,
353,
1583,
3032,
1359,
29918,
11010,
29918,
7193,
580,
13,
4706,
1583,
3032,
11010,
29918,
11526,
29879,
4706,
353,
1583,
3032,
1359,
29918,
11010,
29918,
11526,
29879,
580,
13,
4706,
1583,
3032,
11010,
29918,
296,
1907,
29918,
4632,
353,
1583,
3032,
1359,
29918,
11010,
29918,
296,
1907,
29918,
4632,
580,
13,
4706,
1583,
3032,
11010,
29918,
296,
1907,
29918,
1272,
353,
1583,
3032,
1359,
29918,
11010,
29918,
296,
1907,
29918,
1272,
580,
13,
13,
1678,
822,
903,
1359,
29918,
11010,
29918,
7193,
29898,
1311,
1125,
13,
4706,
9995,
5896,
29879,
278,
4160,
1591,
10938,
1213,
15945,
13,
4706,
4160,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
1792,
1495,
13,
4706,
4160,
29889,
1202,
29918,
4914,
29918,
798,
29918,
333,
29918,
19973,
580,
13,
4706,
4160,
29889,
1202,
29918,
4914,
29918,
1807,
877,
5269,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
5574,
29892,
27541,
29922,
5574,
29897,
13,
4706,
4160,
29889,
1202,
29918,
4914,
29918,
1807,
877,
5630,
742,
1870,
519,
29922,
8824,
29892,
5412,
29922,
8824,
29892,
27541,
29922,
8824,
29897,
13,
4706,
396,
7193,
29889,
1202,
29918,
4914,
29918,
1807,
877,
7299,
29918,
1272,
742,
1870,
519,
29922,
5574,
29892,
5412,
29922,
8824,
29892,
27541,
29922,
8824,
29897,
13,
4706,
736,
4160,
13,
13,
1678,
822,
903,
1359,
29918,
11010,
29918,
11526,
29879,
29898,
1311,
1125,
13,
4706,
9995,
5896,
29879,
278,
3186,
29879,
1591,
10938,
1213,
15945,
13,
4706,
3186,
29879,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
11526,
1495,
13,
4706,
3186,
29879,
29889,
1202,
29918,
4914,
29918,
798,
29918,
333,
29918,
19973,
580,
13,
4706,
396,
11526,
29879,
29889,
1202,
29918,
4914,
29918,
1807,
877,
7299,
29918,
1272,
742,
1870,
519,
29922,
5574,
29892,
5412,
29922,
8824,
29892,
27541,
29922,
8824,
29897,
13,
4706,
736,
3186,
29879,
13,
13,
1678,
822,
903,
1359,
29918,
11010,
29918,
296,
1907,
29918,
4632,
29898,
1311,
1125,
13,
4706,
9995,
5896,
29879,
278,
16212,
3876,
1591,
10938,
1213,
15945,
13,
4706,
16212,
29918,
4632,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
10041,
29918,
4632,
1495,
13,
4706,
16212,
29918,
4632,
29889,
1202,
29918,
4914,
29918,
798,
29918,
333,
29918,
19973,
580,
13,
4706,
16212,
29918,
4632,
29889,
1202,
29918,
4914,
29918,
1079,
647,
29918,
1989,
29898,
1311,
3032,
11010,
29918,
11526,
29879,
29889,
16072,
29918,
1989,
29897,
13,
4706,
736,
16212,
29918,
4632,
13,
13,
1678,
822,
903,
1359,
29918,
11010,
29918,
296,
1907,
29918,
1272,
29898,
1311,
1125,
13,
4706,
9995,
5896,
29879,
278,
16212,
3876,
1591,
10938,
1213,
15945,
13,
4706,
16212,
29918,
1272,
353,
1591,
29918,
370,
4151,
428,
29889,
3562,
4920,
4151,
428,
877,
10041,
29918,
1272,
1495,
13,
4706,
16212,
29918,
1272,
29889,
1202,
29918,
4914,
29918,
798,
29918,
333,
29918,
19973,
580,
13,
4706,
736,
16212,
29918,
1272,
13,
2
] |
stellar/simulation/data.py | strfx/stellar | 0 | 20450 | from typing import Tuple
import numpy as np
import png
from skimage.transform import resize
def load_world(filename: str, size: Tuple[int, int], resolution: int) -> np.array:
"""Load a preconstructred track to initialize world.
Args:
filename: Full path to the track file (png).
size: Width and height of the map
resolution: Resolution of the grid map (i.e. into how many cells)
one meter is divided into.
Returns:
An initialized gridmap based on the preconstructed track as
an n x m dimensional numpy array, where n is the width (num cells)
and m the height (num cells) - (after applying resolution).
"""
width_in_cells, height_in_cells = np.multiply(size, resolution)
world = np.array(png_to_ogm(
filename, normalized=True, origin='lower'))
# If the image is already in our desired shape, no need to rescale it
if world.shape == (height_in_cells, width_in_cells):
return world
# Otherwise, scale the image to our desired size.
resized_world = resize(world, (width_in_cells, height_in_cells))
return resized_world
def png_to_ogm(filename, normalized=False, origin='lower'):
"""Convert a png image to occupancy grid map.
Inspired by https://github.com/richardos/occupancy-grid-a-star
Args:
filename: Path to the png file.
normalized: Whether to normalize the data, i.e. to be in value range [0, 1]
origin: Point of origin (0,0)
Returns:
2D Array
"""
r = png.Reader(filename)
img = r.read()
img_data = list(img[2])
out_img = []
bitdepth = img[3]['bitdepth']
for i in range(len(img_data)):
out_img_row = []
for j in range(len(img_data[0])):
if j % img[3]['planes'] == 0:
if normalized:
out_img_row.append(img_data[i][j]*1.0/(2**bitdepth))
else:
out_img_row.append(img_data[i][j])
out_img.append(out_img_row)
if origin == 'lower':
out_img.reverse()
return out_img
| [
1,
515,
19229,
1053,
12603,
552,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
282,
865,
13,
3166,
2071,
3027,
29889,
9067,
1053,
19490,
13,
13,
13,
1753,
2254,
29918,
11526,
29898,
9507,
29901,
851,
29892,
2159,
29901,
12603,
552,
29961,
524,
29892,
938,
1402,
10104,
29901,
938,
29897,
1599,
7442,
29889,
2378,
29901,
13,
1678,
9995,
5896,
263,
758,
11433,
1127,
5702,
304,
11905,
3186,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
10422,
29901,
259,
14846,
2224,
304,
278,
5702,
934,
313,
2732,
467,
13,
9651,
2159,
29901,
539,
21485,
322,
3171,
310,
278,
2910,
13,
9651,
10104,
29901,
24062,
918,
310,
278,
6856,
2910,
313,
29875,
29889,
29872,
29889,
964,
920,
1784,
9101,
29897,
13,
462,
4706,
697,
11134,
338,
13931,
964,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
530,
16601,
6856,
1958,
2729,
373,
278,
758,
11433,
287,
5702,
408,
13,
9651,
385,
302,
921,
286,
22112,
12655,
1409,
29892,
988,
302,
338,
278,
2920,
313,
1949,
9101,
29897,
13,
9651,
322,
286,
278,
3171,
313,
1949,
9101,
29897,
448,
313,
7045,
15399,
10104,
467,
13,
13,
1678,
9995,
13,
1678,
2920,
29918,
262,
29918,
3729,
29879,
29892,
3171,
29918,
262,
29918,
3729,
29879,
353,
7442,
29889,
18056,
368,
29898,
2311,
29892,
10104,
29897,
13,
13,
1678,
3186,
353,
7442,
29889,
2378,
29898,
2732,
29918,
517,
29918,
468,
29885,
29898,
13,
4706,
10422,
29892,
4226,
1891,
29922,
5574,
29892,
3978,
2433,
13609,
8785,
13,
13,
1678,
396,
960,
278,
1967,
338,
2307,
297,
1749,
7429,
8267,
29892,
694,
817,
304,
620,
29883,
744,
372,
13,
1678,
565,
3186,
29889,
12181,
1275,
313,
3545,
29918,
262,
29918,
3729,
29879,
29892,
2920,
29918,
262,
29918,
3729,
29879,
1125,
13,
4706,
736,
3186,
13,
13,
1678,
396,
13466,
29892,
6287,
278,
1967,
304,
1749,
7429,
2159,
29889,
13,
1678,
620,
1891,
29918,
11526,
353,
19490,
29898,
11526,
29892,
313,
2103,
29918,
262,
29918,
3729,
29879,
29892,
3171,
29918,
262,
29918,
3729,
29879,
876,
13,
13,
1678,
736,
620,
1891,
29918,
11526,
13,
13,
13,
1753,
282,
865,
29918,
517,
29918,
468,
29885,
29898,
9507,
29892,
4226,
1891,
29922,
8824,
29892,
3978,
2433,
13609,
29374,
13,
1678,
9995,
18455,
263,
282,
865,
1967,
304,
6919,
6906,
6856,
2910,
29889,
13,
13,
1678,
512,
1028,
2859,
491,
2045,
597,
3292,
29889,
510,
29914,
4018,
538,
359,
29914,
16770,
6906,
29899,
7720,
29899,
29874,
29899,
8508,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
10422,
29901,
259,
10802,
304,
278,
282,
865,
934,
29889,
13,
4706,
4226,
1891,
29901,
26460,
304,
4226,
675,
278,
848,
29892,
474,
29889,
29872,
29889,
304,
367,
297,
995,
3464,
518,
29900,
29892,
29871,
29896,
29962,
13,
4706,
3978,
29901,
268,
8984,
310,
3978,
313,
29900,
29892,
29900,
29897,
13,
13,
1678,
16969,
29901,
13,
308,
29906,
29928,
4398,
13,
13,
1678,
9995,
13,
1678,
364,
353,
282,
865,
29889,
6982,
29898,
9507,
29897,
13,
1678,
10153,
353,
364,
29889,
949,
580,
13,
1678,
10153,
29918,
1272,
353,
1051,
29898,
2492,
29961,
29906,
2314,
13,
13,
1678,
714,
29918,
2492,
353,
5159,
13,
1678,
2586,
19488,
353,
10153,
29961,
29941,
22322,
2966,
19488,
2033,
13,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
2492,
29918,
1272,
22164,
13,
4706,
714,
29918,
2492,
29918,
798,
353,
5159,
13,
4706,
363,
432,
297,
3464,
29898,
2435,
29898,
2492,
29918,
1272,
29961,
29900,
12622,
29901,
13,
9651,
565,
432,
1273,
10153,
29961,
29941,
22322,
9018,
267,
2033,
1275,
29871,
29900,
29901,
13,
18884,
565,
4226,
1891,
29901,
13,
462,
1678,
714,
29918,
2492,
29918,
798,
29889,
4397,
29898,
2492,
29918,
1272,
29961,
29875,
3816,
29926,
14178,
29896,
29889,
29900,
14571,
29906,
1068,
2966,
19488,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
714,
29918,
2492,
29918,
798,
29889,
4397,
29898,
2492,
29918,
1272,
29961,
29875,
3816,
29926,
2314,
13,
13,
4706,
714,
29918,
2492,
29889,
4397,
29898,
449,
29918,
2492,
29918,
798,
29897,
13,
13,
1678,
565,
3978,
1275,
525,
13609,
2396,
13,
4706,
714,
29918,
2492,
29889,
24244,
580,
13,
13,
1678,
736,
714,
29918,
2492,
13,
2
] |
report/migrations/0005_auto_20210907_1232.py | maverick-labs-pune/wikirumours | 0 | 62163 | <gh_stars>0
# Generated by Django 3.1.4 on 2021-09-07 12:32
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('report', '0004_auto_20210907_1057'),
]
operations = [
migrations.AlterField(
model_name='evidencefile',
name='uploader',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29946,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29929,
29899,
29900,
29955,
29871,
29896,
29906,
29901,
29941,
29906,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
5215,
9557,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
9725,
800,
29889,
2774,
932,
519,
29918,
10836,
29898,
11027,
29889,
20656,
29950,
29918,
11889,
29918,
20387,
29931,
511,
13,
4706,
6702,
12276,
742,
525,
29900,
29900,
29900,
29946,
29918,
6921,
29918,
29906,
29900,
29906,
29896,
29900,
29929,
29900,
29955,
29918,
29896,
29900,
29945,
29955,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
2499,
357,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5750,
5084,
1445,
742,
13,
9651,
1024,
2433,
9009,
261,
742,
13,
9651,
1746,
29922,
9794,
29889,
27755,
2558,
29898,
19465,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
304,
29922,
11027,
29889,
20656,
29950,
29918,
11889,
29918,
20387,
29931,
511,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
assemtools/core/setup.py | xmyeen/assemtools | 0 | 48962 | # -*- coding:utf-8 -*-
#!/usr/bin/env python
import os, typing, datetime, glob, warnings, pathlib, pkg_resources
from setuptools import setup as setuptools_setup
from .cmd import bdist_app,cleanup
from ..utility.os import walk_relative_file
from ..utility.pkg import cov_to_program_name, cov_program_name_to_module_name, walk_requirements
def on_version(v:str, p:str = None, b:str = None) -> typing.Iterable[typing.Dict[str,str]]:
'''setuptools版本生成器
'''
v = v if v else '0.0.1'
if p is None:
pass
elif p in ['a', 'alpha']:
v = v + 'a'
elif p in ['b', 'beta']:
v = v + 'b'
elif p in ['c', 'rc']:
v = v + 'c'
if p is None or b is None:
pass
elif b in ['', '_', '-']:
v = v + datetime.datetime.now().strftime("%Y%m%d%H%M%S")
else:
v = v + b
yield dict(version = v)
def on_description(description:str = None) -> typing.Iterable[typing.Dict[str,str]]:
'''setuptools描述生成器
'''
if description:
yield dict(description = description)
if os.path.exists("README.md"):
with open("README.md", "r", encoding = 'utf-8') as f:
yield dict(
long_description_content_type = "text/markdown",
long_description = f.read()
)
def on_requirement(*req_dirs: os.PathLike) -> typing.Iterable[typing.Dict[str,str]]:
'''setuptools依赖生成器
'''
setup_option = {}
all_req_dir = *req_dirs, os.path.join(os.getcwd(), 'req')
for req_dir in all_req_dir:
for name in os.listdir(req_dir):
pkgs = list(walk_requirements(os.path.join(req_dir, name)))
if 'requirements.txt' == name:
# Windows 自动添加pywin32的依赖,用于生成windows服务。
if 'nt' == os.name and not any([ pkg.startswith('pywin32') for pkg in pkgs ]):
try:
dist = pkg_resources.get_distribution('pywin32')
pkgs.append(f'{dist.key} == {dist.version}')
except:
pkgs.append('pywin32')
setup_option.update(install_requires = pkgs)
else:
basename, _ = name.split('-')
setup_option.setdefault("extras_require", {})
setup_option["extras_require"].update({ basename : pkgs })
yield setup_option
def on_data_dirs(**data_dir_info:typing.Tuple) -> typing.Iterable[typing.Dict[str,str]]:
'''setuptools数据文件生成器
'''
data_dir_info.setdefault('bin', ('bin', '*'))
data_file_info = {}
for data_dir_name, (data_dir_root, *data_file_expressions) in data_dir_info.items():
if not data_file_expressions:
warnings.warn(f"Invalid '{data_dir_name}' data directory parameter - Skip it")
continue
for data_relative_file in walk_relative_file(data_dir_root, *data_file_expressions):
data_file_dir_name = os.path.join(data_dir_name, os.path.dirname(data_relative_file)).strip('/')
if data_file_dir_name not in data_file_info: data_file_info.update({ data_file_dir_name : set() })
data_file_info[data_file_dir_name].add(os.path.join(data_dir_root, data_relative_file))
yield dict(data_files = [ (n, list(s)) for n, s in data_file_info.items() ])
def setup(*on_option_generators:typing.Iterable[typing.Dict[str,str]], **setup_option:typing.Any):
'''执行setup设置方法
'''
name = setup_option.get("name")
if not name:
# warnings.warn("Miss 'name' - Abort")
raise Exception("Miss 'name' - Abort")
# Merge option
for on_option_generator in on_option_generators:
for on_option in on_option_generator:
setup_option.update(on_option)
# Update cmdclass
setup_option.setdefault("cmdclass", {})
setup_option['cmdclass'].update(
bdist_app = bdist_app,
cleanup = cleanup
)
# Autogenerate entry_points
if os.path.exists(name):
setup_option.setdefault('entry_points', {})
setup_option['entry_points'].setdefault('console_scripts', [])
for file_path in glob.glob(f'{name}/*/__main__.py'):
name, *module_names, _, = file_path.split(os.sep)
program_name = cov_to_program_name(name, *module_names)
module_name = cov_program_name_to_module_name(program_name)
setup_option['entry_points']['console_scripts'].append(f"{program_name} = {module_name}.__main__:main")
# Autogenerate scripts
# p = pathlib.Path("binexe")
# if p.exists():
# setup_option.setdefault('scripts', [])
# for file_path in p.glob('*'):
# setup_option['scripts'].append(file_path.as_posix())
# Run setup
setuptools_setup(**setup_option) | [
1,
396,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
2897,
29892,
19229,
29892,
12865,
29892,
13149,
29892,
18116,
29892,
2224,
1982,
29892,
282,
9415,
29918,
13237,
13,
3166,
731,
21245,
8789,
1053,
6230,
408,
731,
21245,
8789,
29918,
14669,
13,
3166,
869,
9006,
1053,
289,
5721,
29918,
932,
29892,
14941,
786,
13,
3166,
6317,
329,
1793,
29889,
359,
1053,
6686,
29918,
22925,
29918,
1445,
13,
3166,
6317,
329,
1793,
29889,
15865,
1053,
18838,
29918,
517,
29918,
8860,
29918,
978,
29892,
18838,
29918,
8860,
29918,
978,
29918,
517,
29918,
5453,
29918,
978,
29892,
6686,
29918,
12277,
1860,
13,
13,
1753,
373,
29918,
3259,
29898,
29894,
29901,
710,
29892,
282,
29901,
710,
353,
6213,
29892,
289,
29901,
710,
353,
6213,
29897,
1599,
19229,
29889,
13463,
519,
29961,
1017,
15702,
29889,
21533,
29961,
710,
29892,
710,
5262,
29901,
13,
1678,
14550,
842,
21245,
8789,
30845,
30346,
30486,
30494,
30943,
13,
1678,
14550,
13,
1678,
325,
353,
325,
565,
325,
1683,
525,
29900,
29889,
29900,
29889,
29896,
29915,
13,
13,
1678,
565,
282,
338,
6213,
29901,
13,
4706,
1209,
13,
1678,
25342,
282,
297,
6024,
29874,
742,
525,
2312,
2033,
29901,
13,
4706,
325,
353,
325,
718,
525,
29874,
29915,
13,
1678,
25342,
282,
297,
6024,
29890,
742,
525,
3571,
2033,
29901,
13,
4706,
325,
353,
325,
718,
525,
29890,
29915,
13,
1678,
25342,
282,
297,
6024,
29883,
742,
525,
2214,
2033,
29901,
13,
4706,
325,
353,
325,
718,
525,
29883,
29915,
13,
13,
1678,
565,
282,
338,
6213,
470,
289,
338,
6213,
29901,
13,
4706,
1209,
13,
1678,
25342,
289,
297,
6024,
742,
22868,
742,
17411,
2033,
29901,
13,
4706,
325,
353,
325,
718,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
11702,
29979,
29995,
29885,
29995,
29881,
29995,
29950,
29995,
29924,
29995,
29903,
1159,
13,
1678,
1683,
29901,
13,
4706,
325,
353,
325,
718,
289,
13,
13,
1678,
7709,
9657,
29898,
3259,
353,
325,
29897,
13,
13,
1753,
373,
29918,
8216,
29898,
8216,
29901,
710,
353,
6213,
29897,
1599,
19229,
29889,
13463,
519,
29961,
1017,
15702,
29889,
21533,
29961,
710,
29892,
710,
5262,
29901,
13,
1678,
14550,
842,
21245,
8789,
233,
146,
146,
235,
194,
179,
30486,
30494,
30943,
13,
1678,
14550,
13,
1678,
565,
6139,
29901,
13,
4706,
7709,
9657,
29898,
8216,
353,
6139,
29897,
13,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
703,
16310,
2303,
29889,
3487,
29908,
1125,
13,
4706,
411,
1722,
703,
16310,
2303,
29889,
3487,
613,
376,
29878,
613,
8025,
353,
525,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
9651,
7709,
9657,
29898,
13,
18884,
1472,
29918,
8216,
29918,
3051,
29918,
1853,
353,
376,
726,
29914,
3502,
3204,
613,
13,
18884,
1472,
29918,
8216,
353,
285,
29889,
949,
580,
13,
9651,
1723,
13,
13,
1753,
373,
29918,
12277,
358,
10456,
7971,
29918,
3972,
29879,
29901,
2897,
29889,
2605,
27552,
29897,
1599,
19229,
29889,
13463,
519,
29961,
1017,
15702,
29889,
21533,
29961,
710,
29892,
710,
5262,
29901,
13,
1678,
14550,
842,
21245,
8789,
231,
193,
160,
235,
184,
153,
30486,
30494,
30943,
13,
1678,
14550,
13,
1678,
6230,
29918,
3385,
353,
6571,
13,
13,
1678,
599,
29918,
7971,
29918,
3972,
353,
334,
7971,
29918,
3972,
29879,
29892,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
525,
7971,
1495,
13,
1678,
363,
12428,
29918,
3972,
297,
599,
29918,
7971,
29918,
3972,
29901,
13,
4706,
363,
1024,
297,
2897,
29889,
1761,
3972,
29898,
7971,
29918,
3972,
1125,
13,
9651,
282,
29895,
3174,
353,
1051,
29898,
20919,
29918,
12277,
1860,
29898,
359,
29889,
2084,
29889,
7122,
29898,
7971,
29918,
3972,
29892,
1024,
4961,
13,
9651,
565,
525,
12277,
1860,
29889,
3945,
29915,
1275,
1024,
29901,
13,
18884,
396,
3852,
29871,
30688,
30846,
31538,
30666,
2272,
5080,
29941,
29906,
30210,
231,
193,
160,
235,
184,
153,
30214,
30406,
30909,
30486,
30494,
10499,
31520,
31358,
30267,
13,
18884,
565,
525,
593,
29915,
1275,
2897,
29889,
978,
322,
451,
738,
4197,
282,
9415,
29889,
27382,
2541,
877,
2272,
5080,
29941,
29906,
1495,
363,
282,
9415,
297,
282,
29895,
3174,
4514,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
1320,
353,
282,
9415,
29918,
13237,
29889,
657,
29918,
27691,
877,
2272,
5080,
29941,
29906,
1495,
13,
462,
4706,
282,
29895,
3174,
29889,
4397,
29898,
29888,
29915,
29912,
5721,
29889,
1989,
29913,
1275,
426,
5721,
29889,
3259,
29913,
1495,
13,
462,
1678,
5174,
29901,
13,
462,
4706,
282,
29895,
3174,
29889,
4397,
877,
2272,
5080,
29941,
29906,
1495,
13,
18884,
6230,
29918,
3385,
29889,
5504,
29898,
6252,
29918,
276,
339,
2658,
353,
282,
29895,
3174,
29897,
13,
9651,
1683,
29901,
13,
18884,
2362,
3871,
29892,
903,
353,
29871,
1024,
29889,
5451,
877,
29899,
1495,
13,
18884,
6230,
29918,
3385,
29889,
842,
4381,
703,
1062,
3417,
29918,
12277,
613,
426,
1800,
13,
18884,
6230,
29918,
3385,
3366,
1062,
3417,
29918,
12277,
16862,
5504,
3319,
2362,
3871,
584,
282,
29895,
3174,
5615,
13,
13,
1678,
7709,
6230,
29918,
3385,
13,
13,
1753,
373,
29918,
1272,
29918,
3972,
29879,
29898,
1068,
1272,
29918,
3972,
29918,
3888,
29901,
1017,
15702,
29889,
23215,
552,
29897,
1599,
19229,
29889,
13463,
519,
29961,
1017,
15702,
29889,
21533,
29961,
710,
29892,
710,
5262,
29901,
13,
1678,
14550,
842,
21245,
8789,
30354,
30763,
30333,
30631,
30486,
30494,
30943,
13,
1678,
14550,
13,
1678,
848,
29918,
3972,
29918,
3888,
29889,
842,
4381,
877,
2109,
742,
6702,
2109,
742,
525,
29930,
8785,
13,
13,
1678,
848,
29918,
1445,
29918,
3888,
353,
6571,
13,
1678,
363,
848,
29918,
3972,
29918,
978,
29892,
313,
1272,
29918,
3972,
29918,
4632,
29892,
334,
1272,
29918,
1445,
29918,
17073,
1080,
29897,
297,
848,
29918,
3972,
29918,
3888,
29889,
7076,
7295,
13,
4706,
565,
451,
848,
29918,
1445,
29918,
17073,
1080,
29901,
13,
9651,
18116,
29889,
25442,
29898,
29888,
29908,
13919,
22372,
1272,
29918,
3972,
29918,
978,
10162,
848,
3884,
3443,
448,
4971,
666,
372,
1159,
13,
9651,
6773,
13,
13,
4706,
363,
848,
29918,
22925,
29918,
1445,
297,
6686,
29918,
22925,
29918,
1445,
29898,
1272,
29918,
3972,
29918,
4632,
29892,
334,
1272,
29918,
1445,
29918,
17073,
1080,
1125,
13,
9651,
848,
29918,
1445,
29918,
3972,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29918,
978,
29892,
2897,
29889,
2084,
29889,
25721,
29898,
1272,
29918,
22925,
29918,
1445,
8106,
17010,
11219,
1495,
13,
9651,
565,
848,
29918,
1445,
29918,
3972,
29918,
978,
451,
297,
848,
29918,
1445,
29918,
3888,
29901,
848,
29918,
1445,
29918,
3888,
29889,
5504,
3319,
848,
29918,
1445,
29918,
3972,
29918,
978,
584,
731,
580,
5615,
13,
9651,
848,
29918,
1445,
29918,
3888,
29961,
1272,
29918,
1445,
29918,
3972,
29918,
978,
1822,
1202,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
3972,
29918,
4632,
29892,
848,
29918,
22925,
29918,
1445,
876,
13,
13,
1678,
7709,
9657,
29898,
1272,
29918,
5325,
353,
518,
313,
29876,
29892,
1051,
29898,
29879,
876,
363,
302,
29892,
269,
297,
848,
29918,
1445,
29918,
3888,
29889,
7076,
580,
29871,
2314,
13,
13,
1753,
6230,
10456,
265,
29918,
3385,
29918,
4738,
4097,
29901,
1017,
15702,
29889,
13463,
519,
29961,
1017,
15702,
29889,
21533,
29961,
710,
29892,
710,
20526,
3579,
14669,
29918,
3385,
29901,
1017,
15702,
29889,
10773,
1125,
13,
1678,
14550,
233,
140,
170,
30448,
14669,
30872,
30669,
30525,
30545,
13,
1678,
14550,
13,
1678,
1024,
353,
6230,
29918,
3385,
29889,
657,
703,
978,
1159,
13,
1678,
565,
451,
1024,
29901,
13,
4706,
396,
18116,
29889,
25442,
703,
18552,
525,
978,
29915,
448,
1976,
441,
1159,
13,
4706,
12020,
8960,
703,
18552,
525,
978,
29915,
448,
1976,
441,
1159,
13,
13,
1678,
396,
4702,
479,
2984,
13,
1678,
363,
373,
29918,
3385,
29918,
27959,
297,
373,
29918,
3385,
29918,
4738,
4097,
29901,
13,
4706,
363,
373,
29918,
3385,
297,
373,
29918,
3385,
29918,
27959,
29901,
13,
9651,
6230,
29918,
3385,
29889,
5504,
29898,
265,
29918,
3385,
29897,
13,
13,
1678,
396,
10318,
9920,
1990,
13,
1678,
6230,
29918,
3385,
29889,
842,
4381,
703,
9006,
1990,
613,
426,
1800,
13,
1678,
6230,
29918,
3385,
1839,
9006,
1990,
13359,
5504,
29898,
13,
4706,
289,
5721,
29918,
932,
353,
289,
5721,
29918,
932,
29892,
13,
4706,
5941,
786,
353,
5941,
786,
13,
1678,
1723,
13,
13,
1678,
396,
5202,
468,
759,
403,
6251,
29918,
9748,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
978,
1125,
13,
4706,
6230,
29918,
3385,
29889,
842,
4381,
877,
8269,
29918,
9748,
742,
426,
1800,
13,
4706,
6230,
29918,
3385,
1839,
8269,
29918,
9748,
13359,
842,
4381,
877,
11058,
29918,
16713,
742,
518,
2314,
13,
4706,
363,
934,
29918,
2084,
297,
13149,
29889,
23705,
29898,
29888,
29915,
29912,
978,
6822,
3877,
1649,
3396,
26914,
2272,
29374,
13,
9651,
1024,
29892,
334,
5453,
29918,
7039,
29892,
17117,
353,
934,
29918,
2084,
29889,
5451,
29898,
359,
29889,
19570,
29897,
13,
9651,
1824,
29918,
978,
353,
18838,
29918,
517,
29918,
8860,
29918,
978,
29898,
978,
29892,
334,
5453,
29918,
7039,
29897,
13,
9651,
3883,
29918,
978,
353,
18838,
29918,
8860,
29918,
978,
29918,
517,
29918,
5453,
29918,
978,
29898,
8860,
29918,
978,
29897,
13,
9651,
6230,
29918,
3385,
1839,
8269,
29918,
9748,
16215,
11058,
29918,
16713,
13359,
4397,
29898,
29888,
29908,
29912,
8860,
29918,
978,
29913,
353,
426,
5453,
29918,
978,
1836,
1649,
3396,
1649,
29901,
3396,
1159,
13,
13,
1678,
396,
5202,
468,
759,
403,
12078,
13,
1678,
396,
282,
353,
2224,
1982,
29889,
2605,
703,
26062,
17115,
1159,
13,
1678,
396,
565,
282,
29889,
9933,
7295,
13,
1678,
396,
268,
6230,
29918,
3385,
29889,
842,
4381,
877,
16713,
742,
518,
2314,
13,
1678,
396,
268,
363,
934,
29918,
2084,
297,
282,
29889,
23705,
877,
29930,
29374,
13,
1678,
396,
308,
6230,
29918,
3385,
1839,
16713,
13359,
4397,
29898,
1445,
29918,
2084,
29889,
294,
29918,
1066,
861,
3101,
13,
13,
1678,
396,
7525,
6230,
13,
1678,
731,
21245,
8789,
29918,
14669,
29898,
1068,
14669,
29918,
3385,
29897,
2
] |
bin/fmtutil/utils.py | incognitoRepo/youtube-dl | 0 | 129737 | class hof(object):
def __init__(self, file_name, method):
self.file_obj = open(file_name, method)
def __enter__(self):
return self.file_obj
def __exit__(self, type, value, traceback):
self.file_obj.close()
from contextlib import contextmanager
from operator import methodcaller
@contextmanager
def methcaller(instance,method):
# Code to acquire resource, e.g.:
res = getattr(instance,method)
try:
yield res
finally:
# Code to release resource, e.g.:
if res in globals().keys():
del globals()[key]
| [
1,
770,
298,
974,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
934,
29918,
978,
29892,
1158,
1125,
13,
4706,
1583,
29889,
1445,
29918,
5415,
353,
1722,
29898,
1445,
29918,
978,
29892,
1158,
29897,
13,
1678,
822,
4770,
5893,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
1445,
29918,
5415,
13,
1678,
822,
4770,
13322,
12035,
1311,
29892,
1134,
29892,
995,
29892,
9637,
1627,
1125,
13,
4706,
1583,
29889,
1445,
29918,
5415,
29889,
5358,
580,
13,
13,
3166,
3030,
1982,
1053,
3030,
12847,
13,
3166,
5455,
1053,
1158,
4804,
261,
13,
13,
29992,
4703,
12847,
13,
1753,
286,
621,
4804,
261,
29898,
8758,
29892,
5696,
1125,
13,
1678,
396,
5920,
304,
1274,
1548,
6503,
29892,
321,
29889,
29887,
4898,
13,
1678,
620,
353,
679,
5552,
29898,
8758,
29892,
5696,
29897,
13,
1678,
1018,
29901,
13,
4706,
7709,
620,
13,
1678,
7146,
29901,
13,
4706,
396,
5920,
304,
6507,
6503,
29892,
321,
29889,
29887,
4898,
13,
4706,
565,
620,
297,
13149,
1338,
2141,
8149,
7295,
13,
3986,
628,
13149,
1338,
580,
29961,
1989,
29962,
13,
2
] |
wpclient/api/sync/posts.py | rguillermo/wpclient | 0 | 126928 | <reponame>rguillermo/wpclient
from typing import Literal, Optional
from .crud import CRUD
from wpclient.models.post import Post, PostFilter
class Posts(CRUD):
endpoint = "/wp/v2/posts"
def filter(self, filter: PostFilter) -> list[Post]:
"""
Retrieve all posts matching the filter
"""
filters: dict = filter.dict(exclude_none=True)
objects: list[dict] = self._filter(endpoint=self.endpoint, filters=filters)
return [Post.parse_obj(obj) for obj in objects]
def create(self, post: Post) -> Post:
"""
Create a post
"""
data: dict = post.dict(exclude_none=True)
wp_post: dict = self._create(endpoint=self.endpoint, data=data)
return post.parse_obj(wp_post)
def get(
self,
id: int,
context: Optional[Literal["view", "embed", "edit"]] = None,
password: Optional[str] = None,
) -> Post:
"""
Retrieve a specific post
"""
filters = {}
if context:
filters["context"] = context
if password:
filters["password"] = password
post_data: dict = self._get(endpoint=self.endpoint, id=id, filters=filters)
post = Post.parse_obj(post_data)
return post
def update(self, id: int, data: dict) -> Post:
"""
Update a post with the given kwargs
"""
wp_obj: dict = self._update(endpoint=self.endpoint, id=id, data=data)
return Post.parse_obj(wp_obj)
def delete(self, id: int, force: bool = True) -> bool:
"""
Delete a post
"""
wp_obj = self._delete(endpoint=self.endpoint, id=id, force=force)
if force:
return wp_obj["deleted"]
if wp_obj["id"]:
return True
return False
| [
1,
529,
276,
1112,
420,
29958,
29878,
2543,
453,
20772,
29914,
11912,
4645,
13,
3166,
19229,
1053,
5449,
284,
29892,
28379,
13,
3166,
869,
7283,
566,
1053,
15600,
15789,
13,
3166,
19247,
4645,
29889,
9794,
29889,
2490,
1053,
4918,
29892,
4918,
5072,
13,
13,
13,
1990,
4918,
29879,
29898,
11341,
15789,
1125,
13,
1678,
16248,
353,
5591,
11912,
29914,
29894,
29906,
29914,
14080,
29908,
13,
13,
1678,
822,
4175,
29898,
1311,
29892,
4175,
29901,
4918,
5072,
29897,
1599,
1051,
29961,
6747,
5387,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
599,
11803,
9686,
278,
4175,
13,
4706,
9995,
13,
4706,
18094,
29901,
9657,
353,
4175,
29889,
8977,
29898,
735,
2325,
29918,
9290,
29922,
5574,
29897,
13,
4706,
3618,
29901,
1051,
29961,
8977,
29962,
353,
1583,
3032,
4572,
29898,
29734,
29922,
1311,
29889,
29734,
29892,
18094,
29922,
26705,
29897,
13,
13,
4706,
736,
518,
6747,
29889,
5510,
29918,
5415,
29898,
5415,
29897,
363,
5446,
297,
3618,
29962,
13,
13,
1678,
822,
1653,
29898,
1311,
29892,
1400,
29901,
4918,
29897,
1599,
4918,
29901,
13,
4706,
9995,
13,
4706,
6204,
263,
1400,
13,
4706,
9995,
13,
4706,
848,
29901,
9657,
353,
1400,
29889,
8977,
29898,
735,
2325,
29918,
9290,
29922,
5574,
29897,
13,
13,
4706,
19247,
29918,
2490,
29901,
9657,
353,
1583,
3032,
3258,
29898,
29734,
29922,
1311,
29889,
29734,
29892,
848,
29922,
1272,
29897,
13,
4706,
736,
1400,
29889,
5510,
29918,
5415,
29898,
11912,
29918,
2490,
29897,
13,
13,
1678,
822,
679,
29898,
13,
4706,
1583,
29892,
13,
4706,
1178,
29901,
938,
29892,
13,
4706,
3030,
29901,
28379,
29961,
24938,
284,
3366,
1493,
613,
376,
17987,
613,
376,
5628,
3108,
29962,
353,
6213,
29892,
13,
4706,
4800,
29901,
28379,
29961,
710,
29962,
353,
6213,
29892,
13,
1678,
1723,
1599,
4918,
29901,
13,
4706,
9995,
13,
4706,
4649,
29878,
2418,
263,
2702,
1400,
13,
4706,
9995,
13,
4706,
18094,
353,
6571,
13,
13,
4706,
565,
3030,
29901,
13,
9651,
18094,
3366,
4703,
3108,
353,
3030,
13,
13,
4706,
565,
4800,
29901,
13,
9651,
18094,
3366,
5630,
3108,
353,
4800,
13,
13,
4706,
1400,
29918,
1272,
29901,
9657,
353,
1583,
3032,
657,
29898,
29734,
29922,
1311,
29889,
29734,
29892,
1178,
29922,
333,
29892,
18094,
29922,
26705,
29897,
13,
4706,
1400,
353,
4918,
29889,
5510,
29918,
5415,
29898,
2490,
29918,
1272,
29897,
13,
13,
4706,
736,
1400,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
1178,
29901,
938,
29892,
848,
29901,
9657,
29897,
1599,
4918,
29901,
13,
4706,
9995,
13,
4706,
10318,
263,
1400,
411,
278,
2183,
9049,
5085,
13,
4706,
9995,
13,
4706,
19247,
29918,
5415,
29901,
9657,
353,
1583,
3032,
5504,
29898,
29734,
29922,
1311,
29889,
29734,
29892,
1178,
29922,
333,
29892,
848,
29922,
1272,
29897,
13,
13,
4706,
736,
4918,
29889,
5510,
29918,
5415,
29898,
11912,
29918,
5415,
29897,
13,
13,
1678,
822,
5217,
29898,
1311,
29892,
1178,
29901,
938,
29892,
4889,
29901,
6120,
353,
5852,
29897,
1599,
6120,
29901,
13,
4706,
9995,
13,
4706,
21267,
263,
1400,
13,
4706,
9995,
13,
4706,
19247,
29918,
5415,
353,
1583,
3032,
8143,
29898,
29734,
29922,
1311,
29889,
29734,
29892,
1178,
29922,
333,
29892,
4889,
29922,
10118,
29897,
13,
13,
4706,
565,
4889,
29901,
13,
9651,
736,
19247,
29918,
5415,
3366,
311,
22742,
3108,
13,
13,
4706,
565,
19247,
29918,
5415,
3366,
333,
3108,
29901,
13,
9651,
736,
5852,
13,
13,
4706,
736,
7700,
13,
2
] |
packages/nusoft/bzip2.py | pgjones/nusoft | 1 | 80721 | #!/usr/bin/env python
#
# Bzip2
#
# Bzip2 packages and versions
#
# Author <NAME> - 2014-08-15 <<EMAIL>> : New file.
####################################################################################################
import nusoft.package.conditional as conditional_package
import os
class Bzip2(conditional_package.ConditionalPackage):
""" The Bzip2 installation package.
:param _tar_name: name of the tar file to download/install
:param _version: version of Bzip2 to install.
"""
def __init__(self, system, repository):
""" Initialise this bzip2 installation package.
:param system: class that manages system commands
:type system: :class:`nusoft.system.System` instance
:param repository: local name of the repository the package is from
"""
super(Bzip2, self).__init__(self._version, system, repository, libraries=["bz2"],
headers=["bzlib.h"])
self._tar_name = self._version + ".tar.gz"
def get_dependencies(self):
""" Return a list of dependency names
:returns: list of dependency package names
:rtype: list
"""
return []
def _download(self):
""" Download the bzip2 tar file."""
self._system.download("http://bzip2.haxx.se/download/" + self._tar_name)
def _install(self):
""" Untar the tar file to the install path."""
self._system.untar(self._tar_name, self.get_install_path(), 1)
self._system.make(args=["-f", "Makefile-libbz2_so"], cwd=self.get_install_path())
self._system.make(args=["install", "PREFIX=" + self.get_install_path()],
cwd=self.get_install_path())
def _update(self):
""" Nothing to do here..."""
pass
def _remove(self):
""" Remove the install directory."""
self._system.remove(self.get_install_path())
def _is_installed(self):
""" Check if root is installed by looking for the root executable in the bin directory.
:return: True if installed
"""
return self._system.exists(os.path.join(self.get_install_path(), "include/bzlib.h")) \
and self._system.is_library(os.path.join(self.get_install_path(), "lib/libbz2"))
# The versions of root that can be installed
versions = [type('bzip2-1.0.6', (Bzip2, object), {"_version" : "bzip2-1.0.6"})]
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
13,
29937,
350,
7554,
29906,
13,
29937,
13,
29937,
350,
7554,
29906,
9741,
322,
6910,
13,
29937,
13,
29937,
13361,
529,
5813,
29958,
448,
29871,
29906,
29900,
29896,
29946,
29899,
29900,
29947,
29899,
29896,
29945,
3532,
26862,
6227,
6778,
584,
1570,
934,
29889,
13,
13383,
13383,
13383,
13383,
13383,
13383,
4136,
13,
5215,
302,
10648,
615,
29889,
5113,
29889,
1116,
3245,
408,
15047,
29918,
5113,
13,
5215,
2897,
13,
13,
1990,
350,
7554,
29906,
29898,
1116,
3245,
29918,
5113,
29889,
10983,
3245,
14459,
1125,
13,
1678,
9995,
450,
350,
7554,
29906,
11161,
3577,
29889,
13,
268,
13,
1678,
584,
3207,
903,
12637,
29918,
978,
29901,
1024,
310,
278,
9913,
934,
304,
5142,
29914,
6252,
13,
1678,
584,
3207,
903,
3259,
29901,
1873,
310,
350,
7554,
29906,
304,
2601,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1788,
29892,
9810,
1125,
13,
4706,
9995,
17250,
895,
445,
289,
7554,
29906,
11161,
3577,
29889,
13,
13,
4706,
584,
3207,
1788,
29901,
770,
393,
767,
1179,
1788,
8260,
13,
4706,
584,
1853,
1788,
29901,
584,
1990,
18078,
29876,
10648,
615,
29889,
5205,
29889,
3924,
29952,
2777,
13,
4706,
584,
3207,
9810,
29901,
1887,
1024,
310,
278,
9810,
278,
3577,
338,
515,
13,
4706,
9995,
13,
4706,
2428,
29898,
29933,
7554,
29906,
29892,
1583,
467,
1649,
2344,
12035,
1311,
3032,
3259,
29892,
1788,
29892,
9810,
29892,
9562,
29922,
3366,
29890,
29920,
29906,
12436,
29871,
13,
462,
462,
1678,
9066,
29922,
3366,
29890,
29920,
1982,
29889,
29882,
20068,
13,
4706,
1583,
3032,
12637,
29918,
978,
353,
1583,
3032,
3259,
718,
11393,
12637,
29889,
18828,
29908,
13,
1678,
822,
679,
29918,
22594,
29898,
1311,
1125,
13,
4706,
9995,
7106,
263,
1051,
310,
10609,
2983,
13,
13,
4706,
584,
18280,
29901,
1051,
310,
10609,
3577,
2983,
13,
4706,
584,
29878,
1853,
29901,
1051,
13,
4706,
9995,
13,
4706,
736,
5159,
13,
1678,
822,
903,
10382,
29898,
1311,
1125,
13,
4706,
9995,
25553,
278,
289,
7554,
29906,
9913,
934,
1213,
15945,
13,
4706,
1583,
3032,
5205,
29889,
10382,
703,
1124,
597,
29890,
7554,
29906,
29889,
29882,
1165,
29916,
29889,
344,
29914,
10382,
12975,
718,
1583,
3032,
12637,
29918,
978,
29897,
13,
1678,
822,
903,
6252,
29898,
1311,
1125,
13,
4706,
9995,
501,
593,
279,
278,
9913,
934,
304,
278,
2601,
2224,
1213,
15945,
13,
4706,
1583,
3032,
5205,
29889,
1657,
279,
29898,
1311,
3032,
12637,
29918,
978,
29892,
1583,
29889,
657,
29918,
6252,
29918,
2084,
3285,
29871,
29896,
29897,
13,
4706,
1583,
3032,
5205,
29889,
5675,
29898,
5085,
29922,
3366,
29899,
29888,
613,
376,
9984,
1445,
29899,
492,
1327,
29920,
29906,
29918,
578,
12436,
274,
9970,
29922,
1311,
29889,
657,
29918,
6252,
29918,
2084,
3101,
13,
4706,
1583,
3032,
5205,
29889,
5675,
29898,
5085,
29922,
3366,
6252,
613,
376,
15094,
25634,
543,
718,
1583,
29889,
657,
29918,
6252,
29918,
2084,
580,
1402,
29871,
13,
462,
3986,
274,
9970,
29922,
1311,
29889,
657,
29918,
6252,
29918,
2084,
3101,
13,
1678,
822,
903,
5504,
29898,
1311,
1125,
13,
4706,
9995,
9531,
304,
437,
1244,
856,
15945,
29908,
13,
4706,
1209,
13,
1678,
822,
903,
5992,
29898,
1311,
1125,
13,
4706,
9995,
15154,
278,
2601,
3884,
1213,
15945,
13,
4706,
1583,
3032,
5205,
29889,
5992,
29898,
1311,
29889,
657,
29918,
6252,
29918,
2084,
3101,
13,
1678,
822,
903,
275,
29918,
25537,
29898,
1311,
1125,
13,
4706,
9995,
5399,
565,
3876,
338,
5130,
491,
3063,
363,
278,
3876,
16813,
297,
278,
9016,
3884,
29889,
13,
13,
4706,
584,
2457,
29901,
5852,
565,
5130,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
5205,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
657,
29918,
6252,
29918,
2084,
3285,
376,
2856,
29914,
29890,
29920,
1982,
29889,
29882,
5783,
320,
13,
9651,
322,
1583,
3032,
5205,
29889,
275,
29918,
5258,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
657,
29918,
6252,
29918,
2084,
3285,
376,
1982,
29914,
492,
1327,
29920,
29906,
5783,
13,
268,
13,
29937,
450,
6910,
310,
3876,
393,
508,
367,
5130,
13,
26100,
353,
518,
1853,
877,
29890,
7554,
29906,
29899,
29896,
29889,
29900,
29889,
29953,
742,
313,
29933,
7554,
29906,
29892,
1203,
511,
8853,
29918,
3259,
29908,
584,
376,
29890,
7554,
29906,
29899,
29896,
29889,
29900,
29889,
29953,
29908,
1800,
29962,
13,
13,
2
] |
my_site/objects.py | mequetrefe-do-subtroco/web_constel_cont_ext | 1 | 29935 | <filename>my_site/objects.py
class Button(object):
def __init__(self, url, label, get=''):
self.url = url
self.label = label
self.get = get
| [
1,
529,
9507,
29958,
1357,
29918,
2746,
29914,
12650,
29889,
2272,
13,
13,
13,
1990,
11025,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3142,
29892,
3858,
29892,
679,
2433,
29374,
13,
4706,
1583,
29889,
2271,
353,
3142,
13,
4706,
1583,
29889,
1643,
353,
3858,
13,
4706,
1583,
29889,
657,
353,
679,
13,
2
] |
tests/ut/datavisual/data_transform/loader_generators/test_data_loader_generator.py | fapbatista/mindinsight | 216 | 169764 | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""
Function:
Test mindinsight.datavisual.data_transform.loader_generators.data_loader_generator
Usage:
pytest tests/ut/datavisual
"""
import datetime
import os
import shutil
import tempfile
from unittest.mock import patch
import pytest
from mindinsight.datavisual.data_transform.loader_generators import data_loader_generator
from mindinsight.utils.exceptions import ParamValueError
from ...mock import MockLogger
class TestDataLoaderGenerator:
"""Test data_loader_generator."""
@classmethod
def setup_class(cls):
data_loader_generator.logger = MockLogger
def _generate_summaries(self, summary_base_dir, dir_num=1):
"""Utils function for tests."""
summaries = list()
if os.path.exists(summary_base_dir):
shutil.rmtree(summary_base_dir)
os.mkdir(summary_base_dir)
for i in range(dir_num):
log_dir = os.path.join(summary_base_dir, f'job{i}')
os.mkdir(log_dir)
summary_info = dict(relative_path=log_dir.replace(summary_base_dir, "."),
update_time=datetime.datetime.now().replace(minute=i).astimezone())
summaries.append(summary_info)
return summaries
def test_invalid_summary_path(self):
"""Test invalid summary path."""
path = None
with pytest.raises(ParamValueError) as exc_info:
data_loader_generator.DataLoaderGenerator(path)
assert "Summary path is None." in exc_info.value.message
assert MockLogger.log_msg['warning'] == "Summary path is None. It will not init data loader generator."
def test_generate_loaders_with_not_exist_path(self):
"""Test generating loaders with not exist path."""
path = tempfile.NamedTemporaryFile().name
os.mkdir(path)
generator = data_loader_generator.DataLoaderGenerator(path)
os.removedirs(path)
loader_dict = generator.generate_loaders(loader_pool=dict())
assert MockLogger.log_msg['warning'] == "Summary path does not exist. It will not start " \
"loading events data. Current path is %r." % path
assert loader_dict == {}
@patch.object(data_loader_generator.DataLoader, "has_valid_files")
@patch.object(data_loader_generator.SummaryWatcher, "list_summary_directories")
def test_generate_loaders(self, mock_summary_watcher, mock_data_loader):
"""Test generating loaders."""
summary_base_dir = tempfile.NamedTemporaryFile().name
summaries = self._generate_summaries(summary_base_dir, 20)
# mock summary_watcher.
generator = data_loader_generator.DataLoaderGenerator(summary_base_dir)
mock_summary_watcher.return_value = summaries
# mock DataLoader
mock_data_loader.return_value = True
loader_dict = generator.generate_loaders(loader_pool=dict())
expected_ids = [
summary.get('relative_path') for summary in summaries[-data_loader_generator.MAX_DATA_LOADER_SIZE:]
]
assert sorted(loader_dict.keys()) == sorted(expected_ids)
shutil.rmtree(summary_base_dir)
def test_check_job_exist(self):
"""Test checking if job exists."""
summary_base_dir = tempfile.NamedTemporaryFile().name
self._generate_summaries(summary_base_dir)
with open(os.path.join(summary_base_dir, 'job0', "summary.1"), 'w'):
pass
generator = data_loader_generator.DataLoaderGenerator(summary_base_dir)
assert generator.check_train_job_exist(train_id='./job0')
assert not generator.check_train_job_exist(train_id='job0')
assert not generator.check_train_job_exist(train_id='././../job0')
shutil.rmtree(summary_base_dir)
def test_generate_loader_by_train_id(self):
"""Test generating loader by train id."""
summary_base_dir = tempfile.NamedTemporaryFile().name
self._generate_summaries(summary_base_dir)
with open(os.path.join(summary_base_dir, 'job0', "summary.1"), 'w'):
pass
generator = data_loader_generator.DataLoaderGenerator(summary_base_dir)
train_id = "./job0"
loader = generator.generate_loader_by_train_id(train_id)
assert loader.loader_id == train_id
shutil.rmtree(summary_base_dir)
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
379,
3357,
26599,
8364,
11763,
3189,
1696,
19806,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
1275,
9166,
9166,
9166,
9166,
4936,
1360,
13,
15945,
29908,
13,
6678,
29901,
13,
1678,
4321,
3458,
1144,
523,
29889,
4130,
485,
275,
950,
29889,
1272,
29918,
9067,
29889,
12657,
29918,
4738,
4097,
29889,
1272,
29918,
12657,
29918,
27959,
13,
27573,
29901,
13,
1678,
11451,
1688,
6987,
29914,
329,
29914,
4130,
485,
275,
950,
13,
15945,
29908,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
5694,
1445,
13,
3166,
443,
27958,
29889,
17640,
1053,
13261,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
3458,
1144,
523,
29889,
4130,
485,
275,
950,
29889,
1272,
29918,
9067,
29889,
12657,
29918,
4738,
4097,
1053,
848,
29918,
12657,
29918,
27959,
13,
3166,
3458,
1144,
523,
29889,
13239,
29889,
11739,
29879,
1053,
12662,
1917,
2392,
13,
13,
3166,
2023,
17640,
1053,
26297,
16363,
13,
13,
13,
1990,
4321,
1469,
10036,
21575,
29901,
13,
1678,
9995,
3057,
848,
29918,
12657,
29918,
27959,
1213,
15945,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6230,
29918,
1990,
29898,
25932,
1125,
13,
4706,
848,
29918,
12657,
29918,
27959,
29889,
21707,
353,
26297,
16363,
13,
13,
1678,
822,
903,
17158,
29918,
2083,
3034,
583,
29898,
1311,
29892,
15837,
29918,
3188,
29918,
3972,
29892,
4516,
29918,
1949,
29922,
29896,
1125,
13,
4706,
9995,
12177,
740,
363,
6987,
1213,
15945,
13,
4706,
19138,
583,
353,
1051,
580,
13,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7727,
29918,
3188,
29918,
3972,
1125,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
4706,
2897,
29889,
11256,
3972,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
3972,
29918,
1949,
1125,
13,
9651,
1480,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7727,
29918,
3188,
29918,
3972,
29892,
285,
29915,
9057,
29912,
29875,
29913,
1495,
13,
9651,
2897,
29889,
11256,
3972,
29898,
1188,
29918,
3972,
29897,
13,
9651,
15837,
29918,
3888,
353,
9657,
29898,
22925,
29918,
2084,
29922,
1188,
29918,
3972,
29889,
6506,
29898,
7727,
29918,
3188,
29918,
3972,
29892,
376,
1213,
511,
13,
462,
18884,
2767,
29918,
2230,
29922,
12673,
29889,
12673,
29889,
3707,
2141,
6506,
29898,
1195,
1082,
29922,
29875,
467,
579,
603,
8028,
3101,
13,
9651,
19138,
583,
29889,
4397,
29898,
7727,
29918,
3888,
29897,
13,
4706,
736,
19138,
583,
13,
13,
1678,
822,
1243,
29918,
20965,
29918,
7727,
29918,
2084,
29898,
1311,
1125,
13,
4706,
9995,
3057,
8340,
15837,
2224,
1213,
15945,
13,
4706,
2224,
353,
6213,
13,
4706,
411,
11451,
1688,
29889,
336,
4637,
29898,
4736,
1917,
2392,
29897,
408,
5566,
29918,
3888,
29901,
13,
9651,
848,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
21575,
29898,
2084,
29897,
13,
13,
4706,
4974,
376,
26289,
2224,
338,
6213,
1213,
297,
5566,
29918,
3888,
29889,
1767,
29889,
4906,
13,
4706,
4974,
26297,
16363,
29889,
1188,
29918,
7645,
1839,
27392,
2033,
1275,
376,
26289,
2224,
338,
6213,
29889,
739,
674,
451,
2069,
848,
23466,
15299,
1213,
13,
13,
1678,
822,
1243,
29918,
17158,
29918,
1359,
414,
29918,
2541,
29918,
1333,
29918,
28997,
29918,
2084,
29898,
1311,
1125,
13,
4706,
9995,
3057,
14655,
2254,
414,
411,
451,
1863,
2224,
1213,
15945,
13,
4706,
2224,
353,
5694,
1445,
29889,
22175,
5776,
1971,
653,
2283,
2141,
978,
13,
4706,
2897,
29889,
11256,
3972,
29898,
2084,
29897,
13,
4706,
15299,
353,
848,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
21575,
29898,
2084,
29897,
13,
4706,
2897,
29889,
1745,
8238,
12935,
29898,
2084,
29897,
13,
4706,
23466,
29918,
8977,
353,
15299,
29889,
17158,
29918,
1359,
414,
29898,
12657,
29918,
10109,
29922,
8977,
3101,
13,
4706,
4974,
26297,
16363,
29889,
1188,
29918,
7645,
1839,
27392,
2033,
1275,
376,
26289,
2224,
947,
451,
1863,
29889,
739,
674,
451,
1369,
376,
320,
13,
462,
462,
18884,
376,
13234,
4959,
848,
29889,
9626,
2224,
338,
1273,
29878,
1213,
1273,
2224,
13,
4706,
4974,
23466,
29918,
8977,
1275,
6571,
13,
13,
1678,
732,
5041,
29889,
3318,
29898,
1272,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
29892,
376,
5349,
29918,
3084,
29918,
5325,
1159,
13,
1678,
732,
5041,
29889,
3318,
29898,
1272,
29918,
12657,
29918,
27959,
29889,
26289,
24709,
261,
29892,
376,
1761,
29918,
7727,
29918,
11851,
3842,
1159,
13,
1678,
822,
1243,
29918,
17158,
29918,
1359,
414,
29898,
1311,
29892,
11187,
29918,
7727,
29918,
12344,
261,
29892,
11187,
29918,
1272,
29918,
12657,
1125,
13,
4706,
9995,
3057,
14655,
2254,
414,
1213,
15945,
13,
4706,
15837,
29918,
3188,
29918,
3972,
353,
5694,
1445,
29889,
22175,
5776,
1971,
653,
2283,
2141,
978,
13,
4706,
19138,
583,
353,
1583,
3032,
17158,
29918,
2083,
3034,
583,
29898,
7727,
29918,
3188,
29918,
3972,
29892,
29871,
29906,
29900,
29897,
13,
13,
4706,
396,
11187,
15837,
29918,
12344,
261,
29889,
13,
4706,
15299,
353,
848,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
21575,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
4706,
11187,
29918,
7727,
29918,
12344,
261,
29889,
2457,
29918,
1767,
353,
19138,
583,
13,
13,
4706,
396,
11187,
3630,
10036,
13,
4706,
11187,
29918,
1272,
29918,
12657,
29889,
2457,
29918,
1767,
353,
5852,
13,
13,
4706,
23466,
29918,
8977,
353,
15299,
29889,
17158,
29918,
1359,
414,
29898,
12657,
29918,
10109,
29922,
8977,
3101,
13,
4706,
3806,
29918,
4841,
353,
518,
13,
9651,
15837,
29889,
657,
877,
22925,
29918,
2084,
1495,
363,
15837,
297,
19138,
583,
14352,
1272,
29918,
12657,
29918,
27959,
29889,
12648,
29918,
14573,
29918,
29428,
1001,
29918,
14226,
17531,
13,
4706,
4514,
13,
4706,
4974,
12705,
29898,
12657,
29918,
8977,
29889,
8149,
3101,
1275,
12705,
29898,
9684,
29918,
4841,
29897,
13,
13,
4706,
528,
4422,
29889,
1758,
8336,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
13,
1678,
822,
1243,
29918,
3198,
29918,
9057,
29918,
28997,
29898,
1311,
1125,
13,
4706,
9995,
3057,
8454,
565,
4982,
4864,
1213,
15945,
13,
4706,
15837,
29918,
3188,
29918,
3972,
353,
5694,
1445,
29889,
22175,
5776,
1971,
653,
2283,
2141,
978,
13,
4706,
1583,
3032,
17158,
29918,
2083,
3034,
583,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
4706,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
7727,
29918,
3188,
29918,
3972,
29892,
525,
9057,
29900,
742,
376,
7727,
29889,
29896,
4968,
525,
29893,
29374,
13,
9651,
1209,
13,
13,
4706,
15299,
353,
848,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
21575,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
13,
4706,
4974,
15299,
29889,
3198,
29918,
14968,
29918,
9057,
29918,
28997,
29898,
14968,
29918,
333,
2433,
6904,
9057,
29900,
1495,
13,
4706,
4974,
451,
15299,
29889,
3198,
29918,
14968,
29918,
9057,
29918,
28997,
29898,
14968,
29918,
333,
2433,
9057,
29900,
1495,
13,
4706,
4974,
451,
15299,
29889,
3198,
29918,
14968,
29918,
9057,
29918,
28997,
29898,
14968,
29918,
333,
2433,
29889,
6294,
29914,
6995,
9057,
29900,
1495,
13,
13,
4706,
528,
4422,
29889,
1758,
8336,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
13,
1678,
822,
1243,
29918,
17158,
29918,
12657,
29918,
1609,
29918,
14968,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
3057,
14655,
23466,
491,
7945,
1178,
1213,
15945,
13,
4706,
15837,
29918,
3188,
29918,
3972,
353,
5694,
1445,
29889,
22175,
5776,
1971,
653,
2283,
2141,
978,
13,
4706,
1583,
3032,
17158,
29918,
2083,
3034,
583,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
4706,
411,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
7727,
29918,
3188,
29918,
3972,
29892,
525,
9057,
29900,
742,
376,
7727,
29889,
29896,
4968,
525,
29893,
29374,
13,
9651,
1209,
13,
4706,
15299,
353,
848,
29918,
12657,
29918,
27959,
29889,
1469,
10036,
21575,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
13,
4706,
7945,
29918,
333,
353,
376,
6904,
9057,
29900,
29908,
13,
4706,
23466,
353,
15299,
29889,
17158,
29918,
12657,
29918,
1609,
29918,
14968,
29918,
333,
29898,
14968,
29918,
333,
29897,
13,
4706,
4974,
23466,
29889,
12657,
29918,
333,
1275,
7945,
29918,
333,
13,
13,
4706,
528,
4422,
29889,
1758,
8336,
29898,
7727,
29918,
3188,
29918,
3972,
29897,
13,
2
] |
tests/ignite/metrics/test_mean_absolute_error.py | miguelvr/ignite | 5 | 154172 | <reponame>miguelvr/ignite
from ignite.exceptions import NotComputableError
from ignite.metrics import MeanAbsoluteError
import pytest
import torch
def test_zero_div():
mae = MeanAbsoluteError()
with pytest.raises(NotComputableError):
mae.compute()
def test_compute():
mae = MeanAbsoluteError()
y_pred = torch.Tensor([[2.0], [-2.0]])
y = torch.zeros(2)
mae.update((y_pred, y))
assert isinstance(mae.compute(), float)
assert mae.compute() == 2.0
mae.reset()
y_pred = torch.Tensor([[3.0], [-3.0]])
y = torch.zeros(2)
mae.update((y_pred, y))
assert isinstance(mae.compute(), float)
assert mae.compute() == 3.0
| [
1,
529,
276,
1112,
420,
29958,
29885,
335,
2491,
13416,
29914,
647,
568,
13,
3166,
5330,
568,
29889,
11739,
29879,
1053,
2216,
20606,
519,
2392,
13,
3166,
5330,
568,
29889,
2527,
10817,
1053,
16316,
4920,
14977,
2392,
13,
5215,
11451,
1688,
13,
5215,
4842,
305,
13,
13,
13,
1753,
1243,
29918,
9171,
29918,
4563,
7295,
13,
1678,
611,
29872,
353,
16316,
4920,
14977,
2392,
580,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
3664,
20606,
519,
2392,
1125,
13,
4706,
611,
29872,
29889,
26017,
580,
13,
13,
13,
1753,
1243,
29918,
26017,
7295,
13,
1678,
611,
29872,
353,
16316,
4920,
14977,
2392,
580,
13,
13,
1678,
343,
29918,
11965,
353,
4842,
305,
29889,
29911,
6073,
4197,
29961,
29906,
29889,
29900,
1402,
21069,
29906,
29889,
29900,
24960,
13,
1678,
343,
353,
4842,
305,
29889,
3298,
359,
29898,
29906,
29897,
13,
1678,
611,
29872,
29889,
5504,
3552,
29891,
29918,
11965,
29892,
343,
876,
13,
1678,
4974,
338,
8758,
29898,
655,
29872,
29889,
26017,
3285,
5785,
29897,
13,
1678,
4974,
611,
29872,
29889,
26017,
580,
1275,
29871,
29906,
29889,
29900,
13,
13,
1678,
611,
29872,
29889,
12071,
580,
13,
1678,
343,
29918,
11965,
353,
4842,
305,
29889,
29911,
6073,
4197,
29961,
29941,
29889,
29900,
1402,
21069,
29941,
29889,
29900,
24960,
13,
1678,
343,
353,
4842,
305,
29889,
3298,
359,
29898,
29906,
29897,
13,
1678,
611,
29872,
29889,
5504,
3552,
29891,
29918,
11965,
29892,
343,
876,
13,
1678,
4974,
338,
8758,
29898,
655,
29872,
29889,
26017,
3285,
5785,
29897,
13,
1678,
4974,
611,
29872,
29889,
26017,
580,
1275,
29871,
29941,
29889,
29900,
13,
2
] |
src/main.py | tylerkramlich/readme-analyzer | 0 | 77204 | # TODO: Argparse main
from readme_analyzer import ReadmeAnalyzer
analyzer = ReadmeAnalyzer('src/readme_analyzer_config.cfg')
analyzer.runAll() | [
1,
396,
14402,
29901,
11842,
5510,
1667,
13,
3166,
1303,
1004,
29918,
24209,
3298,
1053,
7523,
1004,
2744,
14997,
3298,
13,
13,
24209,
3298,
353,
7523,
1004,
2744,
14997,
3298,
877,
4351,
29914,
949,
1004,
29918,
24209,
3298,
29918,
2917,
29889,
16859,
1495,
13,
13,
24209,
3298,
29889,
3389,
3596,
580,
2
] |
src/train_setup.py | achariso/gans-thesis | 2 | 117185 | <reponame>achariso/gans-thesis
import argparse
import os
import sys
import torch
from IPython import get_ipython
from utils.data import ManualSeedReproducible
from utils.dep_free import in_notebook
from utils.filesystems.gdrive.colab import ColabFilesystem, ColabFolder, ColabCapsule
from utils.filesystems.gdrive.remote import GDriveCapsule, GDriveFilesystem, GDriveFolder
from utils.filesystems.local import LocalFilesystem, LocalFolder, LocalCapsule
# Flag to run first test batches locally
from utils.plot import ensure_matplotlib_fonts_exist
##########################################
### Parse CLI Arguments ###
##########################################
parser = argparse.ArgumentParser(description='Trains GAN model in PyTorch.')
parser.add_argument('--device', type=str, default='cpu', choices=['cpu', 'cuda'],
help='execution device (\'cpu\', or \'cuda\')')
parser.add_argument('--log_level', type=str, default='debug', choices=['debug', 'info', 'warning', 'error', 'critical'],
help='default log level (\'debug\', \'info\', \'warning\', \'error\' or \'critical\')')
parser.add_argument('--chkpt_step', type=str, default='latest',
help='model checkpoint to be loaded (\'latest\' or str or int)')
parser.add_argument('--seed', type=int, default=42,
help='random generators seed value (default: 42)')
parser.add_argument('-use_refresh_token', action='store_true',
help='if set will use client_secrets.json to connect to Google Drive, else will ask for auth code')
parser.add_argument('--run_locally', action='store_true',
help='flag must be present to start local running (aka first pass run)')
# New GDrive root (e.g. "/Education/AUTH/COURSES/10th Semester - Thesis/ThesisGStorage")
parser.add_argument('--gdrive_which', type=str, default='auth',
help='Choose which Google Drive will be used as a storage devices (one of "personal", "auth")')
args = parser.parse_args()
##########################################
### Environment Initialization ###
##########################################
run_locally = True
if in_notebook() and not args.run_locally:
run_locally = False # local runs are performed vis IDE runs (and thus terminal)
os.environ['TRAIN_ENV'] = 'local' if run_locally else 'nonlocal'
# ID of Google Drive folder to be considered as project root
# - auth: the entire drive will be used for thesis storage (so no root change would be done)
# - personal: thesis storage is inside a single directory of my personal Google Drive --> this id must be provided
cloud_root = None if args.gdrive_which == 'auth' else '12IiDRSnj6r7Jd66Yxz3ZZTn9EFW-Qnqu'
# Check if running inside Colab or Kaggle
if 'google.colab' in sys.modules or 'google.colab' in str(get_ipython()) or 'COLAB_GPU' in os.environ:
exec_env = 'colab'
local_gdrive_root = '/content/drive/MyDrive'
run_locally = False
elif 'KAGGLE_KERNEL_RUN_TYPE' in os.environ:
exec_env = 'kaggle'
local_gdrive_root = '/kaggle/working/GoogleDrive'
run_locally = False
else:
exec_env = 'ssh'
local_gdrive_root = '/home/achariso/PycharmProjects/gans-thesis/.gdrive'
if not os.path.exists(local_gdrive_root):
run_locally = False
local_gdrive_root = '/workspace/GoogleDrive' # vast.ai
if not os.path.exists(local_gdrive_root):
local_gdrive_root = input('local_gdrive_root = ')
assert os.path.exists(local_gdrive_root), f'local_gdrive_root={local_gdrive_root} NOT FOUND'
os.environ['TRAIN_EXEC_ENV'] = exec_env
# Check if GPU is available
exec_device = torch.device('cuda:0' if 'cuda' == args.device and torch.cuda.is_available() else 'cpu')
os.environ['TRAIN_EXEC_DEV'] = str(exec_device)
# Get log level
log_level = args.log_level
os.environ['TRAIN_LOG_LEVEL'] = log_level
# Reproducibility
seed = ManualSeedReproducible.manual_seed(args.seed)
##########################################
### GDrive Filesystem Initialization ###
##########################################
# - define FilesystemFolder to interact with files/folders under the root folder on Google Drive
if exec_env == 'colab':
# Colab filesystem is a locally-mounted filesystem. Interacts with native OS calls.
fs = ColabFilesystem(ccapsule=ColabCapsule())
groot = ColabFolder.root(capsule_or_fs=fs)
elif run_locally:
# Local filesystem (basically one directory under given root). Interacts with native OS calls.
fs = LocalFilesystem(ccapsule=LocalCapsule(local_root=local_gdrive_root))
groot = LocalFolder.root(capsule_or_fs=fs)
else:
# Remote filesystem. Interacts via GoogleDrive API calls.
use_refresh_token = args.use_refresh_token
try:
use_refresh_token = use_refresh_token or False
except NameError:
use_refresh_token = run_locally
gcapsule = GDriveCapsule(local_gdrive_root=local_gdrive_root, use_http_cache=True, update_credentials=True,
use_refresh_token=use_refresh_token)
fs = GDriveFilesystem(gcapsule=gcapsule)
groot = GDriveFolder.root(capsule_or_fs=fs, update_cache=True, cloud_root=cloud_root)
# - define immediate sub-folders of root folder
# print(json.dumps(groot.subfolders, indent=4))
datasets_groot = groot.subfolder_by_name('Datasets')
models_groot = groot.subfolder_by_name('Models')
fonts_groot = groot.subfolder_by_name('Fonts')
# - ensure that system and matplotlib fonts directories exist and have the correct font files
rebuilt_fonts = ensure_matplotlib_fonts_exist(fonts_groot, force_rebuild=False)
if rebuilt_fonts and exec_env != 'ssh':
groot.fs.logger.critical('Fonts rebuilt! Terminating python process now.')
os.kill(os.getpid(), 9)
| [
1,
529,
276,
1112,
420,
29958,
496,
279,
10718,
29914,
29887,
550,
29899,
26533,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
5215,
4842,
305,
13,
3166,
5641,
1656,
1053,
679,
29918,
666,
1656,
13,
13,
3166,
3667,
29879,
29889,
1272,
1053,
2315,
950,
2008,
287,
1123,
5498,
15520,
13,
3166,
3667,
29879,
29889,
2716,
29918,
9021,
1053,
297,
29918,
1333,
19273,
13,
3166,
3667,
29879,
29889,
5325,
973,
29879,
29889,
29887,
21594,
29889,
1054,
370,
1053,
1530,
370,
10547,
973,
29892,
1530,
370,
12924,
29892,
1530,
370,
29907,
2547,
1297,
13,
3166,
3667,
29879,
29889,
5325,
973,
29879,
29889,
29887,
21594,
29889,
16674,
1053,
402,
29928,
4401,
29907,
2547,
1297,
29892,
402,
29928,
4401,
10547,
973,
29892,
402,
29928,
4401,
12924,
13,
3166,
3667,
29879,
29889,
5325,
973,
29879,
29889,
2997,
1053,
9959,
10547,
973,
29892,
9959,
12924,
29892,
9959,
29907,
2547,
1297,
13,
29937,
28697,
304,
1065,
937,
1243,
9853,
267,
12430,
13,
3166,
3667,
29879,
29889,
5317,
1053,
9801,
29918,
2922,
17357,
29918,
28586,
29918,
28997,
13,
13,
13383,
13383,
7346,
2277,
13,
2277,
29937,
308,
20969,
24492,
11842,
9331,
4706,
835,
13,
13383,
13383,
7346,
2277,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
5323,
1144,
402,
2190,
1904,
297,
10772,
29911,
25350,
29889,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
10141,
742,
1134,
29922,
710,
29892,
2322,
2433,
21970,
742,
19995,
29922,
1839,
21970,
742,
525,
29883,
6191,
7464,
13,
462,
1678,
1371,
2433,
22256,
4742,
3441,
29915,
21970,
29905,
742,
470,
320,
29915,
29883,
6191,
29905,
1495,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1188,
29918,
5563,
742,
1134,
29922,
710,
29892,
2322,
2433,
8382,
742,
19995,
29922,
1839,
8382,
742,
525,
3888,
742,
525,
27392,
742,
525,
2704,
742,
525,
9695,
936,
7464,
13,
462,
1678,
1371,
2433,
4381,
1480,
3233,
3441,
29915,
8382,
29905,
742,
320,
29915,
3888,
29905,
742,
320,
29915,
27392,
29905,
742,
320,
29915,
2704,
20333,
470,
320,
29915,
9695,
936,
29905,
1495,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29570,
415,
29918,
10568,
742,
1134,
29922,
710,
29892,
2322,
2433,
12333,
742,
13,
462,
1678,
1371,
2433,
4299,
1423,
3149,
304,
367,
7500,
3441,
29915,
12333,
20333,
470,
851,
470,
938,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
26776,
742,
1134,
29922,
524,
29892,
2322,
29922,
29946,
29906,
29892,
13,
462,
1678,
1371,
2433,
8172,
1176,
4097,
16717,
995,
313,
4381,
29901,
29871,
29946,
29906,
29897,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
29899,
1509,
29918,
22379,
29918,
6979,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
361,
731,
674,
671,
3132,
29918,
344,
1037,
1372,
29889,
3126,
304,
4511,
304,
5087,
22850,
29892,
1683,
674,
2244,
363,
4817,
775,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
3389,
29918,
2029,
635,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
1678,
1371,
2433,
15581,
1818,
367,
2198,
304,
1369,
1887,
2734,
313,
8245,
937,
1209,
1065,
29897,
1495,
13,
29937,
1570,
402,
29928,
4401,
3876,
313,
29872,
29889,
29887,
29889,
5591,
29923,
29392,
29914,
20656,
29950,
29914,
3217,
4574,
1660,
29903,
29914,
29896,
29900,
386,
9444,
4156,
448,
498,
6656,
29914,
1349,
6656,
29954,
10486,
1159,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29887,
21594,
29918,
4716,
742,
1134,
29922,
710,
29892,
2322,
2433,
5150,
742,
13,
462,
1678,
1371,
2433,
15954,
852,
607,
5087,
22850,
674,
367,
1304,
408,
263,
8635,
9224,
313,
650,
310,
376,
10532,
284,
613,
376,
5150,
1159,
1495,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
13383,
13383,
7346,
2277,
13,
2277,
29937,
268,
16738,
17250,
2133,
268,
835,
13,
13383,
13383,
7346,
2277,
13,
3389,
29918,
2029,
635,
353,
5852,
13,
361,
297,
29918,
1333,
19273,
580,
322,
451,
6389,
29889,
3389,
29918,
2029,
635,
29901,
13,
1678,
1065,
29918,
2029,
635,
353,
7700,
29871,
396,
1887,
6057,
526,
8560,
1998,
15004,
6057,
313,
392,
4550,
8638,
29897,
13,
359,
29889,
21813,
1839,
29911,
4717,
1177,
29918,
25838,
2033,
353,
525,
2997,
29915,
565,
1065,
29918,
2029,
635,
1683,
525,
5464,
2997,
29915,
13,
13,
29937,
3553,
310,
5087,
22850,
4138,
304,
367,
5545,
408,
2060,
3876,
13,
29937,
259,
448,
4817,
29901,
278,
4152,
7899,
674,
367,
1304,
363,
266,
6656,
8635,
313,
578,
694,
3876,
1735,
723,
367,
2309,
29897,
13,
29937,
259,
448,
7333,
29901,
266,
6656,
8635,
338,
2768,
263,
2323,
3884,
310,
590,
7333,
5087,
22850,
6660,
445,
1178,
1818,
367,
4944,
13,
9274,
29918,
4632,
353,
6213,
565,
6389,
29889,
29887,
21594,
29918,
4716,
1275,
525,
5150,
29915,
1683,
525,
29896,
29906,
29902,
29875,
8353,
29903,
29876,
29926,
29953,
29878,
29955,
29967,
29881,
29953,
29953,
29979,
29916,
29920,
29941,
29999,
29999,
29911,
29876,
29929,
29638,
29956,
29899,
29984,
29876,
339,
29915,
13,
13,
29937,
5399,
565,
2734,
2768,
1530,
370,
470,
476,
351,
6234,
13,
361,
525,
3608,
29889,
1054,
370,
29915,
297,
10876,
29889,
7576,
470,
525,
3608,
29889,
1054,
370,
29915,
297,
851,
29898,
657,
29918,
666,
1656,
3101,
470,
525,
15032,
2882,
29918,
29954,
7056,
29915,
297,
2897,
29889,
21813,
29901,
13,
1678,
2279,
29918,
6272,
353,
525,
1054,
370,
29915,
13,
1678,
1887,
29918,
29887,
21594,
29918,
4632,
353,
8207,
3051,
29914,
21594,
29914,
3421,
29928,
4401,
29915,
13,
1678,
1065,
29918,
2029,
635,
353,
7700,
13,
23681,
525,
29968,
10051,
29954,
1307,
29918,
29968,
1001,
29940,
6670,
29918,
29934,
3904,
29918,
11116,
29915,
297,
2897,
29889,
21813,
29901,
13,
1678,
2279,
29918,
6272,
353,
525,
29895,
351,
6234,
29915,
13,
1678,
1887,
29918,
29887,
21594,
29918,
4632,
353,
8207,
29895,
351,
6234,
29914,
22899,
29914,
14207,
29928,
4401,
29915,
13,
1678,
1065,
29918,
2029,
635,
353,
7700,
13,
2870,
29901,
13,
1678,
2279,
29918,
6272,
353,
525,
15269,
29915,
13,
1678,
1887,
29918,
29887,
21594,
29918,
4632,
353,
8207,
5184,
29914,
496,
279,
10718,
29914,
29925,
3376,
2817,
25119,
29914,
29887,
550,
29899,
26533,
6294,
29887,
21594,
29915,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2997,
29918,
29887,
21594,
29918,
4632,
1125,
13,
4706,
1065,
29918,
2029,
635,
353,
7700,
13,
4706,
1887,
29918,
29887,
21594,
29918,
4632,
353,
8207,
1287,
3493,
29914,
14207,
29928,
4401,
29915,
29871,
396,
13426,
29889,
1794,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2997,
29918,
29887,
21594,
29918,
4632,
1125,
13,
9651,
1887,
29918,
29887,
21594,
29918,
4632,
353,
1881,
877,
2997,
29918,
29887,
21594,
29918,
4632,
353,
25710,
13,
9294,
2897,
29889,
2084,
29889,
9933,
29898,
2997,
29918,
29887,
21594,
29918,
4632,
511,
285,
29915,
2997,
29918,
29887,
21594,
29918,
4632,
3790,
2997,
29918,
29887,
21594,
29918,
4632,
29913,
6058,
18322,
18783,
29915,
13,
359,
29889,
21813,
1839,
29911,
4717,
1177,
29918,
5746,
11206,
29918,
25838,
2033,
353,
2279,
29918,
6272,
13,
13,
29937,
5399,
565,
22796,
338,
3625,
13,
4258,
29918,
10141,
353,
4842,
305,
29889,
10141,
877,
29883,
6191,
29901,
29900,
29915,
565,
525,
29883,
6191,
29915,
1275,
6389,
29889,
10141,
322,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
580,
1683,
525,
21970,
1495,
13,
359,
29889,
21813,
1839,
29911,
4717,
1177,
29918,
5746,
11206,
29918,
2287,
29963,
2033,
353,
851,
29898,
4258,
29918,
10141,
29897,
13,
13,
29937,
3617,
1480,
3233,
13,
1188,
29918,
5563,
353,
6389,
29889,
1188,
29918,
5563,
13,
359,
29889,
21813,
1839,
29911,
4717,
1177,
29918,
14480,
29918,
1307,
29963,
6670,
2033,
353,
1480,
29918,
5563,
13,
13,
29937,
830,
5498,
455,
29890,
1793,
13,
26776,
353,
2315,
950,
2008,
287,
1123,
5498,
15520,
29889,
11288,
29918,
26776,
29898,
5085,
29889,
26776,
29897,
13,
13,
13383,
13383,
7346,
2277,
13,
2277,
29937,
29871,
402,
29928,
4401,
12745,
973,
17250,
2133,
29871,
835,
13,
13383,
13383,
7346,
2277,
13,
29937,
259,
448,
4529,
12745,
973,
12924,
304,
16254,
411,
2066,
29914,
8771,
414,
1090,
278,
3876,
4138,
373,
5087,
22850,
13,
361,
2279,
29918,
6272,
1275,
525,
1054,
370,
2396,
13,
1678,
396,
1530,
370,
22101,
338,
263,
12430,
29899,
16476,
287,
22101,
29889,
4124,
627,
29879,
411,
7531,
6570,
5717,
29889,
13,
1678,
18920,
353,
1530,
370,
10547,
973,
29898,
617,
2547,
1297,
29922,
1625,
370,
29907,
2547,
1297,
3101,
13,
1678,
23138,
353,
1530,
370,
12924,
29889,
4632,
29898,
29883,
2547,
1297,
29918,
272,
29918,
5847,
29922,
5847,
29897,
13,
23681,
1065,
29918,
2029,
635,
29901,
13,
1678,
396,
9959,
22101,
313,
6500,
1711,
697,
3884,
1090,
2183,
3876,
467,
4124,
627,
29879,
411,
7531,
6570,
5717,
29889,
13,
1678,
18920,
353,
9959,
10547,
973,
29898,
617,
2547,
1297,
29922,
7717,
29907,
2547,
1297,
29898,
2997,
29918,
4632,
29922,
2997,
29918,
29887,
21594,
29918,
4632,
876,
13,
1678,
23138,
353,
9959,
12924,
29889,
4632,
29898,
29883,
2547,
1297,
29918,
272,
29918,
5847,
29922,
5847,
29897,
13,
2870,
29901,
13,
1678,
396,
5240,
866,
22101,
29889,
4124,
627,
29879,
3025,
5087,
29928,
4401,
3450,
5717,
29889,
13,
1678,
671,
29918,
22379,
29918,
6979,
353,
6389,
29889,
1509,
29918,
22379,
29918,
6979,
13,
1678,
1018,
29901,
13,
4706,
671,
29918,
22379,
29918,
6979,
353,
671,
29918,
22379,
29918,
6979,
470,
7700,
13,
1678,
5174,
4408,
2392,
29901,
13,
4706,
671,
29918,
22379,
29918,
6979,
353,
1065,
29918,
2029,
635,
13,
1678,
330,
29883,
2547,
1297,
353,
402,
29928,
4401,
29907,
2547,
1297,
29898,
2997,
29918,
29887,
21594,
29918,
4632,
29922,
2997,
29918,
29887,
21594,
29918,
4632,
29892,
671,
29918,
1124,
29918,
8173,
29922,
5574,
29892,
2767,
29918,
11944,
9409,
29922,
5574,
29892,
13,
462,
632,
671,
29918,
22379,
29918,
6979,
29922,
1509,
29918,
22379,
29918,
6979,
29897,
13,
1678,
18920,
353,
402,
29928,
4401,
10547,
973,
29898,
27354,
2547,
1297,
29922,
27354,
2547,
1297,
29897,
13,
1678,
23138,
353,
402,
29928,
4401,
12924,
29889,
4632,
29898,
29883,
2547,
1297,
29918,
272,
29918,
5847,
29922,
5847,
29892,
2767,
29918,
8173,
29922,
5574,
29892,
9570,
29918,
4632,
29922,
9274,
29918,
4632,
29897,
13,
29937,
259,
448,
4529,
16800,
1014,
29899,
8771,
414,
310,
3876,
4138,
13,
29937,
1596,
29898,
3126,
29889,
29881,
17204,
29898,
29887,
4632,
29889,
1491,
8771,
414,
29892,
29536,
29922,
29946,
876,
13,
14538,
1691,
29918,
29887,
4632,
353,
23138,
29889,
1491,
12083,
29918,
1609,
29918,
978,
877,
16390,
294,
1691,
1495,
13,
9794,
29918,
29887,
4632,
353,
23138,
29889,
1491,
12083,
29918,
1609,
29918,
978,
877,
23785,
1495,
13,
28586,
29918,
29887,
4632,
353,
23138,
29889,
1491,
12083,
29918,
1609,
29918,
978,
877,
9824,
29879,
1495,
13,
29937,
259,
448,
9801,
393,
1788,
322,
22889,
23849,
17525,
1863,
322,
505,
278,
1959,
4079,
2066,
13,
276,
16145,
29918,
28586,
353,
9801,
29918,
2922,
17357,
29918,
28586,
29918,
28997,
29898,
28586,
29918,
29887,
4632,
29892,
4889,
29918,
276,
4282,
29922,
8824,
29897,
13,
361,
337,
16145,
29918,
28586,
322,
2279,
29918,
6272,
2804,
525,
15269,
2396,
13,
1678,
23138,
29889,
5847,
29889,
21707,
29889,
9695,
936,
877,
9824,
29879,
337,
16145,
29991,
11814,
262,
1218,
3017,
1889,
1286,
29889,
1495,
13,
1678,
2897,
29889,
21174,
29898,
359,
29889,
657,
5935,
3285,
29871,
29929,
29897,
13,
2
] |
algo/test/test_maximum_cut.py | ssavinash1/Algorithm_stanford | 24 | 3553 | # -*- coding: utf-8 -*-
import unittest
from src.graph import Graph
from src.maximum_cut import maximum_cut, maximum_cut_for_bipartite_graph
class MaximumCut(unittest.TestCase):
def test_maximum_cut_for_bipartite_graphs(self):
""" Given the following bipartite graph.
(a)-----(b)
\
\----(c)
(d)-----(e)
/
(f)----/
\
\----(g)
"""
g = Graph.build(edges=[('a', 'b'), ('a', 'c'),
('d', 'e'), ('f', 'e'), ('f', 'g')],
directed=False)
(left, right) = maximum_cut_for_bipartite_graph(g)
self.assertIn(len(left), [3,4], 'either 3 or 4')
self.assertIn(len(right), [3,4], 'eighter 3 or 4')
self.assertEqual(7, len(left)+len(right), 'no vertex counted twice')
def test_maximum_cut_for_larger_bipartite_graphs(self):
""" A sligthly larger graph:
(a) (c)
| \ /|
| x |
| / \ |
(b) (d)
| \ /|
| x |
| / \ |
(e) (f)
"""
g = Graph.build(edges=[('a', 'b'), ('a', 'd'), ('c', 'b'), ('c', 'd'),
('b', 'e'), ('b', 'f'), ('d', 'e'), ('d', 'f')],
directed=False)
(left, right) = maximum_cut_for_bipartite_graph(g)
self.assertIn(set(left), [set(['a', 'c', 'e', 'f']), set(['b', 'd'])])
self.assertIn(set(right), [set(['a', 'c', 'e', 'f']), set(['b', 'd'])])
self.assertNotEqual(left, right, 'not the same subsets')
def test_maximum_cut(self):
""" Given a graph:
(u)----(v)
| \ / |
| \/ |
| /\ |
| / \ |
(w)---(x)
"""
g = Graph.build(edges=[
('u', 'v'), ('u', 'w'), ('u', 'x'), ('v', 'x'),('w', 'x')],
directed=False)
(left, right) = maximum_cut(g)
expected = [{'u', 'v'}, {'w', 'x'}, {'x', 'u'}, {'w', 'v'}]
self.assertNotEqual(left, right, 'no common vertices between cuts')
self.assertIn(set(left), expected, 'should correctly split the graph')
self.assertIn(set(right), expected, 'should correctly split the graph')
def test_weighted_maximum_cut(self):
""" Given the following weighted graph.
(u)-3-(v)
| \ / |
| 5\/1 4
2 /\ |
| / \ |
(w)-6-(x)
"""
g = Graph.build(edges=[
('u', 'v', 3), ('u', 'w', 2), ('u', 'x', 5),
('v', 'x', 4),('w', 'x', 6)],
directed=False)
(left, right) = maximum_cut(g)
self.assertEqual(2, len(left), 'left should contain 2 vertices')
self.assertEqual(2, len(right), 'right should contain 2 vertices')
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
443,
27958,
13,
13,
3166,
4765,
29889,
4262,
1053,
12367,
13,
3166,
4765,
29889,
27525,
398,
29918,
7582,
1053,
7472,
29918,
7582,
29892,
7472,
29918,
7582,
29918,
1454,
29918,
29890,
27494,
568,
29918,
4262,
13,
13,
13,
1990,
5918,
12539,
29907,
329,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
27525,
398,
29918,
7582,
29918,
1454,
29918,
29890,
27494,
568,
29918,
4262,
29879,
29898,
1311,
1125,
13,
4706,
9995,
11221,
278,
1494,
289,
27494,
568,
3983,
29889,
13,
9651,
313,
29874,
29897,
807,
17722,
29890,
29897,
13,
795,
320,
13,
1669,
320,
807,
29898,
29883,
29897,
13,
9651,
313,
29881,
29897,
807,
17722,
29872,
29897,
13,
462,
1678,
847,
13,
9651,
313,
29888,
29897,
807,
29914,
13,
795,
320,
13,
1669,
320,
807,
29898,
29887,
29897,
13,
4706,
9995,
13,
4706,
330,
353,
12367,
29889,
4282,
29898,
287,
2710,
11759,
877,
29874,
742,
525,
29890,
5477,
6702,
29874,
742,
525,
29883,
5477,
13,
462,
1669,
6702,
29881,
742,
525,
29872,
5477,
6702,
29888,
742,
525,
29872,
5477,
6702,
29888,
742,
525,
29887,
1495,
1402,
13,
462,
4706,
10624,
29922,
8824,
29897,
13,
4706,
313,
1563,
29892,
1492,
29897,
353,
7472,
29918,
7582,
29918,
1454,
29918,
29890,
27494,
568,
29918,
4262,
29898,
29887,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
2435,
29898,
1563,
511,
518,
29941,
29892,
29946,
1402,
525,
29872,
2121,
29871,
29941,
470,
29871,
29946,
1495,
13,
4706,
1583,
29889,
9294,
797,
29898,
2435,
29898,
1266,
511,
518,
29941,
29892,
29946,
1402,
525,
29872,
14643,
29871,
29941,
470,
29871,
29946,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29955,
29892,
7431,
29898,
1563,
7240,
2435,
29898,
1266,
511,
525,
1217,
12688,
29115,
8951,
1495,
13,
13,
1678,
822,
1243,
29918,
27525,
398,
29918,
7582,
29918,
1454,
29918,
4675,
914,
29918,
29890,
27494,
568,
29918,
4262,
29879,
29898,
1311,
1125,
13,
4706,
9995,
319,
2243,
335,
386,
368,
7200,
3983,
29901,
13,
4706,
313,
29874,
29897,
259,
313,
29883,
29897,
13,
308,
891,
320,
29871,
847,
29989,
13,
308,
891,
29871,
921,
29871,
891,
13,
308,
891,
847,
320,
891,
13,
4706,
313,
29890,
29897,
259,
313,
29881,
29897,
13,
308,
891,
320,
29871,
847,
29989,
13,
308,
891,
29871,
921,
29871,
891,
13,
308,
891,
847,
320,
891,
13,
4706,
313,
29872,
29897,
259,
313,
29888,
29897,
13,
4706,
9995,
13,
4706,
330,
353,
12367,
29889,
4282,
29898,
287,
2710,
11759,
877,
29874,
742,
525,
29890,
5477,
6702,
29874,
742,
525,
29881,
5477,
6702,
29883,
742,
525,
29890,
5477,
6702,
29883,
742,
525,
29881,
5477,
13,
462,
1669,
6702,
29890,
742,
525,
29872,
5477,
6702,
29890,
742,
525,
29888,
5477,
6702,
29881,
742,
525,
29872,
5477,
6702,
29881,
742,
525,
29888,
1495,
1402,
13,
462,
4706,
10624,
29922,
8824,
29897,
13,
4706,
313,
1563,
29892,
1492,
29897,
353,
7472,
29918,
7582,
29918,
1454,
29918,
29890,
27494,
568,
29918,
4262,
29898,
29887,
29897,
13,
4706,
1583,
29889,
9294,
797,
29898,
842,
29898,
1563,
511,
518,
842,
18959,
29874,
742,
525,
29883,
742,
525,
29872,
742,
525,
29888,
2033,
511,
731,
18959,
29890,
742,
525,
29881,
11287,
2314,
13,
4706,
1583,
29889,
9294,
797,
29898,
842,
29898,
1266,
511,
518,
842,
18959,
29874,
742,
525,
29883,
742,
525,
29872,
742,
525,
29888,
2033,
511,
731,
18959,
29890,
742,
525,
29881,
11287,
2314,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
1563,
29892,
1492,
29892,
525,
1333,
278,
1021,
27639,
1495,
13,
13,
1678,
822,
1243,
29918,
27525,
398,
29918,
7582,
29898,
1311,
1125,
13,
4706,
9995,
11221,
263,
3983,
29901,
13,
4706,
313,
29884,
29897,
807,
29898,
29894,
29897,
13,
308,
891,
320,
29871,
847,
891,
13,
308,
891,
29871,
320,
29914,
29871,
891,
13,
308,
891,
29871,
18826,
29871,
891,
13,
308,
891,
847,
29871,
320,
891,
13,
4706,
313,
29893,
29897,
5634,
29898,
29916,
29897,
13,
13,
4706,
9995,
13,
4706,
330,
353,
12367,
29889,
4282,
29898,
287,
2710,
11759,
13,
9651,
6702,
29884,
742,
525,
29894,
5477,
6702,
29884,
742,
525,
29893,
5477,
6702,
29884,
742,
525,
29916,
5477,
6702,
29894,
742,
525,
29916,
5477,
877,
29893,
742,
525,
29916,
1495,
1402,
13,
9651,
10624,
29922,
8824,
29897,
13,
4706,
313,
1563,
29892,
1492,
29897,
353,
7472,
29918,
7582,
29898,
29887,
29897,
13,
4706,
3806,
353,
518,
10998,
29884,
742,
525,
29894,
16675,
11117,
29893,
742,
525,
29916,
16675,
11117,
29916,
742,
525,
29884,
16675,
11117,
29893,
742,
525,
29894,
29915,
6525,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
1563,
29892,
1492,
29892,
525,
1217,
3619,
13791,
1546,
5700,
29879,
1495,
13,
4706,
1583,
29889,
9294,
797,
29898,
842,
29898,
1563,
511,
3806,
29892,
525,
9344,
5149,
6219,
278,
3983,
1495,
13,
4706,
1583,
29889,
9294,
797,
29898,
842,
29898,
1266,
511,
3806,
29892,
525,
9344,
5149,
6219,
278,
3983,
1495,
13,
13,
1678,
822,
1243,
29918,
7915,
287,
29918,
27525,
398,
29918,
7582,
29898,
1311,
1125,
13,
4706,
9995,
11221,
278,
1494,
7688,
287,
3983,
29889,
13,
9651,
313,
29884,
6817,
29941,
17722,
29894,
29897,
13,
632,
891,
320,
29871,
847,
891,
13,
632,
891,
29871,
29945,
25558,
29896,
29871,
29946,
13,
795,
29906,
29871,
18826,
29871,
891,
13,
632,
891,
847,
29871,
320,
891,
13,
9651,
313,
29893,
6817,
29953,
17722,
29916,
29897,
13,
4706,
9995,
13,
4706,
330,
353,
12367,
29889,
4282,
29898,
287,
2710,
11759,
13,
18884,
6702,
29884,
742,
525,
29894,
742,
29871,
29941,
511,
6702,
29884,
742,
525,
29893,
742,
29871,
29906,
511,
6702,
29884,
742,
525,
29916,
742,
29871,
29945,
511,
13,
18884,
6702,
29894,
742,
525,
29916,
742,
29871,
29946,
511,
877,
29893,
742,
525,
29916,
742,
29871,
29953,
29897,
1402,
13,
9651,
10624,
29922,
8824,
29897,
13,
4706,
313,
1563,
29892,
1492,
29897,
353,
7472,
29918,
7582,
29898,
29887,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29906,
29892,
7431,
29898,
1563,
511,
525,
1563,
881,
1712,
29871,
29906,
13791,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29906,
29892,
7431,
29898,
1266,
511,
525,
1266,
881,
1712,
29871,
29906,
13791,
1495,
13,
2
] |
backoffice/business_logic/group.py | MedPy-C/backend | 0 | 123178 | from django.forms import model_to_dict
from backoffice import models
from backoffice.utils.constant import Status, RoleLevel
from backoffice.utils.exceptions import EntityNotFound, UnAuthorized, IsNotOwner
class GroupLogic():
"""
Group business logic.
Methods:
create(): create a new group
list(): list all of group that the user it's part of.
retrieve(): get a data from a single group
update(): update the group
delete(): perform a soft delete
"""
def __init__(self):
self.fields = ['name', 'slug_name', 'about']
def create(self, request, user_login_code, group_data):
"""
create function of group model
:param user_login_code: uuid
:param group_data: serialized data of group
:return: if no errors present does not raise exceptions.
"""
user = models.UserLogin.objects.get_user_by_code(user_login_code)
if not user:
raise EntityNotFound(
f'User with code {user_login_code} not found'
)
group_model = models.Group()
membership_model = models.Membership()
group_model.name = group_data.get('name')
group_model.slug_name = group_data.get('slug_name')
group_model.about = group_data.get('about')
group_model.status = Status.ACTIVE.value
saved_group = models.Group.objects.save(group_model)
membership_model.group = saved_group
membership_model.status = Status.ACTIVE.value
membership_model.role = RoleLevel.OWNER.value
membership_model.user = user
saved_membership = models.Membership.objects.save(membership_model)
def list(self, request, user_login_code):
"""
list user group by user code
:param user_login_code: uuid
:return: a list of dict with data of the group that the user it is part of.
"""
user = models.UserLogin.objects.get_user_by_code(user_login_code)
if not user:
raise EntityNotFound(
f'User with code {user_login_code} not found.'
)
groups = models.Group.objects.get_all_groups(user_login_code)
group_list = []
for group in groups:
group_list.append(self.__mapped_group(group))
return group_list
def retrieve(self, request, user_login_code, slug_name):
"""
retrive only one group,
:param user_login_code: uuid
:param slug_name: slug name of the group
:return: a dict with data of the selected group.
"""
user = models.UserLogin.objects.get_user_by_code(user_login_code)
if not user:
raise EntityNotFound(
f'User with code {user_login_code} not found.'
)
group = models.Group.objects.get_group_by_group_slug_name(user_login_code, slug_name)
if not group:
raise EntityNotFound(
f'Group with code {slug_name} not found.'
)
return self.__mapped_group_detailed(group)
def update(self, login_user_code, slug_name, group_data):
user = models.UserLogin.objects.get_user_by_code(login_user_code)
if not user:
raise EntityNotFound(
f'User with code {login_user_code} not found'
)
group = models.Group.objects.get_group_by_group_slug_name(login_user_code, slug_name)
if not group:
raise EntityNotFound(
f'Group with slug name {slug_name} not found.'
)
role = models.Membership.objects.get_member_role_by_user_code_group_slug_name(login_user_code, slug_name)
for x in role:
print(x['role'])
if x['role'] != RoleLevel.OWNER.value:
raise UnAuthorized(
f'User with code {login_user_code} does not have the privileges to perform that action.'
)
group.name = group_data.get('name')
group.slug_name = group_data.get('slug_name')
group.about = group_data.get('about')
# if is_owner
group_saved = models.Group.objects.save(group)
return self.__mapped_group(group_saved)
def delete(self, request, login_user_code, slug_name):
user = models.UserLogin.objects.get_user_by_code(login_user_code)
if not user:
raise EntityNotFound(
f'User with code {login_user_code} not found'
)
group = models.Group.objects.get_group_by_group_slug_name(login_user_code, slug_name)
if not group:
raise EntityNotFound(
f'Group with slug name {slug_name} not found.'
)
role = models.Membership.objects.get_member_role_by_user_code_group_slug_name(login_user_code, slug_name)
for x in role:
print(x['role'])
if x['role'] != RoleLevel.OWNER.value:
raise UnAuthorized(
f'User with code {login_user_code} does not have the privileges to perform that action.'
)
models.Group.objects.delete(group)
def __mapped_group_detailed(self, group):
"""
we map from group object to a dict with data of group
:param group: python class object
:return: dict with more detailed data of group.
"""
group_dict = model_to_dict(group, fields=self.fields)
group_dict['group_code'] = str(group.group_code)
group_dict['created_at'] = str(group.created_at)
group_dict['is_verified'] = str(group.is_verified)
group_dict['is_public'] = str(group.is_public)
return group_dict
def __mapped_group(self, group):
"""
we map from group object to a dict with data of group
:param group: python class object
:return: dict with data of group.
"""
group_dict = model_to_dict(group, fields=self.fields)
group_dict['group_code'] = str(group.group_code)
return group_dict
| [
1,
515,
9557,
29889,
9514,
1053,
1904,
29918,
517,
29918,
8977,
13,
13,
3166,
1250,
20205,
1053,
4733,
13,
3166,
1250,
20205,
29889,
13239,
29889,
23362,
1053,
16034,
29892,
1528,
280,
10108,
13,
3166,
1250,
20205,
29889,
13239,
29889,
11739,
29879,
1053,
14945,
17413,
29892,
853,
13720,
1891,
29892,
1317,
3664,
28213,
13,
13,
13,
1990,
6431,
3403,
293,
7295,
13,
1678,
9995,
13,
1678,
6431,
5381,
5900,
29889,
13,
1678,
8108,
29879,
29901,
13,
4706,
1653,
7295,
1653,
263,
716,
2318,
13,
4706,
1051,
7295,
1051,
599,
310,
2318,
393,
278,
1404,
372,
29915,
29879,
760,
310,
29889,
13,
4706,
10563,
7295,
679,
263,
848,
515,
263,
2323,
2318,
13,
4706,
2767,
7295,
2767,
278,
2318,
13,
4706,
5217,
7295,
2189,
263,
4964,
5217,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
9621,
353,
6024,
978,
742,
525,
29517,
29918,
978,
742,
525,
12717,
2033,
13,
13,
1678,
822,
1653,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
7507,
29918,
401,
29892,
2318,
29918,
1272,
1125,
13,
4706,
9995,
13,
4706,
1653,
740,
310,
2318,
1904,
13,
4706,
584,
3207,
1404,
29918,
7507,
29918,
401,
29901,
318,
5416,
13,
4706,
584,
3207,
2318,
29918,
1272,
29901,
7797,
1891,
848,
310,
2318,
13,
4706,
584,
2457,
29901,
565,
694,
4436,
2198,
947,
451,
12020,
15283,
29889,
13,
4706,
9995,
13,
13,
4706,
1404,
353,
4733,
29889,
2659,
11049,
29889,
12650,
29889,
657,
29918,
1792,
29918,
1609,
29918,
401,
29898,
1792,
29918,
7507,
29918,
401,
29897,
13,
4706,
565,
451,
1404,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
2659,
411,
775,
426,
1792,
29918,
7507,
29918,
401,
29913,
451,
1476,
29915,
13,
9651,
1723,
13,
4706,
2318,
29918,
4299,
353,
4733,
29889,
4782,
580,
13,
4706,
28512,
29918,
4299,
353,
4733,
29889,
29924,
1590,
10475,
580,
13,
13,
4706,
2318,
29918,
4299,
29889,
978,
353,
2318,
29918,
1272,
29889,
657,
877,
978,
1495,
13,
4706,
2318,
29918,
4299,
29889,
29517,
29918,
978,
353,
2318,
29918,
1272,
29889,
657,
877,
29517,
29918,
978,
1495,
13,
4706,
2318,
29918,
4299,
29889,
12717,
353,
2318,
29918,
1272,
29889,
657,
877,
12717,
1495,
13,
4706,
2318,
29918,
4299,
29889,
4882,
353,
16034,
29889,
17923,
18474,
29889,
1767,
13,
4706,
7160,
29918,
2972,
353,
4733,
29889,
4782,
29889,
12650,
29889,
7620,
29898,
2972,
29918,
4299,
29897,
13,
13,
4706,
28512,
29918,
4299,
29889,
2972,
353,
7160,
29918,
2972,
13,
4706,
28512,
29918,
4299,
29889,
4882,
353,
16034,
29889,
17923,
18474,
29889,
1767,
13,
4706,
28512,
29918,
4299,
29889,
12154,
353,
1528,
280,
10108,
29889,
9806,
13865,
29889,
1767,
13,
4706,
28512,
29918,
4299,
29889,
1792,
353,
1404,
13,
4706,
7160,
29918,
29885,
1590,
10475,
353,
4733,
29889,
29924,
1590,
10475,
29889,
12650,
29889,
7620,
29898,
29885,
1590,
10475,
29918,
4299,
29897,
13,
13,
1678,
822,
1051,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
7507,
29918,
401,
1125,
13,
4706,
9995,
13,
4706,
1051,
1404,
2318,
491,
1404,
775,
13,
4706,
584,
3207,
1404,
29918,
7507,
29918,
401,
29901,
318,
5416,
13,
4706,
584,
2457,
29901,
263,
1051,
310,
9657,
411,
848,
310,
278,
2318,
393,
278,
1404,
372,
338,
760,
310,
29889,
13,
4706,
9995,
13,
13,
4706,
1404,
353,
4733,
29889,
2659,
11049,
29889,
12650,
29889,
657,
29918,
1792,
29918,
1609,
29918,
401,
29898,
1792,
29918,
7507,
29918,
401,
29897,
13,
4706,
565,
451,
1404,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
2659,
411,
775,
426,
1792,
29918,
7507,
29918,
401,
29913,
451,
1476,
6169,
13,
9651,
1723,
13,
4706,
6471,
353,
4733,
29889,
4782,
29889,
12650,
29889,
657,
29918,
497,
29918,
13155,
29898,
1792,
29918,
7507,
29918,
401,
29897,
13,
4706,
2318,
29918,
1761,
353,
5159,
13,
4706,
363,
2318,
297,
6471,
29901,
13,
9651,
2318,
29918,
1761,
29889,
4397,
29898,
1311,
17255,
655,
2986,
29918,
2972,
29898,
2972,
876,
13,
4706,
736,
2318,
29918,
1761,
13,
13,
1678,
822,
10563,
29898,
1311,
29892,
2009,
29892,
1404,
29918,
7507,
29918,
401,
29892,
2243,
688,
29918,
978,
1125,
13,
4706,
9995,
13,
4706,
3240,
4401,
871,
697,
2318,
29892,
13,
4706,
584,
3207,
1404,
29918,
7507,
29918,
401,
29901,
318,
5416,
13,
4706,
584,
3207,
2243,
688,
29918,
978,
29901,
2243,
688,
1024,
310,
278,
2318,
13,
4706,
584,
2457,
29901,
263,
9657,
411,
848,
310,
278,
4629,
2318,
29889,
13,
4706,
9995,
13,
13,
4706,
1404,
353,
4733,
29889,
2659,
11049,
29889,
12650,
29889,
657,
29918,
1792,
29918,
1609,
29918,
401,
29898,
1792,
29918,
7507,
29918,
401,
29897,
13,
4706,
565,
451,
1404,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
2659,
411,
775,
426,
1792,
29918,
7507,
29918,
401,
29913,
451,
1476,
6169,
13,
9651,
1723,
13,
4706,
2318,
353,
4733,
29889,
4782,
29889,
12650,
29889,
657,
29918,
2972,
29918,
1609,
29918,
2972,
29918,
29517,
29918,
978,
29898,
1792,
29918,
7507,
29918,
401,
29892,
2243,
688,
29918,
978,
29897,
13,
4706,
565,
451,
2318,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
4782,
411,
775,
426,
29517,
29918,
978,
29913,
451,
1476,
6169,
13,
9651,
1723,
13,
4706,
736,
1583,
17255,
655,
2986,
29918,
2972,
29918,
29881,
11881,
29898,
2972,
29897,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
6464,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
29892,
2318,
29918,
1272,
1125,
13,
13,
4706,
1404,
353,
4733,
29889,
2659,
11049,
29889,
12650,
29889,
657,
29918,
1792,
29918,
1609,
29918,
401,
29898,
7507,
29918,
1792,
29918,
401,
29897,
13,
4706,
565,
451,
1404,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
2659,
411,
775,
426,
7507,
29918,
1792,
29918,
401,
29913,
451,
1476,
29915,
13,
9651,
1723,
13,
4706,
2318,
353,
4733,
29889,
4782,
29889,
12650,
29889,
657,
29918,
2972,
29918,
1609,
29918,
2972,
29918,
29517,
29918,
978,
29898,
7507,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
29897,
13,
4706,
565,
451,
2318,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
4782,
411,
2243,
688,
1024,
426,
29517,
29918,
978,
29913,
451,
1476,
6169,
13,
9651,
1723,
13,
4706,
6297,
353,
4733,
29889,
29924,
1590,
10475,
29889,
12650,
29889,
657,
29918,
14242,
29918,
12154,
29918,
1609,
29918,
1792,
29918,
401,
29918,
2972,
29918,
29517,
29918,
978,
29898,
7507,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
29897,
13,
4706,
363,
921,
297,
6297,
29901,
13,
9651,
1596,
29898,
29916,
1839,
12154,
11287,
13,
9651,
565,
921,
1839,
12154,
2033,
2804,
1528,
280,
10108,
29889,
9806,
13865,
29889,
1767,
29901,
13,
18884,
12020,
853,
13720,
1891,
29898,
13,
462,
1678,
285,
29915,
2659,
411,
775,
426,
7507,
29918,
1792,
29918,
401,
29913,
947,
451,
505,
278,
28091,
304,
2189,
393,
3158,
6169,
13,
18884,
1723,
13,
4706,
2318,
29889,
978,
353,
2318,
29918,
1272,
29889,
657,
877,
978,
1495,
13,
4706,
2318,
29889,
29517,
29918,
978,
353,
2318,
29918,
1272,
29889,
657,
877,
29517,
29918,
978,
1495,
13,
4706,
2318,
29889,
12717,
353,
2318,
29918,
1272,
29889,
657,
877,
12717,
1495,
13,
4706,
396,
565,
338,
29918,
20348,
13,
4706,
2318,
29918,
17314,
353,
4733,
29889,
4782,
29889,
12650,
29889,
7620,
29898,
2972,
29897,
13,
4706,
736,
1583,
17255,
655,
2986,
29918,
2972,
29898,
2972,
29918,
17314,
29897,
13,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
29892,
6464,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
1125,
13,
13,
4706,
1404,
353,
4733,
29889,
2659,
11049,
29889,
12650,
29889,
657,
29918,
1792,
29918,
1609,
29918,
401,
29898,
7507,
29918,
1792,
29918,
401,
29897,
13,
4706,
565,
451,
1404,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
2659,
411,
775,
426,
7507,
29918,
1792,
29918,
401,
29913,
451,
1476,
29915,
13,
9651,
1723,
13,
4706,
2318,
353,
4733,
29889,
4782,
29889,
12650,
29889,
657,
29918,
2972,
29918,
1609,
29918,
2972,
29918,
29517,
29918,
978,
29898,
7507,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
29897,
13,
4706,
565,
451,
2318,
29901,
13,
9651,
12020,
14945,
17413,
29898,
13,
18884,
285,
29915,
4782,
411,
2243,
688,
1024,
426,
29517,
29918,
978,
29913,
451,
1476,
6169,
13,
9651,
1723,
13,
4706,
6297,
353,
4733,
29889,
29924,
1590,
10475,
29889,
12650,
29889,
657,
29918,
14242,
29918,
12154,
29918,
1609,
29918,
1792,
29918,
401,
29918,
2972,
29918,
29517,
29918,
978,
29898,
7507,
29918,
1792,
29918,
401,
29892,
2243,
688,
29918,
978,
29897,
13,
4706,
363,
921,
297,
6297,
29901,
13,
9651,
1596,
29898,
29916,
1839,
12154,
11287,
13,
9651,
565,
921,
1839,
12154,
2033,
2804,
1528,
280,
10108,
29889,
9806,
13865,
29889,
1767,
29901,
13,
18884,
12020,
853,
13720,
1891,
29898,
13,
462,
1678,
285,
29915,
2659,
411,
775,
426,
7507,
29918,
1792,
29918,
401,
29913,
947,
451,
505,
278,
28091,
304,
2189,
393,
3158,
6169,
13,
18884,
1723,
13,
4706,
4733,
29889,
4782,
29889,
12650,
29889,
8143,
29898,
2972,
29897,
13,
13,
1678,
822,
4770,
655,
2986,
29918,
2972,
29918,
29881,
11881,
29898,
1311,
29892,
2318,
1125,
13,
4706,
9995,
13,
4706,
591,
2910,
515,
2318,
1203,
304,
263,
9657,
411,
848,
310,
2318,
13,
4706,
584,
3207,
2318,
29901,
3017,
770,
1203,
13,
4706,
584,
2457,
29901,
9657,
411,
901,
13173,
848,
310,
2318,
29889,
13,
4706,
9995,
13,
4706,
2318,
29918,
8977,
353,
1904,
29918,
517,
29918,
8977,
29898,
2972,
29892,
4235,
29922,
1311,
29889,
9621,
29897,
13,
4706,
2318,
29918,
8977,
1839,
2972,
29918,
401,
2033,
353,
851,
29898,
2972,
29889,
2972,
29918,
401,
29897,
13,
4706,
2318,
29918,
8977,
1839,
11600,
29918,
271,
2033,
353,
851,
29898,
2972,
29889,
11600,
29918,
271,
29897,
13,
4706,
2318,
29918,
8977,
1839,
275,
29918,
369,
2164,
2033,
353,
851,
29898,
2972,
29889,
275,
29918,
369,
2164,
29897,
13,
4706,
2318,
29918,
8977,
1839,
275,
29918,
3597,
2033,
353,
851,
29898,
2972,
29889,
275,
29918,
3597,
29897,
13,
4706,
736,
2318,
29918,
8977,
13,
13,
1678,
822,
4770,
655,
2986,
29918,
2972,
29898,
1311,
29892,
2318,
1125,
13,
4706,
9995,
13,
4706,
591,
2910,
515,
2318,
1203,
304,
263,
9657,
411,
848,
310,
2318,
13,
4706,
584,
3207,
2318,
29901,
3017,
770,
1203,
13,
4706,
584,
2457,
29901,
9657,
411,
848,
310,
2318,
29889,
13,
4706,
9995,
13,
4706,
2318,
29918,
8977,
353,
1904,
29918,
517,
29918,
8977,
29898,
2972,
29892,
4235,
29922,
1311,
29889,
9621,
29897,
13,
4706,
2318,
29918,
8977,
1839,
2972,
29918,
401,
2033,
353,
851,
29898,
2972,
29889,
2972,
29918,
401,
29897,
13,
4706,
736,
2318,
29918,
8977,
13,
2
] |
tests/previs/test_track.py | MehmetErer/anima | 101 | 85958 | <filename>tests/previs/test_track.py
# -*- coding: utf-8 -*-
import unittest
from anima.edit import Track, Clip, File
class TrackTestCase(unittest.TestCase):
"""tests the anima.previs.Track class
"""
def test_to_xml_method_is_working_properly(self):
"""testing if the to xml method is working properly
"""
t = Track()
t.enabled = True
t.locked = False
# clip 1
f = File()
f.duration = 34
f.name = 'shot2'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
c = Clip()
c.id = 'shot2'
c.start = 1
c.end = 35
c.name = 'shot2'
c.enabled = True
c.duration = 34
c.in_ = 0
c.out = 34
c.file = f
t.clips.append(c)
# clip 2
f = File()
f.duration = 30
f.name = 'shot'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot.mov'
c = Clip()
c.id = 'shot'
c.start = 35
c.end = 65
c.name = 'shot'
c.enabled = True
c.duration = 30
c.in_ = 0
c.out = 30
c.file = f
t.clips.append(c)
# clip 3
f = File()
f.duration = 45
f.name = 'shot1'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov'
c = Clip()
c.id = 'shot1'
c.start = 65
c.end = 110
c.name = 'shot1'
c.enabled = True
c.duration = 45
c.in_ = 0
c.out = 45
c.file = f
t.clips.append(c)
expected_xml = \
"""<track>
<locked>FALSE</locked>
<enabled>TRUE</enabled>
<clipitem id="shot2">
<end>35</end>
<name>shot2</name>
<enabled>True</enabled>
<start>1</start>
<in>0</in>
<duration>34</duration>
<out>34</out>
<file id="shot2.mov">
<duration>34</duration>
<name>shot2</name>
<pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl>
</file>
</clipitem>
<clipitem id="shot">
<end>65</end>
<name>shot</name>
<enabled>True</enabled>
<start>35</start>
<in>0</in>
<duration>30</duration>
<out>30</out>
<file id="shot.mov">
<duration>30</duration>
<name>shot</name>
<pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot.mov</pathurl>
</file>
</clipitem>
<clipitem id="shot1">
<end>110</end>
<name>shot1</name>
<enabled>True</enabled>
<start>65</start>
<in>0</in>
<duration>45</duration>
<out>45</out>
<file id="shot1.mov">
<duration>45</duration>
<name>shot1</name>
<pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov</pathurl>
</file>
</clipitem>
</track>"""
self.assertEqual(
expected_xml,
t.to_xml()
)
def test_from_xml_method_is_working_properly(self):
"""testing if the from_xml method will fill object attributes from the
given xml node
"""
from xml.etree import ElementTree
track_node = ElementTree.Element('track')
locked_node = ElementTree.SubElement(track_node, 'locked')
locked_node.text = 'FALSE'
enabled_node = ElementTree.SubElement(track_node, 'enabled')
enabled_node.text = 'TRUE'
# clip1
clip_node = ElementTree.SubElement(track_node, 'clipitem',
attrib={'id': 'shot2'})
end_node = ElementTree.SubElement(clip_node, 'end')
end_node.text = '35'
name_node = ElementTree.SubElement(clip_node, 'name')
name_node.text = 'shot2'
enabled_node = ElementTree.SubElement(clip_node, 'enabled')
enabled_node.text = 'True'
start_node = ElementTree.SubElement(clip_node, 'start')
start_node.text = '1'
in_node = ElementTree.SubElement(clip_node, 'in')
in_node.text = '0'
duration_node = ElementTree.SubElement(clip_node, 'duration')
duration_node.text = '34'
out_node = ElementTree.SubElement(clip_node, 'out')
out_node.text = '34'
file_node = ElementTree.SubElement(clip_node, 'file')
duration_node = ElementTree.SubElement(file_node, 'duration')
duration_node.text = '34'
name_node = ElementTree.SubElement(file_node, 'name')
name_node.text = 'shot2'
pathurl_node = ElementTree.SubElement(file_node, 'pathurl')
pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
pathurl_node.text = pathurl
# clip2
clip_node = ElementTree.SubElement(track_node, 'clipitem',
attrib={'id': 'shot'})
end_node = ElementTree.SubElement(clip_node, 'end')
end_node.text = '65'
name_node = ElementTree.SubElement(clip_node, 'name')
name_node.text = 'shot'
enabled_node = ElementTree.SubElement(clip_node, 'enabled')
enabled_node.text = 'True'
start_node = ElementTree.SubElement(clip_node, 'start')
start_node.text = '35'
in_node = ElementTree.SubElement(clip_node, 'in')
in_node.text = '0'
duration_node = ElementTree.SubElement(clip_node, 'duration')
duration_node.text = '30'
out_node = ElementTree.SubElement(clip_node, 'out')
out_node.text = '30'
file_node = ElementTree.SubElement(clip_node, 'file')
duration_node = ElementTree.SubElement(file_node, 'duration')
duration_node.text = '30'
name_node = ElementTree.SubElement(file_node, 'name')
name_node.text = 'shot'
pathurl_node = ElementTree.SubElement(file_node, 'pathurl')
pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot.mov'
pathurl_node.text = pathurl
# clip3
clip_node = ElementTree.SubElement(track_node, 'clipitem',
attrib={'id': 'shot1'})
end_node = ElementTree.SubElement(clip_node, 'end')
end_node.text = '110'
name_node = ElementTree.SubElement(clip_node, 'name')
name_node.text = 'shot1'
enabled_node = ElementTree.SubElement(clip_node, 'enabled')
enabled_node.text = 'True'
start_node = ElementTree.SubElement(clip_node, 'start')
start_node.text = '65'
in_node = ElementTree.SubElement(clip_node, 'in')
in_node.text = '0'
duration_node = ElementTree.SubElement(clip_node, 'duration')
duration_node.text = '45'
out_node = ElementTree.SubElement(clip_node, 'out')
out_node.text = '45'
file_node = ElementTree.SubElement(clip_node, 'file')
duration_node = ElementTree.SubElement(file_node, 'duration')
duration_node.text = '45'
name_node = ElementTree.SubElement(file_node, 'name')
name_node.text = 'shot1'
pathurl_node = ElementTree.SubElement(file_node, 'pathurl')
pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov'
pathurl_node.text = pathurl
t = Track()
t.from_xml(track_node)
self.assertEqual(False, t.locked)
self.assertEqual(True, t.enabled)
# clip1
c = t.clips[0]
self.assertEqual(35, c.end)
self.assertEqual('shot2', c.name)
self.assertEqual(True, c.enabled)
self.assertEqual(1, c.start)
self.assertEqual(0, c.in_)
self.assertEqual(34, c.duration)
self.assertEqual(34, c.out)
f = c.file
self.assertEqual(34, f.duration)
self.assertEqual('shot2', f.name)
self.assertEqual(
'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov',
f.pathurl
)
# clip2
c = t.clips[1]
self.assertEqual(65, c.end)
self.assertEqual('shot', c.name)
self.assertEqual(True, c.enabled)
self.assertEqual(35, c.start)
self.assertEqual(0, c.in_)
self.assertEqual(30, c.duration)
self.assertEqual(30, c.out)
f = c.file
self.assertEqual(30, f.duration)
self.assertEqual('shot', f.name)
self.assertEqual(
'file://localhost/home/eoyilmaz/maya/projects/default/data/shot.mov',
f.pathurl
)
# clip3
c = t.clips[2]
self.assertEqual(110, c.end)
self.assertEqual('shot1', c.name)
self.assertEqual(True, c.enabled)
self.assertEqual(65, c.start)
self.assertEqual(0, c.in_)
self.assertEqual(45, c.duration)
self.assertEqual(45, c.out)
f = c.file
self.assertEqual(45, f.duration)
self.assertEqual('shot1', f.name)
self.assertEqual(
'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov',
f.pathurl
)
def test_optimize_clips_is_working_properly(self):
"""testing if the optimize_clips method will optimize the clips to use
the same file node if the file pathurls are same
"""
t = Track()
t.enabled = True
t.locked = False
# clip 1
f = File()
f.duration = 34
f.name = 'shot2'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
c = Clip()
c.id = 'shot2'
c.start = 1
c.end = 35
c.name = 'shot2'
c.enabled = True
c.duration = 34
c.in_ = 0
c.out = 34
c.file = f
t.clips.append(c)
# clip 2
f = File()
f.duration = 30
f.name = 'shot'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
c = Clip()
c.id = 'shot'
c.start = 35
c.end = 65
c.name = 'shot'
c.enabled = True
c.duration = 30
c.in_ = 0
c.out = 30
c.file = f
t.clips.append(c)
# clip 3
f = File()
f.duration = 45
f.name = 'shot1'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov'
c = Clip()
c.id = 'shot1'
c.start = 65
c.end = 110
c.name = 'shot1'
c.enabled = True
c.duration = 45
c.in_ = 0
c.out = 45
c.file = f
t.clips.append(c)
# check if the file objects are different
self.assertNotEqual(t.clips[0].file, t.clips[1].file)
self.assertNotEqual(t.clips[0].file, t.clips[2].file)
self.assertNotEqual(t.clips[1].file, t.clips[2].file)
# now optimize the clips
t.optimize_clips()
# check if the file[0] and file[1] is the same file node
# and the file[2] is different than the others
self.assertEqual(t.clips[0].file, t.clips[1].file)
self.assertNotEqual(t.clips[0].file, t.clips[2].file)
self.assertNotEqual(t.clips[1].file, t.clips[2].file)
def test_to_xml_method_with_optimized_clips_is_working_properly(self):
"""testing if the to xml method is working properly with the clips are
optimized
"""
t = Track()
t.enabled = True
t.locked = False
# clip 1
f = File()
f.duration = 34
f.name = 'shot2'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
c = Clip()
c.id = 'shot2'
c.start = 1
c.end = 35
c.name = 'shot2'
c.enabled = True
c.duration = 34
c.in_ = 0
c.out = 34
c.file = f
t.clips.append(c)
# clip 2
f = File()
f.duration = 30
f.name = 'shot'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'
c = Clip()
c.id = 'shot2'
c.start = 35
c.end = 65
c.name = 'shot2'
c.enabled = True
c.duration = 30
c.in_ = 0
c.out = 30
c.file = f
t.clips.append(c)
# clip 3
f = File()
f.duration = 45
f.name = 'shot1'
f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov'
c = Clip()
c.id = 'shot1'
c.start = 65
c.end = 110
c.name = 'shot1'
c.enabled = True
c.duration = 45
c.in_ = 0
c.out = 45
c.file = f
t.clips.append(c)
expected_xml = \
"""<track>
<locked>FALSE</locked>
<enabled>TRUE</enabled>
<clipitem id="shot2">
<end>35</end>
<name>shot2</name>
<enabled>True</enabled>
<start>1</start>
<in>0</in>
<duration>34</duration>
<out>34</out>
<file id="shot2.mov">
<duration>34</duration>
<name>shot2</name>
<pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl>
</file>
</clipitem>
<clipitem id="shot2 2">
<end>65</end>
<name>shot2</name>
<enabled>True</enabled>
<start>35</start>
<in>0</in>
<duration>30</duration>
<out>30</out>
<file id="shot2.mov"/>
</clipitem>
<clipitem id="shot1">
<end>110</end>
<name>shot1</name>
<enabled>True</enabled>
<start>65</start>
<in>0</in>
<duration>45</duration>
<out>45</out>
<file id="shot1.mov">
<duration>45</duration>
<name>shot1</name>
<pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov</pathurl>
</file>
</clipitem>
</track>"""
t.optimize_clips()
self.assertEqual(
expected_xml,
t.to_xml()
)
| [
1,
529,
9507,
29958,
21150,
29914,
1457,
1730,
29914,
1688,
29918,
11294,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
443,
27958,
13,
3166,
385,
2946,
29889,
5628,
1053,
17026,
29892,
315,
3466,
29892,
3497,
13,
13,
13,
1990,
17026,
3057,
8259,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
21150,
278,
385,
2946,
29889,
1457,
1730,
29889,
17936,
770,
13,
1678,
9995,
13,
13,
1678,
822,
1243,
29918,
517,
29918,
3134,
29918,
5696,
29918,
275,
29918,
22899,
29918,
771,
546,
368,
29898,
1311,
1125,
13,
4706,
9995,
13424,
565,
278,
304,
4903,
1158,
338,
1985,
6284,
13,
4706,
9995,
13,
4706,
260,
353,
17026,
580,
13,
4706,
260,
29889,
17590,
353,
5852,
13,
4706,
260,
29889,
29113,
353,
7700,
13,
13,
4706,
396,
20102,
29871,
29896,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29896,
13,
4706,
274,
29889,
355,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29906,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29941,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29896,
29896,
29900,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
3806,
29918,
3134,
353,
320,
13,
9651,
9995,
29966,
11294,
29958,
13,
29871,
529,
29113,
29958,
25717,
829,
29113,
29958,
13,
29871,
529,
17590,
29958,
20652,
829,
17590,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
29906,
1013,
13,
1678,
529,
355,
29958,
29941,
29945,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
29906,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29896,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29941,
29946,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29941,
29946,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29906,
29889,
13529,
1013,
13,
418,
529,
19708,
29958,
29941,
29946,
829,
19708,
29958,
13,
418,
529,
978,
29958,
8962,
29906,
829,
978,
29958,
13,
418,
529,
2084,
2271,
29958,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
829,
2084,
2271,
29958,
13,
1678,
1533,
1445,
29958,
13,
29871,
1533,
24049,
667,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
1013,
13,
1678,
529,
355,
29958,
29953,
29945,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29941,
29945,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29941,
29900,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29941,
29900,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29889,
13529,
1013,
13,
418,
529,
19708,
29958,
29941,
29900,
829,
19708,
29958,
13,
418,
529,
978,
29958,
8962,
829,
978,
29958,
13,
418,
529,
2084,
2271,
29958,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29889,
13529,
829,
2084,
2271,
29958,
13,
1678,
1533,
1445,
29958,
13,
29871,
1533,
24049,
667,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
29896,
1013,
13,
1678,
529,
355,
29958,
29896,
29896,
29900,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
29896,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29953,
29945,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29946,
29945,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29946,
29945,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29896,
29889,
13529,
1013,
13,
418,
529,
19708,
29958,
29946,
29945,
829,
19708,
29958,
13,
418,
529,
978,
29958,
8962,
29896,
829,
978,
29958,
13,
418,
529,
2084,
2271,
29958,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
829,
2084,
2271,
29958,
13,
1678,
1533,
1445,
29958,
13,
29871,
1533,
24049,
667,
29958,
13,
829,
11294,
11903,
15945,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
3806,
29918,
3134,
29892,
13,
9651,
260,
29889,
517,
29918,
3134,
580,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
3166,
29918,
3134,
29918,
5696,
29918,
275,
29918,
22899,
29918,
771,
546,
368,
29898,
1311,
1125,
13,
4706,
9995,
13424,
565,
278,
515,
29918,
3134,
1158,
674,
5445,
1203,
8393,
515,
278,
13,
4706,
2183,
4903,
2943,
13,
4706,
9995,
13,
4706,
515,
4903,
29889,
300,
929,
1053,
10619,
9643,
13,
4706,
5702,
29918,
3177,
353,
10619,
9643,
29889,
2642,
877,
11294,
1495,
13,
4706,
22822,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
11294,
29918,
3177,
29892,
525,
29113,
1495,
13,
4706,
22822,
29918,
3177,
29889,
726,
353,
525,
25717,
29915,
13,
4706,
9615,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
11294,
29918,
3177,
29892,
525,
17590,
1495,
13,
4706,
9615,
29918,
3177,
29889,
726,
353,
525,
20652,
29915,
13,
13,
4706,
396,
20102,
29896,
13,
4706,
20102,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
11294,
29918,
3177,
29892,
525,
24049,
667,
742,
13,
462,
462,
965,
1098,
1091,
3790,
29915,
333,
2396,
525,
8962,
29906,
29915,
1800,
13,
4706,
1095,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
355,
1495,
13,
4706,
1095,
29918,
3177,
29889,
726,
353,
525,
29941,
29945,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29906,
29915,
13,
4706,
9615,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
17590,
1495,
13,
4706,
9615,
29918,
3177,
29889,
726,
353,
525,
5574,
29915,
13,
4706,
1369,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
2962,
1495,
13,
4706,
1369,
29918,
3177,
29889,
726,
353,
525,
29896,
29915,
13,
4706,
297,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
262,
1495,
13,
4706,
297,
29918,
3177,
29889,
726,
353,
525,
29900,
29915,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29941,
29946,
29915,
13,
4706,
714,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
449,
1495,
13,
4706,
714,
29918,
3177,
29889,
726,
353,
525,
29941,
29946,
29915,
13,
13,
4706,
934,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
1445,
1495,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29941,
29946,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29906,
29915,
13,
4706,
2224,
2271,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
2084,
2271,
1495,
13,
13,
4706,
2224,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
4706,
2224,
2271,
29918,
3177,
29889,
726,
353,
2224,
2271,
13,
13,
4706,
396,
20102,
29906,
13,
4706,
20102,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
11294,
29918,
3177,
29892,
525,
24049,
667,
742,
13,
462,
462,
965,
1098,
1091,
3790,
29915,
333,
2396,
525,
8962,
29915,
1800,
13,
4706,
1095,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
355,
1495,
13,
4706,
1095,
29918,
3177,
29889,
726,
353,
525,
29953,
29945,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29915,
13,
4706,
9615,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
17590,
1495,
13,
4706,
9615,
29918,
3177,
29889,
726,
353,
525,
5574,
29915,
13,
4706,
1369,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
2962,
1495,
13,
4706,
1369,
29918,
3177,
29889,
726,
353,
525,
29941,
29945,
29915,
13,
4706,
297,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
262,
1495,
13,
4706,
297,
29918,
3177,
29889,
726,
353,
525,
29900,
29915,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29941,
29900,
29915,
13,
4706,
714,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
449,
1495,
13,
4706,
714,
29918,
3177,
29889,
726,
353,
525,
29941,
29900,
29915,
13,
13,
4706,
934,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
1445,
1495,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29941,
29900,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29915,
13,
4706,
2224,
2271,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
2084,
2271,
1495,
13,
13,
4706,
2224,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29889,
13529,
29915,
13,
4706,
2224,
2271,
29918,
3177,
29889,
726,
353,
2224,
2271,
13,
13,
4706,
396,
20102,
29941,
13,
4706,
20102,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
11294,
29918,
3177,
29892,
525,
24049,
667,
742,
13,
462,
462,
965,
1098,
1091,
3790,
29915,
333,
2396,
525,
8962,
29896,
29915,
1800,
13,
4706,
1095,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
355,
1495,
13,
4706,
1095,
29918,
3177,
29889,
726,
353,
525,
29896,
29896,
29900,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29896,
29915,
13,
4706,
9615,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
17590,
1495,
13,
4706,
9615,
29918,
3177,
29889,
726,
353,
525,
5574,
29915,
13,
4706,
1369,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
2962,
1495,
13,
4706,
1369,
29918,
3177,
29889,
726,
353,
525,
29953,
29945,
29915,
13,
4706,
297,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
262,
1495,
13,
4706,
297,
29918,
3177,
29889,
726,
353,
525,
29900,
29915,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29946,
29945,
29915,
13,
4706,
714,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
449,
1495,
13,
4706,
714,
29918,
3177,
29889,
726,
353,
525,
29946,
29945,
29915,
13,
13,
4706,
934,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
24049,
29918,
3177,
29892,
525,
1445,
1495,
13,
4706,
14385,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
19708,
1495,
13,
4706,
14385,
29918,
3177,
29889,
726,
353,
525,
29946,
29945,
29915,
13,
4706,
1024,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
978,
1495,
13,
4706,
1024,
29918,
3177,
29889,
726,
353,
525,
8962,
29896,
29915,
13,
4706,
2224,
2271,
29918,
3177,
353,
10619,
9643,
29889,
4035,
2642,
29898,
1445,
29918,
3177,
29892,
525,
2084,
2271,
1495,
13,
13,
4706,
2224,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
29915,
13,
4706,
2224,
2271,
29918,
3177,
29889,
726,
353,
2224,
2271,
13,
13,
4706,
260,
353,
17026,
580,
13,
4706,
260,
29889,
3166,
29918,
3134,
29898,
11294,
29918,
3177,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8824,
29892,
260,
29889,
29113,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5574,
29892,
260,
29889,
17590,
29897,
13,
13,
4706,
396,
20102,
29896,
13,
4706,
274,
353,
260,
29889,
11303,
567,
29961,
29900,
29962,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29945,
29892,
274,
29889,
355,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
29906,
742,
274,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5574,
29892,
274,
29889,
17590,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29896,
29892,
274,
29889,
2962,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29900,
29892,
274,
29889,
262,
19925,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29946,
29892,
274,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29946,
29892,
274,
29889,
449,
29897,
13,
13,
4706,
285,
353,
274,
29889,
1445,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29946,
29892,
285,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
29906,
742,
285,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
742,
13,
9651,
285,
29889,
2084,
2271,
13,
4706,
1723,
13,
13,
4706,
396,
20102,
29906,
13,
4706,
274,
353,
260,
29889,
11303,
567,
29961,
29896,
29962,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29953,
29945,
29892,
274,
29889,
355,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
742,
274,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5574,
29892,
274,
29889,
17590,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29945,
29892,
274,
29889,
2962,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29900,
29892,
274,
29889,
262,
19925,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29900,
29892,
274,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29900,
29892,
274,
29889,
449,
29897,
13,
13,
4706,
285,
353,
274,
29889,
1445,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29941,
29900,
29892,
285,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
742,
285,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29889,
13529,
742,
13,
9651,
285,
29889,
2084,
2271,
13,
4706,
1723,
13,
13,
4706,
396,
20102,
29941,
13,
4706,
274,
353,
260,
29889,
11303,
567,
29961,
29906,
29962,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29896,
29896,
29900,
29892,
274,
29889,
355,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
29896,
742,
274,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5574,
29892,
274,
29889,
17590,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29953,
29945,
29892,
274,
29889,
2962,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29900,
29892,
274,
29889,
262,
19925,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29946,
29945,
29892,
274,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29946,
29945,
29892,
274,
29889,
449,
29897,
13,
13,
4706,
285,
353,
274,
29889,
1445,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29946,
29945,
29892,
285,
29889,
19708,
29897,
13,
4706,
1583,
29889,
9294,
9843,
877,
8962,
29896,
742,
285,
29889,
978,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
742,
13,
9651,
285,
29889,
2084,
2271,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
20640,
675,
29918,
11303,
567,
29918,
275,
29918,
22899,
29918,
771,
546,
368,
29898,
1311,
1125,
13,
4706,
9995,
13424,
565,
278,
24656,
29918,
11303,
567,
1158,
674,
24656,
278,
9335,
567,
304,
671,
13,
4706,
278,
1021,
934,
2943,
565,
278,
934,
2224,
26045,
526,
1021,
13,
4706,
9995,
13,
4706,
260,
353,
17026,
580,
13,
4706,
260,
29889,
17590,
353,
5852,
13,
4706,
260,
29889,
29113,
353,
7700,
13,
13,
4706,
396,
20102,
29871,
29896,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29896,
13,
4706,
274,
29889,
355,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29906,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29941,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29896,
29896,
29900,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
1423,
565,
278,
934,
3618,
526,
1422,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29900,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29896,
1822,
1445,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29900,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29906,
1822,
1445,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29896,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29906,
1822,
1445,
29897,
13,
13,
4706,
396,
1286,
24656,
278,
9335,
567,
13,
4706,
260,
29889,
20640,
675,
29918,
11303,
567,
580,
13,
13,
4706,
396,
1423,
565,
278,
934,
29961,
29900,
29962,
322,
934,
29961,
29896,
29962,
338,
278,
1021,
934,
2943,
13,
4706,
396,
322,
278,
934,
29961,
29906,
29962,
338,
1422,
1135,
278,
4045,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29900,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29896,
1822,
1445,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29900,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29906,
1822,
1445,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29873,
29889,
11303,
567,
29961,
29896,
1822,
1445,
29892,
260,
29889,
11303,
567,
29961,
29906,
1822,
1445,
29897,
13,
13,
1678,
822,
1243,
29918,
517,
29918,
3134,
29918,
5696,
29918,
2541,
29918,
20640,
1891,
29918,
11303,
567,
29918,
275,
29918,
22899,
29918,
771,
546,
368,
29898,
1311,
1125,
13,
4706,
9995,
13424,
565,
278,
304,
4903,
1158,
338,
1985,
6284,
411,
278,
9335,
567,
526,
13,
4706,
27545,
13,
4706,
9995,
13,
4706,
260,
353,
17026,
580,
13,
4706,
260,
29889,
17590,
353,
5852,
13,
4706,
260,
29889,
29113,
353,
7700,
13,
13,
4706,
396,
20102,
29871,
29896,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29896,
13,
4706,
274,
29889,
355,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29946,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29906,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29941,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29906,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29941,
29900,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
396,
20102,
29871,
29941,
13,
4706,
285,
353,
3497,
580,
13,
4706,
285,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
285,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
285,
29889,
2084,
2271,
353,
525,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
29915,
13,
13,
4706,
274,
353,
315,
3466,
580,
13,
4706,
274,
29889,
333,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
2962,
353,
29871,
29953,
29945,
13,
4706,
274,
29889,
355,
353,
29871,
29896,
29896,
29900,
13,
4706,
274,
29889,
978,
353,
525,
8962,
29896,
29915,
13,
4706,
274,
29889,
17590,
353,
5852,
13,
4706,
274,
29889,
19708,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
262,
29918,
353,
29871,
29900,
13,
4706,
274,
29889,
449,
353,
29871,
29946,
29945,
13,
4706,
274,
29889,
1445,
353,
285,
13,
13,
4706,
260,
29889,
11303,
567,
29889,
4397,
29898,
29883,
29897,
13,
13,
4706,
3806,
29918,
3134,
353,
320,
13,
9651,
9995,
29966,
11294,
29958,
13,
29871,
529,
29113,
29958,
25717,
829,
29113,
29958,
13,
29871,
529,
17590,
29958,
20652,
829,
17590,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
29906,
1013,
13,
1678,
529,
355,
29958,
29941,
29945,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
29906,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29896,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29941,
29946,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29941,
29946,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29906,
29889,
13529,
1013,
13,
418,
529,
19708,
29958,
29941,
29946,
829,
19708,
29958,
13,
418,
529,
978,
29958,
8962,
29906,
829,
978,
29958,
13,
418,
529,
2084,
2271,
29958,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29906,
29889,
13529,
829,
2084,
2271,
29958,
13,
1678,
1533,
1445,
29958,
13,
29871,
1533,
24049,
667,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
29906,
29871,
29906,
1013,
13,
1678,
529,
355,
29958,
29953,
29945,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
29906,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29941,
29945,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29941,
29900,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29941,
29900,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29906,
29889,
13529,
4681,
13,
29871,
1533,
24049,
667,
29958,
13,
29871,
529,
24049,
667,
1178,
543,
8962,
29896,
1013,
13,
1678,
529,
355,
29958,
29896,
29896,
29900,
829,
355,
29958,
13,
1678,
529,
978,
29958,
8962,
29896,
829,
978,
29958,
13,
1678,
529,
17590,
29958,
5574,
829,
17590,
29958,
13,
1678,
529,
2962,
29958,
29953,
29945,
829,
2962,
29958,
13,
1678,
529,
262,
29958,
29900,
829,
262,
29958,
13,
1678,
529,
19708,
29958,
29946,
29945,
829,
19708,
29958,
13,
1678,
529,
449,
29958,
29946,
29945,
829,
449,
29958,
13,
1678,
529,
1445,
1178,
543,
8962,
29896,
29889,
13529,
1013,
13,
418,
529,
19708,
29958,
29946,
29945,
829,
19708,
29958,
13,
418,
529,
978,
29958,
8962,
29896,
829,
978,
29958,
13,
418,
529,
2084,
2271,
29958,
1445,
597,
7640,
29914,
5184,
29914,
29872,
12602,
309,
16986,
29914,
29885,
9010,
29914,
16418,
29914,
4381,
29914,
1272,
29914,
8962,
29896,
29889,
13529,
829,
2084,
2271,
29958,
13,
1678,
1533,
1445,
29958,
13,
29871,
1533,
24049,
667,
29958,
13,
829,
11294,
11903,
15945,
13,
13,
4706,
260,
29889,
20640,
675,
29918,
11303,
567,
580,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
3806,
29918,
3134,
29892,
13,
9651,
260,
29889,
517,
29918,
3134,
580,
13,
4706,
1723,
13,
2
] |
functions.py | QijingMa/COGS18-Final-Project | 0 | 45429 | """A collection of function for doing my project."""
import time
import random
#Background Introduction
def Intro():
print("Hello, how are you doing after the long journey? ")
time.sleep(2)
print("You are now at Pallet Town,Kanto.")
time.sleep(2)
print("A place where is abounded with amazing creatures we call -Pokemon ")
time.sleep(2)
print("Here pokemon and people work and live together peacefully")
time.sleep(2)
print("I am Professor Oak, a Pokemon researcher. ")
time.sleep(2.5)
print("Now it is your time to start your new own adventure.")
time.sleep(2)
print("Before you go, I have some gifts for you ")
time.sleep(2)
print("I have three adorable Pokemon for you. You can pick one of them as your friend! ")
time.sleep(3)
print()
def choosePokemon():#a function that allow user choose a pokemon and store its value
""" """
Pokemon=""
while Pokemon != "charmander" and Pokemon != "squirtle" and Pokemon != "bulbasaur":#allow user choose again if the input is not one of the three
Pokemon = input("Which Pokemon would you like to choose (Charmander or Squirtle or Bulbasaur): ")
Pokemon = Pokemon.lower()#allow user to put lower capital input
return Pokemon
def chooseSkill1():#choose a Skill and store the value
Skill1= ""
while Skill1 !="bubble"and Skill1!= "aqua tail":#choose again if input is not one of two skill
Skill1 = input("Which Skill will you use against? (Bubble or Aqua Tail): ")
Skill1 = Skill1.lower() #allow lower case
return Skill1
def checkPath1(chosenSkill1):#show the result of choice of skill
print("OK....")
time.sleep(2)
print("if this is your final decision")
time.sleep(2)
print("Let's see what will happen")
print()
time.sleep(2)
List_1=["bubble","aqua tail"]
correctchoice=random.choice(List_1)#allow random choice so that every time the result will be random
if chosenSkill1 == correctchoice :
print("Oh, that skill seems super effective.")
print("The enemy is down, you win your first fight!")
print("Exp+100, Gold+50")
else:
print("What a pity")
print("You missed!")
print("The enemy fight back and you lose=_=")
def chooseSkill2():
"""WHAT DOES THIS DO."""
Skill2= ""
while Skill2!="Ember"and Skill2!="Flame Charge":
Skill2 = input("Which Skill will you use against? (Ember or Flame Charge): ")
return Skill2
def checkPath2(chosenSkill2):
print("OK....")
time.sleep(2)
print("if this is your final decision")
time.sleep(2)
print("Let's see what will happen")
print()
time.sleep(2)
List_1=["Ember","Flame Charge"]
correctchoice=random.choice(List_1)
if chosenSkill2 == correctchoice :
print("Oh, that skill seems super effective.")
print("The enemy is down, you win your first fight!")
print("Exp+100, Gold+50")
else:
print("What a pity")
print("You missed!")
print("The enemy fight back and you lose=_=")
def chooseSkill3():
Skill3= ""
while Skill3!="Seed Bomb"and Skill3!="Wine Whip":
Skill3 = input("Which Skill will you use against? (Seed Bomb or Wine Whip): ")
return Skill3
def checkPath3(chosenSkill3):
print("OK....")
time.sleep(2)
print("if this is your final decision")
time.sleep(2)
print("Let's see what will happen")
print()
time.sleep(2)
List_1=["Wine Whip","Seed Bomb"]
correctchoice=random.choice(List_1)
if chosenSkill3 == correctchoice :
print("Oh, that skill seems super effective.")
print("The enemy is down, you win your first fight!")
print("Exp+100, Gold+50")
else:
print("What a pity")
print("You missed!")
print("The enemy fight back and you lose=_=")
| [
1,
9995,
29909,
4333,
310,
740,
363,
2599,
590,
2060,
1213,
15945,
13,
13,
5215,
931,
29871,
13,
5215,
4036,
13,
13,
29937,
10581,
27576,
13,
1753,
3159,
307,
7295,
13,
268,
13,
1678,
1596,
703,
10994,
29892,
920,
526,
366,
2599,
1156,
278,
1472,
16342,
29973,
16521,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
3492,
526,
1286,
472,
3793,
1026,
8421,
30214,
29968,
5361,
23157,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
29909,
2058,
988,
338,
633,
7261,
411,
21863,
292,
907,
3698,
591,
1246,
448,
29925,
554,
9857,
16521,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
10605,
11293,
9857,
322,
2305,
664,
322,
5735,
4208,
10776,
3730,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
29902,
626,
11386,
24132,
29892,
263,
21747,
9857,
5925,
261,
29889,
16521,
13,
1678,
931,
29889,
17059,
29898,
29906,
29889,
29945,
29897,
13,
1678,
1596,
703,
10454,
372,
338,
596,
931,
304,
1369,
596,
716,
1914,
17623,
545,
23157,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
18743,
366,
748,
29892,
306,
505,
777,
330,
17741,
363,
366,
16521,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
29902,
505,
2211,
594,
272,
519,
21747,
9857,
363,
366,
29889,
887,
508,
5839,
697,
310,
963,
408,
596,
5121,
29991,
29871,
16521,
13,
1678,
931,
29889,
17059,
29898,
29941,
29897,
13,
1678,
1596,
580,
13,
268,
13,
13,
13,
1753,
6755,
29925,
554,
9857,
7295,
29937,
29874,
740,
393,
2758,
1404,
6755,
263,
11293,
9857,
322,
3787,
967,
995,
13,
1678,
9995,
259,
9995,
13,
268,
13,
1678,
21747,
9857,
13776,
13,
1678,
1550,
21747,
9857,
2804,
376,
305,
2817,
3825,
29908,
322,
21747,
9857,
2804,
376,
26613,
2728,
280,
29908,
322,
21747,
9857,
2804,
376,
8645,
6500,
6698,
1115,
29937,
9536,
1404,
6755,
1449,
565,
278,
1881,
338,
451,
697,
310,
278,
2211,
13,
308,
13,
4706,
21747,
9857,
353,
1881,
703,
8809,
436,
21747,
9857,
723,
366,
763,
304,
6755,
313,
1451,
2817,
3825,
470,
317,
339,
2728,
280,
470,
8313,
6500,
6698,
1125,
16521,
13,
4706,
21747,
9857,
353,
21747,
9857,
29889,
13609,
580,
29937,
9536,
1404,
304,
1925,
5224,
7483,
1881,
13,
4706,
13,
1678,
736,
21747,
9857,
29871,
13,
539,
13,
268,
13,
1753,
6755,
15797,
453,
29896,
7295,
29937,
21803,
263,
4971,
453,
322,
3787,
278,
995,
13,
268,
13,
1678,
4971,
453,
29896,
29922,
5124,
13,
1678,
1550,
4971,
453,
29896,
1738,
543,
29890,
23232,
29908,
392,
4971,
453,
29896,
19216,
376,
18463,
29874,
12464,
1115,
29937,
21803,
1449,
565,
1881,
338,
451,
697,
310,
1023,
19911,
13,
308,
13,
4706,
4971,
453,
29896,
353,
1881,
703,
8809,
436,
4971,
453,
674,
366,
671,
2750,
29973,
313,
29933,
23232,
470,
16020,
29874,
323,
737,
1125,
16521,
13,
4706,
4971,
453,
29896,
353,
4971,
453,
29896,
29889,
13609,
580,
29871,
396,
9536,
5224,
1206,
29871,
13,
1678,
736,
4971,
453,
29896,
13,
13,
1753,
1423,
2605,
29896,
29898,
305,
7749,
15797,
453,
29896,
1125,
29937,
4294,
278,
1121,
310,
7348,
310,
19911,
13,
1678,
1596,
703,
8949,
3045,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
361,
445,
338,
596,
2186,
10608,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
12024,
29915,
29879,
1074,
825,
674,
3799,
1159,
13,
1678,
1596,
580,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
29871,
13,
268,
13,
1678,
2391,
29918,
29896,
29922,
3366,
29890,
23232,
3284,
18463,
29874,
12464,
3108,
13,
1678,
1959,
16957,
29922,
8172,
29889,
16957,
29898,
1293,
29918,
29896,
29897,
29937,
9536,
4036,
7348,
577,
393,
1432,
931,
278,
1121,
674,
367,
4036,
13,
268,
13,
13,
1678,
565,
29871,
10434,
15797,
453,
29896,
1275,
1959,
16957,
584,
13,
4706,
1596,
703,
9048,
29892,
393,
19911,
2444,
2428,
11828,
23157,
13,
4706,
1596,
703,
1576,
11103,
338,
1623,
29892,
366,
5401,
596,
937,
8589,
29991,
1159,
13,
4706,
1596,
703,
9544,
29974,
29896,
29900,
29900,
29892,
6650,
29974,
29945,
29900,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
5618,
263,
28875,
1159,
13,
4706,
1596,
703,
3492,
13726,
29991,
1159,
13,
4706,
1596,
703,
1576,
11103,
8589,
1250,
322,
366,
14074,
29922,
29918,
543,
29897,
259,
13,
268,
13,
13,
1753,
6755,
15797,
453,
29906,
7295,
13,
1678,
9995,
25039,
1299,
11662,
2890,
3446,
3235,
11662,
1213,
15945,
13,
268,
13,
1678,
4971,
453,
29906,
29922,
5124,
13,
1678,
1550,
4971,
453,
29906,
29991,
543,
6026,
495,
29908,
392,
4971,
453,
29906,
29991,
543,
8754,
420,
2896,
479,
1115,
13,
308,
13,
4706,
4971,
453,
29906,
353,
1881,
703,
8809,
436,
4971,
453,
674,
366,
671,
2750,
29973,
313,
6026,
495,
470,
2379,
420,
2896,
479,
1125,
16521,
13,
13,
1678,
736,
4971,
453,
29906,
268,
13,
268,
13,
268,
13,
1753,
1423,
2605,
29906,
29898,
305,
7749,
15797,
453,
29906,
1125,
13,
1678,
1596,
703,
8949,
3045,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
361,
445,
338,
596,
2186,
10608,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
12024,
29915,
29879,
1074,
825,
674,
3799,
1159,
13,
1678,
1596,
580,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
29871,
13,
268,
13,
1678,
2391,
29918,
29896,
29922,
3366,
6026,
495,
3284,
8754,
420,
2896,
479,
3108,
13,
1678,
1959,
16957,
29922,
8172,
29889,
16957,
29898,
1293,
29918,
29896,
29897,
13,
268,
13,
13,
1678,
565,
29871,
10434,
15797,
453,
29906,
1275,
1959,
16957,
584,
13,
4706,
1596,
703,
9048,
29892,
393,
19911,
2444,
2428,
11828,
23157,
13,
4706,
1596,
703,
1576,
11103,
338,
1623,
29892,
366,
5401,
596,
937,
8589,
29991,
1159,
13,
4706,
1596,
703,
9544,
29974,
29896,
29900,
29900,
29892,
6650,
29974,
29945,
29900,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
5618,
263,
28875,
1159,
13,
4706,
1596,
703,
3492,
13726,
29991,
1159,
13,
4706,
1596,
703,
1576,
11103,
8589,
1250,
322,
366,
14074,
29922,
29918,
543,
29897,
259,
13,
308,
13,
308,
13,
308,
13,
1753,
6755,
15797,
453,
29941,
7295,
13,
1678,
4971,
453,
29941,
29922,
5124,
13,
1678,
1550,
4971,
453,
29941,
29991,
543,
2008,
287,
24347,
29908,
392,
4971,
453,
29941,
29991,
543,
29956,
457,
806,
666,
1115,
13,
4706,
4971,
453,
29941,
353,
1881,
703,
8809,
436,
4971,
453,
674,
366,
671,
2750,
29973,
313,
2008,
287,
24347,
470,
399,
457,
806,
666,
1125,
16521,
13,
308,
13,
268,
13,
13,
1678,
736,
4971,
453,
29941,
268,
13,
268,
13,
268,
13,
1753,
1423,
2605,
29941,
29898,
305,
7749,
15797,
453,
29941,
1125,
13,
1678,
1596,
703,
8949,
3045,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
361,
445,
338,
596,
2186,
10608,
1159,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
13,
1678,
1596,
703,
12024,
29915,
29879,
1074,
825,
674,
3799,
1159,
13,
1678,
1596,
580,
13,
1678,
931,
29889,
17059,
29898,
29906,
29897,
29871,
13,
268,
13,
1678,
2391,
29918,
29896,
29922,
3366,
29956,
457,
806,
666,
3284,
2008,
287,
24347,
3108,
13,
1678,
1959,
16957,
29922,
8172,
29889,
16957,
29898,
1293,
29918,
29896,
29897,
13,
268,
13,
13,
1678,
565,
29871,
10434,
15797,
453,
29941,
1275,
1959,
16957,
584,
13,
4706,
1596,
703,
9048,
29892,
393,
19911,
2444,
2428,
11828,
23157,
13,
4706,
1596,
703,
1576,
11103,
338,
1623,
29892,
366,
5401,
596,
937,
8589,
29991,
1159,
13,
4706,
1596,
703,
9544,
29974,
29896,
29900,
29900,
29892,
6650,
29974,
29945,
29900,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
5618,
263,
28875,
1159,
13,
4706,
1596,
703,
3492,
13726,
29991,
1159,
13,
4706,
1596,
703,
1576,
11103,
8589,
1250,
322,
366,
14074,
29922,
29918,
543,
29897,
259,
13,
268,
2
] |
Cogs/CheckRoles.py | MrAngelDo6pa/MedBotS | 0 | 1617645 | <filename>Cogs/CheckRoles.py<gh_stars>0
import asyncio
import discord
from discord.ext import commands
from Cogs import Settings
from Cogs import DisplayName
from Cogs import Nullify
def setup(bot):
# This module isn't actually a cog
return
async def checkroles(user, channel, settings, bot, suppress : bool = False, **kwargs):
# This method checks whether we need to promote, demote, or whatever
# then performs the said action, and outputs.
if user.bot: return # Don't apply roles to bots
DisplayName = bot.get_cog("DisplayName")
if type(channel) is discord.Guild:
server = channel
channel = None
else:
server = channel.guild
# Get our preliminary vars
msg = None
xpPromote = kwargs.get("xp_promote",settings.getServerStat(server,"XPPromote"))
xpDemote = kwargs.get("xp_demote",settings.getServerStat(server,"XPDemote"))
userXP = int(settings.getUserStat(user, server, "XP"))
suppProm = kwargs.get("suppress_promotions",settings.getServerStat(server,"SuppressPromotions"))
suppDem = kwargs.get("suppress_demotions",settings.getServerStat(server,"SuppressDemotions"))
onlyOne = kwargs.get("only_one_role",settings.getServerStat(server,"OnlyOneRole"))
# Check if we're suppressing @here and @everyone mentions
if settings.getServerStat(server, "SuppressMentions"):
suppressed = True
else:
suppressed = False
changed = False
promoArray = settings.getServerStat(server, "PromotionArray")
promoArray = sorted(promoArray, key=lambda x:int(x['XP']))
addRoles = []
remRoles = []
# Final checks for singular role-holding. Will find a better system at
# some point - probably...
if onlyOne:
# Only one role allowed, make sure we don't have the rest
# Get the role we're supposed to be at
current_role = None
is_higher = False
target_role = None
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
# Check if it's a real role
if not test_role:
continue
if int(role["XP"]) > userXP:
# We don't have xp for this role
# Set it if we already have it though
if test_role in user.roles:
current_role = test_role
is_higher = True
else:
# We've got the resources for it
target_role = test_role
# Set it if we already have it though
if test_role in user.roles:
current_role = test_role
# Remove all roles except current
if current_role == target_role:
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
if test_role != target_role and test_role in user.roles:
changed = True
remRoles.append(test_role)
else:
# Demote if needed
if is_higher:
if xpDemote:
# We can remove roles above - but keep the last one
msg = '*{}* was demoted from **{}**!'.format(DisplayName.name(user), current_role.name)
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
if test_role != target_role and test_role in user.roles:
remRoles.append(test_role)
addRoles.append(target_role)
changed = True
else:
# We're not demoting - but let's add only the current role to the list
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
if test_role != current_role and test_role in user.roles:
remRoles.append(test_role)
changed = True
# Promote if needed
else:
if xpPromote:
# Remove all roles below
msg = '*{}* was promoted to **{}**!'.format(DisplayName.name(user), target_role.name)
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
if test_role != target_role and test_role in user.roles:
remRoles.append(test_role)
addRoles.append(target_role)
changed = True
else:
# We're not promoting - but let's add only the current role to the list
for role in promoArray:
test_role = DisplayName.roleForID(role['ID'], server)
if test_role != current_role and test_role in user.roles:
remRoles.append(test_role)
changed = True
else:
# Check promotions first
if xpPromote:
# This is, by far, the more functional way
for role in promoArray:
# Iterate through the roles, and add which we have xp for
if int(role['XP']) <= userXP:
# We *can* have this role, let's add it to a list
addRole = DisplayName.roleForID(role['ID'], server)
if addRole:
if not addRole in user.roles:
addRoles.append(addRole)
if not suppProm:
msg = '*{}* was promoted to **{}**!'.format(DisplayName.name(user), addRole.name)
changed = True
# Allow independent promotion/demotion
if xpDemote:
for role in promoArray:
# Iterate through the roles, and add which we have xp for
if int(role['XP']) > userXP:
# We *can* have this role, let's add it to a list
remRole = DisplayName.roleForID(role['ID'], server)
if remRole:
if remRole in user.roles:
remRoles.append(remRole)
if not suppDem:
msg = '*{}* was demoted from **{}**!'.format(DisplayName.name(user), remRole.name)
changed = True
# Add and remove roles as needed
if len(addRoles) or len(remRoles):
settings.role.change_roles(user, add_roles=addRoles, rem_roles=remRoles)
# Check if we have a message to display - and display it
if msg and channel and (not suppress):
# Check for suppress
if suppressed:
msg = Nullify.clean(msg)
await channel.send(msg)
return changed
| [
1,
529,
9507,
29958,
29907,
12099,
29914,
5596,
29934,
6544,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
408,
948,
3934,
13,
5215,
2313,
536,
13,
3166,
259,
2313,
536,
29889,
1062,
1053,
8260,
13,
3166,
259,
315,
12099,
1053,
19215,
13,
3166,
259,
315,
12099,
1053,
17440,
1170,
13,
3166,
259,
315,
12099,
1053,
19014,
1598,
13,
13,
1753,
6230,
29898,
7451,
1125,
13,
1678,
396,
910,
3883,
3508,
29915,
29873,
2869,
263,
274,
468,
13,
1678,
736,
13,
13,
12674,
822,
1423,
307,
793,
29898,
1792,
29892,
8242,
29892,
6055,
29892,
9225,
29892,
21301,
584,
6120,
353,
7700,
29892,
3579,
19290,
1125,
13,
1678,
396,
910,
1158,
12747,
3692,
591,
817,
304,
27391,
29892,
1261,
866,
29892,
470,
6514,
13,
1678,
396,
769,
23233,
278,
1497,
3158,
29892,
322,
14391,
29889,
13,
1678,
565,
1404,
29889,
7451,
29901,
736,
396,
3872,
29915,
29873,
3394,
16178,
304,
289,
1862,
13,
1678,
17440,
1170,
353,
9225,
29889,
657,
29918,
29883,
468,
703,
9323,
1170,
1159,
13,
268,
13,
1678,
565,
1134,
29898,
12719,
29897,
338,
2313,
536,
29889,
9485,
789,
29901,
13,
4706,
1923,
353,
8242,
13,
4706,
8242,
353,
6213,
13,
1678,
1683,
29901,
13,
4706,
1923,
353,
8242,
29889,
2543,
789,
13,
268,
13,
1678,
396,
3617,
1749,
758,
2576,
3821,
24987,
13,
1678,
10191,
308,
353,
6213,
13,
1678,
921,
29886,
18571,
866,
259,
353,
9049,
5085,
29889,
657,
703,
26330,
29918,
14032,
866,
613,
11027,
29889,
657,
6004,
9513,
29898,
2974,
1699,
29990,
18009,
456,
866,
5783,
13,
1678,
921,
29886,
29928,
331,
866,
1678,
353,
9049,
5085,
29889,
657,
703,
26330,
29918,
2310,
866,
613,
11027,
29889,
657,
6004,
9513,
29898,
2974,
1699,
29990,
25014,
331,
866,
5783,
13,
1678,
1404,
29990,
29925,
418,
353,
938,
29898,
11027,
29889,
657,
2659,
9513,
29898,
1792,
29892,
1923,
29892,
376,
29990,
29925,
5783,
13,
1678,
1462,
18571,
1678,
353,
9049,
5085,
29889,
657,
703,
19303,
1253,
29918,
14032,
327,
1080,
613,
11027,
29889,
657,
6004,
9513,
29898,
2974,
1699,
20182,
1253,
18571,
327,
1080,
5783,
13,
1678,
1462,
29928,
331,
268,
353,
9049,
5085,
29889,
657,
703,
19303,
1253,
29918,
2310,
327,
1080,
613,
11027,
29889,
657,
6004,
9513,
29898,
2974,
1699,
20182,
1253,
29928,
331,
327,
1080,
5783,
13,
1678,
871,
6716,
268,
353,
9049,
5085,
29889,
657,
703,
6194,
29918,
650,
29918,
12154,
613,
11027,
29889,
657,
6004,
9513,
29898,
2974,
1699,
11730,
6716,
16727,
5783,
13,
13,
1678,
396,
5399,
565,
591,
29915,
276,
21301,
292,
732,
4150,
322,
732,
17991,
650,
26649,
13,
1678,
565,
6055,
29889,
657,
6004,
9513,
29898,
2974,
29892,
376,
20182,
1253,
29924,
296,
1080,
29908,
1125,
13,
4706,
21301,
287,
353,
5852,
13,
1678,
1683,
29901,
13,
4706,
21301,
287,
353,
7700,
13,
13,
1678,
3939,
353,
7700,
13,
1678,
2504,
29877,
2588,
353,
6055,
29889,
657,
6004,
9513,
29898,
2974,
29892,
376,
18571,
8194,
2588,
1159,
13,
1678,
2504,
29877,
2588,
353,
12705,
29898,
14032,
29877,
2588,
29892,
1820,
29922,
2892,
921,
29901,
524,
29898,
29916,
1839,
29990,
29925,
25901,
13,
13,
1678,
788,
29934,
6544,
353,
5159,
13,
1678,
1083,
29934,
6544,
353,
5159,
13,
13,
1678,
396,
9550,
12747,
363,
13512,
6297,
29899,
8948,
292,
29889,
29871,
2811,
1284,
263,
2253,
1788,
472,
13,
1678,
396,
777,
1298,
448,
3117,
856,
13,
1678,
565,
871,
6716,
29901,
13,
4706,
396,
9333,
697,
6297,
6068,
29892,
1207,
1854,
591,
1016,
29915,
29873,
505,
278,
1791,
13,
4706,
396,
3617,
278,
6297,
591,
29915,
276,
7424,
304,
367,
472,
13,
4706,
1857,
29918,
12154,
353,
6213,
13,
4706,
338,
29918,
9812,
261,
1678,
353,
7700,
13,
4706,
3646,
29918,
12154,
29871,
353,
6213,
13,
4706,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
9651,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
9651,
396,
5399,
565,
372,
29915,
29879,
263,
1855,
6297,
13,
9651,
565,
451,
1243,
29918,
12154,
29901,
13,
18884,
6773,
13,
9651,
565,
938,
29898,
12154,
3366,
29990,
29925,
20068,
1405,
1404,
29990,
29925,
29901,
13,
18884,
396,
1334,
1016,
29915,
29873,
505,
921,
29886,
363,
445,
6297,
13,
18884,
396,
3789,
372,
565,
591,
2307,
505,
372,
2466,
13,
18884,
565,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
1678,
1857,
29918,
12154,
353,
1243,
29918,
12154,
13,
462,
1678,
338,
29918,
9812,
261,
353,
5852,
13,
9651,
1683,
29901,
13,
18884,
396,
1334,
29915,
345,
2355,
278,
7788,
363,
372,
13,
18884,
3646,
29918,
12154,
353,
1243,
29918,
12154,
13,
18884,
396,
3789,
372,
565,
591,
2307,
505,
372,
2466,
13,
18884,
565,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
1678,
1857,
29918,
12154,
353,
1243,
29918,
12154,
13,
13,
4706,
396,
15154,
599,
16178,
5174,
1857,
13,
4706,
565,
1857,
29918,
12154,
1275,
3646,
29918,
12154,
29901,
13,
9651,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
18884,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
18884,
565,
1243,
29918,
12154,
2804,
3646,
29918,
12154,
322,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
1678,
3939,
353,
5852,
13,
462,
1678,
1083,
29934,
6544,
29889,
4397,
29898,
1688,
29918,
12154,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
4432,
866,
565,
4312,
13,
9651,
565,
338,
29918,
9812,
261,
29901,
13,
18884,
565,
921,
29886,
29928,
331,
866,
29901,
13,
462,
1678,
396,
1334,
508,
3349,
16178,
2038,
448,
541,
3013,
278,
1833,
697,
13,
462,
1678,
10191,
353,
525,
29930,
8875,
29930,
471,
1261,
5715,
515,
3579,
8875,
1068,
29991,
4286,
4830,
29898,
9323,
1170,
29889,
978,
29898,
1792,
511,
1857,
29918,
12154,
29889,
978,
29897,
13,
462,
1678,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
462,
4706,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
4706,
565,
1243,
29918,
12154,
2804,
3646,
29918,
12154,
322,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
1083,
29934,
6544,
29889,
4397,
29898,
1688,
29918,
12154,
29897,
13,
462,
1678,
788,
29934,
6544,
29889,
4397,
29898,
5182,
29918,
12154,
29897,
13,
462,
1678,
3939,
353,
5852,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
1334,
29915,
276,
451,
1261,
11427,
448,
541,
1235,
29915,
29879,
788,
871,
278,
1857,
6297,
304,
278,
1051,
13,
462,
1678,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
462,
4706,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
4706,
565,
1243,
29918,
12154,
2804,
1857,
29918,
12154,
322,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
1083,
29934,
6544,
29889,
4397,
29898,
1688,
29918,
12154,
29897,
13,
462,
9651,
3939,
353,
5852,
13,
9651,
396,
9705,
866,
565,
4312,
13,
9651,
1683,
29901,
13,
18884,
565,
921,
29886,
18571,
866,
29901,
13,
462,
1678,
396,
15154,
599,
16178,
2400,
13,
462,
1678,
10191,
353,
525,
29930,
8875,
29930,
471,
21201,
304,
3579,
8875,
1068,
29991,
4286,
4830,
29898,
9323,
1170,
29889,
978,
29898,
1792,
511,
3646,
29918,
12154,
29889,
978,
29897,
13,
462,
1678,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
462,
4706,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
4706,
565,
1243,
29918,
12154,
2804,
3646,
29918,
12154,
322,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
1083,
29934,
6544,
29889,
4397,
29898,
1688,
29918,
12154,
29897,
13,
462,
1678,
788,
29934,
6544,
29889,
4397,
29898,
5182,
29918,
12154,
29897,
13,
462,
1678,
3939,
353,
5852,
13,
18884,
1683,
29901,
13,
462,
1678,
396,
1334,
29915,
276,
451,
2504,
11427,
448,
541,
1235,
29915,
29879,
788,
871,
278,
1857,
6297,
304,
278,
1051,
13,
462,
1678,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
462,
4706,
1243,
29918,
12154,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
4706,
565,
1243,
29918,
12154,
2804,
1857,
29918,
12154,
322,
1243,
29918,
12154,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
1083,
29934,
6544,
29889,
4397,
29898,
1688,
29918,
12154,
29897,
13,
462,
9651,
3939,
353,
5852,
13,
13,
1678,
1683,
29901,
13,
4706,
396,
5399,
2504,
327,
1080,
937,
13,
4706,
565,
921,
29886,
18571,
866,
29901,
13,
9651,
396,
910,
338,
29892,
491,
2215,
29892,
278,
901,
13303,
982,
13,
9651,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
18884,
396,
20504,
403,
1549,
278,
16178,
29892,
322,
788,
607,
591,
505,
921,
29886,
363,
13,
18884,
565,
938,
29898,
12154,
1839,
29990,
29925,
11287,
5277,
1404,
29990,
29925,
29901,
13,
462,
1678,
396,
1334,
334,
3068,
29930,
505,
445,
6297,
29892,
1235,
29915,
29879,
788,
372,
304,
263,
1051,
13,
462,
1678,
788,
16727,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
1678,
565,
788,
16727,
29901,
13,
462,
4706,
565,
451,
788,
16727,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
788,
29934,
6544,
29889,
4397,
29898,
1202,
16727,
29897,
13,
462,
9651,
565,
451,
1462,
18571,
29901,
13,
462,
18884,
10191,
353,
525,
29930,
8875,
29930,
471,
21201,
304,
3579,
8875,
1068,
29991,
4286,
4830,
29898,
9323,
1170,
29889,
978,
29898,
1792,
511,
788,
16727,
29889,
978,
29897,
13,
462,
9651,
3939,
353,
5852,
13,
4706,
396,
29408,
7417,
22360,
29914,
2310,
8194,
13,
4706,
565,
921,
29886,
29928,
331,
866,
29901,
13,
9651,
363,
6297,
297,
2504,
29877,
2588,
29901,
13,
18884,
396,
20504,
403,
1549,
278,
16178,
29892,
322,
788,
607,
591,
505,
921,
29886,
363,
13,
18884,
565,
938,
29898,
12154,
1839,
29990,
29925,
11287,
1405,
1404,
29990,
29925,
29901,
13,
462,
1678,
396,
1334,
334,
3068,
29930,
505,
445,
6297,
29892,
1235,
29915,
29879,
788,
372,
304,
263,
1051,
13,
462,
1678,
1083,
16727,
353,
17440,
1170,
29889,
12154,
2831,
1367,
29898,
12154,
1839,
1367,
7464,
1923,
29897,
13,
462,
1678,
565,
1083,
16727,
29901,
13,
462,
4706,
565,
1083,
16727,
297,
1404,
29889,
307,
793,
29901,
13,
462,
9651,
1083,
29934,
6544,
29889,
4397,
29898,
1745,
16727,
29897,
13,
462,
9651,
565,
451,
1462,
29928,
331,
29901,
13,
462,
18884,
10191,
353,
525,
29930,
8875,
29930,
471,
1261,
5715,
515,
3579,
8875,
1068,
29991,
4286,
4830,
29898,
9323,
1170,
29889,
978,
29898,
1792,
511,
1083,
16727,
29889,
978,
29897,
13,
462,
9651,
3939,
353,
5852,
13,
13,
1678,
396,
3462,
322,
3349,
16178,
408,
4312,
13,
1678,
565,
7431,
29898,
1202,
29934,
6544,
29897,
470,
7431,
29898,
1745,
29934,
6544,
1125,
13,
4706,
6055,
29889,
12154,
29889,
3167,
29918,
307,
793,
29898,
1792,
29892,
788,
29918,
307,
793,
29922,
1202,
29934,
6544,
29892,
1083,
29918,
307,
793,
29922,
1745,
29934,
6544,
29897,
13,
13,
1678,
396,
5399,
565,
591,
505,
263,
2643,
304,
2479,
448,
322,
2479,
372,
13,
1678,
565,
10191,
322,
8242,
322,
313,
1333,
21301,
1125,
13,
4706,
396,
5399,
363,
21301,
13,
4706,
565,
21301,
287,
29901,
13,
9651,
10191,
353,
19014,
1598,
29889,
14941,
29898,
7645,
29897,
13,
4706,
7272,
8242,
29889,
6717,
29898,
7645,
29897,
13,
1678,
736,
3939,
13,
2
] |
Python/visualization.py | richieliuse/SegmentationCNN | 54 | 30095 | # encoding: utf-8
"""
Visualization functions for features and predictions.
Copyright 2016 <NAME>
"""
import numpy as np
from feature_extraction import load_raw_features
from evaluation import post_processing
import matplotlib.pyplot as plt
import pickle
def visualize_predictions():
"""
Visualize predictions resulting from a pretrained CNN model
on the test dataset.
"""
preds = np.load('../Data/predsTestTracks_100epochs_lr005.npy')
train_features, train_labels, test_features, test_labels = load_raw_features('../Data/rawFeatures.pickle')
data = np.load('../Data/testDataNormalized.npz')
test_y = data['test_y']
# load file lists and indices
with open('../Data/fileListsAndIndex.pickle', 'rb') as f:
train_files, train_idx, test_files, test_idx = pickle.load(f)
for i in range(len(test_labels)):
f = test_files[i]
print f
idx = np.where(test_idx == i)[0]
labels = test_y[idx]
preds_track = np.squeeze(np.asarray(preds[idx]))
preds_track = post_processing(preds_track)
preds_track = 0.5 + 0.5 * preds_track
labels *= 0.5
plt.plot(labels)
plt.plot(preds_track)
plt.show()
def visualize_training_data():
"""
Visualize log Mel beat spectra of the training dataset.
"""
train_features, train_labels, test_features, test_labels = load_raw_features('../Data/rawFeatures.pickle')
for features, labels in zip(train_features, train_labels):
f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
ax1.imshow(features)
ax2.plot(labels)
ax1.set_xlim([0, features.shape[1]])
ax1.set_ylim([0, 80])
ax2.set_xlim([0, features.shape[1]])
ax2.set_ylim([0, 1])
ax1.set_adjustable('box-forced')
ax2.set_adjustable('box-forced')
plt.show()
def visualize_test_data():
"""
Visualize log Mel beat spectra of the test dataset.
"""
train_features, train_labels, test_features, test_labels = load_raw_features('../Data/rawFeatures.pickle')
for features, labels in zip(test_features, test_labels):
f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
ax1.imshow(features)
ax2.plot(labels)
ax1.set_xlim([0, features.shape[1]])
ax1.set_ylim([0, 80])
ax2.set_xlim([0, features.shape[1]])
ax2.set_ylim([0, 1])
ax1.set_adjustable('box-forced')
ax2.set_adjustable('box-forced')
plt.show()
if __name__ == "__main__":
visualize_predictions()
# visualize_test_data()
# visualize_training_data()
| [
1,
396,
8025,
29901,
23616,
29899,
29947,
13,
15945,
29908,
13,
1678,
9249,
2133,
3168,
363,
5680,
322,
27303,
29889,
13,
13,
1678,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
13,
15945,
29908,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
4682,
29918,
1062,
13857,
1053,
2254,
29918,
1610,
29918,
22100,
13,
3166,
17983,
1053,
1400,
29918,
19170,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
5839,
280,
13,
13,
13,
1753,
7604,
675,
29918,
27711,
1080,
7295,
13,
1678,
9995,
13,
1678,
9249,
675,
27303,
9819,
515,
263,
758,
3018,
1312,
29696,
1904,
13,
1678,
373,
278,
1243,
8783,
29889,
13,
1678,
9995,
13,
13,
1678,
4450,
29879,
353,
7442,
29889,
1359,
877,
6995,
1469,
29914,
11965,
29879,
3057,
5323,
4684,
29918,
29896,
29900,
29900,
1022,
2878,
29879,
29918,
29212,
29900,
29900,
29945,
29889,
29876,
2272,
1495,
13,
1678,
7945,
29918,
22100,
29892,
7945,
29918,
21134,
29892,
1243,
29918,
22100,
29892,
1243,
29918,
21134,
353,
2254,
29918,
1610,
29918,
22100,
877,
6995,
1469,
29914,
1610,
8263,
3698,
29889,
23945,
280,
1495,
13,
13,
1678,
848,
353,
7442,
29889,
1359,
877,
6995,
1469,
29914,
1688,
1469,
19077,
1891,
29889,
9302,
29920,
1495,
13,
1678,
1243,
29918,
29891,
353,
848,
1839,
1688,
29918,
29891,
2033,
13,
13,
1678,
396,
2254,
934,
8857,
322,
16285,
13,
1678,
411,
1722,
877,
6995,
1469,
29914,
1445,
1293,
29879,
2855,
3220,
29889,
23945,
280,
742,
525,
6050,
1495,
408,
285,
29901,
13,
9651,
7945,
29918,
5325,
29892,
7945,
29918,
13140,
29892,
1243,
29918,
5325,
29892,
1243,
29918,
13140,
353,
5839,
280,
29889,
1359,
29898,
29888,
29897,
13,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1688,
29918,
21134,
22164,
13,
13,
4706,
285,
353,
1243,
29918,
5325,
29961,
29875,
29962,
13,
4706,
1596,
285,
13,
13,
4706,
22645,
353,
7442,
29889,
3062,
29898,
1688,
29918,
13140,
1275,
474,
9601,
29900,
29962,
13,
4706,
11073,
353,
1243,
29918,
29891,
29961,
13140,
29962,
13,
13,
4706,
4450,
29879,
29918,
11294,
353,
7442,
29889,
29879,
802,
29872,
911,
29898,
9302,
29889,
294,
2378,
29898,
11965,
29879,
29961,
13140,
12622,
13,
4706,
4450,
29879,
29918,
11294,
353,
1400,
29918,
19170,
29898,
11965,
29879,
29918,
11294,
29897,
13,
4706,
4450,
29879,
29918,
11294,
353,
29871,
29900,
29889,
29945,
718,
29871,
29900,
29889,
29945,
334,
4450,
29879,
29918,
11294,
13,
4706,
11073,
334,
29922,
29871,
29900,
29889,
29945,
13,
13,
4706,
14770,
29889,
5317,
29898,
21134,
29897,
13,
4706,
14770,
29889,
5317,
29898,
11965,
29879,
29918,
11294,
29897,
13,
4706,
14770,
29889,
4294,
580,
13,
13,
13,
1753,
7604,
675,
29918,
26495,
29918,
1272,
7295,
13,
1678,
9995,
13,
1678,
9249,
675,
1480,
6286,
16646,
6683,
336,
310,
278,
6694,
8783,
29889,
13,
1678,
9995,
13,
13,
1678,
7945,
29918,
22100,
29892,
7945,
29918,
21134,
29892,
1243,
29918,
22100,
29892,
1243,
29918,
21134,
353,
2254,
29918,
1610,
29918,
22100,
877,
6995,
1469,
29914,
1610,
8263,
3698,
29889,
23945,
280,
1495,
13,
13,
1678,
363,
5680,
29892,
11073,
297,
14319,
29898,
14968,
29918,
22100,
29892,
7945,
29918,
21134,
1125,
13,
13,
4706,
285,
29892,
313,
1165,
29896,
29892,
4853,
29906,
29897,
353,
14770,
29889,
1491,
26762,
29898,
29906,
29892,
29871,
29896,
29892,
6232,
29916,
29922,
5574,
29897,
13,
4706,
4853,
29896,
29889,
326,
4294,
29898,
22100,
29897,
13,
4706,
4853,
29906,
29889,
5317,
29898,
21134,
29897,
13,
13,
4706,
4853,
29896,
29889,
842,
29918,
29916,
2576,
4197,
29900,
29892,
5680,
29889,
12181,
29961,
29896,
24960,
13,
4706,
4853,
29896,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29947,
29900,
2314,
13,
13,
4706,
4853,
29906,
29889,
842,
29918,
29916,
2576,
4197,
29900,
29892,
5680,
29889,
12181,
29961,
29896,
24960,
13,
4706,
4853,
29906,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29896,
2314,
13,
13,
4706,
4853,
29896,
29889,
842,
29918,
328,
5143,
519,
877,
1884,
29899,
1454,
1133,
1495,
13,
4706,
4853,
29906,
29889,
842,
29918,
328,
5143,
519,
877,
1884,
29899,
1454,
1133,
1495,
13,
13,
4706,
14770,
29889,
4294,
580,
13,
13,
13,
1753,
7604,
675,
29918,
1688,
29918,
1272,
7295,
13,
1678,
9995,
13,
1678,
9249,
675,
1480,
6286,
16646,
6683,
336,
310,
278,
1243,
8783,
29889,
13,
1678,
9995,
13,
1678,
7945,
29918,
22100,
29892,
7945,
29918,
21134,
29892,
1243,
29918,
22100,
29892,
1243,
29918,
21134,
353,
2254,
29918,
1610,
29918,
22100,
877,
6995,
1469,
29914,
1610,
8263,
3698,
29889,
23945,
280,
1495,
13,
13,
1678,
363,
5680,
29892,
11073,
297,
14319,
29898,
1688,
29918,
22100,
29892,
1243,
29918,
21134,
1125,
13,
13,
4706,
285,
29892,
313,
1165,
29896,
29892,
4853,
29906,
29897,
353,
14770,
29889,
1491,
26762,
29898,
29906,
29892,
29871,
29896,
29892,
6232,
29916,
29922,
5574,
29897,
13,
4706,
4853,
29896,
29889,
326,
4294,
29898,
22100,
29897,
13,
4706,
4853,
29906,
29889,
5317,
29898,
21134,
29897,
13,
13,
4706,
4853,
29896,
29889,
842,
29918,
29916,
2576,
4197,
29900,
29892,
5680,
29889,
12181,
29961,
29896,
24960,
13,
4706,
4853,
29896,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29947,
29900,
2314,
13,
13,
4706,
4853,
29906,
29889,
842,
29918,
29916,
2576,
4197,
29900,
29892,
5680,
29889,
12181,
29961,
29896,
24960,
13,
4706,
4853,
29906,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29896,
2314,
13,
13,
4706,
4853,
29896,
29889,
842,
29918,
328,
5143,
519,
877,
1884,
29899,
1454,
1133,
1495,
13,
4706,
4853,
29906,
29889,
842,
29918,
328,
5143,
519,
877,
1884,
29899,
1454,
1133,
1495,
13,
13,
4706,
14770,
29889,
4294,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
7604,
675,
29918,
27711,
1080,
580,
13,
1678,
396,
7604,
675,
29918,
1688,
29918,
1272,
580,
13,
1678,
396,
7604,
675,
29918,
26495,
29918,
1272,
580,
13,
2
] |
misc/KeyTypes.py | sethr07/surveys | 2 | 73758 | #!/usr/bin/python
# Copyright (C) 2018 <NAME>, <EMAIL>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# check what kind of keys are in use
import sys
import json
import socket
import datetime
from dateutil import parser # for parsing time from comand line and certs
import pytz # for adding back TZ info to allow comparisons
bads={}
ktcounts={'rsa':0,'dsa':0,'ecc':0,'unknown':0}
sshcounts={'rsa':0,'dsa':0,'ecc':0,'ed25519':0,'unknown':0}
rsalengths={}
rsamoduli={}
p25ciphersuites={}
p443ciphersuites={}
p143ciphersuites={}
p993ciphersuites={}
def countkeytype(spki,ktcounts):
if 'rsa_public_key' in spki and spki['rsa_public_key']:
ktcounts['rsa'] += 1
klen=spki['rsa_public_key']['length']
rsalengths[klen]=rsalengths.get(klen,0) + 1
kmod=spki['rsa_public_key']['modulus']
rsamoduli[kmod]=rsamoduli.get(kmod,0) + 1
elif 'ecdsa_public_key' in spki and spki['ecdsa_public_key']:
ktcounts['ecc'] += 1
elif 'dsa_public_key' in spki and spki['dsa_public_key']:
ktcounts['dsa'] += 1
else:
ktcounts['unknown'] += 1
print "Unknown key type: " + str(spki)
return
def countsshkeytype(hostkey,counts):
#print json.dumps(hostkey,indent=2)
if hostkey['key_algorithm']=="ssh-rsa":
sshcounts['rsa'] += 1
klen=hostkey['rsa_public_key']['length']
rsalengths[klen]=rsalengths.get(klen,0) + 1
kmod=hostkey['rsa_public_key']['modulus']
rsamoduli[kmod]=rsamoduli.get(kmod,0) + 1
elif hostkey['key_algorithm']=="ssh-dss":
sshcounts['dsa'] += 1
elif hostkey['key_algorithm']=="ecdsa-sha2-nistp256":
sshcounts['ecc'] += 1
elif hostkey['key_algorithm']=="ssh-ed25519":
sshcounts['ed25519'] += 1
else:
sshcounts['unknown'] += 1
print "Unknown key type: " + str(hostkey)
def countciphersuites(c,name):
c["total"] = c.get("total",0) + 1
c[name] = c.get(name,0) + 1
with open(sys.argv[1],'r') as f:
overallcount=0
badcount=0
goodcount=0
for line in f:
j_content = json.loads(line)
somekey=False
try:
fp=j_content['p22']['ssh']['v2']['server_host_key']
countsshkeytype(fp,sshcounts)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
try:
skpi=j_content['p25']['smtp']['starttls']['tls']['certificate']['parsed']['subject_key_info']
countkeytype(spki,ktcounts)
ciphersuite=j_content['p25']['smtp']['starttls']['tls']['cipher_suite']['name']
countciphersuites(p25ciphersuites,ciphersuite)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
try:
fp=j_content['p110']['pop3']['starttls']['tls']['certificate']['parsed']['subject_key_info']
countkeytype(spki,ktcounts)
ciphersuite=j_content['p110']['pop3']['starttls']['tls']['cipher_suite']['name']
countciphersuites(p143ciphersuites,ciphersuite)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
try:
spki=j_content['p143']['imap']['starttls']['tls']['certificate']['parsed']['subject_key_info']
countkeytype(spki,ktcounts)
ciphersuite=j_content['p143']['imap']['starttls']['tls']['cipher_suite']['name']
countciphersuites(p143ciphersuites,ciphersuite)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
try:
spki=j_content['p443']['https']['tls']['certificate']['parsed']['subject_key_info']
countkeytype(spki,ktcounts)
ciphersuite=j_content['p443']['https']['tls']['cipher_suite']['name']
countciphersuites(p443ciphersuites,ciphersuite)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
try:
spki=j_content['p993']['imaps']['tls']['tls']['certificate']['parsed']['subject_key_info']
countkeytype(spki,ktcounts)
ciphersuite=j_content['p993']['imaps']['tls']['tls']['cipher_suite']['name']
countciphersuites(p993ciphersuites,ciphersuite)
somekey=True
except Exception as e:
#print >> sys.stderr, "fprint exception " + str(e)
pass
if somekey:
goodcount += 1
else:
bads[badcount]=j_content
badcount += 1
overallcount += 1
if overallcount % 100 == 0:
# exit early for debug purposes
#break
print >> sys.stderr, "Reading keys, did: " + str(overallcount)
# this gets crapped on each time (for now)
# in this case, these are the hosts with no crypto anywhere (except
# maybe on p22)
badf=open('dodgy.json', 'w')
badf.write(json.dumps(bads) + '\n')
badf.close()
print >> sys.stderr, "overall: " + str(overallcount) + \
" good: " + str(goodcount) + \
" bad: " + str(badcount) + \
" keytpes: " + str(ktcounts)
print >> sys.stderr, " ssh keytypes: " + str(sshcounts)
print "rsa lengths: " + json.dumps(rsalengths)
print "unique moduli: " + str(len(rsamoduli))
#print "rsa moduli: " + json.dumps(rsamoduli)
print "p25ciphersuites: " + json.dumps(p25ciphersuites,sort_keys=True,indent=2)
print "p143ciphersuites: " + json.dumps(p143ciphersuites,sort_keys=True,indent=2)
print "p443ciphersuites: " + json.dumps(p443ciphersuites,sort_keys=True,indent=2)
print "p993ciphersuites: " + json.dumps(p993ciphersuites,sort_keys=True,indent=2)
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29947,
529,
5813,
10202,
529,
26862,
6227,
29958,
13,
29937,
29871,
13,
29937,
20894,
2333,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
29937,
310,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
13,
29937,
297,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
13,
29937,
304,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
13,
29937,
14591,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
338,
13,
29937,
15252,
3276,
304,
437,
577,
29892,
4967,
304,
278,
1494,
5855,
29901,
13,
29937,
29871,
13,
29937,
450,
2038,
3509,
1266,
8369,
322,
445,
10751,
8369,
4091,
367,
5134,
297,
13,
29937,
599,
14591,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
29937,
29871,
13,
29937,
6093,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
613,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29979,
8079,
13764,
29979,
476,
22255,
29892,
8528,
15094,
1799,
6323,
13,
29937,
306,
3580,
5265,
3352,
29892,
2672,
6154,
15789,
4214,
350,
2692,
6058,
27848,
3352,
7495,
6093,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
13,
29937,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
5300,
405,
1164,
1177,
15860,
1177,
1692,
13780,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
13,
29937,
26524,
29950,
24125,
6323,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
20700,
17705,
6181,
15842,
13764,
29979,
315,
4375,
7833,
29892,
21330,
1529,
1692,
29903,
6323,
438,
29911,
4448,
13,
29937,
17705,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13764,
319,
9838,
8079,
8707,
29911,
4717,
1783,
29892,
323,
8476,
6323,
438,
29911,
4448,
22119,
1660,
29892,
9033,
3235,
4214,
3895,
29892,
13,
29937,
19474,
8079,
6323,
2672,
8707,
8186,
9838,
22659,
6093,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
13,
29937,
6093,
7791,
7818,
12982,
1525,
29889,
13,
13,
29937,
1423,
825,
2924,
310,
6611,
526,
297,
671,
13,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
9909,
13,
5215,
12865,
13,
3166,
2635,
4422,
1053,
13812,
396,
363,
13755,
931,
515,
20112,
1196,
322,
2284,
29879,
13,
5215,
282,
3637,
29920,
396,
363,
4417,
1250,
323,
29999,
5235,
304,
2758,
5734,
14125,
13,
13,
29890,
7925,
3790,
29913,
13,
1193,
2798,
29879,
3790,
29915,
2288,
29874,
2396,
29900,
5501,
29881,
4977,
2396,
29900,
5501,
29872,
617,
2396,
29900,
5501,
26690,
2396,
29900,
29913,
13,
15269,
2798,
29879,
3790,
29915,
2288,
29874,
2396,
29900,
5501,
29881,
4977,
2396,
29900,
5501,
29872,
617,
2396,
29900,
5501,
287,
29906,
29945,
29945,
29896,
29929,
2396,
29900,
5501,
26690,
2396,
29900,
29913,
13,
2288,
284,
1477,
29879,
3790,
29913,
13,
2288,
314,
397,
14549,
3790,
29913,
13,
29886,
29906,
29945,
455,
561,
414,
3121,
267,
3790,
29913,
13,
29886,
29946,
29946,
29941,
455,
561,
414,
3121,
267,
3790,
29913,
13,
29886,
29896,
29946,
29941,
455,
561,
414,
3121,
267,
3790,
29913,
13,
29886,
29929,
29929,
29941,
455,
561,
414,
3121,
267,
3790,
29913,
13,
13,
1753,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
1125,
13,
1678,
565,
525,
2288,
29874,
29918,
3597,
29918,
1989,
29915,
297,
805,
1984,
322,
805,
1984,
1839,
2288,
29874,
29918,
3597,
29918,
1989,
2033,
29901,
13,
4706,
413,
29873,
2798,
29879,
1839,
2288,
29874,
2033,
4619,
29871,
29896,
13,
4706,
413,
2435,
29922,
1028,
1984,
1839,
2288,
29874,
29918,
3597,
29918,
1989,
16215,
2848,
2033,
13,
4706,
364,
19585,
1477,
29879,
29961,
29895,
2435,
13192,
2288,
284,
1477,
29879,
29889,
657,
29898,
29895,
2435,
29892,
29900,
29897,
718,
29871,
29896,
13,
4706,
413,
1545,
29922,
1028,
1984,
1839,
2288,
29874,
29918,
3597,
29918,
1989,
16215,
1545,
14999,
2033,
13,
4706,
364,
13445,
397,
14549,
29961,
29895,
1545,
13192,
2288,
314,
397,
14549,
29889,
657,
29898,
29895,
1545,
29892,
29900,
29897,
718,
29871,
29896,
13,
1678,
25342,
525,
687,
29881,
4977,
29918,
3597,
29918,
1989,
29915,
297,
805,
1984,
322,
805,
1984,
1839,
687,
29881,
4977,
29918,
3597,
29918,
1989,
2033,
29901,
13,
4706,
413,
29873,
2798,
29879,
1839,
29872,
617,
2033,
4619,
29871,
29896,
13,
1678,
25342,
525,
29881,
4977,
29918,
3597,
29918,
1989,
29915,
297,
805,
1984,
322,
805,
1984,
1839,
29881,
4977,
29918,
3597,
29918,
1989,
2033,
29901,
13,
4706,
413,
29873,
2798,
29879,
1839,
29881,
4977,
2033,
4619,
29871,
29896,
13,
1678,
1683,
29901,
13,
4706,
413,
29873,
2798,
29879,
1839,
26690,
2033,
4619,
29871,
29896,
13,
4706,
1596,
376,
14148,
1820,
1134,
29901,
376,
718,
851,
29898,
1028,
1984,
29897,
13,
1678,
736,
13,
13,
1753,
2302,
15269,
1989,
1853,
29898,
3069,
1989,
29892,
2798,
29879,
1125,
13,
1678,
396,
2158,
4390,
29889,
29881,
17204,
29898,
3069,
1989,
29892,
12860,
29922,
29906,
29897,
13,
1678,
565,
3495,
1989,
1839,
1989,
29918,
20567,
2033,
26359,
15269,
29899,
2288,
29874,
1115,
13,
4706,
13927,
2798,
29879,
1839,
2288,
29874,
2033,
4619,
29871,
29896,
13,
4706,
413,
2435,
29922,
3069,
1989,
1839,
2288,
29874,
29918,
3597,
29918,
1989,
16215,
2848,
2033,
13,
4706,
364,
19585,
1477,
29879,
29961,
29895,
2435,
13192,
2288,
284,
1477,
29879,
29889,
657,
29898,
29895,
2435,
29892,
29900,
29897,
718,
29871,
29896,
13,
4706,
413,
1545,
29922,
3069,
1989,
1839,
2288,
29874,
29918,
3597,
29918,
1989,
16215,
1545,
14999,
2033,
13,
4706,
364,
13445,
397,
14549,
29961,
29895,
1545,
13192,
2288,
314,
397,
14549,
29889,
657,
29898,
29895,
1545,
29892,
29900,
29897,
718,
29871,
29896,
13,
1678,
25342,
3495,
1989,
1839,
1989,
29918,
20567,
2033,
26359,
15269,
29899,
29881,
893,
1115,
13,
4706,
13927,
2798,
29879,
1839,
29881,
4977,
2033,
4619,
29871,
29896,
13,
1678,
25342,
3495,
1989,
1839,
1989,
29918,
20567,
2033,
26359,
687,
29881,
4977,
29899,
17051,
29906,
29899,
29876,
391,
29886,
29906,
29945,
29953,
1115,
13,
4706,
13927,
2798,
29879,
1839,
29872,
617,
2033,
4619,
29871,
29896,
13,
1678,
25342,
3495,
1989,
1839,
1989,
29918,
20567,
2033,
26359,
15269,
29899,
287,
29906,
29945,
29945,
29896,
29929,
1115,
13,
4706,
13927,
2798,
29879,
1839,
287,
29906,
29945,
29945,
29896,
29929,
2033,
4619,
29871,
29896,
13,
1678,
1683,
29901,
13,
4706,
13927,
2798,
29879,
1839,
26690,
2033,
4619,
29871,
29896,
13,
4706,
1596,
376,
14148,
1820,
1134,
29901,
376,
718,
851,
29898,
3069,
1989,
29897,
13,
13,
1753,
2302,
455,
561,
414,
3121,
267,
29898,
29883,
29892,
978,
1125,
13,
1678,
274,
3366,
7827,
3108,
353,
274,
29889,
657,
703,
7827,
613,
29900,
29897,
718,
29871,
29896,
13,
1678,
274,
29961,
978,
29962,
353,
274,
29889,
657,
29898,
978,
29892,
29900,
29897,
718,
29871,
29896,
13,
13,
2541,
1722,
29898,
9675,
29889,
19218,
29961,
29896,
1402,
29915,
29878,
1495,
408,
285,
29901,
13,
1678,
12463,
2798,
29922,
29900,
13,
1678,
4319,
2798,
29922,
29900,
13,
1678,
1781,
2798,
29922,
29900,
13,
1678,
363,
1196,
297,
285,
29901,
13,
4706,
432,
29918,
3051,
353,
4390,
29889,
18132,
29898,
1220,
29897,
13,
4706,
777,
1989,
29922,
8824,
13,
4706,
1018,
29901,
13,
9651,
285,
29886,
29922,
29926,
29918,
3051,
1839,
29886,
29906,
29906,
16215,
15269,
16215,
29894,
29906,
16215,
2974,
29918,
3069,
29918,
1989,
2033,
13,
9651,
2302,
15269,
1989,
1853,
29898,
18091,
29892,
15269,
2798,
29879,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
4706,
1018,
29901,
13,
9651,
2071,
1631,
29922,
29926,
29918,
3051,
1839,
29886,
29906,
29945,
16215,
3844,
9392,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
6327,
8021,
16215,
862,
8485,
16215,
16009,
29918,
1989,
29918,
3888,
2033,
13,
9651,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
29897,
13,
9651,
4583,
561,
414,
29884,
568,
29922,
29926,
29918,
3051,
1839,
29886,
29906,
29945,
16215,
3844,
9392,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
455,
8096,
29918,
13495,
16215,
978,
2033,
13,
9651,
2302,
455,
561,
414,
3121,
267,
29898,
29886,
29906,
29945,
455,
561,
414,
3121,
267,
29892,
455,
561,
414,
29884,
568,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
4706,
1018,
29901,
13,
9651,
285,
29886,
29922,
29926,
29918,
3051,
1839,
29886,
29896,
29896,
29900,
16215,
7323,
29941,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
6327,
8021,
16215,
862,
8485,
16215,
16009,
29918,
1989,
29918,
3888,
2033,
13,
9651,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
29897,
13,
9651,
4583,
561,
414,
29884,
568,
29922,
29926,
29918,
3051,
1839,
29886,
29896,
29896,
29900,
16215,
7323,
29941,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
455,
8096,
29918,
13495,
16215,
978,
2033,
13,
9651,
2302,
455,
561,
414,
3121,
267,
29898,
29886,
29896,
29946,
29941,
455,
561,
414,
3121,
267,
29892,
455,
561,
414,
29884,
568,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
4706,
1018,
29901,
13,
9651,
805,
1984,
29922,
29926,
29918,
3051,
1839,
29886,
29896,
29946,
29941,
16215,
326,
481,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
6327,
8021,
16215,
862,
8485,
16215,
16009,
29918,
1989,
29918,
3888,
2033,
13,
9651,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
29897,
13,
9651,
4583,
561,
414,
29884,
568,
29922,
29926,
29918,
3051,
1839,
29886,
29896,
29946,
29941,
16215,
326,
481,
16215,
2962,
29873,
3137,
16215,
29873,
3137,
16215,
455,
8096,
29918,
13495,
16215,
978,
2033,
13,
9651,
2302,
455,
561,
414,
3121,
267,
29898,
29886,
29896,
29946,
29941,
455,
561,
414,
3121,
267,
29892,
455,
561,
414,
29884,
568,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
4706,
1018,
29901,
13,
9651,
805,
1984,
29922,
29926,
29918,
3051,
1839,
29886,
29946,
29946,
29941,
16215,
991,
16215,
29873,
3137,
16215,
6327,
8021,
16215,
862,
8485,
16215,
16009,
29918,
1989,
29918,
3888,
2033,
13,
9651,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
29897,
13,
9651,
4583,
561,
414,
29884,
568,
29922,
29926,
29918,
3051,
1839,
29886,
29946,
29946,
29941,
16215,
991,
16215,
29873,
3137,
16215,
455,
8096,
29918,
13495,
16215,
978,
2033,
13,
9651,
2302,
455,
561,
414,
3121,
267,
29898,
29886,
29946,
29946,
29941,
455,
561,
414,
3121,
267,
29892,
455,
561,
414,
29884,
568,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
4706,
1018,
29901,
13,
9651,
805,
1984,
29922,
29926,
29918,
3051,
1839,
29886,
29929,
29929,
29941,
16215,
326,
2547,
16215,
29873,
3137,
16215,
29873,
3137,
16215,
6327,
8021,
16215,
862,
8485,
16215,
16009,
29918,
1989,
29918,
3888,
2033,
13,
9651,
2302,
1989,
1853,
29898,
1028,
1984,
29892,
1193,
2798,
29879,
29897,
13,
9651,
4583,
561,
414,
29884,
568,
29922,
29926,
29918,
3051,
1839,
29886,
29929,
29929,
29941,
16215,
326,
2547,
16215,
29873,
3137,
16215,
29873,
3137,
16215,
455,
8096,
29918,
13495,
16215,
978,
2033,
13,
9651,
2302,
455,
561,
414,
3121,
267,
29898,
29886,
29929,
29929,
29941,
455,
561,
414,
3121,
267,
29892,
455,
561,
414,
29884,
568,
29897,
13,
9651,
777,
1989,
29922,
5574,
13,
4706,
5174,
8960,
408,
321,
29901,
29871,
13,
9651,
396,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
29888,
2158,
3682,
376,
718,
851,
29898,
29872,
29897,
13,
9651,
1209,
13,
13,
4706,
565,
777,
1989,
29901,
13,
9651,
1781,
2798,
4619,
29871,
29896,
13,
4706,
1683,
29901,
13,
9651,
4319,
29879,
29961,
12313,
2798,
13192,
29926,
29918,
3051,
13,
9651,
4319,
2798,
4619,
29871,
29896,
13,
4706,
12463,
2798,
4619,
29871,
29896,
13,
4706,
565,
12463,
2798,
1273,
29871,
29896,
29900,
29900,
1275,
29871,
29900,
29901,
13,
9651,
396,
6876,
4688,
363,
4744,
11976,
13,
9651,
396,
8690,
13,
9651,
1596,
5099,
10876,
29889,
303,
20405,
29892,
376,
6359,
292,
6611,
29892,
1258,
29901,
376,
718,
851,
29898,
957,
497,
2798,
29897,
13,
13,
29937,
445,
4947,
12220,
2986,
373,
1269,
931,
313,
1454,
1286,
29897,
13,
29937,
297,
445,
1206,
29892,
1438,
526,
278,
18982,
411,
694,
274,
17929,
12214,
313,
19499,
13,
29937,
5505,
373,
282,
29906,
29906,
29897,
13,
12313,
29888,
29922,
3150,
877,
29881,
397,
1927,
29889,
3126,
742,
525,
29893,
1495,
13,
12313,
29888,
29889,
3539,
29898,
3126,
29889,
29881,
17204,
29898,
29890,
7925,
29897,
718,
11297,
29876,
1495,
13,
12313,
29888,
29889,
5358,
580,
13,
13,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
957,
497,
29901,
376,
718,
851,
29898,
957,
497,
2798,
29897,
718,
320,
13,
4706,
376,
1781,
29901,
376,
718,
851,
29898,
16773,
2798,
29897,
718,
320,
13,
4706,
376,
4319,
29901,
376,
718,
851,
29898,
12313,
2798,
29897,
718,
320,
13,
4706,
376,
1820,
29873,
5547,
29901,
376,
718,
851,
29898,
1193,
2798,
29879,
29897,
29871,
13,
2158,
5099,
10876,
29889,
303,
20405,
29892,
376,
13927,
1820,
8768,
29901,
376,
718,
851,
29898,
15269,
2798,
29879,
29897,
13,
13,
2158,
376,
2288,
29874,
27497,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
2288,
284,
1477,
29879,
29897,
13,
2158,
376,
13092,
878,
14549,
29901,
376,
718,
851,
29898,
2435,
29898,
2288,
314,
397,
14549,
876,
13,
29937,
2158,
376,
2288,
29874,
878,
14549,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
2288,
314,
397,
14549,
29897,
13,
2158,
376,
29886,
29906,
29945,
455,
561,
414,
3121,
267,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
29886,
29906,
29945,
455,
561,
414,
3121,
267,
29892,
6605,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29906,
29897,
13,
2158,
376,
29886,
29896,
29946,
29941,
455,
561,
414,
3121,
267,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
29886,
29896,
29946,
29941,
455,
561,
414,
3121,
267,
29892,
6605,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29906,
29897,
13,
2158,
376,
29886,
29946,
29946,
29941,
455,
561,
414,
3121,
267,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
29886,
29946,
29946,
29941,
455,
561,
414,
3121,
267,
29892,
6605,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29906,
29897,
13,
2158,
376,
29886,
29929,
29929,
29941,
455,
561,
414,
3121,
267,
29901,
376,
718,
4390,
29889,
29881,
17204,
29898,
29886,
29929,
29929,
29941,
455,
561,
414,
3121,
267,
29892,
6605,
29918,
8149,
29922,
5574,
29892,
12860,
29922,
29906,
29897,
13,
2
] |
grove/alpha/jordan_gradient/jordan_gradient.py | mkeshita/grove | 229 | 31427 | import numpy as np
from pyquil import Program
from pyquil.api import QuantumComputer, get_qc
from grove.alpha.jordan_gradient.gradient_utils import (binary_float_to_decimal_float,
measurements_to_bf)
from grove.alpha.phaseestimation.phase_estimation import phase_estimation
def gradient_program(f_h: float, precision: int) -> Program:
"""
Gradient estimation via Jordan's algorithm (10.1103/PhysRevLett.95.050501).
:param f_h: Oracle output at perturbation h.
:param precision: Bit precision of gradient.
:return: Quil program to estimate gradient of f.
"""
# encode oracle values into phase
phase_factor = np.exp(1.0j * 2 * np.pi * abs(f_h))
U = np.array([[phase_factor, 0],
[0, phase_factor]])
p_gradient = phase_estimation(U, precision)
return p_gradient
def estimate_gradient(f_h: float, precision: int,
gradient_max: int = 1,
n_measurements: int = 50,
qc: QuantumComputer = None) -> float:
"""
Estimate the gradient using function evaluation at perturbation, h.
:param f_h: Oracle output at perturbation h.
:param precision: Bit precision of gradient.
:param gradient_max: OOM estimate of largest gradient value.
:param n_measurements: Number of times to measure system.
:param qc: The QuantumComputer object.
:return: Decimal estimate of gradient.
"""
# scale f_h by range of values gradient can take on
f_h *= 1. / gradient_max
# generate gradient program
perturbation_sign = np.sign(f_h)
p_gradient = gradient_program(f_h, precision)
# run gradient program
if qc is None:
qc = get_qc(f"{len(p_gradient.get_qubits())}q-qvm")
p_gradient.wrap_in_numshots_loop(n_measurements)
executable = qc.compiler.native_quil_to_executable(p_gradient)
measurements = qc.run(executable)
# summarize measurements
bf_estimate = perturbation_sign * measurements_to_bf(measurements)
bf_explicit = '{0:.16f}'.format(bf_estimate)
deci_estimate = binary_float_to_decimal_float(bf_explicit)
# rescale gradient
deci_estimate *= gradient_max
return deci_estimate
| [
1,
1053,
12655,
408,
7442,
13,
3166,
11451,
339,
309,
1053,
7835,
13,
3166,
11451,
339,
309,
29889,
2754,
1053,
22746,
398,
20606,
261,
29892,
679,
29918,
29939,
29883,
13,
13,
3166,
4071,
345,
29889,
2312,
29889,
29926,
536,
273,
29918,
24970,
29889,
24970,
29918,
13239,
1053,
313,
19541,
29918,
7411,
29918,
517,
29918,
7099,
3039,
29918,
7411,
29892,
13,
462,
462,
462,
4706,
20398,
29918,
517,
29918,
1635,
29897,
13,
3166,
4071,
345,
29889,
2312,
29889,
21646,
342,
7715,
29889,
21646,
29918,
342,
7715,
1053,
8576,
29918,
342,
7715,
13,
13,
13,
1753,
16030,
29918,
8860,
29898,
29888,
29918,
29882,
29901,
5785,
29892,
16716,
29901,
938,
29897,
1599,
7835,
29901,
13,
1678,
9995,
13,
1678,
19295,
993,
23248,
3025,
18284,
29915,
29879,
5687,
313,
29896,
29900,
29889,
29896,
29896,
29900,
29941,
29914,
25847,
1123,
29894,
29931,
1803,
29889,
29929,
29945,
29889,
29900,
29945,
29900,
29945,
29900,
29896,
467,
13,
13,
1678,
584,
3207,
285,
29918,
29882,
29901,
15401,
1962,
472,
22786,
362,
298,
29889,
13,
1678,
584,
3207,
16716,
29901,
18531,
16716,
310,
16030,
29889,
13,
1678,
584,
2457,
29901,
751,
309,
1824,
304,
12678,
16030,
310,
285,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
19750,
17919,
1819,
964,
8576,
13,
1678,
8576,
29918,
19790,
353,
7442,
29889,
4548,
29898,
29896,
29889,
29900,
29926,
334,
29871,
29906,
334,
7442,
29889,
1631,
334,
6425,
29898,
29888,
29918,
29882,
876,
13,
1678,
501,
353,
7442,
29889,
2378,
4197,
29961,
21646,
29918,
19790,
29892,
29871,
29900,
1402,
13,
462,
29871,
518,
29900,
29892,
8576,
29918,
19790,
24960,
13,
1678,
282,
29918,
24970,
353,
8576,
29918,
342,
7715,
29898,
29965,
29892,
16716,
29897,
13,
13,
1678,
736,
282,
29918,
24970,
13,
13,
13,
1753,
12678,
29918,
24970,
29898,
29888,
29918,
29882,
29901,
5785,
29892,
16716,
29901,
938,
29892,
13,
462,
418,
16030,
29918,
3317,
29901,
938,
353,
29871,
29896,
29892,
13,
462,
418,
302,
29918,
26658,
1860,
29901,
938,
353,
29871,
29945,
29900,
29892,
13,
462,
418,
3855,
29883,
29901,
22746,
398,
20606,
261,
353,
6213,
29897,
1599,
5785,
29901,
13,
1678,
9995,
13,
1678,
2661,
6490,
278,
16030,
773,
740,
17983,
472,
22786,
362,
29892,
298,
29889,
13,
13,
1678,
584,
3207,
285,
29918,
29882,
29901,
15401,
1962,
472,
22786,
362,
298,
29889,
13,
1678,
584,
3207,
16716,
29901,
18531,
16716,
310,
16030,
29889,
13,
1678,
584,
3207,
16030,
29918,
3317,
29901,
438,
6488,
12678,
310,
10150,
16030,
995,
29889,
13,
1678,
584,
3207,
302,
29918,
26658,
1860,
29901,
9681,
310,
3064,
304,
5645,
1788,
29889,
13,
1678,
584,
3207,
3855,
29883,
29901,
450,
22746,
398,
20606,
261,
1203,
29889,
13,
1678,
584,
2457,
29901,
3826,
3039,
12678,
310,
16030,
29889,
13,
1678,
9995,
13,
13,
1678,
396,
6287,
285,
29918,
29882,
491,
3464,
310,
1819,
16030,
508,
2125,
373,
13,
1678,
285,
29918,
29882,
334,
29922,
29871,
29896,
29889,
847,
16030,
29918,
3317,
13,
13,
1678,
396,
5706,
16030,
1824,
13,
1678,
22786,
362,
29918,
4530,
353,
7442,
29889,
4530,
29898,
29888,
29918,
29882,
29897,
13,
1678,
282,
29918,
24970,
353,
16030,
29918,
8860,
29898,
29888,
29918,
29882,
29892,
16716,
29897,
13,
13,
1678,
396,
1065,
16030,
1824,
13,
1678,
565,
3855,
29883,
338,
6213,
29901,
13,
4706,
3855,
29883,
353,
679,
29918,
29939,
29883,
29898,
29888,
29908,
29912,
2435,
29898,
29886,
29918,
24970,
29889,
657,
29918,
339,
14836,
580,
2915,
29939,
29899,
29939,
6925,
1159,
13,
13,
1678,
282,
29918,
24970,
29889,
6312,
29918,
262,
29918,
1949,
845,
1862,
29918,
7888,
29898,
29876,
29918,
26658,
1860,
29897,
13,
1678,
16813,
353,
3855,
29883,
29889,
21789,
29889,
11487,
29918,
339,
309,
29918,
517,
29918,
4258,
9246,
29898,
29886,
29918,
24970,
29897,
13,
1678,
20398,
353,
3855,
29883,
29889,
3389,
29898,
4258,
9246,
29897,
13,
13,
1678,
396,
19138,
675,
20398,
13,
1678,
289,
29888,
29918,
342,
6490,
353,
22786,
362,
29918,
4530,
334,
20398,
29918,
517,
29918,
1635,
29898,
26658,
1860,
29897,
13,
1678,
289,
29888,
29918,
4548,
4019,
353,
22372,
29900,
29901,
29889,
29896,
29953,
29888,
29913,
4286,
4830,
29898,
1635,
29918,
342,
6490,
29897,
13,
1678,
316,
455,
29918,
342,
6490,
353,
7581,
29918,
7411,
29918,
517,
29918,
7099,
3039,
29918,
7411,
29898,
1635,
29918,
4548,
4019,
29897,
13,
268,
13,
1678,
396,
620,
29883,
744,
16030,
13,
1678,
316,
455,
29918,
342,
6490,
334,
29922,
16030,
29918,
3317,
13,
13,
1678,
736,
316,
455,
29918,
342,
6490,
13,
2
] |
OPENAI/NER.py | F2210/C2R-Anonimize | 0 | 157993 | <filename>OPENAI/NER.py
import openai
openai.api_key = "<KEY>"
restart_sequence = "\n"
primer = open("primer.txt").read()
labels = ["person", "organisation", "location"]
labels = "".join([i + ", " for i in labels])
sentences = [
"Jacco is studying at Utrecht University.",
"Dan is an old friend from my time at Princeton.",
"My back problems started to come back."
]
for sentence in sentences:
input_text = "[" + labels + "]:" + sentence
response = openai.Completion.create(
engine="curie",
prompt=primer + input_text,
max_tokens=256,
temperature=0.4,
logprobs=4,
stop="]",
)
# print(response)
string = response["choices"][0]["text"].strip() + "]"
# print("##################" + string + "##################")
| [
1,
529,
9507,
29958,
4590,
1430,
23869,
29914,
13865,
29889,
2272,
13,
5215,
1722,
1794,
13,
13,
3150,
1794,
29889,
2754,
29918,
1989,
353,
9872,
10818,
11903,
13,
13,
5060,
442,
29918,
16506,
353,
6634,
29876,
29908,
13,
13,
558,
4193,
353,
1722,
703,
558,
4193,
29889,
3945,
2564,
949,
580,
13,
13,
21134,
353,
6796,
10532,
613,
376,
22481,
613,
376,
5479,
3108,
13,
13,
21134,
353,
376,
1642,
7122,
4197,
29875,
718,
9162,
376,
363,
474,
297,
11073,
2314,
13,
13,
18616,
2063,
353,
518,
13,
29871,
376,
29967,
17970,
338,
23382,
472,
501,
2484,
2570,
3014,
19602,
13,
29871,
376,
18529,
338,
385,
2030,
5121,
515,
590,
931,
472,
1588,
3742,
20666,
19602,
13,
29871,
376,
3421,
1250,
4828,
4687,
304,
2041,
1250,
1213,
13,
29962,
13,
13,
1454,
10541,
297,
25260,
29901,
13,
13,
29871,
1881,
29918,
726,
353,
376,
3366,
718,
11073,
718,
376,
5387,
29908,
718,
10541,
13,
13,
29871,
2933,
353,
1722,
1794,
29889,
28958,
29889,
3258,
29898,
13,
3986,
6012,
543,
2764,
347,
613,
13,
3986,
9508,
29922,
558,
4193,
718,
1881,
29918,
726,
29892,
13,
3986,
4236,
29918,
517,
12360,
29922,
29906,
29945,
29953,
29892,
13,
3986,
10430,
29922,
29900,
29889,
29946,
29892,
13,
3986,
1480,
771,
5824,
29922,
29946,
29892,
13,
3986,
5040,
543,
29962,
613,
13,
418,
1723,
13,
13,
29871,
396,
1596,
29898,
5327,
29897,
13,
13,
29871,
1347,
353,
2933,
3366,
1859,
1575,
3108,
29961,
29900,
29962,
3366,
726,
16862,
17010,
580,
718,
376,
18017,
13,
13,
29871,
396,
1596,
703,
13383,
2277,
29908,
718,
1347,
718,
376,
13383,
2277,
1159,
13,
2
] |
src/model/game/agent/manualagent.py | Jagermeister/expeditions | 0 | 150903 | from .agent import Agent
class ManualAgent(Agent):
name = 'Manual'
def move_from_state(self):
self.model.state_display()
return int(input()) | [
1,
515,
869,
14748,
1053,
28330,
13,
13,
1990,
2315,
950,
19661,
29898,
19661,
1125,
13,
1678,
1024,
353,
525,
2517,
950,
29915,
13,
13,
1678,
822,
4337,
29918,
3166,
29918,
3859,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4299,
29889,
3859,
29918,
4990,
580,
13,
4706,
736,
938,
29898,
2080,
3101,
2
] |
src/looper.py | darklab8/darklab_darkbot | 1 | 25496 | <reponame>darklab8/darklab_darkbot
"module for background tasks in the loop"
import datetime
import discord
from discord.ext import commands, tasks
from threading import Thread
import asyncio
import time
from src.views import View
from src.data_model import DataModel
import src.settings as settings
from src.storage import Storage
import logging
from .message_sent_history import message_history
from .shuffler import shuffled_dict
class Looper(commands.Cog):
def __init__(self, bot, storage: Storage, chanell_controller):
self.bot = bot
self.printer.start()
self.storage = storage
self.chanell_controller = chanell_controller
api_data = self.storage.get_game_data()
channels_ids = self.storage.get_channels_id()
for record in api_data.new_forum_records:
for channel_id in channels_ids:
message_history.add_message(channel_id=channel_id, record=record)
self.data = DataModel(api_data=api_data)
async def cog_unload(self):
self.printer.cancel()
print('unloading...')
@tasks.loop(seconds=5.0, reconnect=True, count=1)
async def printer(self):
try:
logging.info('OK executing printer loop')
updating_api_data = await self.storage.a_get_game_data()
self.data.update(updating_api_data)
# logging.info(f"context=new_forum_records type=looper, data={self.data.api_data.new_forum_records}")
self.storage.save_channel_settings()
channel_ids = self.storage.get_channels_id()
forbidden_channels = []
allowed_channels = {}
for channel_id in channel_ids:
channel_info = self.bot.get_channel(channel_id)
if channel_info is None:
forbidden_channels.append(channel_id)
else:
allowed_channels[channel_id] = channel_info
logging.info(f'context=allowed_channels, allowed_channels={allowed_channels.keys()}')
logging.info(f'context=forbidden_channels, forbidden_channels={forbidden_channels}')
shuffled_allowed_channels = shuffled_dict(allowed_channels)
logging.info(f'context=shuffled_allowed_channels, shuffled_allowed_channels={shuffled_allowed_channels}')
for channel_id, channel_info in shuffled_allowed_channels.items():
try:
logging.info(f'context=loop_begins_for_channel channel={channel_id} in guild={self.bot.get_channel(channel_id).guild}')
# delete expired messages
await self.chanell_controller.delete_exp_msgs(
channel_id, 40)
logging.info(f'context=channel_loop, channel={channel_id}, msg=deleting_old_msgs')
rendered_date, rendered_all, render_forum_records = await View(
self.data.api_data, self.storage,
channel_id).render_all()
logging.info(f'context=channel_loop, channel={channel_id}, msg=rendered_all')
# send final data update
try:
await self.chanell_controller.update_info(
channel_id,
rendered_all,
render_forum_records=render_forum_records)
logging.info(f'context=channel_loop, channel={channel_id}, msg=update_info_is_done')
except discord.errors.HTTPException:
await self.chanell_controller.update_info(
channel_id, rendered_date +
'\n**ERR: you tried to render too much info!**' +
'\nremove some of the values from config' +
'\nor write them fully instead of tags')
except Exception as error:
error_msg = f"ERR, loop_cycle, channel_id={str(channel_id)}, error={str(error)}"
logging.info(error_msg)
if isinstance(error, KeyboardInterrupt):
raise KeyboardInterrupt(
"time to exit, KeyboardInterrupt")
except Exception as error:
logging.error(f"ERR, context=whole_loop, error={str(error)}")
if isinstance(error, KeyboardInterrupt):
print("gracefully exiting")
def task(self, loop):
asyncio.run_coroutine_threadsafe(self.printer(), loop)
def task_creator(self, loop, delay=5):
print("starting task creator")
while True:
thread = Thread(
target=self.task,
args=(loop, ),
daemon=True,
)
thread.start()
time.sleep(delay)
def create_task_creator(self, loop):
"launch background daemon process"
thread = Thread(
target=self.task_creator,
args=(loop, ),
daemon=True,
)
thread.start()
@printer.before_loop
async def before_printer(self):
print('waiting...')
self.create_task_creator(asyncio.get_running_loop())
await self.bot.wait_until_ready()
| [
1,
529,
276,
1112,
420,
29958,
26031,
8205,
29947,
29914,
26031,
8205,
29918,
26031,
7451,
13,
29908,
5453,
363,
3239,
9595,
297,
278,
2425,
29908,
13,
5215,
12865,
13,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
29892,
9595,
13,
3166,
3244,
292,
1053,
10480,
13,
5215,
408,
948,
3934,
13,
5215,
931,
13,
13,
3166,
4765,
29889,
7406,
1053,
4533,
13,
3166,
4765,
29889,
1272,
29918,
4299,
1053,
3630,
3195,
13,
5215,
4765,
29889,
11027,
408,
6055,
13,
3166,
4765,
29889,
12925,
1053,
26162,
13,
5215,
12183,
13,
3166,
869,
4906,
29918,
18616,
29918,
18434,
1053,
2643,
29918,
18434,
13,
3166,
869,
845,
3096,
1358,
1053,
528,
3096,
839,
29918,
8977,
13,
13,
1990,
4309,
3372,
29898,
26381,
29889,
29907,
468,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9225,
29892,
8635,
29901,
26162,
29892,
521,
273,
514,
29918,
8299,
1125,
13,
4706,
1583,
29889,
7451,
353,
9225,
13,
4706,
1583,
29889,
558,
1639,
29889,
2962,
580,
13,
4706,
1583,
29889,
12925,
353,
8635,
13,
4706,
1583,
29889,
5083,
514,
29918,
8299,
353,
521,
273,
514,
29918,
8299,
13,
13,
4706,
7882,
29918,
1272,
353,
1583,
29889,
12925,
29889,
657,
29918,
11802,
29918,
1272,
580,
13,
13,
4706,
18196,
29918,
4841,
353,
1583,
29889,
12925,
29889,
657,
29918,
305,
12629,
29918,
333,
580,
13,
13,
4706,
363,
2407,
297,
7882,
29918,
1272,
29889,
1482,
29918,
23343,
29918,
3757,
4339,
29901,
13,
9651,
363,
8242,
29918,
333,
297,
18196,
29918,
4841,
29901,
13,
18884,
2643,
29918,
18434,
29889,
1202,
29918,
4906,
29898,
12719,
29918,
333,
29922,
12719,
29918,
333,
29892,
2407,
29922,
11651,
29897,
13,
13,
4706,
1583,
29889,
1272,
353,
3630,
3195,
29898,
2754,
29918,
1272,
29922,
2754,
29918,
1272,
29897,
13,
13,
1678,
7465,
822,
274,
468,
29918,
348,
1359,
29898,
1311,
1125,
13,
4706,
1583,
29889,
558,
1639,
29889,
20713,
580,
13,
4706,
1596,
877,
348,
13234,
856,
1495,
13,
13,
1678,
732,
20673,
29889,
7888,
29898,
23128,
29922,
29945,
29889,
29900,
29892,
337,
6915,
29922,
5574,
29892,
2302,
29922,
29896,
29897,
13,
1678,
7465,
822,
23028,
29898,
1311,
1125,
13,
13,
4706,
1018,
29901,
13,
9651,
12183,
29889,
3888,
877,
8949,
14012,
23028,
2425,
1495,
13,
13,
9651,
13271,
29918,
2754,
29918,
1272,
353,
7272,
1583,
29889,
12925,
29889,
29874,
29918,
657,
29918,
11802,
29918,
1272,
580,
13,
13,
9651,
1583,
29889,
1272,
29889,
5504,
29898,
786,
26747,
29918,
2754,
29918,
1272,
29897,
13,
13,
9651,
396,
12183,
29889,
3888,
29898,
29888,
29908,
4703,
29922,
1482,
29918,
23343,
29918,
3757,
4339,
1134,
29922,
417,
3372,
29892,
848,
3790,
1311,
29889,
1272,
29889,
2754,
29918,
1272,
29889,
1482,
29918,
23343,
29918,
3757,
4339,
27195,
13,
13,
9651,
1583,
29889,
12925,
29889,
7620,
29918,
12719,
29918,
11027,
580,
13,
13,
9651,
8242,
29918,
4841,
353,
1583,
29889,
12925,
29889,
657,
29918,
305,
12629,
29918,
333,
580,
13,
13,
9651,
19752,
4215,
29918,
305,
12629,
353,
5159,
13,
9651,
6068,
29918,
305,
12629,
353,
6571,
13,
13,
9651,
363,
8242,
29918,
333,
297,
8242,
29918,
4841,
29901,
13,
18884,
8242,
29918,
3888,
353,
1583,
29889,
7451,
29889,
657,
29918,
12719,
29898,
12719,
29918,
333,
29897,
13,
13,
18884,
565,
8242,
29918,
3888,
338,
6213,
29901,
13,
462,
1678,
19752,
4215,
29918,
305,
12629,
29889,
4397,
29898,
12719,
29918,
333,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
6068,
29918,
305,
12629,
29961,
12719,
29918,
333,
29962,
353,
8242,
29918,
3888,
13,
13,
9651,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
24622,
29918,
305,
12629,
29892,
6068,
29918,
305,
12629,
3790,
24622,
29918,
305,
12629,
29889,
8149,
28296,
1495,
13,
9651,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
1454,
29890,
4215,
29918,
305,
12629,
29892,
19752,
4215,
29918,
305,
12629,
3790,
1454,
29890,
4215,
29918,
305,
12629,
29913,
1495,
13,
632,
13,
9651,
528,
3096,
839,
29918,
24622,
29918,
305,
12629,
353,
528,
3096,
839,
29918,
8977,
29898,
24622,
29918,
305,
12629,
29897,
13,
13,
9651,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
845,
3096,
839,
29918,
24622,
29918,
305,
12629,
29892,
528,
3096,
839,
29918,
24622,
29918,
305,
12629,
3790,
845,
3096,
839,
29918,
24622,
29918,
305,
12629,
29913,
1495,
13,
9651,
363,
8242,
29918,
333,
29892,
8242,
29918,
3888,
297,
528,
3096,
839,
29918,
24622,
29918,
305,
12629,
29889,
7076,
7295,
13,
18884,
1018,
29901,
13,
462,
1678,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
7888,
29918,
463,
29879,
29918,
1454,
29918,
12719,
8242,
3790,
12719,
29918,
333,
29913,
297,
1410,
789,
3790,
1311,
29889,
7451,
29889,
657,
29918,
12719,
29898,
12719,
29918,
333,
467,
2543,
789,
29913,
1495,
13,
13,
462,
1678,
396,
5217,
1518,
2859,
7191,
13,
462,
1678,
7272,
1583,
29889,
5083,
514,
29918,
8299,
29889,
8143,
29918,
4548,
29918,
1516,
3174,
29898,
13,
462,
4706,
8242,
29918,
333,
29892,
29871,
29946,
29900,
29897,
13,
13,
462,
1678,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
12719,
29918,
7888,
29892,
8242,
3790,
12719,
29918,
333,
1118,
10191,
29922,
311,
1026,
292,
29918,
1025,
29918,
1516,
3174,
1495,
13,
13,
462,
1678,
13751,
29918,
1256,
29892,
13751,
29918,
497,
29892,
4050,
29918,
23343,
29918,
3757,
4339,
353,
7272,
4533,
29898,
13,
462,
4706,
1583,
29889,
1272,
29889,
2754,
29918,
1272,
29892,
1583,
29889,
12925,
29892,
13,
462,
4706,
8242,
29918,
333,
467,
9482,
29918,
497,
580,
13,
13,
462,
1678,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
12719,
29918,
7888,
29892,
8242,
3790,
12719,
29918,
333,
1118,
10191,
29922,
9482,
287,
29918,
497,
1495,
13,
13,
462,
1678,
396,
3638,
2186,
848,
2767,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
7272,
1583,
29889,
5083,
514,
29918,
8299,
29889,
5504,
29918,
3888,
29898,
13,
462,
9651,
8242,
29918,
333,
29892,
13,
462,
9651,
13751,
29918,
497,
29892,
13,
462,
9651,
4050,
29918,
23343,
29918,
3757,
4339,
29922,
9482,
29918,
23343,
29918,
3757,
4339,
29897,
13,
13,
462,
4706,
12183,
29889,
3888,
29898,
29888,
29915,
4703,
29922,
12719,
29918,
7888,
29892,
8242,
3790,
12719,
29918,
333,
1118,
10191,
29922,
5504,
29918,
3888,
29918,
275,
29918,
15091,
1495,
13,
462,
1678,
5174,
2313,
536,
29889,
12523,
29889,
10493,
2451,
29901,
13,
462,
4706,
7272,
1583,
29889,
5083,
514,
29918,
8299,
29889,
5504,
29918,
3888,
29898,
13,
462,
9651,
8242,
29918,
333,
29892,
13751,
29918,
1256,
718,
13,
462,
9651,
11297,
29876,
1068,
21662,
29901,
366,
1898,
304,
4050,
2086,
1568,
5235,
29991,
1068,
29915,
718,
13,
462,
9651,
11297,
29876,
5992,
777,
310,
278,
1819,
515,
2295,
29915,
718,
13,
462,
9651,
11297,
15459,
2436,
963,
8072,
2012,
310,
8282,
1495,
13,
18884,
5174,
8960,
408,
1059,
29901,
13,
462,
1678,
1059,
29918,
7645,
353,
285,
29908,
21662,
29892,
2425,
29918,
23090,
29892,
8242,
29918,
333,
3790,
710,
29898,
12719,
29918,
333,
19230,
1059,
3790,
710,
29898,
2704,
2915,
29908,
13,
462,
1678,
12183,
29889,
3888,
29898,
2704,
29918,
7645,
29897,
13,
462,
1678,
565,
338,
8758,
29898,
2704,
29892,
7670,
3377,
4074,
6685,
1125,
13,
462,
4706,
12020,
7670,
3377,
4074,
6685,
29898,
13,
462,
9651,
376,
2230,
304,
6876,
29892,
7670,
3377,
4074,
6685,
1159,
13,
4706,
5174,
8960,
408,
1059,
29901,
13,
9651,
12183,
29889,
2704,
29898,
29888,
29908,
21662,
29892,
3030,
29922,
15970,
280,
29918,
7888,
29892,
1059,
3790,
710,
29898,
2704,
2915,
1159,
13,
9651,
565,
338,
8758,
29898,
2704,
29892,
7670,
3377,
4074,
6685,
1125,
13,
18884,
1596,
703,
3874,
346,
3730,
6876,
292,
1159,
13,
13,
1678,
822,
3414,
29898,
1311,
29892,
2425,
1125,
13,
4706,
408,
948,
3934,
29889,
3389,
29918,
2616,
449,
457,
29918,
7097,
11177,
29898,
1311,
29889,
558,
1639,
3285,
2425,
29897,
13,
13,
1678,
822,
3414,
29918,
1037,
1061,
29898,
1311,
29892,
2425,
29892,
9055,
29922,
29945,
1125,
13,
4706,
1596,
703,
2962,
292,
3414,
907,
1061,
1159,
13,
4706,
1550,
5852,
29901,
13,
9651,
3244,
353,
10480,
29898,
13,
18884,
3646,
29922,
1311,
29889,
7662,
29892,
13,
18884,
6389,
7607,
7888,
29892,
10353,
13,
18884,
1146,
9857,
29922,
5574,
29892,
13,
9651,
1723,
13,
9651,
3244,
29889,
2962,
580,
13,
9651,
931,
29889,
17059,
29898,
18829,
29897,
13,
13,
1678,
822,
1653,
29918,
7662,
29918,
1037,
1061,
29898,
1311,
29892,
2425,
1125,
13,
4706,
376,
15343,
3239,
1146,
9857,
1889,
29908,
13,
4706,
3244,
353,
10480,
29898,
13,
9651,
3646,
29922,
1311,
29889,
7662,
29918,
1037,
1061,
29892,
13,
9651,
6389,
7607,
7888,
29892,
10353,
13,
9651,
1146,
9857,
29922,
5574,
29892,
13,
4706,
1723,
13,
4706,
3244,
29889,
2962,
580,
13,
13,
1678,
732,
558,
1639,
29889,
11083,
29918,
7888,
13,
1678,
7465,
822,
1434,
29918,
558,
1639,
29898,
1311,
1125,
13,
4706,
1596,
877,
10685,
292,
856,
1495,
13,
4706,
1583,
29889,
3258,
29918,
7662,
29918,
1037,
1061,
29898,
294,
948,
3934,
29889,
657,
29918,
21094,
29918,
7888,
3101,
13,
4706,
7272,
1583,
29889,
7451,
29889,
10685,
29918,
29305,
29918,
2040,
580,
13,
2
] |
Python_libraries/const.py | dorucioclea/Elrond-NFT-Trading | 3 | 68341 | DECIMALS = {"GNG-8d7e05" : 1000000000000000000,
"MEX-4183e7" : 1000000000000000000,
"LKMEX-9acade" : 1000000000000000000,
"WATER-104d38" : 1000000000000000000}
TOKEN_TYPE = {"G<PASSWORD>" : "token",
"ME<PASSWORD>" : "token",
"<PASSWORD>": "NFT",
"LKMEX-9acade" : "META",
"WATER-104d38" : "token",
"COLORS-14cff1" : "NFT"}
AUTHORIZED_TOKENS = ["G<PASSWORD>",
"ME<PASSWORD>",
"<PASSWORD>",
"LK<PASSWORD>",
"WATER-104d38",
"COLORS-14cff1"]
TOKEN_TYPE_U8 = {"Fungible" : "00",
"NonFungible" : "01",
"SemiFungible" : "02",
"Meta" : "03"}
| [
1,
5012,
29907,
2260,
8547,
353,
8853,
29954,
9312,
29899,
29947,
29881,
29955,
29872,
29900,
29945,
29908,
29871,
584,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29892,
29871,
13,
9651,
376,
2303,
29990,
29899,
29946,
29896,
29947,
29941,
29872,
29955,
29908,
29871,
584,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29892,
29871,
13,
9651,
376,
29931,
29968,
2303,
29990,
29899,
29929,
562,
1943,
29908,
584,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29892,
29871,
13,
9651,
376,
29956,
1299,
1001,
29899,
29896,
29900,
29946,
29881,
29941,
29947,
29908,
584,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29913,
259,
13,
13,
4986,
29968,
1430,
29918,
11116,
353,
8853,
29954,
29966,
25711,
17013,
11903,
584,
376,
6979,
613,
29871,
13,
795,
376,
2303,
29966,
25711,
17013,
11903,
584,
376,
6979,
613,
29871,
13,
795,
9872,
25711,
17013,
29958,
1115,
376,
29940,
7818,
613,
29871,
13,
795,
376,
29931,
29968,
2303,
29990,
29899,
29929,
562,
1943,
29908,
584,
376,
2303,
6040,
613,
29871,
13,
795,
376,
29956,
1299,
1001,
29899,
29896,
29900,
29946,
29881,
29941,
29947,
29908,
584,
376,
6979,
613,
29871,
13,
795,
376,
15032,
24125,
29899,
29896,
29946,
29883,
600,
29896,
29908,
584,
376,
29940,
7818,
9092,
13,
13,
20656,
29950,
1955,
26664,
3352,
29918,
4986,
29968,
1430,
29903,
353,
6796,
29954,
29966,
25711,
17013,
28341,
29871,
13,
462,
1678,
376,
2303,
29966,
25711,
17013,
28341,
29871,
13,
462,
1678,
9872,
25711,
17013,
28341,
29871,
13,
462,
1678,
376,
29931,
29968,
29966,
25711,
17013,
28341,
29871,
13,
462,
1678,
376,
29956,
1299,
1001,
29899,
29896,
29900,
29946,
29881,
29941,
29947,
613,
29871,
13,
462,
1678,
376,
15032,
24125,
29899,
29896,
29946,
29883,
600,
29896,
3108,
13,
13,
4986,
29968,
1430,
29918,
11116,
29918,
29965,
29947,
353,
8853,
29943,
686,
1821,
29908,
584,
376,
29900,
29900,
613,
13,
18884,
376,
12283,
29943,
686,
1821,
29908,
584,
376,
29900,
29896,
613,
29871,
13,
18884,
376,
29903,
14208,
29943,
686,
1821,
29908,
584,
376,
29900,
29906,
613,
29871,
13,
18884,
376,
19346,
29908,
584,
376,
29900,
29941,
9092,
13,
2
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.